pub type R = crate::R<HWCFGR2rs>;
pub type FIFO_SIZE_R = crate::FieldReader;
pub type WRITE_BUFFERABLE_R = crate::BitReader;
pub type CHSEL_WIDTH_R = crate::FieldReader;
impl R {
#[inline(always)]
pub fn fifo_size(&self) -> FIFO_SIZE_R {
FIFO_SIZE_R::new((self.bits & 3) as u8)
}
#[inline(always)]
pub fn write_bufferable(&self) -> WRITE_BUFFERABLE_R {
WRITE_BUFFERABLE_R::new(((self.bits >> 4) & 1) != 0)
}
#[inline(always)]
pub fn chsel_width(&self) -> CHSEL_WIDTH_R {
CHSEL_WIDTH_R::new(((self.bits >> 8) & 7) as u8)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("HWCFGR2")
.field("fifo_size", &self.fifo_size())
.field("write_bufferable", &self.write_bufferable())
.field("chsel_width", &self.chsel_width())
.finish()
}
}
pub struct HWCFGR2rs;
impl crate::RegisterSpec for HWCFGR2rs {
type Ux = u32;
}
impl crate::Readable for HWCFGR2rs {}
impl crate::Resettable for HWCFGR2rs {
const RESET_VALUE: u32 = 0x01;
}