pub type R = crate::R<CR2rs>;
pub type W = crate::W<CR2rs>;
pub type TSIZE_R = crate::FieldReader<u16>;
pub type TSIZE_W<'a, REG> = crate::FieldWriter<'a, REG, 16, u16, crate::Safe>;
pub type TSER_R = crate::FieldReader<u16>;
pub type TSER_W<'a, REG> = crate::FieldWriter<'a, REG, 16, u16, crate::Safe>;
impl R {
#[inline(always)]
pub fn tsize(&self) -> TSIZE_R {
TSIZE_R::new((self.bits & 0xffff) as u16)
}
#[inline(always)]
pub fn tser(&self) -> TSER_R {
TSER_R::new(((self.bits >> 16) & 0xffff) as u16)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("CR2")
.field("tser", &self.tser())
.field("tsize", &self.tsize())
.finish()
}
}
impl W {
#[inline(always)]
pub fn tsize(&mut self) -> TSIZE_W<CR2rs> {
TSIZE_W::new(self, 0)
}
#[inline(always)]
pub fn tser(&mut self) -> TSER_W<CR2rs> {
TSER_W::new(self, 16)
}
}
pub struct CR2rs;
impl crate::RegisterSpec for CR2rs {
type Ux = u32;
}
impl crate::Readable for CR2rs {}
impl crate::Writable for CR2rs {
type Safety = crate::Unsafe;
}
impl crate::Resettable for CR2rs {}