pub type R = crate::R<HUFFENC_AC1rs>;
pub type W = crate::W<HUFFENC_AC1rs>;
pub type HCODE0_R = crate::FieldReader;
pub type HCODE0_W<'a, REG> = crate::FieldWriter<'a, REG, 8>;
pub type HLEN0_R = crate::FieldReader;
pub type HLEN0_W<'a, REG> = crate::FieldWriter<'a, REG, 4>;
pub type HCODE1_R = crate::FieldReader;
pub type HCODE1_W<'a, REG> = crate::FieldWriter<'a, REG, 8>;
pub type HLEN1_R = crate::FieldReader;
pub type HLEN1_W<'a, REG> = crate::FieldWriter<'a, REG, 4>;
impl R {
#[inline(always)]
pub fn hcode0(&self) -> HCODE0_R {
HCODE0_R::new((self.bits & 0xff) as u8)
}
#[inline(always)]
pub fn hlen0(&self) -> HLEN0_R {
HLEN0_R::new(((self.bits >> 8) & 0x0f) as u8)
}
#[inline(always)]
pub fn hcode1(&self) -> HCODE1_R {
HCODE1_R::new(((self.bits >> 16) & 0xff) as u8)
}
#[inline(always)]
pub fn hlen1(&self) -> HLEN1_R {
HLEN1_R::new(((self.bits >> 24) & 0x0f) as u8)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("HUFFENC_AC1")
.field("hcode0", &self.hcode0())
.field("hlen0", &self.hlen0())
.field("hcode1", &self.hcode1())
.field("hlen1", &self.hlen1())
.finish()
}
}
impl W {
#[inline(always)]
pub fn hcode0(&mut self) -> HCODE0_W<HUFFENC_AC1rs> {
HCODE0_W::new(self, 0)
}
#[inline(always)]
pub fn hlen0(&mut self) -> HLEN0_W<HUFFENC_AC1rs> {
HLEN0_W::new(self, 8)
}
#[inline(always)]
pub fn hcode1(&mut self) -> HCODE1_W<HUFFENC_AC1rs> {
HCODE1_W::new(self, 16)
}
#[inline(always)]
pub fn hlen1(&mut self) -> HLEN1_W<HUFFENC_AC1rs> {
HLEN1_W::new(self, 24)
}
}
pub struct HUFFENC_AC1rs;
impl crate::RegisterSpec for HUFFENC_AC1rs {
type Ux = u32;
}
impl crate::Readable for HUFFENC_AC1rs {}
impl crate::Writable for HUFFENC_AC1rs {
type Safety = crate::Unsafe;
}
impl crate::Resettable for HUFFENC_AC1rs {}