cc2538_pac/ioc/
uartrxd_uart1.rs

1#[doc = "Register `UARTRXD_UART1` reader"]
2pub type R = crate::R<UartrxdUart1Spec>;
3#[doc = "Register `UARTRXD_UART1` writer"]
4pub type W = crate::W<UartrxdUart1Spec>;
5#[doc = "Field `INPUT_SEL` reader - 0: PA0 selected as UART1 RX 1: PA1 selected as UART1 RX ... 31: PD7 selected as UART1 RX"]
6pub type InputSelR = crate::FieldReader;
7#[doc = "Field `INPUT_SEL` writer - 0: PA0 selected as UART1 RX 1: PA1 selected as UART1 RX ... 31: PD7 selected as UART1 RX"]
8pub type InputSelW<'a, REG> = crate::FieldWriter<'a, REG, 5>;
9impl R {
10    #[doc = "Bits 0:4 - 0: PA0 selected as UART1 RX 1: PA1 selected as UART1 RX ... 31: PD7 selected as UART1 RX"]
11    #[inline(always)]
12    pub fn input_sel(&self) -> InputSelR {
13        InputSelR::new((self.bits & 0x1f) as u8)
14    }
15}
16impl W {
17    #[doc = "Bits 0:4 - 0: PA0 selected as UART1 RX 1: PA1 selected as UART1 RX ... 31: PD7 selected as UART1 RX"]
18    #[inline(always)]
19    pub fn input_sel(&mut self) -> InputSelW<UartrxdUart1Spec> {
20        InputSelW::new(self, 0)
21    }
22}
23#[doc = "Selects one of the 32 pins on the four 8-pin I/O-ports (port A, port B, port C, and port D) to be the UART1 RX.\n\nYou can [`read`](crate::Reg::read) this register and get [`uartrxd_uart1::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`uartrxd_uart1::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
24pub struct UartrxdUart1Spec;
25impl crate::RegisterSpec for UartrxdUart1Spec {
26    type Ux = u32;
27}
28#[doc = "`read()` method returns [`uartrxd_uart1::R`](R) reader structure"]
29impl crate::Readable for UartrxdUart1Spec {}
30#[doc = "`write(|w| ..)` method takes [`uartrxd_uart1::W`](W) writer structure"]
31impl crate::Writable for UartrxdUart1Spec {
32    type Safety = crate::Unsafe;
33    const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
34    const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
35}
36#[doc = "`reset()` method sets UARTRXD_UART1 to value 0"]
37impl crate::Resettable for UartrxdUart1Spec {
38    const RESET_VALUE: u32 = 0;
39}