Drain bounded MPU6000 and ICM-42688 FIFO batches. Publish the latest validated sample only after overflow checks. Reject invalid drains. Validation: driver, sensor and platform tests plus both ARM release builds from a fresh build directory.
46 lines
1.7 KiB
Rust
46 lines
1.7 KiB
Rust
//! ICM-42688-P operation errors.
|
|
|
|
use kaptan_err_reportable::KaptanError;
|
|
|
|
/// ICM-42688-P operation failure.
|
|
#[derive(Debug, Eq, PartialEq, KaptanError)]
|
|
pub enum Error<BusError> {
|
|
/// The selected SPI route rejected a transfer submission.
|
|
#[kaptan_error(id = 5101)]
|
|
Start(BusError),
|
|
/// The responding device does not identify as an ICM-42688-P.
|
|
#[kaptan_error(id = 5102)]
|
|
UnexpectedIdentity(u8),
|
|
/// An acquisition request arrived before initialization completed or while
|
|
/// another transfer still owned the selected route.
|
|
#[kaptan_error(id = 5103)]
|
|
NotReady,
|
|
/// The selected SPI route reported a terminal transfer fault.
|
|
#[kaptan_error(id = 5104)]
|
|
TransferFault,
|
|
/// The bus could not safely accept and copy out the completed transfer.
|
|
#[kaptan_error(id = 5105)]
|
|
Completion(kaptan_spi::CompletionError),
|
|
/// An accepted SPI transfer exceeded the 10 ms service deadline.
|
|
#[kaptan_error(id = 5106)]
|
|
TransferTimeout,
|
|
/// The bus stayed busy for the pending operation's 20 ms admission budget.
|
|
#[kaptan_error(id = 5107)]
|
|
AdmissionTimeout,
|
|
/// No checked, nonempty batch arrived within two output periods plus 10 ms.
|
|
#[kaptan_error(id = 5108)]
|
|
DataReadyTimeout,
|
|
/// FIFO full status or the lost-packet counter reports missing records.
|
|
#[kaptan_error(id = 5109)]
|
|
FifoOverflow,
|
|
/// The reported FIFO count exceeds the configured packet capacity.
|
|
#[kaptan_error(id = 5110)]
|
|
FifoCount(u16),
|
|
/// A packet has an invalid header, sensor code, or timestamp order.
|
|
#[kaptan_error(id = 5111)]
|
|
FifoPacket,
|
|
/// The sensor reset after its configuration had completed.
|
|
#[kaptan_error(id = 5112)]
|
|
UnexpectedReset,
|
|
}
|