Module avrox_storage::serprom
source · Expand description
Serial (EE)PROM drivers
Device | Manufacturer | Specification |
---|---|---|
BR24T1M_3AM | Rohm | 128Kx8 Serial EEPROM1 |
§Usage example
use avr_oxide::hardware;
use avrox_storage::{serprom,RandomRead};
use avr_oxide::devices::serialbus::UsesSerialBusClient;
#[avr_oxide::main(chip="atmega4809",stacksize=512)]
pub fn main() {
let supervisor = avr_oxide::oxide::instance();
let bus = StaticWrap::new(OxideSerialBus::using_bus(hardware::twi::twi0::instance().mux(hardware::twi::twi0::TwiPins::MasterASlaveC).mode(InterfaceMode::I2C, PortSpeed::Fast)));
supervisor.listen(bus.borrow());
let serprom = serprom::BR24T1M_3AM::using_client(OxideSerialBus::client(bus.borrow(), TwiAddr::addr(0xA0)));
let mut buffer = [ 0x00u8, 0x00u8, 0x00u8, 0x00u8 ];
serprom.read_at(0u32, &mut buffer);
}
Note; currently only the first 64K is addressable ↩
Modules§
- Composite serial PROM devices (i.e. devices that are made up of multiple discrete chips with different I2C device IDs that make up a single larger storage volume.)
- Generic serial EEPROM implementations
Type Aliases§
- ROHM Semiconductor: BR24T1M-3AM is a serial EEPROM of I2C BUS Interface Method