atsam3s8c/pwm/
oov.rs

1#[doc = "Register `OOV` reader"]
2pub type R = crate::R<OovSpec>;
3#[doc = "Register `OOV` writer"]
4pub type W = crate::W<OovSpec>;
5#[doc = "Field `OOVH0` reader - Output Override Value for PWMH output of the channel 0"]
6pub type Oovh0R = crate::BitReader;
7#[doc = "Field `OOVH0` writer - Output Override Value for PWMH output of the channel 0"]
8pub type Oovh0W<'a, REG> = crate::BitWriter<'a, REG>;
9#[doc = "Field `OOVH1` reader - Output Override Value for PWMH output of the channel 1"]
10pub type Oovh1R = crate::BitReader;
11#[doc = "Field `OOVH1` writer - Output Override Value for PWMH output of the channel 1"]
12pub type Oovh1W<'a, REG> = crate::BitWriter<'a, REG>;
13#[doc = "Field `OOVH2` reader - Output Override Value for PWMH output of the channel 2"]
14pub type Oovh2R = crate::BitReader;
15#[doc = "Field `OOVH2` writer - Output Override Value for PWMH output of the channel 2"]
16pub type Oovh2W<'a, REG> = crate::BitWriter<'a, REG>;
17#[doc = "Field `OOVH3` reader - Output Override Value for PWMH output of the channel 3"]
18pub type Oovh3R = crate::BitReader;
19#[doc = "Field `OOVH3` writer - Output Override Value for PWMH output of the channel 3"]
20pub type Oovh3W<'a, REG> = crate::BitWriter<'a, REG>;
21#[doc = "Field `OOVL0` reader - Output Override Value for PWML output of the channel 0"]
22pub type Oovl0R = crate::BitReader;
23#[doc = "Field `OOVL0` writer - Output Override Value for PWML output of the channel 0"]
24pub type Oovl0W<'a, REG> = crate::BitWriter<'a, REG>;
25#[doc = "Field `OOVL1` reader - Output Override Value for PWML output of the channel 1"]
26pub type Oovl1R = crate::BitReader;
27#[doc = "Field `OOVL1` writer - Output Override Value for PWML output of the channel 1"]
28pub type Oovl1W<'a, REG> = crate::BitWriter<'a, REG>;
29#[doc = "Field `OOVL2` reader - Output Override Value for PWML output of the channel 2"]
30pub type Oovl2R = crate::BitReader;
31#[doc = "Field `OOVL2` writer - Output Override Value for PWML output of the channel 2"]
32pub type Oovl2W<'a, REG> = crate::BitWriter<'a, REG>;
33#[doc = "Field `OOVL3` reader - Output Override Value for PWML output of the channel 3"]
34pub type Oovl3R = crate::BitReader;
35#[doc = "Field `OOVL3` writer - Output Override Value for PWML output of the channel 3"]
36pub type Oovl3W<'a, REG> = crate::BitWriter<'a, REG>;
37impl R {
38    #[doc = "Bit 0 - Output Override Value for PWMH output of the channel 0"]
39    #[inline(always)]
40    pub fn oovh0(&self) -> Oovh0R {
41        Oovh0R::new((self.bits & 1) != 0)
42    }
43    #[doc = "Bit 1 - Output Override Value for PWMH output of the channel 1"]
44    #[inline(always)]
45    pub fn oovh1(&self) -> Oovh1R {
46        Oovh1R::new(((self.bits >> 1) & 1) != 0)
47    }
48    #[doc = "Bit 2 - Output Override Value for PWMH output of the channel 2"]
49    #[inline(always)]
50    pub fn oovh2(&self) -> Oovh2R {
51        Oovh2R::new(((self.bits >> 2) & 1) != 0)
52    }
53    #[doc = "Bit 3 - Output Override Value for PWMH output of the channel 3"]
54    #[inline(always)]
55    pub fn oovh3(&self) -> Oovh3R {
56        Oovh3R::new(((self.bits >> 3) & 1) != 0)
57    }
58    #[doc = "Bit 16 - Output Override Value for PWML output of the channel 0"]
59    #[inline(always)]
60    pub fn oovl0(&self) -> Oovl0R {
61        Oovl0R::new(((self.bits >> 16) & 1) != 0)
62    }
63    #[doc = "Bit 17 - Output Override Value for PWML output of the channel 1"]
64    #[inline(always)]
65    pub fn oovl1(&self) -> Oovl1R {
66        Oovl1R::new(((self.bits >> 17) & 1) != 0)
67    }
68    #[doc = "Bit 18 - Output Override Value for PWML output of the channel 2"]
69    #[inline(always)]
70    pub fn oovl2(&self) -> Oovl2R {
71        Oovl2R::new(((self.bits >> 18) & 1) != 0)
72    }
73    #[doc = "Bit 19 - Output Override Value for PWML output of the channel 3"]
74    #[inline(always)]
75    pub fn oovl3(&self) -> Oovl3R {
76        Oovl3R::new(((self.bits >> 19) & 1) != 0)
77    }
78}
79impl W {
80    #[doc = "Bit 0 - Output Override Value for PWMH output of the channel 0"]
81    #[inline(always)]
82    #[must_use]
83    pub fn oovh0(&mut self) -> Oovh0W<OovSpec> {
84        Oovh0W::new(self, 0)
85    }
86    #[doc = "Bit 1 - Output Override Value for PWMH output of the channel 1"]
87    #[inline(always)]
88    #[must_use]
89    pub fn oovh1(&mut self) -> Oovh1W<OovSpec> {
90        Oovh1W::new(self, 1)
91    }
92    #[doc = "Bit 2 - Output Override Value for PWMH output of the channel 2"]
93    #[inline(always)]
94    #[must_use]
95    pub fn oovh2(&mut self) -> Oovh2W<OovSpec> {
96        Oovh2W::new(self, 2)
97    }
98    #[doc = "Bit 3 - Output Override Value for PWMH output of the channel 3"]
99    #[inline(always)]
100    #[must_use]
101    pub fn oovh3(&mut self) -> Oovh3W<OovSpec> {
102        Oovh3W::new(self, 3)
103    }
104    #[doc = "Bit 16 - Output Override Value for PWML output of the channel 0"]
105    #[inline(always)]
106    #[must_use]
107    pub fn oovl0(&mut self) -> Oovl0W<OovSpec> {
108        Oovl0W::new(self, 16)
109    }
110    #[doc = "Bit 17 - Output Override Value for PWML output of the channel 1"]
111    #[inline(always)]
112    #[must_use]
113    pub fn oovl1(&mut self) -> Oovl1W<OovSpec> {
114        Oovl1W::new(self, 17)
115    }
116    #[doc = "Bit 18 - Output Override Value for PWML output of the channel 2"]
117    #[inline(always)]
118    #[must_use]
119    pub fn oovl2(&mut self) -> Oovl2W<OovSpec> {
120        Oovl2W::new(self, 18)
121    }
122    #[doc = "Bit 19 - Output Override Value for PWML output of the channel 3"]
123    #[inline(always)]
124    #[must_use]
125    pub fn oovl3(&mut self) -> Oovl3W<OovSpec> {
126        Oovl3W::new(self, 19)
127    }
128}
129#[doc = "PWM Output Override Value Register\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`oov::R`](R).  You can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero) this register using [`oov::W`](W). You can also [`modify`](crate::generic::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
130pub struct OovSpec;
131impl crate::RegisterSpec for OovSpec {
132    type Ux = u32;
133}
134#[doc = "`read()` method returns [`oov::R`](R) reader structure"]
135impl crate::Readable for OovSpec {}
136#[doc = "`write(|w| ..)` method takes [`oov::W`](W) writer structure"]
137impl crate::Writable for OovSpec {
138    type Safety = crate::Unsafe;
139    const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
140    const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
141}
142#[doc = "`reset()` method sets OOV to value 0"]
143impl crate::Resettable for OovSpec {
144    const RESET_VALUE: u32 = 0;
145}