adds docs
working on widetick
This commit is contained in:
@@ -1,18 +1,19 @@
|
||||
use log::debug;
|
||||
use crate::constants::constants_system::SIZE_32KB;
|
||||
use crate::periph::hm62256::Hm62256;
|
||||
use crate::periph::rom_chip::RomChip;
|
||||
|
||||
impl RomChip for Hm62256 {
|
||||
|
||||
use crate::traits::memory_chip::MemoryChip;
|
||||
use crate::traits::rom_chip::RomChip;
|
||||
|
||||
impl MemoryChip for Hm62256 {
|
||||
fn read(&self, offset: &u16) -> u8 {
|
||||
// loops memory around past 32k
|
||||
let effective = *offset as i32 % SIZE_32KB as i32;
|
||||
self.data[effective as usize]
|
||||
}
|
||||
}
|
||||
|
||||
fn program(_: &[u8; SIZE_32KB]) -> Box<Self> {
|
||||
impl RomChip for Hm62256 {
|
||||
fn program(_: &[u8]) -> Box<Self> {
|
||||
debug!("Dont program ram.");
|
||||
Hm62256::default().into()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user