pub type R = crate::R<CC2_TIMErs>;
pub type W = crate::W<CC2_TIMErs>;
pub type SecuR = crate::FieldReader;
pub type SecuW<'a, REG> = crate::FieldWriter<'a, REG, 4>;
pub type SectR = crate::FieldReader;
pub type SectW<'a, REG> = crate::FieldWriter<'a, REG, 3>;
pub type MinuR = crate::FieldReader;
pub type MinuW<'a, REG> = crate::FieldWriter<'a, REG, 4>;
pub type MintR = crate::FieldReader;
pub type MintW<'a, REG> = crate::FieldWriter<'a, REG, 3>;
pub type HouruR = crate::FieldReader;
pub type HouruW<'a, REG> = crate::FieldWriter<'a, REG, 4>;
pub type HourtR = crate::FieldReader;
pub type HourtW<'a, REG> = crate::FieldWriter<'a, REG, 2>;
impl R {
#[inline(always)]
pub fn secu(&self) -> SecuR {
SecuR::new((self.bits & 0x0f) as u8)
}
#[inline(always)]
pub fn sect(&self) -> SectR {
SectR::new(((self.bits >> 4) & 7) as u8)
}
#[inline(always)]
pub fn minu(&self) -> MinuR {
MinuR::new(((self.bits >> 8) & 0x0f) as u8)
}
#[inline(always)]
pub fn mint(&self) -> MintR {
MintR::new(((self.bits >> 12) & 7) as u8)
}
#[inline(always)]
pub fn houru(&self) -> HouruR {
HouruR::new(((self.bits >> 16) & 0x0f) as u8)
}
#[inline(always)]
pub fn hourt(&self) -> HourtR {
HourtR::new(((self.bits >> 20) & 3) as u8)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("CC2_TIME")
.field("secu", &self.secu())
.field("sect", &self.sect())
.field("minu", &self.minu())
.field("mint", &self.mint())
.field("houru", &self.houru())
.field("hourt", &self.hourt())
.finish()
}
}
impl W {
#[inline(always)]
pub fn secu(&mut self) -> SecuW<'_, CC2_TIMErs> {
SecuW::new(self, 0)
}
#[inline(always)]
pub fn sect(&mut self) -> SectW<'_, CC2_TIMErs> {
SectW::new(self, 4)
}
#[inline(always)]
pub fn minu(&mut self) -> MinuW<'_, CC2_TIMErs> {
MinuW::new(self, 8)
}
#[inline(always)]
pub fn mint(&mut self) -> MintW<'_, CC2_TIMErs> {
MintW::new(self, 12)
}
#[inline(always)]
pub fn houru(&mut self) -> HouruW<'_, CC2_TIMErs> {
HouruW::new(self, 16)
}
#[inline(always)]
pub fn hourt(&mut self) -> HourtW<'_, CC2_TIMErs> {
HourtW::new(self, 20)
}
}
pub struct CC2_TIMErs;
impl crate::RegisterSpec for CC2_TIMErs {
type Ux = u32;
}
impl crate::Readable for CC2_TIMErs {}
impl crate::Writable for CC2_TIMErs {
type Safety = crate::Unsafe;
}
impl crate::Resettable for CC2_TIMErs {}