l475 disco: Move st-link uart rx/tx settings into variant.cpp
This commit is contained in:
parent
5f3e750d41
commit
3a8edf146f
|
@ -757,6 +757,7 @@ DISCOVERY_F746NG.menu.serial.SerialUSB.build.extra_flags_serial=-DMENU_SERIAL=Se
|
|||
DISCO_B_L475E_IOT01A.name=Discovery B-L475E-IOT01A
|
||||
DISCO_B_L475E_IOT01A.upload.maximum_size=1048576
|
||||
DISCO_B_L475E_IOT01A.upload.maximum_data_size=131072
|
||||
DISCO_B_L475E_IOT01A.build.core=arduino
|
||||
DISCO_B_L475E_IOT01A.build.mcu=cortex-m4 -mfpu=fpv4-sp-d16 -mfloat-abi=hard
|
||||
DISCO_B_L475E_IOT01A.build.series=STM32L4
|
||||
DISCO_B_L475E_IOT01A.build.variant=DISCO_B_L475E_IOT01A
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
// Print milliseconds to Serial monitor every second
|
||||
|
||||
void setup() {
|
||||
SerialUART1.stm32SetTX(PB6);
|
||||
SerialUART1.stm32SetRX(PB7);
|
||||
SerialUART1.begin(115200);
|
||||
}
|
||||
|
||||
|
|
|
@ -7,8 +7,6 @@ int incomingByte; // variable to save incoming serial data
|
|||
|
||||
void setup() {
|
||||
// initialize SerialUART1 communication:
|
||||
SerialUART1.stm32SetTX(PB6);
|
||||
SerialUART1.stm32SetRX(PB7);
|
||||
SerialUART1.begin(115200);
|
||||
|
||||
// initialize the LED pin as an output:
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
#include "stm32_build_defines.h"
|
||||
#include "stm32_def.h"
|
||||
|
||||
extern void SystemClock_Config(void) {
|
||||
#include "Arduino.h"
|
||||
|
||||
extern "C" void SystemClock_Config(void) {
|
||||
RCC_OscInitTypeDef RCC_OscInitStruct;
|
||||
RCC_ClkInitTypeDef RCC_ClkInitStruct;
|
||||
|
||||
|
@ -38,3 +40,9 @@ extern void SystemClock_Config(void) {
|
|||
HAL_NVIC_SetPriority(SysTick_IRQn, 0, 0);
|
||||
|
||||
}
|
||||
|
||||
extern "C" void initVariant() {
|
||||
//UART1 is connected to ST-Link V2.1 as Virtual Com port on non-default PA9/PB7 pins
|
||||
SerialUART1.stm32SetTX(PA9);
|
||||
SerialUART1.stm32SetRX(PB7);
|
||||
}
|
Loading…
Reference in New Issue