From 9a9bef7dd7dce7d5c10b7cf49a42478ad85829ac Mon Sep 17 00:00:00 2001 From: taitep Date: Sun, 28 Dec 2025 12:01:39 +0100 Subject: Remove consts.rs and just use plain types --- src/main.rs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src/main.rs') diff --git a/src/main.rs b/src/main.rs index 780534f..11330bd 100644 --- a/src/main.rs +++ b/src/main.rs @@ -9,7 +9,6 @@ use std::{path::PathBuf, sync::Arc, time::Duration}; use clap::Parser; use trve::{ - consts::{Addr, Byte, DWord, HWord, Word}, core::Core, exceptions::MemoryException, gdb, @@ -70,22 +69,22 @@ mod basic_uart; struct DbgOut; impl MemDeviceInterface for DbgOut { - fn write_dword(&self, addr: Addr, value: DWord) -> Result<(), MemoryException> { + fn write_dword(&self, addr: u64, value: u64) -> Result<(), MemoryException> { eprintln!("Wrote DWord {value:016x} to Debug-Out address {addr:x}"); Ok(()) } - fn write_word(&self, addr: Addr, value: Word) -> Result<(), MemoryException> { + fn write_word(&self, addr: u64, value: u32) -> Result<(), MemoryException> { eprintln!("Wrote Word {value:08x} to Debug-Out address {addr:x}"); Ok(()) } - fn write_hword(&self, addr: Addr, value: HWord) -> Result<(), MemoryException> { + fn write_hword(&self, addr: u64, value: u16) -> Result<(), MemoryException> { eprintln!("Wrote HWord {value:04x} to Debug-Out address {addr:x}"); Ok(()) } - fn write_byte(&self, addr: Addr, value: Byte) -> Result<(), MemoryException> { + fn write_byte(&self, addr: u64, value: u8) -> Result<(), MemoryException> { eprintln!("Wrote Byte {value:02x} to Debug-Out address {addr:x}"); Ok(()) } -- cgit v1.2.3