#[repr(u8)]
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum Register {
Seconds = 0x00,
Minutes = 0x01,
Hours = 0x02,
Day = 0x03,
Date = 0x04,
Month = 0x05,
Year = 0x06,
Control = 0x07,
}
impl Register {
pub const fn addr(self) -> u8 {
self as u8
}
}
pub const CH_BIT: u8 = 0b1000_0000;
pub const SQWE_BIT: u8 = 0b0001_0000;
pub const OUT_BIT: u8 = 0b1000_0000;
pub const RS_MASK: u8 = 0b0000_0011;
pub const NVRAM_START: u8 = 0x08;
pub const NVRAM_SIZE: u8 = 56;
pub const MAX_NVRAM_WRITE: usize = 57;