mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-16 08:38:26 +00:00
fix app_uart default memory mapping
was pointing to the wrong uart initially >_<
This commit is contained in:
parent
71d7a2a3ae
commit
bae408b466
1 changed files with 5 additions and 3 deletions
|
|
@ -6,7 +6,7 @@ use cramium_hal::iox::*;
|
|||
use cramium_hal::sce;
|
||||
use cramium_hal::udma::*;
|
||||
use loader::swap::SPIM_RAM_IFRAM_ADDR;
|
||||
use loader::{APP_UART_IFRAM_ADDR, UART_IFRAM_ADDR};
|
||||
use loader::APP_UART_IFRAM_ADDR;
|
||||
use rand_chacha::rand_core::RngCore;
|
||||
use rand_chacha::rand_core::SeedableRng;
|
||||
use rand_chacha::ChaCha8Rng;
|
||||
|
|
@ -490,8 +490,8 @@ pub fn userspace_maps(cfg: &mut BootConfig) {
|
|||
// 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 udma_uart = unsafe {
|
||||
let uart_buf_addr = APP_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.
|
||||
cramium_hal::udma::Uart::get_handle(
|
||||
utralib::utra::udma_uart_0::HW_UDMA_UART_0_BASE,
|
||||
|
|
@ -502,6 +502,8 @@ pub fn userspace_maps(cfg: &mut BootConfig) {
|
|||
crate::println!("Baud freq is {} Hz, baudrate is {}", freq, baudrate);
|
||||
udma_uart.set_baud(baudrate, freq);
|
||||
|
||||
udma_uart.write(b"APP UART INIT OK\n\r");
|
||||
|
||||
// map the debug UART HW page
|
||||
cfg.map_page_32(
|
||||
root,
|
||||
|
|
|
|||
Loading…
Reference in a new issue