pub type R = crate::R<INPUTrs>;
pub type W = crate::W<INPUTrs>;
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
#[repr(u8)]
pub enum RXPRSSEL {
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<RXPRSSEL> for u8 {
#[inline(always)]
fn from(variant: RXPRSSEL) -> Self {
variant as _
}
}
impl crate::FieldSpec for RXPRSSEL {
type Ux = u8;
}
impl crate::IsEnum for RXPRSSEL {}
pub type RxprsselR = crate::FieldReader<RXPRSSEL>;
impl RxprsselR {
#[inline(always)]
pub const fn variant(&self) -> Option<RXPRSSEL> {
match self.bits {
0 => Some(RXPRSSEL::Prsch0),
1 => Some(RXPRSSEL::Prsch1),
2 => Some(RXPRSSEL::Prsch2),
3 => Some(RXPRSSEL::Prsch3),
4 => Some(RXPRSSEL::Prsch4),
5 => Some(RXPRSSEL::Prsch5),
6 => Some(RXPRSSEL::Prsch6),
7 => Some(RXPRSSEL::Prsch7),
8 => Some(RXPRSSEL::Prsch8),
9 => Some(RXPRSSEL::Prsch9),
10 => Some(RXPRSSEL::Prsch10),
11 => Some(RXPRSSEL::Prsch11),
_ => None,
}
}
#[inline(always)]
pub fn is_prsch0(&self) -> bool {
*self == RXPRSSEL::Prsch0
}
#[inline(always)]
pub fn is_prsch1(&self) -> bool {
*self == RXPRSSEL::Prsch1
}
#[inline(always)]
pub fn is_prsch2(&self) -> bool {
*self == RXPRSSEL::Prsch2
}
#[inline(always)]
pub fn is_prsch3(&self) -> bool {
*self == RXPRSSEL::Prsch3
}
#[inline(always)]
pub fn is_prsch4(&self) -> bool {
*self == RXPRSSEL::Prsch4
}
#[inline(always)]
pub fn is_prsch5(&self) -> bool {
*self == RXPRSSEL::Prsch5
}
#[inline(always)]
pub fn is_prsch6(&self) -> bool {
*self == RXPRSSEL::Prsch6
}
#[inline(always)]
pub fn is_prsch7(&self) -> bool {
*self == RXPRSSEL::Prsch7
}
#[inline(always)]
pub fn is_prsch8(&self) -> bool {
*self == RXPRSSEL::Prsch8
}
#[inline(always)]
pub fn is_prsch9(&self) -> bool {
*self == RXPRSSEL::Prsch9
}
#[inline(always)]
pub fn is_prsch10(&self) -> bool {
*self == RXPRSSEL::Prsch10
}
#[inline(always)]
pub fn is_prsch11(&self) -> bool {
*self == RXPRSSEL::Prsch11
}
}
pub type RxprsselW<'a, REG> = crate::FieldWriter<'a, REG, 4, RXPRSSEL>;
impl<'a, REG> RxprsselW<'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(RXPRSSEL::Prsch0)
}
#[inline(always)]
pub fn prsch1(self) -> &'a mut crate::W<REG> {
self.variant(RXPRSSEL::Prsch1)
}
#[inline(always)]
pub fn prsch2(self) -> &'a mut crate::W<REG> {
self.variant(RXPRSSEL::Prsch2)
}
#[inline(always)]
pub fn prsch3(self) -> &'a mut crate::W<REG> {
self.variant(RXPRSSEL::Prsch3)
}
#[inline(always)]
pub fn prsch4(self) -> &'a mut crate::W<REG> {
self.variant(RXPRSSEL::Prsch4)
}
#[inline(always)]
pub fn prsch5(self) -> &'a mut crate::W<REG> {
self.variant(RXPRSSEL::Prsch5)
}
#[inline(always)]
pub fn prsch6(self) -> &'a mut crate::W<REG> {
self.variant(RXPRSSEL::Prsch6)
}
#[inline(always)]
pub fn prsch7(self) -> &'a mut crate::W<REG> {
self.variant(RXPRSSEL::Prsch7)
}
#[inline(always)]
pub fn prsch8(self) -> &'a mut crate::W<REG> {
self.variant(RXPRSSEL::Prsch8)
}
#[inline(always)]
pub fn prsch9(self) -> &'a mut crate::W<REG> {
self.variant(RXPRSSEL::Prsch9)
}
#[inline(always)]
pub fn prsch10(self) -> &'a mut crate::W<REG> {
self.variant(RXPRSSEL::Prsch10)
}
#[inline(always)]
pub fn prsch11(self) -> &'a mut crate::W<REG> {
self.variant(RXPRSSEL::Prsch11)
}
}
pub type RxprsR = crate::BitReader;
pub type RxprsW<'a, REG> = crate::BitWriter<'a, REG>;
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
#[repr(u8)]
pub enum CLKPRSSEL {
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<CLKPRSSEL> for u8 {
#[inline(always)]
fn from(variant: CLKPRSSEL) -> Self {
variant as _
}
}
impl crate::FieldSpec for CLKPRSSEL {
type Ux = u8;
}
impl crate::IsEnum for CLKPRSSEL {}
pub type ClkprsselR = crate::FieldReader<CLKPRSSEL>;
impl ClkprsselR {
#[inline(always)]
pub const fn variant(&self) -> Option<CLKPRSSEL> {
match self.bits {
0 => Some(CLKPRSSEL::Prsch0),
1 => Some(CLKPRSSEL::Prsch1),
2 => Some(CLKPRSSEL::Prsch2),
3 => Some(CLKPRSSEL::Prsch3),
4 => Some(CLKPRSSEL::Prsch4),
5 => Some(CLKPRSSEL::Prsch5),
6 => Some(CLKPRSSEL::Prsch6),
7 => Some(CLKPRSSEL::Prsch7),
8 => Some(CLKPRSSEL::Prsch8),
9 => Some(CLKPRSSEL::Prsch9),
10 => Some(CLKPRSSEL::Prsch10),
11 => Some(CLKPRSSEL::Prsch11),
_ => None,
}
}
#[inline(always)]
pub fn is_prsch0(&self) -> bool {
*self == CLKPRSSEL::Prsch0
}
#[inline(always)]
pub fn is_prsch1(&self) -> bool {
*self == CLKPRSSEL::Prsch1
}
#[inline(always)]
pub fn is_prsch2(&self) -> bool {
*self == CLKPRSSEL::Prsch2
}
#[inline(always)]
pub fn is_prsch3(&self) -> bool {
*self == CLKPRSSEL::Prsch3
}
#[inline(always)]
pub fn is_prsch4(&self) -> bool {
*self == CLKPRSSEL::Prsch4
}
#[inline(always)]
pub fn is_prsch5(&self) -> bool {
*self == CLKPRSSEL::Prsch5
}
#[inline(always)]
pub fn is_prsch6(&self) -> bool {
*self == CLKPRSSEL::Prsch6
}
#[inline(always)]
pub fn is_prsch7(&self) -> bool {
*self == CLKPRSSEL::Prsch7
}
#[inline(always)]
pub fn is_prsch8(&self) -> bool {
*self == CLKPRSSEL::Prsch8
}
#[inline(always)]
pub fn is_prsch9(&self) -> bool {
*self == CLKPRSSEL::Prsch9
}
#[inline(always)]
pub fn is_prsch10(&self) -> bool {
*self == CLKPRSSEL::Prsch10
}
#[inline(always)]
pub fn is_prsch11(&self) -> bool {
*self == CLKPRSSEL::Prsch11
}
}
pub type ClkprsselW<'a, REG> = crate::FieldWriter<'a, REG, 4, CLKPRSSEL>;
impl<'a, REG> ClkprsselW<'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(CLKPRSSEL::Prsch0)
}
#[inline(always)]
pub fn prsch1(self) -> &'a mut crate::W<REG> {
self.variant(CLKPRSSEL::Prsch1)
}
#[inline(always)]
pub fn prsch2(self) -> &'a mut crate::W<REG> {
self.variant(CLKPRSSEL::Prsch2)
}
#[inline(always)]
pub fn prsch3(self) -> &'a mut crate::W<REG> {
self.variant(CLKPRSSEL::Prsch3)
}
#[inline(always)]
pub fn prsch4(self) -> &'a mut crate::W<REG> {
self.variant(CLKPRSSEL::Prsch4)
}
#[inline(always)]
pub fn prsch5(self) -> &'a mut crate::W<REG> {
self.variant(CLKPRSSEL::Prsch5)
}
#[inline(always)]
pub fn prsch6(self) -> &'a mut crate::W<REG> {
self.variant(CLKPRSSEL::Prsch6)
}
#[inline(always)]
pub fn prsch7(self) -> &'a mut crate::W<REG> {
self.variant(CLKPRSSEL::Prsch7)
}
#[inline(always)]
pub fn prsch8(self) -> &'a mut crate::W<REG> {
self.variant(CLKPRSSEL::Prsch8)
}
#[inline(always)]
pub fn prsch9(self) -> &'a mut crate::W<REG> {
self.variant(CLKPRSSEL::Prsch9)
}
#[inline(always)]
pub fn prsch10(self) -> &'a mut crate::W<REG> {
self.variant(CLKPRSSEL::Prsch10)
}
#[inline(always)]
pub fn prsch11(self) -> &'a mut crate::W<REG> {
self.variant(CLKPRSSEL::Prsch11)
}
}
pub type ClkprsR = crate::BitReader;
pub type ClkprsW<'a, REG> = crate::BitWriter<'a, REG>;
impl R {
#[inline(always)]
pub fn rxprssel(&self) -> RxprsselR {
RxprsselR::new((self.bits & 0x0f) as u8)
}
#[inline(always)]
pub fn rxprs(&self) -> RxprsR {
RxprsR::new(((self.bits >> 7) & 1) != 0)
}
#[inline(always)]
pub fn clkprssel(&self) -> ClkprsselR {
ClkprsselR::new(((self.bits >> 8) & 0x0f) as u8)
}
#[inline(always)]
pub fn clkprs(&self) -> ClkprsR {
ClkprsR::new(((self.bits >> 15) & 1) != 0)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("INPUT")
.field("rxprssel", &self.rxprssel())
.field("rxprs", &self.rxprs())
.field("clkprssel", &self.clkprssel())
.field("clkprs", &self.clkprs())
.finish()
}
}
impl W {
#[inline(always)]
pub fn rxprssel(&mut self) -> RxprsselW<'_, INPUTrs> {
RxprsselW::new(self, 0)
}
#[inline(always)]
pub fn rxprs(&mut self) -> RxprsW<'_, INPUTrs> {
RxprsW::new(self, 7)
}
#[inline(always)]
pub fn clkprssel(&mut self) -> ClkprsselW<'_, INPUTrs> {
ClkprsselW::new(self, 8)
}
#[inline(always)]
pub fn clkprs(&mut self) -> ClkprsW<'_, INPUTrs> {
ClkprsW::new(self, 15)
}
}
pub struct INPUTrs;
impl crate::RegisterSpec for INPUTrs {
type Ux = u32;
}
impl crate::Readable for INPUTrs {}
impl crate::Writable for INPUTrs {
type Safety = crate::Unsafe;
}
impl crate::Resettable for INPUTrs {}