pub type R = crate::R<CONFR1rs>;
pub type W = crate::W<CONFR1rs>;
pub type NF_R = crate::FieldReader;
pub type NF_W<'a, REG> = crate::FieldWriter<'a, REG, 2>;
pub type DE_R = crate::BitReader;
pub type DE_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type COLSPACE_R = crate::FieldReader;
pub type COLSPACE_W<'a, REG> = crate::FieldWriter<'a, REG, 2>;
pub type NS_R = crate::FieldReader;
pub type NS_W<'a, REG> = crate::FieldWriter<'a, REG, 2>;
pub type HDR_R = crate::BitReader;
pub type HDR_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type YSIZE_R = crate::FieldReader<u16>;
pub type YSIZE_W<'a, REG> = crate::FieldWriter<'a, REG, 16, u16>;
impl R {
#[inline(always)]
pub fn nf(&self) -> NF_R {
NF_R::new((self.bits & 3) as u8)
}
#[inline(always)]
pub fn de(&self) -> DE_R {
DE_R::new(((self.bits >> 3) & 1) != 0)
}
#[inline(always)]
pub fn colspace(&self) -> COLSPACE_R {
COLSPACE_R::new(((self.bits >> 4) & 3) as u8)
}
#[inline(always)]
pub fn ns(&self) -> NS_R {
NS_R::new(((self.bits >> 6) & 3) as u8)
}
#[inline(always)]
pub fn hdr(&self) -> HDR_R {
HDR_R::new(((self.bits >> 8) & 1) != 0)
}
#[inline(always)]
pub fn ysize(&self) -> YSIZE_R {
YSIZE_R::new(((self.bits >> 16) & 0xffff) as u16)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("CONFR1")
.field("nf", &self.nf())
.field("de", &self.de())
.field("colspace", &self.colspace())
.field("ns", &self.ns())
.field("hdr", &self.hdr())
.field("ysize", &self.ysize())
.finish()
}
}
impl W {
#[inline(always)]
pub fn nf(&mut self) -> NF_W<CONFR1rs> {
NF_W::new(self, 0)
}
#[inline(always)]
pub fn de(&mut self) -> DE_W<CONFR1rs> {
DE_W::new(self, 3)
}
#[inline(always)]
pub fn colspace(&mut self) -> COLSPACE_W<CONFR1rs> {
COLSPACE_W::new(self, 4)
}
#[inline(always)]
pub fn ns(&mut self) -> NS_W<CONFR1rs> {
NS_W::new(self, 6)
}
#[inline(always)]
pub fn hdr(&mut self) -> HDR_W<CONFR1rs> {
HDR_W::new(self, 8)
}
#[inline(always)]
pub fn ysize(&mut self) -> YSIZE_W<CONFR1rs> {
YSIZE_W::new(self, 16)
}
}
pub struct CONFR1rs;
impl crate::RegisterSpec for CONFR1rs {
type Ux = u32;
}
impl crate::Readable for CONFR1rs {}
impl crate::Writable for CONFR1rs {
type Safety = crate::Unsafe;
}
impl crate::Resettable for CONFR1rs {}