#[doc = "Register `CMCFG` reader"]
pub type R = crate::R<CmcfgSpec>;
#[doc = "Register `CMCFG` writer"]
pub type W = crate::W<CmcfgSpec>;
#[doc = "Field `NSEG` reader - Number of SEG lines"]
pub type NsegR = crate::FieldReader;
#[doc = "Field `NSEG` writer - Number of SEG lines"]
pub type NsegW<'a, REG> = crate::FieldWriter<'a, REG, 3>;
#[doc = "Field `DEC` reader - Decrement SEG Line Index"]
pub type DecR = crate::BitReader;
#[doc = "Field `DEC` writer - Decrement SEG Line Index"]
pub type DecW<'a, REG> = crate::BitWriter<'a, REG>;
impl R {
    #[doc = "Bits 0:2 - Number of SEG lines"]
    #[inline(always)]
    pub fn nseg(&self) -> NsegR {
        NsegR::new(self.bits & 7)
    }
    #[doc = "Bit 3 - Decrement SEG Line Index"]
    #[inline(always)]
    pub fn dec(&self) -> DecR {
        DecR::new(((self.bits >> 3) & 1) != 0)
    }
}
impl W {
    #[doc = "Bits 0:2 - Number of SEG lines"]
    #[inline(always)]
    pub fn nseg(&mut self) -> NsegW<CmcfgSpec> {
        NsegW::new(self, 0)
    }
    #[doc = "Bit 3 - Decrement SEG Line Index"]
    #[inline(always)]
    pub fn dec(&mut self) -> DecW<CmcfgSpec> {
        DecW::new(self, 3)
    }
}
#[doc = "Character Mapping Configuration\n\nYou can [`read`](crate::Reg::read) this register and get [`cmcfg::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`cmcfg::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
pub struct CmcfgSpec;
impl crate::RegisterSpec for CmcfgSpec {
    type Ux = u8;
}
#[doc = "`read()` method returns [`cmcfg::R`](R) reader structure"]
impl crate::Readable for CmcfgSpec {}
#[doc = "`write(|w| ..)` method takes [`cmcfg::W`](W) writer structure"]
impl crate::Writable for CmcfgSpec {
    type Safety = crate::Unsafe;
    const ZERO_TO_MODIFY_FIELDS_BITMAP: u8 = 0;
    const ONE_TO_MODIFY_FIELDS_BITMAP: u8 = 0;
}
#[doc = "`reset()` method sets CMCFG to value 0"]
impl crate::Resettable for CmcfgSpec {
    const RESET_VALUE: u8 = 0;
}
