Taranis 212x64
This commit is contained in:
committed by
Raphael Coeffic
parent
0eb11ae4b6
commit
352c273d32
@@ -24,8 +24,10 @@
|
||||
#include "aux_serial_driver.h"
|
||||
|
||||
#include "board.h"
|
||||
|
||||
#include "fifo.h"
|
||||
#include "dmafifo.h"
|
||||
#include "debug.h"
|
||||
|
||||
#define AUX_SERIAL_TX_BUFFER 512
|
||||
|
||||
|
||||
@@ -57,6 +57,7 @@ set(BOOTLOADER_SRC
|
||||
../../../../../keys.cpp
|
||||
../../../../../strhelpers.cpp
|
||||
../../../../../stamp.cpp
|
||||
../../../../../syscalls.c
|
||||
../../../../../${STM32USB_DIR}/STM32_USB_OTG_Driver/src/usb_core.c
|
||||
../../../../../${STM32USB_DIR}/STM32_USB_OTG_Driver/src/usb_dcd.c
|
||||
../../../../../${STM32USB_DIR}/STM32_USB_OTG_Driver/src/usb_dcd_int.c
|
||||
@@ -120,7 +121,6 @@ if(PCB STREQUAL X10 OR PCB STREQUAL X12S OR PCB STREQUAL NV14)
|
||||
../../../../../targets/common/arm/stm32/sdio_sd.c
|
||||
../../../../../targets/common/arm/stm32/rtc_driver.cpp
|
||||
../../../../../targets/${TARGET_DIR}/haptic_driver.cpp
|
||||
../../../../../syscalls.c
|
||||
)
|
||||
|
||||
# Add LVGL sources
|
||||
|
||||
@@ -25,6 +25,11 @@ extern "C" {
|
||||
#include "usb_conf.h"
|
||||
#include "usb_dcd_int.h"
|
||||
#include "usb_bsp.h"
|
||||
#include "usbd_core.h"
|
||||
#include "usbd_msc_core.h"
|
||||
#include "usbd_desc.h"
|
||||
#include "usbd_usr.h"
|
||||
#include "usbd_hid_core.h"
|
||||
}
|
||||
|
||||
#include "board.h"
|
||||
|
||||
@@ -28,6 +28,8 @@
|
||||
|
||||
#include "../common/arm/stm32/timers_driver.h"
|
||||
|
||||
#include "dataconstants.h"
|
||||
|
||||
#if defined(AUX_SERIAL)
|
||||
#include "aux_serial_driver.h"
|
||||
#endif
|
||||
@@ -335,31 +337,6 @@ void boardOff()
|
||||
// this function must not return!
|
||||
}
|
||||
|
||||
#if defined (RADIO_TX12)
|
||||
#define BATTERY_DIVIDER 22830
|
||||
#elif defined (RADIO_T8)
|
||||
#define BATTERY_DIVIDER 50000
|
||||
#elif defined (RADIO_ZORRO)
|
||||
#define BATTERY_DIVIDER 23711 // = 2047*128*BATT_SCALE/(100*(VREF*(160+499)/160))
|
||||
#else
|
||||
#define BATTERY_DIVIDER 26214
|
||||
#endif
|
||||
|
||||
#if defined(RADIO_ZORRO)
|
||||
#define VOLTAGE_DROP 45
|
||||
#else
|
||||
#define VOLTAGE_DROP 20
|
||||
#endif
|
||||
|
||||
#if !defined(BOOT)
|
||||
uint16_t getBatteryVoltage()
|
||||
{
|
||||
int32_t instant_vbat = anaIn(TX_VOLTAGE); // using filtered ADC value on purpose
|
||||
instant_vbat = (instant_vbat * BATT_SCALE * (128 + g_eeGeneral.txVoltageCalibration) ) / BATTERY_DIVIDER;
|
||||
instant_vbat += VOLTAGE_DROP; // add voltage drop because of the diode TODO check if this is needed, but removal will break existing calibrations!
|
||||
return (uint16_t)instant_vbat;
|
||||
}
|
||||
#endif
|
||||
#if defined(AUDIO_SPEAKER_ENABLE_GPIO)
|
||||
void initSpeakerEnable()
|
||||
{
|
||||
|
||||
@@ -988,4 +988,20 @@ int gyroRead(uint8_t buffer[GYRO_BUFFER_LENGTH]);
|
||||
#define GYRO_OFFSET_MIN -30
|
||||
#define GYRO_OFFSET_MAX 10
|
||||
|
||||
#if defined (RADIO_TX12)
|
||||
#define BATTERY_DIVIDER 22830
|
||||
#elif defined (RADIO_T8)
|
||||
#define BATTERY_DIVIDER 50000
|
||||
#elif defined (RADIO_ZORRO)
|
||||
#define BATTERY_DIVIDER 23711 // = 2047*128*BATT_SCALE/(100*(VREF*(160+499)/160))
|
||||
#else
|
||||
#define BATTERY_DIVIDER 26214
|
||||
#endif
|
||||
|
||||
#if defined(RADIO_ZORRO)
|
||||
#define VOLTAGE_DROP 45
|
||||
#else
|
||||
#define VOLTAGE_DROP 20
|
||||
#endif
|
||||
|
||||
#endif // _BOARD_H_
|
||||
|
||||
@@ -24,6 +24,9 @@
|
||||
#include "FatFs/diskio.h"
|
||||
#include "FatFs/ff.h"
|
||||
|
||||
#include "sdcard.h"
|
||||
#include "audio.h"
|
||||
|
||||
#define RAM_START 0x20000000
|
||||
|
||||
/* Definitions for MMC/SDC command */
|
||||
|
||||
@@ -176,6 +176,8 @@ bool keyDown()
|
||||
break
|
||||
|
||||
#if !defined(BOOT)
|
||||
#include "opentx.h"
|
||||
|
||||
uint32_t switchState(uint8_t index)
|
||||
{
|
||||
uint32_t xxx = 0;
|
||||
|
||||
@@ -23,6 +23,10 @@
|
||||
#include "debug.h"
|
||||
#include "lcd.h"
|
||||
|
||||
#if !defined(BOOT)
|
||||
#include "opentx.h"
|
||||
#endif
|
||||
|
||||
#if defined(RADIO_FAMILY_JUMPER_T12) || defined(RADIO_TX12) || defined(RADIO_ZORRO) || defined(RADIO_T8) || defined(RADIO_TPRO)
|
||||
#define LCD_CONTRAST_OFFSET -10
|
||||
#else
|
||||
|
||||
@@ -28,6 +28,7 @@ _Main_Stack_Size = 1024; /* required amount of stack for interrupt stack (Main s
|
||||
|
||||
/* Main stack end */
|
||||
_main_stack_start = _estack - _Main_Stack_Size;
|
||||
_heap_end = _main_stack_start;
|
||||
|
||||
/* Specify the memory areas */
|
||||
MEMORY
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
*/
|
||||
|
||||
#include "board.h"
|
||||
#include "opentx.h"
|
||||
|
||||
Fifo<uint8_t, TELEMETRY_FIFO_SIZE> telemetryFifo;
|
||||
uint32_t telemetryErrors = 0;
|
||||
|
||||
Reference in New Issue
Block a user