pub type R = crate::R<X2BUFCFGrs>;
pub type W = crate::W<X2BUFCFGrs>;
pub type X2_BASE_R = crate::FieldReader;
pub type X2_BASE_W<'a, REG> = crate::FieldWriter<'a, REG, 8>;
pub type X2_BUF_SIZE_R = crate::FieldReader;
pub type X2_BUF_SIZE_W<'a, REG> = crate::FieldWriter<'a, REG, 8>;
impl R {
#[inline(always)]
pub fn x2_base(&self) -> X2_BASE_R {
X2_BASE_R::new((self.bits & 0xff) as u8)
}
#[inline(always)]
pub fn x2_buf_size(&self) -> X2_BUF_SIZE_R {
X2_BUF_SIZE_R::new(((self.bits >> 8) & 0xff) as u8)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("X2BUFCFG")
.field("x2_base", &self.x2_base())
.field("x2_buf_size", &self.x2_buf_size())
.finish()
}
}
impl W {
#[inline(always)]
pub fn x2_base(&mut self) -> X2_BASE_W<X2BUFCFGrs> {
X2_BASE_W::new(self, 0)
}
#[inline(always)]
pub fn x2_buf_size(&mut self) -> X2_BUF_SIZE_W<X2BUFCFGrs> {
X2_BUF_SIZE_W::new(self, 8)
}
}
pub struct X2BUFCFGrs;
impl crate::RegisterSpec for X2BUFCFGrs {
type Ux = u32;
}
impl crate::Readable for X2BUFCFGrs {}
impl crate::Writable for X2BUFCFGrs {
type Safety = crate::Unsafe;
}
impl crate::Resettable for X2BUFCFGrs {}