pub type R = crate::R<ICSCRrs>;
pub type W = crate::W<ICSCRrs>;
pub type MSICAL_R = crate::FieldReader;
pub type MSITRIM_R = crate::FieldReader;
pub type MSITRIM_W<'a, REG> = crate::FieldWriter<'a, REG, 8>;
pub type HSICAL_R = crate::FieldReader;
pub type HSITRIM_R = crate::FieldReader;
pub type HSITRIM_W<'a, REG> = crate::FieldWriter<'a, REG, 5>;
impl R {
#[inline(always)]
pub fn msical(&self) -> MSICAL_R {
MSICAL_R::new((self.bits & 0xff) as u8)
}
#[inline(always)]
pub fn msitrim(&self) -> MSITRIM_R {
MSITRIM_R::new(((self.bits >> 8) & 0xff) as u8)
}
#[inline(always)]
pub fn hsical(&self) -> HSICAL_R {
HSICAL_R::new(((self.bits >> 16) & 0xff) as u8)
}
#[inline(always)]
pub fn hsitrim(&self) -> HSITRIM_R {
HSITRIM_R::new(((self.bits >> 24) & 0x1f) as u8)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("ICSCR")
.field("hsitrim", &self.hsitrim())
.field("hsical", &self.hsical())
.field("msitrim", &self.msitrim())
.field("msical", &self.msical())
.finish()
}
}
impl W {
#[inline(always)]
pub fn msitrim(&mut self) -> MSITRIM_W<ICSCRrs> {
MSITRIM_W::new(self, 8)
}
#[inline(always)]
pub fn hsitrim(&mut self) -> HSITRIM_W<ICSCRrs> {
HSITRIM_W::new(self, 24)
}
}
pub struct ICSCRrs;
impl crate::RegisterSpec for ICSCRrs {
type Ux = u32;
}
impl crate::Readable for ICSCRrs {}
impl crate::Writable for ICSCRrs {
type Safety = crate::Unsafe;
}
impl crate::Resettable for ICSCRrs {
const RESET_VALUE: u32 = 0x1000_0000;
}