atsamd51p/dac/
status.rs

1#[doc = "Register `STATUS` reader"]
2pub type R = crate::R<StatusSpec>;
3#[doc = "Field `READY0` reader - DAC 0 Startup Ready"]
4pub type Ready0R = crate::BitReader;
5#[doc = "Field `READY1` reader - DAC 1 Startup Ready"]
6pub type Ready1R = crate::BitReader;
7#[doc = "Field `EOC0` reader - DAC 0 End of Conversion"]
8pub type Eoc0R = crate::BitReader;
9#[doc = "Field `EOC1` reader - DAC 1 End of Conversion"]
10pub type Eoc1R = crate::BitReader;
11impl R {
12    #[doc = "Bit 0 - DAC 0 Startup Ready"]
13    #[inline(always)]
14    pub fn ready0(&self) -> Ready0R {
15        Ready0R::new((self.bits & 1) != 0)
16    }
17    #[doc = "Bit 1 - DAC 1 Startup Ready"]
18    #[inline(always)]
19    pub fn ready1(&self) -> Ready1R {
20        Ready1R::new(((self.bits >> 1) & 1) != 0)
21    }
22    #[doc = "Bit 2 - DAC 0 End of Conversion"]
23    #[inline(always)]
24    pub fn eoc0(&self) -> Eoc0R {
25        Eoc0R::new(((self.bits >> 2) & 1) != 0)
26    }
27    #[doc = "Bit 3 - DAC 1 End of Conversion"]
28    #[inline(always)]
29    pub fn eoc1(&self) -> Eoc1R {
30        Eoc1R::new(((self.bits >> 3) & 1) != 0)
31    }
32}
33#[doc = "Status\n\nYou can [`read`](crate::Reg::read) this register and get [`status::R`](R). See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
34pub struct StatusSpec;
35impl crate::RegisterSpec for StatusSpec {
36    type Ux = u8;
37}
38#[doc = "`read()` method returns [`status::R`](R) reader structure"]
39impl crate::Readable for StatusSpec {}
40#[doc = "`reset()` method sets STATUS to value 0"]
41impl crate::Resettable for StatusSpec {
42    const RESET_VALUE: u8 = 0;
43}