From ce82b347f902656a5857d26e0f64e24ce4b65c02 Mon Sep 17 00:00:00 2001 From: NIIBE Yutaka Date: Fri, 17 Nov 2017 16:22:02 +0900 Subject: [PATCH] Make sure to turn off LED soon. --- ChangeLog | 1 + src/usb-ccid.c | 1 + 2 files changed, 2 insertions(+) diff --git a/ChangeLog b/ChangeLog index 10a1d83..98d5fde 100644 --- a/ChangeLog +++ b/ChangeLog @@ -10,6 +10,7 @@ * src/usb-ccid.c (usb_event_handle): Use 2 for call of chopstx_conf_idle on suspend. Call random_fini on suspend to stop ADC module. Call random_init on wakeup. + Sleep a bit to switch main thread. 2017-11-16 NIIBE Yutaka diff --git a/src/usb-ccid.c b/src/usb-ccid.c index afaf277..b3ff151 100644 --- a/src/usb-ccid.c +++ b/src/usb-ccid.c @@ -1653,6 +1653,7 @@ usb_event_handle (struct usb_dev *dev) case USB_EVENT_DEVICE_SUSPEND: led_blink (LED_OFF); + chopstx_usec_wait (10); /* Make sure LED off */ random_fini (); chopstx_conf_idle (2); bDeviceState |= USB_DEVICE_STATE_SUSPEND;