pub type R = crate::R<ISRrs>;
pub type W = crate::W<ISRrs>;
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum ALRAWFR {
UpdateNotAllowed = 0,
UpdateAllowed = 1,
}
impl From<ALRAWFR> for bool {
#[inline(always)]
fn from(variant: ALRAWFR) -> Self {
variant as u8 != 0
}
}
pub type ALRWF_R = crate::BitReader<ALRAWFR>;
impl ALRWF_R {
#[inline(always)]
pub const fn variant(&self) -> ALRAWFR {
match self.bits {
false => ALRAWFR::UpdateNotAllowed,
true => ALRAWFR::UpdateAllowed,
}
}
#[inline(always)]
pub fn is_update_not_allowed(&self) -> bool {
*self == ALRAWFR::UpdateNotAllowed
}
#[inline(always)]
pub fn is_update_allowed(&self) -> bool {
*self == ALRAWFR::UpdateAllowed
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum WUTWFR {
UpdateNotAllowed = 0,
UpdateAllowed = 1,
}
impl From<WUTWFR> for bool {
#[inline(always)]
fn from(variant: WUTWFR) -> Self {
variant as u8 != 0
}
}
pub type WUTWF_R = crate::BitReader<WUTWFR>;
impl WUTWF_R {
#[inline(always)]
pub const fn variant(&self) -> WUTWFR {
match self.bits {
false => WUTWFR::UpdateNotAllowed,
true => WUTWFR::UpdateAllowed,
}
}
#[inline(always)]
pub fn is_update_not_allowed(&self) -> bool {
*self == WUTWFR::UpdateNotAllowed
}
#[inline(always)]
pub fn is_update_allowed(&self) -> bool {
*self == WUTWFR::UpdateAllowed
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum SHPFR {
NoShiftPending = 0,
ShiftPending = 1,
}
impl From<SHPFR> for bool {
#[inline(always)]
fn from(variant: SHPFR) -> Self {
variant as u8 != 0
}
}
pub type SHPF_R = crate::BitReader<SHPFR>;
impl SHPF_R {
#[inline(always)]
pub const fn variant(&self) -> SHPFR {
match self.bits {
false => SHPFR::NoShiftPending,
true => SHPFR::ShiftPending,
}
}
#[inline(always)]
pub fn is_no_shift_pending(&self) -> bool {
*self == SHPFR::NoShiftPending
}
#[inline(always)]
pub fn is_shift_pending(&self) -> bool {
*self == SHPFR::ShiftPending
}
}
pub type SHPF_W<'a, REG> = crate::BitWriter<'a, REG, SHPFR>;
impl<'a, REG> SHPF_W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
{
#[inline(always)]
pub fn no_shift_pending(self) -> &'a mut crate::W<REG> {
self.variant(SHPFR::NoShiftPending)
}
#[inline(always)]
pub fn shift_pending(self) -> &'a mut crate::W<REG> {
self.variant(SHPFR::ShiftPending)
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum INITSR {
NotInitalized = 0,
Initalized = 1,
}
impl From<INITSR> for bool {
#[inline(always)]
fn from(variant: INITSR) -> Self {
variant as u8 != 0
}
}
pub type INITS_R = crate::BitReader<INITSR>;
impl INITS_R {
#[inline(always)]
pub const fn variant(&self) -> INITSR {
match self.bits {
false => INITSR::NotInitalized,
true => INITSR::Initalized,
}
}
#[inline(always)]
pub fn is_not_initalized(&self) -> bool {
*self == INITSR::NotInitalized
}
#[inline(always)]
pub fn is_initalized(&self) -> bool {
*self == INITSR::Initalized
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum RSFR {
NotSynced = 0,
Synced = 1,
}
impl From<RSFR> for bool {
#[inline(always)]
fn from(variant: RSFR) -> Self {
variant as u8 != 0
}
}
pub type RSF_R = crate::BitReader<RSFR>;
impl RSF_R {
#[inline(always)]
pub const fn variant(&self) -> RSFR {
match self.bits {
false => RSFR::NotSynced,
true => RSFR::Synced,
}
}
#[inline(always)]
pub fn is_not_synced(&self) -> bool {
*self == RSFR::NotSynced
}
#[inline(always)]
pub fn is_synced(&self) -> bool {
*self == RSFR::Synced
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum RSFW {
Clear = 0,
}
impl From<RSFW> for bool {
#[inline(always)]
fn from(variant: RSFW) -> Self {
variant as u8 != 0
}
}
pub type RSF_W<'a, REG> = crate::BitWriter0C<'a, REG, RSFW>;
impl<'a, REG> RSF_W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
{
#[inline(always)]
pub fn clear(self) -> &'a mut crate::W<REG> {
self.variant(RSFW::Clear)
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum INITFR {
NotAllowed = 0,
Allowed = 1,
}
impl From<INITFR> for bool {
#[inline(always)]
fn from(variant: INITFR) -> Self {
variant as u8 != 0
}
}
pub type INITF_R = crate::BitReader<INITFR>;
impl INITF_R {
#[inline(always)]
pub const fn variant(&self) -> INITFR {
match self.bits {
false => INITFR::NotAllowed,
true => INITFR::Allowed,
}
}
#[inline(always)]
pub fn is_not_allowed(&self) -> bool {
*self == INITFR::NotAllowed
}
#[inline(always)]
pub fn is_allowed(&self) -> bool {
*self == INITFR::Allowed
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum INIT {
FreeRunningMode = 0,
InitMode = 1,
}
impl From<INIT> for bool {
#[inline(always)]
fn from(variant: INIT) -> Self {
variant as u8 != 0
}
}
pub type INIT_R = crate::BitReader<INIT>;
impl INIT_R {
#[inline(always)]
pub const fn variant(&self) -> INIT {
match self.bits {
false => INIT::FreeRunningMode,
true => INIT::InitMode,
}
}
#[inline(always)]
pub fn is_free_running_mode(&self) -> bool {
*self == INIT::FreeRunningMode
}
#[inline(always)]
pub fn is_init_mode(&self) -> bool {
*self == INIT::InitMode
}
}
pub type INIT_W<'a, REG> = crate::BitWriter<'a, REG, INIT>;
impl<'a, REG> INIT_W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
{
#[inline(always)]
pub fn free_running_mode(self) -> &'a mut crate::W<REG> {
self.variant(INIT::FreeRunningMode)
}
#[inline(always)]
pub fn init_mode(self) -> &'a mut crate::W<REG> {
self.variant(INIT::InitMode)
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum ALRAFR {
Match = 1,
}
impl From<ALRAFR> for bool {
#[inline(always)]
fn from(variant: ALRAFR) -> Self {
variant as u8 != 0
}
}
pub type ALRF_R = crate::BitReader<ALRAFR>;
impl ALRF_R {
#[inline(always)]
pub const fn variant(&self) -> Option<ALRAFR> {
match self.bits {
true => Some(ALRAFR::Match),
_ => None,
}
}
#[inline(always)]
pub fn is_match(&self) -> bool {
*self == ALRAFR::Match
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum ALRAFW {
Clear = 0,
}
impl From<ALRAFW> for bool {
#[inline(always)]
fn from(variant: ALRAFW) -> Self {
variant as u8 != 0
}
}
pub type ALRF_W<'a, REG> = crate::BitWriter0C<'a, REG, ALRAFW>;
impl<'a, REG> ALRF_W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
{
#[inline(always)]
pub fn clear(self) -> &'a mut crate::W<REG> {
self.variant(ALRAFW::Clear)
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum WUTFR {
Zero = 1,
}
impl From<WUTFR> for bool {
#[inline(always)]
fn from(variant: WUTFR) -> Self {
variant as u8 != 0
}
}
pub type WUTF_R = crate::BitReader<WUTFR>;
impl WUTF_R {
#[inline(always)]
pub const fn variant(&self) -> Option<WUTFR> {
match self.bits {
true => Some(WUTFR::Zero),
_ => None,
}
}
#[inline(always)]
pub fn is_zero(&self) -> bool {
*self == WUTFR::Zero
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum WUTFW {
Clear = 0,
}
impl From<WUTFW> for bool {
#[inline(always)]
fn from(variant: WUTFW) -> Self {
variant as u8 != 0
}
}
pub type WUTF_W<'a, REG> = crate::BitWriter0C<'a, REG, WUTFW>;
impl<'a, REG> WUTF_W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
{
#[inline(always)]
pub fn clear(self) -> &'a mut crate::W<REG> {
self.variant(WUTFW::Clear)
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum TSFR {
TimestampEvent = 1,
}
impl From<TSFR> for bool {
#[inline(always)]
fn from(variant: TSFR) -> Self {
variant as u8 != 0
}
}
pub type TSF_R = crate::BitReader<TSFR>;
impl TSF_R {
#[inline(always)]
pub const fn variant(&self) -> Option<TSFR> {
match self.bits {
true => Some(TSFR::TimestampEvent),
_ => None,
}
}
#[inline(always)]
pub fn is_timestamp_event(&self) -> bool {
*self == TSFR::TimestampEvent
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum TSFW {
Clear = 0,
}
impl From<TSFW> for bool {
#[inline(always)]
fn from(variant: TSFW) -> Self {
variant as u8 != 0
}
}
pub type TSF_W<'a, REG> = crate::BitWriter0C<'a, REG, TSFW>;
impl<'a, REG> TSF_W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
{
#[inline(always)]
pub fn clear(self) -> &'a mut crate::W<REG> {
self.variant(TSFW::Clear)
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum TSOVFR {
Overflow = 1,
}
impl From<TSOVFR> for bool {
#[inline(always)]
fn from(variant: TSOVFR) -> Self {
variant as u8 != 0
}
}
pub type TSOVF_R = crate::BitReader<TSOVFR>;
impl TSOVF_R {
#[inline(always)]
pub const fn variant(&self) -> Option<TSOVFR> {
match self.bits {
true => Some(TSOVFR::Overflow),
_ => None,
}
}
#[inline(always)]
pub fn is_overflow(&self) -> bool {
*self == TSOVFR::Overflow
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum TSOVFW {
Clear = 0,
}
impl From<TSOVFW> for bool {
#[inline(always)]
fn from(variant: TSOVFW) -> Self {
variant as u8 != 0
}
}
pub type TSOVF_W<'a, REG> = crate::BitWriter0C<'a, REG, TSOVFW>;
impl<'a, REG> TSOVF_W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
{
#[inline(always)]
pub fn clear(self) -> &'a mut crate::W<REG> {
self.variant(TSOVFW::Clear)
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum TAMP1FR {
Tampered = 1,
}
impl From<TAMP1FR> for bool {
#[inline(always)]
fn from(variant: TAMP1FR) -> Self {
variant as u8 != 0
}
}
pub type TAMP1F_R = crate::BitReader<TAMP1FR>;
impl TAMP1F_R {
#[inline(always)]
pub const fn variant(&self) -> Option<TAMP1FR> {
match self.bits {
true => Some(TAMP1FR::Tampered),
_ => None,
}
}
#[inline(always)]
pub fn is_tampered(&self) -> bool {
*self == TAMP1FR::Tampered
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum TAMP1FW {
Clear = 0,
}
impl From<TAMP1FW> for bool {
#[inline(always)]
fn from(variant: TAMP1FW) -> Self {
variant as u8 != 0
}
}
pub type TAMP1F_W<'a, REG> = crate::BitWriter0C<'a, REG, TAMP1FW>;
impl<'a, REG> TAMP1F_W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
{
#[inline(always)]
pub fn clear(self) -> &'a mut crate::W<REG> {
self.variant(TAMP1FW::Clear)
}
}
pub use TAMP1F_R as TAMP2F_R;
pub use TAMP1F_R as TAMP3F_R;
pub use TAMP1F_W as TAMP2F_W;
pub use TAMP1F_W as TAMP3F_W;
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum RECALPFR {
Pending = 1,
}
impl From<RECALPFR> for bool {
#[inline(always)]
fn from(variant: RECALPFR) -> Self {
variant as u8 != 0
}
}
pub type RECALPF_R = crate::BitReader<RECALPFR>;
impl RECALPF_R {
#[inline(always)]
pub const fn variant(&self) -> Option<RECALPFR> {
match self.bits {
true => Some(RECALPFR::Pending),
_ => None,
}
}
#[inline(always)]
pub fn is_pending(&self) -> bool {
*self == RECALPFR::Pending
}
}
impl R {
#[inline(always)]
pub fn alrwf(&self, n: u8) -> ALRWF_R {
#[allow(clippy::no_effect)]
[(); 2][n as usize];
ALRWF_R::new(((self.bits >> n) & 1) != 0)
}
#[inline(always)]
pub fn alrwf_iter(&self) -> impl Iterator<Item = ALRWF_R> + '_ {
(0..2).map(move |n| ALRWF_R::new(((self.bits >> n) & 1) != 0))
}
#[inline(always)]
pub fn alrawf(&self) -> ALRWF_R {
ALRWF_R::new((self.bits & 1) != 0)
}
#[inline(always)]
pub fn alrbwf(&self) -> ALRWF_R {
ALRWF_R::new(((self.bits >> 1) & 1) != 0)
}
#[inline(always)]
pub fn wutwf(&self) -> WUTWF_R {
WUTWF_R::new(((self.bits >> 2) & 1) != 0)
}
#[inline(always)]
pub fn shpf(&self) -> SHPF_R {
SHPF_R::new(((self.bits >> 3) & 1) != 0)
}
#[inline(always)]
pub fn inits(&self) -> INITS_R {
INITS_R::new(((self.bits >> 4) & 1) != 0)
}
#[inline(always)]
pub fn rsf(&self) -> RSF_R {
RSF_R::new(((self.bits >> 5) & 1) != 0)
}
#[inline(always)]
pub fn initf(&self) -> INITF_R {
INITF_R::new(((self.bits >> 6) & 1) != 0)
}
#[inline(always)]
pub fn init(&self) -> INIT_R {
INIT_R::new(((self.bits >> 7) & 1) != 0)
}
#[inline(always)]
pub fn alrf(&self, n: u8) -> ALRF_R {
#[allow(clippy::no_effect)]
[(); 2][n as usize];
ALRF_R::new(((self.bits >> (n + 8)) & 1) != 0)
}
#[inline(always)]
pub fn alrf_iter(&self) -> impl Iterator<Item = ALRF_R> + '_ {
(0..2).map(move |n| ALRF_R::new(((self.bits >> (n + 8)) & 1) != 0))
}
#[inline(always)]
pub fn alraf(&self) -> ALRF_R {
ALRF_R::new(((self.bits >> 8) & 1) != 0)
}
#[inline(always)]
pub fn alrbf(&self) -> ALRF_R {
ALRF_R::new(((self.bits >> 9) & 1) != 0)
}
#[inline(always)]
pub fn wutf(&self) -> WUTF_R {
WUTF_R::new(((self.bits >> 10) & 1) != 0)
}
#[inline(always)]
pub fn tsf(&self) -> TSF_R {
TSF_R::new(((self.bits >> 11) & 1) != 0)
}
#[inline(always)]
pub fn tsovf(&self) -> TSOVF_R {
TSOVF_R::new(((self.bits >> 12) & 1) != 0)
}
#[inline(always)]
pub fn tamp1f(&self) -> TAMP1F_R {
TAMP1F_R::new(((self.bits >> 13) & 1) != 0)
}
#[inline(always)]
pub fn tamp2f(&self) -> TAMP2F_R {
TAMP2F_R::new(((self.bits >> 14) & 1) != 0)
}
#[inline(always)]
pub fn tamp3f(&self) -> TAMP3F_R {
TAMP3F_R::new(((self.bits >> 15) & 1) != 0)
}
#[inline(always)]
pub fn recalpf(&self) -> RECALPF_R {
RECALPF_R::new(((self.bits >> 16) & 1) != 0)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("ISR")
.field("alrawf", &self.alrawf())
.field("alrbwf", &self.alrbwf())
.field("wutwf", &self.wutwf())
.field("shpf", &self.shpf())
.field("inits", &self.inits())
.field("rsf", &self.rsf())
.field("initf", &self.initf())
.field("init", &self.init())
.field("alraf", &self.alraf())
.field("alrbf", &self.alrbf())
.field("wutf", &self.wutf())
.field("tsf", &self.tsf())
.field("tsovf", &self.tsovf())
.field("tamp1f", &self.tamp1f())
.field("tamp2f", &self.tamp2f())
.field("tamp3f", &self.tamp3f())
.field("recalpf", &self.recalpf())
.finish()
}
}
impl W {
#[inline(always)]
pub fn shpf(&mut self) -> SHPF_W<ISRrs> {
SHPF_W::new(self, 3)
}
#[inline(always)]
pub fn rsf(&mut self) -> RSF_W<ISRrs> {
RSF_W::new(self, 5)
}
#[inline(always)]
pub fn init(&mut self) -> INIT_W<ISRrs> {
INIT_W::new(self, 7)
}
#[inline(always)]
pub fn alrf(&mut self, n: u8) -> ALRF_W<ISRrs> {
#[allow(clippy::no_effect)]
[(); 2][n as usize];
ALRF_W::new(self, n + 8)
}
#[inline(always)]
pub fn alraf(&mut self) -> ALRF_W<ISRrs> {
ALRF_W::new(self, 8)
}
#[inline(always)]
pub fn alrbf(&mut self) -> ALRF_W<ISRrs> {
ALRF_W::new(self, 9)
}
#[inline(always)]
pub fn wutf(&mut self) -> WUTF_W<ISRrs> {
WUTF_W::new(self, 10)
}
#[inline(always)]
pub fn tsf(&mut self) -> TSF_W<ISRrs> {
TSF_W::new(self, 11)
}
#[inline(always)]
pub fn tsovf(&mut self) -> TSOVF_W<ISRrs> {
TSOVF_W::new(self, 12)
}
#[inline(always)]
pub fn tamp1f(&mut self) -> TAMP1F_W<ISRrs> {
TAMP1F_W::new(self, 13)
}
#[inline(always)]
pub fn tamp2f(&mut self) -> TAMP2F_W<ISRrs> {
TAMP2F_W::new(self, 14)
}
#[inline(always)]
pub fn tamp3f(&mut self) -> TAMP3F_W<ISRrs> {
TAMP3F_W::new(self, 15)
}
}
pub struct ISRrs;
impl crate::RegisterSpec for ISRrs {
type Ux = u32;
}
impl crate::Readable for ISRrs {}
impl crate::Writable for ISRrs {
type Safety = crate::Unsafe;
const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0xff20;
}
impl crate::Resettable for ISRrs {
const RESET_VALUE: u32 = 0x07;
}