Hi. I've been working on writing a USB driver for the Atmel AT43USB355E
device. This chip has an Atmel micro-controller along with a 2 port USB
hub, and a pair of endpoints for the micro-controller. The chip also has
some generic I/O, PWM drivers, ADC, etc. At this point I'm concentrating
on writing a module to simply send and receive packets to/from the device.
I'm running in interrupt mode.

At this point, my module is registered by the usb subsystem, the
product/vendor IDs are recognized when plugging the device in, my
interrupt in/out points are detected, interrupt send and receive pipes
appear to be properly created, usb_max_packet returns 32 (agreeing with
the device settings), and that's about it for the probe function. I'm
using a minor base number of 208, and I've created a node /dev/usb/atmel0.

Now I'm attempting to write the write() and read() functions, (and maybe
the irq() function?), and I'm not being very successful.

I have code running on the Atmel which takes in a packet and toggles some
LEDs to the value of the packet. The board also sends out (every two
seconds) the value on a set of I/O pins. I know this code is working,
because I've tested it independently.

I think I'm falling short in my understating of sending and receiving
packets in interrupt mode. I've looked at most of the modules in
../linux/drivers/usb and I've read just about everything I can find on the
web about linux usb driver development. A lot of devices use bulk mode, so
I'm not finding as many examples for interrupt mode.

Are there any generic examples of interrupt mode usb drivers? At this
point I'm really not trying to do anything fancy, so I suspect that the
solution is really rather simple.

I have read, write, and an irq function in my driver, but I NEVER see them
being called (the read and write are listed in my file_operations struct).
Since the device is sending out a packet every 2 seconds, I'd expect to
see the read function getting called, no?






-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to