1#![allow(unused_imports)]
3
4#[cfg(feature = "3fn")]
5use crate::pio::peripheral::PeripheralC;
6#[cfg(feature = "4fn")]
7use crate::pio::peripheral::PeripheralD;
8use crate::{
9 pac::PIOB,
10 pio::peripheral::{PeripheralA, PeripheralB},
11};
12use seq_macro::seq;
13
14#[cfg(any(feature = "sam3a", feature = "sam3u", feature = "sam3x"))]
15seq! {N in 0..32 {
16 crate::pio::def_pioc! {
17 PioB(PIOB) => {
18 #(Pb: N,)*
19 }
20 }
21}}
22
23#[cfg(any(feature = "sam3a", feature = "sam3x"))]
24crate::pio::pin_peripherals! {
25 pio: PIOB,
26 pinopts: [
27 [pin: Pb0, peripherals: [A, B]],
28 [pin: Pb1, peripherals: [A, B]],
29 [pin: Pb2, peripherals: [A, B]],
30 [pin: Pb3, peripherals: [A, B]],
31 [pin: Pb4, peripherals: [A, B]],
32 [pin: Pb5, peripherals: [A, B]],
33 [pin: Pb6, peripherals: [A, B]],
34 [pin: Pb7, peripherals: [A, B]],
35 [pin: Pb8, peripherals: [A, B]],
36 [pin: Pb9, peripherals: [A, B]],
37 [pin: Pb10, peripherals: [A, B]],
38 [pin: Pb11, peripherals: [A, B]],
39 [pin: Pb12, peripherals: [A, B]],
40 [pin: Pb13, peripherals: [A, B]],
41 [pin: Pb14, peripherals: [A, B]],
42 [pin: Pb15, peripherals: [A, B]],
43 [pin: Pb16, peripherals: [A, B]],
44 [pin: Pb17, peripherals: [A, B]],
45 [pin: Pb18, peripherals: [A, B]],
46 [pin: Pb19, peripherals: [A, B]],
47 [pin: Pb20, peripherals: [A, B]],
48 [pin: Pb21, peripherals: [A, B]],
49 [pin: Pb22, peripherals: [A, B]],
50 [pin: Pb23, peripherals: [A, B]],
51 [pin: Pb24, peripherals: [A, B]],
52 [pin: Pb25, peripherals: [A, B]],
53 [pin: Pb26, peripherals: [A, B]],
54 [pin: Pb27, peripherals: [A, B]],
55 [pin: Pb28, peripherals: [A]],
56 [pin: Pb29, peripherals: [A]],
57 [pin: Pb30, peripherals: [A]],
58 [pin: Pb31, peripherals: [A]],
59 ],
60}
61
62#[cfg(feature = "sam3u")]
63crate::pio::pin_peripherals! {
64 pio: PIOB,
65 pinopts: [
66 [pin: Pb0, peripherals: [A, B]],
67 [pin: Pb1, peripherals: [A, B]],
68 [pin: Pb2, peripherals: [A, B]],
69 [pin: Pb3, peripherals: [A, B]],
70 [pin: Pb4, peripherals: [A, B]],
71 [pin: Pb5, peripherals: [A, B]],
72 [pin: Pb6, peripherals: [A, B]],
73 [pin: Pb7, peripherals: [A, B]],
74 [pin: Pb8, peripherals: [A, B]],
75 [pin: Pb9, peripherals: [A, B]],
76 [pin: Pb10, peripherals: [A, B]],
77 [pin: Pb11, peripherals: [A, B]],
78 [pin: Pb12, peripherals: [A, B]],
79 [pin: Pb13, peripherals: [A, B]],
80 [pin: Pb14, peripherals: [A, B]],
81 [pin: Pb15, peripherals: [A, B]],
82 [pin: Pb16, peripherals: [A, B]],
83 [pin: Pb17, peripherals: [A, B]],
84 [pin: Pb18, peripherals: [A, B]],
85 [pin: Pb19, peripherals: [A, B]],
86 [pin: Pb20, peripherals: [A, B]],
87 [pin: Pb21, peripherals: [A, B]],
88 [pin: Pb22, peripherals: [A, B]],
89 [pin: Pb23, peripherals: [A, B]],
90 [pin: Pb24, peripherals: [A, B]],
91 ],
92}
93
94#[cfg(feature = "sam3u144")]
95crate::pio::pin_peripherals! {
96 pio: PIOB,
97 pinopts: [
98 [pin: Pb25, peripherals: [A, B]],
99 [pin: Pb26, peripherals: [A, B]],
100 [pin: Pb27, peripherals: [A, B]],
101 [pin: Pb28, peripherals: [A, B]],
102 [pin: Pb29, peripherals: [A]],
103 [pin: Pb30, peripherals: [A]],
104 [pin: Pb31, peripherals: [A]],
105 ],
106}
107
108#[cfg(any(feature = "sam3n", feature = "sam3s", feature = "sam3s8"))]
109seq! {N in 0..15 {
110 crate::pio::def_pioc! {
111 PioB(PIOB) => {
112 #(Pb: N,)*
113 }
114 }
115}}
116
117#[cfg(feature = "sam3n")]
118crate::pio::pin_peripherals! {
119 pio: PIOB,
120 pinopts: [
121 [pin: Pb0, peripherals: [A]],
122 [pin: Pb1, peripherals: [A]],
123 [pin: Pb2, peripherals: [A, B]],
124 [pin: Pb3, peripherals: [A, B]],
125 [pin: Pb4, peripherals: [A, B]],
126 [pin: Pb5, peripherals: [A]],
127 ],
128}
129
130#[cfg(any(feature = "sam3n64", feature = "sam3n100"))]
131crate::pio::pin_peripherals! {
132 pio: PIOB,
133 pinopts: [
134 [pin: Pb13, peripherals: [B]],
135 [pin: Pb14, peripherals: [A, B]],
136 ],
137}
138
139#[cfg(any(feature = "sam3s", feature = "sam3s8"))]
140crate::pio::pin_peripherals! {
141 pio: PIOB,
142 pinopts: [
143 [pin: Pb0, peripherals: [A]],
144 [pin: Pb1, peripherals: [A]],
145 [pin: Pb2, peripherals: [A, B]],
146 [pin: Pb3, peripherals: [A, B]],
147 [pin: Pb4, peripherals: [A, B]],
148 [pin: Pb5, peripherals: [A, B]],
149 ],
150}
151
152#[cfg(any(
153 feature = "sam3s64",
154 feature = "sam3s100",
155 feature = "sam3s864",
156 feature = "sam3s8100"
157))]
158crate::pio::pin_peripherals! {
159 pio: PIOB,
160 pinopts: [
161 [pin: Pb12, peripherals: [A]],
162 [pin: Pb13, peripherals: [A, B]],
163 [pin: Pb14, peripherals: [A, B]],
164 ],
165}