atsamd51g/tc0/count16/
drvctrl.rs
1#[doc = "Register `DRVCTRL` reader"]
2pub type R = crate::R<DrvctrlSpec>;
3#[doc = "Register `DRVCTRL` writer"]
4pub type W = crate::W<DrvctrlSpec>;
5#[doc = "Field `INVEN0` reader - Output Waveform Invert Enable 0"]
6pub type Inven0R = crate::BitReader;
7#[doc = "Field `INVEN0` writer - Output Waveform Invert Enable 0"]
8pub type Inven0W<'a, REG> = crate::BitWriter<'a, REG>;
9#[doc = "Field `INVEN1` reader - Output Waveform Invert Enable 1"]
10pub type Inven1R = crate::BitReader;
11#[doc = "Field `INVEN1` writer - Output Waveform Invert Enable 1"]
12pub type Inven1W<'a, REG> = crate::BitWriter<'a, REG>;
13impl R {
14 #[doc = "Bit 0 - Output Waveform Invert Enable 0"]
15 #[inline(always)]
16 pub fn inven0(&self) -> Inven0R {
17 Inven0R::new((self.bits & 1) != 0)
18 }
19 #[doc = "Bit 1 - Output Waveform Invert Enable 1"]
20 #[inline(always)]
21 pub fn inven1(&self) -> Inven1R {
22 Inven1R::new(((self.bits >> 1) & 1) != 0)
23 }
24}
25impl W {
26 #[doc = "Bit 0 - Output Waveform Invert Enable 0"]
27 #[inline(always)]
28 #[must_use]
29 pub fn inven0(&mut self) -> Inven0W<DrvctrlSpec> {
30 Inven0W::new(self, 0)
31 }
32 #[doc = "Bit 1 - Output Waveform Invert Enable 1"]
33 #[inline(always)]
34 #[must_use]
35 pub fn inven1(&mut self) -> Inven1W<DrvctrlSpec> {
36 Inven1W::new(self, 1)
37 }
38}
39#[doc = "Control C\n\nYou can [`read`](crate::Reg::read) this register and get [`drvctrl::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`drvctrl::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
40pub struct DrvctrlSpec;
41impl crate::RegisterSpec for DrvctrlSpec {
42 type Ux = u8;
43}
44#[doc = "`read()` method returns [`drvctrl::R`](R) reader structure"]
45impl crate::Readable for DrvctrlSpec {}
46#[doc = "`write(|w| ..)` method takes [`drvctrl::W`](W) writer structure"]
47impl crate::Writable for DrvctrlSpec {
48 type Safety = crate::Unsafe;
49 const ZERO_TO_MODIFY_FIELDS_BITMAP: u8 = 0;
50 const ONE_TO_MODIFY_FIELDS_BITMAP: u8 = 0;
51}
52#[doc = "`reset()` method sets DRVCTRL to value 0"]
53impl crate::Resettable for DrvctrlSpec {
54 const RESET_VALUE: u8 = 0;
55}