atsamd11d/nvmctrl/
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 `READY` reader - NVM Ready"]
6pub type ReadyR = crate::BitReader;
7#[doc = "Field `ERROR` reader - Error"]
8pub type ErrorR = crate::BitReader;
9#[doc = "Field `ERROR` writer - Error"]
10pub type ErrorW<'a, REG> = crate::BitWriter<'a, REG>;
11impl R {
12 #[doc = "Bit 0 - NVM Ready"]
13 #[inline(always)]
14 pub fn ready(&self) -> ReadyR {
15 ReadyR::new((self.bits & 1) != 0)
16 }
17 #[doc = "Bit 1 - Error"]
18 #[inline(always)]
19 pub fn error(&self) -> ErrorR {
20 ErrorR::new(((self.bits >> 1) & 1) != 0)
21 }
22}
23impl W {
24 #[doc = "Bit 1 - Error"]
25 #[inline(always)]
26 #[must_use]
27 pub fn error(&mut self) -> ErrorW<IntflagSpec> {
28 ErrorW::new(self, 1)
29 }
30}
31#[doc = "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)."]
32pub struct IntflagSpec;
33impl crate::RegisterSpec for IntflagSpec {
34 type Ux = u8;
35}
36#[doc = "`read()` method returns [`intflag::R`](R) reader structure"]
37impl crate::Readable for IntflagSpec {}
38#[doc = "`write(|w| ..)` method takes [`intflag::W`](W) writer structure"]
39impl crate::Writable for IntflagSpec {
40 type Safety = crate::Unsafe;
41 const ZERO_TO_MODIFY_FIELDS_BITMAP: u8 = 0;
42 const ONE_TO_MODIFY_FIELDS_BITMAP: u8 = 0;
43}
44#[doc = "`reset()` method sets INTFLAG to value 0"]
45impl crate::Resettable for IntflagSpec {
46 const RESET_VALUE: u8 = 0;
47}