more warning cleanup, moving around app_uart visbility part 2

This commit is contained in:
bunnie 2024-05-04 01:46:05 +08:00
parent 721129781a
commit a6a3d29836
2 changed files with 1 additions and 8 deletions

View file

@ -178,7 +178,7 @@ pub fn early_init() {
// the address of the UART buffer is "hard-allocated" at an offset one page from the top of
// IFRAM0. This is a convention that must be respected by the UDMA UART library implementation
// for things to work.
let uart_buf_addr = UART_IFRAM_ADDR;
let uart_buf_addr = loader::UART_IFRAM_ADDR;
let mut udma_uart = unsafe {
// safety: this is safe to call, because we set up clock and events prior to calling new.
udma::Uart::get_handle(utra::udma_uart_1::HW_UDMA_UART_1_BASE, uart_buf_addr, uart_buf_addr)

View file

@ -69,17 +69,10 @@ pub struct SwapSpec {
pub mac_len: u32,
}
// Locate the hard-wired IFRAM allocations for UDMA
#[allow(dead_code)]
#[cfg(feature = "cramium-soc")]
pub const UART_IFRAM_ADDR: usize = utralib::HW_IFRAM0_MEM + utralib::HW_IFRAM0_MEM_LEN - 4096;
// RAM needs two buffers of 1k + 16 bytes = 2048 + 16 = 2064 bytes; round up to one page
#[allow(dead_code)]
#[cfg(feature = "cramium-soc")]
pub const SPIM_RAM_IFRAM_ADDR: usize = utralib::HW_IFRAM0_MEM + utralib::HW_IFRAM0_MEM_LEN - 2 * 4096;
#[allow(dead_code)]
#[cfg(feature = "cramium-soc")]
pub const APP_UART_IFRAM_ADDR: usize = utralib::HW_IFRAM0_MEM + utralib::HW_IFRAM0_MEM_LEN - 3 * 4096;
// Flash will be released after the loader is done: it's only accessed to copy the IniS sectors into swap,
// then abandoned. It needs 4096 bytes for Rx, and 0 bytes for Tx + 16 bytes for cmd.
#[allow(dead_code)]