pub type R = crate::R<DTFCrs>;
pub type W = crate::W<DTFCrs>;
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
#[repr(u8)]
pub enum DTPRS0FSEL {
Prsch0 = 0,
Prsch1 = 1,
Prsch2 = 2,
Prsch3 = 3,
Prsch4 = 4,
Prsch5 = 5,
Prsch6 = 6,
Prsch7 = 7,
Prsch8 = 8,
Prsch9 = 9,
Prsch10 = 10,
Prsch11 = 11,
}
impl From<DTPRS0FSEL> for u8 {
#[inline(always)]
fn from(variant: DTPRS0FSEL) -> Self {
variant as _
}
}
impl crate::FieldSpec for DTPRS0FSEL {
type Ux = u8;
}
impl crate::IsEnum for DTPRS0FSEL {}
pub type Dtprs0fselR = crate::FieldReader<DTPRS0FSEL>;
impl Dtprs0fselR {
#[inline(always)]
pub const fn variant(&self) -> Option<DTPRS0FSEL> {
match self.bits {
0 => Some(DTPRS0FSEL::Prsch0),
1 => Some(DTPRS0FSEL::Prsch1),
2 => Some(DTPRS0FSEL::Prsch2),
3 => Some(DTPRS0FSEL::Prsch3),
4 => Some(DTPRS0FSEL::Prsch4),
5 => Some(DTPRS0FSEL::Prsch5),
6 => Some(DTPRS0FSEL::Prsch6),
7 => Some(DTPRS0FSEL::Prsch7),
8 => Some(DTPRS0FSEL::Prsch8),
9 => Some(DTPRS0FSEL::Prsch9),
10 => Some(DTPRS0FSEL::Prsch10),
11 => Some(DTPRS0FSEL::Prsch11),
_ => None,
}
}
#[inline(always)]
pub fn is_prsch0(&self) -> bool {
*self == DTPRS0FSEL::Prsch0
}
#[inline(always)]
pub fn is_prsch1(&self) -> bool {
*self == DTPRS0FSEL::Prsch1
}
#[inline(always)]
pub fn is_prsch2(&self) -> bool {
*self == DTPRS0FSEL::Prsch2
}
#[inline(always)]
pub fn is_prsch3(&self) -> bool {
*self == DTPRS0FSEL::Prsch3
}
#[inline(always)]
pub fn is_prsch4(&self) -> bool {
*self == DTPRS0FSEL::Prsch4
}
#[inline(always)]
pub fn is_prsch5(&self) -> bool {
*self == DTPRS0FSEL::Prsch5
}
#[inline(always)]
pub fn is_prsch6(&self) -> bool {
*self == DTPRS0FSEL::Prsch6
}
#[inline(always)]
pub fn is_prsch7(&self) -> bool {
*self == DTPRS0FSEL::Prsch7
}
#[inline(always)]
pub fn is_prsch8(&self) -> bool {
*self == DTPRS0FSEL::Prsch8
}
#[inline(always)]
pub fn is_prsch9(&self) -> bool {
*self == DTPRS0FSEL::Prsch9
}
#[inline(always)]
pub fn is_prsch10(&self) -> bool {
*self == DTPRS0FSEL::Prsch10
}
#[inline(always)]
pub fn is_prsch11(&self) -> bool {
*self == DTPRS0FSEL::Prsch11
}
}
pub type Dtprs0fselW<'a, REG> = crate::FieldWriter<'a, REG, 4, DTPRS0FSEL>;
impl<'a, REG> Dtprs0fselW<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
REG::Ux: From<u8>,
{
#[inline(always)]
pub fn prsch0(self) -> &'a mut crate::W<REG> {
self.variant(DTPRS0FSEL::Prsch0)
}
#[inline(always)]
pub fn prsch1(self) -> &'a mut crate::W<REG> {
self.variant(DTPRS0FSEL::Prsch1)
}
#[inline(always)]
pub fn prsch2(self) -> &'a mut crate::W<REG> {
self.variant(DTPRS0FSEL::Prsch2)
}
#[inline(always)]
pub fn prsch3(self) -> &'a mut crate::W<REG> {
self.variant(DTPRS0FSEL::Prsch3)
}
#[inline(always)]
pub fn prsch4(self) -> &'a mut crate::W<REG> {
self.variant(DTPRS0FSEL::Prsch4)
}
#[inline(always)]
pub fn prsch5(self) -> &'a mut crate::W<REG> {
self.variant(DTPRS0FSEL::Prsch5)
}
#[inline(always)]
pub fn prsch6(self) -> &'a mut crate::W<REG> {
self.variant(DTPRS0FSEL::Prsch6)
}
#[inline(always)]
pub fn prsch7(self) -> &'a mut crate::W<REG> {
self.variant(DTPRS0FSEL::Prsch7)
}
#[inline(always)]
pub fn prsch8(self) -> &'a mut crate::W<REG> {
self.variant(DTPRS0FSEL::Prsch8)
}
#[inline(always)]
pub fn prsch9(self) -> &'a mut crate::W<REG> {
self.variant(DTPRS0FSEL::Prsch9)
}
#[inline(always)]
pub fn prsch10(self) -> &'a mut crate::W<REG> {
self.variant(DTPRS0FSEL::Prsch10)
}
#[inline(always)]
pub fn prsch11(self) -> &'a mut crate::W<REG> {
self.variant(DTPRS0FSEL::Prsch11)
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
#[repr(u8)]
pub enum DTPRS1FSEL {
Prsch0 = 0,
Prsch1 = 1,
Prsch2 = 2,
Prsch3 = 3,
Prsch4 = 4,
Prsch5 = 5,
Prsch6 = 6,
Prsch7 = 7,
Prsch8 = 8,
Prsch9 = 9,
Prsch10 = 10,
Prsch11 = 11,
}
impl From<DTPRS1FSEL> for u8 {
#[inline(always)]
fn from(variant: DTPRS1FSEL) -> Self {
variant as _
}
}
impl crate::FieldSpec for DTPRS1FSEL {
type Ux = u8;
}
impl crate::IsEnum for DTPRS1FSEL {}
pub type Dtprs1fselR = crate::FieldReader<DTPRS1FSEL>;
impl Dtprs1fselR {
#[inline(always)]
pub const fn variant(&self) -> Option<DTPRS1FSEL> {
match self.bits {
0 => Some(DTPRS1FSEL::Prsch0),
1 => Some(DTPRS1FSEL::Prsch1),
2 => Some(DTPRS1FSEL::Prsch2),
3 => Some(DTPRS1FSEL::Prsch3),
4 => Some(DTPRS1FSEL::Prsch4),
5 => Some(DTPRS1FSEL::Prsch5),
6 => Some(DTPRS1FSEL::Prsch6),
7 => Some(DTPRS1FSEL::Prsch7),
8 => Some(DTPRS1FSEL::Prsch8),
9 => Some(DTPRS1FSEL::Prsch9),
10 => Some(DTPRS1FSEL::Prsch10),
11 => Some(DTPRS1FSEL::Prsch11),
_ => None,
}
}
#[inline(always)]
pub fn is_prsch0(&self) -> bool {
*self == DTPRS1FSEL::Prsch0
}
#[inline(always)]
pub fn is_prsch1(&self) -> bool {
*self == DTPRS1FSEL::Prsch1
}
#[inline(always)]
pub fn is_prsch2(&self) -> bool {
*self == DTPRS1FSEL::Prsch2
}
#[inline(always)]
pub fn is_prsch3(&self) -> bool {
*self == DTPRS1FSEL::Prsch3
}
#[inline(always)]
pub fn is_prsch4(&self) -> bool {
*self == DTPRS1FSEL::Prsch4
}
#[inline(always)]
pub fn is_prsch5(&self) -> bool {
*self == DTPRS1FSEL::Prsch5
}
#[inline(always)]
pub fn is_prsch6(&self) -> bool {
*self == DTPRS1FSEL::Prsch6
}
#[inline(always)]
pub fn is_prsch7(&self) -> bool {
*self == DTPRS1FSEL::Prsch7
}
#[inline(always)]
pub fn is_prsch8(&self) -> bool {
*self == DTPRS1FSEL::Prsch8
}
#[inline(always)]
pub fn is_prsch9(&self) -> bool {
*self == DTPRS1FSEL::Prsch9
}
#[inline(always)]
pub fn is_prsch10(&self) -> bool {
*self == DTPRS1FSEL::Prsch10
}
#[inline(always)]
pub fn is_prsch11(&self) -> bool {
*self == DTPRS1FSEL::Prsch11
}
}
pub type Dtprs1fselW<'a, REG> = crate::FieldWriter<'a, REG, 4, DTPRS1FSEL>;
impl<'a, REG> Dtprs1fselW<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
REG::Ux: From<u8>,
{
#[inline(always)]
pub fn prsch0(self) -> &'a mut crate::W<REG> {
self.variant(DTPRS1FSEL::Prsch0)
}
#[inline(always)]
pub fn prsch1(self) -> &'a mut crate::W<REG> {
self.variant(DTPRS1FSEL::Prsch1)
}
#[inline(always)]
pub fn prsch2(self) -> &'a mut crate::W<REG> {
self.variant(DTPRS1FSEL::Prsch2)
}
#[inline(always)]
pub fn prsch3(self) -> &'a mut crate::W<REG> {
self.variant(DTPRS1FSEL::Prsch3)
}
#[inline(always)]
pub fn prsch4(self) -> &'a mut crate::W<REG> {
self.variant(DTPRS1FSEL::Prsch4)
}
#[inline(always)]
pub fn prsch5(self) -> &'a mut crate::W<REG> {
self.variant(DTPRS1FSEL::Prsch5)
}
#[inline(always)]
pub fn prsch6(self) -> &'a mut crate::W<REG> {
self.variant(DTPRS1FSEL::Prsch6)
}
#[inline(always)]
pub fn prsch7(self) -> &'a mut crate::W<REG> {
self.variant(DTPRS1FSEL::Prsch7)
}
#[inline(always)]
pub fn prsch8(self) -> &'a mut crate::W<REG> {
self.variant(DTPRS1FSEL::Prsch8)
}
#[inline(always)]
pub fn prsch9(self) -> &'a mut crate::W<REG> {
self.variant(DTPRS1FSEL::Prsch9)
}
#[inline(always)]
pub fn prsch10(self) -> &'a mut crate::W<REG> {
self.variant(DTPRS1FSEL::Prsch10)
}
#[inline(always)]
pub fn prsch11(self) -> &'a mut crate::W<REG> {
self.variant(DTPRS1FSEL::Prsch11)
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
#[repr(u8)]
pub enum DTFA {
None = 0,
Inactive = 1,
Clear = 2,
Tristate = 3,
}
impl From<DTFA> for u8 {
#[inline(always)]
fn from(variant: DTFA) -> Self {
variant as _
}
}
impl crate::FieldSpec for DTFA {
type Ux = u8;
}
impl crate::IsEnum for DTFA {}
pub type DtfaR = crate::FieldReader<DTFA>;
impl DtfaR {
#[inline(always)]
pub const fn variant(&self) -> DTFA {
match self.bits {
0 => DTFA::None,
1 => DTFA::Inactive,
2 => DTFA::Clear,
3 => DTFA::Tristate,
_ => unreachable!(),
}
}
#[inline(always)]
pub fn is_none(&self) -> bool {
*self == DTFA::None
}
#[inline(always)]
pub fn is_inactive(&self) -> bool {
*self == DTFA::Inactive
}
#[inline(always)]
pub fn is_clear(&self) -> bool {
*self == DTFA::Clear
}
#[inline(always)]
pub fn is_tristate(&self) -> bool {
*self == DTFA::Tristate
}
}
pub type DtfaW<'a, REG> = crate::FieldWriter<'a, REG, 2, DTFA, crate::Safe>;
impl<'a, REG> DtfaW<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
REG::Ux: From<u8>,
{
#[inline(always)]
pub fn none(self) -> &'a mut crate::W<REG> {
self.variant(DTFA::None)
}
#[inline(always)]
pub fn inactive(self) -> &'a mut crate::W<REG> {
self.variant(DTFA::Inactive)
}
#[inline(always)]
pub fn clear(self) -> &'a mut crate::W<REG> {
self.variant(DTFA::Clear)
}
#[inline(always)]
pub fn tristate(self) -> &'a mut crate::W<REG> {
self.variant(DTFA::Tristate)
}
}
pub type Dtprs0fenR = crate::BitReader;
pub type Dtprs0fenW<'a, REG> = crate::BitWriter<'a, REG>;
pub type Dtprs1fenR = crate::BitReader;
pub type Dtprs1fenW<'a, REG> = crate::BitWriter<'a, REG>;
pub type DtdbgfenR = crate::BitReader;
pub type DtdbgfenW<'a, REG> = crate::BitWriter<'a, REG>;
pub type DtlockupfenR = crate::BitReader;
pub type DtlockupfenW<'a, REG> = crate::BitWriter<'a, REG>;
impl R {
#[inline(always)]
pub fn dtprs0fsel(&self) -> Dtprs0fselR {
Dtprs0fselR::new((self.bits & 0x0f) as u8)
}
#[inline(always)]
pub fn dtprs1fsel(&self) -> Dtprs1fselR {
Dtprs1fselR::new(((self.bits >> 8) & 0x0f) as u8)
}
#[inline(always)]
pub fn dtfa(&self) -> DtfaR {
DtfaR::new(((self.bits >> 16) & 3) as u8)
}
#[inline(always)]
pub fn dtprs0fen(&self) -> Dtprs0fenR {
Dtprs0fenR::new(((self.bits >> 24) & 1) != 0)
}
#[inline(always)]
pub fn dtprs1fen(&self) -> Dtprs1fenR {
Dtprs1fenR::new(((self.bits >> 25) & 1) != 0)
}
#[inline(always)]
pub fn dtdbgfen(&self) -> DtdbgfenR {
DtdbgfenR::new(((self.bits >> 26) & 1) != 0)
}
#[inline(always)]
pub fn dtlockupfen(&self) -> DtlockupfenR {
DtlockupfenR::new(((self.bits >> 27) & 1) != 0)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("DTFC")
.field("dtprs0fsel", &self.dtprs0fsel())
.field("dtprs1fsel", &self.dtprs1fsel())
.field("dtfa", &self.dtfa())
.field("dtprs0fen", &self.dtprs0fen())
.field("dtprs1fen", &self.dtprs1fen())
.field("dtdbgfen", &self.dtdbgfen())
.field("dtlockupfen", &self.dtlockupfen())
.finish()
}
}
impl W {
#[inline(always)]
pub fn dtprs0fsel(&mut self) -> Dtprs0fselW<'_, DTFCrs> {
Dtprs0fselW::new(self, 0)
}
#[inline(always)]
pub fn dtprs1fsel(&mut self) -> Dtprs1fselW<'_, DTFCrs> {
Dtprs1fselW::new(self, 8)
}
#[inline(always)]
pub fn dtfa(&mut self) -> DtfaW<'_, DTFCrs> {
DtfaW::new(self, 16)
}
#[inline(always)]
pub fn dtprs0fen(&mut self) -> Dtprs0fenW<'_, DTFCrs> {
Dtprs0fenW::new(self, 24)
}
#[inline(always)]
pub fn dtprs1fen(&mut self) -> Dtprs1fenW<'_, DTFCrs> {
Dtprs1fenW::new(self, 25)
}
#[inline(always)]
pub fn dtdbgfen(&mut self) -> DtdbgfenW<'_, DTFCrs> {
DtdbgfenW::new(self, 26)
}
#[inline(always)]
pub fn dtlockupfen(&mut self) -> DtlockupfenW<'_, DTFCrs> {
DtlockupfenW::new(self, 27)
}
}
pub struct DTFCrs;
impl crate::RegisterSpec for DTFCrs {
type Ux = u32;
}
impl crate::Readable for DTFCrs {}
impl crate::Writable for DTFCrs {
type Safety = crate::Unsafe;
}
impl crate::Resettable for DTFCrs {}