1
0
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:
Werner Almesberger
2011-03-11 17:52:03 -03:00
parent e5571a26c3
commit d233c04c86
4 changed files with 18 additions and 3 deletions

View File

@@ -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;
}