mirror of
git://projects.qi-hardware.com/ben-wpan.git
synced 2025-04-21 12:27:27 +03:00
atusb/fw: implemented USB bus reset (to host) and polling of reset from host
- usb/usb.h, usb/atu2.c (usb_reset): reset the USB bus by detaching and re-attaching the device - boot.c (main): force a USB reset before running the payload - usb/atu2.c (usb_poll): test for USB reset from the host (in progress) - usb/dfu.c (my_reset, dfu_init): register user USB reset handler
This commit is contained in:
@@ -264,21 +264,21 @@ static int my_descr(uint8_t type, uint8_t index, const uint8_t **reply,
|
||||
}
|
||||
|
||||
|
||||
#if 0
|
||||
static void my_reset(void)
|
||||
{
|
||||
#if 0
|
||||
/* @@@ not nice -- think about where this should go */
|
||||
extern void run_payload(void);
|
||||
|
||||
if (did_download)
|
||||
run_payload();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
void dfu_init(void)
|
||||
{
|
||||
user_setup = my_setup;
|
||||
user_get_descriptor = my_descr;
|
||||
// user_reset = my_reset;
|
||||
user_reset = my_reset;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user