Skip to content

Commit

Permalink
test linkage, checkin submodule
Browse files Browse the repository at this point in the history
  • Loading branch information
vk2seb committed Nov 19, 2023
1 parent 7512774 commit d56aa11
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -67,3 +67,6 @@
[submodule "deps/pythondata-cpu-vexriscv_smp"]
path = deps/pythondata-cpu-vexriscv_smp
url = https://github.com/litex-hub/pythondata-cpu-vexriscv_smp.git
[submodule "firmware/deps/tinyusb-sys-rs"]
path = firmware/deps/tinyusb-sys-rs
url = [email protected]:schnommus/tinyusb-sys-rs.git
1 change: 1 addition & 0 deletions firmware/deps/tinyusb-sys-rs
Submodule tinyusb-sys-rs added at 6f877c
19 changes: 18 additions & 1 deletion firmware/litex-fw/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ use critical_section::Mutex;
use irq::{handler, scope, scoped_interrupts};
use litex_interrupt::return_as_is;

use tinyusb_sys::tusb_init;
use tinyusb_sys::{tusb_init, dcd_int_handler, tud_task};

use ssd1322 as oled;

Expand Down Expand Up @@ -304,6 +304,21 @@ fn oled_init(timer: &mut Timer, oled_spi: pac::OLED_SPI)
disp
}

#[no_mangle]
pub extern "C" fn tud_dfu_get_timeout_cb(alt: u8, state: u8) -> u32 {
// TODO
0u32
}

#[no_mangle]
pub extern "C" fn tud_dfu_download_cb(alt: u8, block_num: u16, data: *const u8, length: u16) {
// TODO
}

#[no_mangle]
pub extern "C" fn tud_dfu_manifest_cb(alt: u8) {
// TODO
}

#[entry]
fn main() -> ! {
Expand Down Expand Up @@ -336,6 +351,8 @@ fn main() -> ! {

unsafe {
tusb_init();
dcd_int_handler(0);
tud_task();
}

handler!(dma_router0 = || dma_router0_handler(&dma_router, &oscope));
Expand Down

0 comments on commit d56aa11

Please sign in to comment.