Fixed some compilation issues
This commit is contained in:
@@ -26,6 +26,7 @@
|
|||||||
#include "multi_firmware_update.h"
|
#include "multi_firmware_update.h"
|
||||||
#include "stk500.h"
|
#include "stk500.h"
|
||||||
#include "debug.h"
|
#include "debug.h"
|
||||||
|
#include "timers_driver.h"
|
||||||
|
|
||||||
#if defined(LIBOPENUI)
|
#if defined(LIBOPENUI)
|
||||||
#include "libopenui.h"
|
#include "libopenui.h"
|
||||||
|
|||||||
@@ -582,14 +582,6 @@ void flightReset(uint8_t check=true);
|
|||||||
#define RESET_THR_TRACE() s_timeCum16ThrP = s_timeCumThr = 0
|
#define RESET_THR_TRACE() s_timeCum16ThrP = s_timeCumThr = 0
|
||||||
#endif
|
#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)
|
#if defined(SPLASH)
|
||||||
void doSplash();
|
void doSplash();
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -25,20 +25,6 @@
|
|||||||
#include "pxx.h"
|
#include "pxx.h"
|
||||||
#include "crc.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 {
|
class Pxx1CrcMixin {
|
||||||
protected:
|
protected:
|
||||||
void initCrc()
|
void initCrc()
|
||||||
|
|||||||
@@ -21,6 +21,7 @@
|
|||||||
|
|
||||||
#include "opentx.h"
|
#include "opentx.h"
|
||||||
#include "sbus.h"
|
#include "sbus.h"
|
||||||
|
#include "timers_driver.h"
|
||||||
|
|
||||||
#define SBUS_FRAME_GAP_DELAY 1000 // 500uS
|
#define SBUS_FRAME_GAP_DELAY 1000 // 500uS
|
||||||
|
|
||||||
|
|||||||
@@ -21,6 +21,10 @@
|
|||||||
|
|
||||||
#include "mixer_scheduler.h"
|
#include "mixer_scheduler.h"
|
||||||
#include "board.h"
|
#include "board.h"
|
||||||
|
#include "debug.h"
|
||||||
|
|
||||||
|
#include "heartbeat_driver.h"
|
||||||
|
#include "timers_driver.h"
|
||||||
|
|
||||||
#if defined(INTMODULE_HEARTBEAT_GPIO)
|
#if defined(INTMODULE_HEARTBEAT_GPIO)
|
||||||
|
|
||||||
@@ -79,9 +83,7 @@ void stop_intmodule_heartbeat()
|
|||||||
void check_intmodule_heartbeat()
|
void check_intmodule_heartbeat()
|
||||||
{
|
{
|
||||||
if (EXTI_GetITStatus(INTMODULE_HEARTBEAT_EXTI_LINE) != RESET) {
|
if (EXTI_GetITStatus(INTMODULE_HEARTBEAT_EXTI_LINE) != RESET) {
|
||||||
#if !defined(INTMODULE_USART)
|
|
||||||
heartbeatCapture.timestamp = getTmr2MHz();
|
heartbeatCapture.timestamp = getTmr2MHz();
|
||||||
#endif
|
|
||||||
#if defined(DEBUG_LATENCY)
|
#if defined(DEBUG_LATENCY)
|
||||||
heartbeatCapture.count++;
|
heartbeatCapture.count++;
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -21,7 +21,16 @@
|
|||||||
|
|
||||||
#pragma once
|
#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 init_intmodule_heartbeat();
|
||||||
void check_intmodule_heartbeat();
|
void check_intmodule_heartbeat();
|
||||||
void stop_intmodule_heartbeat();
|
void stop_intmodule_heartbeat();
|
||||||
|
|
||||||
|
|||||||
@@ -52,8 +52,7 @@ void stop1msTimer()
|
|||||||
NVIC_DisableIRQ(INTERRUPT_xMS_IRQn);
|
NVIC_DisableIRQ(INTERRUPT_xMS_IRQn);
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO use the same than board_sky9x.cpp
|
static void interrupt1ms()
|
||||||
void interrupt1ms()
|
|
||||||
{
|
{
|
||||||
static uint8_t pre_scale; // Used to get 10 Hz counter
|
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 "opentx.h"
|
||||||
|
|
||||||
#include "hal/adc_driver.h"
|
#include "hal/adc_driver.h"
|
||||||
|
#include "../common/arm/stm32/timers_driver.h"
|
||||||
|
|
||||||
#if !defined(PCBX12S)
|
#if !defined(PCBX12S)
|
||||||
#include "../common/arm/stm32/stm32_hal_adc.h"
|
#include "../common/arm/stm32/stm32_hal_adc.h"
|
||||||
|
|||||||
@@ -78,10 +78,6 @@ extern uint16_t sessionTimer;
|
|||||||
void boardInit();
|
void boardInit();
|
||||||
void boardOff();
|
void boardOff();
|
||||||
|
|
||||||
// Timers driver
|
|
||||||
void init2MhzTimer();
|
|
||||||
void init1msTimer();
|
|
||||||
|
|
||||||
// PCBREV driver
|
// PCBREV driver
|
||||||
enum {
|
enum {
|
||||||
// X12S
|
// X12S
|
||||||
|
|||||||
@@ -21,6 +21,7 @@
|
|||||||
|
|
||||||
#include "opentx.h"
|
#include "opentx.h"
|
||||||
#include "extmodule_driver.h"
|
#include "extmodule_driver.h"
|
||||||
|
#include "timers_driver.h"
|
||||||
|
|
||||||
#if defined(CROSSFIRE)
|
#if defined(CROSSFIRE)
|
||||||
#include "pulses/crossfire.h"
|
#include "pulses/crossfire.h"
|
||||||
|
|||||||
@@ -24,6 +24,7 @@
|
|||||||
|
|
||||||
#include "hal/adc_driver.h"
|
#include "hal/adc_driver.h"
|
||||||
#include "../common/arm/stm32/stm32_hal_adc.h"
|
#include "../common/arm/stm32/stm32_hal_adc.h"
|
||||||
|
#include "../common/arm/stm32/timers_driver.h"
|
||||||
|
|
||||||
#if defined(__cplusplus) && !defined(SIMU)
|
#if defined(__cplusplus) && !defined(SIMU)
|
||||||
extern "C" {
|
extern "C" {
|
||||||
|
|||||||
@@ -67,10 +67,6 @@ extern HardwareOptions hardwareOptions;
|
|||||||
void boardInit();
|
void boardInit();
|
||||||
void boardOff();
|
void boardOff();
|
||||||
|
|
||||||
// Timers driver
|
|
||||||
void init2MhzTimer();
|
|
||||||
void init1msTimer();
|
|
||||||
|
|
||||||
// CPU Unique ID
|
// CPU Unique ID
|
||||||
#define LEN_CPU_UID (3*8+2)
|
#define LEN_CPU_UID (3*8+2)
|
||||||
void getCPUUniqueID(char * s);
|
void getCPUUniqueID(char * s);
|
||||||
|
|||||||
@@ -24,6 +24,8 @@
|
|||||||
#include "hal/adc_driver.h"
|
#include "hal/adc_driver.h"
|
||||||
#include "stm32_hal_adc.h"
|
#include "stm32_hal_adc.h"
|
||||||
|
|
||||||
|
#include "../common/arm/stm32/timers_driver.h"
|
||||||
|
|
||||||
#if defined(__cplusplus)
|
#if defined(__cplusplus)
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -65,10 +65,6 @@ extern uint16_t sessionTimer;
|
|||||||
void boardInit();
|
void boardInit();
|
||||||
void boardOff();
|
void boardOff();
|
||||||
|
|
||||||
// Timers driver
|
|
||||||
void init2MhzTimer();
|
|
||||||
void init1msTimer();
|
|
||||||
|
|
||||||
// PCBREV driver
|
// PCBREV driver
|
||||||
enum {
|
enum {
|
||||||
// X7
|
// X7
|
||||||
|
|||||||
@@ -21,6 +21,7 @@
|
|||||||
|
|
||||||
#include "opentx.h"
|
#include "opentx.h"
|
||||||
#include "extmodule_driver.h"
|
#include "extmodule_driver.h"
|
||||||
|
#include "timers_driver.h"
|
||||||
|
|
||||||
#if defined(CROSSFIRE)
|
#if defined(CROSSFIRE)
|
||||||
#include "pulses/crossfire.h"
|
#include "pulses/crossfire.h"
|
||||||
|
|||||||
@@ -21,6 +21,7 @@
|
|||||||
|
|
||||||
#include "opentx.h"
|
#include "opentx.h"
|
||||||
#include "mixer_scheduler.h"
|
#include "mixer_scheduler.h"
|
||||||
|
#include "timers_driver.h"
|
||||||
|
|
||||||
RTOS_TASK_HANDLE menusTaskId;
|
RTOS_TASK_HANDLE menusTaskId;
|
||||||
RTOS_DEFINE_STACK(menusStack, MENUS_STACK_SIZE);
|
RTOS_DEFINE_STACK(menusStack, MENUS_STACK_SIZE);
|
||||||
|
|||||||
Reference in New Issue
Block a user