From fd9f506f11661d34b1e42a4af8b12d994fd1fa0e Mon Sep 17 00:00:00 2001 From: Davide Mor <davide.mor@skywarder.eu> Date: Fri, 5 Aug 2022 17:16:01 +0200 Subject: [PATCH] [GroundStation] Added uart5 to hwmapping and bsp --- .../interfaces-impl/bsp.cpp | 5 +++++ .../interfaces-impl/hwmapping.h | 6 ++++++ 2 files changed, 11 insertions(+) diff --git a/miosix/arch/cortexM4_stm32f4/stm32f429zi_skyward_ground_station/interfaces-impl/bsp.cpp b/miosix/arch/cortexM4_stm32f4/stm32f429zi_skyward_ground_station/interfaces-impl/bsp.cpp index 4b300530..f8672b49 100644 --- a/miosix/arch/cortexM4_stm32f4/stm32f429zi_skyward_ground_station/interfaces-impl/bsp.cpp +++ b/miosix/arch/cortexM4_stm32f4/stm32f429zi_skyward_ground_station/interfaces-impl/bsp.cpp @@ -213,6 +213,11 @@ void IRQbspInit() interfaces::spi4::mosi::mode(Mode::ALTERNATE); interfaces::spi4::mosi::alternateFunction(5); + interfaces::uart5::tx::mode(Mode::ALTERNATE); + interfaces::uart5::tx::alternateFunction(8); + interfaces::uart5::rx::mode(Mode::ALTERNATE); + interfaces::uart5::rx::alternateFunction(8); + peripherals::ra01::cs::mode(Mode::OUTPUT); peripherals::ra01::dio0::mode(Mode::INPUT); peripherals::ra01::nrst::mode(Mode::OUTPUT); diff --git a/miosix/arch/cortexM4_stm32f4/stm32f429zi_skyward_ground_station/interfaces-impl/hwmapping.h b/miosix/arch/cortexM4_stm32f4/stm32f429zi_skyward_ground_station/interfaces-impl/hwmapping.h index 3a213ec3..e5ad20d4 100644 --- a/miosix/arch/cortexM4_stm32f4/stm32f429zi_skyward_ground_station/interfaces-impl/hwmapping.h +++ b/miosix/arch/cortexM4_stm32f4/stm32f429zi_skyward_ground_station/interfaces-impl/hwmapping.h @@ -52,6 +52,12 @@ using miso = Gpio<GPIOE_BASE, 5>; using mosi = Gpio<GPIOE_BASE, 6>; } // namespace spi4 +namespace uart5 +{ +using tx = Gpio<GPIOC_BASE, 12>; +using rx = Gpio<GPIOD_BASE, 2>; +} // namespace uart5 + } // namespace interfaces namespace peripherals -- GitLab