Re: newbie's to USB driver question: where to start. by Serge
Serge
Sun Oct 19 01:21:22 CDT 2003
Thank you, Riu Tang for the reply.
> Is your device belongs to a standard class or a vendor specific one?
Actually *my* device is very simple: it is a bridge to industrial network
(BitBus).
Just one function: SendPacket. (Everything else USB-specific - enumeration,
vendor information, etc is inside USB slave chip FTDI245). Therefore I think
it (device)
is not HID, or Printer-like. But it it strongly resemble COM-port. Is it
standard class?
I am not sure.
> If it is a standard device, like printer, HID, then you may possibly
don't
> need to bother writing the class driver on the PDA by yourself. It may
> possibley be already provided in the OS (I don't know which PPC2002 model
> has usb host, but if you got one, then it makes nosense if no class driver
> is shipped with it).
There is OHCI driver on PDA. And client drivers: mass-storage -- USBMSC.DLL,
USBDISK6.DLL and HID -- USBHID.DLL, USBmouse.DLL.
> If the device is a vendor specific device, then I guess you need to
write
> both driver and application on the PDA for it.
Right. I need to write (simple) driver so that to permit developing
applications
accessing the indistrial network.
> Of course an easy way is to make it a stream interface driver,
> but you don't have to make it as a "COM" port driver. You have the full
control
> to define the interface between your own app and driver.
I thought that COM-port simulation is most simple, because all API functions
are there and app-writers know it good enough.
And I would be happy if somwhere I could find sample code for the driver
exporting minimum entry points so that the result looks like COM-port.
I have Platform builder. But I am just not sure about the right way to
start.
Is there a sample code good to start learning from?
I am sorry I'm not yet quite confident in terminology "standard class"
"vendor specific", "class driver". (But I will).
Thank you very much.
Serge.