Trait EepromOps

Source
pub trait EepromOps<H> {
    const CAPACITY: u16;

    // Required methods
    fn raw_read_byte(&self, address: u16) -> u8;
    fn raw_write_byte(&mut self, address: u16, data: u8);
    fn raw_erase_byte(&mut self, address: u16);
}
Expand description

Internal trait for low-level EEPROM peripherals.

This trait defines the common interface for all EEPROM peripheral variants.

Required Associated Constants§

Required Methods§

Source

fn raw_read_byte(&self, address: u16) -> u8

Read a single byte from offset address. Does not do a bounds check.

Warning: This is a low-level method and should not be called directly from user code.

Source

fn raw_write_byte(&mut self, address: u16, data: u8)

Erase and write a single byte at offset address. Does not do a bounds check.

Warning: This is a low-level method and should not be called directly from user code.

Source

fn raw_erase_byte(&mut self, address: u16)

Erase a single byte at offset address. Does not do a bounds check.

Warning: This is a low-level method and should not be called directly from user code.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl EepromOps<Atmega> for EEPROM

Source§

const CAPACITY: u16 = 1_024u16

Source§

fn raw_read_byte(&self, address: u16) -> u8

Source§

fn raw_write_byte(&mut self, address: u16, data: u8)

Source§

fn raw_erase_byte(&mut self, address: u16)

Implementors§