Taranis X9E Simulator - with rotary encoder
This commit is contained in:
+2
-2
@@ -30,7 +30,7 @@
|
||||
#ifndef __STM32F2xx_GPIO_H
|
||||
#define __STM32F2xx_GPIO_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if defined(__cplusplus) && !defined(SIMU)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
@@ -394,7 +394,7 @@ void GPIO_ToggleBits(GPIO_TypeDef* GPIOx, uint16_t GPIO_Pin);
|
||||
/* GPIO Alternate functions configuration function ****************************/
|
||||
void GPIO_PinAFConfig(GPIO_TypeDef* GPIOx, uint16_t GPIO_PinSource, uint8_t GPIO_AF);
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if defined(__cplusplus) && !defined(SIMU)
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
+2
-2
@@ -30,7 +30,7 @@
|
||||
#ifndef __STM32F2xx_I2C_H
|
||||
#define __STM32F2xx_I2C_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if defined(__cplusplus) && !defined(SIMU)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
@@ -681,7 +681,7 @@ void I2C_ClearFlag(I2C_TypeDef* I2Cx, uint32_t I2C_FLAG);
|
||||
ITStatus I2C_GetITStatus(I2C_TypeDef* I2Cx, uint32_t I2C_IT);
|
||||
void I2C_ClearITPendingBit(I2C_TypeDef* I2Cx, uint32_t I2C_IT);
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if defined(__cplusplus) && !defined(SIMU)
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
+2
-2
@@ -30,7 +30,7 @@
|
||||
#ifndef __STM32F2xx_PWR_H
|
||||
#define __STM32F2xx_PWR_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if defined(__cplusplus) && !defined(SIMU)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
@@ -149,7 +149,7 @@ void PWR_EnterSTANDBYMode(void);
|
||||
FlagStatus PWR_GetFlagStatus(uint32_t PWR_FLAG);
|
||||
void PWR_ClearFlag(uint32_t PWR_FLAG);
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if defined(__cplusplus) && !defined(SIMU)
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
+2
-2
@@ -29,7 +29,7 @@
|
||||
#ifndef __STM32F2xx_RCC_H
|
||||
#define __STM32F2xx_RCC_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if defined(__cplusplus) && !defined(SIMU)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
@@ -498,7 +498,7 @@ void RCC_ClearFlag(void);
|
||||
ITStatus RCC_GetITStatus(uint8_t RCC_IT);
|
||||
void RCC_ClearITPendingBit(uint8_t RCC_IT);
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if defined(__cplusplus) && !defined(SIMU)
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
+2
-2
@@ -30,7 +30,7 @@
|
||||
#ifndef __STM32F2xx_RTC_H
|
||||
#define __STM32F2xx_RTC_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if defined(__cplusplus) && !defined(SIMU)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
@@ -633,7 +633,7 @@ void RTC_ClearFlag(uint32_t RTC_FLAG);
|
||||
ITStatus RTC_GetITStatus(uint32_t RTC_IT);
|
||||
void RTC_ClearITPendingBit(uint32_t RTC_IT);
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if defined(__cplusplus) && !defined(SIMU)
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
+2
-2
@@ -30,7 +30,7 @@
|
||||
#ifndef __STM32F2xx_SPI_H
|
||||
#define __STM32F2xx_SPI_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if defined(__cplusplus) && !defined(SIMU)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
@@ -509,7 +509,7 @@ void SPI_I2S_ClearFlag(SPI_TypeDef* SPIx, uint16_t SPI_I2S_FLAG);
|
||||
ITStatus SPI_I2S_GetITStatus(SPI_TypeDef* SPIx, uint8_t SPI_I2S_IT);
|
||||
void SPI_I2S_ClearITPendingBit(SPI_TypeDef* SPIx, uint8_t SPI_I2S_IT);
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if defined(__cplusplus) && !defined(SIMU)
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
+2
-2
@@ -30,7 +30,7 @@
|
||||
#ifndef __STM32F2xx_USART_H
|
||||
#define __STM32F2xx_USART_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if defined(__cplusplus) && !defined(SIMU)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
@@ -412,7 +412,7 @@ void USART_ClearFlag(USART_TypeDef* USARTx, uint16_t USART_FLAG);
|
||||
ITStatus USART_GetITStatus(USART_TypeDef* USARTx, uint16_t USART_IT);
|
||||
void USART_ClearITPendingBit(USART_TypeDef* USARTx, uint16_t USART_IT);
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if defined(__cplusplus) && !defined(SIMU)
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
#ifndef _ASPI_H_
|
||||
#define _ASPI_H_
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if defined(__cplusplus) && !defined(SIMU)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
@@ -37,7 +37,7 @@ extern "C" {
|
||||
void AspiCmd(u8 Command_Byte);
|
||||
void AspiData(u8 Para_data);
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if defined(__cplusplus) && !defined(SIMU)
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -139,7 +139,7 @@ void audioEnd()
|
||||
NVIC_DisableIRQ(DMA1_Stream5_IRQn) ;
|
||||
}
|
||||
|
||||
#ifndef SIMU
|
||||
#if !defined(SIMU)
|
||||
extern "C" void TIM6_DAC_IRQHandler()
|
||||
{
|
||||
DAC->CR &= ~DAC_CR_DMAEN1 ; // Stop DMA requests
|
||||
|
||||
@@ -36,11 +36,15 @@
|
||||
|
||||
#include "../../opentx.h"
|
||||
|
||||
#if defined(__cplusplus) && !defined(SIMU)
|
||||
extern "C" {
|
||||
#endif
|
||||
#include "STM32_USB-Host-Device_Lib_V2.1.0/Libraries/STM32_USB_OTG_Driver/inc/usb_dcd_int.h"
|
||||
#include "STM32_USB-Host-Device_Lib_V2.1.0/Libraries/STM32_USB_OTG_Driver/inc/usb_bsp.h"
|
||||
#include "STM32F2xx_StdPeriph_Lib_V1.1.0/Libraries/STM32F2xx_StdPeriph_Driver/inc/stm32f2xx_dbgmcu.h"
|
||||
#if defined(__cplusplus) && !defined(SIMU)
|
||||
}
|
||||
#endif
|
||||
|
||||
volatile uint32_t Tenms ; // TODO to remove everywhere / use a #define
|
||||
|
||||
@@ -111,13 +115,13 @@ void interrupt5ms()
|
||||
#endif
|
||||
}
|
||||
|
||||
#if !defined(SIMU)
|
||||
extern "C" void TIM8_TRG_COM_TIM14_IRQHandler()
|
||||
{
|
||||
TIM14->SR &= ~TIM_SR_UIF ;
|
||||
interrupt5ms() ;
|
||||
}
|
||||
|
||||
#if !defined(SIMU)
|
||||
void boardInit()
|
||||
{
|
||||
pwrInit();
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
|
||||
#include "stddef.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if defined(__cplusplus) && !defined(SIMU)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
@@ -65,7 +65,7 @@ extern "C" {
|
||||
#include "aspi.h"
|
||||
#include "i2c.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if defined(__cplusplus) && !defined(SIMU)
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -197,7 +197,7 @@ extern volatile uint16_t Analog_values[];
|
||||
#define BATT_SCALE 150
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if defined(__cplusplus) && !defined(SIMU)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
@@ -234,7 +234,7 @@ void usbStart(void);
|
||||
void usbStop(void);
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if defined(__cplusplus) && !defined(SIMU)
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -36,11 +36,15 @@
|
||||
|
||||
#include "../../opentx.h"
|
||||
|
||||
#if defined(__cplusplus) && !defined(SIMU)
|
||||
extern "C" {
|
||||
#endif
|
||||
#include "STM32_USB-Host-Device_Lib_V2.1.0/Libraries/STM32_USB_OTG_Driver/inc/usb_dcd_int.h"
|
||||
#include "STM32_USB-Host-Device_Lib_V2.1.0/Libraries/STM32_USB_OTG_Driver/inc/usb_bsp.h"
|
||||
#include "STM32F2xx_StdPeriph_Lib_V1.1.0/Libraries/STM32F2xx_StdPeriph_Driver/inc/stm32f2xx_dbgmcu.h"
|
||||
#if defined(__cplusplus) && !defined(SIMU)
|
||||
}
|
||||
#endif
|
||||
|
||||
void configure_pins( uint32_t pins, uint16_t config )
|
||||
{
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
#define WP_H do{I2C_EE_WP_GPIO->BSRRL = I2C_EE_WP;}while(0)
|
||||
#define WP_L do{I2C_EE_WP_GPIO->BSRRH = I2C_EE_WP;}while(0)
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if defined(__cplusplus) && !defined(SIMU)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
@@ -48,7 +48,7 @@ void I2C_EE_WaitEepromStandbyState(void);
|
||||
void I2C_set_volume(register uint8_t volume);
|
||||
uint8_t I2C_read_volume(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if defined(__cplusplus) && !defined(SIMU)
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -335,6 +335,7 @@ static void disable_pa10_ppm()
|
||||
INTERNAL_RF_OFF();
|
||||
}
|
||||
|
||||
#if !defined(SIMU)
|
||||
extern "C" void TIM1_CC_IRQHandler()
|
||||
{
|
||||
TIM1->DIER &= ~TIM_DIER_CC2IE ; // stop this interrupt
|
||||
@@ -372,8 +373,9 @@ extern "C" void TIM1_UP_TIM10_IRQHandler()
|
||||
TIM1->DIER |= TIM_DIER_CC2IE ; // Enable this interrupt
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
static void init_pa7_pxx()
|
||||
void init_pa7_pxx()
|
||||
{
|
||||
EXTERNAL_MODULE_ON();
|
||||
|
||||
@@ -584,6 +586,7 @@ static void disable_pa7_ppm()
|
||||
}
|
||||
}
|
||||
|
||||
#if !defined(SIMU)
|
||||
extern "C" void TIM8_CC_IRQHandler()
|
||||
{
|
||||
TIM8->DIER &= ~TIM_DIER_CC2IE ; // stop this interrupt
|
||||
@@ -630,4 +633,4 @@ extern "C" void TIM8_UP_TIM13_IRQHandler()
|
||||
TIM8->DIER |= TIM_DIER_CC2IE ; // Enable this interrupt
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "../opentx.h"
|
||||
#include "../../opentx.h"
|
||||
|
||||
void rotencInit()
|
||||
{
|
||||
|
||||
@@ -109,6 +109,7 @@ void stop_trainer_capture()
|
||||
NVIC_DisableIRQ(TIM3_IRQn) ; // Stop Interrupt
|
||||
}
|
||||
|
||||
#if !defined(SIMU)
|
||||
extern "C" void TIM3_IRQHandler()
|
||||
{
|
||||
uint16_t capture = 0;
|
||||
@@ -176,6 +177,7 @@ extern "C" void TIM3_IRQHandler()
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
void init_cppm_on_heartbeat_capture(void)
|
||||
{
|
||||
@@ -253,6 +255,7 @@ void stop_sbus_on_heartbeat_capture(void)
|
||||
}
|
||||
}
|
||||
|
||||
#if !defined(SIMU)
|
||||
extern "C" void USART6_IRQHandler()
|
||||
{
|
||||
uint32_t status;
|
||||
@@ -269,3 +272,4 @@ extern "C" void USART6_IRQHandler()
|
||||
status = USART6->SR;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -128,6 +128,7 @@ void uart3Stop()
|
||||
USART_DeInit(USART3);
|
||||
}
|
||||
|
||||
#if !defined(SIMU)
|
||||
extern "C" void USART3_IRQHandler(void)
|
||||
{
|
||||
// Send
|
||||
@@ -161,4 +162,5 @@ extern "C" void USART3_IRQHandler(void)
|
||||
status = USART3->SR;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -30,7 +30,9 @@
|
||||
#include "../../FatFs/diskio.h"
|
||||
#include "board_taranis.h"
|
||||
|
||||
#if defined(__cplusplus) && !defined(SIMU)
|
||||
extern "C" {
|
||||
#endif
|
||||
#include "STM32F2xx_StdPeriph_Lib_V1.1.0/Libraries/STM32F2xx_StdPeriph_Driver/inc/misc.h"
|
||||
#include "usbd_msc_mem.h"
|
||||
#include "usb_conf.h"
|
||||
@@ -118,7 +120,10 @@ USBD_STORAGE_cb_TypeDef USBD_MICRO_SDIO_fops =
|
||||
USBD_STORAGE_cb_TypeDef *USBD_STORAGE_fops = &USBD_MICRO_SDIO_fops;
|
||||
|
||||
__IO uint32_t count = 0;
|
||||
|
||||
#if defined(__cplusplus) && !defined(SIMU)
|
||||
}
|
||||
#endif
|
||||
|
||||
int8_t STORAGE_Init (uint8_t lun)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user