Fixed some compilation issues
This commit is contained in:
@@ -26,6 +26,7 @@
|
||||
#include "multi_firmware_update.h"
|
||||
#include "stk500.h"
|
||||
#include "debug.h"
|
||||
#include "timers_driver.h"
|
||||
|
||||
#if defined(LIBOPENUI)
|
||||
#include "libopenui.h"
|
||||
|
||||
@@ -582,14 +582,6 @@ void flightReset(uint8_t check=true);
|
||||
#define RESET_THR_TRACE() s_timeCum16ThrP = s_timeCumThr = 0
|
||||
#endif
|
||||
|
||||
#if defined(SIMU)
|
||||
uint16_t getTmr2MHz();
|
||||
uint16_t getTmr16KHz();
|
||||
#else
|
||||
static inline uint16_t getTmr2MHz() { return TIMER_2MHz_TIMER->CNT; }
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(SPLASH)
|
||||
void doSplash();
|
||||
#endif
|
||||
|
||||
@@ -25,20 +25,6 @@
|
||||
#include "pxx.h"
|
||||
#include "crc.h"
|
||||
|
||||
#if defined(INTMODULE_HEARTBEAT_GPIO)
|
||||
struct HeartbeatCapture {
|
||||
#if !defined(INTMODULE_USART)
|
||||
uint32_t timestamp;
|
||||
#endif
|
||||
#if defined(DEBUG_LATENCY)
|
||||
uint32_t count;
|
||||
#endif
|
||||
uint8_t valid;
|
||||
};
|
||||
|
||||
extern volatile HeartbeatCapture heartbeatCapture;
|
||||
#endif
|
||||
|
||||
class Pxx1CrcMixin {
|
||||
protected:
|
||||
void initCrc()
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
|
||||
#include "opentx.h"
|
||||
#include "sbus.h"
|
||||
#include "timers_driver.h"
|
||||
|
||||
#define SBUS_FRAME_GAP_DELAY 1000 // 500uS
|
||||
|
||||
|
||||
@@ -21,6 +21,10 @@
|
||||
|
||||
#include "mixer_scheduler.h"
|
||||
#include "board.h"
|
||||
#include "debug.h"
|
||||
|
||||
#include "heartbeat_driver.h"
|
||||
#include "timers_driver.h"
|
||||
|
||||
#if defined(INTMODULE_HEARTBEAT_GPIO)
|
||||
|
||||
@@ -79,9 +83,7 @@ void stop_intmodule_heartbeat()
|
||||
void check_intmodule_heartbeat()
|
||||
{
|
||||
if (EXTI_GetITStatus(INTMODULE_HEARTBEAT_EXTI_LINE) != RESET) {
|
||||
#if !defined(INTMODULE_USART)
|
||||
heartbeatCapture.timestamp = getTmr2MHz();
|
||||
#endif
|
||||
#if defined(DEBUG_LATENCY)
|
||||
heartbeatCapture.count++;
|
||||
#endif
|
||||
|
||||
@@ -21,7 +21,16 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
struct HeartbeatCapture {
|
||||
uint32_t timestamp;
|
||||
uint8_t valid;
|
||||
#if defined(DEBUG_LATENCY)
|
||||
uint32_t count;
|
||||
#endif
|
||||
};
|
||||
|
||||
extern volatile HeartbeatCapture heartbeatCapture;
|
||||
|
||||
void init_intmodule_heartbeat();
|
||||
void check_intmodule_heartbeat();
|
||||
void stop_intmodule_heartbeat();
|
||||
|
||||
|
||||
@@ -52,8 +52,7 @@ void stop1msTimer()
|
||||
NVIC_DisableIRQ(INTERRUPT_xMS_IRQn);
|
||||
}
|
||||
|
||||
// TODO use the same than board_sky9x.cpp
|
||||
void interrupt1ms()
|
||||
static void interrupt1ms()
|
||||
{
|
||||
static uint8_t pre_scale; // Used to get 10 Hz counter
|
||||
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
/*
|
||||
* Copyright (C) EdgeTX
|
||||
*
|
||||
* Based on code named
|
||||
* opentx - https://github.com/opentx/opentx
|
||||
* th9x - http://code.google.com/p/th9x
|
||||
* er9x - http://code.google.com/p/er9x
|
||||
* gruvin9x - http://code.google.com/p/gruvin9x
|
||||
*
|
||||
* License GPLv2: http://www.gnu.org/licenses/gpl-2.0.html
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#if defined(SIMU)
|
||||
|
||||
uint16_t getTmr2MHz();
|
||||
|
||||
#elif defined(STM32)
|
||||
|
||||
#include "board.h"
|
||||
|
||||
void init2MhzTimer();
|
||||
void init1msTimer();
|
||||
void stop1msTimer();
|
||||
|
||||
static inline uint16_t getTmr2MHz() { return TIMER_2MHz_TIMER->CNT; }
|
||||
|
||||
#endif
|
||||
@@ -22,6 +22,7 @@
|
||||
#include "opentx.h"
|
||||
|
||||
#include "hal/adc_driver.h"
|
||||
#include "../common/arm/stm32/timers_driver.h"
|
||||
|
||||
#if !defined(PCBX12S)
|
||||
#include "../common/arm/stm32/stm32_hal_adc.h"
|
||||
|
||||
@@ -78,10 +78,6 @@ extern uint16_t sessionTimer;
|
||||
void boardInit();
|
||||
void boardOff();
|
||||
|
||||
// Timers driver
|
||||
void init2MhzTimer();
|
||||
void init1msTimer();
|
||||
|
||||
// PCBREV driver
|
||||
enum {
|
||||
// X12S
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
|
||||
#include "opentx.h"
|
||||
#include "extmodule_driver.h"
|
||||
#include "timers_driver.h"
|
||||
|
||||
#if defined(CROSSFIRE)
|
||||
#include "pulses/crossfire.h"
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
|
||||
#include "hal/adc_driver.h"
|
||||
#include "../common/arm/stm32/stm32_hal_adc.h"
|
||||
#include "../common/arm/stm32/timers_driver.h"
|
||||
|
||||
#if defined(__cplusplus) && !defined(SIMU)
|
||||
extern "C" {
|
||||
|
||||
@@ -67,10 +67,6 @@ extern HardwareOptions hardwareOptions;
|
||||
void boardInit();
|
||||
void boardOff();
|
||||
|
||||
// Timers driver
|
||||
void init2MhzTimer();
|
||||
void init1msTimer();
|
||||
|
||||
// CPU Unique ID
|
||||
#define LEN_CPU_UID (3*8+2)
|
||||
void getCPUUniqueID(char * s);
|
||||
|
||||
@@ -24,6 +24,8 @@
|
||||
#include "hal/adc_driver.h"
|
||||
#include "stm32_hal_adc.h"
|
||||
|
||||
#include "../common/arm/stm32/timers_driver.h"
|
||||
|
||||
#if defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
@@ -65,10 +65,6 @@ extern uint16_t sessionTimer;
|
||||
void boardInit();
|
||||
void boardOff();
|
||||
|
||||
// Timers driver
|
||||
void init2MhzTimer();
|
||||
void init1msTimer();
|
||||
|
||||
// PCBREV driver
|
||||
enum {
|
||||
// X7
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
|
||||
#include "opentx.h"
|
||||
#include "extmodule_driver.h"
|
||||
#include "timers_driver.h"
|
||||
|
||||
#if defined(CROSSFIRE)
|
||||
#include "pulses/crossfire.h"
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
|
||||
#include "opentx.h"
|
||||
#include "mixer_scheduler.h"
|
||||
#include "timers_driver.h"
|
||||
|
||||
RTOS_TASK_HANDLE menusTaskId;
|
||||
RTOS_DEFINE_STACK(menusStack, MENUS_STACK_SIZE);
|
||||
|
||||
Reference in New Issue
Block a user