ws2812_flexio/errors.rs
1use snafu::prelude::*;
2
3/// Errors of the [WS2812Driver::init](crate::WS2812Driver::init) function
4#[derive(Debug, Snafu)]
5pub enum WS2812InitError {
6 /// The peripheral does not have enough IO pins.
7 NotEnoughPins,
8 /// Unable to find 4 free FlexIO pins in a row; required for how the shifter is set up.
9 NeedFourConsecutiveInternalPins,
10 /// The peripheral does not have enough shifters for the given amount of pins.
11 NotEnoughShifters,
12 /// The peripheral does not have enough timers for the given amount of pins.
13 NotEnoughTimers,
14}