@@ -210,7 +210,11 @@ pub trait SerialExt: Sized + Instance {
210210 clocks : & Clocks ,
211211 ) -> Result < Tx < Self , WORD > , config:: InvalidConfig >
212212 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+ }
214218
215219 fn rx < WORD > (
216220 self ,
@@ -219,7 +223,11 @@ pub trait SerialExt: Sized + Instance {
219223 clocks : & Clocks ,
220224 ) -> Result < Rx < Self , WORD > , config:: InvalidConfig >
221225 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+ }
223231}
224232
225233impl < USART : Instance , WORD > Serial < USART , WORD > {
@@ -231,10 +239,7 @@ impl<USART: Instance, WORD> Serial<USART, WORD> {
231239 ) ,
232240 config : impl Into < config:: Config > ,
233241 clocks : & Clocks ,
234- ) -> Result < Self , config:: InvalidConfig >
235- where
236- <USART as crate :: Ptr >:: RB : uart_impls:: RegisterBlockImpl ,
237- {
242+ ) -> Result < Self , config:: InvalidConfig > {
238243 <USART as crate :: Ptr >:: RB :: new ( usart, pins, config, clocks)
239244 }
240245}
0 commit comments