@@ -45,7 +45,7 @@ pub enum Level {
4545/// Generic $PX pin
4646pub struct Pin < MODE > {
4747 pub pin : u8 ,
48- #[ cfg( feature = "52840" ) ]
48+ #[ cfg( any ( feature = "52833" , feature = " 52840") ) ]
4949 pub port : bool ,
5050 _mode : PhantomData < MODE > ,
5151}
@@ -59,7 +59,7 @@ use crate::target::P0_NS as P0;
5959#[ cfg( not( any( feature = "9160" , feature = "51" ) ) ) ]
6060use crate :: target:: P0 ;
6161
62- #[ cfg( feature = "52840" ) ]
62+ #[ cfg( any ( feature = "52833" , feature = " 52840") ) ]
6363use crate :: target:: P1 ;
6464
6565use crate :: hal:: digital:: v2:: { InputPin , OutputPin , StatefulOutputPin } ;
@@ -70,11 +70,11 @@ impl<MODE> Pin<MODE> {
7070 pub fn into_floating_input ( self ) -> Pin < Input < Floating > > {
7171 unsafe {
7272 & ( * {
73- #[ cfg( not( feature = "52840" ) ) ]
73+ #[ cfg( not( any ( feature = "52833" , feature = " 52840") ) ) ]
7474 {
7575 P0 :: ptr ( )
7676 }
77- #[ cfg( feature = "52840" ) ]
77+ #[ cfg( any ( feature = "52833" , feature = " 52840") ) ]
7878 {
7979 if !self . port {
8080 P0 :: ptr ( )
@@ -96,19 +96,19 @@ impl<MODE> Pin<MODE> {
9696
9797 Pin {
9898 _mode : PhantomData ,
99- #[ cfg( feature = "52840" ) ]
99+ #[ cfg( any ( feature = "52833" , feature = " 52840") ) ]
100100 port : self . port ,
101101 pin : self . pin ,
102102 }
103103 }
104104 pub fn into_pullup_input ( self ) -> Pin < Input < PullUp > > {
105105 unsafe {
106106 & ( * {
107- #[ cfg( not( feature = "52840" ) ) ]
107+ #[ cfg( not( any ( feature = "52833" , feature = " 52840") ) ) ]
108108 {
109109 P0 :: ptr ( )
110110 }
111- #[ cfg( feature = "52840" ) ]
111+ #[ cfg( any ( feature = "52833" , feature = " 52840") ) ]
112112 {
113113 if !self . port {
114114 P0 :: ptr ( )
@@ -130,19 +130,19 @@ impl<MODE> Pin<MODE> {
130130
131131 Pin {
132132 _mode : PhantomData ,
133- #[ cfg( feature = "52840" ) ]
133+ #[ cfg( any ( feature = "52833" , feature = " 52840") ) ]
134134 port : self . port ,
135135 pin : self . pin ,
136136 }
137137 }
138138 pub fn into_pulldown_input ( self ) -> Pin < Input < PullDown > > {
139139 unsafe {
140140 & ( * {
141- #[ cfg( not( feature = "52840" ) ) ]
141+ #[ cfg( not( any ( feature = "52833" , feature = " 52840") ) ) ]
142142 {
143143 P0 :: ptr ( )
144144 }
145- #[ cfg( feature = "52840" ) ]
145+ #[ cfg( any ( feature = "52833" , feature = " 52840") ) ]
146146 {
147147 if !self . port {
148148 P0 :: ptr ( )
@@ -164,7 +164,7 @@ impl<MODE> Pin<MODE> {
164164
165165 Pin {
166166 _mode : PhantomData ,
167- #[ cfg( feature = "52840" ) ]
167+ #[ cfg( any ( feature = "52833" , feature = " 52840") ) ]
168168 port : self . port ,
169169 pin : self . pin ,
170170 }
@@ -174,7 +174,7 @@ impl<MODE> Pin<MODE> {
174174 pub fn into_push_pull_output ( self , initial_output : Level ) -> Pin < Output < PushPull > > {
175175 let mut pin = Pin {
176176 _mode : PhantomData ,
177- #[ cfg( feature = "52840" ) ]
177+ #[ cfg( any ( feature = "52833" , feature = " 52840") ) ]
178178 port : self . port ,
179179 pin : self . pin ,
180180 } ;
@@ -186,11 +186,11 @@ impl<MODE> Pin<MODE> {
186186
187187 unsafe {
188188 & ( * {
189- #[ cfg( not( feature = "52840" ) ) ]
189+ #[ cfg( not( any ( feature = "52833" , feature = " 52840") ) ) ]
190190 {
191191 P0 :: ptr ( )
192192 }
193- #[ cfg( feature = "52840" ) ]
193+ #[ cfg( any ( feature = "52833" , feature = " 52840") ) ]
194194 {
195195 if !self . port {
196196 P0 :: ptr ( )
@@ -224,7 +224,7 @@ impl<MODE> Pin<MODE> {
224224 ) -> Pin < Output < OpenDrain > > {
225225 let mut pin = Pin {
226226 _mode : PhantomData ,
227- #[ cfg( feature = "52840" ) ]
227+ #[ cfg( any ( feature = "52833" , feature = " 52840") ) ]
228228 port : self . port ,
229229 pin : self . pin ,
230230 } ;
@@ -238,11 +238,11 @@ impl<MODE> Pin<MODE> {
238238 // register for this pin.
239239 let pin_cnf = unsafe {
240240 & ( * {
241- #[ cfg( not( feature = "52840" ) ) ]
241+ #[ cfg( not( any ( feature = "52833" , feature = " 52840") ) ) ]
242242 {
243243 P0 :: ptr ( )
244244 }
245- #[ cfg( feature = "52840" ) ]
245+ #[ cfg( any ( feature = "52833" , feature = " 52840") ) ]
246246 {
247247 if !self . port {
248248 P0 :: ptr ( )
@@ -276,11 +276,11 @@ impl<MODE> InputPin for Pin<Input<MODE>> {
276276 fn is_low ( & self ) -> Result < bool , Self :: Error > {
277277 Ok ( unsafe {
278278 ( ( * {
279- #[ cfg( not( feature = "52840" ) ) ]
279+ #[ cfg( not( any ( feature = "52833" , feature = " 52840") ) ) ]
280280 {
281281 P0 :: ptr ( )
282282 }
283- #[ cfg( feature = "52840" ) ]
283+ #[ cfg( any ( feature = "52833" , feature = " 52840") ) ]
284284 {
285285 if !self . port {
286286 P0 :: ptr ( )
@@ -307,11 +307,11 @@ impl<MODE> OutputPin for Pin<Output<MODE>> {
307307 // TODO - I wish I could do something like `.pins$i()`...
308308 unsafe {
309309 ( * {
310- #[ cfg( not( feature = "52840" ) ) ]
310+ #[ cfg( not( any ( feature = "52833" , feature = " 52840") ) ) ]
311311 {
312312 P0 :: ptr ( )
313313 }
314- #[ cfg( feature = "52840" ) ]
314+ #[ cfg( any ( feature = "52833" , feature = " 52840") ) ]
315315 {
316316 if !self . port {
317317 P0 :: ptr ( )
@@ -332,11 +332,11 @@ impl<MODE> OutputPin for Pin<Output<MODE>> {
332332 // TODO - I wish I could do something like `.pins$i()`...
333333 unsafe {
334334 ( * {
335- #[ cfg( not( feature = "52840" ) ) ]
335+ #[ cfg( not( any ( feature = "52833" , feature = " 52840") ) ) ]
336336 {
337337 P0 :: ptr ( )
338338 }
339- #[ cfg( feature = "52840" ) ]
339+ #[ cfg( any ( feature = "52833" , feature = " 52840") ) ]
340340 {
341341 if !self . port {
342342 P0 :: ptr ( )
@@ -364,11 +364,11 @@ impl<MODE> StatefulOutputPin for Pin<Output<MODE>> {
364364 // TODO - I wish I could do something like `.pins$i()`...
365365 Ok ( unsafe {
366366 ( ( * {
367- #[ cfg( not( feature = "52840" ) ) ]
367+ #[ cfg( not( any ( feature = "52833" , feature = " 52840") ) ) ]
368368 {
369369 P0 :: ptr ( )
370370 }
371- #[ cfg( feature = "52840" ) ]
371+ #[ cfg( any ( feature = "52833" , feature = " 52840") ) ]
372372 {
373373 if !self . port {
374374 P0 :: ptr ( )
@@ -592,7 +592,7 @@ macro_rules! gpio {
592592 pub fn degrade( self ) -> Pin <MODE > {
593593 Pin {
594594 _mode: PhantomData ,
595- #[ cfg( feature = "52840" ) ]
595+ #[ cfg( any ( feature = "52833" , feature = " 52840") ) ]
596596 port: $port_value,
597597 pin: $i
598598 }
@@ -692,7 +692,7 @@ gpio!(P0, p0, p0, false, [
692692
693693// The p1 types are present in the p0 module generated from the
694694// svd, but we want to export them in a p1 module from this crate.
695- #[ cfg( feature = "52840" ) ]
695+ #[ cfg( any ( feature = "52833" , feature = " 52840") ) ]
696696gpio ! ( P1 , p0, p1, true , [
697697 P1_00 : ( p1_00, 0 , Input <Floating >) ,
698698 P1_01 : ( p1_01, 1 , Input <Floating >) ,
0 commit comments