pub enum Error<E> {
Bus(E),
InvalidChipId(u8),
FatalError,
FeatureEngineNotReady(u8),
SelfTestTimeout,
InvalidTemperature,
GpioError,
}Expand description
Driver error type.
Variants§
Bus(E)
Transport-level bus error returned by the underlying HAL.
InvalidChipId(u8)
The chip ID register did not contain the expected BMI323 identifier.
FatalError
The BMI323 reported a fatal internal error.
FeatureEngineNotReady(u8)
The feature engine did not become ready after the expected init sequence.
SelfTestTimeout
The BMI323 self-test did not complete within the expected timeout.
InvalidTemperature
The temperature sensor returned the invalid-data sentinel (0x8000).
The BMI323 datasheet defines raw value 0x8000 as “invalid temperature”; it is produced when no valid sample is available yet.
GpioError
The GPIO pin returned an error while waiting for an interrupt edge.
Only produced by Bmi323::wait_for_interrupt.
The underlying GPIO error value is not preserved because the GPIO error
type is independent of the bus error type E.
Trait Implementations§
Source§impl<E: Error + 'static> Error for Error<E>
impl<E: Error + 'static> Error for Error<E>
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()