atsamd51p/dac/
syncbusy.rs

1#[doc = "Register `SYNCBUSY` reader"]
2pub type R = crate::R<SyncbusySpec>;
3#[doc = "Field `SWRST` reader - Software Reset"]
4pub type SwrstR = crate::BitReader;
5#[doc = "Field `ENABLE` reader - DAC Enable Status"]
6pub type EnableR = crate::BitReader;
7#[doc = "Field `DATA0` reader - Data DAC 0"]
8pub type Data0R = crate::BitReader;
9#[doc = "Field `DATA1` reader - Data DAC 1"]
10pub type Data1R = crate::BitReader;
11#[doc = "Field `DATABUF0` reader - Data Buffer DAC 0"]
12pub type Databuf0R = crate::BitReader;
13#[doc = "Field `DATABUF1` reader - Data Buffer DAC 1"]
14pub type Databuf1R = crate::BitReader;
15impl R {
16    #[doc = "Bit 0 - Software Reset"]
17    #[inline(always)]
18    pub fn swrst(&self) -> SwrstR {
19        SwrstR::new((self.bits & 1) != 0)
20    }
21    #[doc = "Bit 1 - DAC Enable Status"]
22    #[inline(always)]
23    pub fn enable(&self) -> EnableR {
24        EnableR::new(((self.bits >> 1) & 1) != 0)
25    }
26    #[doc = "Bit 2 - Data DAC 0"]
27    #[inline(always)]
28    pub fn data0(&self) -> Data0R {
29        Data0R::new(((self.bits >> 2) & 1) != 0)
30    }
31    #[doc = "Bit 3 - Data DAC 1"]
32    #[inline(always)]
33    pub fn data1(&self) -> Data1R {
34        Data1R::new(((self.bits >> 3) & 1) != 0)
35    }
36    #[doc = "Bit 4 - Data Buffer DAC 0"]
37    #[inline(always)]
38    pub fn databuf0(&self) -> Databuf0R {
39        Databuf0R::new(((self.bits >> 4) & 1) != 0)
40    }
41    #[doc = "Bit 5 - Data Buffer DAC 1"]
42    #[inline(always)]
43    pub fn databuf1(&self) -> Databuf1R {
44        Databuf1R::new(((self.bits >> 5) & 1) != 0)
45    }
46}
47#[doc = "Synchronization Busy\n\nYou can [`read`](crate::Reg::read) this register and get [`syncbusy::R`](R). See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
48pub struct SyncbusySpec;
49impl crate::RegisterSpec for SyncbusySpec {
50    type Ux = u32;
51}
52#[doc = "`read()` method returns [`syncbusy::R`](R) reader structure"]
53impl crate::Readable for SyncbusySpec {}
54#[doc = "`reset()` method sets SYNCBUSY to value 0"]
55impl crate::Resettable for SyncbusySpec {
56    const RESET_VALUE: u32 = 0;
57}