Skip to content
Snippets Groups Projects
Commit 957c3476 authored by Pietro Bortolus's avatar Pietro Bortolus
Browse files

changed an issue in stm32f756zg_nucleo where tx and rx were used before being defined

parent ac5dfba3
Branches
Tags
1 merge request!334[BSP] Fix GPIO alternate function definition order
Pipeline #10625 passed
...@@ -78,10 +78,13 @@ void IRQbspInit() ...@@ -78,10 +78,13 @@ void IRQbspInit()
delayMs(100); delayMs(100);
ledOff(); ledOff();
tx.alternateFunction(7);
auto tx = Gpio<GPIOD_BASE, 8>::getPin(); auto tx = Gpio<GPIOD_BASE, 8>::getPin();
rx.alternateFunction(7); tx.alternateFunction(7);
auto rx = Gpio<GPIOD_BASE, 9>::getPin(); auto rx = Gpio<GPIOD_BASE, 9>::getPin();
rx.alternateFunction(7);
// rx and tx alternate function is set here, mode will be set by the
// STM32Serial class later on
DefaultConsole::instance().IRQset(intrusive_ref_ptr<Device>( DefaultConsole::instance().IRQset(intrusive_ref_ptr<Device>(
new STM32Serial(3, defaultSerialSpeed, tx, rx))); new STM32Serial(3, defaultSerialSpeed, tx, rx)));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment