Skip to content

Commit 1de0666

Browse files
sprhawkteskje
authored andcommitted
enable USART4 for stm32f302xb/c/d/e and stm32f303xb/c/d/e
1 parent 9655ed9 commit 1de0666

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

src/serial.rs

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -447,12 +447,14 @@ macro_rules! hal {
447447
}
448448

449449
#[cfg(any(
450+
feature = "stm32f302",
450451
feature = "stm32f301",
451452
feature = "stm32f318",
452453
feature = "stm32f303",
453454
feature = "stm32f373",
454455
feature = "stm32f378",
455456
feature = "stm32f328",
457+
feature = "stm32f334",
456458
feature = "stm32f358",
457459
feature = "stm32f398"
458460
))]
@@ -462,8 +464,16 @@ hal! {
462464
USART3: (usart3, APB1, usart3en, usart3rst, pclk1),
463465
}
464466

465-
#[cfg(any(feature = "stm32f302", feature = "stm32f334"))]
467+
#[cfg(any(
468+
feature = "stm32f302xb",
469+
feature = "stm32f302xc",
470+
feature = "stm32f302xd",
471+
feature = "stm32f302xe",
472+
feature = "stm32f303xb",
473+
feature = "stm32f303xc",
474+
feature = "stm32f303xd",
475+
feature = "stm32f303xe",
476+
))]
466477
hal! {
467-
USART1: (usart1, APB2, usart1en, usart1rst, pclk2),
468-
USART2: (usart2, APB1, usart2en, usart2rst, pclk1),
478+
USART4: (usart4, APB1, usart4en, usart4rst, pclk2),
469479
}

0 commit comments

Comments
 (0)