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