embedded_nrf24l01_async/error.rs
1use core::fmt::Debug;
2
3/// Wraps an SPI error
4///
5/// TODO: eliminate this?
6#[derive(Debug)]
7pub enum Error<SPIE: Debug> {
8 /// Wrap an SPI error
9 SpiError(SPIE),
10 /// Module not connected
11 NotConnected,
12}
13
14impl<SPIE: Debug> From<SPIE> for Error<SPIE> {
15 fn from(e: SPIE) -> Self {
16 Error::SpiError(e)
17 }
18}