summaryrefslogtreecommitdiff
path: root/supervisor
diff options
context:
space:
mode:
authorDan Halbert <halbert@halwitz.org>2019-01-31 10:36:12 -0500
committerGitHub <noreply@github.com>2019-01-31 10:36:12 -0500
commit323108e2bab7196df7dad0c8c965974b7a17c294 (patch)
treeca5d025c44db1a82fb974fb5b96b10bcd5013303 /supervisor
parent68d524fc2a7747fbbde9a067404b180f4d9db9ed (diff)
parenta51f2b07161239e0a3805cb40914f159f2038c87 (diff)
Merge pull request #1503 from hathach/nrf-tinyusb-sd
update tinyusb, work better with sd
Diffstat (limited to 'supervisor')
-rw-r--r--supervisor/shared/usb/usb.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/supervisor/shared/usb/usb.c b/supervisor/shared/usb/usb.c
index 5898323e8..136137f77 100644
--- a/supervisor/shared/usb/usb.c
+++ b/supervisor/shared/usb/usb.c
@@ -54,10 +54,8 @@ void load_serial_number(void) {
}
}
-bool _usb_enabled = false;
-
bool usb_enabled(void) {
- return _usb_enabled;
+ return tusb_inited();
}
void usb_init(void) {
@@ -65,7 +63,6 @@ void usb_init(void) {
load_serial_number();
tusb_init();
- _usb_enabled = true;
#if MICROPY_KBD_EXCEPTION
// Set Ctrl+C as wanted char, tud_cdc_rx_wanted_cb() callback will be invoked when Ctrl+C is received