Struct ross_eeprom::Eeprom
source · [−]pub struct Eeprom<I2C, PS, AS> { /* private fields */ }
Implementations
sourceimpl<I2C> Eeprom<I2C, B32, TwoBytes> where
I2C: _embedded_hal_blocking_i2c_WriteRead<Error = Error<Error>> + _embedded_hal_blocking_i2c_Write<Error = Error<Error>>,
impl<I2C> Eeprom<I2C, B32, TwoBytes> where
I2C: _embedded_hal_blocking_i2c_WriteRead<Error = Error<Error>> + _embedded_hal_blocking_i2c_Write<Error = Error<Error>>,
pub fn new(
driver: Eeprom24x<I2C, B32, TwoBytes>,
device_info_address: u32
) -> Self
pub fn read_device_info(&mut self) -> Result<DeviceInfo, EepromError>
pub fn write_device_info(
&mut self,
device_info: &DeviceInfo,
delay: &mut Delay
) -> Result<(), EepromError>
pub fn read_config(&mut self) -> Result<Config, EepromError>
pub fn write_config_size(
&mut self,
config_size: u32,
delay: &mut Delay
) -> Result<(), EepromError>
pub fn write_config_data(
&mut self,
data: &Vec<u8>,
offset: u32,
delay: &mut Delay
) -> Result<(), EepromError>
pub fn read_data(
&mut self,
address: u32,
data: &mut [u8]
) -> Result<(), EepromError>
pub fn write_data(
&mut self,
address: u32,
data: &[u8],
delay: &mut Delay
) -> Result<(), EepromError>
Trait Implementations
Auto Trait Implementations
impl<I2C, PS, AS> RefUnwindSafe for Eeprom<I2C, PS, AS> where
AS: RefUnwindSafe,
I2C: RefUnwindSafe,
PS: RefUnwindSafe,
impl<I2C, PS, AS> Send for Eeprom<I2C, PS, AS> where
AS: Send,
I2C: Send,
PS: Send,
impl<I2C, PS, AS> Sync for Eeprom<I2C, PS, AS> where
AS: Sync,
I2C: Sync,
PS: Sync,
impl<I2C, PS, AS> Unpin for Eeprom<I2C, PS, AS> where
AS: Unpin,
I2C: Unpin,
PS: Unpin,
impl<I2C, PS, AS> UnwindSafe for Eeprom<I2C, PS, AS> where
AS: UnwindSafe,
I2C: UnwindSafe,
PS: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> Downcast for T where
T: Any,
impl<T> Downcast for T where
T: Any,
fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
Convert Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
. Read more
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
Convert Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
. Read more
fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert &Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s. Read more
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert &mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s. Read more