#[doc = "Register `CTRLD` reader"]
pub type R = crate::R<CtrldSpec>;
#[doc = "Register `CTRLD` writer"]
pub type W = crate::W<CtrldSpec>;
#[doc = "Field `BLANK` reader - Blank LCD"]
pub type BlankR = crate::BitReader;
#[doc = "Field `BLANK` writer - Blank LCD"]
pub type BlankW<'a, REG> = crate::BitWriter<'a, REG>;
#[doc = "Field `BLINK` reader - Blinking Enable"]
pub type BlinkR = crate::BitReader;
#[doc = "Field `BLINK` writer - Blinking Enable"]
pub type BlinkW<'a, REG> = crate::BitWriter<'a, REG>;
#[doc = "Field `CSREN` reader - Circular Shift Register Enable"]
pub type CsrenR = crate::BitReader;
#[doc = "Field `CSREN` writer - Circular Shift Register Enable"]
pub type CsrenW<'a, REG> = crate::BitWriter<'a, REG>;
#[doc = "Field `FC0EN` reader - Frame Counter 0 Enable"]
pub type Fc0enR = crate::BitReader;
#[doc = "Field `FC0EN` writer - Frame Counter 0 Enable"]
pub type Fc0enW<'a, REG> = crate::BitWriter<'a, REG>;
#[doc = "Field `FC1EN` reader - Frame Counter 1 Enable"]
pub type Fc1enR = crate::BitReader;
#[doc = "Field `FC1EN` writer - Frame Counter 1 Enable"]
pub type Fc1enW<'a, REG> = crate::BitWriter<'a, REG>;
#[doc = "Field `FC2EN` reader - Frame Counter 2 Enable"]
pub type Fc2enR = crate::BitReader;
#[doc = "Field `FC2EN` writer - Frame Counter 2 Enable"]
pub type Fc2enW<'a, REG> = crate::BitWriter<'a, REG>;
#[doc = "Field `DISPEN` reader - Display enable"]
pub type DispenR = crate::BitReader;
#[doc = "Field `DISPEN` writer - Display enable"]
pub type DispenW<'a, REG> = crate::BitWriter<'a, REG>;
impl R {
    #[doc = "Bit 0 - Blank LCD"]
    #[inline(always)]
    pub fn blank(&self) -> BlankR {
        BlankR::new((self.bits & 1) != 0)
    }
    #[doc = "Bit 1 - Blinking Enable"]
    #[inline(always)]
    pub fn blink(&self) -> BlinkR {
        BlinkR::new(((self.bits >> 1) & 1) != 0)
    }
    #[doc = "Bit 2 - Circular Shift Register Enable"]
    #[inline(always)]
    pub fn csren(&self) -> CsrenR {
        CsrenR::new(((self.bits >> 2) & 1) != 0)
    }
    #[doc = "Bit 4 - Frame Counter 0 Enable"]
    #[inline(always)]
    pub fn fc0en(&self) -> Fc0enR {
        Fc0enR::new(((self.bits >> 4) & 1) != 0)
    }
    #[doc = "Bit 5 - Frame Counter 1 Enable"]
    #[inline(always)]
    pub fn fc1en(&self) -> Fc1enR {
        Fc1enR::new(((self.bits >> 5) & 1) != 0)
    }
    #[doc = "Bit 6 - Frame Counter 2 Enable"]
    #[inline(always)]
    pub fn fc2en(&self) -> Fc2enR {
        Fc2enR::new(((self.bits >> 6) & 1) != 0)
    }
    #[doc = "Bit 7 - Display enable"]
    #[inline(always)]
    pub fn dispen(&self) -> DispenR {
        DispenR::new(((self.bits >> 7) & 1) != 0)
    }
}
impl W {
    #[doc = "Bit 0 - Blank LCD"]
    #[inline(always)]
    pub fn blank(&mut self) -> BlankW<CtrldSpec> {
        BlankW::new(self, 0)
    }
    #[doc = "Bit 1 - Blinking Enable"]
    #[inline(always)]
    pub fn blink(&mut self) -> BlinkW<CtrldSpec> {
        BlinkW::new(self, 1)
    }
    #[doc = "Bit 2 - Circular Shift Register Enable"]
    #[inline(always)]
    pub fn csren(&mut self) -> CsrenW<CtrldSpec> {
        CsrenW::new(self, 2)
    }
    #[doc = "Bit 4 - Frame Counter 0 Enable"]
    #[inline(always)]
    pub fn fc0en(&mut self) -> Fc0enW<CtrldSpec> {
        Fc0enW::new(self, 4)
    }
    #[doc = "Bit 5 - Frame Counter 1 Enable"]
    #[inline(always)]
    pub fn fc1en(&mut self) -> Fc1enW<CtrldSpec> {
        Fc1enW::new(self, 5)
    }
    #[doc = "Bit 6 - Frame Counter 2 Enable"]
    #[inline(always)]
    pub fn fc2en(&mut self) -> Fc2enW<CtrldSpec> {
        Fc2enW::new(self, 6)
    }
    #[doc = "Bit 7 - Display enable"]
    #[inline(always)]
    pub fn dispen(&mut self) -> DispenW<CtrldSpec> {
        DispenW::new(self, 7)
    }
}
#[doc = "Control D\n\nYou can [`read`](crate::Reg::read) this register and get [`ctrld::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`ctrld::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
pub struct CtrldSpec;
impl crate::RegisterSpec for CtrldSpec {
    type Ux = u8;
}
#[doc = "`read()` method returns [`ctrld::R`](R) reader structure"]
impl crate::Readable for CtrldSpec {}
#[doc = "`write(|w| ..)` method takes [`ctrld::W`](W) writer structure"]
impl crate::Writable for CtrldSpec {
    type Safety = crate::Unsafe;
    const ZERO_TO_MODIFY_FIELDS_BITMAP: u8 = 0;
    const ONE_TO_MODIFY_FIELDS_BITMAP: u8 = 0;
}
#[doc = "`reset()` method sets CTRLD to value 0x80"]
impl crate::Resettable for CtrldSpec {
    const RESET_VALUE: u8 = 0x80;
}
