use crate::constants::constants_system::SIZE_32KB;
use crate::periph::at28c256::At28C256;

impl At28C256 {
    pub fn new(offset: u16, max_offset: u16, data: Vec<u8>) -> Self {
        println!("NEW At28C256 with checksum ${:02x}", At28C256::checksum_static(&data[..]));

        At28C256 {
            data: data.into_boxed_slice(),
            address_bus: 0x0000,
            data_bus: 0x00,
            offset,
            max_offset,
            cs: false,
            oe: false,
            we: false
        }
    }
}
