mirror of
git://projects.qi-hardware.com/ben-wpan.git
synced 2025-04-21 12:27:27 +03:00
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]
This commit is contained in:
@@ -190,6 +190,7 @@ void usb_poll(void)
|
||||
if (flags & (1 << EORSTI)) {
|
||||
if (user_reset)
|
||||
user_reset();
|
||||
user_setup = NULL;
|
||||
ep_init();
|
||||
UDINT &= ~(1 << EORSTI);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user