mimxrt685s_pac/utick0/
stat.rs1#[doc = "Register `STAT` reader"]
2pub type R = crate::R<StatSpec>;
3#[doc = "Register `STAT` writer"]
4pub type W = crate::W<StatSpec>;
5#[doc = "Field `INTR` reader - Interrupt flag. 0 = No interrupt is pending. 1 = An interrupt is pending. A write of any value to this register clears this flag."]
6pub type IntrR = crate::BitReader;
7#[doc = "Field `INTR` writer - Interrupt flag. 0 = No interrupt is pending. 1 = An interrupt is pending. A write of any value to this register clears this flag."]
8pub type IntrW<'a, REG> = crate::BitWriter<'a, REG>;
9#[doc = "Field `ACTIVE` reader - Active flag. 0 = The Micro-Tick Timer is stopped. 1 = The Micro-Tick Timer is currently active."]
10pub type ActiveR = crate::BitReader;
11#[doc = "Field `ACTIVE` writer - Active flag. 0 = The Micro-Tick Timer is stopped. 1 = The Micro-Tick Timer is currently active."]
12pub type ActiveW<'a, REG> = crate::BitWriter<'a, REG>;
13impl R {
14 #[doc = "Bit 0 - Interrupt flag. 0 = No interrupt is pending. 1 = An interrupt is pending. A write of any value to this register clears this flag."]
15 #[inline(always)]
16 pub fn intr(&self) -> IntrR {
17 IntrR::new((self.bits & 1) != 0)
18 }
19 #[doc = "Bit 1 - Active flag. 0 = The Micro-Tick Timer is stopped. 1 = The Micro-Tick Timer is currently active."]
20 #[inline(always)]
21 pub fn active(&self) -> ActiveR {
22 ActiveR::new(((self.bits >> 1) & 1) != 0)
23 }
24}
25#[cfg(feature = "debug")]
26impl core::fmt::Debug for R {
27 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
28 f.debug_struct("STAT")
29 .field("intr", &self.intr())
30 .field("active", &self.active())
31 .finish()
32 }
33}
34impl W {
35 #[doc = "Bit 0 - Interrupt flag. 0 = No interrupt is pending. 1 = An interrupt is pending. A write of any value to this register clears this flag."]
36 #[inline(always)]
37 pub fn intr(&mut self) -> IntrW<StatSpec> {
38 IntrW::new(self, 0)
39 }
40 #[doc = "Bit 1 - Active flag. 0 = The Micro-Tick Timer is stopped. 1 = The Micro-Tick Timer is currently active."]
41 #[inline(always)]
42 pub fn active(&mut self) -> ActiveW<StatSpec> {
43 ActiveW::new(self, 1)
44 }
45}
46#[doc = "Status register.\n\nYou can [`read`](crate::Reg::read) this register and get [`stat::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`stat::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
47pub struct StatSpec;
48impl crate::RegisterSpec for StatSpec {
49 type Ux = u32;
50}
51#[doc = "`read()` method returns [`stat::R`](R) reader structure"]
52impl crate::Readable for StatSpec {}
53#[doc = "`write(|w| ..)` method takes [`stat::W`](W) writer structure"]
54impl crate::Writable for StatSpec {
55 type Safety = crate::Unsafe;
56 const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
57 const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
58}
59#[doc = "`reset()` method sets STAT to value 0"]
60impl crate::Resettable for StatSpec {
61 const RESET_VALUE: u32 = 0;
62}