pub type R = crate::R<CRrs>;
pub type W = crate::W<CRrs>;
pub type LCDEN_R = crate::BitReader;
pub type LCDEN_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type VSEL_R = crate::BitReader;
pub type VSEL_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type DUTY_R = crate::FieldReader;
pub type DUTY_W<'a, REG> = crate::FieldWriter<'a, REG, 3>;
pub type BIAS_R = crate::FieldReader;
pub type BIAS_W<'a, REG> = crate::FieldWriter<'a, REG, 2>;
pub type MUX_SEG_R = crate::BitReader;
pub type MUX_SEG_W<'a, REG> = crate::BitWriter<'a, REG>;
impl R {
#[inline(always)]
pub fn lcden(&self) -> LCDEN_R {
LCDEN_R::new((self.bits & 1) != 0)
}
#[inline(always)]
pub fn vsel(&self) -> VSEL_R {
VSEL_R::new(((self.bits >> 1) & 1) != 0)
}
#[inline(always)]
pub fn duty(&self) -> DUTY_R {
DUTY_R::new(((self.bits >> 2) & 7) as u8)
}
#[inline(always)]
pub fn bias(&self) -> BIAS_R {
BIAS_R::new(((self.bits >> 5) & 3) as u8)
}
#[inline(always)]
pub fn mux_seg(&self) -> MUX_SEG_R {
MUX_SEG_R::new(((self.bits >> 7) & 1) != 0)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("CR")
.field("mux_seg", &self.mux_seg())
.field("bias", &self.bias())
.field("duty", &self.duty())
.field("vsel", &self.vsel())
.field("lcden", &self.lcden())
.finish()
}
}
impl W {
#[inline(always)]
pub fn lcden(&mut self) -> LCDEN_W<CRrs> {
LCDEN_W::new(self, 0)
}
#[inline(always)]
pub fn vsel(&mut self) -> VSEL_W<CRrs> {
VSEL_W::new(self, 1)
}
#[inline(always)]
pub fn duty(&mut self) -> DUTY_W<CRrs> {
DUTY_W::new(self, 2)
}
#[inline(always)]
pub fn bias(&mut self) -> BIAS_W<CRrs> {
BIAS_W::new(self, 5)
}
#[inline(always)]
pub fn mux_seg(&mut self) -> MUX_SEG_W<CRrs> {
MUX_SEG_W::new(self, 7)
}
}
pub struct CRrs;
impl crate::RegisterSpec for CRrs {
type Ux = u32;
}
impl crate::Readable for CRrs {}
impl crate::Writable for CRrs {
type Safety = crate::Unsafe;
}
impl crate::Resettable for CRrs {}