#[doc = "Register `CBCTL2` reader"]
pub type R = crate::R<Cbctl2Spec>;
#[doc = "Register `CBCTL2` writer"]
pub type W = crate::W<Cbctl2Spec>;
#[doc = "Comp. B Reference 0 Resistor Select Bit : 0\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
#[repr(u8)]
pub enum Cbref0 {
#[doc = "0: Comp. B Int. Ref.0 Select 0 : 1/32"]
Cbref0_0 = 0,
#[doc = "1: Comp. B Int. Ref.0 Select 1 : 2/32"]
Cbref0_1 = 1,
#[doc = "2: Comp. B Int. Ref.0 Select 2 : 3/32"]
Cbref0_2 = 2,
#[doc = "3: Comp. B Int. Ref.0 Select 3 : 4/32"]
Cbref0_3 = 3,
#[doc = "4: Comp. B Int. Ref.0 Select 4 : 5/32"]
Cbref0_4 = 4,
#[doc = "5: Comp. B Int. Ref.0 Select 5 : 6/32"]
Cbref0_5 = 5,
#[doc = "6: Comp. B Int. Ref.0 Select 6 : 7/32"]
Cbref0_6 = 6,
#[doc = "7: Comp. B Int. Ref.0 Select 7 : 8/32"]
Cbref0_7 = 7,
#[doc = "8: Comp. B Int. Ref.0 Select 0 : 9/32"]
Cbref0_8 = 8,
#[doc = "9: Comp. B Int. Ref.0 Select 1 : 10/32"]
Cbref0_9 = 9,
#[doc = "10: Comp. B Int. Ref.0 Select 2 : 11/32"]
Cbref0_10 = 10,
#[doc = "11: Comp. B Int. Ref.0 Select 3 : 12/32"]
Cbref0_11 = 11,
#[doc = "12: Comp. B Int. Ref.0 Select 4 : 13/32"]
Cbref0_12 = 12,
#[doc = "13: Comp. B Int. Ref.0 Select 5 : 14/32"]
Cbref0_13 = 13,
#[doc = "14: Comp. B Int. Ref.0 Select 6 : 15/32"]
Cbref0_14 = 14,
#[doc = "15: Comp. B Int. Ref.0 Select 7 : 16/32"]
Cbref0_15 = 15,
#[doc = "16: Comp. B Int. Ref.0 Select 0 : 17/32"]
Cbref0_16 = 16,
#[doc = "17: Comp. B Int. Ref.0 Select 1 : 18/32"]
Cbref0_17 = 17,
#[doc = "18: Comp. B Int. Ref.0 Select 2 : 19/32"]
Cbref0_18 = 18,
#[doc = "19: Comp. B Int. Ref.0 Select 3 : 20/32"]
Cbref0_19 = 19,
#[doc = "20: Comp. B Int. Ref.0 Select 4 : 21/32"]
Cbref0_20 = 20,
#[doc = "21: Comp. B Int. Ref.0 Select 5 : 22/32"]
Cbref0_21 = 21,
#[doc = "22: Comp. B Int. Ref.0 Select 6 : 23/32"]
Cbref0_22 = 22,
#[doc = "23: Comp. B Int. Ref.0 Select 7 : 24/32"]
Cbref0_23 = 23,
#[doc = "24: Comp. B Int. Ref.0 Select 0 : 25/32"]
Cbref0_24 = 24,
#[doc = "25: Comp. B Int. Ref.0 Select 1 : 26/32"]
Cbref0_25 = 25,
#[doc = "26: Comp. B Int. Ref.0 Select 2 : 27/32"]
Cbref0_26 = 26,
#[doc = "27: Comp. B Int. Ref.0 Select 3 : 28/32"]
Cbref0_27 = 27,
#[doc = "28: Comp. B Int. Ref.0 Select 4 : 29/32"]
Cbref0_28 = 28,
#[doc = "29: Comp. B Int. Ref.0 Select 5 : 30/32"]
Cbref0_29 = 29,
#[doc = "30: Comp. B Int. Ref.0 Select 6 : 31/32"]
Cbref0_30 = 30,
#[doc = "31: Comp. B Int. Ref.0 Select 7 : 32/32"]
Cbref0_31 = 31,
}
impl From<Cbref0> for u8 {
#[inline(always)]
fn from(variant: Cbref0) -> Self {
variant as _
}
}
impl crate::FieldSpec for Cbref0 {
type Ux = u8;
}
impl crate::IsEnum for Cbref0 {}
#[doc = "Field `CBREF0` reader - Comp. B Reference 0 Resistor Select Bit : 0"]
pub type Cbref0R = crate::FieldReader<Cbref0>;
impl Cbref0R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub const fn variant(&self) -> Cbref0 {
match self.bits {
0 => Cbref0::Cbref0_0,
1 => Cbref0::Cbref0_1,
2 => Cbref0::Cbref0_2,
3 => Cbref0::Cbref0_3,
4 => Cbref0::Cbref0_4,
5 => Cbref0::Cbref0_5,
6 => Cbref0::Cbref0_6,
7 => Cbref0::Cbref0_7,
8 => Cbref0::Cbref0_8,
9 => Cbref0::Cbref0_9,
10 => Cbref0::Cbref0_10,
11 => Cbref0::Cbref0_11,
12 => Cbref0::Cbref0_12,
13 => Cbref0::Cbref0_13,
14 => Cbref0::Cbref0_14,
15 => Cbref0::Cbref0_15,
16 => Cbref0::Cbref0_16,
17 => Cbref0::Cbref0_17,
18 => Cbref0::Cbref0_18,
19 => Cbref0::Cbref0_19,
20 => Cbref0::Cbref0_20,
21 => Cbref0::Cbref0_21,
22 => Cbref0::Cbref0_22,
23 => Cbref0::Cbref0_23,
24 => Cbref0::Cbref0_24,
25 => Cbref0::Cbref0_25,
26 => Cbref0::Cbref0_26,
27 => Cbref0::Cbref0_27,
28 => Cbref0::Cbref0_28,
29 => Cbref0::Cbref0_29,
30 => Cbref0::Cbref0_30,
31 => Cbref0::Cbref0_31,
_ => unreachable!(),
}
}
#[doc = "Comp. B Int. Ref.0 Select 0 : 1/32"]
#[inline(always)]
pub fn is_cbref0_0(&self) -> bool {
*self == Cbref0::Cbref0_0
}
#[doc = "Comp. B Int. Ref.0 Select 1 : 2/32"]
#[inline(always)]
pub fn is_cbref0_1(&self) -> bool {
*self == Cbref0::Cbref0_1
}
#[doc = "Comp. B Int. Ref.0 Select 2 : 3/32"]
#[inline(always)]
pub fn is_cbref0_2(&self) -> bool {
*self == Cbref0::Cbref0_2
}
#[doc = "Comp. B Int. Ref.0 Select 3 : 4/32"]
#[inline(always)]
pub fn is_cbref0_3(&self) -> bool {
*self == Cbref0::Cbref0_3
}
#[doc = "Comp. B Int. Ref.0 Select 4 : 5/32"]
#[inline(always)]
pub fn is_cbref0_4(&self) -> bool {
*self == Cbref0::Cbref0_4
}
#[doc = "Comp. B Int. Ref.0 Select 5 : 6/32"]
#[inline(always)]
pub fn is_cbref0_5(&self) -> bool {
*self == Cbref0::Cbref0_5
}
#[doc = "Comp. B Int. Ref.0 Select 6 : 7/32"]
#[inline(always)]
pub fn is_cbref0_6(&self) -> bool {
*self == Cbref0::Cbref0_6
}
#[doc = "Comp. B Int. Ref.0 Select 7 : 8/32"]
#[inline(always)]
pub fn is_cbref0_7(&self) -> bool {
*self == Cbref0::Cbref0_7
}
#[doc = "Comp. B Int. Ref.0 Select 0 : 9/32"]
#[inline(always)]
pub fn is_cbref0_8(&self) -> bool {
*self == Cbref0::Cbref0_8
}
#[doc = "Comp. B Int. Ref.0 Select 1 : 10/32"]
#[inline(always)]
pub fn is_cbref0_9(&self) -> bool {
*self == Cbref0::Cbref0_9
}
#[doc = "Comp. B Int. Ref.0 Select 2 : 11/32"]
#[inline(always)]
pub fn is_cbref0_10(&self) -> bool {
*self == Cbref0::Cbref0_10
}
#[doc = "Comp. B Int. Ref.0 Select 3 : 12/32"]
#[inline(always)]
pub fn is_cbref0_11(&self) -> bool {
*self == Cbref0::Cbref0_11
}
#[doc = "Comp. B Int. Ref.0 Select 4 : 13/32"]
#[inline(always)]
pub fn is_cbref0_12(&self) -> bool {
*self == Cbref0::Cbref0_12
}
#[doc = "Comp. B Int. Ref.0 Select 5 : 14/32"]
#[inline(always)]
pub fn is_cbref0_13(&self) -> bool {
*self == Cbref0::Cbref0_13
}
#[doc = "Comp. B Int. Ref.0 Select 6 : 15/32"]
#[inline(always)]
pub fn is_cbref0_14(&self) -> bool {
*self == Cbref0::Cbref0_14
}
#[doc = "Comp. B Int. Ref.0 Select 7 : 16/32"]
#[inline(always)]
pub fn is_cbref0_15(&self) -> bool {
*self == Cbref0::Cbref0_15
}
#[doc = "Comp. B Int. Ref.0 Select 0 : 17/32"]
#[inline(always)]
pub fn is_cbref0_16(&self) -> bool {
*self == Cbref0::Cbref0_16
}
#[doc = "Comp. B Int. Ref.0 Select 1 : 18/32"]
#[inline(always)]
pub fn is_cbref0_17(&self) -> bool {
*self == Cbref0::Cbref0_17
}
#[doc = "Comp. B Int. Ref.0 Select 2 : 19/32"]
#[inline(always)]
pub fn is_cbref0_18(&self) -> bool {
*self == Cbref0::Cbref0_18
}
#[doc = "Comp. B Int. Ref.0 Select 3 : 20/32"]
#[inline(always)]
pub fn is_cbref0_19(&self) -> bool {
*self == Cbref0::Cbref0_19
}
#[doc = "Comp. B Int. Ref.0 Select 4 : 21/32"]
#[inline(always)]
pub fn is_cbref0_20(&self) -> bool {
*self == Cbref0::Cbref0_20
}
#[doc = "Comp. B Int. Ref.0 Select 5 : 22/32"]
#[inline(always)]
pub fn is_cbref0_21(&self) -> bool {
*self == Cbref0::Cbref0_21
}
#[doc = "Comp. B Int. Ref.0 Select 6 : 23/32"]
#[inline(always)]
pub fn is_cbref0_22(&self) -> bool {
*self == Cbref0::Cbref0_22
}
#[doc = "Comp. B Int. Ref.0 Select 7 : 24/32"]
#[inline(always)]
pub fn is_cbref0_23(&self) -> bool {
*self == Cbref0::Cbref0_23
}
#[doc = "Comp. B Int. Ref.0 Select 0 : 25/32"]
#[inline(always)]
pub fn is_cbref0_24(&self) -> bool {
*self == Cbref0::Cbref0_24
}
#[doc = "Comp. B Int. Ref.0 Select 1 : 26/32"]
#[inline(always)]
pub fn is_cbref0_25(&self) -> bool {
*self == Cbref0::Cbref0_25
}
#[doc = "Comp. B Int. Ref.0 Select 2 : 27/32"]
#[inline(always)]
pub fn is_cbref0_26(&self) -> bool {
*self == Cbref0::Cbref0_26
}
#[doc = "Comp. B Int. Ref.0 Select 3 : 28/32"]
#[inline(always)]
pub fn is_cbref0_27(&self) -> bool {
*self == Cbref0::Cbref0_27
}
#[doc = "Comp. B Int. Ref.0 Select 4 : 29/32"]
#[inline(always)]
pub fn is_cbref0_28(&self) -> bool {
*self == Cbref0::Cbref0_28
}
#[doc = "Comp. B Int. Ref.0 Select 5 : 30/32"]
#[inline(always)]
pub fn is_cbref0_29(&self) -> bool {
*self == Cbref0::Cbref0_29
}
#[doc = "Comp. B Int. Ref.0 Select 6 : 31/32"]
#[inline(always)]
pub fn is_cbref0_30(&self) -> bool {
*self == Cbref0::Cbref0_30
}
#[doc = "Comp. B Int. Ref.0 Select 7 : 32/32"]
#[inline(always)]
pub fn is_cbref0_31(&self) -> bool {
*self == Cbref0::Cbref0_31
}
}
#[doc = "Field `CBREF0` writer - Comp. B Reference 0 Resistor Select Bit : 0"]
pub type Cbref0W<'a, REG> = crate::FieldWriter<'a, REG, 5, Cbref0, crate::Safe>;
impl<'a, REG> Cbref0W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
REG::Ux: From<u8>,
{
#[doc = "Comp. B Int. Ref.0 Select 0 : 1/32"]
#[inline(always)]
pub fn cbref0_0(self) -> &'a mut crate::W<REG> {
self.variant(Cbref0::Cbref0_0)
}
#[doc = "Comp. B Int. Ref.0 Select 1 : 2/32"]
#[inline(always)]
pub fn cbref0_1(self) -> &'a mut crate::W<REG> {
self.variant(Cbref0::Cbref0_1)
}
#[doc = "Comp. B Int. Ref.0 Select 2 : 3/32"]
#[inline(always)]
pub fn cbref0_2(self) -> &'a mut crate::W<REG> {
self.variant(Cbref0::Cbref0_2)
}
#[doc = "Comp. B Int. Ref.0 Select 3 : 4/32"]
#[inline(always)]
pub fn cbref0_3(self) -> &'a mut crate::W<REG> {
self.variant(Cbref0::Cbref0_3)
}
#[doc = "Comp. B Int. Ref.0 Select 4 : 5/32"]
#[inline(always)]
pub fn cbref0_4(self) -> &'a mut crate::W<REG> {
self.variant(Cbref0::Cbref0_4)
}
#[doc = "Comp. B Int. Ref.0 Select 5 : 6/32"]
#[inline(always)]
pub fn cbref0_5(self) -> &'a mut crate::W<REG> {
self.variant(Cbref0::Cbref0_5)
}
#[doc = "Comp. B Int. Ref.0 Select 6 : 7/32"]
#[inline(always)]
pub fn cbref0_6(self) -> &'a mut crate::W<REG> {
self.variant(Cbref0::Cbref0_6)
}
#[doc = "Comp. B Int. Ref.0 Select 7 : 8/32"]
#[inline(always)]
pub fn cbref0_7(self) -> &'a mut crate::W<REG> {
self.variant(Cbref0::Cbref0_7)
}
#[doc = "Comp. B Int. Ref.0 Select 0 : 9/32"]
#[inline(always)]
pub fn cbref0_8(self) -> &'a mut crate::W<REG> {
self.variant(Cbref0::Cbref0_8)
}
#[doc = "Comp. B Int. Ref.0 Select 1 : 10/32"]
#[inline(always)]
pub fn cbref0_9(self) -> &'a mut crate::W<REG> {
self.variant(Cbref0::Cbref0_9)
}
#[doc = "Comp. B Int. Ref.0 Select 2 : 11/32"]
#[inline(always)]
pub fn cbref0_10(self) -> &'a mut crate::W<REG> {
self.variant(Cbref0::Cbref0_10)
}
#[doc = "Comp. B Int. Ref.0 Select 3 : 12/32"]
#[inline(always)]
pub fn cbref0_11(self) -> &'a mut crate::W<REG> {
self.variant(Cbref0::Cbref0_11)
}
#[doc = "Comp. B Int. Ref.0 Select 4 : 13/32"]
#[inline(always)]
pub fn cbref0_12(self) -> &'a mut crate::W<REG> {
self.variant(Cbref0::Cbref0_12)
}
#[doc = "Comp. B Int. Ref.0 Select 5 : 14/32"]
#[inline(always)]
pub fn cbref0_13(self) -> &'a mut crate::W<REG> {
self.variant(Cbref0::Cbref0_13)
}
#[doc = "Comp. B Int. Ref.0 Select 6 : 15/32"]
#[inline(always)]
pub fn cbref0_14(self) -> &'a mut crate::W<REG> {
self.variant(Cbref0::Cbref0_14)
}
#[doc = "Comp. B Int. Ref.0 Select 7 : 16/32"]
#[inline(always)]
pub fn cbref0_15(self) -> &'a mut crate::W<REG> {
self.variant(Cbref0::Cbref0_15)
}
#[doc = "Comp. B Int. Ref.0 Select 0 : 17/32"]
#[inline(always)]
pub fn cbref0_16(self) -> &'a mut crate::W<REG> {
self.variant(Cbref0::Cbref0_16)
}
#[doc = "Comp. B Int. Ref.0 Select 1 : 18/32"]
#[inline(always)]
pub fn cbref0_17(self) -> &'a mut crate::W<REG> {
self.variant(Cbref0::Cbref0_17)
}
#[doc = "Comp. B Int. Ref.0 Select 2 : 19/32"]
#[inline(always)]
pub fn cbref0_18(self) -> &'a mut crate::W<REG> {
self.variant(Cbref0::Cbref0_18)
}
#[doc = "Comp. B Int. Ref.0 Select 3 : 20/32"]
#[inline(always)]
pub fn cbref0_19(self) -> &'a mut crate::W<REG> {
self.variant(Cbref0::Cbref0_19)
}
#[doc = "Comp. B Int. Ref.0 Select 4 : 21/32"]
#[inline(always)]
pub fn cbref0_20(self) -> &'a mut crate::W<REG> {
self.variant(Cbref0::Cbref0_20)
}
#[doc = "Comp. B Int. Ref.0 Select 5 : 22/32"]
#[inline(always)]
pub fn cbref0_21(self) -> &'a mut crate::W<REG> {
self.variant(Cbref0::Cbref0_21)
}
#[doc = "Comp. B Int. Ref.0 Select 6 : 23/32"]
#[inline(always)]
pub fn cbref0_22(self) -> &'a mut crate::W<REG> {
self.variant(Cbref0::Cbref0_22)
}
#[doc = "Comp. B Int. Ref.0 Select 7 : 24/32"]
#[inline(always)]
pub fn cbref0_23(self) -> &'a mut crate::W<REG> {
self.variant(Cbref0::Cbref0_23)
}
#[doc = "Comp. B Int. Ref.0 Select 0 : 25/32"]
#[inline(always)]
pub fn cbref0_24(self) -> &'a mut crate::W<REG> {
self.variant(Cbref0::Cbref0_24)
}
#[doc = "Comp. B Int. Ref.0 Select 1 : 26/32"]
#[inline(always)]
pub fn cbref0_25(self) -> &'a mut crate::W<REG> {
self.variant(Cbref0::Cbref0_25)
}
#[doc = "Comp. B Int. Ref.0 Select 2 : 27/32"]
#[inline(always)]
pub fn cbref0_26(self) -> &'a mut crate::W<REG> {
self.variant(Cbref0::Cbref0_26)
}
#[doc = "Comp. B Int. Ref.0 Select 3 : 28/32"]
#[inline(always)]
pub fn cbref0_27(self) -> &'a mut crate::W<REG> {
self.variant(Cbref0::Cbref0_27)
}
#[doc = "Comp. B Int. Ref.0 Select 4 : 29/32"]
#[inline(always)]
pub fn cbref0_28(self) -> &'a mut crate::W<REG> {
self.variant(Cbref0::Cbref0_28)
}
#[doc = "Comp. B Int. Ref.0 Select 5 : 30/32"]
#[inline(always)]
pub fn cbref0_29(self) -> &'a mut crate::W<REG> {
self.variant(Cbref0::Cbref0_29)
}
#[doc = "Comp. B Int. Ref.0 Select 6 : 31/32"]
#[inline(always)]
pub fn cbref0_30(self) -> &'a mut crate::W<REG> {
self.variant(Cbref0::Cbref0_30)
}
#[doc = "Comp. B Int. Ref.0 Select 7 : 32/32"]
#[inline(always)]
pub fn cbref0_31(self) -> &'a mut crate::W<REG> {
self.variant(Cbref0::Cbref0_31)
}
}
#[doc = "Field `CBRSEL` reader - Comp. B Reference select"]
pub type CbrselR = crate::BitReader;
#[doc = "Field `CBRSEL` writer - Comp. B Reference select"]
pub type CbrselW<'a, REG> = crate::BitWriter<'a, REG>;
#[doc = "Comp. B Reference Source Bit : 0\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
#[repr(u8)]
pub enum Cbrs {
#[doc = "0: Comp. B Reference Source 0 : Off"]
Cbrs0 = 0,
#[doc = "1: Comp. B Reference Source 1 : Vcc"]
Cbrs1 = 1,
#[doc = "2: Comp. B Reference Source 2 : Shared Ref."]
Cbrs2 = 2,
#[doc = "3: Comp. B Reference Source 3 : Shared Ref. / Off"]
Cbrs3 = 3,
}
impl From<Cbrs> for u8 {
#[inline(always)]
fn from(variant: Cbrs) -> Self {
variant as _
}
}
impl crate::FieldSpec for Cbrs {
type Ux = u8;
}
impl crate::IsEnum for Cbrs {}
#[doc = "Field `CBRS` reader - Comp. B Reference Source Bit : 0"]
pub type CbrsR = crate::FieldReader<Cbrs>;
impl CbrsR {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub const fn variant(&self) -> Cbrs {
match self.bits {
0 => Cbrs::Cbrs0,
1 => Cbrs::Cbrs1,
2 => Cbrs::Cbrs2,
3 => Cbrs::Cbrs3,
_ => unreachable!(),
}
}
#[doc = "Comp. B Reference Source 0 : Off"]
#[inline(always)]
pub fn is_cbrs_0(&self) -> bool {
*self == Cbrs::Cbrs0
}
#[doc = "Comp. B Reference Source 1 : Vcc"]
#[inline(always)]
pub fn is_cbrs_1(&self) -> bool {
*self == Cbrs::Cbrs1
}
#[doc = "Comp. B Reference Source 2 : Shared Ref."]
#[inline(always)]
pub fn is_cbrs_2(&self) -> bool {
*self == Cbrs::Cbrs2
}
#[doc = "Comp. B Reference Source 3 : Shared Ref. / Off"]
#[inline(always)]
pub fn is_cbrs_3(&self) -> bool {
*self == Cbrs::Cbrs3
}
}
#[doc = "Field `CBRS` writer - Comp. B Reference Source Bit : 0"]
pub type CbrsW<'a, REG> = crate::FieldWriter<'a, REG, 2, Cbrs, crate::Safe>;
impl<'a, REG> CbrsW<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
REG::Ux: From<u8>,
{
#[doc = "Comp. B Reference Source 0 : Off"]
#[inline(always)]
pub fn cbrs_0(self) -> &'a mut crate::W<REG> {
self.variant(Cbrs::Cbrs0)
}
#[doc = "Comp. B Reference Source 1 : Vcc"]
#[inline(always)]
pub fn cbrs_1(self) -> &'a mut crate::W<REG> {
self.variant(Cbrs::Cbrs1)
}
#[doc = "Comp. B Reference Source 2 : Shared Ref."]
#[inline(always)]
pub fn cbrs_2(self) -> &'a mut crate::W<REG> {
self.variant(Cbrs::Cbrs2)
}
#[doc = "Comp. B Reference Source 3 : Shared Ref. / Off"]
#[inline(always)]
pub fn cbrs_3(self) -> &'a mut crate::W<REG> {
self.variant(Cbrs::Cbrs3)
}
}
#[doc = "Comp. B Reference 1 Resistor Select Bit : 0\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
#[repr(u8)]
pub enum Cbref1 {
#[doc = "0: Comp. B Int. Ref.1 Select 0 : 1/32"]
Cbref1_0 = 0,
#[doc = "1: Comp. B Int. Ref.1 Select 1 : 2/32"]
Cbref1_1 = 1,
#[doc = "2: Comp. B Int. Ref.1 Select 2 : 3/32"]
Cbref1_2 = 2,
#[doc = "3: Comp. B Int. Ref.1 Select 3 : 4/32"]
Cbref1_3 = 3,
#[doc = "4: Comp. B Int. Ref.1 Select 4 : 5/32"]
Cbref1_4 = 4,
#[doc = "5: Comp. B Int. Ref.1 Select 5 : 6/32"]
Cbref1_5 = 5,
#[doc = "6: Comp. B Int. Ref.1 Select 6 : 7/32"]
Cbref1_6 = 6,
#[doc = "7: Comp. B Int. Ref.1 Select 7 : 8/32"]
Cbref1_7 = 7,
#[doc = "8: Comp. B Int. Ref.1 Select 0 : 9/32"]
Cbref1_8 = 8,
#[doc = "9: Comp. B Int. Ref.1 Select 1 : 10/32"]
Cbref1_9 = 9,
#[doc = "10: Comp. B Int. Ref.1 Select 2 : 11/32"]
Cbref1_10 = 10,
#[doc = "11: Comp. B Int. Ref.1 Select 3 : 12/32"]
Cbref1_11 = 11,
#[doc = "12: Comp. B Int. Ref.1 Select 4 : 13/32"]
Cbref1_12 = 12,
#[doc = "13: Comp. B Int. Ref.1 Select 5 : 14/32"]
Cbref1_13 = 13,
#[doc = "14: Comp. B Int. Ref.1 Select 6 : 15/32"]
Cbref1_14 = 14,
#[doc = "15: Comp. B Int. Ref.1 Select 7 : 16/32"]
Cbref1_15 = 15,
#[doc = "16: Comp. B Int. Ref.1 Select 0 : 17/32"]
Cbref1_16 = 16,
#[doc = "17: Comp. B Int. Ref.1 Select 1 : 18/32"]
Cbref1_17 = 17,
#[doc = "18: Comp. B Int. Ref.1 Select 2 : 19/32"]
Cbref1_18 = 18,
#[doc = "19: Comp. B Int. Ref.1 Select 3 : 20/32"]
Cbref1_19 = 19,
#[doc = "20: Comp. B Int. Ref.1 Select 4 : 21/32"]
Cbref1_20 = 20,
#[doc = "21: Comp. B Int. Ref.1 Select 5 : 22/32"]
Cbref1_21 = 21,
#[doc = "22: Comp. B Int. Ref.1 Select 6 : 23/32"]
Cbref1_22 = 22,
#[doc = "23: Comp. B Int. Ref.1 Select 7 : 24/32"]
Cbref1_23 = 23,
#[doc = "24: Comp. B Int. Ref.1 Select 0 : 25/32"]
Cbref1_24 = 24,
#[doc = "25: Comp. B Int. Ref.1 Select 1 : 26/32"]
Cbref1_25 = 25,
#[doc = "26: Comp. B Int. Ref.1 Select 2 : 27/32"]
Cbref1_26 = 26,
#[doc = "27: Comp. B Int. Ref.1 Select 3 : 28/32"]
Cbref1_27 = 27,
#[doc = "28: Comp. B Int. Ref.1 Select 4 : 29/32"]
Cbref1_28 = 28,
#[doc = "29: Comp. B Int. Ref.1 Select 5 : 30/32"]
Cbref1_29 = 29,
#[doc = "30: Comp. B Int. Ref.1 Select 6 : 31/32"]
Cbref1_30 = 30,
#[doc = "31: Comp. B Int. Ref.1 Select 7 : 32/32"]
Cbref1_31 = 31,
}
impl From<Cbref1> for u8 {
#[inline(always)]
fn from(variant: Cbref1) -> Self {
variant as _
}
}
impl crate::FieldSpec for Cbref1 {
type Ux = u8;
}
impl crate::IsEnum for Cbref1 {}
#[doc = "Field `CBREF1` reader - Comp. B Reference 1 Resistor Select Bit : 0"]
pub type Cbref1R = crate::FieldReader<Cbref1>;
impl Cbref1R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub const fn variant(&self) -> Cbref1 {
match self.bits {
0 => Cbref1::Cbref1_0,
1 => Cbref1::Cbref1_1,
2 => Cbref1::Cbref1_2,
3 => Cbref1::Cbref1_3,
4 => Cbref1::Cbref1_4,
5 => Cbref1::Cbref1_5,
6 => Cbref1::Cbref1_6,
7 => Cbref1::Cbref1_7,
8 => Cbref1::Cbref1_8,
9 => Cbref1::Cbref1_9,
10 => Cbref1::Cbref1_10,
11 => Cbref1::Cbref1_11,
12 => Cbref1::Cbref1_12,
13 => Cbref1::Cbref1_13,
14 => Cbref1::Cbref1_14,
15 => Cbref1::Cbref1_15,
16 => Cbref1::Cbref1_16,
17 => Cbref1::Cbref1_17,
18 => Cbref1::Cbref1_18,
19 => Cbref1::Cbref1_19,
20 => Cbref1::Cbref1_20,
21 => Cbref1::Cbref1_21,
22 => Cbref1::Cbref1_22,
23 => Cbref1::Cbref1_23,
24 => Cbref1::Cbref1_24,
25 => Cbref1::Cbref1_25,
26 => Cbref1::Cbref1_26,
27 => Cbref1::Cbref1_27,
28 => Cbref1::Cbref1_28,
29 => Cbref1::Cbref1_29,
30 => Cbref1::Cbref1_30,
31 => Cbref1::Cbref1_31,
_ => unreachable!(),
}
}
#[doc = "Comp. B Int. Ref.1 Select 0 : 1/32"]
#[inline(always)]
pub fn is_cbref1_0(&self) -> bool {
*self == Cbref1::Cbref1_0
}
#[doc = "Comp. B Int. Ref.1 Select 1 : 2/32"]
#[inline(always)]
pub fn is_cbref1_1(&self) -> bool {
*self == Cbref1::Cbref1_1
}
#[doc = "Comp. B Int. Ref.1 Select 2 : 3/32"]
#[inline(always)]
pub fn is_cbref1_2(&self) -> bool {
*self == Cbref1::Cbref1_2
}
#[doc = "Comp. B Int. Ref.1 Select 3 : 4/32"]
#[inline(always)]
pub fn is_cbref1_3(&self) -> bool {
*self == Cbref1::Cbref1_3
}
#[doc = "Comp. B Int. Ref.1 Select 4 : 5/32"]
#[inline(always)]
pub fn is_cbref1_4(&self) -> bool {
*self == Cbref1::Cbref1_4
}
#[doc = "Comp. B Int. Ref.1 Select 5 : 6/32"]
#[inline(always)]
pub fn is_cbref1_5(&self) -> bool {
*self == Cbref1::Cbref1_5
}
#[doc = "Comp. B Int. Ref.1 Select 6 : 7/32"]
#[inline(always)]
pub fn is_cbref1_6(&self) -> bool {
*self == Cbref1::Cbref1_6
}
#[doc = "Comp. B Int. Ref.1 Select 7 : 8/32"]
#[inline(always)]
pub fn is_cbref1_7(&self) -> bool {
*self == Cbref1::Cbref1_7
}
#[doc = "Comp. B Int. Ref.1 Select 0 : 9/32"]
#[inline(always)]
pub fn is_cbref1_8(&self) -> bool {
*self == Cbref1::Cbref1_8
}
#[doc = "Comp. B Int. Ref.1 Select 1 : 10/32"]
#[inline(always)]
pub fn is_cbref1_9(&self) -> bool {
*self == Cbref1::Cbref1_9
}
#[doc = "Comp. B Int. Ref.1 Select 2 : 11/32"]
#[inline(always)]
pub fn is_cbref1_10(&self) -> bool {
*self == Cbref1::Cbref1_10
}
#[doc = "Comp. B Int. Ref.1 Select 3 : 12/32"]
#[inline(always)]
pub fn is_cbref1_11(&self) -> bool {
*self == Cbref1::Cbref1_11
}
#[doc = "Comp. B Int. Ref.1 Select 4 : 13/32"]
#[inline(always)]
pub fn is_cbref1_12(&self) -> bool {
*self == Cbref1::Cbref1_12
}
#[doc = "Comp. B Int. Ref.1 Select 5 : 14/32"]
#[inline(always)]
pub fn is_cbref1_13(&self) -> bool {
*self == Cbref1::Cbref1_13
}
#[doc = "Comp. B Int. Ref.1 Select 6 : 15/32"]
#[inline(always)]
pub fn is_cbref1_14(&self) -> bool {
*self == Cbref1::Cbref1_14
}
#[doc = "Comp. B Int. Ref.1 Select 7 : 16/32"]
#[inline(always)]
pub fn is_cbref1_15(&self) -> bool {
*self == Cbref1::Cbref1_15
}
#[doc = "Comp. B Int. Ref.1 Select 0 : 17/32"]
#[inline(always)]
pub fn is_cbref1_16(&self) -> bool {
*self == Cbref1::Cbref1_16
}
#[doc = "Comp. B Int. Ref.1 Select 1 : 18/32"]
#[inline(always)]
pub fn is_cbref1_17(&self) -> bool {
*self == Cbref1::Cbref1_17
}
#[doc = "Comp. B Int. Ref.1 Select 2 : 19/32"]
#[inline(always)]
pub fn is_cbref1_18(&self) -> bool {
*self == Cbref1::Cbref1_18
}
#[doc = "Comp. B Int. Ref.1 Select 3 : 20/32"]
#[inline(always)]
pub fn is_cbref1_19(&self) -> bool {
*self == Cbref1::Cbref1_19
}
#[doc = "Comp. B Int. Ref.1 Select 4 : 21/32"]
#[inline(always)]
pub fn is_cbref1_20(&self) -> bool {
*self == Cbref1::Cbref1_20
}
#[doc = "Comp. B Int. Ref.1 Select 5 : 22/32"]
#[inline(always)]
pub fn is_cbref1_21(&self) -> bool {
*self == Cbref1::Cbref1_21
}
#[doc = "Comp. B Int. Ref.1 Select 6 : 23/32"]
#[inline(always)]
pub fn is_cbref1_22(&self) -> bool {
*self == Cbref1::Cbref1_22
}
#[doc = "Comp. B Int. Ref.1 Select 7 : 24/32"]
#[inline(always)]
pub fn is_cbref1_23(&self) -> bool {
*self == Cbref1::Cbref1_23
}
#[doc = "Comp. B Int. Ref.1 Select 0 : 25/32"]
#[inline(always)]
pub fn is_cbref1_24(&self) -> bool {
*self == Cbref1::Cbref1_24
}
#[doc = "Comp. B Int. Ref.1 Select 1 : 26/32"]
#[inline(always)]
pub fn is_cbref1_25(&self) -> bool {
*self == Cbref1::Cbref1_25
}
#[doc = "Comp. B Int. Ref.1 Select 2 : 27/32"]
#[inline(always)]
pub fn is_cbref1_26(&self) -> bool {
*self == Cbref1::Cbref1_26
}
#[doc = "Comp. B Int. Ref.1 Select 3 : 28/32"]
#[inline(always)]
pub fn is_cbref1_27(&self) -> bool {
*self == Cbref1::Cbref1_27
}
#[doc = "Comp. B Int. Ref.1 Select 4 : 29/32"]
#[inline(always)]
pub fn is_cbref1_28(&self) -> bool {
*self == Cbref1::Cbref1_28
}
#[doc = "Comp. B Int. Ref.1 Select 5 : 30/32"]
#[inline(always)]
pub fn is_cbref1_29(&self) -> bool {
*self == Cbref1::Cbref1_29
}
#[doc = "Comp. B Int. Ref.1 Select 6 : 31/32"]
#[inline(always)]
pub fn is_cbref1_30(&self) -> bool {
*self == Cbref1::Cbref1_30
}
#[doc = "Comp. B Int. Ref.1 Select 7 : 32/32"]
#[inline(always)]
pub fn is_cbref1_31(&self) -> bool {
*self == Cbref1::Cbref1_31
}
}
#[doc = "Field `CBREF1` writer - Comp. B Reference 1 Resistor Select Bit : 0"]
pub type Cbref1W<'a, REG> = crate::FieldWriter<'a, REG, 5, Cbref1, crate::Safe>;
impl<'a, REG> Cbref1W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
REG::Ux: From<u8>,
{
#[doc = "Comp. B Int. Ref.1 Select 0 : 1/32"]
#[inline(always)]
pub fn cbref1_0(self) -> &'a mut crate::W<REG> {
self.variant(Cbref1::Cbref1_0)
}
#[doc = "Comp. B Int. Ref.1 Select 1 : 2/32"]
#[inline(always)]
pub fn cbref1_1(self) -> &'a mut crate::W<REG> {
self.variant(Cbref1::Cbref1_1)
}
#[doc = "Comp. B Int. Ref.1 Select 2 : 3/32"]
#[inline(always)]
pub fn cbref1_2(self) -> &'a mut crate::W<REG> {
self.variant(Cbref1::Cbref1_2)
}
#[doc = "Comp. B Int. Ref.1 Select 3 : 4/32"]
#[inline(always)]
pub fn cbref1_3(self) -> &'a mut crate::W<REG> {
self.variant(Cbref1::Cbref1_3)
}
#[doc = "Comp. B Int. Ref.1 Select 4 : 5/32"]
#[inline(always)]
pub fn cbref1_4(self) -> &'a mut crate::W<REG> {
self.variant(Cbref1::Cbref1_4)
}
#[doc = "Comp. B Int. Ref.1 Select 5 : 6/32"]
#[inline(always)]
pub fn cbref1_5(self) -> &'a mut crate::W<REG> {
self.variant(Cbref1::Cbref1_5)
}
#[doc = "Comp. B Int. Ref.1 Select 6 : 7/32"]
#[inline(always)]
pub fn cbref1_6(self) -> &'a mut crate::W<REG> {
self.variant(Cbref1::Cbref1_6)
}
#[doc = "Comp. B Int. Ref.1 Select 7 : 8/32"]
#[inline(always)]
pub fn cbref1_7(self) -> &'a mut crate::W<REG> {
self.variant(Cbref1::Cbref1_7)
}
#[doc = "Comp. B Int. Ref.1 Select 0 : 9/32"]
#[inline(always)]
pub fn cbref1_8(self) -> &'a mut crate::W<REG> {
self.variant(Cbref1::Cbref1_8)
}
#[doc = "Comp. B Int. Ref.1 Select 1 : 10/32"]
#[inline(always)]
pub fn cbref1_9(self) -> &'a mut crate::W<REG> {
self.variant(Cbref1::Cbref1_9)
}
#[doc = "Comp. B Int. Ref.1 Select 2 : 11/32"]
#[inline(always)]
pub fn cbref1_10(self) -> &'a mut crate::W<REG> {
self.variant(Cbref1::Cbref1_10)
}
#[doc = "Comp. B Int. Ref.1 Select 3 : 12/32"]
#[inline(always)]
pub fn cbref1_11(self) -> &'a mut crate::W<REG> {
self.variant(Cbref1::Cbref1_11)
}
#[doc = "Comp. B Int. Ref.1 Select 4 : 13/32"]
#[inline(always)]
pub fn cbref1_12(self) -> &'a mut crate::W<REG> {
self.variant(Cbref1::Cbref1_12)
}
#[doc = "Comp. B Int. Ref.1 Select 5 : 14/32"]
#[inline(always)]
pub fn cbref1_13(self) -> &'a mut crate::W<REG> {
self.variant(Cbref1::Cbref1_13)
}
#[doc = "Comp. B Int. Ref.1 Select 6 : 15/32"]
#[inline(always)]
pub fn cbref1_14(self) -> &'a mut crate::W<REG> {
self.variant(Cbref1::Cbref1_14)
}
#[doc = "Comp. B Int. Ref.1 Select 7 : 16/32"]
#[inline(always)]
pub fn cbref1_15(self) -> &'a mut crate::W<REG> {
self.variant(Cbref1::Cbref1_15)
}
#[doc = "Comp. B Int. Ref.1 Select 0 : 17/32"]
#[inline(always)]
pub fn cbref1_16(self) -> &'a mut crate::W<REG> {
self.variant(Cbref1::Cbref1_16)
}
#[doc = "Comp. B Int. Ref.1 Select 1 : 18/32"]
#[inline(always)]
pub fn cbref1_17(self) -> &'a mut crate::W<REG> {
self.variant(Cbref1::Cbref1_17)
}
#[doc = "Comp. B Int. Ref.1 Select 2 : 19/32"]
#[inline(always)]
pub fn cbref1_18(self) -> &'a mut crate::W<REG> {
self.variant(Cbref1::Cbref1_18)
}
#[doc = "Comp. B Int. Ref.1 Select 3 : 20/32"]
#[inline(always)]
pub fn cbref1_19(self) -> &'a mut crate::W<REG> {
self.variant(Cbref1::Cbref1_19)
}
#[doc = "Comp. B Int. Ref.1 Select 4 : 21/32"]
#[inline(always)]
pub fn cbref1_20(self) -> &'a mut crate::W<REG> {
self.variant(Cbref1::Cbref1_20)
}
#[doc = "Comp. B Int. Ref.1 Select 5 : 22/32"]
#[inline(always)]
pub fn cbref1_21(self) -> &'a mut crate::W<REG> {
self.variant(Cbref1::Cbref1_21)
}
#[doc = "Comp. B Int. Ref.1 Select 6 : 23/32"]
#[inline(always)]
pub fn cbref1_22(self) -> &'a mut crate::W<REG> {
self.variant(Cbref1::Cbref1_22)
}
#[doc = "Comp. B Int. Ref.1 Select 7 : 24/32"]
#[inline(always)]
pub fn cbref1_23(self) -> &'a mut crate::W<REG> {
self.variant(Cbref1::Cbref1_23)
}
#[doc = "Comp. B Int. Ref.1 Select 0 : 25/32"]
#[inline(always)]
pub fn cbref1_24(self) -> &'a mut crate::W<REG> {
self.variant(Cbref1::Cbref1_24)
}
#[doc = "Comp. B Int. Ref.1 Select 1 : 26/32"]
#[inline(always)]
pub fn cbref1_25(self) -> &'a mut crate::W<REG> {
self.variant(Cbref1::Cbref1_25)
}
#[doc = "Comp. B Int. Ref.1 Select 2 : 27/32"]
#[inline(always)]
pub fn cbref1_26(self) -> &'a mut crate::W<REG> {
self.variant(Cbref1::Cbref1_26)
}
#[doc = "Comp. B Int. Ref.1 Select 3 : 28/32"]
#[inline(always)]
pub fn cbref1_27(self) -> &'a mut crate::W<REG> {
self.variant(Cbref1::Cbref1_27)
}
#[doc = "Comp. B Int. Ref.1 Select 4 : 29/32"]
#[inline(always)]
pub fn cbref1_28(self) -> &'a mut crate::W<REG> {
self.variant(Cbref1::Cbref1_28)
}
#[doc = "Comp. B Int. Ref.1 Select 5 : 30/32"]
#[inline(always)]
pub fn cbref1_29(self) -> &'a mut crate::W<REG> {
self.variant(Cbref1::Cbref1_29)
}
#[doc = "Comp. B Int. Ref.1 Select 6 : 31/32"]
#[inline(always)]
pub fn cbref1_30(self) -> &'a mut crate::W<REG> {
self.variant(Cbref1::Cbref1_30)
}
#[doc = "Comp. B Int. Ref.1 Select 7 : 32/32"]
#[inline(always)]
pub fn cbref1_31(self) -> &'a mut crate::W<REG> {
self.variant(Cbref1::Cbref1_31)
}
}
#[doc = "Comp. B Reference voltage level Bit : 0\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
#[repr(u8)]
pub enum Cbrefl {
#[doc = "0: Comp. B Reference voltage level 0 : None"]
Cbrefl0 = 0,
#[doc = "1: Comp. B Reference voltage level 1 : 1.5V"]
Cbrefl1 = 1,
#[doc = "2: Comp. B Reference voltage level 2 : 2.0V"]
Cbrefl2 = 2,
#[doc = "3: Comp. B Reference voltage level 3 : 2.5V"]
Cbrefl3 = 3,
}
impl From<Cbrefl> for u8 {
#[inline(always)]
fn from(variant: Cbrefl) -> Self {
variant as _
}
}
impl crate::FieldSpec for Cbrefl {
type Ux = u8;
}
impl crate::IsEnum for Cbrefl {}
#[doc = "Field `CBREFL` reader - Comp. B Reference voltage level Bit : 0"]
pub type CbreflR = crate::FieldReader<Cbrefl>;
impl CbreflR {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub const fn variant(&self) -> Cbrefl {
match self.bits {
0 => Cbrefl::Cbrefl0,
1 => Cbrefl::Cbrefl1,
2 => Cbrefl::Cbrefl2,
3 => Cbrefl::Cbrefl3,
_ => unreachable!(),
}
}
#[doc = "Comp. B Reference voltage level 0 : None"]
#[inline(always)]
pub fn is_cbrefl_0(&self) -> bool {
*self == Cbrefl::Cbrefl0
}
#[doc = "Comp. B Reference voltage level 1 : 1.5V"]
#[inline(always)]
pub fn is_cbrefl_1(&self) -> bool {
*self == Cbrefl::Cbrefl1
}
#[doc = "Comp. B Reference voltage level 2 : 2.0V"]
#[inline(always)]
pub fn is_cbrefl_2(&self) -> bool {
*self == Cbrefl::Cbrefl2
}
#[doc = "Comp. B Reference voltage level 3 : 2.5V"]
#[inline(always)]
pub fn is_cbrefl_3(&self) -> bool {
*self == Cbrefl::Cbrefl3
}
}
#[doc = "Field `CBREFL` writer - Comp. B Reference voltage level Bit : 0"]
pub type CbreflW<'a, REG> = crate::FieldWriter<'a, REG, 2, Cbrefl, crate::Safe>;
impl<'a, REG> CbreflW<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
REG::Ux: From<u8>,
{
#[doc = "Comp. B Reference voltage level 0 : None"]
#[inline(always)]
pub fn cbrefl_0(self) -> &'a mut crate::W<REG> {
self.variant(Cbrefl::Cbrefl0)
}
#[doc = "Comp. B Reference voltage level 1 : 1.5V"]
#[inline(always)]
pub fn cbrefl_1(self) -> &'a mut crate::W<REG> {
self.variant(Cbrefl::Cbrefl1)
}
#[doc = "Comp. B Reference voltage level 2 : 2.0V"]
#[inline(always)]
pub fn cbrefl_2(self) -> &'a mut crate::W<REG> {
self.variant(Cbrefl::Cbrefl2)
}
#[doc = "Comp. B Reference voltage level 3 : 2.5V"]
#[inline(always)]
pub fn cbrefl_3(self) -> &'a mut crate::W<REG> {
self.variant(Cbrefl::Cbrefl3)
}
}
#[doc = "Field `CBREFACC` reader - Comp. B Reference Accuracy"]
pub type CbrefaccR = crate::BitReader;
#[doc = "Field `CBREFACC` writer - Comp. B Reference Accuracy"]
pub type CbrefaccW<'a, REG> = crate::BitWriter<'a, REG>;
impl R {
#[doc = "Bits 0:4 - Comp. B Reference 0 Resistor Select Bit : 0"]
#[inline(always)]
pub fn cbref0(&self) -> Cbref0R {
Cbref0R::new((self.bits & 0x1f) as u8)
}
#[doc = "Bit 5 - Comp. B Reference select"]
#[inline(always)]
pub fn cbrsel(&self) -> CbrselR {
CbrselR::new(((self.bits >> 5) & 1) != 0)
}
#[doc = "Bits 6:7 - Comp. B Reference Source Bit : 0"]
#[inline(always)]
pub fn cbrs(&self) -> CbrsR {
CbrsR::new(((self.bits >> 6) & 3) as u8)
}
#[doc = "Bits 8:12 - Comp. B Reference 1 Resistor Select Bit : 0"]
#[inline(always)]
pub fn cbref1(&self) -> Cbref1R {
Cbref1R::new(((self.bits >> 8) & 0x1f) as u8)
}
#[doc = "Bits 13:14 - Comp. B Reference voltage level Bit : 0"]
#[inline(always)]
pub fn cbrefl(&self) -> CbreflR {
CbreflR::new(((self.bits >> 13) & 3) as u8)
}
#[doc = "Bit 15 - Comp. B Reference Accuracy"]
#[inline(always)]
pub fn cbrefacc(&self) -> CbrefaccR {
CbrefaccR::new(((self.bits >> 15) & 1) != 0)
}
}
impl W {
#[doc = "Bits 0:4 - Comp. B Reference 0 Resistor Select Bit : 0"]
#[inline(always)]
pub fn cbref0(&mut self) -> Cbref0W<'_, Cbctl2Spec> {
Cbref0W::new(self, 0)
}
#[doc = "Bit 5 - Comp. B Reference select"]
#[inline(always)]
pub fn cbrsel(&mut self) -> CbrselW<'_, Cbctl2Spec> {
CbrselW::new(self, 5)
}
#[doc = "Bits 6:7 - Comp. B Reference Source Bit : 0"]
#[inline(always)]
pub fn cbrs(&mut self) -> CbrsW<'_, Cbctl2Spec> {
CbrsW::new(self, 6)
}
#[doc = "Bits 8:12 - Comp. B Reference 1 Resistor Select Bit : 0"]
#[inline(always)]
pub fn cbref1(&mut self) -> Cbref1W<'_, Cbctl2Spec> {
Cbref1W::new(self, 8)
}
#[doc = "Bits 13:14 - Comp. B Reference voltage level Bit : 0"]
#[inline(always)]
pub fn cbrefl(&mut self) -> CbreflW<'_, Cbctl2Spec> {
CbreflW::new(self, 13)
}
#[doc = "Bit 15 - Comp. B Reference Accuracy"]
#[inline(always)]
pub fn cbrefacc(&mut self) -> CbrefaccW<'_, Cbctl2Spec> {
CbrefaccW::new(self, 15)
}
}
#[doc = "Comparator B Control Register 2\n\nYou can [`read`](crate::Reg::read) this register and get [`cbctl2::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`cbctl2::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
pub struct Cbctl2Spec;
impl crate::RegisterSpec for Cbctl2Spec {
type Ux = u16;
}
#[doc = "`read()` method returns [`cbctl2::R`](R) reader structure"]
impl crate::Readable for Cbctl2Spec {}
#[doc = "`write(|w| ..)` method takes [`cbctl2::W`](W) writer structure"]
impl crate::Writable for Cbctl2Spec {
type Safety = crate::Unsafe;
}
#[doc = "`reset()` method sets CBCTL2 to value 0"]
impl crate::Resettable for Cbctl2Spec {}