atsam3s1a/usart0/
spi_mode_csr_spi_mode.rs

1#[doc = "Register `CSR_SPI_MODE` reader"]
2pub type R = crate::R<SpiModeCsrSpiModeSpec>;
3#[doc = "Field `RXRDY` reader - Receiver Ready"]
4pub type RxrdyR = crate::BitReader;
5#[doc = "Field `TXRDY` reader - Transmitter Ready"]
6pub type TxrdyR = crate::BitReader;
7#[doc = "Field `ENDRX` reader - "]
8pub type EndrxR = crate::BitReader;
9#[doc = "Field `ENDTX` reader - "]
10pub type EndtxR = crate::BitReader;
11#[doc = "Field `OVRE` reader - Overrun Error"]
12pub type OvreR = crate::BitReader;
13#[doc = "Field `TXEMPTY` reader - Transmitter Empty"]
14pub type TxemptyR = crate::BitReader;
15#[doc = "Field `UNRE` reader - Underrun Error"]
16pub type UnreR = crate::BitReader;
17#[doc = "Field `TXBUFE` reader - "]
18pub type TxbufeR = crate::BitReader;
19#[doc = "Field `RXBUFF` reader - "]
20pub type RxbuffR = crate::BitReader;
21impl R {
22    #[doc = "Bit 0 - Receiver Ready"]
23    #[inline(always)]
24    pub fn rxrdy(&self) -> RxrdyR {
25        RxrdyR::new((self.bits & 1) != 0)
26    }
27    #[doc = "Bit 1 - Transmitter Ready"]
28    #[inline(always)]
29    pub fn txrdy(&self) -> TxrdyR {
30        TxrdyR::new(((self.bits >> 1) & 1) != 0)
31    }
32    #[doc = "Bit 3"]
33    #[inline(always)]
34    pub fn endrx(&self) -> EndrxR {
35        EndrxR::new(((self.bits >> 3) & 1) != 0)
36    }
37    #[doc = "Bit 4"]
38    #[inline(always)]
39    pub fn endtx(&self) -> EndtxR {
40        EndtxR::new(((self.bits >> 4) & 1) != 0)
41    }
42    #[doc = "Bit 5 - Overrun Error"]
43    #[inline(always)]
44    pub fn ovre(&self) -> OvreR {
45        OvreR::new(((self.bits >> 5) & 1) != 0)
46    }
47    #[doc = "Bit 9 - Transmitter Empty"]
48    #[inline(always)]
49    pub fn txempty(&self) -> TxemptyR {
50        TxemptyR::new(((self.bits >> 9) & 1) != 0)
51    }
52    #[doc = "Bit 10 - Underrun Error"]
53    #[inline(always)]
54    pub fn unre(&self) -> UnreR {
55        UnreR::new(((self.bits >> 10) & 1) != 0)
56    }
57    #[doc = "Bit 11"]
58    #[inline(always)]
59    pub fn txbufe(&self) -> TxbufeR {
60        TxbufeR::new(((self.bits >> 11) & 1) != 0)
61    }
62    #[doc = "Bit 12"]
63    #[inline(always)]
64    pub fn rxbuff(&self) -> RxbuffR {
65        RxbuffR::new(((self.bits >> 12) & 1) != 0)
66    }
67}
68#[doc = "Channel Status Register\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`spi_mode_csr_spi_mode::R`](R).  See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
69pub struct SpiModeCsrSpiModeSpec;
70impl crate::RegisterSpec for SpiModeCsrSpiModeSpec {
71    type Ux = u32;
72}
73#[doc = "`read()` method returns [`spi_mode_csr_spi_mode::R`](R) reader structure"]
74impl crate::Readable for SpiModeCsrSpiModeSpec {}