Struct avrox_storage::serprom::composite::CompositeSerProm
source · pub struct CompositeSerProm<const ELEMENTS: usize, const I2C_MASK: u8, const I2C_SHIFT: u8, BC, ELEMENT>where
BC: SerialBusClient,
ELEMENT: UsesSerialBusClient<BC>,{ /* private fields */ }
Expand description
A CompositeSerProm is a serial PROM device made up of multiple subsidiary devices, each with a different I2C bus address, that are stitched together to appear as a single device.
Trait Implementations§
source§impl<const ELEMENTS: usize, const I2C_MASK: u8, const I2C_SHIFT: u8, BC, ELEMENT> RandomRead for CompositeSerProm<ELEMENTS, I2C_MASK, I2C_SHIFT, BC, ELEMENT>
impl<const ELEMENTS: usize, const I2C_MASK: u8, const I2C_SHIFT: u8, BC, ELEMENT> RandomRead for CompositeSerProm<ELEMENTS, I2C_MASK, I2C_SHIFT, BC, ELEMENT>
source§fn read_at_hinted(
&self,
addr: SAddr,
buf: &mut [u8],
_hint: AccessHint
) -> Result<usize>
fn read_at_hinted( &self, addr: SAddr, buf: &mut [u8], _hint: AccessHint ) -> Result<usize>
Read into the given buffer, from the given device address. Read more
source§fn read_at(&self, addr: SAddr, buf: &mut [u8]) -> Result<usize>
fn read_at(&self, addr: SAddr, buf: &mut [u8]) -> Result<usize>
Read into the given buffer, from the given device address. Read more
source§fn read_full_at_hinted(
&self,
addr: SAddr,
buf: &mut [u8],
hint: AccessHint
) -> Result<()>
fn read_full_at_hinted( &self, addr: SAddr, buf: &mut [u8], hint: AccessHint ) -> Result<()>
Read into the given buffer, from the given device address.
The entire buffer will be filled unless an error condition occurs (e.g.
attempting to read off the end of device memory). If an error does
occur, the state (partially written, not written at all) of the buffer
is undefined.
source§fn read_full_at(&self, addr: SAddr, buf: &mut [u8]) -> Result<()>
fn read_full_at(&self, addr: SAddr, buf: &mut [u8]) -> Result<()>
Read into the given buffer, from the given device address.
The entire buffer will be filled unless an error condition occurs (e.g.
attempting to read off the end of device memory). If an error does
occur, the state (partially written, not written at all) of the buffer
is undefined.
source§impl<const ELEMENTS: usize, const I2C_MASK: u8, const I2C_SHIFT: u8, BC, ELEMENT> RandomWrite for CompositeSerProm<ELEMENTS, I2C_MASK, I2C_SHIFT, BC, ELEMENT>
impl<const ELEMENTS: usize, const I2C_MASK: u8, const I2C_SHIFT: u8, BC, ELEMENT> RandomWrite for CompositeSerProm<ELEMENTS, I2C_MASK, I2C_SHIFT, BC, ELEMENT>
source§fn write_at_hinted(
&mut self,
addr: SAddr,
buf: &[u8],
_hint: AccessHint
) -> Result<usize>
fn write_at_hinted( &mut self, addr: SAddr, buf: &[u8], _hint: AccessHint ) -> Result<usize>
Write the contents of the given buffer at the given device address.
Depending on the nature of the underlying device, the write may not
complete. The number of bytes actually written will be returned in the
Ok() result, and it is the caller’s responsibility to resume writing
the remainder.
source§fn flush(&mut self) -> Result<()>
fn flush(&mut self) -> Result<()>
Flush the write to the device. Writes are not guaranteed to have been
completed unless this method has been called.
source§fn write_all_at_hinted(
&mut self,
addr: SAddr,
buf: &[u8],
hint: AccessHint
) -> Result<()>
fn write_all_at_hinted( &mut self, addr: SAddr, buf: &[u8], hint: AccessHint ) -> Result<()>
Write the contents of the given buffer at the given device address.
THe entire buffer will be written unless an error condition occurs.
If an error does occur, the state (partially written, not written at all)
is undefined.
source§fn write_all_at(&mut self, addr: SAddr, buf: &[u8]) -> Result<()>
fn write_all_at(&mut self, addr: SAddr, buf: &[u8]) -> Result<()>
Write the contents of the given buffer at the given device address.
THe entire buffer will be written unless an error condition occurs.
If an error does occur, the state (partially written, not written at all)
is undefined.
source§fn write_at(&mut self, addr: SAddr, buf: &[u8]) -> Result<usize>
fn write_at(&mut self, addr: SAddr, buf: &[u8]) -> Result<usize>
Write the contents of the given buffer at the given device address.
Depending on the nature of the underlying device, the write may not
complete. The number of bytes actually written will be returned in the
Ok() result, and it is the caller’s responsibility to resume writing
the remainder.
source§impl<const ELEMENTS: usize, const I2C_MASK: u8, const I2C_SHIFT: u8, BC, ELEMENT> UsesSerialBusClient<BC> for CompositeSerProm<ELEMENTS, I2C_MASK, I2C_SHIFT, BC, ELEMENT>where
BC: SerialBusClient,
ELEMENT: UsesSerialBusClient<BC>,
impl<const ELEMENTS: usize, const I2C_MASK: u8, const I2C_SHIFT: u8, BC, ELEMENT> UsesSerialBusClient<BC> for CompositeSerProm<ELEMENTS, I2C_MASK, I2C_SHIFT, BC, ELEMENT>where
BC: SerialBusClient,
ELEMENT: UsesSerialBusClient<BC>,
fn using_client(base_client: BC) -> Self
Auto Trait Implementations§
impl<const ELEMENTS: usize, const I2C_MASK: u8, const I2C_SHIFT: u8, BC, ELEMENT> Freeze for CompositeSerProm<ELEMENTS, I2C_MASK, I2C_SHIFT, BC, ELEMENT>where
ELEMENT: Freeze,
impl<const ELEMENTS: usize, const I2C_MASK: u8, const I2C_SHIFT: u8, BC, ELEMENT> RefUnwindSafe for CompositeSerProm<ELEMENTS, I2C_MASK, I2C_SHIFT, BC, ELEMENT>where
ELEMENT: RefUnwindSafe,
BC: RefUnwindSafe,
impl<const ELEMENTS: usize, const I2C_MASK: u8, const I2C_SHIFT: u8, BC, ELEMENT> Send for CompositeSerProm<ELEMENTS, I2C_MASK, I2C_SHIFT, BC, ELEMENT>
impl<const ELEMENTS: usize, const I2C_MASK: u8, const I2C_SHIFT: u8, BC, ELEMENT> Sync for CompositeSerProm<ELEMENTS, I2C_MASK, I2C_SHIFT, BC, ELEMENT>
impl<const ELEMENTS: usize, const I2C_MASK: u8, const I2C_SHIFT: u8, BC, ELEMENT> Unpin for CompositeSerProm<ELEMENTS, I2C_MASK, I2C_SHIFT, BC, ELEMENT>
impl<const ELEMENTS: usize, const I2C_MASK: u8, const I2C_SHIFT: u8, BC, ELEMENT> UnwindSafe for CompositeSerProm<ELEMENTS, I2C_MASK, I2C_SHIFT, BC, ELEMENT>where
ELEMENT: UnwindSafe,
BC: UnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more