mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-18 08:52:45 +00:00
set uart baud to 1Mbaud and also make it a top-level constant
This commit is contained in:
parent
4cd5f2d2c8
commit
43de6d67ec
3 changed files with 5 additions and 3 deletions
|
|
@ -4,3 +4,5 @@ pub use cramium::*;
|
||||||
pub mod bio;
|
pub mod bio;
|
||||||
pub mod debug;
|
pub mod debug;
|
||||||
pub mod irq;
|
pub mod irq;
|
||||||
|
|
||||||
|
pub const UART_BAUD: u32 = 1_000_000;
|
||||||
|
|
|
||||||
|
|
@ -682,7 +682,7 @@ pub fn clockset_wrapper(freq: u32) -> u32 {
|
||||||
// new.
|
// new.
|
||||||
udma::Uart::get_handle(utra::udma_uart_2::HW_UDMA_UART_2_BASE, uart_buf_addr, uart_buf_addr)
|
udma::Uart::get_handle(utra::udma_uart_2::HW_UDMA_UART_2_BASE, uart_buf_addr, uart_buf_addr)
|
||||||
};
|
};
|
||||||
let baudrate: u32 = 115200;
|
let baudrate: u32 = crate::UART_BAUD;
|
||||||
let freq: u32 = perclk / 2;
|
let freq: u32 = perclk / 2;
|
||||||
udma_uart.set_baud(baudrate, freq);
|
udma_uart.set_baud(baudrate, freq);
|
||||||
|
|
||||||
|
|
@ -790,7 +790,7 @@ pub unsafe fn low_power() -> u32 {
|
||||||
// new.
|
// new.
|
||||||
udma::Uart::get_handle(utra::udma_uart_2::HW_UDMA_UART_2_BASE, uart_buf_addr, uart_buf_addr)
|
udma::Uart::get_handle(utra::udma_uart_2::HW_UDMA_UART_2_BASE, uart_buf_addr, uart_buf_addr)
|
||||||
};
|
};
|
||||||
let baudrate: u32 = 115200;
|
let baudrate: u32 = crate::UART_BAUD;
|
||||||
let freq: u32 = perclk / 2;
|
let freq: u32 = perclk / 2;
|
||||||
udma_uart.set_baud(baudrate, freq);
|
udma_uart.set_baud(baudrate, freq);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -183,7 +183,7 @@ pub fn setup_rx(perclk: u32) -> cramium_hal::udma::Uart {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
let baudrate: u32 = 115200;
|
let baudrate: u32 = crate::UART_BAUD;
|
||||||
let freq: u32 = perclk / 2;
|
let freq: u32 = perclk / 2;
|
||||||
|
|
||||||
// the address of the UART buffer is "hard-allocated" at an offset one page from the top of
|
// the address of the UART buffer is "hard-allocated" at an offset one page from the top of
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue