Skip to content

Commit 2e44b16

Browse files
committed
usart
1 parent 0bf46ad commit 2e44b16

File tree

3 files changed

+330
-453
lines changed

3 files changed

+330
-453
lines changed

src/gpio/alt.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -271,6 +271,9 @@ pub trait SerialAsync {
271271
pub trait SerialSync {
272272
type Ck;
273273
}
274+
pub trait SerialRs485 {
275+
type De;
276+
}
274277
/// Hardware flow control (RS232)
275278
pub trait SerialRs232 {
276279
/// Receive

src/gpio/alt/c0.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -710,6 +710,9 @@ pub mod usart1 {
710710
type Rx<Otype> = Rx<Otype>;
711711
type Tx<Otype> = Tx<Otype>;
712712
}
713+
impl SerialRs485 for USART {
714+
type De = De;
715+
}
713716
impl SerialSync for USART {
714717
type Ck = Ck;
715718
}
@@ -805,6 +808,9 @@ pub mod usart2 {
805808
type Rx<Otype> = Rx<Otype>;
806809
type Tx<Otype> = Tx<Otype>;
807810
}
811+
impl SerialRs485 for USART {
812+
type De = De;
813+
}
808814
impl SerialSync for USART {
809815
type Ck = Ck;
810816
}

0 commit comments

Comments
 (0)