diff --git a/firmware/litex-fw/src/main.rs b/firmware/litex-fw/src/main.rs index 61b73ee..d11ba1b 100644 --- a/firmware/litex-fw/src/main.rs +++ b/firmware/litex-fw/src/main.rs @@ -17,7 +17,8 @@ use critical_section::Mutex; use irq::{handler, scope, scoped_interrupts}; use litex_interrupt::return_as_is; -use tinyusb_sys::{tusb_init, dcd_int_handler, tud_task_ext}; +use tinyusb_sys::{tusb_init, dcd_int_handler, tud_task_ext, + tud_dfu_finish_flashing}; use ssd1322 as oled; @@ -330,6 +331,9 @@ pub extern "C" fn tud_dfu_get_timeout_cb(alt: u8, state: u8) -> u32 { #[no_mangle] pub extern "C" fn tud_dfu_download_cb(alt: u8, block_num: u16, data: *const u8, length: u16) { // TODO + unsafe { + tud_dfu_finish_flashing(0); + } } #[no_mangle]