[−][src]Trait embedded_ccs811::Ccs811BootMode
Methods available when on boot mode
Associated Types
type Error
Error type
type ModeChangeError
Boot/App mode change error
type TargetType
Application mode type
Required methods
fn start_application(self) -> Result<Self::TargetType, Self::ModeChangeError>
Start application mode
NOTE: after this call 1ms must be waited before sending application commands.
fn update_application<D: DelayMs<u16>>(
&mut self,
bin: &[u8],
delay: &mut D
) -> Result<(), Self::Error>
&mut self,
bin: &[u8],
delay: &mut D
) -> Result<(), Self::Error>
Reset, erase, download new application and verify it in one step.
This resets the device via a software reset, erases the current application,
flashes the new binary and verifies it. This takes at least 572ms + 50ms * (bin_size/8).
Returns Error::InvalidInputData
if the input binary lengh is not multiple of 8.
fn verify_application(&mut self) -> Result<(), Self::Error>
Verify application.
NOTE: After the first call, 70ms must be waited before calling again to poll until completion.
fn erase_application(&mut self) -> Result<(), Self::Error>
Erase application.
NOTE: After the first call, 500ms must be waited before calling again to poll until completion.
fn download_application<D: DelayMs<u16>>(
&mut self,
bin: &[u8],
delay: &mut D
) -> Result<(), Self::Error>
&mut self,
bin: &[u8],
delay: &mut D
) -> Result<(), Self::Error>
Download new application.
Returns Error::InvalidInputData
if the input binary lengh is not multiple of 8.
This takes at least 50ms * (bin_size/8).
fn software_reset(&mut self) -> Result<(), Self::Error>
Restart the device in boot mode.
2ms should be waited before doing any other operation.
Implementors
impl<I2C, CommE, PinE, NWAKE, WAKEDELAY> Ccs811BootMode for Ccs811<I2C, NWAKE, WAKEDELAY, Boot> where
I2C: Write<Error = CommE> + WriteRead<Error = CommE>,
NWAKE: OutputPin<Error = PinE>,
WAKEDELAY: DelayUs<u8>,
[src]
I2C: Write<Error = CommE> + WriteRead<Error = CommE>,
NWAKE: OutputPin<Error = PinE>,
WAKEDELAY: DelayUs<u8>,
type Error = Error<CommE, PinE>
type ModeChangeError = ModeChangeError<Self::Error, Self>
type TargetType = Ccs811<I2C, NWAKE, WAKEDELAY, App>
fn start_application(self) -> Result<Self::TargetType, Self::ModeChangeError>
[src]
fn verify_application(&mut self) -> Result<(), Self::Error>
[src]
fn erase_application(&mut self) -> Result<(), Self::Error>
[src]
fn download_application<D: DelayMs<u16>>(
&mut self,
bin: &[u8],
delay: &mut D
) -> Result<(), Self::Error>
[src]
&mut self,
bin: &[u8],
delay: &mut D
) -> Result<(), Self::Error>
fn update_application<D: DelayMs<u16>>(
&mut self,
bin: &[u8],
delay: &mut D
) -> Result<(), Self::Error>
[src]
&mut self,
bin: &[u8],
delay: &mut D
) -> Result<(), Self::Error>
fn software_reset(&mut self) -> Result<(), Self::Error>
[src]
impl<I2C, E> Ccs811BootMode for Ccs811Awake<I2C, Boot> where
I2C: Write<Error = E> + WriteRead<Error = E>,
[src]
I2C: Write<Error = E> + WriteRead<Error = E>,
type Error = ErrorAwake<E>
type ModeChangeError = ModeChangeError<Self::Error, Self>
type TargetType = Ccs811Awake<I2C, App>
fn start_application(self) -> Result<Self::TargetType, Self::ModeChangeError>
[src]
fn verify_application(&mut self) -> Result<(), Self::Error>
[src]
fn erase_application(&mut self) -> Result<(), Self::Error>
[src]
fn download_application<D: DelayMs<u16>>(
&mut self,
bin: &[u8],
delay: &mut D
) -> Result<(), Self::Error>
[src]
&mut self,
bin: &[u8],
delay: &mut D
) -> Result<(), Self::Error>
fn update_application<D: DelayMs<u16>>(
&mut self,
bin: &[u8],
delay: &mut D
) -> Result<(), Self::Error>
[src]
&mut self,
bin: &[u8],
delay: &mut D
) -> Result<(), Self::Error>