diff options
| author | HiFiPhile <[email protected]> | 2024-05-09 13:45:44 +0200 |
|---|---|---|
| committer | HiFiPhile <[email protected]> | 2024-05-09 13:45:44 +0200 |
| commit | fd1cde9b894e5312e6c6f9da63cfea5aa05d83d2 (patch) | |
| tree | 5f43ffeecb05d80788cbe0bbc43913202a922a2a /examples/device/dfu_runtime/src/main.c | |
| parent | d0bff6fd3ec9fc133032dea84732451d93d202b4 (diff) | |
| parent | 74e57499baac36c4cccf76549259905162031e41 (diff) | |
Merge branch 'master' into pr/2181
Diffstat (limited to 'examples/device/dfu_runtime/src/main.c')
| -rw-r--r-- | examples/device/dfu_runtime/src/main.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/examples/device/dfu_runtime/src/main.c b/examples/device/dfu_runtime/src/main.c index 4ec3cb188..170dde932 100644 --- a/examples/device/dfu_runtime/src/main.c +++ b/examples/device/dfu_runtime/src/main.c @@ -40,7 +40,7 @@ #include <stdio.h> #include <string.h> -#include "bsp/board.h" +#include "bsp/board_api.h" #include "tusb.h" //--------------------------------------------------------------------+ @@ -72,6 +72,10 @@ int main(void) // init device stack on configured roothub port tud_init(BOARD_TUD_RHPORT); + if (board_init_after_tusb) { + board_init_after_tusb(); + } + while (1) { tud_task(); // tinyusb device task @@ -107,7 +111,7 @@ void tud_suspend_cb(bool remote_wakeup_en) // Invoked when usb bus is resumed void tud_resume_cb(void) { - blink_interval_ms = BLINK_MOUNTED; + blink_interval_ms = tud_mounted() ? BLINK_MOUNTED : BLINK_NOT_MOUNTED; } // Invoked on DFU_DETACH request to reboot to the bootloader |
