mirror of
git://projects.qi-hardware.com/ben-wpan.git
synced 2025-04-21 12:27:27 +03:00
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
This commit is contained in:
@@ -133,7 +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 void (*user_set_interface)(int nth);
|
||||
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