atsamd11d/tc1/count16/
intenset.rs
1#[doc = "Register `INTENSET` reader"]
2pub type R = crate::R<IntensetSpec>;
3#[doc = "Register `INTENSET` writer"]
4pub type W = crate::W<IntensetSpec>;
5#[doc = "Field `OVF` reader - Overflow Interrupt Enable"]
6pub type OvfR = crate::BitReader;
7#[doc = "Field `OVF` writer - Overflow Interrupt Enable"]
8pub type OvfW<'a, REG> = crate::BitWriter<'a, REG>;
9#[doc = "Field `ERR` reader - Error Interrupt Enable"]
10pub type ErrR = crate::BitReader;
11#[doc = "Field `ERR` writer - Error Interrupt Enable"]
12pub type ErrW<'a, REG> = crate::BitWriter<'a, REG>;
13#[doc = "Field `SYNCRDY` reader - Synchronization Ready Interrupt Enable"]
14pub type SyncrdyR = crate::BitReader;
15#[doc = "Field `SYNCRDY` writer - Synchronization Ready Interrupt Enable"]
16pub type SyncrdyW<'a, REG> = crate::BitWriter<'a, REG>;
17#[doc = "Field `MC0` reader - Match or Capture Channel 0 Interrupt Enable"]
18pub type Mc0R = crate::BitReader;
19#[doc = "Field `MC0` writer - Match or Capture Channel 0 Interrupt Enable"]
20pub type Mc0W<'a, REG> = crate::BitWriter<'a, REG>;
21#[doc = "Field `MC1` reader - Match or Capture Channel 1 Interrupt Enable"]
22pub type Mc1R = crate::BitReader;
23#[doc = "Field `MC1` writer - Match or Capture Channel 1 Interrupt Enable"]
24pub type Mc1W<'a, REG> = crate::BitWriter<'a, REG>;
25impl R {
26 #[doc = "Bit 0 - Overflow Interrupt Enable"]
27 #[inline(always)]
28 pub fn ovf(&self) -> OvfR {
29 OvfR::new((self.bits & 1) != 0)
30 }
31 #[doc = "Bit 1 - Error Interrupt Enable"]
32 #[inline(always)]
33 pub fn err(&self) -> ErrR {
34 ErrR::new(((self.bits >> 1) & 1) != 0)
35 }
36 #[doc = "Bit 3 - Synchronization Ready Interrupt Enable"]
37 #[inline(always)]
38 pub fn syncrdy(&self) -> SyncrdyR {
39 SyncrdyR::new(((self.bits >> 3) & 1) != 0)
40 }
41 #[doc = "Bit 4 - Match or Capture Channel 0 Interrupt Enable"]
42 #[inline(always)]
43 pub fn mc0(&self) -> Mc0R {
44 Mc0R::new(((self.bits >> 4) & 1) != 0)
45 }
46 #[doc = "Bit 5 - Match or Capture Channel 1 Interrupt Enable"]
47 #[inline(always)]
48 pub fn mc1(&self) -> Mc1R {
49 Mc1R::new(((self.bits >> 5) & 1) != 0)
50 }
51}
52impl W {
53 #[doc = "Bit 0 - Overflow Interrupt Enable"]
54 #[inline(always)]
55 #[must_use]
56 pub fn ovf(&mut self) -> OvfW<IntensetSpec> {
57 OvfW::new(self, 0)
58 }
59 #[doc = "Bit 1 - Error Interrupt Enable"]
60 #[inline(always)]
61 #[must_use]
62 pub fn err(&mut self) -> ErrW<IntensetSpec> {
63 ErrW::new(self, 1)
64 }
65 #[doc = "Bit 3 - Synchronization Ready Interrupt Enable"]
66 #[inline(always)]
67 #[must_use]
68 pub fn syncrdy(&mut self) -> SyncrdyW<IntensetSpec> {
69 SyncrdyW::new(self, 3)
70 }
71 #[doc = "Bit 4 - Match or Capture Channel 0 Interrupt Enable"]
72 #[inline(always)]
73 #[must_use]
74 pub fn mc0(&mut self) -> Mc0W<IntensetSpec> {
75 Mc0W::new(self, 4)
76 }
77 #[doc = "Bit 5 - Match or Capture Channel 1 Interrupt Enable"]
78 #[inline(always)]
79 #[must_use]
80 pub fn mc1(&mut self) -> Mc1W<IntensetSpec> {
81 Mc1W::new(self, 5)
82 }
83}
84#[doc = "Interrupt Enable Set\n\nYou can [`read`](crate::Reg::read) this register and get [`intenset::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`intenset::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
85pub struct IntensetSpec;
86impl crate::RegisterSpec for IntensetSpec {
87 type Ux = u8;
88}
89#[doc = "`read()` method returns [`intenset::R`](R) reader structure"]
90impl crate::Readable for IntensetSpec {}
91#[doc = "`write(|w| ..)` method takes [`intenset::W`](W) writer structure"]
92impl crate::Writable for IntensetSpec {
93 type Safety = crate::Unsafe;
94 const ZERO_TO_MODIFY_FIELDS_BITMAP: u8 = 0;
95 const ONE_TO_MODIFY_FIELDS_BITMAP: u8 = 0;
96}
97#[doc = "`reset()` method sets INTENSET to value 0"]
98impl crate::Resettable for IntensetSpec {
99 const RESET_VALUE: u8 = 0;
100}