More change for USB suspend.
This commit is contained in:
@@ -40,6 +40,7 @@
|
||||
#include <stdlib.h>
|
||||
#define main emulated_main
|
||||
#else
|
||||
#include "mcu/cortex-m.h"
|
||||
#include "mcu/stm32f103.h"
|
||||
#endif
|
||||
|
||||
@@ -228,6 +229,8 @@ main (int argc, const char *argv[])
|
||||
#endif
|
||||
chopstx_t ccid_thd;
|
||||
|
||||
chopstx_conf_idle (1);
|
||||
|
||||
gnuk_malloc_init ();
|
||||
|
||||
#ifdef GNU_LINUX_EMULATION
|
||||
|
||||
@@ -1649,12 +1649,12 @@ usb_event_handle (struct usb_dev *dev)
|
||||
|
||||
case USB_EVENT_DEVICE_SUSPEND:
|
||||
led_blink (LED_OFF);
|
||||
chopstx_conf_idle (1);
|
||||
chopstx_conf_idle (2);
|
||||
bDeviceState |= USB_DEVICE_STATE_SUSPEND;
|
||||
break;
|
||||
|
||||
case USB_EVENT_DEVICE_WAKEUP:
|
||||
chopstx_conf_idle (0);
|
||||
chopstx_conf_idle (1);
|
||||
bDeviceState &= ~USB_DEVICE_STATE_SUSPEND;
|
||||
break;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user