pub type R = crate::R<COUNT0_RXrs>;
pub type W = crate::W<COUNT0_RXrs>;
pub type COUNT0_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 count0_rx(&self) -> COUNT0_RX_R {
COUNT0_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("COUNT0_RX")
.field("count0_rx", &self.count0_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<COUNT0_RXrs> {
NUM_BLOCK_W::new(self, 10)
}
#[inline(always)]
pub fn bl_size(&mut self) -> BL_SIZE_W<COUNT0_RXrs> {
BL_SIZE_W::new(self, 15)
}
}
pub struct COUNT0_RXrs;
impl crate::RegisterSpec for COUNT0_RXrs {
type Ux = u16;
}
impl crate::Readable for COUNT0_RXrs {}
impl crate::Writable for COUNT0_RXrs {
type Safety = crate::Unsafe;
}
impl crate::Resettable for COUNT0_RXrs {}