atsam3s8c/usart2/
spi_mode_csr_spi_mode.rs1#[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 `OVRE` reader - Overrun Error"]
8pub type OvreR = crate::BitReader;
9#[doc = "Field `TXEMPTY` reader - Transmitter Empty"]
10pub type TxemptyR = crate::BitReader;
11#[doc = "Field `UNRE` reader - Underrun Error"]
12pub type UnreR = crate::BitReader;
13impl R {
14 #[doc = "Bit 0 - Receiver Ready"]
15 #[inline(always)]
16 pub fn rxrdy(&self) -> RxrdyR {
17 RxrdyR::new((self.bits & 1) != 0)
18 }
19 #[doc = "Bit 1 - Transmitter Ready"]
20 #[inline(always)]
21 pub fn txrdy(&self) -> TxrdyR {
22 TxrdyR::new(((self.bits >> 1) & 1) != 0)
23 }
24 #[doc = "Bit 5 - Overrun Error"]
25 #[inline(always)]
26 pub fn ovre(&self) -> OvreR {
27 OvreR::new(((self.bits >> 5) & 1) != 0)
28 }
29 #[doc = "Bit 9 - Transmitter Empty"]
30 #[inline(always)]
31 pub fn txempty(&self) -> TxemptyR {
32 TxemptyR::new(((self.bits >> 9) & 1) != 0)
33 }
34 #[doc = "Bit 10 - Underrun Error"]
35 #[inline(always)]
36 pub fn unre(&self) -> UnreR {
37 UnreR::new(((self.bits >> 10) & 1) != 0)
38 }
39}
40#[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)."]
41pub struct SpiModeCsrSpiModeSpec;
42impl crate::RegisterSpec for SpiModeCsrSpiModeSpec {
43 type Ux = u32;
44}
45#[doc = "`read()` method returns [`spi_mode_csr_spi_mode::R`](R) reader structure"]
46impl crate::Readable for SpiModeCsrSpiModeSpec {}