pub type R = crate::R<CONFRN4rs>;
pub type W = crate::W<CONFRN4rs>;
pub type HD_R = crate::BitReader;
pub type HD_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type HA_R = crate::BitReader;
pub type HA_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type QT_R = crate::FieldReader;
pub type QT_W<'a, REG> = crate::FieldWriter<'a, REG, 2>;
pub type NB_R = crate::FieldReader;
pub type NB_W<'a, REG> = crate::FieldWriter<'a, REG, 4>;
pub type VSF_R = crate::FieldReader;
pub type VSF_W<'a, REG> = crate::FieldWriter<'a, REG, 4>;
pub type HSF_R = crate::FieldReader;
pub type HSF_W<'a, REG> = crate::FieldWriter<'a, REG, 4>;
impl R {
#[inline(always)]
pub fn hd(&self) -> HD_R {
HD_R::new((self.bits & 1) != 0)
}
#[inline(always)]
pub fn ha(&self) -> HA_R {
HA_R::new(((self.bits >> 1) & 1) != 0)
}
#[inline(always)]
pub fn qt(&self) -> QT_R {
QT_R::new(((self.bits >> 2) & 3) as u8)
}
#[inline(always)]
pub fn nb(&self) -> NB_R {
NB_R::new(((self.bits >> 4) & 0x0f) as u8)
}
#[inline(always)]
pub fn vsf(&self) -> VSF_R {
VSF_R::new(((self.bits >> 8) & 0x0f) as u8)
}
#[inline(always)]
pub fn hsf(&self) -> HSF_R {
HSF_R::new(((self.bits >> 12) & 0x0f) as u8)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("CONFRN4")
.field("hd", &self.hd())
.field("ha", &self.ha())
.field("qt", &self.qt())
.field("nb", &self.nb())
.field("vsf", &self.vsf())
.field("hsf", &self.hsf())
.finish()
}
}
impl W {
#[inline(always)]
pub fn hd(&mut self) -> HD_W<CONFRN4rs> {
HD_W::new(self, 0)
}
#[inline(always)]
pub fn ha(&mut self) -> HA_W<CONFRN4rs> {
HA_W::new(self, 1)
}
#[inline(always)]
pub fn qt(&mut self) -> QT_W<CONFRN4rs> {
QT_W::new(self, 2)
}
#[inline(always)]
pub fn nb(&mut self) -> NB_W<CONFRN4rs> {
NB_W::new(self, 4)
}
#[inline(always)]
pub fn vsf(&mut self) -> VSF_W<CONFRN4rs> {
VSF_W::new(self, 8)
}
#[inline(always)]
pub fn hsf(&mut self) -> HSF_W<CONFRN4rs> {
HSF_W::new(self, 12)
}
}
pub struct CONFRN4rs;
impl crate::RegisterSpec for CONFRN4rs {
type Ux = u32;
}
impl crate::Readable for CONFRN4rs {}
impl crate::Writable for CONFRN4rs {
type Safety = crate::Unsafe;
}
impl crate::Resettable for CONFRN4rs {}