BOARDSRC_CPP (and compatibility issues) pull request
This commit is contained in:
parent
82b669d811
commit
ab6ad0fa0a
|
@ -176,6 +176,7 @@ CPPSRC = $(CHCPPSRC) \
|
|||
$(DEV_SRC_CPP) \
|
||||
$(CONTROLLERS_ALGO_SRC_CPP) \
|
||||
$(SYSTEMSRC_CPP) \
|
||||
$(BOARDSRC_CPP) \
|
||||
$(ENGINES_SRC_CPP) \
|
||||
$(HW_LAYER_EMS_CPP) \
|
||||
$(HW_SENSORS_SRC) \
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
# List of all the board related files.
|
||||
BOARDSRC = $(PROJECT_DIR)/config/boards/ST_STM32F4/board.c
|
||||
BOARDSRC_CPP =
|
||||
|
||||
# Required include directories
|
||||
BOARDINC = $(PROJECT_DIR)/config/boards/ST_STM32F4
|
||||
|
|
|
@ -18,6 +18,8 @@
|
|||
|
||||
#define EFI_CONSOLE_UART_DEVICE (&SD1)
|
||||
|
||||
#define TS_SERIAL_UART_DEVICE (&SD3)
|
||||
|
||||
#define EFI_CONSOLE_TX_PORT GPIOC
|
||||
#define EFI_CONSOLE_TX_PIN 10
|
||||
#define EFI_CONSOLE_RX_PORT GPIOC
|
||||
|
|
|
@ -243,6 +243,10 @@
|
|||
#define EFI_CONSOLE_UART_DEVICE (&SD3)
|
||||
#endif
|
||||
|
||||
#ifndef TS_SERIAL_UART_DEVICE
|
||||
#define TS_SERIAL_UART_DEVICE (&SD3)
|
||||
#endif
|
||||
|
||||
// todo: start using consoleSerialTxPin? Not sure
|
||||
#ifndef EFI_CONSOLE_TX_PORT
|
||||
#define EFI_CONSOLE_TX_PORT GPIOC
|
||||
|
|
|
@ -21,10 +21,13 @@ extern LoggingWithStorage tsLogger;
|
|||
#include "pin_repository.h"
|
||||
#include "usbconsole.h"
|
||||
#include "map_averaging.h"
|
||||
|
||||
#if HAL_USE_SERIAL_USB || defined(__DOXYGEN__)
|
||||
extern SerialUSBDriver SDU1;
|
||||
#define CONSOLE_DEVICE &SDU1
|
||||
|
||||
#define TS_SERIAL_UART_DEVICE &SD3
|
||||
#else
|
||||
#define CONSOLE_DEVICE TS_SERIAL_UART_DEVICE
|
||||
#endif
|
||||
|
||||
static SerialConfig tsSerialConfig = { 0, 0, USART_CR2_STOP1_BITS | USART_CR2_LINEN, 0 };
|
||||
|
||||
|
@ -56,10 +59,13 @@ void startTsPort(void) {
|
|||
|
||||
BaseChannel * getTsSerialDevice(void) {
|
||||
#if EFI_PROD_CODE || defined(__DOXYGEN__)
|
||||
#if EFI_USB_SERIAL || defined(__DOXYGEN__)
|
||||
if (isCommandLineConsoleOverTTL()) {
|
||||
// if console uses UART then TS uses USB
|
||||
return (BaseChannel *) &SDU1;
|
||||
} else {
|
||||
return (BaseChannel *) CONSOLE_DEVICE;
|
||||
} else
|
||||
#endif
|
||||
{
|
||||
return (BaseChannel *) TS_SERIAL_UART_DEVICE;
|
||||
}
|
||||
#else
|
||||
|
|
|
@ -58,6 +58,8 @@ static void extCallback(EXTDriver *extp, expchannel_t channel) {
|
|||
}
|
||||
#if EFI_HD44780_LCD || defined(__DOXYGEN__)
|
||||
onJoystick(button);
|
||||
#else
|
||||
UNUSED(button);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
@ -41,6 +41,8 @@ static time_t GetTimeUnixSec(void) {
|
|||
rtcGetTime(&RTCD1, ×pec);
|
||||
rtcConvertDateTimeToStructTm(×pec, &tim, NULL);
|
||||
return mktime(&tim);
|
||||
#else
|
||||
return (time_t)0;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue