1
0
Fork 0
mirror of https://github.com/opentx/opentx.git synced 2025-07-25 17:25:13 +03:00

Compilation fix (attempt N+5)

This commit is contained in:
Bertrand Songis 2019-08-22 23:21:48 +02:00
parent 23afa610d0
commit 6b9ee110d3
No known key found for this signature in database
GPG key ID: F189F79290FEC50F
6 changed files with 35 additions and 19 deletions

View file

@ -18,6 +18,7 @@ include_directories(${STM32USB_DIR}/STM32_USB_Device_Library/Class/hid/inc)
include_directories(${STM32USB_DIR}/STM32_USB_Device_Library/Class/cdc/inc) include_directories(${STM32USB_DIR}/STM32_USB_Device_Library/Class/cdc/inc)
include_directories(${STM32USB_DIR}/STM32_USB_Device_Library/Core/inc/) include_directories(${STM32USB_DIR}/STM32_USB_Device_Library/Core/inc/)
include_directories(${STM32USB_DIR}/STM32_USB_OTG_Driver/inc) include_directories(${STM32USB_DIR}/STM32_USB_OTG_Driver/inc)
set(STM32USB_SRC set(STM32USB_SRC
STM32_USB_OTG_Driver/src/usb_core.c STM32_USB_OTG_Driver/src/usb_core.c
STM32_USB_OTG_Driver/src/usb_dcd.c STM32_USB_OTG_Driver/src/usb_dcd.c
@ -26,20 +27,19 @@ set(STM32USB_SRC
STM32_USB_Device_Library/Core/src/usbd_ioreq.c STM32_USB_Device_Library/Core/src/usbd_ioreq.c
STM32_USB_Device_Library/Core/src/usbd_req.c STM32_USB_Device_Library/Core/src/usbd_req.c
) )
set(FIRMWARE_TARGET_SRC set(FIRMWARE_TARGET_SRC
${FIRMWARE_TARGET_SRC} ${FIRMWARE_TARGET_SRC}
../common/arm/stm32/rtc_driver.cpp ../common/arm/stm32/rtc_driver.cpp
../common/arm/stm32/cpu_id.cpp
${AUX_SERIAL_DRIVER} ${AUX_SERIAL_DRIVER}
)
set(FIRMWARE_TARGET_SRC
${FIRMWARE_TARGET_SRC}
../common/arm/stm32/delays.cpp ../common/arm/stm32/delays.cpp
../common/arm/stm32/usb_bsp.c ../common/arm/stm32/usb_bsp.c
../common/arm/stm32/usbd_desc.c ../common/arm/stm32/usbd_desc.c
../common/arm/stm32/usbd_usr.cpp ../common/arm/stm32/usbd_usr.cpp
../common/arm/stm32/usb_driver.cpp ../common/arm/stm32/usb_driver.cpp
../common/arm/stm32/flash_driver.cpp ../common/arm/stm32/flash_driver.cpp
../common/arm/stm32/usbd_storage_msd.cpp
../common/arm/stm32/usbd_hid_joystick.c
) )
if(DEBUG OR CLI OR USB_SERIAL) if(DEBUG OR CLI OR USB_SERIAL)
@ -62,16 +62,6 @@ set(STM32USB_SRC
STM32_USB_Device_Library/Class/msc/src/usbd_msc_core.c STM32_USB_Device_Library/Class/msc/src/usbd_msc_core.c
) )
set(FIRMWARE_TARGET_SRC
${FIRMWARE_TARGET_SRC}
../common/arm/stm32/usbd_storage_msd.cpp
)
set(FIRMWARE_TARGET_SRC
${FIRMWARE_TARGET_SRC}
../common/arm/stm32/usbd_hid_joystick.c
)
if(GVARS) if(GVARS)
set(GUI_SRC set(GUI_SRC
${GUI_SRC} ${GUI_SRC}
@ -99,6 +89,11 @@ foreach(FILE ${STM32USB_SRC})
) )
endforeach() endforeach()
set(TARGET_SRC
${TARGET_SRC}
../common/arm/stm32/cpu_id.cpp
)
set(SRC set(SRC
${SRC} ${SRC}
io/bootloader_flash.cpp io/bootloader_flash.cpp

View file

@ -22,7 +22,7 @@
uint8_t auxSerialMode = 0; uint8_t auxSerialMode = 0;
Fifo<uint8_t, 512> auxSerialTxFifo; Fifo<uint8_t, 512> auxSerialTxFifo;
DMAFifo<32> auxSerialRxFifo __DMA (AUX_SERIAL_DMA_Stream_RX); AuxSerialRxFifo auxSerialRxFifo __DMA (AUX_SERIAL_DMA_Stream_RX);
void auxSerialSetup(unsigned int baudrate, bool dma) void auxSerialSetup(unsigned int baudrate, bool dma)
{ {

View file

@ -614,7 +614,8 @@ void bluetoothDisable();
#include "fifo.h" #include "fifo.h"
#include "dmafifo.h" #include "dmafifo.h"
extern DMAFifo<512> telemetryFifo; extern DMAFifo<512> telemetryFifo;
extern DMAFifo<32> auxSerialRxFifo; typedef DMAFifo<32> AuxSerialRxFifo;
extern AuxSerialRxFifo auxSerialRxFifo;
#endif #endif
#endif // _BOARD_H_ #endif // _BOARD_H_

View file

@ -757,3 +757,23 @@ void rtcInit()
void rtcSetTime(const struct gtm * t) void rtcSetTime(const struct gtm * t)
{ {
} }
#if defined(AUX_SERIAL)
AuxSerialRxFifo auxSerialRxFifo(nullptr);
uint8_t auxSerialMode;
void auxSerialInit(unsigned int mode, unsigned int protocol)
{
}
void auxSerialPutc(char c)
{
}
void auxSerialSbusInit()
{
}
void auxSerialStop()
{
}
#endif

View file

@ -99,8 +99,7 @@ void SECOND_UART_Stop()
extern "C" void UART0_IRQHandler() extern "C" void UART0_IRQHandler()
{ {
if ( SECOND_SERIAL_UART->UART_SR & UART_SR_RXRDY ) if (SECOND_SERIAL_UART->UART_SR & UART_SR_RXRDY) {
{
auxSerialRxFifo.push(SECOND_SERIAL_UART->UART_RHR); auxSerialRxFifo.push(SECOND_SERIAL_UART->UART_RHR);
} }
} }

View file

@ -850,7 +850,8 @@ void setTopBatteryValue(uint32_t volts);
#endif #endif
extern Fifo<uint8_t, TELEMETRY_FIFO_SIZE> telemetryFifo; extern Fifo<uint8_t, TELEMETRY_FIFO_SIZE> telemetryFifo;
extern DMAFifo<32> auxSerialRxFifo; typedef DMAFifo<32> AuxSerialRxFifo;
extern AuxSerialRxFifo auxSerialRxFifo;
#endif #endif
// Gyro driver // Gyro driver