diff options
| author | Hierophect <hierophect@gmail.com> | 2019-07-24 16:23:35 -0400 |
|---|---|---|
| committer | Hierophect <hierophect@gmail.com> | 2019-07-24 16:23:35 -0400 |
| commit | 981398406c61daada25f3e36601a3d0d118ac635 (patch) | |
| tree | 37b38a465a0b657771ed12f2d15ec993dbc57313 /supervisor | |
| parent | 21f1ae51df2a624c06eb388cd81114714a061119 (diff) | |
Implement working (if useless) USB on F411
Diffstat (limited to 'supervisor')
| -rw-r--r-- | supervisor/shared/usb/usb.c | 6 | ||||
| -rw-r--r-- | supervisor/shared/usb/usb_msc_flash.c | 2 |
2 files changed, 6 insertions, 2 deletions
diff --git a/supervisor/shared/usb/usb.c b/supervisor/shared/usb/usb.c index 12db84308..bccdca622 100644 --- a/supervisor/shared/usb/usb.c +++ b/supervisor/shared/usb/usb.c @@ -60,10 +60,14 @@ bool usb_enabled(void) { void usb_init(void) { init_usb_hardware(); - load_serial_number(); + //load_serial_number(); tusb_init(); + while(1) { + tud_task(); + } + #if MICROPY_KBD_EXCEPTION // Set Ctrl+C as wanted char, tud_cdc_rx_wanted_cb() callback will be invoked when Ctrl+C is received // This callback always got invoked regardless of mp_interrupt_char value since we only set it once here diff --git a/supervisor/shared/usb/usb_msc_flash.c b/supervisor/shared/usb/usb_msc_flash.c index 205cb7b50..a1ab46454 100644 --- a/supervisor/shared/usb/usb_msc_flash.c +++ b/supervisor/shared/usb/usb_msc_flash.c @@ -197,7 +197,7 @@ bool tud_msc_test_unit_ready_cb(uint8_t lun) { // Invoked when received Start Stop Unit command // - Start = 0 : stopped power mode, if load_eject = 1 : unload disk storage // - Start = 1 : active mode, if load_eject = 1 : load disk storage -bool tud_msc_start_stop_cb(uint8_t lun, uint8_t power_condition, bool start, bool load_eject) { +void tud_msc_start_stop_cb(uint8_t lun, uint8_t power_condition, bool start, bool load_eject) { if (load_eject) { if (lun > 1) { return false; |
