Skip to content

Commit

Permalink
success code in DFU callback. still crashy, better with debug=3, flaw…
Browse files Browse the repository at this point in the history
…less if nothing else in main loop ...
  • Loading branch information
vk2seb committed Nov 24, 2023
1 parent 6e07f44 commit c572dfc
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion firmware/litex-fw/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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]
Expand Down

0 comments on commit c572dfc

Please sign in to comment.