pub type R = crate::R<DCKCFGR1rs>;
pub type W = crate::W<DCKCFGR1rs>;
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
#[repr(u8)]
pub enum PLLI2SDIVQ {
Div1 = 0,
Div2 = 1,
Div3 = 2,
Div4 = 3,
Div5 = 4,
Div6 = 5,
Div7 = 6,
Div8 = 7,
Div9 = 8,
Div10 = 9,
Div11 = 10,
Div12 = 11,
Div13 = 12,
Div14 = 13,
Div15 = 14,
Div16 = 15,
Div17 = 16,
Div18 = 17,
Div19 = 18,
Div20 = 19,
Div21 = 20,
Div22 = 21,
Div23 = 22,
Div24 = 23,
Div25 = 24,
Div26 = 25,
Div27 = 26,
Div28 = 27,
Div29 = 28,
Div30 = 29,
Div31 = 30,
Div32 = 31,
}
impl From<PLLI2SDIVQ> for u8 {
#[inline(always)]
fn from(variant: PLLI2SDIVQ) -> Self {
variant as _
}
}
impl crate::FieldSpec for PLLI2SDIVQ {
type Ux = u8;
}
impl crate::IsEnum for PLLI2SDIVQ {}
pub type PLLI2SDIVQ_R = crate::FieldReader<PLLI2SDIVQ>;
impl PLLI2SDIVQ_R {
#[inline(always)]
pub const fn variant(&self) -> PLLI2SDIVQ {
match self.bits {
0 => PLLI2SDIVQ::Div1,
1 => PLLI2SDIVQ::Div2,
2 => PLLI2SDIVQ::Div3,
3 => PLLI2SDIVQ::Div4,
4 => PLLI2SDIVQ::Div5,
5 => PLLI2SDIVQ::Div6,
6 => PLLI2SDIVQ::Div7,
7 => PLLI2SDIVQ::Div8,
8 => PLLI2SDIVQ::Div9,
9 => PLLI2SDIVQ::Div10,
10 => PLLI2SDIVQ::Div11,
11 => PLLI2SDIVQ::Div12,
12 => PLLI2SDIVQ::Div13,
13 => PLLI2SDIVQ::Div14,
14 => PLLI2SDIVQ::Div15,
15 => PLLI2SDIVQ::Div16,
16 => PLLI2SDIVQ::Div17,
17 => PLLI2SDIVQ::Div18,
18 => PLLI2SDIVQ::Div19,
19 => PLLI2SDIVQ::Div20,
20 => PLLI2SDIVQ::Div21,
21 => PLLI2SDIVQ::Div22,
22 => PLLI2SDIVQ::Div23,
23 => PLLI2SDIVQ::Div24,
24 => PLLI2SDIVQ::Div25,
25 => PLLI2SDIVQ::Div26,
26 => PLLI2SDIVQ::Div27,
27 => PLLI2SDIVQ::Div28,
28 => PLLI2SDIVQ::Div29,
29 => PLLI2SDIVQ::Div30,
30 => PLLI2SDIVQ::Div31,
31 => PLLI2SDIVQ::Div32,
_ => unreachable!(),
}
}
#[inline(always)]
pub fn is_div1(&self) -> bool {
*self == PLLI2SDIVQ::Div1
}
#[inline(always)]
pub fn is_div2(&self) -> bool {
*self == PLLI2SDIVQ::Div2
}
#[inline(always)]
pub fn is_div3(&self) -> bool {
*self == PLLI2SDIVQ::Div3
}
#[inline(always)]
pub fn is_div4(&self) -> bool {
*self == PLLI2SDIVQ::Div4
}
#[inline(always)]
pub fn is_div5(&self) -> bool {
*self == PLLI2SDIVQ::Div5
}
#[inline(always)]
pub fn is_div6(&self) -> bool {
*self == PLLI2SDIVQ::Div6
}
#[inline(always)]
pub fn is_div7(&self) -> bool {
*self == PLLI2SDIVQ::Div7
}
#[inline(always)]
pub fn is_div8(&self) -> bool {
*self == PLLI2SDIVQ::Div8
}
#[inline(always)]
pub fn is_div9(&self) -> bool {
*self == PLLI2SDIVQ::Div9
}
#[inline(always)]
pub fn is_div10(&self) -> bool {
*self == PLLI2SDIVQ::Div10
}
#[inline(always)]
pub fn is_div11(&self) -> bool {
*self == PLLI2SDIVQ::Div11
}
#[inline(always)]
pub fn is_div12(&self) -> bool {
*self == PLLI2SDIVQ::Div12
}
#[inline(always)]
pub fn is_div13(&self) -> bool {
*self == PLLI2SDIVQ::Div13
}
#[inline(always)]
pub fn is_div14(&self) -> bool {
*self == PLLI2SDIVQ::Div14
}
#[inline(always)]
pub fn is_div15(&self) -> bool {
*self == PLLI2SDIVQ::Div15
}
#[inline(always)]
pub fn is_div16(&self) -> bool {
*self == PLLI2SDIVQ::Div16
}
#[inline(always)]
pub fn is_div17(&self) -> bool {
*self == PLLI2SDIVQ::Div17
}
#[inline(always)]
pub fn is_div18(&self) -> bool {
*self == PLLI2SDIVQ::Div18
}
#[inline(always)]
pub fn is_div19(&self) -> bool {
*self == PLLI2SDIVQ::Div19
}
#[inline(always)]
pub fn is_div20(&self) -> bool {
*self == PLLI2SDIVQ::Div20
}
#[inline(always)]
pub fn is_div21(&self) -> bool {
*self == PLLI2SDIVQ::Div21
}
#[inline(always)]
pub fn is_div22(&self) -> bool {
*self == PLLI2SDIVQ::Div22
}
#[inline(always)]
pub fn is_div23(&self) -> bool {
*self == PLLI2SDIVQ::Div23
}
#[inline(always)]
pub fn is_div24(&self) -> bool {
*self == PLLI2SDIVQ::Div24
}
#[inline(always)]
pub fn is_div25(&self) -> bool {
*self == PLLI2SDIVQ::Div25
}
#[inline(always)]
pub fn is_div26(&self) -> bool {
*self == PLLI2SDIVQ::Div26
}
#[inline(always)]
pub fn is_div27(&self) -> bool {
*self == PLLI2SDIVQ::Div27
}
#[inline(always)]
pub fn is_div28(&self) -> bool {
*self == PLLI2SDIVQ::Div28
}
#[inline(always)]
pub fn is_div29(&self) -> bool {
*self == PLLI2SDIVQ::Div29
}
#[inline(always)]
pub fn is_div30(&self) -> bool {
*self == PLLI2SDIVQ::Div30
}
#[inline(always)]
pub fn is_div31(&self) -> bool {
*self == PLLI2SDIVQ::Div31
}
#[inline(always)]
pub fn is_div32(&self) -> bool {
*self == PLLI2SDIVQ::Div32
}
}
pub type PLLI2SDIVQ_W<'a, REG> = crate::FieldWriter<'a, REG, 5, PLLI2SDIVQ, crate::Safe>;
impl<'a, REG> PLLI2SDIVQ_W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
REG::Ux: From<u8>,
{
#[inline(always)]
pub fn div1(self) -> &'a mut crate::W<REG> {
self.variant(PLLI2SDIVQ::Div1)
}
#[inline(always)]
pub fn div2(self) -> &'a mut crate::W<REG> {
self.variant(PLLI2SDIVQ::Div2)
}
#[inline(always)]
pub fn div3(self) -> &'a mut crate::W<REG> {
self.variant(PLLI2SDIVQ::Div3)
}
#[inline(always)]
pub fn div4(self) -> &'a mut crate::W<REG> {
self.variant(PLLI2SDIVQ::Div4)
}
#[inline(always)]
pub fn div5(self) -> &'a mut crate::W<REG> {
self.variant(PLLI2SDIVQ::Div5)
}
#[inline(always)]
pub fn div6(self) -> &'a mut crate::W<REG> {
self.variant(PLLI2SDIVQ::Div6)
}
#[inline(always)]
pub fn div7(self) -> &'a mut crate::W<REG> {
self.variant(PLLI2SDIVQ::Div7)
}
#[inline(always)]
pub fn div8(self) -> &'a mut crate::W<REG> {
self.variant(PLLI2SDIVQ::Div8)
}
#[inline(always)]
pub fn div9(self) -> &'a mut crate::W<REG> {
self.variant(PLLI2SDIVQ::Div9)
}
#[inline(always)]
pub fn div10(self) -> &'a mut crate::W<REG> {
self.variant(PLLI2SDIVQ::Div10)
}
#[inline(always)]
pub fn div11(self) -> &'a mut crate::W<REG> {
self.variant(PLLI2SDIVQ::Div11)
}
#[inline(always)]
pub fn div12(self) -> &'a mut crate::W<REG> {
self.variant(PLLI2SDIVQ::Div12)
}
#[inline(always)]
pub fn div13(self) -> &'a mut crate::W<REG> {
self.variant(PLLI2SDIVQ::Div13)
}
#[inline(always)]
pub fn div14(self) -> &'a mut crate::W<REG> {
self.variant(PLLI2SDIVQ::Div14)
}
#[inline(always)]
pub fn div15(self) -> &'a mut crate::W<REG> {
self.variant(PLLI2SDIVQ::Div15)
}
#[inline(always)]
pub fn div16(self) -> &'a mut crate::W<REG> {
self.variant(PLLI2SDIVQ::Div16)
}
#[inline(always)]
pub fn div17(self) -> &'a mut crate::W<REG> {
self.variant(PLLI2SDIVQ::Div17)
}
#[inline(always)]
pub fn div18(self) -> &'a mut crate::W<REG> {
self.variant(PLLI2SDIVQ::Div18)
}
#[inline(always)]
pub fn div19(self) -> &'a mut crate::W<REG> {
self.variant(PLLI2SDIVQ::Div19)
}
#[inline(always)]
pub fn div20(self) -> &'a mut crate::W<REG> {
self.variant(PLLI2SDIVQ::Div20)
}
#[inline(always)]
pub fn div21(self) -> &'a mut crate::W<REG> {
self.variant(PLLI2SDIVQ::Div21)
}
#[inline(always)]
pub fn div22(self) -> &'a mut crate::W<REG> {
self.variant(PLLI2SDIVQ::Div22)
}
#[inline(always)]
pub fn div23(self) -> &'a mut crate::W<REG> {
self.variant(PLLI2SDIVQ::Div23)
}
#[inline(always)]
pub fn div24(self) -> &'a mut crate::W<REG> {
self.variant(PLLI2SDIVQ::Div24)
}
#[inline(always)]
pub fn div25(self) -> &'a mut crate::W<REG> {
self.variant(PLLI2SDIVQ::Div25)
}
#[inline(always)]
pub fn div26(self) -> &'a mut crate::W<REG> {
self.variant(PLLI2SDIVQ::Div26)
}
#[inline(always)]
pub fn div27(self) -> &'a mut crate::W<REG> {
self.variant(PLLI2SDIVQ::Div27)
}
#[inline(always)]
pub fn div28(self) -> &'a mut crate::W<REG> {
self.variant(PLLI2SDIVQ::Div28)
}
#[inline(always)]
pub fn div29(self) -> &'a mut crate::W<REG> {
self.variant(PLLI2SDIVQ::Div29)
}
#[inline(always)]
pub fn div30(self) -> &'a mut crate::W<REG> {
self.variant(PLLI2SDIVQ::Div30)
}
#[inline(always)]
pub fn div31(self) -> &'a mut crate::W<REG> {
self.variant(PLLI2SDIVQ::Div31)
}
#[inline(always)]
pub fn div32(self) -> &'a mut crate::W<REG> {
self.variant(PLLI2SDIVQ::Div32)
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
#[repr(u8)]
pub enum PLLSAIDIVQ {
Div1 = 0,
Div2 = 1,
Div3 = 2,
Div4 = 3,
Div5 = 4,
Div6 = 5,
Div7 = 6,
Div8 = 7,
Div9 = 8,
Div10 = 9,
Div11 = 10,
Div12 = 11,
Div13 = 12,
Div14 = 13,
Div15 = 14,
Div16 = 15,
Div17 = 16,
Div18 = 17,
Div19 = 18,
Div20 = 19,
Div21 = 20,
Div22 = 21,
Div23 = 22,
Div24 = 23,
Div25 = 24,
Div26 = 25,
Div27 = 26,
Div28 = 27,
Div29 = 28,
Div30 = 29,
Div31 = 30,
Div32 = 31,
}
impl From<PLLSAIDIVQ> for u8 {
#[inline(always)]
fn from(variant: PLLSAIDIVQ) -> Self {
variant as _
}
}
impl crate::FieldSpec for PLLSAIDIVQ {
type Ux = u8;
}
impl crate::IsEnum for PLLSAIDIVQ {}
pub type PLLSAIDIVQ_R = crate::FieldReader<PLLSAIDIVQ>;
impl PLLSAIDIVQ_R {
#[inline(always)]
pub const fn variant(&self) -> PLLSAIDIVQ {
match self.bits {
0 => PLLSAIDIVQ::Div1,
1 => PLLSAIDIVQ::Div2,
2 => PLLSAIDIVQ::Div3,
3 => PLLSAIDIVQ::Div4,
4 => PLLSAIDIVQ::Div5,
5 => PLLSAIDIVQ::Div6,
6 => PLLSAIDIVQ::Div7,
7 => PLLSAIDIVQ::Div8,
8 => PLLSAIDIVQ::Div9,
9 => PLLSAIDIVQ::Div10,
10 => PLLSAIDIVQ::Div11,
11 => PLLSAIDIVQ::Div12,
12 => PLLSAIDIVQ::Div13,
13 => PLLSAIDIVQ::Div14,
14 => PLLSAIDIVQ::Div15,
15 => PLLSAIDIVQ::Div16,
16 => PLLSAIDIVQ::Div17,
17 => PLLSAIDIVQ::Div18,
18 => PLLSAIDIVQ::Div19,
19 => PLLSAIDIVQ::Div20,
20 => PLLSAIDIVQ::Div21,
21 => PLLSAIDIVQ::Div22,
22 => PLLSAIDIVQ::Div23,
23 => PLLSAIDIVQ::Div24,
24 => PLLSAIDIVQ::Div25,
25 => PLLSAIDIVQ::Div26,
26 => PLLSAIDIVQ::Div27,
27 => PLLSAIDIVQ::Div28,
28 => PLLSAIDIVQ::Div29,
29 => PLLSAIDIVQ::Div30,
30 => PLLSAIDIVQ::Div31,
31 => PLLSAIDIVQ::Div32,
_ => unreachable!(),
}
}
#[inline(always)]
pub fn is_div1(&self) -> bool {
*self == PLLSAIDIVQ::Div1
}
#[inline(always)]
pub fn is_div2(&self) -> bool {
*self == PLLSAIDIVQ::Div2
}
#[inline(always)]
pub fn is_div3(&self) -> bool {
*self == PLLSAIDIVQ::Div3
}
#[inline(always)]
pub fn is_div4(&self) -> bool {
*self == PLLSAIDIVQ::Div4
}
#[inline(always)]
pub fn is_div5(&self) -> bool {
*self == PLLSAIDIVQ::Div5
}
#[inline(always)]
pub fn is_div6(&self) -> bool {
*self == PLLSAIDIVQ::Div6
}
#[inline(always)]
pub fn is_div7(&self) -> bool {
*self == PLLSAIDIVQ::Div7
}
#[inline(always)]
pub fn is_div8(&self) -> bool {
*self == PLLSAIDIVQ::Div8
}
#[inline(always)]
pub fn is_div9(&self) -> bool {
*self == PLLSAIDIVQ::Div9
}
#[inline(always)]
pub fn is_div10(&self) -> bool {
*self == PLLSAIDIVQ::Div10
}
#[inline(always)]
pub fn is_div11(&self) -> bool {
*self == PLLSAIDIVQ::Div11
}
#[inline(always)]
pub fn is_div12(&self) -> bool {
*self == PLLSAIDIVQ::Div12
}
#[inline(always)]
pub fn is_div13(&self) -> bool {
*self == PLLSAIDIVQ::Div13
}
#[inline(always)]
pub fn is_div14(&self) -> bool {
*self == PLLSAIDIVQ::Div14
}
#[inline(always)]
pub fn is_div15(&self) -> bool {
*self == PLLSAIDIVQ::Div15
}
#[inline(always)]
pub fn is_div16(&self) -> bool {
*self == PLLSAIDIVQ::Div16
}
#[inline(always)]
pub fn is_div17(&self) -> bool {
*self == PLLSAIDIVQ::Div17
}
#[inline(always)]
pub fn is_div18(&self) -> bool {
*self == PLLSAIDIVQ::Div18
}
#[inline(always)]
pub fn is_div19(&self) -> bool {
*self == PLLSAIDIVQ::Div19
}
#[inline(always)]
pub fn is_div20(&self) -> bool {
*self == PLLSAIDIVQ::Div20
}
#[inline(always)]
pub fn is_div21(&self) -> bool {
*self == PLLSAIDIVQ::Div21
}
#[inline(always)]
pub fn is_div22(&self) -> bool {
*self == PLLSAIDIVQ::Div22
}
#[inline(always)]
pub fn is_div23(&self) -> bool {
*self == PLLSAIDIVQ::Div23
}
#[inline(always)]
pub fn is_div24(&self) -> bool {
*self == PLLSAIDIVQ::Div24
}
#[inline(always)]
pub fn is_div25(&self) -> bool {
*self == PLLSAIDIVQ::Div25
}
#[inline(always)]
pub fn is_div26(&self) -> bool {
*self == PLLSAIDIVQ::Div26
}
#[inline(always)]
pub fn is_div27(&self) -> bool {
*self == PLLSAIDIVQ::Div27
}
#[inline(always)]
pub fn is_div28(&self) -> bool {
*self == PLLSAIDIVQ::Div28
}
#[inline(always)]
pub fn is_div29(&self) -> bool {
*self == PLLSAIDIVQ::Div29
}
#[inline(always)]
pub fn is_div30(&self) -> bool {
*self == PLLSAIDIVQ::Div30
}
#[inline(always)]
pub fn is_div31(&self) -> bool {
*self == PLLSAIDIVQ::Div31
}
#[inline(always)]
pub fn is_div32(&self) -> bool {
*self == PLLSAIDIVQ::Div32
}
}
pub type PLLSAIDIVQ_W<'a, REG> = crate::FieldWriter<'a, REG, 5, PLLSAIDIVQ, crate::Safe>;
impl<'a, REG> PLLSAIDIVQ_W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
REG::Ux: From<u8>,
{
#[inline(always)]
pub fn div1(self) -> &'a mut crate::W<REG> {
self.variant(PLLSAIDIVQ::Div1)
}
#[inline(always)]
pub fn div2(self) -> &'a mut crate::W<REG> {
self.variant(PLLSAIDIVQ::Div2)
}
#[inline(always)]
pub fn div3(self) -> &'a mut crate::W<REG> {
self.variant(PLLSAIDIVQ::Div3)
}
#[inline(always)]
pub fn div4(self) -> &'a mut crate::W<REG> {
self.variant(PLLSAIDIVQ::Div4)
}
#[inline(always)]
pub fn div5(self) -> &'a mut crate::W<REG> {
self.variant(PLLSAIDIVQ::Div5)
}
#[inline(always)]
pub fn div6(self) -> &'a mut crate::W<REG> {
self.variant(PLLSAIDIVQ::Div6)
}
#[inline(always)]
pub fn div7(self) -> &'a mut crate::W<REG> {
self.variant(PLLSAIDIVQ::Div7)
}
#[inline(always)]
pub fn div8(self) -> &'a mut crate::W<REG> {
self.variant(PLLSAIDIVQ::Div8)
}
#[inline(always)]
pub fn div9(self) -> &'a mut crate::W<REG> {
self.variant(PLLSAIDIVQ::Div9)
}
#[inline(always)]
pub fn div10(self) -> &'a mut crate::W<REG> {
self.variant(PLLSAIDIVQ::Div10)
}
#[inline(always)]
pub fn div11(self) -> &'a mut crate::W<REG> {
self.variant(PLLSAIDIVQ::Div11)
}
#[inline(always)]
pub fn div12(self) -> &'a mut crate::W<REG> {
self.variant(PLLSAIDIVQ::Div12)
}
#[inline(always)]
pub fn div13(self) -> &'a mut crate::W<REG> {
self.variant(PLLSAIDIVQ::Div13)
}
#[inline(always)]
pub fn div14(self) -> &'a mut crate::W<REG> {
self.variant(PLLSAIDIVQ::Div14)
}
#[inline(always)]
pub fn div15(self) -> &'a mut crate::W<REG> {
self.variant(PLLSAIDIVQ::Div15)
}
#[inline(always)]
pub fn div16(self) -> &'a mut crate::W<REG> {
self.variant(PLLSAIDIVQ::Div16)
}
#[inline(always)]
pub fn div17(self) -> &'a mut crate::W<REG> {
self.variant(PLLSAIDIVQ::Div17)
}
#[inline(always)]
pub fn div18(self) -> &'a mut crate::W<REG> {
self.variant(PLLSAIDIVQ::Div18)
}
#[inline(always)]
pub fn div19(self) -> &'a mut crate::W<REG> {
self.variant(PLLSAIDIVQ::Div19)
}
#[inline(always)]
pub fn div20(self) -> &'a mut crate::W<REG> {
self.variant(PLLSAIDIVQ::Div20)
}
#[inline(always)]
pub fn div21(self) -> &'a mut crate::W<REG> {
self.variant(PLLSAIDIVQ::Div21)
}
#[inline(always)]
pub fn div22(self) -> &'a mut crate::W<REG> {
self.variant(PLLSAIDIVQ::Div22)
}
#[inline(always)]
pub fn div23(self) -> &'a mut crate::W<REG> {
self.variant(PLLSAIDIVQ::Div23)
}
#[inline(always)]
pub fn div24(self) -> &'a mut crate::W<REG> {
self.variant(PLLSAIDIVQ::Div24)
}
#[inline(always)]
pub fn div25(self) -> &'a mut crate::W<REG> {
self.variant(PLLSAIDIVQ::Div25)
}
#[inline(always)]
pub fn div26(self) -> &'a mut crate::W<REG> {
self.variant(PLLSAIDIVQ::Div26)
}
#[inline(always)]
pub fn div27(self) -> &'a mut crate::W<REG> {
self.variant(PLLSAIDIVQ::Div27)
}
#[inline(always)]
pub fn div28(self) -> &'a mut crate::W<REG> {
self.variant(PLLSAIDIVQ::Div28)
}
#[inline(always)]
pub fn div29(self) -> &'a mut crate::W<REG> {
self.variant(PLLSAIDIVQ::Div29)
}
#[inline(always)]
pub fn div30(self) -> &'a mut crate::W<REG> {
self.variant(PLLSAIDIVQ::Div30)
}
#[inline(always)]
pub fn div31(self) -> &'a mut crate::W<REG> {
self.variant(PLLSAIDIVQ::Div31)
}
#[inline(always)]
pub fn div32(self) -> &'a mut crate::W<REG> {
self.variant(PLLSAIDIVQ::Div32)
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
#[repr(u8)]
pub enum PLLSAIDIVR {
Div2 = 0,
Div4 = 1,
Div8 = 2,
Div16 = 3,
}
impl From<PLLSAIDIVR> for u8 {
#[inline(always)]
fn from(variant: PLLSAIDIVR) -> Self {
variant as _
}
}
impl crate::FieldSpec for PLLSAIDIVR {
type Ux = u8;
}
impl crate::IsEnum for PLLSAIDIVR {}
pub type PLLSAIDIVR_R = crate::FieldReader<PLLSAIDIVR>;
impl PLLSAIDIVR_R {
#[inline(always)]
pub const fn variant(&self) -> PLLSAIDIVR {
match self.bits {
0 => PLLSAIDIVR::Div2,
1 => PLLSAIDIVR::Div4,
2 => PLLSAIDIVR::Div8,
3 => PLLSAIDIVR::Div16,
_ => unreachable!(),
}
}
#[inline(always)]
pub fn is_div2(&self) -> bool {
*self == PLLSAIDIVR::Div2
}
#[inline(always)]
pub fn is_div4(&self) -> bool {
*self == PLLSAIDIVR::Div4
}
#[inline(always)]
pub fn is_div8(&self) -> bool {
*self == PLLSAIDIVR::Div8
}
#[inline(always)]
pub fn is_div16(&self) -> bool {
*self == PLLSAIDIVR::Div16
}
}
pub type PLLSAIDIVR_W<'a, REG> = crate::FieldWriter<'a, REG, 2, PLLSAIDIVR, crate::Safe>;
impl<'a, REG> PLLSAIDIVR_W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
REG::Ux: From<u8>,
{
#[inline(always)]
pub fn div2(self) -> &'a mut crate::W<REG> {
self.variant(PLLSAIDIVR::Div2)
}
#[inline(always)]
pub fn div4(self) -> &'a mut crate::W<REG> {
self.variant(PLLSAIDIVR::Div4)
}
#[inline(always)]
pub fn div8(self) -> &'a mut crate::W<REG> {
self.variant(PLLSAIDIVR::Div8)
}
#[inline(always)]
pub fn div16(self) -> &'a mut crate::W<REG> {
self.variant(PLLSAIDIVR::Div16)
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
#[repr(u8)]
pub enum SAI1SEL {
Pllsai = 0,
Plli2s = 1,
Afif = 2,
HsiHse = 3,
}
impl From<SAI1SEL> for u8 {
#[inline(always)]
fn from(variant: SAI1SEL) -> Self {
variant as _
}
}
impl crate::FieldSpec for SAI1SEL {
type Ux = u8;
}
impl crate::IsEnum for SAI1SEL {}
pub type SAI1SEL_R = crate::FieldReader<SAI1SEL>;
impl SAI1SEL_R {
#[inline(always)]
pub const fn variant(&self) -> SAI1SEL {
match self.bits {
0 => SAI1SEL::Pllsai,
1 => SAI1SEL::Plli2s,
2 => SAI1SEL::Afif,
3 => SAI1SEL::HsiHse,
_ => unreachable!(),
}
}
#[inline(always)]
pub fn is_pllsai(&self) -> bool {
*self == SAI1SEL::Pllsai
}
#[inline(always)]
pub fn is_plli2s(&self) -> bool {
*self == SAI1SEL::Plli2s
}
#[inline(always)]
pub fn is_afif(&self) -> bool {
*self == SAI1SEL::Afif
}
#[inline(always)]
pub fn is_hsi_hse(&self) -> bool {
*self == SAI1SEL::HsiHse
}
}
pub type SAI1SEL_W<'a, REG> = crate::FieldWriter<'a, REG, 2, SAI1SEL, crate::Safe>;
impl<'a, REG> SAI1SEL_W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
REG::Ux: From<u8>,
{
#[inline(always)]
pub fn pllsai(self) -> &'a mut crate::W<REG> {
self.variant(SAI1SEL::Pllsai)
}
#[inline(always)]
pub fn plli2s(self) -> &'a mut crate::W<REG> {
self.variant(SAI1SEL::Plli2s)
}
#[inline(always)]
pub fn afif(self) -> &'a mut crate::W<REG> {
self.variant(SAI1SEL::Afif)
}
#[inline(always)]
pub fn hsi_hse(self) -> &'a mut crate::W<REG> {
self.variant(SAI1SEL::HsiHse)
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
#[repr(u8)]
pub enum SAI2SEL {
Pllsai = 0,
Plli2s = 1,
Afif = 2,
HsiHse = 3,
}
impl From<SAI2SEL> for u8 {
#[inline(always)]
fn from(variant: SAI2SEL) -> Self {
variant as _
}
}
impl crate::FieldSpec for SAI2SEL {
type Ux = u8;
}
impl crate::IsEnum for SAI2SEL {}
pub type SAI2SEL_R = crate::FieldReader<SAI2SEL>;
impl SAI2SEL_R {
#[inline(always)]
pub const fn variant(&self) -> SAI2SEL {
match self.bits {
0 => SAI2SEL::Pllsai,
1 => SAI2SEL::Plli2s,
2 => SAI2SEL::Afif,
3 => SAI2SEL::HsiHse,
_ => unreachable!(),
}
}
#[inline(always)]
pub fn is_pllsai(&self) -> bool {
*self == SAI2SEL::Pllsai
}
#[inline(always)]
pub fn is_plli2s(&self) -> bool {
*self == SAI2SEL::Plli2s
}
#[inline(always)]
pub fn is_afif(&self) -> bool {
*self == SAI2SEL::Afif
}
#[inline(always)]
pub fn is_hsi_hse(&self) -> bool {
*self == SAI2SEL::HsiHse
}
}
pub type SAI2SEL_W<'a, REG> = crate::FieldWriter<'a, REG, 2, SAI2SEL, crate::Safe>;
impl<'a, REG> SAI2SEL_W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
REG::Ux: From<u8>,
{
#[inline(always)]
pub fn pllsai(self) -> &'a mut crate::W<REG> {
self.variant(SAI2SEL::Pllsai)
}
#[inline(always)]
pub fn plli2s(self) -> &'a mut crate::W<REG> {
self.variant(SAI2SEL::Plli2s)
}
#[inline(always)]
pub fn afif(self) -> &'a mut crate::W<REG> {
self.variant(SAI2SEL::Afif)
}
#[inline(always)]
pub fn hsi_hse(self) -> &'a mut crate::W<REG> {
self.variant(SAI2SEL::HsiHse)
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum TIMPRE {
Mul1or2 = 0,
Mul1or4 = 1,
}
impl From<TIMPRE> for bool {
#[inline(always)]
fn from(variant: TIMPRE) -> Self {
variant as u8 != 0
}
}
pub type TIMPRE_R = crate::BitReader<TIMPRE>;
impl TIMPRE_R {
#[inline(always)]
pub const fn variant(&self) -> TIMPRE {
match self.bits {
false => TIMPRE::Mul1or2,
true => TIMPRE::Mul1or4,
}
}
#[inline(always)]
pub fn is_mul1or2(&self) -> bool {
*self == TIMPRE::Mul1or2
}
#[inline(always)]
pub fn is_mul1or4(&self) -> bool {
*self == TIMPRE::Mul1or4
}
}
pub type TIMPRE_W<'a, REG> = crate::BitWriter<'a, REG, TIMPRE>;
impl<'a, REG> TIMPRE_W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
{
#[inline(always)]
pub fn mul1or2(self) -> &'a mut crate::W<REG> {
self.variant(TIMPRE::Mul1or2)
}
#[inline(always)]
pub fn mul1or4(self) -> &'a mut crate::W<REG> {
self.variant(TIMPRE::Mul1or4)
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum DFSDM1SEL {
Apb2 = 0,
Sysclk = 1,
}
impl From<DFSDM1SEL> for bool {
#[inline(always)]
fn from(variant: DFSDM1SEL) -> Self {
variant as u8 != 0
}
}
pub type DFSDM1SEL_R = crate::BitReader<DFSDM1SEL>;
impl DFSDM1SEL_R {
#[inline(always)]
pub const fn variant(&self) -> DFSDM1SEL {
match self.bits {
false => DFSDM1SEL::Apb2,
true => DFSDM1SEL::Sysclk,
}
}
#[inline(always)]
pub fn is_apb2(&self) -> bool {
*self == DFSDM1SEL::Apb2
}
#[inline(always)]
pub fn is_sysclk(&self) -> bool {
*self == DFSDM1SEL::Sysclk
}
}
pub type DFSDM1SEL_W<'a, REG> = crate::BitWriter<'a, REG, DFSDM1SEL>;
impl<'a, REG> DFSDM1SEL_W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
{
#[inline(always)]
pub fn apb2(self) -> &'a mut crate::W<REG> {
self.variant(DFSDM1SEL::Apb2)
}
#[inline(always)]
pub fn sysclk(self) -> &'a mut crate::W<REG> {
self.variant(DFSDM1SEL::Sysclk)
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum ADFSDM1SEL {
Sai1 = 0,
Sai2 = 1,
}
impl From<ADFSDM1SEL> for bool {
#[inline(always)]
fn from(variant: ADFSDM1SEL) -> Self {
variant as u8 != 0
}
}
pub type ADFSDM1SEL_R = crate::BitReader<ADFSDM1SEL>;
impl ADFSDM1SEL_R {
#[inline(always)]
pub const fn variant(&self) -> ADFSDM1SEL {
match self.bits {
false => ADFSDM1SEL::Sai1,
true => ADFSDM1SEL::Sai2,
}
}
#[inline(always)]
pub fn is_sai1(&self) -> bool {
*self == ADFSDM1SEL::Sai1
}
#[inline(always)]
pub fn is_sai2(&self) -> bool {
*self == ADFSDM1SEL::Sai2
}
}
pub type ADFSDM1SEL_W<'a, REG> = crate::BitWriter<'a, REG, ADFSDM1SEL>;
impl<'a, REG> ADFSDM1SEL_W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
{
#[inline(always)]
pub fn sai1(self) -> &'a mut crate::W<REG> {
self.variant(ADFSDM1SEL::Sai1)
}
#[inline(always)]
pub fn sai2(self) -> &'a mut crate::W<REG> {
self.variant(ADFSDM1SEL::Sai2)
}
}
impl R {
#[inline(always)]
pub fn plli2sdivq(&self) -> PLLI2SDIVQ_R {
PLLI2SDIVQ_R::new((self.bits & 0x1f) as u8)
}
#[inline(always)]
pub fn pllsaidivq(&self) -> PLLSAIDIVQ_R {
PLLSAIDIVQ_R::new(((self.bits >> 8) & 0x1f) as u8)
}
#[inline(always)]
pub fn pllsaidivr(&self) -> PLLSAIDIVR_R {
PLLSAIDIVR_R::new(((self.bits >> 16) & 3) as u8)
}
#[inline(always)]
pub fn sai1sel(&self) -> SAI1SEL_R {
SAI1SEL_R::new(((self.bits >> 20) & 3) as u8)
}
#[inline(always)]
pub fn sai2sel(&self) -> SAI2SEL_R {
SAI2SEL_R::new(((self.bits >> 22) & 3) as u8)
}
#[inline(always)]
pub fn timpre(&self) -> TIMPRE_R {
TIMPRE_R::new(((self.bits >> 24) & 1) != 0)
}
#[inline(always)]
pub fn dfsdm1sel(&self) -> DFSDM1SEL_R {
DFSDM1SEL_R::new(((self.bits >> 25) & 1) != 0)
}
#[inline(always)]
pub fn adfsdm1sel(&self) -> ADFSDM1SEL_R {
ADFSDM1SEL_R::new(((self.bits >> 26) & 1) != 0)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("DCKCFGR1")
.field("plli2sdivq", &self.plli2sdivq())
.field("pllsaidivq", &self.pllsaidivq())
.field("pllsaidivr", &self.pllsaidivr())
.field("sai1sel", &self.sai1sel())
.field("sai2sel", &self.sai2sel())
.field("timpre", &self.timpre())
.field("dfsdm1sel", &self.dfsdm1sel())
.field("adfsdm1sel", &self.adfsdm1sel())
.finish()
}
}
impl W {
#[inline(always)]
pub fn plli2sdivq(&mut self) -> PLLI2SDIVQ_W<DCKCFGR1rs> {
PLLI2SDIVQ_W::new(self, 0)
}
#[inline(always)]
pub fn pllsaidivq(&mut self) -> PLLSAIDIVQ_W<DCKCFGR1rs> {
PLLSAIDIVQ_W::new(self, 8)
}
#[inline(always)]
pub fn pllsaidivr(&mut self) -> PLLSAIDIVR_W<DCKCFGR1rs> {
PLLSAIDIVR_W::new(self, 16)
}
#[inline(always)]
pub fn sai1sel(&mut self) -> SAI1SEL_W<DCKCFGR1rs> {
SAI1SEL_W::new(self, 20)
}
#[inline(always)]
pub fn sai2sel(&mut self) -> SAI2SEL_W<DCKCFGR1rs> {
SAI2SEL_W::new(self, 22)
}
#[inline(always)]
pub fn timpre(&mut self) -> TIMPRE_W<DCKCFGR1rs> {
TIMPRE_W::new(self, 24)
}
#[inline(always)]
pub fn dfsdm1sel(&mut self) -> DFSDM1SEL_W<DCKCFGR1rs> {
DFSDM1SEL_W::new(self, 25)
}
#[inline(always)]
pub fn adfsdm1sel(&mut self) -> ADFSDM1SEL_W<DCKCFGR1rs> {
ADFSDM1SEL_W::new(self, 26)
}
}
pub struct DCKCFGR1rs;
impl crate::RegisterSpec for DCKCFGR1rs {
type Ux = u32;
}
impl crate::Readable for DCKCFGR1rs {}
impl crate::Writable for DCKCFGR1rs {
type Safety = crate::Unsafe;
}
impl crate::Resettable for DCKCFGR1rs {}