1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
use enumset::EnumSetType; #[derive(Debug)] pub enum Error { Clock, Timeout, } /// Alarm or second output selection // pub enum PinSignal { // /// Pin 上输出的是 alarm 信号 // AlarmPulse, // /// Pin 上输出的是秒信号 // SecondPulse, // /// Pin 上输出的是RTC clock 信号 // Clock, // } #[derive(PartialEq)] pub enum RtcClock { LSI, LSE, HSE_DIV_32, } #[derive(EnumSetType, Debug)] pub enum EventKind { Alarm, Second, OverFlow, }