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:
@@ -133,6 +133,7 @@ extern const uint8_t config_descriptor[];
|
||||
extern struct ep_descr eps[];
|
||||
|
||||
extern int (*user_setup)(const struct setup_request *setup);
|
||||
extern int (*user_setups[2])(const struct setup_request *setup);
|
||||
extern int (*user_get_descriptor)(uint8_t type, uint8_t index,
|
||||
const uint8_t **reply, uint8_t *size);
|
||||
extern void (*user_reset)(void);
|
||||
|
||||
Reference in New Issue
Block a user