atsamd51n/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 `TXEN` reader - Tx Serializer Enable Synchronization Status"]
12pub type TxenR = crate::BitReader;
13#[doc = "Field `RXEN` reader - Rx Serializer Enable Synchronization Status"]
14pub type RxenR = crate::BitReader;
15#[doc = "Field `TXDATA` reader - Tx Data Synchronization Status"]
16pub type TxdataR = crate::BitReader;
17#[doc = "Field `RXDATA` reader - Rx Data Synchronization Status"]
18pub type RxdataR = 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 - Tx Serializer Enable Synchronization Status"]
41    #[inline(always)]
42    pub fn txen(&self) -> TxenR {
43        TxenR::new(((self.bits >> 4) & 1) != 0)
44    }
45    #[doc = "Bit 5 - Rx Serializer Enable Synchronization Status"]
46    #[inline(always)]
47    pub fn rxen(&self) -> RxenR {
48        RxenR::new(((self.bits >> 5) & 1) != 0)
49    }
50    #[doc = "Bit 8 - Tx Data Synchronization Status"]
51    #[inline(always)]
52    pub fn txdata(&self) -> TxdataR {
53        TxdataR::new(((self.bits >> 8) & 1) != 0)
54    }
55    #[doc = "Bit 9 - Rx Data Synchronization Status"]
56    #[inline(always)]
57    pub fn rxdata(&self) -> RxdataR {
58        RxdataR::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}