A Question of understanding
From: Jack (jack_at_yankeeboysoftware.com)
Date: 03/09/04
- Previous message: Bernhard Holzmayer: "Re: Boot image using a Perl script"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 9 Mar 2004 04:17:03 -0800
I have been reading up on kernel modules, device drivers, and USB
programing, and as usual now have a foggy notion of how these three
all hang together. I would like to clarify a few things, though, and
any knowledgable comments are very welcome.
Question: Assume I want to communicate with a USB device in a 'linux
standard' way. There is currently no device driver for this
particular device, so I will need to write one.
Since this is a kernel module, I can't use libusb - a user space
library.
Is this correct ?
When I do write my device driver I should use a set of functionality
known as the 'The USB Core', which provides functions like:
int usb_register(struct usb_driver *drv);
int usb_submit_urb(purb_t purb);, etc...
Is this correct ?
Since my device driver is to be a kernel module, I do not link to any
libraries, the functions that I call from within my module will be
available to me as a result of insmod doing the fixups.
Is this correct ?
The device I want to communicate with is a block device, so I will be
using the 'proc' file system, rather than the making a character
device via mknod.
Is this correct ?
When I write my application to take advantage of my newly created
block device driver, I will 'open()' the device file registered by by
driver and communicate with it via 'ioctl()'.
Is this corect ?
Anything else you may wish to add ?
- Previous message: Bernhard Holzmayer: "Re: Boot image using a Perl script"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|