sky_ili9341/error.rs
1/// Error types for the sky-ili9341 driver.
2
3/// Errors that can occur when communicating with the display.
4#[derive(Debug)]
5#[cfg_attr(feature = "defmt", derive(defmt::Format))]
6pub enum Error<BUS> {
7 /// Bus communication error (SPI, etc.).
8 Bus(BUS),
9 /// The DC (data/command) pin failed to change state.
10 DcPin,
11 /// The reset pin failed to change state.
12 ResetPin,
13}
14
15impl<BUS> From<BUS> for Error<BUS> {
16 fn from(e: BUS) -> Self {
17 Self::Bus(e)
18 }
19}