atsamd51n/adc0/
intenclr.rs
1#[doc = "Register `INTENCLR` reader"]
2pub type R = crate::R<IntenclrSpec>;
3#[doc = "Register `INTENCLR` writer"]
4pub type W = crate::W<IntenclrSpec>;
5#[doc = "Field `RESRDY` reader - Result Ready Interrupt Disable"]
6pub type ResrdyR = crate::BitReader;
7#[doc = "Field `RESRDY` writer - Result Ready Interrupt Disable"]
8pub type ResrdyW<'a, REG> = crate::BitWriter<'a, REG>;
9#[doc = "Field `OVERRUN` reader - Overrun Interrupt Disable"]
10pub type OverrunR = crate::BitReader;
11#[doc = "Field `OVERRUN` writer - Overrun Interrupt Disable"]
12pub type OverrunW<'a, REG> = crate::BitWriter<'a, REG>;
13#[doc = "Field `WINMON` reader - Window Monitor Interrupt Disable"]
14pub type WinmonR = crate::BitReader;
15#[doc = "Field `WINMON` writer - Window Monitor Interrupt Disable"]
16pub type WinmonW<'a, REG> = crate::BitWriter<'a, REG>;
17impl R {
18 #[doc = "Bit 0 - Result Ready Interrupt Disable"]
19 #[inline(always)]
20 pub fn resrdy(&self) -> ResrdyR {
21 ResrdyR::new((self.bits & 1) != 0)
22 }
23 #[doc = "Bit 1 - Overrun Interrupt Disable"]
24 #[inline(always)]
25 pub fn overrun(&self) -> OverrunR {
26 OverrunR::new(((self.bits >> 1) & 1) != 0)
27 }
28 #[doc = "Bit 2 - Window Monitor Interrupt Disable"]
29 #[inline(always)]
30 pub fn winmon(&self) -> WinmonR {
31 WinmonR::new(((self.bits >> 2) & 1) != 0)
32 }
33}
34impl W {
35 #[doc = "Bit 0 - Result Ready Interrupt Disable"]
36 #[inline(always)]
37 #[must_use]
38 pub fn resrdy(&mut self) -> ResrdyW<IntenclrSpec> {
39 ResrdyW::new(self, 0)
40 }
41 #[doc = "Bit 1 - Overrun Interrupt Disable"]
42 #[inline(always)]
43 #[must_use]
44 pub fn overrun(&mut self) -> OverrunW<IntenclrSpec> {
45 OverrunW::new(self, 1)
46 }
47 #[doc = "Bit 2 - Window Monitor Interrupt Disable"]
48 #[inline(always)]
49 #[must_use]
50 pub fn winmon(&mut self) -> WinmonW<IntenclrSpec> {
51 WinmonW::new(self, 2)
52 }
53}
54#[doc = "Interrupt Enable Clear\n\nYou can [`read`](crate::Reg::read) this register and get [`intenclr::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`intenclr::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
55pub struct IntenclrSpec;
56impl crate::RegisterSpec for IntenclrSpec {
57 type Ux = u8;
58}
59#[doc = "`read()` method returns [`intenclr::R`](R) reader structure"]
60impl crate::Readable for IntenclrSpec {}
61#[doc = "`write(|w| ..)` method takes [`intenclr::W`](W) writer structure"]
62impl crate::Writable for IntenclrSpec {
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 INTENCLR to value 0"]
68impl crate::Resettable for IntenclrSpec {
69 const RESET_VALUE: u8 = 0;
70}