[MAILBOX WIP] disable uart everywhere - WORKS
without uart the thing seems to work fine, so what is wrong?
This commit is contained in:
parent
9d3ee6ab06
commit
d34b214ed0
|
@ -193,11 +193,11 @@ pub mod alpha_mode {
|
|||
fn write(regs: &RegisterBlock, buf_ptr: u32, channel: u32) -> Result<()> {
|
||||
let mut count: u32 = 0;
|
||||
|
||||
{
|
||||
let mut uart = MiniUart::new();
|
||||
uart.init();
|
||||
write!(uart, "Mailbox::write {:x}/{:x}\n", buf_ptr, channel);
|
||||
}
|
||||
// {
|
||||
// let mut uart = MiniUart::new();
|
||||
// uart.init();
|
||||
// write!(uart, "Mailbox::write {:x}/{:x}\n", buf_ptr, channel);
|
||||
// }
|
||||
|
||||
while regs.STATUS.is_set(STATUS::FULL) {
|
||||
count += 1;
|
||||
|
@ -214,8 +214,8 @@ fn write(regs: &RegisterBlock, buf_ptr: u32, channel: u32) -> Result<()> {
|
|||
fn read(regs: &RegisterBlock, expected: u32, channel: u32) -> Result<()> {
|
||||
let mut count: u32 = 0;
|
||||
|
||||
let mut uart = MiniUart::new();
|
||||
uart.init();
|
||||
// let mut uart = MiniUart::new();
|
||||
// uart.init();
|
||||
|
||||
loop {
|
||||
while regs.STATUS.is_set(STATUS::EMPTY) {
|
||||
|
@ -289,20 +289,20 @@ impl Mailbox {
|
|||
pub fn read(&self, channel: u32) -> Result<()> {
|
||||
read(self, phys2bus(self.buffer.as_ptr() as u32), channel)?;
|
||||
|
||||
let mut uart = MiniUart::new();
|
||||
uart.init();
|
||||
//let mut uart = MiniUart::new();
|
||||
//uart.init();
|
||||
|
||||
match self.buffer[1] {
|
||||
response::SUCCESS => {
|
||||
uart.puts("\n######\nMailbox::returning SUCCESS\n");
|
||||
//uart.puts("\n######\nMailbox::returning SUCCESS\n");
|
||||
Ok(())
|
||||
}
|
||||
response::ERROR => {
|
||||
uart.puts("\n######\nMailbox::returning ResponseError\n");
|
||||
//uart.puts("\n######\nMailbox::returning ResponseError\n");
|
||||
Err(MboxError::ResponseError)
|
||||
}
|
||||
_ => {
|
||||
uart.puts("\n######\nMailbox::returning UnknownError\n");
|
||||
//uart.puts("\n######\nMailbox::returning UnknownError\n");
|
||||
Err(MboxError::UnknownError)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue