upgrade to work with multi-UART API

This commit is contained in:
bunnie 2020-10-14 04:35:15 +08:00
parent 5b51048774
commit 49f15e547f
2 changed files with 3 additions and 3 deletions

View file

@ -14,4 +14,4 @@ utralib = { path = "../../utralib"}
[features] [features]
debugprint = [] debugprint = []
default = [] # "debugprint" default = ["debugprint"] # "debugprint"

View file

@ -48,7 +48,7 @@ impl Uart {
UART resource. Modify in this function as necessary. UART resource. Modify in this function as necessary.
*/ */
let uart = xous::syscall::map_memory( let uart = xous::syscall::map_memory(
xous::MemoryAddress::new(utra::console::HW_CONSOLE_BASE), xous::MemoryAddress::new(utra::server0::HW_SERVER0_BASE),
None, None,
4096, 4096,
xous::MemoryFlags::R | xous::MemoryFlags::W, xous::MemoryFlags::R | xous::MemoryFlags::W,
@ -59,7 +59,7 @@ impl Uart {
// core::mem::forget(uart); // core::mem::forget(uart);
println!("Allocating IRQ..."); println!("Allocating IRQ...");
xous::claim_interrupt(utra::console::CONSOLE_IRQ, handle_irq, core::ptr::null_mut::<usize>()).expect("unable to allocate IRQ"); xous::claim_interrupt(utra::server0::SERVER0_IRQ, handle_irq, core::ptr::null_mut::<usize>()).expect("unable to allocate IRQ");
self.enable_rx(); self.enable_rx();
} }