1
0
mirror of git://projects.qi-hardware.com/ben-wpan.git synced 2024-11-14 17:34:03 +02:00
Commit Graph

6 Commits

Author SHA1 Message Date
Werner Almesberger
244e449131 atusb/fw/usb/: added support for bulk IN EP 1
The code is quite special-cased. Some more changes will be necessary
for interrupt or OUT EPs.

- atu2.c (NUM_EPS): increased from 1 to 2
- atu2.c (ep_rx): send zero-length packet also for EPs != 0
- atu2.c (handle_ep): clear FIFOCON when sending data on EP != 0
- atu2.c (ep_init): configure EP 1 as bulk IN with size 64
- usb.c (NUM_EPS): we don't need to define NUM_EPS here
2011-06-20 14:34:08 -03:00
Werner Almesberger
376236949b atusb/fw/usb/: we were busy-looping on TXINI. Mask the interrupt when idle.
- usb/usb.h (usb_ep_change), usb/atu2.c (usb_ep_change): new function
  called by the USB stack to notify the hardware-specific driver of
  an endpoint state change (EP_TX or EP_RX)
- usb/usb.c (usb_io): call usb_ep_change
- usb/atu2.c (handle_ep): mask TXINI if we have nothing to send
2011-06-11 14:17:44 -03:00
Werner Almesberger
bbe27fc357 atusb/fw: revert most of the user_setups change and use simple callback instead
This allows us to do other things as well, e.g., change state.

- ep0.c (ep0_init), usb/dfu.c (dfu_init): use user_setup
- usb/atu2.c (usb_poll): no need to reset user_setup - the user's
  reset function can do that
- usb/usb.h (user_setups), usb/usb.c (handle_setup): removed
  user_setups
- usb/usb.h (user_set_interface), usb/usb.c (user_set_interface,
  handle_setup): callback for SET_INTERFACE
2011-06-10 21:50:42 -03:00
Werner Almesberger
89d13ce8f8 atusb/fw/: SET_INTERFACE can now select among interfaces (changes user_setup)
- ep0.c (ep0_init), usb/dfu.c (dfu_init): set user_setups[0] instead
  of user_setup
- usb/atu2.c (usb_poll): reset user_setup on bus reset
- usb/usb.h (user_setups), usb/usb.c (user_setups): array of
  interface-specific setup functions
- usb/usb.c (handle_setup): in SET_INTERFACE, select setup function
  from user_setups according to interface
- usb/usb.c (handle_setup): if user_setup is not set (e.g., the
  optional SET_INTERFACE was never issued), fall back to user_setups[0]
2011-06-10 17:12:57 -03:00
Werner Almesberger
0293911fed atusb/fw/usb/: corrected type of user-provided descriptor
- usb.h, usb.c (user_get_descriptor): "reply" is simply "const uint8_t *",
  not "const uint8_t * const *"
2011-03-08 18:56:52 -03:00
Werner Almesberger
78cfc8ffeb moved atusb/fw3/ to atusb/fw/ 2011-02-22 00:24:07 -03:00