atsamd21g/i2s/
syncbusy.rs

1#[doc = "Register `SYNCBUSY` reader"]
2pub type R = crate::R<SyncbusySpec>;
3#[doc = "Field `SWRST` reader - Software Reset Synchronization Status"]
4pub type SwrstR = crate::BitReader;
5#[doc = "Field `ENABLE` reader - Enable Synchronization Status"]
6pub type EnableR = crate::BitReader;
7#[doc = "Field `CKEN0` reader - Clock Unit 0 Enable Synchronization Status"]
8pub type Cken0R = crate::BitReader;
9#[doc = "Field `CKEN1` reader - Clock Unit 1 Enable Synchronization Status"]
10pub type Cken1R = crate::BitReader;
11#[doc = "Field `SEREN0` reader - Serializer 0 Enable Synchronization Status"]
12pub type Seren0R = crate::BitReader;
13#[doc = "Field `SEREN1` reader - Serializer 1 Enable Synchronization Status"]
14pub type Seren1R = crate::BitReader;
15#[doc = "Field `DATA0` reader - Data 0 Synchronization Status"]
16pub type Data0R = crate::BitReader;
17#[doc = "Field `DATA1` reader - Data 1 Synchronization Status"]
18pub type Data1R = crate::BitReader;
19impl R {
20    #[doc = "Bit 0 - Software Reset Synchronization Status"]
21    #[inline(always)]
22    pub fn swrst(&self) -> SwrstR {
23        SwrstR::new((self.bits & 1) != 0)
24    }
25    #[doc = "Bit 1 - Enable Synchronization Status"]
26    #[inline(always)]
27    pub fn enable(&self) -> EnableR {
28        EnableR::new(((self.bits >> 1) & 1) != 0)
29    }
30    #[doc = "Bit 2 - Clock Unit 0 Enable Synchronization Status"]
31    #[inline(always)]
32    pub fn cken0(&self) -> Cken0R {
33        Cken0R::new(((self.bits >> 2) & 1) != 0)
34    }
35    #[doc = "Bit 3 - Clock Unit 1 Enable Synchronization Status"]
36    #[inline(always)]
37    pub fn cken1(&self) -> Cken1R {
38        Cken1R::new(((self.bits >> 3) & 1) != 0)
39    }
40    #[doc = "Bit 4 - Serializer 0 Enable Synchronization Status"]
41    #[inline(always)]
42    pub fn seren0(&self) -> Seren0R {
43        Seren0R::new(((self.bits >> 4) & 1) != 0)
44    }
45    #[doc = "Bit 5 - Serializer 1 Enable Synchronization Status"]
46    #[inline(always)]
47    pub fn seren1(&self) -> Seren1R {
48        Seren1R::new(((self.bits >> 5) & 1) != 0)
49    }
50    #[doc = "Bit 8 - Data 0 Synchronization Status"]
51    #[inline(always)]
52    pub fn data0(&self) -> Data0R {
53        Data0R::new(((self.bits >> 8) & 1) != 0)
54    }
55    #[doc = "Bit 9 - Data 1 Synchronization Status"]
56    #[inline(always)]
57    pub fn data1(&self) -> Data1R {
58        Data1R::new(((self.bits >> 9) & 1) != 0)
59    }
60}
61#[doc = "Synchronization Status\n\nYou can [`read`](crate::Reg::read) this register and get [`syncbusy::R`](R). See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
62pub struct SyncbusySpec;
63impl crate::RegisterSpec for SyncbusySpec {
64    type Ux = u16;
65}
66#[doc = "`read()` method returns [`syncbusy::R`](R) reader structure"]
67impl crate::Readable for SyncbusySpec {}
68#[doc = "`reset()` method sets SYNCBUSY to value 0"]
69impl crate::Resettable for SyncbusySpec {
70    const RESET_VALUE: u16 = 0;
71}