I asked this a while ago and never got a response so I'll ask again. I'm being asked to get training on a certain hardware driver and it's written in C.
1) I've never written a driver so I don't know what is involved.
2) It has even been a while (~ 1 year) since I actually used C, so I'm wondering what I should brush up on. I still remember the basics, but I'm not too keen on memory allocation or working with hardware.
Does anyone have ANY experience in this stuff and could you even point me in a direction of any sort?
>1) I've never written a driver so I don't know what is involved.
It depends on the target environment and the device. Search google's Usenet archives and you'll find plenty of information.
>I'm wondering what I should brush up on
If you remember the basics then you should only need to brush up on your low level bit work. Refresh your memory on the bitwise operators and how they can be combined to do anything you want. You'll find yourself using them a great deal in a device driver.
Most OS's have a standard way of representing drivers (Eg. MS-DDK)
Finding a driver for a similar device to the one you're looking at is perhaps a good place to start.
- interrupt handlers and latency issues.
- privilege levels, direct hardware access.
- failures and timeouts.
drivers for linux
Linux Device Drivers is a good book to start.
OK... that should get me started. Does anyone know where I can actually look at some driver code? Maybe some open source stuff?
This driver will most likely be running on a Windows OS. It is an RTP driver communcating with different sensors and controls.
edit: and yes, I've tried google.
sure kernel.org The kernal has all the drivers in them. Just don't compile it. go through and look for the driver that is closest to what you want. If you are in windows all you need is something to extract a .tar.gz or .tar.bz Don't you just love Linux:)