summaryrefslogtreecommitdiff
path: root/src/basic_uart.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/basic_uart.rs')
-rw-r--r--src/basic_uart.rs5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/basic_uart.rs b/src/basic_uart.rs
index e5b91f3..8317950 100644
--- a/src/basic_uart.rs
+++ b/src/basic_uart.rs
@@ -13,7 +13,6 @@ use std::time::Duration;
use nix::fcntl::fcntl;
use nix::fcntl::{FcntlArg, OFlag};
-use trve::consts::{Addr, Byte};
use trve::exceptions::{MemoryException, MemoryExceptionType};
use trve::mem::MemDeviceInterface;
@@ -78,7 +77,7 @@ impl BasicUart {
}
impl MemDeviceInterface for BasicUart {
- fn write_byte(&self, addr: Addr, value: Byte) -> Result<(), MemoryException> {
+ fn write_byte(&self, addr: u64, value: u8) -> Result<(), MemoryException> {
match addr {
0 => {
self.write(value);
@@ -90,7 +89,7 @@ impl MemDeviceInterface for BasicUart {
}),
}
}
- fn read_byte(&self, addr: Addr) -> Result<Byte, MemoryException> {
+ fn read_byte(&self, addr: u64) -> Result<u8, MemoryException> {
match addr {
0 => Ok(self.read()),
1 => Ok(1 | (self.can_read() as u8) << 1),