move pddb, spinor params into the board section of the HAL for hosted

this makes code a little cleaner when porting to new targets
This commit is contained in:
bunnie 2025-05-08 15:59:31 +08:00
parent 399742a3d4
commit 645846e32e
3 changed files with 19 additions and 0 deletions

View file

@ -0,0 +1,6 @@
pub const SPINOR_PAGE_LEN: u32 = 0x100;
pub const SPINOR_ERASE_SIZE: u32 = 0x1000; // this is the smallest sector size.
pub const SPINOR_BULK_ERASE_SIZE: u32 = 0x1_0000; // this is the bulk erase size.
pub const SPINOR_LEN: u32 = 16384 * 1024;
pub const PDDB_LOC: u32 = 0;
pub const PDDB_LEN: u32 = 4096 * 1024; // 4MiB data for the PDDB total

View file

@ -20,3 +20,7 @@ pub use baosor::*;
pub mod dabao;
#[cfg(any(feature = "board-dabao", feature = "loader-dabao"))]
pub use dabao::*;
#[cfg(feature = "hosted-baosec")]
pub mod hosted;
#[cfg(feature = "hosted-baosec")]
pub use hosted::*;

View file

@ -1,21 +1,30 @@
#![cfg_attr(not(feature = "std"), no_std)]
#[macro_use]
#[cfg(not(feature = "hosted-baosec"))]
pub mod debug;
#[cfg(feature = "axp2101")]
pub mod axp2101;
pub mod board;
#[cfg(feature = "camera-gc2145")]
pub mod gc2145;
#[cfg(not(feature = "hosted-baosec"))]
pub mod ifram;
#[cfg(not(feature = "hosted-baosec"))]
pub mod iox;
#[cfg(feature = "camera-ov2640")]
pub mod ov2640;
#[cfg(not(feature = "hosted-baosec"))]
pub mod sce;
#[cfg(feature = "display-sh1107")]
pub mod sh1107;
#[cfg(not(feature = "hosted-baosec"))]
pub mod shared_csr;
#[cfg(not(feature = "hosted-baosec"))]
pub mod udma;
#[cfg(not(feature = "hosted-baosec"))]
pub mod usb;
#[cfg(not(feature = "hosted-baosec"))]
pub use shared_csr::*;
#[cfg(not(feature = "hosted-baosec"))]
pub mod mbox;