@@ -210,7 +210,11 @@ pub trait SerialExt: Sized + Instance {
210
210
clocks : & Clocks ,
211
211
) -> Result < Tx < Self , WORD > , config:: InvalidConfig >
212
212
where
213
- NoPin : Into < Self :: Rx < PushPull > > ;
213
+ NoPin : Into < Self :: Rx < PushPull > > ,
214
+ {
215
+ self . serial ( ( tx_pin, NoPin :: new ( ) ) , config, clocks)
216
+ . map ( |s| s. split ( ) . 0 )
217
+ }
214
218
215
219
fn rx < WORD > (
216
220
self ,
@@ -219,7 +223,11 @@ pub trait SerialExt: Sized + Instance {
219
223
clocks : & Clocks ,
220
224
) -> Result < Rx < Self , WORD > , config:: InvalidConfig >
221
225
where
222
- NoPin : Into < Self :: Tx < PushPull > > ;
226
+ NoPin : Into < Self :: Tx < PushPull > > ,
227
+ {
228
+ self . serial ( ( NoPin :: new ( ) , rx_pin) , config, clocks)
229
+ . map ( |s| s. split ( ) . 1 )
230
+ }
223
231
}
224
232
225
233
impl < USART : Instance , WORD > Serial < USART , WORD > {
@@ -231,10 +239,7 @@ impl<USART: Instance, WORD> Serial<USART, WORD> {
231
239
) ,
232
240
config : impl Into < config:: Config > ,
233
241
clocks : & Clocks ,
234
- ) -> Result < Self , config:: InvalidConfig >
235
- where
236
- <USART as crate :: Ptr >:: RB : uart_impls:: RegisterBlockImpl ,
237
- {
242
+ ) -> Result < Self , config:: InvalidConfig > {
238
243
<USART as crate :: Ptr >:: RB :: new ( usart, pins, config, clocks)
239
244
}
240
245
}
0 commit comments