mimxrt685s_pac/rtc/
subsec.rs1#[doc = "Register `SUBSEC` reader"]
2pub type R = crate::R<SubsecSpec>;
3#[doc = "Register `SUBSEC` writer"]
4pub type W = crate::W<SubsecSpec>;
5#[doc = "Field `RTC_SUBSEC` reader - A read reflects the current value of the 32Khz sub-second counter. This counter will be cleared whenever the SUBSEC_ENA bit in the RTC_CONTROL register is low. Up-counting at a 32 KHz rate commences at the start of the next one-second interval after the SUBSEC_ENA bit is set. This counter must be re-enabled after exiting deep_powerdown mode or after the main RTC module has been disabled and re-enabled. On modules not equipped with a sub-second counter, this register will read-back as all zeroes."]
6pub type RtcSubsecR = crate::FieldReader<u16>;
7impl R {
8 #[doc = "Bits 0:14 - A read reflects the current value of the 32Khz sub-second counter. This counter will be cleared whenever the SUBSEC_ENA bit in the RTC_CONTROL register is low. Up-counting at a 32 KHz rate commences at the start of the next one-second interval after the SUBSEC_ENA bit is set. This counter must be re-enabled after exiting deep_powerdown mode or after the main RTC module has been disabled and re-enabled. On modules not equipped with a sub-second counter, this register will read-back as all zeroes."]
9 #[inline(always)]
10 pub fn rtc_subsec(&self) -> RtcSubsecR {
11 RtcSubsecR::new((self.bits & 0x7fff) as u16)
12 }
13}
14#[cfg(feature = "debug")]
15impl core::fmt::Debug for R {
16 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
17 f.debug_struct("SUBSEC")
18 .field("rtc_subsec", &self.rtc_subsec())
19 .finish()
20 }
21}
22impl W {}
23#[doc = "RTC Sub-second Counter register\n\nYou can [`read`](crate::Reg::read) this register and get [`subsec::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`subsec::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
24pub struct SubsecSpec;
25impl crate::RegisterSpec for SubsecSpec {
26 type Ux = u32;
27}
28#[doc = "`read()` method returns [`subsec::R`](R) reader structure"]
29impl crate::Readable for SubsecSpec {}
30#[doc = "`write(|w| ..)` method takes [`subsec::W`](W) writer structure"]
31impl crate::Writable for SubsecSpec {
32 type Safety = crate::Unsafe;
33 const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
34 const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
35}
36#[doc = "`reset()` method sets SUBSEC to value 0"]
37impl crate::Resettable for SubsecSpec {
38 const RESET_VALUE: u32 = 0;
39}