#[doc = "Register `CTRLA` reader"]
pub type R = crate::R<CtrlaSpec>;
#[doc = "Register `CTRLA` writer"]
pub type W = crate::W<CtrlaSpec>;
#[doc = "Field `SWRST` reader - Software Reset"]
pub type SwrstR = crate::BitReader;
#[doc = "Field `SWRST` writer - Software Reset"]
pub type SwrstW<'a, REG> = crate::BitWriter<'a, REG>;
#[doc = "Field `ENABLE` reader - Enable"]
pub type EnableR = crate::BitReader;
#[doc = "Field `ENABLE` writer - Enable"]
pub type EnableW<'a, REG> = crate::BitWriter<'a, REG>;
#[doc = "Duty Ratio\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
#[repr(u8)]
pub enum Dutyselect {
    #[doc = "0: Static duty"]
    Static = 0,
    #[doc = "1: 1/2 duty"]
    Half = 1,
    #[doc = "2: 1/3 duty"]
    Third = 2,
    #[doc = "3: 1/4 duty"]
    Fourth = 3,
    #[doc = "4: 1/6 duty"]
    Sixth = 4,
    #[doc = "5: 1/8 duty"]
    Eight = 5,
}
impl From<Dutyselect> for u8 {
    #[inline(always)]
    fn from(variant: Dutyselect) -> Self {
        variant as _
    }
}
impl crate::FieldSpec for Dutyselect {
    type Ux = u8;
}
impl crate::IsEnum for Dutyselect {}
#[doc = "Field `DUTY` reader - Duty Ratio"]
pub type DutyR = crate::FieldReader<Dutyselect>;
impl DutyR {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub const fn variant(&self) -> Option<Dutyselect> {
        match self.bits {
            0 => Some(Dutyselect::Static),
            1 => Some(Dutyselect::Half),
            2 => Some(Dutyselect::Third),
            3 => Some(Dutyselect::Fourth),
            4 => Some(Dutyselect::Sixth),
            5 => Some(Dutyselect::Eight),
            _ => None,
        }
    }
    #[doc = "Static duty"]
    #[inline(always)]
    pub fn is_static(&self) -> bool {
        *self == Dutyselect::Static
    }
    #[doc = "1/2 duty"]
    #[inline(always)]
    pub fn is_half(&self) -> bool {
        *self == Dutyselect::Half
    }
    #[doc = "1/3 duty"]
    #[inline(always)]
    pub fn is_third(&self) -> bool {
        *self == Dutyselect::Third
    }
    #[doc = "1/4 duty"]
    #[inline(always)]
    pub fn is_fourth(&self) -> bool {
        *self == Dutyselect::Fourth
    }
    #[doc = "1/6 duty"]
    #[inline(always)]
    pub fn is_sixth(&self) -> bool {
        *self == Dutyselect::Sixth
    }
    #[doc = "1/8 duty"]
    #[inline(always)]
    pub fn is_eight(&self) -> bool {
        *self == Dutyselect::Eight
    }
}
#[doc = "Field `DUTY` writer - Duty Ratio"]
pub type DutyW<'a, REG> = crate::FieldWriter<'a, REG, 3, Dutyselect>;
impl<'a, REG> DutyW<'a, REG>
where
    REG: crate::Writable + crate::RegisterSpec,
    REG::Ux: From<u8>,
{
    #[doc = "Static duty"]
    #[inline(always)]
    pub fn static_(self) -> &'a mut crate::W<REG> {
        self.variant(Dutyselect::Static)
    }
    #[doc = "1/2 duty"]
    #[inline(always)]
    pub fn half(self) -> &'a mut crate::W<REG> {
        self.variant(Dutyselect::Half)
    }
    #[doc = "1/3 duty"]
    #[inline(always)]
    pub fn third(self) -> &'a mut crate::W<REG> {
        self.variant(Dutyselect::Third)
    }
    #[doc = "1/4 duty"]
    #[inline(always)]
    pub fn fourth(self) -> &'a mut crate::W<REG> {
        self.variant(Dutyselect::Fourth)
    }
    #[doc = "1/6 duty"]
    #[inline(always)]
    pub fn sixth(self) -> &'a mut crate::W<REG> {
        self.variant(Dutyselect::Sixth)
    }
    #[doc = "1/8 duty"]
    #[inline(always)]
    pub fn eight(self) -> &'a mut crate::W<REG> {
        self.variant(Dutyselect::Eight)
    }
}
#[doc = "Waveform Mode\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum Wmodselect {
    #[doc = "0: Low Power Waveform Mode"]
    Lp = 0,
    #[doc = "1: Standard Waveform Mode"]
    Std = 1,
}
impl From<Wmodselect> for bool {
    #[inline(always)]
    fn from(variant: Wmodselect) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `WMOD` reader - Waveform Mode"]
pub type WmodR = crate::BitReader<Wmodselect>;
impl WmodR {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub const fn variant(&self) -> Wmodselect {
        match self.bits {
            false => Wmodselect::Lp,
            true => Wmodselect::Std,
        }
    }
    #[doc = "Low Power Waveform Mode"]
    #[inline(always)]
    pub fn is_lp(&self) -> bool {
        *self == Wmodselect::Lp
    }
    #[doc = "Standard Waveform Mode"]
    #[inline(always)]
    pub fn is_std(&self) -> bool {
        *self == Wmodselect::Std
    }
}
#[doc = "Field `WMOD` writer - Waveform Mode"]
pub type WmodW<'a, REG> = crate::BitWriter<'a, REG, Wmodselect>;
impl<'a, REG> WmodW<'a, REG>
where
    REG: crate::Writable + crate::RegisterSpec,
{
    #[doc = "Low Power Waveform Mode"]
    #[inline(always)]
    pub fn lp(self) -> &'a mut crate::W<REG> {
        self.variant(Wmodselect::Lp)
    }
    #[doc = "Standard Waveform Mode"]
    #[inline(always)]
    pub fn std(self) -> &'a mut crate::W<REG> {
        self.variant(Wmodselect::Std)
    }
}
#[doc = "Field `RUNSTDBY` reader - Run in Standby"]
pub type RunstdbyR = crate::BitReader;
#[doc = "Field `RUNSTDBY` writer - Run in Standby"]
pub type RunstdbyW<'a, REG> = crate::BitWriter<'a, REG>;
#[doc = "Clock Prescaler\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
#[repr(u8)]
pub enum Prescselect {
    #[doc = "0: 16"]
    Presc16 = 0,
    #[doc = "1: 32"]
    Presc32 = 1,
    #[doc = "2: 64"]
    Presc64 = 2,
    #[doc = "3: 128"]
    Presc128 = 3,
}
impl From<Prescselect> for u8 {
    #[inline(always)]
    fn from(variant: Prescselect) -> Self {
        variant as _
    }
}
impl crate::FieldSpec for Prescselect {
    type Ux = u8;
}
impl crate::IsEnum for Prescselect {}
#[doc = "Field `PRESC` reader - Clock Prescaler"]
pub type PrescR = crate::FieldReader<Prescselect>;
impl PrescR {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub const fn variant(&self) -> Prescselect {
        match self.bits {
            0 => Prescselect::Presc16,
            1 => Prescselect::Presc32,
            2 => Prescselect::Presc64,
            3 => Prescselect::Presc128,
            _ => unreachable!(),
        }
    }
    #[doc = "16"]
    #[inline(always)]
    pub fn is_presc16(&self) -> bool {
        *self == Prescselect::Presc16
    }
    #[doc = "32"]
    #[inline(always)]
    pub fn is_presc32(&self) -> bool {
        *self == Prescselect::Presc32
    }
    #[doc = "64"]
    #[inline(always)]
    pub fn is_presc64(&self) -> bool {
        *self == Prescselect::Presc64
    }
    #[doc = "128"]
    #[inline(always)]
    pub fn is_presc128(&self) -> bool {
        *self == Prescselect::Presc128
    }
}
#[doc = "Field `PRESC` writer - Clock Prescaler"]
pub type PrescW<'a, REG> = crate::FieldWriter<'a, REG, 2, Prescselect, crate::Safe>;
impl<'a, REG> PrescW<'a, REG>
where
    REG: crate::Writable + crate::RegisterSpec,
    REG::Ux: From<u8>,
{
    #[doc = "16"]
    #[inline(always)]
    pub fn presc16(self) -> &'a mut crate::W<REG> {
        self.variant(Prescselect::Presc16)
    }
    #[doc = "32"]
    #[inline(always)]
    pub fn presc32(self) -> &'a mut crate::W<REG> {
        self.variant(Prescselect::Presc32)
    }
    #[doc = "64"]
    #[inline(always)]
    pub fn presc64(self) -> &'a mut crate::W<REG> {
        self.variant(Prescselect::Presc64)
    }
    #[doc = "128"]
    #[inline(always)]
    pub fn presc128(self) -> &'a mut crate::W<REG> {
        self.variant(Prescselect::Presc128)
    }
}
#[doc = "Field `CKDIV` reader - Clock Divider"]
pub type CkdivR = crate::FieldReader;
#[doc = "Field `CKDIV` writer - Clock Divider"]
pub type CkdivW<'a, REG> = crate::FieldWriter<'a, REG, 3>;
#[doc = "Bias Setting\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
#[repr(u8)]
pub enum Biasselect {
    #[doc = "0: Static"]
    Static = 0,
    #[doc = "1: 1/2 bias"]
    Half = 1,
    #[doc = "2: 1/3 bias"]
    Third = 2,
    #[doc = "3: 1/4 bias"]
    Fourth = 3,
}
impl From<Biasselect> for u8 {
    #[inline(always)]
    fn from(variant: Biasselect) -> Self {
        variant as _
    }
}
impl crate::FieldSpec for Biasselect {
    type Ux = u8;
}
impl crate::IsEnum for Biasselect {}
#[doc = "Field `BIAS` reader - Bias Setting"]
pub type BiasR = crate::FieldReader<Biasselect>;
impl BiasR {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub const fn variant(&self) -> Biasselect {
        match self.bits {
            0 => Biasselect::Static,
            1 => Biasselect::Half,
            2 => Biasselect::Third,
            3 => Biasselect::Fourth,
            _ => unreachable!(),
        }
    }
    #[doc = "Static"]
    #[inline(always)]
    pub fn is_static(&self) -> bool {
        *self == Biasselect::Static
    }
    #[doc = "1/2 bias"]
    #[inline(always)]
    pub fn is_half(&self) -> bool {
        *self == Biasselect::Half
    }
    #[doc = "1/3 bias"]
    #[inline(always)]
    pub fn is_third(&self) -> bool {
        *self == Biasselect::Third
    }
    #[doc = "1/4 bias"]
    #[inline(always)]
    pub fn is_fourth(&self) -> bool {
        *self == Biasselect::Fourth
    }
}
#[doc = "Field `BIAS` writer - Bias Setting"]
pub type BiasW<'a, REG> = crate::FieldWriter<'a, REG, 2, Biasselect, crate::Safe>;
impl<'a, REG> BiasW<'a, REG>
where
    REG: crate::Writable + crate::RegisterSpec,
    REG::Ux: From<u8>,
{
    #[doc = "Static"]
    #[inline(always)]
    pub fn static_(self) -> &'a mut crate::W<REG> {
        self.variant(Biasselect::Static)
    }
    #[doc = "1/2 bias"]
    #[inline(always)]
    pub fn half(self) -> &'a mut crate::W<REG> {
        self.variant(Biasselect::Half)
    }
    #[doc = "1/3 bias"]
    #[inline(always)]
    pub fn third(self) -> &'a mut crate::W<REG> {
        self.variant(Biasselect::Third)
    }
    #[doc = "1/4 bias"]
    #[inline(always)]
    pub fn fourth(self) -> &'a mut crate::W<REG> {
        self.variant(Biasselect::Fourth)
    }
}
#[doc = "Field `XVLCD` reader - External VLCD"]
pub type XvlcdR = crate::BitReader;
#[doc = "Field `XVLCD` writer - External VLCD"]
pub type XvlcdW<'a, REG> = crate::BitWriter<'a, REG>;
#[doc = "Power Refresh Frequency\n\nValue on reset: 1"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
#[repr(u8)]
pub enum Prfselect {
    #[doc = "0: 2kHz"]
    Pr2000 = 0,
    #[doc = "1: 1kHz"]
    Pr1000 = 1,
    #[doc = "2: 500Hz"]
    Pr500 = 2,
    #[doc = "3: 250Hz"]
    Pr250 = 3,
}
impl From<Prfselect> for u8 {
    #[inline(always)]
    fn from(variant: Prfselect) -> Self {
        variant as _
    }
}
impl crate::FieldSpec for Prfselect {
    type Ux = u8;
}
impl crate::IsEnum for Prfselect {}
#[doc = "Field `PRF` reader - Power Refresh Frequency"]
pub type PrfR = crate::FieldReader<Prfselect>;
impl PrfR {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub const fn variant(&self) -> Prfselect {
        match self.bits {
            0 => Prfselect::Pr2000,
            1 => Prfselect::Pr1000,
            2 => Prfselect::Pr500,
            3 => Prfselect::Pr250,
            _ => unreachable!(),
        }
    }
    #[doc = "2kHz"]
    #[inline(always)]
    pub fn is_pr2000(&self) -> bool {
        *self == Prfselect::Pr2000
    }
    #[doc = "1kHz"]
    #[inline(always)]
    pub fn is_pr1000(&self) -> bool {
        *self == Prfselect::Pr1000
    }
    #[doc = "500Hz"]
    #[inline(always)]
    pub fn is_pr500(&self) -> bool {
        *self == Prfselect::Pr500
    }
    #[doc = "250Hz"]
    #[inline(always)]
    pub fn is_pr250(&self) -> bool {
        *self == Prfselect::Pr250
    }
}
#[doc = "Field `PRF` writer - Power Refresh Frequency"]
pub type PrfW<'a, REG> = crate::FieldWriter<'a, REG, 2, Prfselect, crate::Safe>;
impl<'a, REG> PrfW<'a, REG>
where
    REG: crate::Writable + crate::RegisterSpec,
    REG::Ux: From<u8>,
{
    #[doc = "2kHz"]
    #[inline(always)]
    pub fn pr2000(self) -> &'a mut crate::W<REG> {
        self.variant(Prfselect::Pr2000)
    }
    #[doc = "1kHz"]
    #[inline(always)]
    pub fn pr1000(self) -> &'a mut crate::W<REG> {
        self.variant(Prfselect::Pr1000)
    }
    #[doc = "500Hz"]
    #[inline(always)]
    pub fn pr500(self) -> &'a mut crate::W<REG> {
        self.variant(Prfselect::Pr500)
    }
    #[doc = "250Hz"]
    #[inline(always)]
    pub fn pr250(self) -> &'a mut crate::W<REG> {
        self.variant(Prfselect::Pr250)
    }
}
#[doc = "Display Memory Update Frame Counter Selection\n\nValue on reset: 3"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
#[repr(u8)]
pub enum Dmfcsselect {
    #[doc = "0: Frame Counter 0"]
    Fc0 = 0,
    #[doc = "1: Frame Counter 1"]
    Fc1 = 1,
    #[doc = "2: Frame Counter 2"]
    Fc2 = 2,
    #[doc = "3: Frame Counter event to DMU is forced to 0"]
    Nfc = 3,
}
impl From<Dmfcsselect> for u8 {
    #[inline(always)]
    fn from(variant: Dmfcsselect) -> Self {
        variant as _
    }
}
impl crate::FieldSpec for Dmfcsselect {
    type Ux = u8;
}
impl crate::IsEnum for Dmfcsselect {}
#[doc = "Field `DMFCS` reader - Display Memory Update Frame Counter Selection"]
pub type DmfcsR = crate::FieldReader<Dmfcsselect>;
impl DmfcsR {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub const fn variant(&self) -> Dmfcsselect {
        match self.bits {
            0 => Dmfcsselect::Fc0,
            1 => Dmfcsselect::Fc1,
            2 => Dmfcsselect::Fc2,
            3 => Dmfcsselect::Nfc,
            _ => unreachable!(),
        }
    }
    #[doc = "Frame Counter 0"]
    #[inline(always)]
    pub fn is_fc0(&self) -> bool {
        *self == Dmfcsselect::Fc0
    }
    #[doc = "Frame Counter 1"]
    #[inline(always)]
    pub fn is_fc1(&self) -> bool {
        *self == Dmfcsselect::Fc1
    }
    #[doc = "Frame Counter 2"]
    #[inline(always)]
    pub fn is_fc2(&self) -> bool {
        *self == Dmfcsselect::Fc2
    }
    #[doc = "Frame Counter event to DMU is forced to 0"]
    #[inline(always)]
    pub fn is_nfc(&self) -> bool {
        *self == Dmfcsselect::Nfc
    }
}
#[doc = "Field `DMFCS` writer - Display Memory Update Frame Counter Selection"]
pub type DmfcsW<'a, REG> = crate::FieldWriter<'a, REG, 2, Dmfcsselect, crate::Safe>;
impl<'a, REG> DmfcsW<'a, REG>
where
    REG: crate::Writable + crate::RegisterSpec,
    REG::Ux: From<u8>,
{
    #[doc = "Frame Counter 0"]
    #[inline(always)]
    pub fn fc0(self) -> &'a mut crate::W<REG> {
        self.variant(Dmfcsselect::Fc0)
    }
    #[doc = "Frame Counter 1"]
    #[inline(always)]
    pub fn fc1(self) -> &'a mut crate::W<REG> {
        self.variant(Dmfcsselect::Fc1)
    }
    #[doc = "Frame Counter 2"]
    #[inline(always)]
    pub fn fc2(self) -> &'a mut crate::W<REG> {
        self.variant(Dmfcsselect::Fc2)
    }
    #[doc = "Frame Counter event to DMU is forced to 0"]
    #[inline(always)]
    pub fn nfc(self) -> &'a mut crate::W<REG> {
        self.variant(Dmfcsselect::Nfc)
    }
}
#[doc = "Reference Refresh Frequency\n\nValue on reset: 3"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
#[repr(u8)]
pub enum Rrfselect {
    #[doc = "0: 2kHz"]
    Rr2000 = 0,
    #[doc = "1: 1kHz"]
    Rr1000 = 1,
    #[doc = "2: 500Hz"]
    Rr500 = 2,
    #[doc = "3: 250Hz"]
    Rr250 = 3,
    #[doc = "4: 125Hz"]
    Rr125 = 4,
    #[doc = "5: 62.5Hz"]
    Rr62 = 5,
}
impl From<Rrfselect> for u8 {
    #[inline(always)]
    fn from(variant: Rrfselect) -> Self {
        variant as _
    }
}
impl crate::FieldSpec for Rrfselect {
    type Ux = u8;
}
impl crate::IsEnum for Rrfselect {}
#[doc = "Field `RRF` reader - Reference Refresh Frequency"]
pub type RrfR = crate::FieldReader<Rrfselect>;
impl RrfR {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub const fn variant(&self) -> Option<Rrfselect> {
        match self.bits {
            0 => Some(Rrfselect::Rr2000),
            1 => Some(Rrfselect::Rr1000),
            2 => Some(Rrfselect::Rr500),
            3 => Some(Rrfselect::Rr250),
            4 => Some(Rrfselect::Rr125),
            5 => Some(Rrfselect::Rr62),
            _ => None,
        }
    }
    #[doc = "2kHz"]
    #[inline(always)]
    pub fn is_rr2000(&self) -> bool {
        *self == Rrfselect::Rr2000
    }
    #[doc = "1kHz"]
    #[inline(always)]
    pub fn is_rr1000(&self) -> bool {
        *self == Rrfselect::Rr1000
    }
    #[doc = "500Hz"]
    #[inline(always)]
    pub fn is_rr500(&self) -> bool {
        *self == Rrfselect::Rr500
    }
    #[doc = "250Hz"]
    #[inline(always)]
    pub fn is_rr250(&self) -> bool {
        *self == Rrfselect::Rr250
    }
    #[doc = "125Hz"]
    #[inline(always)]
    pub fn is_rr125(&self) -> bool {
        *self == Rrfselect::Rr125
    }
    #[doc = "62.5Hz"]
    #[inline(always)]
    pub fn is_rr62(&self) -> bool {
        *self == Rrfselect::Rr62
    }
}
#[doc = "Field `RRF` writer - Reference Refresh Frequency"]
pub type RrfW<'a, REG> = crate::FieldWriter<'a, REG, 3, Rrfselect>;
impl<'a, REG> RrfW<'a, REG>
where
    REG: crate::Writable + crate::RegisterSpec,
    REG::Ux: From<u8>,
{
    #[doc = "2kHz"]
    #[inline(always)]
    pub fn rr2000(self) -> &'a mut crate::W<REG> {
        self.variant(Rrfselect::Rr2000)
    }
    #[doc = "1kHz"]
    #[inline(always)]
    pub fn rr1000(self) -> &'a mut crate::W<REG> {
        self.variant(Rrfselect::Rr1000)
    }
    #[doc = "500Hz"]
    #[inline(always)]
    pub fn rr500(self) -> &'a mut crate::W<REG> {
        self.variant(Rrfselect::Rr500)
    }
    #[doc = "250Hz"]
    #[inline(always)]
    pub fn rr250(self) -> &'a mut crate::W<REG> {
        self.variant(Rrfselect::Rr250)
    }
    #[doc = "125Hz"]
    #[inline(always)]
    pub fn rr125(self) -> &'a mut crate::W<REG> {
        self.variant(Rrfselect::Rr125)
    }
    #[doc = "62.5Hz"]
    #[inline(always)]
    pub fn rr62(self) -> &'a mut crate::W<REG> {
        self.variant(Rrfselect::Rr62)
    }
}
impl R {
    #[doc = "Bit 0 - Software Reset"]
    #[inline(always)]
    pub fn swrst(&self) -> SwrstR {
        SwrstR::new((self.bits & 1) != 0)
    }
    #[doc = "Bit 1 - Enable"]
    #[inline(always)]
    pub fn enable(&self) -> EnableR {
        EnableR::new(((self.bits >> 1) & 1) != 0)
    }
    #[doc = "Bits 2:4 - Duty Ratio"]
    #[inline(always)]
    pub fn duty(&self) -> DutyR {
        DutyR::new(((self.bits >> 2) & 7) as u8)
    }
    #[doc = "Bit 5 - Waveform Mode"]
    #[inline(always)]
    pub fn wmod(&self) -> WmodR {
        WmodR::new(((self.bits >> 5) & 1) != 0)
    }
    #[doc = "Bit 6 - Run in Standby"]
    #[inline(always)]
    pub fn runstdby(&self) -> RunstdbyR {
        RunstdbyR::new(((self.bits >> 6) & 1) != 0)
    }
    #[doc = "Bits 8:9 - Clock Prescaler"]
    #[inline(always)]
    pub fn presc(&self) -> PrescR {
        PrescR::new(((self.bits >> 8) & 3) as u8)
    }
    #[doc = "Bits 12:14 - Clock Divider"]
    #[inline(always)]
    pub fn ckdiv(&self) -> CkdivR {
        CkdivR::new(((self.bits >> 12) & 7) as u8)
    }
    #[doc = "Bits 16:17 - Bias Setting"]
    #[inline(always)]
    pub fn bias(&self) -> BiasR {
        BiasR::new(((self.bits >> 16) & 3) as u8)
    }
    #[doc = "Bit 19 - External VLCD"]
    #[inline(always)]
    pub fn xvlcd(&self) -> XvlcdR {
        XvlcdR::new(((self.bits >> 19) & 1) != 0)
    }
    #[doc = "Bits 20:21 - Power Refresh Frequency"]
    #[inline(always)]
    pub fn prf(&self) -> PrfR {
        PrfR::new(((self.bits >> 20) & 3) as u8)
    }
    #[doc = "Bits 22:23 - Display Memory Update Frame Counter Selection"]
    #[inline(always)]
    pub fn dmfcs(&self) -> DmfcsR {
        DmfcsR::new(((self.bits >> 22) & 3) as u8)
    }
    #[doc = "Bits 24:26 - Reference Refresh Frequency"]
    #[inline(always)]
    pub fn rrf(&self) -> RrfR {
        RrfR::new(((self.bits >> 24) & 7) as u8)
    }
}
impl W {
    #[doc = "Bit 0 - Software Reset"]
    #[inline(always)]
    pub fn swrst(&mut self) -> SwrstW<CtrlaSpec> {
        SwrstW::new(self, 0)
    }
    #[doc = "Bit 1 - Enable"]
    #[inline(always)]
    pub fn enable(&mut self) -> EnableW<CtrlaSpec> {
        EnableW::new(self, 1)
    }
    #[doc = "Bits 2:4 - Duty Ratio"]
    #[inline(always)]
    pub fn duty(&mut self) -> DutyW<CtrlaSpec> {
        DutyW::new(self, 2)
    }
    #[doc = "Bit 5 - Waveform Mode"]
    #[inline(always)]
    pub fn wmod(&mut self) -> WmodW<CtrlaSpec> {
        WmodW::new(self, 5)
    }
    #[doc = "Bit 6 - Run in Standby"]
    #[inline(always)]
    pub fn runstdby(&mut self) -> RunstdbyW<CtrlaSpec> {
        RunstdbyW::new(self, 6)
    }
    #[doc = "Bits 8:9 - Clock Prescaler"]
    #[inline(always)]
    pub fn presc(&mut self) -> PrescW<CtrlaSpec> {
        PrescW::new(self, 8)
    }
    #[doc = "Bits 12:14 - Clock Divider"]
    #[inline(always)]
    pub fn ckdiv(&mut self) -> CkdivW<CtrlaSpec> {
        CkdivW::new(self, 12)
    }
    #[doc = "Bits 16:17 - Bias Setting"]
    #[inline(always)]
    pub fn bias(&mut self) -> BiasW<CtrlaSpec> {
        BiasW::new(self, 16)
    }
    #[doc = "Bit 19 - External VLCD"]
    #[inline(always)]
    pub fn xvlcd(&mut self) -> XvlcdW<CtrlaSpec> {
        XvlcdW::new(self, 19)
    }
    #[doc = "Bits 20:21 - Power Refresh Frequency"]
    #[inline(always)]
    pub fn prf(&mut self) -> PrfW<CtrlaSpec> {
        PrfW::new(self, 20)
    }
    #[doc = "Bits 22:23 - Display Memory Update Frame Counter Selection"]
    #[inline(always)]
    pub fn dmfcs(&mut self) -> DmfcsW<CtrlaSpec> {
        DmfcsW::new(self, 22)
    }
    #[doc = "Bits 24:26 - Reference Refresh Frequency"]
    #[inline(always)]
    pub fn rrf(&mut self) -> RrfW<CtrlaSpec> {
        RrfW::new(self, 24)
    }
}
#[doc = "Control A\n\nYou can [`read`](crate::Reg::read) this register and get [`ctrla::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`ctrla::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
pub struct CtrlaSpec;
impl crate::RegisterSpec for CtrlaSpec {
    type Ux = u32;
}
#[doc = "`read()` method returns [`ctrla::R`](R) reader structure"]
impl crate::Readable for CtrlaSpec {}
#[doc = "`write(|w| ..)` method takes [`ctrla::W`](W) writer structure"]
impl crate::Writable for CtrlaSpec {
    type Safety = crate::Unsafe;
    const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
    const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
}
#[doc = "`reset()` method sets CTRLA to value 0x03d8_0000"]
impl crate::Resettable for CtrlaSpec {
    const RESET_VALUE: u32 = 0x03d8_0000;
}
