pub type R = crate::R<SRrs>;
pub type W = crate::W<SRrs>;
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum UIFR {
NoUpdateOccurred = 0,
UpdatePending = 1,
}
impl From<UIFR> for bool {
#[inline(always)]
fn from(variant: UIFR) -> Self {
variant as u8 != 0
}
}
pub type UIF_R = crate::BitReader<UIFR>;
impl UIF_R {
#[inline(always)]
pub const fn variant(&self) -> UIFR {
match self.bits {
false => UIFR::NoUpdateOccurred,
true => UIFR::UpdatePending,
}
}
#[inline(always)]
pub fn is_no_update_occurred(&self) -> bool {
*self == UIFR::NoUpdateOccurred
}
#[inline(always)]
pub fn is_update_pending(&self) -> bool {
*self == UIFR::UpdatePending
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum UIFW {
Clear = 0,
}
impl From<UIFW> for bool {
#[inline(always)]
fn from(variant: UIFW) -> Self {
variant as u8 != 0
}
}
pub type UIF_W<'a, REG> = crate::BitWriter0C<'a, REG, UIFW>;
impl<'a, REG> UIF_W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
{
#[inline(always)]
pub fn clear(self) -> &'a mut crate::W<REG> {
self.variant(UIFW::Clear)
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum CC1IFR {
NoMatch = 0,
Match = 1,
}
impl From<CC1IFR> for bool {
#[inline(always)]
fn from(variant: CC1IFR) -> Self {
variant as u8 != 0
}
}
pub type CCIF_R = crate::BitReader<CC1IFR>;
impl CCIF_R {
#[inline(always)]
pub const fn variant(&self) -> CC1IFR {
match self.bits {
false => CC1IFR::NoMatch,
true => CC1IFR::Match,
}
}
#[inline(always)]
pub fn is_no_match(&self) -> bool {
*self == CC1IFR::NoMatch
}
#[inline(always)]
pub fn is_match(&self) -> bool {
*self == CC1IFR::Match
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum CC1IFW {
Clear = 0,
}
impl From<CC1IFW> for bool {
#[inline(always)]
fn from(variant: CC1IFW) -> Self {
variant as u8 != 0
}
}
pub type CCIF_W<'a, REG> = crate::BitWriter0C<'a, REG, CC1IFW>;
impl<'a, REG> CCIF_W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
{
#[inline(always)]
pub fn clear(self) -> &'a mut crate::W<REG> {
self.variant(CC1IFW::Clear)
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum COMIFR {
NoCom = 0,
Com = 1,
}
impl From<COMIFR> for bool {
#[inline(always)]
fn from(variant: COMIFR) -> Self {
variant as u8 != 0
}
}
pub type COMIF_R = crate::BitReader<COMIFR>;
impl COMIF_R {
#[inline(always)]
pub const fn variant(&self) -> COMIFR {
match self.bits {
false => COMIFR::NoCom,
true => COMIFR::Com,
}
}
#[inline(always)]
pub fn is_no_com(&self) -> bool {
*self == COMIFR::NoCom
}
#[inline(always)]
pub fn is_com(&self) -> bool {
*self == COMIFR::Com
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum COMIFW {
Clear = 0,
}
impl From<COMIFW> for bool {
#[inline(always)]
fn from(variant: COMIFW) -> Self {
variant as u8 != 0
}
}
pub type COMIF_W<'a, REG> = crate::BitWriter0C<'a, REG, COMIFW>;
impl<'a, REG> COMIF_W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
{
#[inline(always)]
pub fn clear(self) -> &'a mut crate::W<REG> {
self.variant(COMIFW::Clear)
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum TIFR {
NoTrigger = 0,
Trigger = 1,
}
impl From<TIFR> for bool {
#[inline(always)]
fn from(variant: TIFR) -> Self {
variant as u8 != 0
}
}
pub type TIF_R = crate::BitReader<TIFR>;
impl TIF_R {
#[inline(always)]
pub const fn variant(&self) -> TIFR {
match self.bits {
false => TIFR::NoTrigger,
true => TIFR::Trigger,
}
}
#[inline(always)]
pub fn is_no_trigger(&self) -> bool {
*self == TIFR::NoTrigger
}
#[inline(always)]
pub fn is_trigger(&self) -> bool {
*self == TIFR::Trigger
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum TIFW {
Clear = 0,
}
impl From<TIFW> for bool {
#[inline(always)]
fn from(variant: TIFW) -> Self {
variant as u8 != 0
}
}
pub type TIF_W<'a, REG> = crate::BitWriter0C<'a, REG, TIFW>;
impl<'a, REG> TIF_W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
{
#[inline(always)]
pub fn clear(self) -> &'a mut crate::W<REG> {
self.variant(TIFW::Clear)
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum BIFR {
NoTrigger = 0,
Trigger = 1,
}
impl From<BIFR> for bool {
#[inline(always)]
fn from(variant: BIFR) -> Self {
variant as u8 != 0
}
}
pub type BIF_R = crate::BitReader<BIFR>;
impl BIF_R {
#[inline(always)]
pub const fn variant(&self) -> BIFR {
match self.bits {
false => BIFR::NoTrigger,
true => BIFR::Trigger,
}
}
#[inline(always)]
pub fn is_no_trigger(&self) -> bool {
*self == BIFR::NoTrigger
}
#[inline(always)]
pub fn is_trigger(&self) -> bool {
*self == BIFR::Trigger
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum BIFW {
Clear = 0,
}
impl From<BIFW> for bool {
#[inline(always)]
fn from(variant: BIFW) -> Self {
variant as u8 != 0
}
}
pub type BIF_W<'a, REG> = crate::BitWriter0C<'a, REG, BIFW>;
impl<'a, REG> BIF_W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
{
#[inline(always)]
pub fn clear(self) -> &'a mut crate::W<REG> {
self.variant(BIFW::Clear)
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum B2IFR {
NoTrigger = 0,
Trigger = 1,
}
impl From<B2IFR> for bool {
#[inline(always)]
fn from(variant: B2IFR) -> Self {
variant as u8 != 0
}
}
pub type B2IF_R = crate::BitReader<B2IFR>;
impl B2IF_R {
#[inline(always)]
pub const fn variant(&self) -> B2IFR {
match self.bits {
false => B2IFR::NoTrigger,
true => B2IFR::Trigger,
}
}
#[inline(always)]
pub fn is_no_trigger(&self) -> bool {
*self == B2IFR::NoTrigger
}
#[inline(always)]
pub fn is_trigger(&self) -> bool {
*self == B2IFR::Trigger
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum B2IFW {
Clear = 0,
}
impl From<B2IFW> for bool {
#[inline(always)]
fn from(variant: B2IFW) -> Self {
variant as u8 != 0
}
}
pub type B2IF_W<'a, REG> = crate::BitWriter0C<'a, REG, B2IFW>;
impl<'a, REG> B2IF_W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
{
#[inline(always)]
pub fn clear(self) -> &'a mut crate::W<REG> {
self.variant(B2IFW::Clear)
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum CC1OFR {
NoOvercapture = 0,
Overcapture = 1,
}
impl From<CC1OFR> for bool {
#[inline(always)]
fn from(variant: CC1OFR) -> Self {
variant as u8 != 0
}
}
pub type CCOF_R = crate::BitReader<CC1OFR>;
impl CCOF_R {
#[inline(always)]
pub const fn variant(&self) -> CC1OFR {
match self.bits {
false => CC1OFR::NoOvercapture,
true => CC1OFR::Overcapture,
}
}
#[inline(always)]
pub fn is_no_overcapture(&self) -> bool {
*self == CC1OFR::NoOvercapture
}
#[inline(always)]
pub fn is_overcapture(&self) -> bool {
*self == CC1OFR::Overcapture
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum CC1OFW {
Clear = 0,
}
impl From<CC1OFW> for bool {
#[inline(always)]
fn from(variant: CC1OFW) -> Self {
variant as u8 != 0
}
}
pub type CCOF_W<'a, REG> = crate::BitWriter0C<'a, REG, CC1OFW>;
impl<'a, REG> CCOF_W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
{
#[inline(always)]
pub fn clear(self) -> &'a mut crate::W<REG> {
self.variant(CC1OFW::Clear)
}
}
pub type C5IF_R = crate::BitReader;
pub type C5IF_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type C6IF_R = crate::BitReader;
pub type C6IF_W<'a, REG> = crate::BitWriter<'a, REG>;
impl R {
#[inline(always)]
pub fn uif(&self) -> UIF_R {
UIF_R::new((self.bits & 1) != 0)
}
#[inline(always)]
pub fn ccif(&self, n: u8) -> CCIF_R {
#[allow(clippy::no_effect)]
[(); 4][n as usize];
CCIF_R::new(((self.bits >> (n + 1)) & 1) != 0)
}
#[inline(always)]
pub fn ccif_iter(&self) -> impl Iterator<Item = CCIF_R> + '_ {
(0..4).map(move |n| CCIF_R::new(((self.bits >> (n + 1)) & 1) != 0))
}
#[inline(always)]
pub fn cc1if(&self) -> CCIF_R {
CCIF_R::new(((self.bits >> 1) & 1) != 0)
}
#[inline(always)]
pub fn cc2if(&self) -> CCIF_R {
CCIF_R::new(((self.bits >> 2) & 1) != 0)
}
#[inline(always)]
pub fn cc3if(&self) -> CCIF_R {
CCIF_R::new(((self.bits >> 3) & 1) != 0)
}
#[inline(always)]
pub fn cc4if(&self) -> CCIF_R {
CCIF_R::new(((self.bits >> 4) & 1) != 0)
}
#[inline(always)]
pub fn comif(&self) -> COMIF_R {
COMIF_R::new(((self.bits >> 5) & 1) != 0)
}
#[inline(always)]
pub fn tif(&self) -> TIF_R {
TIF_R::new(((self.bits >> 6) & 1) != 0)
}
#[inline(always)]
pub fn bif(&self) -> BIF_R {
BIF_R::new(((self.bits >> 7) & 1) != 0)
}
#[inline(always)]
pub fn b2if(&self) -> B2IF_R {
B2IF_R::new(((self.bits >> 8) & 1) != 0)
}
#[inline(always)]
pub fn ccof(&self, n: u8) -> CCOF_R {
#[allow(clippy::no_effect)]
[(); 4][n as usize];
CCOF_R::new(((self.bits >> (n + 9)) & 1) != 0)
}
#[inline(always)]
pub fn ccof_iter(&self) -> impl Iterator<Item = CCOF_R> + '_ {
(0..4).map(move |n| CCOF_R::new(((self.bits >> (n + 9)) & 1) != 0))
}
#[inline(always)]
pub fn cc1of(&self) -> CCOF_R {
CCOF_R::new(((self.bits >> 9) & 1) != 0)
}
#[inline(always)]
pub fn cc2of(&self) -> CCOF_R {
CCOF_R::new(((self.bits >> 10) & 1) != 0)
}
#[inline(always)]
pub fn cc3of(&self) -> CCOF_R {
CCOF_R::new(((self.bits >> 11) & 1) != 0)
}
#[inline(always)]
pub fn cc4of(&self) -> CCOF_R {
CCOF_R::new(((self.bits >> 12) & 1) != 0)
}
#[inline(always)]
pub fn c5if(&self) -> C5IF_R {
C5IF_R::new(((self.bits >> 16) & 1) != 0)
}
#[inline(always)]
pub fn c6if(&self) -> C6IF_R {
C6IF_R::new(((self.bits >> 17) & 1) != 0)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("SR")
.field("uif", &self.uif())
.field("cc1if", &self.cc1if())
.field("cc2if", &self.cc2if())
.field("cc3if", &self.cc3if())
.field("cc4if", &self.cc4if())
.field("comif", &self.comif())
.field("tif", &self.tif())
.field("bif", &self.bif())
.field("b2if", &self.b2if())
.field("cc1of", &self.cc1of())
.field("cc2of", &self.cc2of())
.field("cc3of", &self.cc3of())
.field("cc4of", &self.cc4of())
.field("c5if", &self.c5if())
.field("c6if", &self.c6if())
.finish()
}
}
impl W {
#[inline(always)]
pub fn uif(&mut self) -> UIF_W<SRrs> {
UIF_W::new(self, 0)
}
#[inline(always)]
pub fn ccif(&mut self, n: u8) -> CCIF_W<SRrs> {
#[allow(clippy::no_effect)]
[(); 4][n as usize];
CCIF_W::new(self, n + 1)
}
#[inline(always)]
pub fn cc1if(&mut self) -> CCIF_W<SRrs> {
CCIF_W::new(self, 1)
}
#[inline(always)]
pub fn cc2if(&mut self) -> CCIF_W<SRrs> {
CCIF_W::new(self, 2)
}
#[inline(always)]
pub fn cc3if(&mut self) -> CCIF_W<SRrs> {
CCIF_W::new(self, 3)
}
#[inline(always)]
pub fn cc4if(&mut self) -> CCIF_W<SRrs> {
CCIF_W::new(self, 4)
}
#[inline(always)]
pub fn comif(&mut self) -> COMIF_W<SRrs> {
COMIF_W::new(self, 5)
}
#[inline(always)]
pub fn tif(&mut self) -> TIF_W<SRrs> {
TIF_W::new(self, 6)
}
#[inline(always)]
pub fn bif(&mut self) -> BIF_W<SRrs> {
BIF_W::new(self, 7)
}
#[inline(always)]
pub fn b2if(&mut self) -> B2IF_W<SRrs> {
B2IF_W::new(self, 8)
}
#[inline(always)]
pub fn ccof(&mut self, n: u8) -> CCOF_W<SRrs> {
#[allow(clippy::no_effect)]
[(); 4][n as usize];
CCOF_W::new(self, n + 9)
}
#[inline(always)]
pub fn cc1of(&mut self) -> CCOF_W<SRrs> {
CCOF_W::new(self, 9)
}
#[inline(always)]
pub fn cc2of(&mut self) -> CCOF_W<SRrs> {
CCOF_W::new(self, 10)
}
#[inline(always)]
pub fn cc3of(&mut self) -> CCOF_W<SRrs> {
CCOF_W::new(self, 11)
}
#[inline(always)]
pub fn cc4of(&mut self) -> CCOF_W<SRrs> {
CCOF_W::new(self, 12)
}
#[inline(always)]
pub fn c5if(&mut self) -> C5IF_W<SRrs> {
C5IF_W::new(self, 16)
}
#[inline(always)]
pub fn c6if(&mut self) -> C6IF_W<SRrs> {
C6IF_W::new(self, 17)
}
}
pub struct SRrs;
impl crate::RegisterSpec for SRrs {
type Ux = u32;
}
impl crate::Readable for SRrs {}
impl crate::Writable for SRrs {
type Safety = crate::Unsafe;
const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0x1fff;
}
impl crate::Resettable for SRrs {}