pub type R = crate::R<X1BUFCFGrs>;
pub type W = crate::W<X1BUFCFGrs>;
pub type X1_BASE_R = crate::FieldReader;
pub type X1_BASE_W<'a, REG> = crate::FieldWriter<'a, REG, 8>;
pub type X1_BUF_SIZE_R = crate::FieldReader;
pub type X1_BUF_SIZE_W<'a, REG> = crate::FieldWriter<'a, REG, 8>;
pub type FULL_WM_R = crate::FieldReader;
pub type FULL_WM_W<'a, REG> = crate::FieldWriter<'a, REG, 2>;
impl R {
#[inline(always)]
pub fn x1_base(&self) -> X1_BASE_R {
X1_BASE_R::new((self.bits & 0xff) as u8)
}
#[inline(always)]
pub fn x1_buf_size(&self) -> X1_BUF_SIZE_R {
X1_BUF_SIZE_R::new(((self.bits >> 8) & 0xff) as u8)
}
#[inline(always)]
pub fn full_wm(&self) -> FULL_WM_R {
FULL_WM_R::new(((self.bits >> 24) & 3) as u8)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("X1BUFCFG")
.field("x1_base", &self.x1_base())
.field("x1_buf_size", &self.x1_buf_size())
.field("full_wm", &self.full_wm())
.finish()
}
}
impl W {
#[inline(always)]
pub fn x1_base(&mut self) -> X1_BASE_W<X1BUFCFGrs> {
X1_BASE_W::new(self, 0)
}
#[inline(always)]
pub fn x1_buf_size(&mut self) -> X1_BUF_SIZE_W<X1BUFCFGrs> {
X1_BUF_SIZE_W::new(self, 8)
}
#[inline(always)]
pub fn full_wm(&mut self) -> FULL_WM_W<X1BUFCFGrs> {
FULL_WM_W::new(self, 24)
}
}
pub struct X1BUFCFGrs;
impl crate::RegisterSpec for X1BUFCFGrs {
type Ux = u32;
}
impl crate::Readable for X1BUFCFGrs {}
impl crate::Writable for X1BUFCFGrs {
type Safety = crate::Unsafe;
}
impl crate::Resettable for X1BUFCFGrs {}