pub trait Entries: Sized {
    const INDEX: Index;
    const LEN_BYTES: usize;

    fn write_to_slice(&self, slice: &mut [u8]);
    fn write<I>(&self, i2c: &mut I) -> Result<(), I::Error>
    where
        I: Write
; fn read<I>(i2c: &mut I) -> Result<Self, I::Error>
    where
        I: WriteRead
; }
Expand description

A struct of contiguous entries within the register map.

Required Associated Constants§

The index of the first entry.

The total length of the buffer necessary for I2C reading/writing.

Required Methods§

Write the entries to a single slice.

Entries that follow that are non-contiguous will contain zeroed values.

The slice must be at least LEN_BYTES or this method will panic.

Write the entries via I2C.

Implemented in terms of write_to_slice.

Read a new instance of the Entries struct from I2C.

Implementors§