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 S0PRSSEL {
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<S0PRSSEL> for u8 {
#[inline(always)]
fn from(variant: S0PRSSEL) -> Self {
variant as _
}
}
impl crate::FieldSpec for S0PRSSEL {
type Ux = u8;
}
impl crate::IsEnum for S0PRSSEL {}
pub type S0prsselR = crate::FieldReader<S0PRSSEL>;
impl S0prsselR {
#[inline(always)]
pub const fn variant(&self) -> Option<S0PRSSEL> {
match self.bits {
0 => Some(S0PRSSEL::Prsch0),
1 => Some(S0PRSSEL::Prsch1),
2 => Some(S0PRSSEL::Prsch2),
3 => Some(S0PRSSEL::Prsch3),
4 => Some(S0PRSSEL::Prsch4),
5 => Some(S0PRSSEL::Prsch5),
6 => Some(S0PRSSEL::Prsch6),
7 => Some(S0PRSSEL::Prsch7),
8 => Some(S0PRSSEL::Prsch8),
9 => Some(S0PRSSEL::Prsch9),
10 => Some(S0PRSSEL::Prsch10),
11 => Some(S0PRSSEL::Prsch11),
_ => None,
}
}
#[inline(always)]
pub fn is_prsch0(&self) -> bool {
*self == S0PRSSEL::Prsch0
}
#[inline(always)]
pub fn is_prsch1(&self) -> bool {
*self == S0PRSSEL::Prsch1
}
#[inline(always)]
pub fn is_prsch2(&self) -> bool {
*self == S0PRSSEL::Prsch2
}
#[inline(always)]
pub fn is_prsch3(&self) -> bool {
*self == S0PRSSEL::Prsch3
}
#[inline(always)]
pub fn is_prsch4(&self) -> bool {
*self == S0PRSSEL::Prsch4
}
#[inline(always)]
pub fn is_prsch5(&self) -> bool {
*self == S0PRSSEL::Prsch5
}
#[inline(always)]
pub fn is_prsch6(&self) -> bool {
*self == S0PRSSEL::Prsch6
}
#[inline(always)]
pub fn is_prsch7(&self) -> bool {
*self == S0PRSSEL::Prsch7
}
#[inline(always)]
pub fn is_prsch8(&self) -> bool {
*self == S0PRSSEL::Prsch8
}
#[inline(always)]
pub fn is_prsch9(&self) -> bool {
*self == S0PRSSEL::Prsch9
}
#[inline(always)]
pub fn is_prsch10(&self) -> bool {
*self == S0PRSSEL::Prsch10
}
#[inline(always)]
pub fn is_prsch11(&self) -> bool {
*self == S0PRSSEL::Prsch11
}
}
pub type S0prsselW<'a, REG> = crate::FieldWriter<'a, REG, 4, S0PRSSEL>;
impl<'a, REG> S0prsselW<'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(S0PRSSEL::Prsch0)
}
#[inline(always)]
pub fn prsch1(self) -> &'a mut crate::W<REG> {
self.variant(S0PRSSEL::Prsch1)
}
#[inline(always)]
pub fn prsch2(self) -> &'a mut crate::W<REG> {
self.variant(S0PRSSEL::Prsch2)
}
#[inline(always)]
pub fn prsch3(self) -> &'a mut crate::W<REG> {
self.variant(S0PRSSEL::Prsch3)
}
#[inline(always)]
pub fn prsch4(self) -> &'a mut crate::W<REG> {
self.variant(S0PRSSEL::Prsch4)
}
#[inline(always)]
pub fn prsch5(self) -> &'a mut crate::W<REG> {
self.variant(S0PRSSEL::Prsch5)
}
#[inline(always)]
pub fn prsch6(self) -> &'a mut crate::W<REG> {
self.variant(S0PRSSEL::Prsch6)
}
#[inline(always)]
pub fn prsch7(self) -> &'a mut crate::W<REG> {
self.variant(S0PRSSEL::Prsch7)
}
#[inline(always)]
pub fn prsch8(self) -> &'a mut crate::W<REG> {
self.variant(S0PRSSEL::Prsch8)
}
#[inline(always)]
pub fn prsch9(self) -> &'a mut crate::W<REG> {
self.variant(S0PRSSEL::Prsch9)
}
#[inline(always)]
pub fn prsch10(self) -> &'a mut crate::W<REG> {
self.variant(S0PRSSEL::Prsch10)
}
#[inline(always)]
pub fn prsch11(self) -> &'a mut crate::W<REG> {
self.variant(S0PRSSEL::Prsch11)
}
}
pub type S0prsenR = crate::BitReader;
pub type S0prsenW<'a, REG> = crate::BitWriter<'a, REG>;
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
#[repr(u8)]
pub enum S1PRSSEL {
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<S1PRSSEL> for u8 {
#[inline(always)]
fn from(variant: S1PRSSEL) -> Self {
variant as _
}
}
impl crate::FieldSpec for S1PRSSEL {
type Ux = u8;
}
impl crate::IsEnum for S1PRSSEL {}
pub type S1prsselR = crate::FieldReader<S1PRSSEL>;
impl S1prsselR {
#[inline(always)]
pub const fn variant(&self) -> Option<S1PRSSEL> {
match self.bits {
0 => Some(S1PRSSEL::Prsch0),
1 => Some(S1PRSSEL::Prsch1),
2 => Some(S1PRSSEL::Prsch2),
3 => Some(S1PRSSEL::Prsch3),
4 => Some(S1PRSSEL::Prsch4),
5 => Some(S1PRSSEL::Prsch5),
6 => Some(S1PRSSEL::Prsch6),
7 => Some(S1PRSSEL::Prsch7),
8 => Some(S1PRSSEL::Prsch8),
9 => Some(S1PRSSEL::Prsch9),
10 => Some(S1PRSSEL::Prsch10),
11 => Some(S1PRSSEL::Prsch11),
_ => None,
}
}
#[inline(always)]
pub fn is_prsch0(&self) -> bool {
*self == S1PRSSEL::Prsch0
}
#[inline(always)]
pub fn is_prsch1(&self) -> bool {
*self == S1PRSSEL::Prsch1
}
#[inline(always)]
pub fn is_prsch2(&self) -> bool {
*self == S1PRSSEL::Prsch2
}
#[inline(always)]
pub fn is_prsch3(&self) -> bool {
*self == S1PRSSEL::Prsch3
}
#[inline(always)]
pub fn is_prsch4(&self) -> bool {
*self == S1PRSSEL::Prsch4
}
#[inline(always)]
pub fn is_prsch5(&self) -> bool {
*self == S1PRSSEL::Prsch5
}
#[inline(always)]
pub fn is_prsch6(&self) -> bool {
*self == S1PRSSEL::Prsch6
}
#[inline(always)]
pub fn is_prsch7(&self) -> bool {
*self == S1PRSSEL::Prsch7
}
#[inline(always)]
pub fn is_prsch8(&self) -> bool {
*self == S1PRSSEL::Prsch8
}
#[inline(always)]
pub fn is_prsch9(&self) -> bool {
*self == S1PRSSEL::Prsch9
}
#[inline(always)]
pub fn is_prsch10(&self) -> bool {
*self == S1PRSSEL::Prsch10
}
#[inline(always)]
pub fn is_prsch11(&self) -> bool {
*self == S1PRSSEL::Prsch11
}
}
pub type S1prsselW<'a, REG> = crate::FieldWriter<'a, REG, 4, S1PRSSEL>;
impl<'a, REG> S1prsselW<'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(S1PRSSEL::Prsch0)
}
#[inline(always)]
pub fn prsch1(self) -> &'a mut crate::W<REG> {
self.variant(S1PRSSEL::Prsch1)
}
#[inline(always)]
pub fn prsch2(self) -> &'a mut crate::W<REG> {
self.variant(S1PRSSEL::Prsch2)
}
#[inline(always)]
pub fn prsch3(self) -> &'a mut crate::W<REG> {
self.variant(S1PRSSEL::Prsch3)
}
#[inline(always)]
pub fn prsch4(self) -> &'a mut crate::W<REG> {
self.variant(S1PRSSEL::Prsch4)
}
#[inline(always)]
pub fn prsch5(self) -> &'a mut crate::W<REG> {
self.variant(S1PRSSEL::Prsch5)
}
#[inline(always)]
pub fn prsch6(self) -> &'a mut crate::W<REG> {
self.variant(S1PRSSEL::Prsch6)
}
#[inline(always)]
pub fn prsch7(self) -> &'a mut crate::W<REG> {
self.variant(S1PRSSEL::Prsch7)
}
#[inline(always)]
pub fn prsch8(self) -> &'a mut crate::W<REG> {
self.variant(S1PRSSEL::Prsch8)
}
#[inline(always)]
pub fn prsch9(self) -> &'a mut crate::W<REG> {
self.variant(S1PRSSEL::Prsch9)
}
#[inline(always)]
pub fn prsch10(self) -> &'a mut crate::W<REG> {
self.variant(S1PRSSEL::Prsch10)
}
#[inline(always)]
pub fn prsch11(self) -> &'a mut crate::W<REG> {
self.variant(S1PRSSEL::Prsch11)
}
}
pub type S1prsenR = crate::BitReader;
pub type S1prsenW<'a, REG> = crate::BitWriter<'a, REG>;
impl R {
#[inline(always)]
pub fn s0prssel(&self) -> S0prsselR {
S0prsselR::new((self.bits & 0x0f) as u8)
}
#[inline(always)]
pub fn s0prsen(&self) -> S0prsenR {
S0prsenR::new(((self.bits >> 5) & 1) != 0)
}
#[inline(always)]
pub fn s1prssel(&self) -> S1prsselR {
S1prsselR::new(((self.bits >> 6) & 0x0f) as u8)
}
#[inline(always)]
pub fn s1prsen(&self) -> S1prsenR {
S1prsenR::new(((self.bits >> 11) & 1) != 0)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("INPUT")
.field("s0prssel", &self.s0prssel())
.field("s0prsen", &self.s0prsen())
.field("s1prssel", &self.s1prssel())
.field("s1prsen", &self.s1prsen())
.finish()
}
}
impl W {
#[inline(always)]
pub fn s0prssel(&mut self) -> S0prsselW<'_, INPUTrs> {
S0prsselW::new(self, 0)
}
#[inline(always)]
pub fn s0prsen(&mut self) -> S0prsenW<'_, INPUTrs> {
S0prsenW::new(self, 5)
}
#[inline(always)]
pub fn s1prssel(&mut self) -> S1prsselW<'_, INPUTrs> {
S1prsselW::new(self, 6)
}
#[inline(always)]
pub fn s1prsen(&mut self) -> S1prsenW<'_, INPUTrs> {
S1prsenW::new(self, 11)
}
}
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 {}