WiP
This commit is contained in:
@@ -23,8 +23,8 @@
|
||||
#include "touch.h"
|
||||
|
||||
#include "hal/adc_driver.h"
|
||||
#include "../common/arm/stm32/stm32_hal_adc.h"
|
||||
#include "../common/arm/stm32/timers_driver.h"
|
||||
#include "stm32_hal_adc.h"
|
||||
#include "timers_driver.h"
|
||||
|
||||
#if defined(__cplusplus) && !defined(SIMU)
|
||||
extern "C" {
|
||||
@@ -242,3 +242,8 @@ void boardOff()
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
const etx_serial_port_t* auxSerialGetPort(int port_nr)
|
||||
{
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
#include "opentx_constants.h"
|
||||
#include "board_common.h"
|
||||
#include "hal.h"
|
||||
#include "hal/serial_port.h"
|
||||
|
||||
#if !defined(LUA_EXPORT_GENERATION)
|
||||
#include "stm32f4xx_sdio.h"
|
||||
@@ -390,9 +391,8 @@ bool pwrPressed();
|
||||
#endif
|
||||
uint32_t pwrPressedDuration();;
|
||||
|
||||
#define AUX_SERIAL_POWER_ON()
|
||||
#define AUX_SERIAL_POWER_OFF()
|
||||
|
||||
const etx_serial_port_t* auxSerialGetPort(int port_nr);
|
||||
|
||||
// LCD driver
|
||||
#define LCD_W 320
|
||||
#define LCD_H 480
|
||||
@@ -483,7 +483,7 @@ void telemetryPortInit(uint32_t baudrate, uint8_t mode);
|
||||
void telemetryPortSetDirectionOutput();
|
||||
void telemetryPortSetDirectionInput();
|
||||
void sportSendBuffer(const uint8_t * buffer, uint32_t count);
|
||||
bool telemetryGetByte(uint8_t * byte);
|
||||
bool sportGetByte(uint8_t * byte);
|
||||
void telemetryClearFifo();
|
||||
void sportSendByte(uint8_t byte);
|
||||
extern uint32_t telemetryErrors;
|
||||
@@ -507,27 +507,10 @@ void hapticOn(uint32_t pwmPercent);
|
||||
//#define AUX_SERIAL
|
||||
#define DEBUG_BAUDRATE 115200
|
||||
#define LUA_DEFAULT_BAUDRATE 115200
|
||||
#define auxSerialTelemetryInit(protocol) auxSerialInit(UART_MODE_TELEMETRY, protocol)
|
||||
|
||||
#if defined(AUX_SERIAL_PWR_GPIO)
|
||||
#define AUX_SERIAL_POWER_ON() auxSerialPowerOn()
|
||||
#define AUX_SERIAL__POWER_OFF() auxSerialPowerOff()
|
||||
#else
|
||||
#define AUX_SERIAL_POWER_ON()
|
||||
#define AUX_SERIAL__POWER_OFF()
|
||||
#endif
|
||||
|
||||
extern uint8_t currentTrainerMode;
|
||||
void checkTrainerSettings();
|
||||
|
||||
#if defined(__cplusplus)
|
||||
#include "fifo.h"
|
||||
#include "dmafifo.h"
|
||||
extern DMAFifo<512> telemetryFifo;
|
||||
typedef Fifo<uint8_t, 32> AuxSerialRxFifo;
|
||||
extern AuxSerialRxFifo auxSerialRxFifo;
|
||||
#endif
|
||||
|
||||
// Touch panel driver
|
||||
bool touchPanelEventOccured();
|
||||
struct TouchState touchPanelRead();
|
||||
|
||||
@@ -215,7 +215,7 @@ extern "C" void TELEMETRY_USART_IRQHandler(void)
|
||||
}
|
||||
|
||||
// TODO we should have telemetry in an higher layer, functions above should move to a sport_driver.cpp
|
||||
bool telemetryGetByte(uint8_t * byte)
|
||||
bool sportGetByte(uint8_t * byte)
|
||||
{
|
||||
#if defined(PCBX12S)
|
||||
if (telemetryFifoMode & TELEMETRY_SERIAL_WITHOUT_DMA)
|
||||
|
||||
Reference in New Issue
Block a user