pub type R = crate::R<SHRRrs>;
pub type W = crate::W<SHRRrs>;
pub type TREFRESH_R = crate::FieldReader;
pub type TREFRESH_W<'a, REG> = crate::FieldWriter<'a, REG, 8, u8, crate::Safe>;
impl R {
#[inline(always)]
pub fn trefresh(&self, n: u8) -> TREFRESH_R {
#[allow(clippy::no_effect)]
[(); 2][n as usize];
TREFRESH_R::new(((self.bits >> (n * 16)) & 0xff) as u8)
}
#[inline(always)]
pub fn trefresh_iter(&self) -> impl Iterator<Item = TREFRESH_R> + '_ {
(0..2).map(move |n| TREFRESH_R::new(((self.bits >> (n * 16)) & 0xff) as u8))
}
#[inline(always)]
pub fn trefresh1(&self) -> TREFRESH_R {
TREFRESH_R::new((self.bits & 0xff) as u8)
}
#[inline(always)]
pub fn trefresh2(&self) -> TREFRESH_R {
TREFRESH_R::new(((self.bits >> 16) & 0xff) as u8)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("SHRR")
.field("trefresh1", &self.trefresh1())
.field("trefresh2", &self.trefresh2())
.finish()
}
}
impl W {
#[inline(always)]
pub fn trefresh(&mut self, n: u8) -> TREFRESH_W<SHRRrs> {
#[allow(clippy::no_effect)]
[(); 2][n as usize];
TREFRESH_W::new(self, n * 16)
}
#[inline(always)]
pub fn trefresh1(&mut self) -> TREFRESH_W<SHRRrs> {
TREFRESH_W::new(self, 0)
}
#[inline(always)]
pub fn trefresh2(&mut self) -> TREFRESH_W<SHRRrs> {
TREFRESH_W::new(self, 16)
}
}
pub struct SHRRrs;
impl crate::RegisterSpec for SHRRrs {
type Ux = u32;
}
impl crate::Readable for SHRRrs {}
impl crate::Writable for SHRRrs {
type Safety = crate::Unsafe;
}
impl crate::Resettable for SHRRrs {
const RESET_VALUE: u32 = 0x0001_0001;
}