bl616_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] (offset by 8)"]
46 #[inline(always)]
47 pub unsafe fn function_1(&self, n: u8) -> FUNCTION_1_R {
48 FUNCTION_1_R::new(((self.bits >> (n * 4)) & 0xff) as u8)
49 }
50 #[doc = "Bits 0:7 - Select peripheral function for UART signal 0 (offset by 8)"]
51 #[inline(always)]
52 pub fn function_10(&self) -> FUNCTION_1_R {
53 FUNCTION_1_R::new((self.bits & 0xff) as u8)
54 }
55 #[doc = "Bits 4:11 - Select peripheral function for UART signal 1 (offset by 8)"]
56 #[inline(always)]
57 pub fn function_11(&self) -> FUNCTION_1_R {
58 FUNCTION_1_R::new(((self.bits >> 4) & 0xff) as u8)
59 }
60 #[doc = "Bits 8:15 - Select peripheral function for UART signal 2 (offset by 8)"]
61 #[inline(always)]
62 pub fn function_12(&self) -> FUNCTION_1_R {
63 FUNCTION_1_R::new(((self.bits >> 8) & 0xff) as u8)
64 }
65 #[doc = "Bits 12:19 - Select peripheral function for UART signal 3 (offset by 8)"]
66 #[inline(always)]
67 pub fn function_13(&self) -> FUNCTION_1_R {
68 FUNCTION_1_R::new(((self.bits >> 12) & 0xff) as u8)
69 }
70}
71impl W {
72 #[doc = "Select peripheral function for UART signal [0-3] (offset by 8)"]
73 #[inline(always)]
74 #[must_use]
75 pub unsafe fn function_1<const O: u8>(&mut self) -> FUNCTION_1_W<O> {
76 FUNCTION_1_W::new(self)
77 }
78 #[doc = "Bits 0:7 - Select peripheral function for UART signal 0 (offset by 8)"]
79 #[inline(always)]
80 #[must_use]
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 #[must_use]
87 pub fn function_11(&mut self) -> FUNCTION_1_W<4> {
88 FUNCTION_1_W::new(self)
89 }
90 #[doc = "Bits 8:15 - Select peripheral function for UART signal 2 (offset by 8)"]
91 #[inline(always)]
92 #[must_use]
93 pub fn function_12(&mut self) -> FUNCTION_1_W<8> {
94 FUNCTION_1_W::new(self)
95 }
96 #[doc = "Bits 12:19 - Select peripheral function for UART signal 3 (offset by 8)"]
97 #[inline(always)]
98 #[must_use]
99 pub fn function_13(&mut self) -> FUNCTION_1_W<12> {
100 FUNCTION_1_W::new(self)
101 }
102 #[doc = "Writes raw bits to the register."]
103 #[inline(always)]
104 pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
105 self.0.bits(bits);
106 self
107 }
108}
109#[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"]
110pub struct UART_SIGNAL_1_SPEC;
111impl crate::RegisterSpec for UART_SIGNAL_1_SPEC {
112 type Ux = u32;
113}
114#[doc = "`read()` method returns [uart_signal_1::R](R) reader structure"]
115impl crate::Readable for UART_SIGNAL_1_SPEC {
116 type Reader = R;
117}
118#[doc = "`write(|w| ..)` method takes [uart_signal_1::W](W) writer structure"]
119impl crate::Writable for UART_SIGNAL_1_SPEC {
120 type Writer = W;
121 const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
122 const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
123}
124#[doc = "`reset()` method sets uart_signal_1 to value 0"]
125impl crate::Resettable for UART_SIGNAL_1_SPEC {
126 const RESET_VALUE: Self::Ux = 0;
127}