atsamd11c/rtc/mode0/
intflag.rs

1#[doc = "Register `INTFLAG` reader"]
2pub type R = crate::R<IntflagSpec>;
3#[doc = "Register `INTFLAG` writer"]
4pub type W = crate::W<IntflagSpec>;
5#[doc = "Field `CMP0` reader - Compare 0"]
6pub type Cmp0R = crate::BitReader;
7#[doc = "Field `CMP0` writer - Compare 0"]
8pub type Cmp0W<'a, REG> = crate::BitWriter<'a, REG>;
9#[doc = "Field `SYNCRDY` reader - Synchronization Ready"]
10pub type SyncrdyR = crate::BitReader;
11#[doc = "Field `SYNCRDY` writer - Synchronization Ready"]
12pub type SyncrdyW<'a, REG> = crate::BitWriter<'a, REG>;
13#[doc = "Field `OVF` reader - Overflow"]
14pub type OvfR = crate::BitReader;
15#[doc = "Field `OVF` writer - Overflow"]
16pub type OvfW<'a, REG> = crate::BitWriter<'a, REG>;
17impl R {
18    #[doc = "Bit 0 - Compare 0"]
19    #[inline(always)]
20    pub fn cmp0(&self) -> Cmp0R {
21        Cmp0R::new((self.bits & 1) != 0)
22    }
23    #[doc = "Bit 6 - Synchronization Ready"]
24    #[inline(always)]
25    pub fn syncrdy(&self) -> SyncrdyR {
26        SyncrdyR::new(((self.bits >> 6) & 1) != 0)
27    }
28    #[doc = "Bit 7 - Overflow"]
29    #[inline(always)]
30    pub fn ovf(&self) -> OvfR {
31        OvfR::new(((self.bits >> 7) & 1) != 0)
32    }
33}
34impl W {
35    #[doc = "Bit 0 - Compare 0"]
36    #[inline(always)]
37    #[must_use]
38    pub fn cmp0(&mut self) -> Cmp0W<IntflagSpec> {
39        Cmp0W::new(self, 0)
40    }
41    #[doc = "Bit 6 - Synchronization Ready"]
42    #[inline(always)]
43    #[must_use]
44    pub fn syncrdy(&mut self) -> SyncrdyW<IntflagSpec> {
45        SyncrdyW::new(self, 6)
46    }
47    #[doc = "Bit 7 - Overflow"]
48    #[inline(always)]
49    #[must_use]
50    pub fn ovf(&mut self) -> OvfW<IntflagSpec> {
51        OvfW::new(self, 7)
52    }
53}
54#[doc = "MODE0 Interrupt Flag Status and Clear\n\nYou can [`read`](crate::Reg::read) this register and get [`intflag::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`intflag::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
55pub struct IntflagSpec;
56impl crate::RegisterSpec for IntflagSpec {
57    type Ux = u8;
58}
59#[doc = "`read()` method returns [`intflag::R`](R) reader structure"]
60impl crate::Readable for IntflagSpec {}
61#[doc = "`write(|w| ..)` method takes [`intflag::W`](W) writer structure"]
62impl crate::Writable for IntflagSpec {
63    type Safety = crate::Unsafe;
64    const ZERO_TO_MODIFY_FIELDS_BITMAP: u8 = 0;
65    const ONE_TO_MODIFY_FIELDS_BITMAP: u8 = 0;
66}
67#[doc = "`reset()` method sets INTFLAG to value 0"]
68impl crate::Resettable for IntflagSpec {
69    const RESET_VALUE: u8 = 0;
70}