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
- 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]