bl808_pac/glb/
uart_signal_1.rs1#[doc = "Register `uart_signal_1` reader"]
2pub struct R(crate::R<UART_SIGNAL_1_SPEC>);
3impl core::ops::Deref for R {
4 type Target = crate::R<UART_SIGNAL_1_SPEC>;
5 #[inline(always)]
6 fn deref(&self) -> &Self::Target {
7 &self.0
8 }
9}
10impl From<crate::R<UART_SIGNAL_1_SPEC>> for R {
11 #[inline(always)]
12 fn from(reader: crate::R<UART_SIGNAL_1_SPEC>) -> Self {
13 R(reader)
14 }
15}
16#[doc = "Register `uart_signal_1` writer"]
17pub struct W(crate::W<UART_SIGNAL_1_SPEC>);
18impl core::ops::Deref for W {
19 type Target = crate::W<UART_SIGNAL_1_SPEC>;
20 #[inline(always)]
21 fn deref(&self) -> &Self::Target {
22 &self.0
23 }
24}
25impl core::ops::DerefMut for W {
26 #[inline(always)]
27 fn deref_mut(&mut self) -> &mut Self::Target {
28 &mut self.0
29 }
30}
31impl From<crate::W<UART_SIGNAL_1_SPEC>> for W {
32 #[inline(always)]
33 fn from(writer: crate::W<UART_SIGNAL_1_SPEC>) -> Self {
34 W(writer)
35 }
36}
37#[doc = "Field `function_1[0-3]` reader - Select peripheral function for UART signal %s (offset by 8)"]
38pub use super::uart_signal_0::FUNCTION_0_R as FUNCTION_1_R;
39#[doc = "Select peripheral function for UART signal %s (offset by 8)"]
40pub use super::uart_signal_0::FUNCTION_A;
41#[doc = "Field `function_1[0-3]` writer - Select peripheral function for UART signal %s (offset by 8)"]
42pub type FUNCTION_1_W<'a, const O: u8> =
43 crate::FieldWriter<'a, u32, UART_SIGNAL_1_SPEC, u8, FUNCTION_A, 8, O>;
44impl R {
45 #[doc = "Select peripheral function for UART signal [0-3]
46(offset by 8)"]
47 #[inline(always)]
48 pub unsafe fn function_1(&self, n: u8) -> FUNCTION_1_R {
49 FUNCTION_1_R::new(((self.bits >> (n * 4)) & 0xff) as u8)
50 }
51 #[doc = "Bits 0:7 - Select peripheral function for UART signal 0 (offset by 8)"]
52 #[inline(always)]
53 pub fn function_10(&self) -> FUNCTION_1_R {
54 FUNCTION_1_R::new((self.bits & 0xff) as u8)
55 }
56 #[doc = "Bits 4:11 - Select peripheral function for UART signal 1 (offset by 8)"]
57 #[inline(always)]
58 pub fn function_11(&self) -> FUNCTION_1_R {
59 FUNCTION_1_R::new(((self.bits >> 4) & 0xff) as u8)
60 }
61 #[doc = "Bits 8:15 - Select peripheral function for UART signal 2 (offset by 8)"]
62 #[inline(always)]
63 pub fn function_12(&self) -> FUNCTION_1_R {
64 FUNCTION_1_R::new(((self.bits >> 8) & 0xff) as u8)
65 }
66 #[doc = "Bits 12:19 - Select peripheral function for UART signal 3 (offset by 8)"]
67 #[inline(always)]
68 pub fn function_13(&self) -> FUNCTION_1_R {
69 FUNCTION_1_R::new(((self.bits >> 12) & 0xff) as u8)
70 }
71}
72impl W {
73 #[doc = "Select peripheral function for UART signal [0-3]
74(offset by 8)"]
75 #[inline(always)]
76 pub unsafe fn function_1<const O: u8>(&mut self) -> FUNCTION_1_W<O> {
77 FUNCTION_1_W::new(self)
78 }
79 #[doc = "Bits 0:7 - Select peripheral function for UART signal 0 (offset by 8)"]
80 #[inline(always)]
81 pub fn function_10(&mut self) -> FUNCTION_1_W<0> {
82 FUNCTION_1_W::new(self)
83 }
84 #[doc = "Bits 4:11 - Select peripheral function for UART signal 1 (offset by 8)"]
85 #[inline(always)]
86 pub fn function_11(&mut self) -> FUNCTION_1_W<4> {
87 FUNCTION_1_W::new(self)
88 }
89 #[doc = "Bits 8:15 - Select peripheral function for UART signal 2 (offset by 8)"]
90 #[inline(always)]
91 pub fn function_12(&mut self) -> FUNCTION_1_W<8> {
92 FUNCTION_1_W::new(self)
93 }
94 #[doc = "Bits 12:19 - Select peripheral function for UART signal 3 (offset by 8)"]
95 #[inline(always)]
96 pub fn function_13(&mut self) -> FUNCTION_1_W<12> {
97 FUNCTION_1_W::new(self)
98 }
99 #[doc = "Writes raw bits to the register."]
100 #[inline(always)]
101 pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
102 self.0.bits(bits);
103 self
104 }
105}
106#[doc = "Universal Asynchronous Receiver/Transmitter signal configuration 1\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [uart_signal_1](index.html) module"]
107pub struct UART_SIGNAL_1_SPEC;
108impl crate::RegisterSpec for UART_SIGNAL_1_SPEC {
109 type Ux = u32;
110}
111#[doc = "`read()` method returns [uart_signal_1::R](R) reader structure"]
112impl crate::Readable for UART_SIGNAL_1_SPEC {
113 type Reader = R;
114}
115#[doc = "`write(|w| ..)` method takes [uart_signal_1::W](W) writer structure"]
116impl crate::Writable for UART_SIGNAL_1_SPEC {
117 type Writer = W;
118}
119#[doc = "`reset()` method sets uart_signal_1 to value 0"]
120impl crate::Resettable for UART_SIGNAL_1_SPEC {
121 #[inline(always)]
122 fn reset_value() -> Self::Ux {
123 0
124 }
125}