Hi all
I have got the connectivity line usb driver to a functional level.
Is not finished and has a few limitations, but should work with
the existing usb examples in the source tree (you'll need to change
them to actually use this driver though.)
The code is in my git repo:
git://github.com/gsmcmullin/libusbdev.git
I have also added a simple example of a USB controlled led.
This is the simplest usb device that actually does something.
With it is a Python (PyUSB + PyGTK) script to control the device.
For now, the driver doesn't set up interrupts properly, so don't
try usbd_poll from the irq handler. Some functions like suspend
and resume aren't implemented yet.
I'm interested if anyone has any ideas on the following:
The connectivity line devices use a shared receive fifo for all
endpoints. This requires the application to read the packets in
the order they are received, so all OUT endpoints must have
callback functions to read the data. In some applications it
is easier to have usbd_poll() called in an interrupt handler to
process standard requests, and have usbd_ep_packet_read
called from the application to poll for data on a bulk endpoint.
I can't think of a nice way to do this.
Another problem is that there is no way to flow control an OUT
endpoint. With the F103 driver NAKs will be sent until the
application reads the packet, with this driver this approach will
prevent all usb out/setup requests. Should new functions be
added to force an endpoint to send the NAK handshake?
Regards,
Gareth
--
Black Sphere Technologies Ltd.
Web: www.blacksphere.co.nz
Mobile: +64 27 777 2182
Tel: +64 9 478 8885
Skype: gareth.mcmullin
LinkedIn: http://nz.linkedin.com/in/gsmcmullin
|