File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -16,6 +16,10 @@ use crate::rcc::{self, Clocks};
16
16
pub ( crate ) use crate :: pac:: uart4:: RegisterBlock as RegisterBlockUart ;
17
17
pub ( crate ) use crate :: pac:: usart1:: RegisterBlock as RegisterBlockUsart ;
18
18
19
+ #[ cfg( feature = "uart4" ) ]
20
+ impl crate :: Sealed for RegisterBlockUart { }
21
+ impl crate :: Sealed for RegisterBlockUsart { }
22
+
19
23
// Implemented by all USART/UART instances
20
24
pub trait Instance : crate :: Sealed + rcc:: Enable + rcc:: Reset + rcc:: BusClock + CommonPins {
21
25
type RegisterBlock ;
@@ -26,7 +30,7 @@ pub trait Instance: crate::Sealed + rcc::Enable + rcc::Reset + rcc::BusClock + C
26
30
fn set_stopbits ( & self , bits : config:: StopBits ) ;
27
31
}
28
32
29
- pub trait RegisterBlockImpl {
33
+ pub trait RegisterBlockImpl : crate :: Sealed {
30
34
fn new < UART : Instance < RegisterBlock = Self > , WORD > (
31
35
uart : UART ,
32
36
pins : ( impl Into < UART :: Tx < PushPull > > , impl Into < UART :: Rx < PushPull > > ) ,
You can’t perform that action at this time.
0 commit comments