atsamd51g/freqm/
status.rs
1#[doc = "Register `STATUS` reader"]
2pub type R = crate::R<StatusSpec>;
3#[doc = "Register `STATUS` writer"]
4pub type W = crate::W<StatusSpec>;
5#[doc = "Field `BUSY` reader - FREQM Status"]
6pub type BusyR = crate::BitReader;
7#[doc = "Field `BUSY` writer - FREQM Status"]
8pub type BusyW<'a, REG> = crate::BitWriter<'a, REG>;
9#[doc = "Field `OVF` reader - Sticky Count Value Overflow"]
10pub type OvfR = crate::BitReader;
11#[doc = "Field `OVF` writer - Sticky Count Value Overflow"]
12pub type OvfW<'a, REG> = crate::BitWriter<'a, REG>;
13impl R {
14 #[doc = "Bit 0 - FREQM Status"]
15 #[inline(always)]
16 pub fn busy(&self) -> BusyR {
17 BusyR::new((self.bits & 1) != 0)
18 }
19 #[doc = "Bit 1 - Sticky Count Value Overflow"]
20 #[inline(always)]
21 pub fn ovf(&self) -> OvfR {
22 OvfR::new(((self.bits >> 1) & 1) != 0)
23 }
24}
25impl W {
26 #[doc = "Bit 0 - FREQM Status"]
27 #[inline(always)]
28 #[must_use]
29 pub fn busy(&mut self) -> BusyW<StatusSpec> {
30 BusyW::new(self, 0)
31 }
32 #[doc = "Bit 1 - Sticky Count Value Overflow"]
33 #[inline(always)]
34 #[must_use]
35 pub fn ovf(&mut self) -> OvfW<StatusSpec> {
36 OvfW::new(self, 1)
37 }
38}
39#[doc = "Status Register\n\nYou can [`read`](crate::Reg::read) this register and get [`status::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`status::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
40pub struct StatusSpec;
41impl crate::RegisterSpec for StatusSpec {
42 type Ux = u8;
43}
44#[doc = "`read()` method returns [`status::R`](R) reader structure"]
45impl crate::Readable for StatusSpec {}
46#[doc = "`write(|w| ..)` method takes [`status::W`](W) writer structure"]
47impl crate::Writable for StatusSpec {
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 STATUS to value 0"]
53impl crate::Resettable for StatusSpec {
54 const RESET_VALUE: u8 = 0;
55}