pub type R = crate::R<CRrs>;
pub type W = crate::W<CRrs>;
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum EN1 {
Disabled = 0,
Enabled = 1,
}
impl From<EN1> for bool {
#[inline(always)]
fn from(variant: EN1) -> Self {
variant as u8 != 0
}
}
pub type EN_R = crate::BitReader<EN1>;
impl EN_R {
#[inline(always)]
pub const fn variant(&self) -> EN1 {
match self.bits {
false => EN1::Disabled,
true => EN1::Enabled,
}
}
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == EN1::Disabled
}
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == EN1::Enabled
}
}
pub type EN_W<'a, REG> = crate::BitWriter<'a, REG, EN1>;
impl<'a, REG> EN_W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
{
#[inline(always)]
pub fn disabled(self) -> &'a mut crate::W<REG> {
self.variant(EN1::Disabled)
}
#[inline(always)]
pub fn enabled(self) -> &'a mut crate::W<REG> {
self.variant(EN1::Enabled)
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum BOFF1 {
Enabled = 0,
Disabled = 1,
}
impl From<BOFF1> for bool {
#[inline(always)]
fn from(variant: BOFF1) -> Self {
variant as u8 != 0
}
}
pub type BOFF_R = crate::BitReader<BOFF1>;
impl BOFF_R {
#[inline(always)]
pub const fn variant(&self) -> BOFF1 {
match self.bits {
false => BOFF1::Enabled,
true => BOFF1::Disabled,
}
}
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == BOFF1::Enabled
}
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == BOFF1::Disabled
}
}
pub type BOFF_W<'a, REG> = crate::BitWriter<'a, REG, BOFF1>;
impl<'a, REG> BOFF_W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
{
#[inline(always)]
pub fn enabled(self) -> &'a mut crate::W<REG> {
self.variant(BOFF1::Enabled)
}
#[inline(always)]
pub fn disabled(self) -> &'a mut crate::W<REG> {
self.variant(BOFF1::Disabled)
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum TEN1 {
Disabled = 0,
Enabled = 1,
}
impl From<TEN1> for bool {
#[inline(always)]
fn from(variant: TEN1) -> Self {
variant as u8 != 0
}
}
pub type TEN_R = crate::BitReader<TEN1>;
impl TEN_R {
#[inline(always)]
pub const fn variant(&self) -> TEN1 {
match self.bits {
false => TEN1::Disabled,
true => TEN1::Enabled,
}
}
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == TEN1::Disabled
}
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == TEN1::Enabled
}
}
pub type TEN_W<'a, REG> = crate::BitWriter<'a, REG, TEN1>;
impl<'a, REG> TEN_W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
{
#[inline(always)]
pub fn disabled(self) -> &'a mut crate::W<REG> {
self.variant(TEN1::Disabled)
}
#[inline(always)]
pub fn enabled(self) -> &'a mut crate::W<REG> {
self.variant(TEN1::Enabled)
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
#[repr(u8)]
pub enum TSEL1 {
Tim6trgo = 0,
Tim7trgo = 2,
Tim9trgo = 3,
Tim2trgo = 4,
Tim4trgo = 5,
Exti9 = 6,
Swtrig = 7,
}
impl From<TSEL1> for u8 {
#[inline(always)]
fn from(variant: TSEL1) -> Self {
variant as _
}
}
impl crate::FieldSpec for TSEL1 {
type Ux = u8;
}
impl crate::IsEnum for TSEL1 {}
pub type TSEL1_R = crate::FieldReader<TSEL1>;
impl TSEL1_R {
#[inline(always)]
pub const fn variant(&self) -> Option<TSEL1> {
match self.bits {
0 => Some(TSEL1::Tim6trgo),
2 => Some(TSEL1::Tim7trgo),
3 => Some(TSEL1::Tim9trgo),
4 => Some(TSEL1::Tim2trgo),
5 => Some(TSEL1::Tim4trgo),
6 => Some(TSEL1::Exti9),
7 => Some(TSEL1::Swtrig),
_ => None,
}
}
#[inline(always)]
pub fn is_tim6trgo(&self) -> bool {
*self == TSEL1::Tim6trgo
}
#[inline(always)]
pub fn is_tim7trgo(&self) -> bool {
*self == TSEL1::Tim7trgo
}
#[inline(always)]
pub fn is_tim9trgo(&self) -> bool {
*self == TSEL1::Tim9trgo
}
#[inline(always)]
pub fn is_tim2trgo(&self) -> bool {
*self == TSEL1::Tim2trgo
}
#[inline(always)]
pub fn is_tim4trgo(&self) -> bool {
*self == TSEL1::Tim4trgo
}
#[inline(always)]
pub fn is_exti9(&self) -> bool {
*self == TSEL1::Exti9
}
#[inline(always)]
pub fn is_swtrig(&self) -> bool {
*self == TSEL1::Swtrig
}
}
pub type TSEL1_W<'a, REG> = crate::FieldWriter<'a, REG, 3, TSEL1>;
impl<'a, REG> TSEL1_W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
REG::Ux: From<u8>,
{
#[inline(always)]
pub fn tim6trgo(self) -> &'a mut crate::W<REG> {
self.variant(TSEL1::Tim6trgo)
}
#[inline(always)]
pub fn tim7trgo(self) -> &'a mut crate::W<REG> {
self.variant(TSEL1::Tim7trgo)
}
#[inline(always)]
pub fn tim9trgo(self) -> &'a mut crate::W<REG> {
self.variant(TSEL1::Tim9trgo)
}
#[inline(always)]
pub fn tim2trgo(self) -> &'a mut crate::W<REG> {
self.variant(TSEL1::Tim2trgo)
}
#[inline(always)]
pub fn tim4trgo(self) -> &'a mut crate::W<REG> {
self.variant(TSEL1::Tim4trgo)
}
#[inline(always)]
pub fn exti9(self) -> &'a mut crate::W<REG> {
self.variant(TSEL1::Exti9)
}
#[inline(always)]
pub fn swtrig(self) -> &'a mut crate::W<REG> {
self.variant(TSEL1::Swtrig)
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
#[repr(u8)]
pub enum WAVE1 {
Disabled = 0,
Noise = 1,
Triangle = 2,
}
impl From<WAVE1> for u8 {
#[inline(always)]
fn from(variant: WAVE1) -> Self {
variant as _
}
}
impl crate::FieldSpec for WAVE1 {
type Ux = u8;
}
impl crate::IsEnum for WAVE1 {}
pub type WAVE_R = crate::FieldReader<WAVE1>;
impl WAVE_R {
#[inline(always)]
pub const fn variant(&self) -> WAVE1 {
match self.bits {
0 => WAVE1::Disabled,
1 => WAVE1::Noise,
_ => WAVE1::Triangle,
}
}
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == WAVE1::Disabled
}
#[inline(always)]
pub fn is_noise(&self) -> bool {
*self == WAVE1::Noise
}
#[inline(always)]
pub fn is_triangle(&self) -> bool {
matches!(self.variant(), WAVE1::Triangle)
}
}
pub type WAVE_W<'a, REG> = crate::FieldWriter<'a, REG, 2, WAVE1, crate::Safe>;
impl<'a, REG> WAVE_W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
REG::Ux: From<u8>,
{
#[inline(always)]
pub fn disabled(self) -> &'a mut crate::W<REG> {
self.variant(WAVE1::Disabled)
}
#[inline(always)]
pub fn noise(self) -> &'a mut crate::W<REG> {
self.variant(WAVE1::Noise)
}
#[inline(always)]
pub fn triangle(self) -> &'a mut crate::W<REG> {
self.variant(WAVE1::Triangle)
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
#[repr(u8)]
pub enum MAMP1 {
Amp1 = 0,
Amp3 = 1,
Amp7 = 2,
Amp15 = 3,
Amp31 = 4,
Amp63 = 5,
Amp127 = 6,
Amp255 = 7,
Amp511 = 8,
Amp1023 = 9,
Amp2047 = 10,
Amp4095 = 11,
}
impl From<MAMP1> for u8 {
#[inline(always)]
fn from(variant: MAMP1) -> Self {
variant as _
}
}
impl crate::FieldSpec for MAMP1 {
type Ux = u8;
}
impl crate::IsEnum for MAMP1 {}
pub type MAMP_R = crate::FieldReader<MAMP1>;
impl MAMP_R {
#[inline(always)]
pub const fn variant(&self) -> MAMP1 {
match self.bits {
0 => MAMP1::Amp1,
1 => MAMP1::Amp3,
2 => MAMP1::Amp7,
3 => MAMP1::Amp15,
4 => MAMP1::Amp31,
5 => MAMP1::Amp63,
6 => MAMP1::Amp127,
7 => MAMP1::Amp255,
8 => MAMP1::Amp511,
9 => MAMP1::Amp1023,
10 => MAMP1::Amp2047,
_ => MAMP1::Amp4095,
}
}
#[inline(always)]
pub fn is_amp1(&self) -> bool {
*self == MAMP1::Amp1
}
#[inline(always)]
pub fn is_amp3(&self) -> bool {
*self == MAMP1::Amp3
}
#[inline(always)]
pub fn is_amp7(&self) -> bool {
*self == MAMP1::Amp7
}
#[inline(always)]
pub fn is_amp15(&self) -> bool {
*self == MAMP1::Amp15
}
#[inline(always)]
pub fn is_amp31(&self) -> bool {
*self == MAMP1::Amp31
}
#[inline(always)]
pub fn is_amp63(&self) -> bool {
*self == MAMP1::Amp63
}
#[inline(always)]
pub fn is_amp127(&self) -> bool {
*self == MAMP1::Amp127
}
#[inline(always)]
pub fn is_amp255(&self) -> bool {
*self == MAMP1::Amp255
}
#[inline(always)]
pub fn is_amp511(&self) -> bool {
*self == MAMP1::Amp511
}
#[inline(always)]
pub fn is_amp1023(&self) -> bool {
*self == MAMP1::Amp1023
}
#[inline(always)]
pub fn is_amp2047(&self) -> bool {
*self == MAMP1::Amp2047
}
#[inline(always)]
pub fn is_amp4095(&self) -> bool {
matches!(self.variant(), MAMP1::Amp4095)
}
}
pub type MAMP_W<'a, REG> = crate::FieldWriter<'a, REG, 4, MAMP1, crate::Safe>;
impl<'a, REG> MAMP_W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
REG::Ux: From<u8>,
{
#[inline(always)]
pub fn amp1(self) -> &'a mut crate::W<REG> {
self.variant(MAMP1::Amp1)
}
#[inline(always)]
pub fn amp3(self) -> &'a mut crate::W<REG> {
self.variant(MAMP1::Amp3)
}
#[inline(always)]
pub fn amp7(self) -> &'a mut crate::W<REG> {
self.variant(MAMP1::Amp7)
}
#[inline(always)]
pub fn amp15(self) -> &'a mut crate::W<REG> {
self.variant(MAMP1::Amp15)
}
#[inline(always)]
pub fn amp31(self) -> &'a mut crate::W<REG> {
self.variant(MAMP1::Amp31)
}
#[inline(always)]
pub fn amp63(self) -> &'a mut crate::W<REG> {
self.variant(MAMP1::Amp63)
}
#[inline(always)]
pub fn amp127(self) -> &'a mut crate::W<REG> {
self.variant(MAMP1::Amp127)
}
#[inline(always)]
pub fn amp255(self) -> &'a mut crate::W<REG> {
self.variant(MAMP1::Amp255)
}
#[inline(always)]
pub fn amp511(self) -> &'a mut crate::W<REG> {
self.variant(MAMP1::Amp511)
}
#[inline(always)]
pub fn amp1023(self) -> &'a mut crate::W<REG> {
self.variant(MAMP1::Amp1023)
}
#[inline(always)]
pub fn amp2047(self) -> &'a mut crate::W<REG> {
self.variant(MAMP1::Amp2047)
}
#[inline(always)]
pub fn amp4095(self) -> &'a mut crate::W<REG> {
self.variant(MAMP1::Amp4095)
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum DMAEN1 {
Disabled = 0,
Enabled = 1,
}
impl From<DMAEN1> for bool {
#[inline(always)]
fn from(variant: DMAEN1) -> Self {
variant as u8 != 0
}
}
pub type DMAEN_R = crate::BitReader<DMAEN1>;
impl DMAEN_R {
#[inline(always)]
pub const fn variant(&self) -> DMAEN1 {
match self.bits {
false => DMAEN1::Disabled,
true => DMAEN1::Enabled,
}
}
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == DMAEN1::Disabled
}
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == DMAEN1::Enabled
}
}
pub type DMAEN_W<'a, REG> = crate::BitWriter<'a, REG, DMAEN1>;
impl<'a, REG> DMAEN_W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
{
#[inline(always)]
pub fn disabled(self) -> &'a mut crate::W<REG> {
self.variant(DMAEN1::Disabled)
}
#[inline(always)]
pub fn enabled(self) -> &'a mut crate::W<REG> {
self.variant(DMAEN1::Enabled)
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum DMAUDRIE1 {
Disabled = 0,
Enabled = 1,
}
impl From<DMAUDRIE1> for bool {
#[inline(always)]
fn from(variant: DMAUDRIE1) -> Self {
variant as u8 != 0
}
}
pub type DMAUDRIE_R = crate::BitReader<DMAUDRIE1>;
impl DMAUDRIE_R {
#[inline(always)]
pub const fn variant(&self) -> DMAUDRIE1 {
match self.bits {
false => DMAUDRIE1::Disabled,
true => DMAUDRIE1::Enabled,
}
}
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == DMAUDRIE1::Disabled
}
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == DMAUDRIE1::Enabled
}
}
pub type DMAUDRIE_W<'a, REG> = crate::BitWriter<'a, REG, DMAUDRIE1>;
impl<'a, REG> DMAUDRIE_W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
{
#[inline(always)]
pub fn disabled(self) -> &'a mut crate::W<REG> {
self.variant(DMAUDRIE1::Disabled)
}
#[inline(always)]
pub fn enabled(self) -> &'a mut crate::W<REG> {
self.variant(DMAUDRIE1::Enabled)
}
}
pub use TSEL1_R as TSEL2_R;
pub use TSEL1_W as TSEL2_W;
impl R {
#[inline(always)]
pub fn en(&self, n: u8) -> EN_R {
#[allow(clippy::no_effect)]
[(); 2][n as usize];
EN_R::new(((self.bits >> (n * 16)) & 1) != 0)
}
#[inline(always)]
pub fn en_iter(&self) -> impl Iterator<Item = EN_R> + '_ {
(0..2).map(move |n| EN_R::new(((self.bits >> (n * 16)) & 1) != 0))
}
#[inline(always)]
pub fn en1(&self) -> EN_R {
EN_R::new((self.bits & 1) != 0)
}
#[inline(always)]
pub fn en2(&self) -> EN_R {
EN_R::new(((self.bits >> 16) & 1) != 0)
}
#[inline(always)]
pub fn boff(&self, n: u8) -> BOFF_R {
#[allow(clippy::no_effect)]
[(); 2][n as usize];
BOFF_R::new(((self.bits >> (n * 16 + 1)) & 1) != 0)
}
#[inline(always)]
pub fn boff_iter(&self) -> impl Iterator<Item = BOFF_R> + '_ {
(0..2).map(move |n| BOFF_R::new(((self.bits >> (n * 16 + 1)) & 1) != 0))
}
#[inline(always)]
pub fn boff1(&self) -> BOFF_R {
BOFF_R::new(((self.bits >> 1) & 1) != 0)
}
#[inline(always)]
pub fn boff2(&self) -> BOFF_R {
BOFF_R::new(((self.bits >> 17) & 1) != 0)
}
#[inline(always)]
pub fn ten(&self, n: u8) -> TEN_R {
#[allow(clippy::no_effect)]
[(); 2][n as usize];
TEN_R::new(((self.bits >> (n * 16 + 2)) & 1) != 0)
}
#[inline(always)]
pub fn ten_iter(&self) -> impl Iterator<Item = TEN_R> + '_ {
(0..2).map(move |n| TEN_R::new(((self.bits >> (n * 16 + 2)) & 1) != 0))
}
#[inline(always)]
pub fn ten1(&self) -> TEN_R {
TEN_R::new(((self.bits >> 2) & 1) != 0)
}
#[inline(always)]
pub fn ten2(&self) -> TEN_R {
TEN_R::new(((self.bits >> 18) & 1) != 0)
}
#[inline(always)]
pub fn tsel1(&self) -> TSEL1_R {
TSEL1_R::new(((self.bits >> 3) & 7) as u8)
}
#[inline(always)]
pub fn wave(&self, n: u8) -> WAVE_R {
#[allow(clippy::no_effect)]
[(); 2][n as usize];
WAVE_R::new(((self.bits >> (n * 16 + 6)) & 3) as u8)
}
#[inline(always)]
pub fn wave_iter(&self) -> impl Iterator<Item = WAVE_R> + '_ {
(0..2).map(move |n| WAVE_R::new(((self.bits >> (n * 16 + 6)) & 3) as u8))
}
#[inline(always)]
pub fn wave1(&self) -> WAVE_R {
WAVE_R::new(((self.bits >> 6) & 3) as u8)
}
#[inline(always)]
pub fn wave2(&self) -> WAVE_R {
WAVE_R::new(((self.bits >> 22) & 3) as u8)
}
#[inline(always)]
pub fn mamp(&self, n: u8) -> MAMP_R {
#[allow(clippy::no_effect)]
[(); 2][n as usize];
MAMP_R::new(((self.bits >> (n * 16 + 8)) & 0x0f) as u8)
}
#[inline(always)]
pub fn mamp_iter(&self) -> impl Iterator<Item = MAMP_R> + '_ {
(0..2).map(move |n| MAMP_R::new(((self.bits >> (n * 16 + 8)) & 0x0f) as u8))
}
#[inline(always)]
pub fn mamp1(&self) -> MAMP_R {
MAMP_R::new(((self.bits >> 8) & 0x0f) as u8)
}
#[inline(always)]
pub fn mamp2(&self) -> MAMP_R {
MAMP_R::new(((self.bits >> 24) & 0x0f) as u8)
}
#[inline(always)]
pub fn dmaen(&self, n: u8) -> DMAEN_R {
#[allow(clippy::no_effect)]
[(); 2][n as usize];
DMAEN_R::new(((self.bits >> (n * 16 + 12)) & 1) != 0)
}
#[inline(always)]
pub fn dmaen_iter(&self) -> impl Iterator<Item = DMAEN_R> + '_ {
(0..2).map(move |n| DMAEN_R::new(((self.bits >> (n * 16 + 12)) & 1) != 0))
}
#[inline(always)]
pub fn dmaen1(&self) -> DMAEN_R {
DMAEN_R::new(((self.bits >> 12) & 1) != 0)
}
#[inline(always)]
pub fn dmaen2(&self) -> DMAEN_R {
DMAEN_R::new(((self.bits >> 28) & 1) != 0)
}
#[inline(always)]
pub fn dmaudrie(&self, n: u8) -> DMAUDRIE_R {
#[allow(clippy::no_effect)]
[(); 2][n as usize];
DMAUDRIE_R::new(((self.bits >> (n * 16 + 13)) & 1) != 0)
}
#[inline(always)]
pub fn dmaudrie_iter(&self) -> impl Iterator<Item = DMAUDRIE_R> + '_ {
(0..2).map(move |n| DMAUDRIE_R::new(((self.bits >> (n * 16 + 13)) & 1) != 0))
}
#[inline(always)]
pub fn dmaudrie1(&self) -> DMAUDRIE_R {
DMAUDRIE_R::new(((self.bits >> 13) & 1) != 0)
}
#[inline(always)]
pub fn dmaudrie2(&self) -> DMAUDRIE_R {
DMAUDRIE_R::new(((self.bits >> 29) & 1) != 0)
}
#[inline(always)]
pub fn tsel2(&self) -> TSEL2_R {
TSEL2_R::new(((self.bits >> 19) & 7) as u8)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("CR")
.field("dmaudrie1", &self.dmaudrie1())
.field("dmaudrie2", &self.dmaudrie2())
.field("dmaen1", &self.dmaen1())
.field("dmaen2", &self.dmaen2())
.field("mamp1", &self.mamp1())
.field("mamp2", &self.mamp2())
.field("wave1", &self.wave1())
.field("wave2", &self.wave2())
.field("tsel1", &self.tsel1())
.field("tsel2", &self.tsel2())
.field("ten1", &self.ten1())
.field("ten2", &self.ten2())
.field("boff1", &self.boff1())
.field("boff2", &self.boff2())
.field("en1", &self.en1())
.field("en2", &self.en2())
.finish()
}
}
impl W {
#[inline(always)]
pub fn en(&mut self, n: u8) -> EN_W<CRrs> {
#[allow(clippy::no_effect)]
[(); 2][n as usize];
EN_W::new(self, n * 16)
}
#[inline(always)]
pub fn en1(&mut self) -> EN_W<CRrs> {
EN_W::new(self, 0)
}
#[inline(always)]
pub fn en2(&mut self) -> EN_W<CRrs> {
EN_W::new(self, 16)
}
#[inline(always)]
pub fn boff(&mut self, n: u8) -> BOFF_W<CRrs> {
#[allow(clippy::no_effect)]
[(); 2][n as usize];
BOFF_W::new(self, n * 16 + 1)
}
#[inline(always)]
pub fn boff1(&mut self) -> BOFF_W<CRrs> {
BOFF_W::new(self, 1)
}
#[inline(always)]
pub fn boff2(&mut self) -> BOFF_W<CRrs> {
BOFF_W::new(self, 17)
}
#[inline(always)]
pub fn ten(&mut self, n: u8) -> TEN_W<CRrs> {
#[allow(clippy::no_effect)]
[(); 2][n as usize];
TEN_W::new(self, n * 16 + 2)
}
#[inline(always)]
pub fn ten1(&mut self) -> TEN_W<CRrs> {
TEN_W::new(self, 2)
}
#[inline(always)]
pub fn ten2(&mut self) -> TEN_W<CRrs> {
TEN_W::new(self, 18)
}
#[inline(always)]
pub fn tsel1(&mut self) -> TSEL1_W<CRrs> {
TSEL1_W::new(self, 3)
}
#[inline(always)]
pub fn wave(&mut self, n: u8) -> WAVE_W<CRrs> {
#[allow(clippy::no_effect)]
[(); 2][n as usize];
WAVE_W::new(self, n * 16 + 6)
}
#[inline(always)]
pub fn wave1(&mut self) -> WAVE_W<CRrs> {
WAVE_W::new(self, 6)
}
#[inline(always)]
pub fn wave2(&mut self) -> WAVE_W<CRrs> {
WAVE_W::new(self, 22)
}
#[inline(always)]
pub fn mamp(&mut self, n: u8) -> MAMP_W<CRrs> {
#[allow(clippy::no_effect)]
[(); 2][n as usize];
MAMP_W::new(self, n * 16 + 8)
}
#[inline(always)]
pub fn mamp1(&mut self) -> MAMP_W<CRrs> {
MAMP_W::new(self, 8)
}
#[inline(always)]
pub fn mamp2(&mut self) -> MAMP_W<CRrs> {
MAMP_W::new(self, 24)
}
#[inline(always)]
pub fn dmaen(&mut self, n: u8) -> DMAEN_W<CRrs> {
#[allow(clippy::no_effect)]
[(); 2][n as usize];
DMAEN_W::new(self, n * 16 + 12)
}
#[inline(always)]
pub fn dmaen1(&mut self) -> DMAEN_W<CRrs> {
DMAEN_W::new(self, 12)
}
#[inline(always)]
pub fn dmaen2(&mut self) -> DMAEN_W<CRrs> {
DMAEN_W::new(self, 28)
}
#[inline(always)]
pub fn dmaudrie(&mut self, n: u8) -> DMAUDRIE_W<CRrs> {
#[allow(clippy::no_effect)]
[(); 2][n as usize];
DMAUDRIE_W::new(self, n * 16 + 13)
}
#[inline(always)]
pub fn dmaudrie1(&mut self) -> DMAUDRIE_W<CRrs> {
DMAUDRIE_W::new(self, 13)
}
#[inline(always)]
pub fn dmaudrie2(&mut self) -> DMAUDRIE_W<CRrs> {
DMAUDRIE_W::new(self, 29)
}
#[inline(always)]
pub fn tsel2(&mut self) -> TSEL2_W<CRrs> {
TSEL2_W::new(self, 19)
}
}
pub struct CRrs;
impl crate::RegisterSpec for CRrs {
type Ux = u32;
}
impl crate::Readable for CRrs {}
impl crate::Writable for CRrs {
type Safety = crate::Unsafe;
}
impl crate::Resettable for CRrs {}