#[allow(non_camel_case_types)]
#[derive(Copy, Clone, Debug, Eq, PartialEq)]
pub enum Command {
SRES = 0x30,
SFSTXON = 0x31,
SXOFF = 0x32,
SCAL = 0x33,
SRX = 0x34,
STX = 0x35,
SIDLE = 0x36,
SAFC = 0x37,
SWOR = 0x38,
SPWD = 0x39,
SFRX = 0x3A,
SFTX = 0x3B,
SWORRST = 0x3C,
SNOP = 0x3D,
PATABLE = 0x3E,
FIFO = 0x3F,
}
impl Command {
pub fn addr(&self) -> u8 {
*self as u8
}
}
impl From<Command> for crate::lowlevel::registers::Register {
fn from(val: Command) -> Self {
crate::lowlevel::registers::Register::Command(val)
}
}