File tree 3 files changed +20
-3
lines changed
3 files changed +20
-3
lines changed Original file line number Diff line number Diff line change @@ -174,12 +174,18 @@ mod impl_ehal {
174
174
type Error = Infallible ;
175
175
type DelayMsFuture < ' a > = impl Future < Output = Result < ( ) , Self :: Error > > + ' a where Self : ' a ;
176
176
fn delay_ms ( & mut self , ms : u32 ) -> Self :: DelayMsFuture < ' _ > {
177
- async move { Ok ( self . delay ( ms. ms ( ) ) . await ) }
177
+ async move {
178
+ self . delay ( ms. ms ( ) ) . await ;
179
+ Ok ( ( ) )
180
+ }
178
181
}
179
182
180
183
type DelayUsFuture < ' a > = impl Future < Output = Result < ( ) , Self :: Error > > + ' a where Self : ' a ;
181
184
fn delay_us ( & mut self , us : u32 ) -> Self :: DelayUsFuture < ' _ > {
182
- async move { Ok ( self . delay ( us. us ( ) ) . await ) }
185
+ async move {
186
+ self . delay ( us. us ( ) ) . await ;
187
+ Ok ( ( ) )
188
+ }
183
189
}
184
190
}
185
191
}
Original file line number Diff line number Diff line change @@ -164,7 +164,11 @@ macro_rules! sercom {
164
164
use self :: uart:: Flags ;
165
165
unsafe {
166
166
let mut peripherals = crate :: pac:: Peripherals :: steal( ) ;
167
+
168
+ #[ cfg( any( feature = "samd11" , feature = "samd21" ) ) ]
167
169
let uart = Self :: reg_block( & mut peripherals) . usart( ) ;
170
+ #[ cfg( feature = "min-samd51g" ) ]
171
+ let uart = Self :: reg_block( & mut peripherals) . usart_int( ) ;
168
172
169
173
let flags_pending = Flags :: from_bits_unchecked( uart. intflag. read( ) . bits( ) ) ;
170
174
let enabled_flags = Flags :: from_bits_unchecked( uart. intenset. read( ) . bits( ) ) ;
@@ -203,12 +207,19 @@ sercom!(apbdmask: (4, 5));
203
207
#[ cfg( feature = "min-samd51n" ) ]
204
208
sercom ! ( apbdmask: ( 6 , 7 ) ) ;
205
209
210
+ #[ allow( dead_code) ]
206
211
#[ cfg( feature = "samd11" ) ]
207
212
const NUM_SERCOM : usize = 2 ;
213
+
214
+ #[ allow( dead_code) ]
208
215
#[ cfg( feature = "samd21e" ) ]
209
216
const NUM_SERCOM : usize = 4 ;
217
+
218
+ #[ allow( dead_code) ]
210
219
#[ cfg( any( feature = "min-samd21g" , feature = "samd51g" , feature = "samd51j" ) ) ]
211
220
const NUM_SERCOM : usize = 6 ;
221
+
222
+ #[ allow( dead_code) ]
212
223
#[ cfg( feature = "min-samd51n" ) ]
213
224
const NUM_SERCOM : usize = 8 ;
214
225
Original file line number Diff line number Diff line change @@ -88,7 +88,7 @@ impl<P: ValidPads> Config<P> {
88
88
89
89
// Enable internal clock mode
90
90
registers. configure_mode ( ) ;
91
- registers. configure_pads ( P :: RXPO as u8 , P :: TXPO as u8 ) ;
91
+ registers. configure_pads ( P :: RXPO , P :: TXPO ) ;
92
92
registers. set_char_size ( EightBit :: SIZE ) ;
93
93
94
94
Self {
You can’t perform that action at this time.
0 commit comments