diff --git a/bao1x-boot/boot0/src/platform/bao1x/bao1x.rs b/bao1x-boot/boot0/src/platform/bao1x/bao1x.rs index 681cb816f..1d9b6c016 100644 --- a/bao1x-boot/boot0/src/platform/bao1x/bao1x.rs +++ b/bao1x-boot/boot0/src/platform/bao1x/bao1x.rs @@ -33,7 +33,7 @@ pub const UART_IFRAM_ADDR: usize = bao1x_hal::board::UART_DMA_TX_BUF_PHYS; /// Also relying on the IFR region setting the SRAM trimming to work at this safe default /// so we don't have to initialize it in boot0. pub const DEFAULT_FCLK_FREQUENCY: u32 = 350_000_000; -pub const SYSTEM_TICK_INTERVAL_MS: u32 = 1; +use bao1x_api::SYSTEM_TICK_INTERVAL_MS; pub fn early_init() { let daric_cgu = sysctrl::HW_SYSCTRL_BASE as *mut u32; diff --git a/bao1x-boot/boot1/src/platform/bao1x/bao1x.rs b/bao1x-boot/boot1/src/platform/bao1x/bao1x.rs index d2abed39f..38c3d5ec0 100644 --- a/bao1x-boot/boot1/src/platform/bao1x/bao1x.rs +++ b/bao1x-boot/boot1/src/platform/bao1x/bao1x.rs @@ -33,7 +33,7 @@ pub const FREE_MEM_LEN: usize = (RAM_BASE + RAM_SIZE) - FREE_MEM_START - STACK_L pub const UART_IFRAM_ADDR: usize = bao1x_hal::board::UART_DMA_TX_BUF_PHYS; const SAFE_FCLK_FREQUENCY: u32 = 350_000_000; -pub const SYSTEM_TICK_INTERVAL_MS: u32 = 1; +use bao1x_api::SYSTEM_TICK_INTERVAL_MS; // Dabao port/pin constants have to be vendored in because this crate is compiled with baosec as the target. const DABAO_SE0_PIN: u8 = 13; diff --git a/libs/bao1x-api/src/lib.rs b/libs/bao1x-api/src/lib.rs index 462bed6b7..8a7aa1694 100644 --- a/libs/bao1x-api/src/lib.rs +++ b/libs/bao1x-api/src/lib.rs @@ -22,6 +22,9 @@ pub mod pubkeys; /// into the "official" list pub const BAOCHIP_1X_UF2_FAMILY: u32 = 0xa7d7_6373; +// system preemption interval +pub const SYSTEM_TICK_INTERVAL_MS: u32 = 1; + /// Constants used by both emulation and hardware implementations pub const PERCLK: u32 = 100_000_000; pub const SERVER_NAME_KBD: &str = "_Matrix keyboard driver_";