pub type R = crate::R<COUNT7_RXrs>;
pub type W = crate::W<COUNT7_RXrs>;
pub type COUNT7_RX_R = crate::FieldReader<u16>;
pub type NUM_BLOCK_R = crate::FieldReader;
pub type NUM_BLOCK_W<'a, REG> = crate::FieldWriter<'a, REG, 5>;
pub type BL_SIZE_R = crate::BitReader;
pub type BL_SIZE_W<'a, REG> = crate::BitWriter<'a, REG>;
impl R {
#[inline(always)]
pub fn count7_rx(&self) -> COUNT7_RX_R {
COUNT7_RX_R::new(self.bits & 0x03ff)
}
#[inline(always)]
pub fn num_block(&self) -> NUM_BLOCK_R {
NUM_BLOCK_R::new(((self.bits >> 10) & 0x1f) as u8)
}
#[inline(always)]
pub fn bl_size(&self) -> BL_SIZE_R {
BL_SIZE_R::new(((self.bits >> 15) & 1) != 0)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("COUNT7_RX")
.field("count7_rx", &self.count7_rx())
.field("num_block", &self.num_block())
.field("bl_size", &self.bl_size())
.finish()
}
}
impl W {
#[inline(always)]
pub fn num_block(&mut self) -> NUM_BLOCK_W<COUNT7_RXrs> {
NUM_BLOCK_W::new(self, 10)
}
#[inline(always)]
pub fn bl_size(&mut self) -> BL_SIZE_W<COUNT7_RXrs> {
BL_SIZE_W::new(self, 15)
}
}
pub struct COUNT7_RXrs;
impl crate::RegisterSpec for COUNT7_RXrs {
type Ux = u16;
}
impl crate::Readable for COUNT7_RXrs {}
impl crate::Writable for COUNT7_RXrs {
type Safety = crate::Unsafe;
}
impl crate::Resettable for COUNT7_RXrs {}