#[repr(u8)]
#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd)]
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
pub enum Boddis {
#[doc = "the core brownout detector is enabled."]
ENABLE = 0x0,
#[doc = "the core brownout detector is disabled."]
DISABLE = 0x01,
}
impl Boddis {
#[inline(always)]
pub const fn from_bits(val: u8) -> Boddis {
unsafe { core::mem::transmute(val & 0x01) }
}
#[inline(always)]
pub const fn to_bits(self) -> u8 {
unsafe { core::mem::transmute(self) }
}
}
impl From<u8> for Boddis {
#[inline(always)]
fn from(val: u8) -> Boddis {
Boddis::from_bits(val)
}
}
impl From<Boddis> for u8 {
#[inline(always)]
fn from(val: Boddis) -> u8 {
Boddis::to_bits(val)
}
}
#[repr(u8)]
#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd)]
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
pub enum Bodrsten {
#[doc = "the core reset signal \"vddcore_nreset\" is not affected when a brownout detection occurs."]
NOT_ENABLE = 0x0,
#[doc = "the core reset signal, vddcore_nreset is asserted when a brownout detection occurs."]
ENABLE = 0x01,
}
impl Bodrsten {
#[inline(always)]
pub const fn from_bits(val: u8) -> Bodrsten {
unsafe { core::mem::transmute(val & 0x01) }
}
#[inline(always)]
pub const fn to_bits(self) -> u8 {
unsafe { core::mem::transmute(self) }
}
}
impl From<u8> for Bodrsten {
#[inline(always)]
fn from(val: u8) -> Bodrsten {
Bodrsten::from_bits(val)
}
}
impl From<Bodrsten> for u8 {
#[inline(always)]
fn from(val: Bodrsten) -> u8 {
Bodrsten::to_bits(val)
}
}
#[repr(u8)]
#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd)]
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
pub enum Bodrsts {
#[doc = "no core brownout rising edge event has been detected since the last read of the SUPC_SR."]
NO = 0x0,
#[doc = "at least one brownout output rising edge event has been detected since the last read of the SUPC_SR."]
PRESENT = 0x01,
}
impl Bodrsts {
#[inline(always)]
pub const fn from_bits(val: u8) -> Bodrsts {
unsafe { core::mem::transmute(val & 0x01) }
}
#[inline(always)]
pub const fn to_bits(self) -> u8 {
unsafe { core::mem::transmute(self) }
}
}
impl From<u8> for Bodrsts {
#[inline(always)]
fn from(val: u8) -> Bodrsts {
Bodrsts::from_bits(val)
}
}
impl From<Bodrsts> for u8 {
#[inline(always)]
fn from(val: Bodrsts) -> u8 {
Bodrsts::to_bits(val)
}
}
#[repr(transparent)]
#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
pub struct CrKey(u8);
impl CrKey {
#[doc = "Writing any other value in this field aborts the write operation."]
pub const PASSWD: Self = Self(0xa5);
}
impl CrKey {
pub const fn from_bits(val: u8) -> CrKey {
Self(val & 0xff)
}
pub const fn to_bits(self) -> u8 {
self.0
}
}
impl core::fmt::Debug for CrKey {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
match self.0 {
0xa5 => f.write_str("PASSWD"),
other => core::write!(f, "0x{:02X}", other),
}
}
}
#[cfg(feature = "defmt")]
impl defmt::Format for CrKey {
fn format(&self, f: defmt::Formatter) {
match self.0 {
0xa5 => defmt::write!(f, "PASSWD"),
other => defmt::write!(f, "0x{:02X}", other),
}
}
}
impl From<u8> for CrKey {
#[inline(always)]
fn from(val: u8) -> CrKey {
CrKey::from_bits(val)
}
}
impl From<CrKey> for u8 {
#[inline(always)]
fn from(val: CrKey) -> u8 {
CrKey::to_bits(val)
}
}
#[repr(u8)]
#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd)]
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
pub enum Fwupdbc {
#[doc = "Immediate, no debouncing, detected active at least on one Slow Clock edge."]
IMMEDIATE = 0x0,
#[doc = "FWUP shall be low for at least 3 SLCK periods"]
_3_SCLK = 0x01,
#[doc = "FWUP shall be low for at least 32 SLCK periods"]
_32_SCLK = 0x02,
#[doc = "FWUP shall be low for at least 512 SLCK periods"]
_512_SCLK = 0x03,
#[doc = "FWUP shall be low for at least 4,096 SLCK periods"]
_4096_SCLK = 0x04,
#[doc = "FWUP shall be low for at least 32,768 SLCK periods"]
_32768_SCLK = 0x05,
_RESERVED_6 = 0x06,
_RESERVED_7 = 0x07,
}
impl Fwupdbc {
#[inline(always)]
pub const fn from_bits(val: u8) -> Fwupdbc {
unsafe { core::mem::transmute(val & 0x07) }
}
#[inline(always)]
pub const fn to_bits(self) -> u8 {
unsafe { core::mem::transmute(self) }
}
}
impl From<u8> for Fwupdbc {
#[inline(always)]
fn from(val: u8) -> Fwupdbc {
Fwupdbc::from_bits(val)
}
}
impl From<Fwupdbc> for u8 {
#[inline(always)]
fn from(val: Fwupdbc) -> u8 {
Fwupdbc::to_bits(val)
}
}
#[repr(u8)]
#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd)]
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
pub enum Fwupen {
#[doc = "the Force Wake-up pin has no wake-up effect."]
NOT_ENABLE = 0x0,
#[doc = "the Force Wake-up pin low forces the wake-up of the core power supply."]
ENABLE = 0x01,
}
impl Fwupen {
#[inline(always)]
pub const fn from_bits(val: u8) -> Fwupen {
unsafe { core::mem::transmute(val & 0x01) }
}
#[inline(always)]
pub const fn to_bits(self) -> u8 {
unsafe { core::mem::transmute(self) }
}
}
impl From<u8> for Fwupen {
#[inline(always)]
fn from(val: u8) -> Fwupen {
Fwupen::from_bits(val)
}
}
impl From<Fwupen> for u8 {
#[inline(always)]
fn from(val: Fwupen) -> u8 {
Fwupen::to_bits(val)
}
}
#[repr(u8)]
#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd)]
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
pub enum Fwupis {
#[doc = "FWUP input is tied low."]
LOW = 0x0,
#[doc = "FWUP input is tied high."]
HIGH = 0x01,
}
impl Fwupis {
#[inline(always)]
pub const fn from_bits(val: u8) -> Fwupis {
unsafe { core::mem::transmute(val & 0x01) }
}
#[inline(always)]
pub const fn to_bits(self) -> u8 {
unsafe { core::mem::transmute(self) }
}
}
impl From<u8> for Fwupis {
#[inline(always)]
fn from(val: u8) -> Fwupis {
Fwupis::from_bits(val)
}
}
impl From<Fwupis> for u8 {
#[inline(always)]
fn from(val: Fwupis) -> u8 {
Fwupis::to_bits(val)
}
}
#[repr(u8)]
#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd)]
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
pub enum Fwups {
#[doc = "no wake-up due to the assertion of the FWUP pin has occurred since the last read of SUPC_SR."]
NO = 0x0,
#[doc = "at least one wake-up due to the assertion of the FWUP pin has occurred since the last read of SUPC_SR."]
PRESENT = 0x01,
}
impl Fwups {
#[inline(always)]
pub const fn from_bits(val: u8) -> Fwups {
unsafe { core::mem::transmute(val & 0x01) }
}
#[inline(always)]
pub const fn to_bits(self) -> u8 {
unsafe { core::mem::transmute(self) }
}
}
impl From<u8> for Fwups {
#[inline(always)]
fn from(val: u8) -> Fwups {
Fwups::from_bits(val)
}
}
impl From<Fwups> for u8 {
#[inline(always)]
fn from(val: Fwups) -> u8 {
Fwups::to_bits(val)
}
}
#[repr(transparent)]
#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
pub struct MrKey(u8);
impl MrKey {
#[doc = "Writing any other value in this field aborts the write operation."]
pub const PASSWD: Self = Self(0xa5);
}
impl MrKey {
pub const fn from_bits(val: u8) -> MrKey {
Self(val & 0xff)
}
pub const fn to_bits(self) -> u8 {
self.0
}
}
impl core::fmt::Debug for MrKey {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
match self.0 {
0xa5 => f.write_str("PASSWD"),
other => core::write!(f, "0x{:02X}", other),
}
}
}
#[cfg(feature = "defmt")]
impl defmt::Format for MrKey {
fn format(&self, f: defmt::Formatter) {
match self.0 {
0xa5 => defmt::write!(f, "PASSWD"),
other => defmt::write!(f, "0x{:02X}", other),
}
}
}
impl From<u8> for MrKey {
#[inline(always)]
fn from(val: u8) -> MrKey {
MrKey::from_bits(val)
}
}
impl From<MrKey> for u8 {
#[inline(always)]
fn from(val: MrKey) -> u8 {
MrKey::to_bits(val)
}
}
#[repr(u8)]
#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd)]
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
pub enum Oscbypass {
#[doc = "no effect. Clock selection depends on XTALSEL value."]
NO_EFFECT = 0x0,
#[doc = "the 32-KHz XTAL oscillator is selected and is put in bypass mode."]
BYPASS = 0x01,
}
impl Oscbypass {
#[inline(always)]
pub const fn from_bits(val: u8) -> Oscbypass {
unsafe { core::mem::transmute(val & 0x01) }
}
#[inline(always)]
pub const fn to_bits(self) -> u8 {
unsafe { core::mem::transmute(self) }
}
}
impl From<u8> for Oscbypass {
#[inline(always)]
fn from(val: u8) -> Oscbypass {
Oscbypass::from_bits(val)
}
}
impl From<Oscbypass> for u8 {
#[inline(always)]
fn from(val: Oscbypass) -> u8 {
Oscbypass::to_bits(val)
}
}
#[repr(u8)]
#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd)]
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
pub enum Oscsel {
#[doc = "the slow clock, SLCK is generated by the embedded 32-kHz RC oscillator."]
RC = 0x0,
#[doc = "the slow clock, SLCK is generated by the 32-kHz crystal oscillator."]
CRYST = 0x01,
}
impl Oscsel {
#[inline(always)]
pub const fn from_bits(val: u8) -> Oscsel {
unsafe { core::mem::transmute(val & 0x01) }
}
#[inline(always)]
pub const fn to_bits(self) -> u8 {
unsafe { core::mem::transmute(self) }
}
}
impl From<u8> for Oscsel {
#[inline(always)]
fn from(val: u8) -> Oscsel {
Oscsel::from_bits(val)
}
}
impl From<Oscsel> for u8 {
#[inline(always)]
fn from(val: Oscsel) -> u8 {
Oscsel::to_bits(val)
}
}
#[repr(u8)]
#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd)]
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
pub enum Rtcen {
#[doc = "the RTC alarm signal has no wake-up effect."]
NOT_ENABLE = 0x0,
#[doc = "the RTC alarm signal forces the wake-up of the core power supply."]
ENABLE = 0x01,
}
impl Rtcen {
#[inline(always)]
pub const fn from_bits(val: u8) -> Rtcen {
unsafe { core::mem::transmute(val & 0x01) }
}
#[inline(always)]
pub const fn to_bits(self) -> u8 {
unsafe { core::mem::transmute(self) }
}
}
impl From<u8> for Rtcen {
#[inline(always)]
fn from(val: u8) -> Rtcen {
Rtcen::from_bits(val)
}
}
impl From<Rtcen> for u8 {
#[inline(always)]
fn from(val: Rtcen) -> u8 {
Rtcen::to_bits(val)
}
}
#[repr(u8)]
#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd)]
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
pub enum Rtten {
#[doc = "the RTT alarm signal has no wake-up effect."]
NOT_ENABLE = 0x0,
#[doc = "the RTT alarm signal forces the wake-up of the core power supply."]
ENABLE = 0x01,
}
impl Rtten {
#[inline(always)]
pub const fn from_bits(val: u8) -> Rtten {
unsafe { core::mem::transmute(val & 0x01) }
}
#[inline(always)]
pub const fn to_bits(self) -> u8 {
unsafe { core::mem::transmute(self) }
}
}
impl From<u8> for Rtten {
#[inline(always)]
fn from(val: u8) -> Rtten {
Rtten::from_bits(val)
}
}
impl From<Rtten> for u8 {
#[inline(always)]
fn from(val: Rtten) -> u8 {
Rtten::to_bits(val)
}
}
#[repr(u8)]
#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd)]
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
pub enum Smen {
#[doc = "the supply monitor detection has no wake-up effect."]
NOT_ENABLE = 0x0,
#[doc = "the supply monitor detection forces the wake-up of the core power supply."]
ENABLE = 0x01,
}
impl Smen {
#[inline(always)]
pub const fn from_bits(val: u8) -> Smen {
unsafe { core::mem::transmute(val & 0x01) }
}
#[inline(always)]
pub const fn to_bits(self) -> u8 {
unsafe { core::mem::transmute(self) }
}
}
impl From<u8> for Smen {
#[inline(always)]
fn from(val: u8) -> Smen {
Smen::from_bits(val)
}
}
impl From<Smen> for u8 {
#[inline(always)]
fn from(val: Smen) -> u8 {
Smen::to_bits(val)
}
}
#[repr(u8)]
#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd)]
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
pub enum Smien {
#[doc = "the SUPC interrupt signal is not affected when a supply monitor detection occurs."]
NOT_ENABLE = 0x0,
#[doc = "the SUPC interrupt signal is asserted when a supply monitor detection occurs."]
ENABLE = 0x01,
}
impl Smien {
#[inline(always)]
pub const fn from_bits(val: u8) -> Smien {
unsafe { core::mem::transmute(val & 0x01) }
}
#[inline(always)]
pub const fn to_bits(self) -> u8 {
unsafe { core::mem::transmute(self) }
}
}
impl From<u8> for Smien {
#[inline(always)]
fn from(val: u8) -> Smien {
Smien::from_bits(val)
}
}
impl From<Smien> for u8 {
#[inline(always)]
fn from(val: Smien) -> u8 {
Smien::to_bits(val)
}
}
#[repr(u8)]
#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd)]
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
pub enum Smos {
#[doc = "the supply monitor detected VDDUTMI higher than its threshold at its last measurement."]
HIGH = 0x0,
#[doc = "the supply monitor detected VDDUTMI lower than its threshold at its last measurement."]
LOW = 0x01,
}
impl Smos {
#[inline(always)]
pub const fn from_bits(val: u8) -> Smos {
unsafe { core::mem::transmute(val & 0x01) }
}
#[inline(always)]
pub const fn to_bits(self) -> u8 {
unsafe { core::mem::transmute(self) }
}
}
impl From<u8> for Smos {
#[inline(always)]
fn from(val: u8) -> Smos {
Smos::from_bits(val)
}
}
impl From<Smos> for u8 {
#[inline(always)]
fn from(val: Smos) -> u8 {
Smos::to_bits(val)
}
}
#[repr(u8)]
#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd)]
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
pub enum Smrsten {
#[doc = "the core reset signal \"vddcore_nreset\" is not affected when a supply monitor detection occurs."]
NOT_ENABLE = 0x0,
#[doc = "the core reset signal, vddcore_nreset is asserted when a supply monitor detection occurs."]
ENABLE = 0x01,
}
impl Smrsten {
#[inline(always)]
pub const fn from_bits(val: u8) -> Smrsten {
unsafe { core::mem::transmute(val & 0x01) }
}
#[inline(always)]
pub const fn to_bits(self) -> u8 {
unsafe { core::mem::transmute(self) }
}
}
impl From<u8> for Smrsten {
#[inline(always)]
fn from(val: u8) -> Smrsten {
Smrsten::from_bits(val)
}
}
impl From<Smrsten> for u8 {
#[inline(always)]
fn from(val: Smrsten) -> u8 {
Smrsten::to_bits(val)
}
}
#[repr(u8)]
#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd)]
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
pub enum Smrsts {
#[doc = "no supply monitor detection has generated a core reset since the last read of the SUPC_SR."]
NO = 0x0,
#[doc = "at least one supply monitor detection has generated a core reset since the last read of the SUPC_SR."]
PRESENT = 0x01,
}
impl Smrsts {
#[inline(always)]
pub const fn from_bits(val: u8) -> Smrsts {
unsafe { core::mem::transmute(val & 0x01) }
}
#[inline(always)]
pub const fn to_bits(self) -> u8 {
unsafe { core::mem::transmute(self) }
}
}
impl From<u8> for Smrsts {
#[inline(always)]
fn from(val: u8) -> Smrsts {
Smrsts::from_bits(val)
}
}
impl From<Smrsts> for u8 {
#[inline(always)]
fn from(val: Smrsts) -> u8 {
Smrsts::to_bits(val)
}
}
#[repr(u8)]
#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd)]
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
pub enum Sms {
#[doc = "no supply monitor detection since the last read of SUPC_SR."]
NO = 0x0,
#[doc = "at least one supply monitor detection since the last read of SUPC_SR."]
PRESENT = 0x01,
}
impl Sms {
#[inline(always)]
pub const fn from_bits(val: u8) -> Sms {
unsafe { core::mem::transmute(val & 0x01) }
}
#[inline(always)]
pub const fn to_bits(self) -> u8 {
unsafe { core::mem::transmute(self) }
}
}
impl From<u8> for Sms {
#[inline(always)]
fn from(val: u8) -> Sms {
Sms::from_bits(val)
}
}
impl From<Sms> for u8 {
#[inline(always)]
fn from(val: Sms) -> u8 {
Sms::to_bits(val)
}
}
#[repr(u8)]
#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd)]
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
pub enum Smsmpl {
#[doc = "Supply Monitor disabled"]
SMD = 0x0,
#[doc = "Continuous Supply Monitor"]
CSM = 0x01,
#[doc = "Supply Monitor enabled one SLCK period every 32 SLCK periods"]
_32SLCK = 0x02,
#[doc = "Supply Monitor enabled one SLCK period every 256 SLCK periods"]
_256SLCK = 0x03,
#[doc = "Supply Monitor enabled one SLCK period every 2,048 SLCK periods"]
_2048SLCK = 0x04,
_RESERVED_5 = 0x05,
_RESERVED_6 = 0x06,
_RESERVED_7 = 0x07,
}
impl Smsmpl {
#[inline(always)]
pub const fn from_bits(val: u8) -> Smsmpl {
unsafe { core::mem::transmute(val & 0x07) }
}
#[inline(always)]
pub const fn to_bits(self) -> u8 {
unsafe { core::mem::transmute(self) }
}
}
impl From<u8> for Smsmpl {
#[inline(always)]
fn from(val: u8) -> Smsmpl {
Smsmpl::from_bits(val)
}
}
impl From<Smsmpl> for u8 {
#[inline(always)]
fn from(val: Smsmpl) -> u8 {
Smsmpl::to_bits(val)
}
}
#[repr(u8)]
#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd)]
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
pub enum Smws {
#[doc = "no wake-up due to a supply monitor detection has occurred since the last read of SUPC_SR."]
NO = 0x0,
#[doc = "at least one wake-up due to a supply monitor detection has occurred since the last read of SUPC_SR."]
PRESENT = 0x01,
}
impl Smws {
#[inline(always)]
pub const fn from_bits(val: u8) -> Smws {
unsafe { core::mem::transmute(val & 0x01) }
}
#[inline(always)]
pub const fn to_bits(self) -> u8 {
unsafe { core::mem::transmute(self) }
}
}
impl From<u8> for Smws {
#[inline(always)]
fn from(val: u8) -> Smws {
Smws::from_bits(val)
}
}
impl From<Smws> for u8 {
#[inline(always)]
fn from(val: Smws) -> u8 {
Smws::to_bits(val)
}
}
#[repr(u8)]
#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd)]
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
pub enum Vddiordy {
#[doc = "VDDIO is removed (used before going to backup mode when backup batteries are used)"]
VDDIO_REMOVED = 0x0,
#[doc = "VDDIO is present (used before going to backup mode when backup batteries are used)"]
VDDIO_PRESENT = 0x01,
}
impl Vddiordy {
#[inline(always)]
pub const fn from_bits(val: u8) -> Vddiordy {
unsafe { core::mem::transmute(val & 0x01) }
}
#[inline(always)]
pub const fn to_bits(self) -> u8 {
unsafe { core::mem::transmute(self) }
}
}
impl From<u8> for Vddiordy {
#[inline(always)]
fn from(val: u8) -> Vddiordy {
Vddiordy::from_bits(val)
}
}
impl From<Vddiordy> for u8 {
#[inline(always)]
fn from(val: Vddiordy) -> u8 {
Vddiordy::to_bits(val)
}
}
#[repr(u8)]
#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd)]
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
pub enum Vroff {
#[doc = "no effect."]
NO_EFFECT = 0x0,
#[doc = "if KEY is correct, asserts the vddcore_nreset and stops the voltage regulator."]
STOP_VREG = 0x01,
}
impl Vroff {
#[inline(always)]
pub const fn from_bits(val: u8) -> Vroff {
unsafe { core::mem::transmute(val & 0x01) }
}
#[inline(always)]
pub const fn to_bits(self) -> u8 {
unsafe { core::mem::transmute(self) }
}
}
impl From<u8> for Vroff {
#[inline(always)]
fn from(val: u8) -> Vroff {
Vroff::from_bits(val)
}
}
impl From<Vroff> for u8 {
#[inline(always)]
fn from(val: Vroff) -> u8 {
Vroff::to_bits(val)
}
}
#[repr(u8)]
#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd)]
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
pub enum Wkupdbc {
#[doc = "Immediate, no debouncing, detected active at least on one Slow Clock edge."]
IMMEDIATE = 0x0,
#[doc = "WKUPx shall be in its active state for at least 3 SLCK periods"]
_3_SCLK = 0x01,
#[doc = "WKUPx shall be in its active state for at least 32 SLCK periods"]
_32_SCLK = 0x02,
#[doc = "WKUPx shall be in its active state for at least 512 SLCK periods"]
_512_SCLK = 0x03,
#[doc = "WKUPx shall be in its active state for at least 4,096 SLCK periods"]
_4096_SCLK = 0x04,
#[doc = "WKUPx shall be in its active state for at least 32,768 SLCK periods"]
_32768_SCLK = 0x05,
_RESERVED_6 = 0x06,
_RESERVED_7 = 0x07,
}
impl Wkupdbc {
#[inline(always)]
pub const fn from_bits(val: u8) -> Wkupdbc {
unsafe { core::mem::transmute(val & 0x07) }
}
#[inline(always)]
pub const fn to_bits(self) -> u8 {
unsafe { core::mem::transmute(self) }
}
}
impl From<u8> for Wkupdbc {
#[inline(always)]
fn from(val: u8) -> Wkupdbc {
Wkupdbc::from_bits(val)
}
}
impl From<Wkupdbc> for u8 {
#[inline(always)]
fn from(val: Wkupdbc) -> u8 {
Wkupdbc::to_bits(val)
}
}
#[repr(u8)]
#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd)]
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
pub enum Wkupen {
#[doc = "the corresponding wake-up input has no wake-up effect."]
DISABLE = 0x0,
#[doc = "the corresponding wake-up input forces the wake-up of the core power supply."]
ENABLE = 0x01,
}
impl Wkupen {
#[inline(always)]
pub const fn from_bits(val: u8) -> Wkupen {
unsafe { core::mem::transmute(val & 0x01) }
}
#[inline(always)]
pub const fn to_bits(self) -> u8 {
unsafe { core::mem::transmute(self) }
}
}
impl From<u8> for Wkupen {
#[inline(always)]
fn from(val: u8) -> Wkupen {
Wkupen::from_bits(val)
}
}
impl From<Wkupen> for u8 {
#[inline(always)]
fn from(val: Wkupen) -> u8 {
Wkupen::to_bits(val)
}
}
#[repr(u8)]
#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd)]
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
pub enum Wkupen1 {
#[doc = "the corresponding wake-up input has no wake-up effect."]
DISABLE = 0x0,
#[doc = "the corresponding wake-up input forces the wake-up of the core power supply."]
ENABLE = 0x01,
}
impl Wkupen1 {
#[inline(always)]
pub const fn from_bits(val: u8) -> Wkupen1 {
unsafe { core::mem::transmute(val & 0x01) }
}
#[inline(always)]
pub const fn to_bits(self) -> u8 {
unsafe { core::mem::transmute(self) }
}
}
impl From<u8> for Wkupen1 {
#[inline(always)]
fn from(val: u8) -> Wkupen1 {
Wkupen1::from_bits(val)
}
}
impl From<Wkupen1> for u8 {
#[inline(always)]
fn from(val: Wkupen1) -> u8 {
Wkupen1::to_bits(val)
}
}
#[repr(u8)]
#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd)]
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
pub enum Wkupen10 {
#[doc = "the corresponding wake-up input has no wake-up effect."]
DISABLE = 0x0,
#[doc = "the corresponding wake-up input forces the wake-up of the core power supply."]
ENABLE = 0x01,
}
impl Wkupen10 {
#[inline(always)]
pub const fn from_bits(val: u8) -> Wkupen10 {
unsafe { core::mem::transmute(val & 0x01) }
}
#[inline(always)]
pub const fn to_bits(self) -> u8 {
unsafe { core::mem::transmute(self) }
}
}
impl From<u8> for Wkupen10 {
#[inline(always)]
fn from(val: u8) -> Wkupen10 {
Wkupen10::from_bits(val)
}
}
impl From<Wkupen10> for u8 {
#[inline(always)]
fn from(val: Wkupen10) -> u8 {
Wkupen10::to_bits(val)
}
}
#[repr(u8)]
#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd)]
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
pub enum Wkupen11 {
#[doc = "the corresponding wake-up input has no wake-up effect."]
DISABLE = 0x0,
#[doc = "the corresponding wake-up input forces the wake-up of the core power supply."]
ENABLE = 0x01,
}
impl Wkupen11 {
#[inline(always)]
pub const fn from_bits(val: u8) -> Wkupen11 {
unsafe { core::mem::transmute(val & 0x01) }
}
#[inline(always)]
pub const fn to_bits(self) -> u8 {
unsafe { core::mem::transmute(self) }
}
}
impl From<u8> for Wkupen11 {
#[inline(always)]
fn from(val: u8) -> Wkupen11 {
Wkupen11::from_bits(val)
}
}
impl From<Wkupen11> for u8 {
#[inline(always)]
fn from(val: Wkupen11) -> u8 {
Wkupen11::to_bits(val)
}
}
#[repr(u8)]
#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd)]
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
pub enum Wkupen12 {
#[doc = "the corresponding wake-up input has no wake-up effect."]
DISABLE = 0x0,
#[doc = "the corresponding wake-up input forces the wake-up of the core power supply."]
ENABLE = 0x01,
}
impl Wkupen12 {
#[inline(always)]
pub const fn from_bits(val: u8) -> Wkupen12 {
unsafe { core::mem::transmute(val & 0x01) }
}
#[inline(always)]
pub const fn to_bits(self) -> u8 {
unsafe { core::mem::transmute(self) }
}
}
impl From<u8> for Wkupen12 {
#[inline(always)]
fn from(val: u8) -> Wkupen12 {
Wkupen12::from_bits(val)
}
}
impl From<Wkupen12> for u8 {
#[inline(always)]
fn from(val: Wkupen12) -> u8 {
Wkupen12::to_bits(val)
}
}
#[repr(u8)]
#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd)]
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
pub enum Wkupen13 {
#[doc = "the corresponding wake-up input has no wake-up effect."]
DISABLE = 0x0,
#[doc = "the corresponding wake-up input forces the wake-up of the core power supply."]
ENABLE = 0x01,
}
impl Wkupen13 {
#[inline(always)]
pub const fn from_bits(val: u8) -> Wkupen13 {
unsafe { core::mem::transmute(val & 0x01) }
}
#[inline(always)]
pub const fn to_bits(self) -> u8 {
unsafe { core::mem::transmute(self) }
}
}
impl From<u8> for Wkupen13 {
#[inline(always)]
fn from(val: u8) -> Wkupen13 {
Wkupen13::from_bits(val)
}
}
impl From<Wkupen13> for u8 {
#[inline(always)]
fn from(val: Wkupen13) -> u8 {
Wkupen13::to_bits(val)
}
}
#[repr(u8)]
#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd)]
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
pub enum Wkupen14 {
#[doc = "the corresponding wake-up input has no wake-up effect."]
DISABLE = 0x0,
#[doc = "the corresponding wake-up input forces the wake-up of the core power supply."]
ENABLE = 0x01,
}
impl Wkupen14 {
#[inline(always)]
pub const fn from_bits(val: u8) -> Wkupen14 {
unsafe { core::mem::transmute(val & 0x01) }
}
#[inline(always)]
pub const fn to_bits(self) -> u8 {
unsafe { core::mem::transmute(self) }
}
}
impl From<u8> for Wkupen14 {
#[inline(always)]
fn from(val: u8) -> Wkupen14 {
Wkupen14::from_bits(val)
}
}
impl From<Wkupen14> for u8 {
#[inline(always)]
fn from(val: Wkupen14) -> u8 {
Wkupen14::to_bits(val)
}
}
#[repr(u8)]
#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd)]
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
pub enum Wkupen15 {
#[doc = "the corresponding wake-up input has no wake-up effect."]
DISABLE = 0x0,
#[doc = "the corresponding wake-up input forces the wake-up of the core power supply."]
ENABLE = 0x01,
}
impl Wkupen15 {
#[inline(always)]
pub const fn from_bits(val: u8) -> Wkupen15 {
unsafe { core::mem::transmute(val & 0x01) }
}
#[inline(always)]
pub const fn to_bits(self) -> u8 {
unsafe { core::mem::transmute(self) }
}
}
impl From<u8> for Wkupen15 {
#[inline(always)]
fn from(val: u8) -> Wkupen15 {
Wkupen15::from_bits(val)
}
}
impl From<Wkupen15> for u8 {
#[inline(always)]
fn from(val: Wkupen15) -> u8 {
Wkupen15::to_bits(val)
}
}
#[repr(u8)]
#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd)]
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
pub enum Wkupen2 {
#[doc = "the corresponding wake-up input has no wake-up effect."]
DISABLE = 0x0,
#[doc = "the corresponding wake-up input forces the wake-up of the core power supply."]
ENABLE = 0x01,
}
impl Wkupen2 {
#[inline(always)]
pub const fn from_bits(val: u8) -> Wkupen2 {
unsafe { core::mem::transmute(val & 0x01) }
}
#[inline(always)]
pub const fn to_bits(self) -> u8 {
unsafe { core::mem::transmute(self) }
}
}
impl From<u8> for Wkupen2 {
#[inline(always)]
fn from(val: u8) -> Wkupen2 {
Wkupen2::from_bits(val)
}
}
impl From<Wkupen2> for u8 {
#[inline(always)]
fn from(val: Wkupen2) -> u8 {
Wkupen2::to_bits(val)
}
}
#[repr(u8)]
#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd)]
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
pub enum Wkupen3 {
#[doc = "the corresponding wake-up input has no wake-up effect."]
DISABLE = 0x0,
#[doc = "the corresponding wake-up input forces the wake-up of the core power supply."]
ENABLE = 0x01,
}
impl Wkupen3 {
#[inline(always)]
pub const fn from_bits(val: u8) -> Wkupen3 {
unsafe { core::mem::transmute(val & 0x01) }
}
#[inline(always)]
pub const fn to_bits(self) -> u8 {
unsafe { core::mem::transmute(self) }
}
}
impl From<u8> for Wkupen3 {
#[inline(always)]
fn from(val: u8) -> Wkupen3 {
Wkupen3::from_bits(val)
}
}
impl From<Wkupen3> for u8 {
#[inline(always)]
fn from(val: Wkupen3) -> u8 {
Wkupen3::to_bits(val)
}
}
#[repr(u8)]
#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd)]
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
pub enum Wkupen4 {
#[doc = "the corresponding wake-up input has no wake-up effect."]
DISABLE = 0x0,
#[doc = "the corresponding wake-up input forces the wake-up of the core power supply."]
ENABLE = 0x01,
}
impl Wkupen4 {
#[inline(always)]
pub const fn from_bits(val: u8) -> Wkupen4 {
unsafe { core::mem::transmute(val & 0x01) }
}
#[inline(always)]
pub const fn to_bits(self) -> u8 {
unsafe { core::mem::transmute(self) }
}
}
impl From<u8> for Wkupen4 {
#[inline(always)]
fn from(val: u8) -> Wkupen4 {
Wkupen4::from_bits(val)
}
}
impl From<Wkupen4> for u8 {
#[inline(always)]
fn from(val: Wkupen4) -> u8 {
Wkupen4::to_bits(val)
}
}
#[repr(u8)]
#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd)]
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
pub enum Wkupen5 {
#[doc = "the corresponding wake-up input has no wake-up effect."]
DISABLE = 0x0,
#[doc = "the corresponding wake-up input forces the wake-up of the core power supply."]
ENABLE = 0x01,
}
impl Wkupen5 {
#[inline(always)]
pub const fn from_bits(val: u8) -> Wkupen5 {
unsafe { core::mem::transmute(val & 0x01) }
}
#[inline(always)]
pub const fn to_bits(self) -> u8 {
unsafe { core::mem::transmute(self) }
}
}
impl From<u8> for Wkupen5 {
#[inline(always)]
fn from(val: u8) -> Wkupen5 {
Wkupen5::from_bits(val)
}
}
impl From<Wkupen5> for u8 {
#[inline(always)]
fn from(val: Wkupen5) -> u8 {
Wkupen5::to_bits(val)
}
}
#[repr(u8)]
#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd)]
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
pub enum Wkupen6 {
#[doc = "the corresponding wake-up input has no wake-up effect."]
DISABLE = 0x0,
#[doc = "the corresponding wake-up input forces the wake-up of the core power supply."]
ENABLE = 0x01,
}
impl Wkupen6 {
#[inline(always)]
pub const fn from_bits(val: u8) -> Wkupen6 {
unsafe { core::mem::transmute(val & 0x01) }
}
#[inline(always)]
pub const fn to_bits(self) -> u8 {
unsafe { core::mem::transmute(self) }
}
}
impl From<u8> for Wkupen6 {
#[inline(always)]
fn from(val: u8) -> Wkupen6 {
Wkupen6::from_bits(val)
}
}
impl From<Wkupen6> for u8 {
#[inline(always)]
fn from(val: Wkupen6) -> u8 {
Wkupen6::to_bits(val)
}
}
#[repr(u8)]
#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd)]
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
pub enum Wkupen7 {
#[doc = "the corresponding wake-up input has no wake-up effect."]
DISABLE = 0x0,
#[doc = "the corresponding wake-up input forces the wake-up of the core power supply."]
ENABLE = 0x01,
}
impl Wkupen7 {
#[inline(always)]
pub const fn from_bits(val: u8) -> Wkupen7 {
unsafe { core::mem::transmute(val & 0x01) }
}
#[inline(always)]
pub const fn to_bits(self) -> u8 {
unsafe { core::mem::transmute(self) }
}
}
impl From<u8> for Wkupen7 {
#[inline(always)]
fn from(val: u8) -> Wkupen7 {
Wkupen7::from_bits(val)
}
}
impl From<Wkupen7> for u8 {
#[inline(always)]
fn from(val: Wkupen7) -> u8 {
Wkupen7::to_bits(val)
}
}
#[repr(u8)]
#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd)]
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
pub enum Wkupen8 {
#[doc = "the corresponding wake-up input has no wake-up effect."]
DISABLE = 0x0,
#[doc = "the corresponding wake-up input forces the wake-up of the core power supply."]
ENABLE = 0x01,
}
impl Wkupen8 {
#[inline(always)]
pub const fn from_bits(val: u8) -> Wkupen8 {
unsafe { core::mem::transmute(val & 0x01) }
}
#[inline(always)]
pub const fn to_bits(self) -> u8 {
unsafe { core::mem::transmute(self) }
}
}
impl From<u8> for Wkupen8 {
#[inline(always)]
fn from(val: u8) -> Wkupen8 {
Wkupen8::from_bits(val)
}
}
impl From<Wkupen8> for u8 {
#[inline(always)]
fn from(val: Wkupen8) -> u8 {
Wkupen8::to_bits(val)
}
}
#[repr(u8)]
#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd)]
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
pub enum Wkupen9 {
#[doc = "the corresponding wake-up input has no wake-up effect."]
DISABLE = 0x0,
#[doc = "the corresponding wake-up input forces the wake-up of the core power supply."]
ENABLE = 0x01,
}
impl Wkupen9 {
#[inline(always)]
pub const fn from_bits(val: u8) -> Wkupen9 {
unsafe { core::mem::transmute(val & 0x01) }
}
#[inline(always)]
pub const fn to_bits(self) -> u8 {
unsafe { core::mem::transmute(self) }
}
}
impl From<u8> for Wkupen9 {
#[inline(always)]
fn from(val: u8) -> Wkupen9 {
Wkupen9::from_bits(val)
}
}
impl From<Wkupen9> for u8 {
#[inline(always)]
fn from(val: Wkupen9) -> u8 {
Wkupen9::to_bits(val)
}
}
#[repr(u8)]
#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd)]
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
pub enum Wkupis {
#[doc = "the corresponding wake-up input is disabled, or was inactive at the time the debouncer triggered a wake-up event."]
DIS = 0x0,
#[doc = "the corresponding wake-up input was active at the time the debouncer triggered a wake-up event."]
EN = 0x01,
}
impl Wkupis {
#[inline(always)]
pub const fn from_bits(val: u8) -> Wkupis {
unsafe { core::mem::transmute(val & 0x01) }
}
#[inline(always)]
pub const fn to_bits(self) -> u8 {
unsafe { core::mem::transmute(self) }
}
}
impl From<u8> for Wkupis {
#[inline(always)]
fn from(val: u8) -> Wkupis {
Wkupis::from_bits(val)
}
}
impl From<Wkupis> for u8 {
#[inline(always)]
fn from(val: Wkupis) -> u8 {
Wkupis::to_bits(val)
}
}
#[repr(u8)]
#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd)]
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
pub enum Wkupis1 {
#[doc = "the corresponding wake-up input is disabled, or was inactive at the time the debouncer triggered a wake-up event."]
DIS = 0x0,
#[doc = "the corresponding wake-up input was active at the time the debouncer triggered a wake-up event."]
EN = 0x01,
}
impl Wkupis1 {
#[inline(always)]
pub const fn from_bits(val: u8) -> Wkupis1 {
unsafe { core::mem::transmute(val & 0x01) }
}
#[inline(always)]
pub const fn to_bits(self) -> u8 {
unsafe { core::mem::transmute(self) }
}
}
impl From<u8> for Wkupis1 {
#[inline(always)]
fn from(val: u8) -> Wkupis1 {
Wkupis1::from_bits(val)
}
}
impl From<Wkupis1> for u8 {
#[inline(always)]
fn from(val: Wkupis1) -> u8 {
Wkupis1::to_bits(val)
}
}
#[repr(u8)]
#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd)]
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
pub enum Wkupis10 {
#[doc = "the corresponding wake-up input is disabled, or was inactive at the time the debouncer triggered a wake-up event."]
DIS = 0x0,
#[doc = "the corresponding wake-up input was active at the time the debouncer triggered a wake-up event."]
EN = 0x01,
}
impl Wkupis10 {
#[inline(always)]
pub const fn from_bits(val: u8) -> Wkupis10 {
unsafe { core::mem::transmute(val & 0x01) }
}
#[inline(always)]
pub const fn to_bits(self) -> u8 {
unsafe { core::mem::transmute(self) }
}
}
impl From<u8> for Wkupis10 {
#[inline(always)]
fn from(val: u8) -> Wkupis10 {
Wkupis10::from_bits(val)
}
}
impl From<Wkupis10> for u8 {
#[inline(always)]
fn from(val: Wkupis10) -> u8 {
Wkupis10::to_bits(val)
}
}
#[repr(u8)]
#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd)]
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
pub enum Wkupis11 {
#[doc = "the corresponding wake-up input is disabled, or was inactive at the time the debouncer triggered a wake-up event."]
DIS = 0x0,
#[doc = "the corresponding wake-up input was active at the time the debouncer triggered a wake-up event."]
EN = 0x01,
}
impl Wkupis11 {
#[inline(always)]
pub const fn from_bits(val: u8) -> Wkupis11 {
unsafe { core::mem::transmute(val & 0x01) }
}
#[inline(always)]
pub const fn to_bits(self) -> u8 {
unsafe { core::mem::transmute(self) }
}
}
impl From<u8> for Wkupis11 {
#[inline(always)]
fn from(val: u8) -> Wkupis11 {
Wkupis11::from_bits(val)
}
}
impl From<Wkupis11> for u8 {
#[inline(always)]
fn from(val: Wkupis11) -> u8 {
Wkupis11::to_bits(val)
}
}
#[repr(u8)]
#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd)]
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
pub enum Wkupis12 {
#[doc = "the corresponding wake-up input is disabled, or was inactive at the time the debouncer triggered a wake-up event."]
DIS = 0x0,
#[doc = "the corresponding wake-up input was active at the time the debouncer triggered a wake-up event."]
EN = 0x01,
}
impl Wkupis12 {
#[inline(always)]
pub const fn from_bits(val: u8) -> Wkupis12 {
unsafe { core::mem::transmute(val & 0x01) }
}
#[inline(always)]
pub const fn to_bits(self) -> u8 {
unsafe { core::mem::transmute(self) }
}
}
impl From<u8> for Wkupis12 {
#[inline(always)]
fn from(val: u8) -> Wkupis12 {
Wkupis12::from_bits(val)
}
}
impl From<Wkupis12> for u8 {
#[inline(always)]
fn from(val: Wkupis12) -> u8 {
Wkupis12::to_bits(val)
}
}
#[repr(u8)]
#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd)]
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
pub enum Wkupis13 {
#[doc = "the corresponding wake-up input is disabled, or was inactive at the time the debouncer triggered a wake-up event."]
DIS = 0x0,
#[doc = "the corresponding wake-up input was active at the time the debouncer triggered a wake-up event."]
EN = 0x01,
}
impl Wkupis13 {
#[inline(always)]
pub const fn from_bits(val: u8) -> Wkupis13 {
unsafe { core::mem::transmute(val & 0x01) }
}
#[inline(always)]
pub const fn to_bits(self) -> u8 {
unsafe { core::mem::transmute(self) }
}
}
impl From<u8> for Wkupis13 {
#[inline(always)]
fn from(val: u8) -> Wkupis13 {
Wkupis13::from_bits(val)
}
}
impl From<Wkupis13> for u8 {
#[inline(always)]
fn from(val: Wkupis13) -> u8 {
Wkupis13::to_bits(val)
}
}
#[repr(u8)]
#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd)]
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
pub enum Wkupis14 {
#[doc = "the corresponding wake-up input is disabled, or was inactive at the time the debouncer triggered a wake-up event."]
DIS = 0x0,
#[doc = "the corresponding wake-up input was active at the time the debouncer triggered a wake-up event."]
EN = 0x01,
}
impl Wkupis14 {
#[inline(always)]
pub const fn from_bits(val: u8) -> Wkupis14 {
unsafe { core::mem::transmute(val & 0x01) }
}
#[inline(always)]
pub const fn to_bits(self) -> u8 {
unsafe { core::mem::transmute(self) }
}
}
impl From<u8> for Wkupis14 {
#[inline(always)]
fn from(val: u8) -> Wkupis14 {
Wkupis14::from_bits(val)
}
}
impl From<Wkupis14> for u8 {
#[inline(always)]
fn from(val: Wkupis14) -> u8 {
Wkupis14::to_bits(val)
}
}
#[repr(u8)]
#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd)]
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
pub enum Wkupis15 {
#[doc = "the corresponding wake-up input is disabled, or was inactive at the time the debouncer triggered a wake-up event."]
DIS = 0x0,
#[doc = "the corresponding wake-up input was active at the time the debouncer triggered a wake-up event."]
EN = 0x01,
}
impl Wkupis15 {
#[inline(always)]
pub const fn from_bits(val: u8) -> Wkupis15 {
unsafe { core::mem::transmute(val & 0x01) }
}
#[inline(always)]
pub const fn to_bits(self) -> u8 {
unsafe { core::mem::transmute(self) }
}
}
impl From<u8> for Wkupis15 {
#[inline(always)]
fn from(val: u8) -> Wkupis15 {
Wkupis15::from_bits(val)
}
}
impl From<Wkupis15> for u8 {
#[inline(always)]
fn from(val: Wkupis15) -> u8 {
Wkupis15::to_bits(val)
}
}
#[repr(u8)]
#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd)]
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
pub enum Wkupis2 {
#[doc = "the corresponding wake-up input is disabled, or was inactive at the time the debouncer triggered a wake-up event."]
DIS = 0x0,
#[doc = "the corresponding wake-up input was active at the time the debouncer triggered a wake-up event."]
EN = 0x01,
}
impl Wkupis2 {
#[inline(always)]
pub const fn from_bits(val: u8) -> Wkupis2 {
unsafe { core::mem::transmute(val & 0x01) }
}
#[inline(always)]
pub const fn to_bits(self) -> u8 {
unsafe { core::mem::transmute(self) }
}
}
impl From<u8> for Wkupis2 {
#[inline(always)]
fn from(val: u8) -> Wkupis2 {
Wkupis2::from_bits(val)
}
}
impl From<Wkupis2> for u8 {
#[inline(always)]
fn from(val: Wkupis2) -> u8 {
Wkupis2::to_bits(val)
}
}
#[repr(u8)]
#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd)]
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
pub enum Wkupis3 {
#[doc = "the corresponding wake-up input is disabled, or was inactive at the time the debouncer triggered a wake-up event."]
DIS = 0x0,
#[doc = "the corresponding wake-up input was active at the time the debouncer triggered a wake-up event."]
EN = 0x01,
}
impl Wkupis3 {
#[inline(always)]
pub const fn from_bits(val: u8) -> Wkupis3 {
unsafe { core::mem::transmute(val & 0x01) }
}
#[inline(always)]
pub const fn to_bits(self) -> u8 {
unsafe { core::mem::transmute(self) }
}
}
impl From<u8> for Wkupis3 {
#[inline(always)]
fn from(val: u8) -> Wkupis3 {
Wkupis3::from_bits(val)
}
}
impl From<Wkupis3> for u8 {
#[inline(always)]
fn from(val: Wkupis3) -> u8 {
Wkupis3::to_bits(val)
}
}
#[repr(u8)]
#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd)]
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
pub enum Wkupis4 {
#[doc = "the corresponding wake-up input is disabled, or was inactive at the time the debouncer triggered a wake-up event."]
DIS = 0x0,
#[doc = "the corresponding wake-up input was active at the time the debouncer triggered a wake-up event."]
EN = 0x01,
}
impl Wkupis4 {
#[inline(always)]
pub const fn from_bits(val: u8) -> Wkupis4 {
unsafe { core::mem::transmute(val & 0x01) }
}
#[inline(always)]
pub const fn to_bits(self) -> u8 {
unsafe { core::mem::transmute(self) }
}
}
impl From<u8> for Wkupis4 {
#[inline(always)]
fn from(val: u8) -> Wkupis4 {
Wkupis4::from_bits(val)
}
}
impl From<Wkupis4> for u8 {
#[inline(always)]
fn from(val: Wkupis4) -> u8 {
Wkupis4::to_bits(val)
}
}
#[repr(u8)]
#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd)]
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
pub enum Wkupis5 {
#[doc = "the corresponding wake-up input is disabled, or was inactive at the time the debouncer triggered a wake-up event."]
DIS = 0x0,
#[doc = "the corresponding wake-up input was active at the time the debouncer triggered a wake-up event."]
EN = 0x01,
}
impl Wkupis5 {
#[inline(always)]
pub const fn from_bits(val: u8) -> Wkupis5 {
unsafe { core::mem::transmute(val & 0x01) }
}
#[inline(always)]
pub const fn to_bits(self) -> u8 {
unsafe { core::mem::transmute(self) }
}
}
impl From<u8> for Wkupis5 {
#[inline(always)]
fn from(val: u8) -> Wkupis5 {
Wkupis5::from_bits(val)
}
}
impl From<Wkupis5> for u8 {
#[inline(always)]
fn from(val: Wkupis5) -> u8 {
Wkupis5::to_bits(val)
}
}
#[repr(u8)]
#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd)]
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
pub enum Wkupis6 {
#[doc = "the corresponding wake-up input is disabled, or was inactive at the time the debouncer triggered a wake-up event."]
DIS = 0x0,
#[doc = "the corresponding wake-up input was active at the time the debouncer triggered a wake-up event."]
EN = 0x01,
}
impl Wkupis6 {
#[inline(always)]
pub const fn from_bits(val: u8) -> Wkupis6 {
unsafe { core::mem::transmute(val & 0x01) }
}
#[inline(always)]
pub const fn to_bits(self) -> u8 {
unsafe { core::mem::transmute(self) }
}
}
impl From<u8> for Wkupis6 {
#[inline(always)]
fn from(val: u8) -> Wkupis6 {
Wkupis6::from_bits(val)
}
}
impl From<Wkupis6> for u8 {
#[inline(always)]
fn from(val: Wkupis6) -> u8 {
Wkupis6::to_bits(val)
}
}
#[repr(u8)]
#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd)]
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
pub enum Wkupis7 {
#[doc = "the corresponding wake-up input is disabled, or was inactive at the time the debouncer triggered a wake-up event."]
DIS = 0x0,
#[doc = "the corresponding wake-up input was active at the time the debouncer triggered a wake-up event."]
EN = 0x01,
}
impl Wkupis7 {
#[inline(always)]
pub const fn from_bits(val: u8) -> Wkupis7 {
unsafe { core::mem::transmute(val & 0x01) }
}
#[inline(always)]
pub const fn to_bits(self) -> u8 {
unsafe { core::mem::transmute(self) }
}
}
impl From<u8> for Wkupis7 {
#[inline(always)]
fn from(val: u8) -> Wkupis7 {
Wkupis7::from_bits(val)
}
}
impl From<Wkupis7> for u8 {
#[inline(always)]
fn from(val: Wkupis7) -> u8 {
Wkupis7::to_bits(val)
}
}
#[repr(u8)]
#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd)]
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
pub enum Wkupis8 {
#[doc = "the corresponding wake-up input is disabled, or was inactive at the time the debouncer triggered a wake-up event."]
DIS = 0x0,
#[doc = "the corresponding wake-up input was active at the time the debouncer triggered a wake-up event."]
EN = 0x01,
}
impl Wkupis8 {
#[inline(always)]
pub const fn from_bits(val: u8) -> Wkupis8 {
unsafe { core::mem::transmute(val & 0x01) }
}
#[inline(always)]
pub const fn to_bits(self) -> u8 {
unsafe { core::mem::transmute(self) }
}
}
impl From<u8> for Wkupis8 {
#[inline(always)]
fn from(val: u8) -> Wkupis8 {
Wkupis8::from_bits(val)
}
}
impl From<Wkupis8> for u8 {
#[inline(always)]
fn from(val: Wkupis8) -> u8 {
Wkupis8::to_bits(val)
}
}
#[repr(u8)]
#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd)]
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
pub enum Wkupis9 {
#[doc = "the corresponding wake-up input is disabled, or was inactive at the time the debouncer triggered a wake-up event."]
DIS = 0x0,
#[doc = "the corresponding wake-up input was active at the time the debouncer triggered a wake-up event."]
EN = 0x01,
}
impl Wkupis9 {
#[inline(always)]
pub const fn from_bits(val: u8) -> Wkupis9 {
unsafe { core::mem::transmute(val & 0x01) }
}
#[inline(always)]
pub const fn to_bits(self) -> u8 {
unsafe { core::mem::transmute(self) }
}
}
impl From<u8> for Wkupis9 {
#[inline(always)]
fn from(val: u8) -> Wkupis9 {
Wkupis9::from_bits(val)
}
}
impl From<Wkupis9> for u8 {
#[inline(always)]
fn from(val: Wkupis9) -> u8 {
Wkupis9::to_bits(val)
}
}
#[repr(u8)]
#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd)]
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
pub enum Wkups {
#[doc = "no wake-up due to the assertion of the WKUP pins has occurred since the last read of SUPC_SR."]
NO = 0x0,
#[doc = "at least one wake-up due to the assertion of the WKUP pins has occurred since the last read of SUPC_SR."]
PRESENT = 0x01,
}
impl Wkups {
#[inline(always)]
pub const fn from_bits(val: u8) -> Wkups {
unsafe { core::mem::transmute(val & 0x01) }
}
#[inline(always)]
pub const fn to_bits(self) -> u8 {
unsafe { core::mem::transmute(self) }
}
}
impl From<u8> for Wkups {
#[inline(always)]
fn from(val: u8) -> Wkups {
Wkups::from_bits(val)
}
}
impl From<Wkups> for u8 {
#[inline(always)]
fn from(val: Wkups) -> u8 {
Wkups::to_bits(val)
}
}
#[repr(u8)]
#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd)]
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
pub enum Wkupt {
#[doc = "a high to low level transition for a period defined by WKUPDBC on the corresponding wake-up input forces the wake-up of the core power supply."]
HIGH_TO_LOW = 0x0,
#[doc = "a low to high level transition for a period defined by WKUPDBC on the correspond-ing wake-up input forces the wake-up of the core power supply."]
LOW_TO_HIGH = 0x01,
}
impl Wkupt {
#[inline(always)]
pub const fn from_bits(val: u8) -> Wkupt {
unsafe { core::mem::transmute(val & 0x01) }
}
#[inline(always)]
pub const fn to_bits(self) -> u8 {
unsafe { core::mem::transmute(self) }
}
}
impl From<u8> for Wkupt {
#[inline(always)]
fn from(val: u8) -> Wkupt {
Wkupt::from_bits(val)
}
}
impl From<Wkupt> for u8 {
#[inline(always)]
fn from(val: Wkupt) -> u8 {
Wkupt::to_bits(val)
}
}
#[repr(u8)]
#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd)]
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
pub enum Wkupt1 {
#[doc = "a high to low level transition for a period defined by WKUPDBC on the corresponding wake-up input forces the wake-up of the core power supply."]
HIGH_TO_LOW = 0x0,
#[doc = "a low to high level transition for a period defined by WKUPDBC on the correspond-ing wake-up input forces the wake-up of the core power supply."]
LOW_TO_HIGH = 0x01,
}
impl Wkupt1 {
#[inline(always)]
pub const fn from_bits(val: u8) -> Wkupt1 {
unsafe { core::mem::transmute(val & 0x01) }
}
#[inline(always)]
pub const fn to_bits(self) -> u8 {
unsafe { core::mem::transmute(self) }
}
}
impl From<u8> for Wkupt1 {
#[inline(always)]
fn from(val: u8) -> Wkupt1 {
Wkupt1::from_bits(val)
}
}
impl From<Wkupt1> for u8 {
#[inline(always)]
fn from(val: Wkupt1) -> u8 {
Wkupt1::to_bits(val)
}
}
#[repr(u8)]
#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd)]
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
pub enum Wkupt10 {
#[doc = "a high to low level transition for a period defined by WKUPDBC on the corresponding wake-up input forces the wake-up of the core power supply."]
HIGH_TO_LOW = 0x0,
#[doc = "a low to high level transition for a period defined by WKUPDBC on the correspond-ing wake-up input forces the wake-up of the core power supply."]
LOW_TO_HIGH = 0x01,
}
impl Wkupt10 {
#[inline(always)]
pub const fn from_bits(val: u8) -> Wkupt10 {
unsafe { core::mem::transmute(val & 0x01) }
}
#[inline(always)]
pub const fn to_bits(self) -> u8 {
unsafe { core::mem::transmute(self) }
}
}
impl From<u8> for Wkupt10 {
#[inline(always)]
fn from(val: u8) -> Wkupt10 {
Wkupt10::from_bits(val)
}
}
impl From<Wkupt10> for u8 {
#[inline(always)]
fn from(val: Wkupt10) -> u8 {
Wkupt10::to_bits(val)
}
}
#[repr(u8)]
#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd)]
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
pub enum Wkupt11 {
#[doc = "a high to low level transition for a period defined by WKUPDBC on the corresponding wake-up input forces the wake-up of the core power supply."]
HIGH_TO_LOW = 0x0,
#[doc = "a low to high level transition for a period defined by WKUPDBC on the correspond-ing wake-up input forces the wake-up of the core power supply."]
LOW_TO_HIGH = 0x01,
}
impl Wkupt11 {
#[inline(always)]
pub const fn from_bits(val: u8) -> Wkupt11 {
unsafe { core::mem::transmute(val & 0x01) }
}
#[inline(always)]
pub const fn to_bits(self) -> u8 {
unsafe { core::mem::transmute(self) }
}
}
impl From<u8> for Wkupt11 {
#[inline(always)]
fn from(val: u8) -> Wkupt11 {
Wkupt11::from_bits(val)
}
}
impl From<Wkupt11> for u8 {
#[inline(always)]
fn from(val: Wkupt11) -> u8 {
Wkupt11::to_bits(val)
}
}
#[repr(u8)]
#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd)]
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
pub enum Wkupt12 {
#[doc = "a high to low level transition for a period defined by WKUPDBC on the corresponding wake-up input forces the wake-up of the core power supply."]
HIGH_TO_LOW = 0x0,
#[doc = "a low to high level transition for a period defined by WKUPDBC on the correspond-ing wake-up input forces the wake-up of the core power supply."]
LOW_TO_HIGH = 0x01,
}
impl Wkupt12 {
#[inline(always)]
pub const fn from_bits(val: u8) -> Wkupt12 {
unsafe { core::mem::transmute(val & 0x01) }
}
#[inline(always)]
pub const fn to_bits(self) -> u8 {
unsafe { core::mem::transmute(self) }
}
}
impl From<u8> for Wkupt12 {
#[inline(always)]
fn from(val: u8) -> Wkupt12 {
Wkupt12::from_bits(val)
}
}
impl From<Wkupt12> for u8 {
#[inline(always)]
fn from(val: Wkupt12) -> u8 {
Wkupt12::to_bits(val)
}
}
#[repr(u8)]
#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd)]
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
pub enum Wkupt13 {
#[doc = "a high to low level transition for a period defined by WKUPDBC on the corresponding wake-up input forces the wake-up of the core power supply."]
HIGH_TO_LOW = 0x0,
#[doc = "a low to high level transition for a period defined by WKUPDBC on the correspond-ing wake-up input forces the wake-up of the core power supply."]
LOW_TO_HIGH = 0x01,
}
impl Wkupt13 {
#[inline(always)]
pub const fn from_bits(val: u8) -> Wkupt13 {
unsafe { core::mem::transmute(val & 0x01) }
}
#[inline(always)]
pub const fn to_bits(self) -> u8 {
unsafe { core::mem::transmute(self) }
}
}
impl From<u8> for Wkupt13 {
#[inline(always)]
fn from(val: u8) -> Wkupt13 {
Wkupt13::from_bits(val)
}
}
impl From<Wkupt13> for u8 {
#[inline(always)]
fn from(val: Wkupt13) -> u8 {
Wkupt13::to_bits(val)
}
}
#[repr(u8)]
#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd)]
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
pub enum Wkupt14 {
#[doc = "a high to low level transition for a period defined by WKUPDBC on the corresponding wake-up input forces the wake-up of the core power supply."]
HIGH_TO_LOW = 0x0,
#[doc = "a low to high level transition for a period defined by WKUPDBC on the correspond-ing wake-up input forces the wake-up of the core power supply."]
LOW_TO_HIGH = 0x01,
}
impl Wkupt14 {
#[inline(always)]
pub const fn from_bits(val: u8) -> Wkupt14 {
unsafe { core::mem::transmute(val & 0x01) }
}
#[inline(always)]
pub const fn to_bits(self) -> u8 {
unsafe { core::mem::transmute(self) }
}
}
impl From<u8> for Wkupt14 {
#[inline(always)]
fn from(val: u8) -> Wkupt14 {
Wkupt14::from_bits(val)
}
}
impl From<Wkupt14> for u8 {
#[inline(always)]
fn from(val: Wkupt14) -> u8 {
Wkupt14::to_bits(val)
}
}
#[repr(u8)]
#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd)]
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
pub enum Wkupt15 {
#[doc = "a high to low level transition for a period defined by WKUPDBC on the corresponding wake-up input forces the wake-up of the core power supply."]
HIGH_TO_LOW = 0x0,
#[doc = "a low to high level transition for a period defined by WKUPDBC on the correspond-ing wake-up input forces the wake-up of the core power supply."]
LOW_TO_HIGH = 0x01,
}
impl Wkupt15 {
#[inline(always)]
pub const fn from_bits(val: u8) -> Wkupt15 {
unsafe { core::mem::transmute(val & 0x01) }
}
#[inline(always)]
pub const fn to_bits(self) -> u8 {
unsafe { core::mem::transmute(self) }
}
}
impl From<u8> for Wkupt15 {
#[inline(always)]
fn from(val: u8) -> Wkupt15 {
Wkupt15::from_bits(val)
}
}
impl From<Wkupt15> for u8 {
#[inline(always)]
fn from(val: Wkupt15) -> u8 {
Wkupt15::to_bits(val)
}
}
#[repr(u8)]
#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd)]
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
pub enum Wkupt2 {
#[doc = "a high to low level transition for a period defined by WKUPDBC on the corresponding wake-up input forces the wake-up of the core power supply."]
HIGH_TO_LOW = 0x0,
#[doc = "a low to high level transition for a period defined by WKUPDBC on the correspond-ing wake-up input forces the wake-up of the core power supply."]
LOW_TO_HIGH = 0x01,
}
impl Wkupt2 {
#[inline(always)]
pub const fn from_bits(val: u8) -> Wkupt2 {
unsafe { core::mem::transmute(val & 0x01) }
}
#[inline(always)]
pub const fn to_bits(self) -> u8 {
unsafe { core::mem::transmute(self) }
}
}
impl From<u8> for Wkupt2 {
#[inline(always)]
fn from(val: u8) -> Wkupt2 {
Wkupt2::from_bits(val)
}
}
impl From<Wkupt2> for u8 {
#[inline(always)]
fn from(val: Wkupt2) -> u8 {
Wkupt2::to_bits(val)
}
}
#[repr(u8)]
#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd)]
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
pub enum Wkupt3 {
#[doc = "a high to low level transition for a period defined by WKUPDBC on the corresponding wake-up input forces the wake-up of the core power supply."]
HIGH_TO_LOW = 0x0,
#[doc = "a low to high level transition for a period defined by WKUPDBC on the correspond-ing wake-up input forces the wake-up of the core power supply."]
LOW_TO_HIGH = 0x01,
}
impl Wkupt3 {
#[inline(always)]
pub const fn from_bits(val: u8) -> Wkupt3 {
unsafe { core::mem::transmute(val & 0x01) }
}
#[inline(always)]
pub const fn to_bits(self) -> u8 {
unsafe { core::mem::transmute(self) }
}
}
impl From<u8> for Wkupt3 {
#[inline(always)]
fn from(val: u8) -> Wkupt3 {
Wkupt3::from_bits(val)
}
}
impl From<Wkupt3> for u8 {
#[inline(always)]
fn from(val: Wkupt3) -> u8 {
Wkupt3::to_bits(val)
}
}
#[repr(u8)]
#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd)]
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
pub enum Wkupt4 {
#[doc = "a high to low level transition for a period defined by WKUPDBC on the corresponding wake-up input forces the wake-up of the core power supply."]
HIGH_TO_LOW = 0x0,
#[doc = "a low to high level transition for a period defined by WKUPDBC on the correspond-ing wake-up input forces the wake-up of the core power supply."]
LOW_TO_HIGH = 0x01,
}
impl Wkupt4 {
#[inline(always)]
pub const fn from_bits(val: u8) -> Wkupt4 {
unsafe { core::mem::transmute(val & 0x01) }
}
#[inline(always)]
pub const fn to_bits(self) -> u8 {
unsafe { core::mem::transmute(self) }
}
}
impl From<u8> for Wkupt4 {
#[inline(always)]
fn from(val: u8) -> Wkupt4 {
Wkupt4::from_bits(val)
}
}
impl From<Wkupt4> for u8 {
#[inline(always)]
fn from(val: Wkupt4) -> u8 {
Wkupt4::to_bits(val)
}
}
#[repr(u8)]
#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd)]
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
pub enum Wkupt5 {
#[doc = "a high to low level transition for a period defined by WKUPDBC on the corresponding wake-up input forces the wake-up of the core power supply."]
HIGH_TO_LOW = 0x0,
#[doc = "a low to high level transition for a period defined by WKUPDBC on the correspond-ing wake-up input forces the wake-up of the core power supply."]
LOW_TO_HIGH = 0x01,
}
impl Wkupt5 {
#[inline(always)]
pub const fn from_bits(val: u8) -> Wkupt5 {
unsafe { core::mem::transmute(val & 0x01) }
}
#[inline(always)]
pub const fn to_bits(self) -> u8 {
unsafe { core::mem::transmute(self) }
}
}
impl From<u8> for Wkupt5 {
#[inline(always)]
fn from(val: u8) -> Wkupt5 {
Wkupt5::from_bits(val)
}
}
impl From<Wkupt5> for u8 {
#[inline(always)]
fn from(val: Wkupt5) -> u8 {
Wkupt5::to_bits(val)
}
}
#[repr(u8)]
#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd)]
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
pub enum Wkupt6 {
#[doc = "a high to low level transition for a period defined by WKUPDBC on the corresponding wake-up input forces the wake-up of the core power supply."]
HIGH_TO_LOW = 0x0,
#[doc = "a low to high level transition for a period defined by WKUPDBC on the correspond-ing wake-up input forces the wake-up of the core power supply."]
LOW_TO_HIGH = 0x01,
}
impl Wkupt6 {
#[inline(always)]
pub const fn from_bits(val: u8) -> Wkupt6 {
unsafe { core::mem::transmute(val & 0x01) }
}
#[inline(always)]
pub const fn to_bits(self) -> u8 {
unsafe { core::mem::transmute(self) }
}
}
impl From<u8> for Wkupt6 {
#[inline(always)]
fn from(val: u8) -> Wkupt6 {
Wkupt6::from_bits(val)
}
}
impl From<Wkupt6> for u8 {
#[inline(always)]
fn from(val: Wkupt6) -> u8 {
Wkupt6::to_bits(val)
}
}
#[repr(u8)]
#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd)]
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
pub enum Wkupt7 {
#[doc = "a high to low level transition for a period defined by WKUPDBC on the corresponding wake-up input forces the wake-up of the core power supply."]
HIGH_TO_LOW = 0x0,
#[doc = "a low to high level transition for a period defined by WKUPDBC on the correspond-ing wake-up input forces the wake-up of the core power supply."]
LOW_TO_HIGH = 0x01,
}
impl Wkupt7 {
#[inline(always)]
pub const fn from_bits(val: u8) -> Wkupt7 {
unsafe { core::mem::transmute(val & 0x01) }
}
#[inline(always)]
pub const fn to_bits(self) -> u8 {
unsafe { core::mem::transmute(self) }
}
}
impl From<u8> for Wkupt7 {
#[inline(always)]
fn from(val: u8) -> Wkupt7 {
Wkupt7::from_bits(val)
}
}
impl From<Wkupt7> for u8 {
#[inline(always)]
fn from(val: Wkupt7) -> u8 {
Wkupt7::to_bits(val)
}
}
#[repr(u8)]
#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd)]
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
pub enum Wkupt8 {
#[doc = "a high to low level transition for a period defined by WKUPDBC on the corresponding wake-up input forces the wake-up of the core power supply."]
HIGH_TO_LOW = 0x0,
#[doc = "a low to high level transition for a period defined by WKUPDBC on the correspond-ing wake-up input forces the wake-up of the core power supply."]
LOW_TO_HIGH = 0x01,
}
impl Wkupt8 {
#[inline(always)]
pub const fn from_bits(val: u8) -> Wkupt8 {
unsafe { core::mem::transmute(val & 0x01) }
}
#[inline(always)]
pub const fn to_bits(self) -> u8 {
unsafe { core::mem::transmute(self) }
}
}
impl From<u8> for Wkupt8 {
#[inline(always)]
fn from(val: u8) -> Wkupt8 {
Wkupt8::from_bits(val)
}
}
impl From<Wkupt8> for u8 {
#[inline(always)]
fn from(val: Wkupt8) -> u8 {
Wkupt8::to_bits(val)
}
}
#[repr(u8)]
#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd)]
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
pub enum Wkupt9 {
#[doc = "a high to low level transition for a period defined by WKUPDBC on the corresponding wake-up input forces the wake-up of the core power supply."]
HIGH_TO_LOW = 0x0,
#[doc = "a low to high level transition for a period defined by WKUPDBC on the correspond-ing wake-up input forces the wake-up of the core power supply."]
LOW_TO_HIGH = 0x01,
}
impl Wkupt9 {
#[inline(always)]
pub const fn from_bits(val: u8) -> Wkupt9 {
unsafe { core::mem::transmute(val & 0x01) }
}
#[inline(always)]
pub const fn to_bits(self) -> u8 {
unsafe { core::mem::transmute(self) }
}
}
impl From<u8> for Wkupt9 {
#[inline(always)]
fn from(val: u8) -> Wkupt9 {
Wkupt9::from_bits(val)
}
}
impl From<Wkupt9> for u8 {
#[inline(always)]
fn from(val: Wkupt9) -> u8 {
Wkupt9::to_bits(val)
}
}
#[repr(u8)]
#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd)]
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
pub enum Xtalsel {
#[doc = "no effect."]
NO_EFFECT = 0x0,
#[doc = "if KEY is correct, switches the slow clock on the crystal oscillator output."]
CRYSTAL_SEL = 0x01,
}
impl Xtalsel {
#[inline(always)]
pub const fn from_bits(val: u8) -> Xtalsel {
unsafe { core::mem::transmute(val & 0x01) }
}
#[inline(always)]
pub const fn to_bits(self) -> u8 {
unsafe { core::mem::transmute(self) }
}
}
impl From<u8> for Xtalsel {
#[inline(always)]
fn from(val: u8) -> Xtalsel {
Xtalsel::from_bits(val)
}
}
impl From<Xtalsel> for u8 {
#[inline(always)]
fn from(val: Xtalsel) -> u8 {
Xtalsel::to_bits(val)
}
}