atsamd51p/sercom0/usart_ext/
syncbusy.rs

1#[doc = "Register `SYNCBUSY` reader"]
2pub type R = crate::R<SyncbusySpec>;
3#[doc = "Field `SWRST` reader - Software Reset Synchronization Busy"]
4pub type SwrstR = crate::BitReader;
5#[doc = "Field `ENABLE` reader - SERCOM Enable Synchronization Busy"]
6pub type EnableR = crate::BitReader;
7#[doc = "Field `CTRLB` reader - CTRLB Synchronization Busy"]
8pub type CtrlbR = crate::BitReader;
9#[doc = "Field `RXERRCNT` reader - RXERRCNT Synchronization Busy"]
10pub type RxerrcntR = crate::BitReader;
11#[doc = "Field `LENGTH` reader - LENGTH Synchronization Busy"]
12pub type LengthR = crate::BitReader;
13impl R {
14    #[doc = "Bit 0 - Software Reset Synchronization Busy"]
15    #[inline(always)]
16    pub fn swrst(&self) -> SwrstR {
17        SwrstR::new((self.bits & 1) != 0)
18    }
19    #[doc = "Bit 1 - SERCOM Enable Synchronization Busy"]
20    #[inline(always)]
21    pub fn enable(&self) -> EnableR {
22        EnableR::new(((self.bits >> 1) & 1) != 0)
23    }
24    #[doc = "Bit 2 - CTRLB Synchronization Busy"]
25    #[inline(always)]
26    pub fn ctrlb(&self) -> CtrlbR {
27        CtrlbR::new(((self.bits >> 2) & 1) != 0)
28    }
29    #[doc = "Bit 3 - RXERRCNT Synchronization Busy"]
30    #[inline(always)]
31    pub fn rxerrcnt(&self) -> RxerrcntR {
32        RxerrcntR::new(((self.bits >> 3) & 1) != 0)
33    }
34    #[doc = "Bit 4 - LENGTH Synchronization Busy"]
35    #[inline(always)]
36    pub fn length(&self) -> LengthR {
37        LengthR::new(((self.bits >> 4) & 1) != 0)
38    }
39}
40#[doc = "USART_EXT 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)."]
41pub struct SyncbusySpec;
42impl crate::RegisterSpec for SyncbusySpec {
43    type Ux = u32;
44}
45#[doc = "`read()` method returns [`syncbusy::R`](R) reader structure"]
46impl crate::Readable for SyncbusySpec {}
47#[doc = "`reset()` method sets SYNCBUSY to value 0"]
48impl crate::Resettable for SyncbusySpec {
49    const RESET_VALUE: u32 = 0;
50}