Skip to main content

as3935_generic/
error.rs

1// use core::fmt::Formatter;
2
3// use embedded_hal::i2c::{I2c, SevenBitAddress};
4// use embedded_hal::i2c::{Error as I2cError, ErrorKind as I2cErrorKind};
5
6/// All possible errors
7/// Display not implemented for no_std support
8#[derive(Clone, Copy, Debug)]
9pub enum Error<E> {
10    CommandError,  /// AS3935 not happy with the command received
11    NotReadyForCommand, /// AS3935 not ready to received a command
12
13    /// Oscillator failed to calibrate
14    OscFailedCalibration,
15    /// response data error
16    ResponseError,
17    /// Value too big
18    ValueLimit,
19    /// An error in the  underlying I²C system
20    I2c(E),
21}
22
23