MEGA2560 simu compilation now ok
This commit is contained in:
@@ -82,14 +82,12 @@
|
||||
#define JACK_PPM_OUT() PORTG |= (1<<OUT_G_SIM_CTL)
|
||||
#define JACK_PPM_IN() PORTG &= ~(1<<OUT_G_SIM_CTL)
|
||||
|
||||
#define sdDone()
|
||||
|
||||
// SD driver
|
||||
#define sdDone()
|
||||
#if !defined(SIMU)
|
||||
bool sdMounted();
|
||||
void sdMountPoll();
|
||||
void sdPoll10ms();
|
||||
|
||||
#define SD_IS_HC() (0)
|
||||
#define SD_GET_BLOCKNR() (0)
|
||||
#define SD_GET_SIZE_MB() (0)
|
||||
|
||||
@@ -83,12 +83,11 @@
|
||||
#define JACK_PPM_IN() PORTG &= ~(1<<OUT_G_SIM_CTL)
|
||||
|
||||
// SD driver
|
||||
#define sdDone()
|
||||
#if !defined(SIMU)
|
||||
bool sdMounted();
|
||||
void sdMountPoll();
|
||||
void sdPoll10ms();
|
||||
#define sdDone()
|
||||
|
||||
#define SD_IS_HC() (0)
|
||||
#define SD_GET_BLOCKNR() (0)
|
||||
#define SD_GET_SIZE_MB() (0)
|
||||
@@ -143,6 +142,7 @@ void sdPoll10ms();
|
||||
# define OUT_G_SIM_CTL 4 //1 : phone-jack=ppm_in
|
||||
|
||||
# define INP_C_ID1 0
|
||||
# define INP_C_ID2 1
|
||||
|
||||
# define INP_G_RF_POW 1
|
||||
# define INP_G_RuddDR 0
|
||||
@@ -155,8 +155,6 @@ void sdPoll10ms();
|
||||
# define OUT_B_PPM 6
|
||||
# define INP_B_Trainer 5
|
||||
|
||||
# define INP_C_ID2 1
|
||||
|
||||
#if defined(VOICE)
|
||||
# define OUT_H_14DRESET 3
|
||||
# define OUT_H_14DCLK 4
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
#include <direct.h>
|
||||
#endif
|
||||
|
||||
volatile uint8_t pina=0xff, pinb=0xff, pinc=0xff, pind, pine=0xff, ping=0xff, pinh=0xff, pinj=0xff, pinl=0;
|
||||
volatile uint8_t pina=0xff, pinb=0xff, pinc=0xff, pind, pine=0xff, pinf=0xff, ping=0xff, pinh=0xff, pinj=0xff, pinl=0;
|
||||
uint8_t portb, portc, porth=0, dummyport;
|
||||
uint16_t dummyport16;
|
||||
const char *eepromFile = NULL;
|
||||
@@ -158,7 +158,7 @@ void simuSetKey(uint8_t key, bool state)
|
||||
#endif
|
||||
#if defined(PCBSKY9X) && !defined(REVX)
|
||||
KEY_CASE(BTN_REa, PIOB->PIO_PDSR, 0x40)
|
||||
#elif defined(PCBGRUVIN9X)
|
||||
#elif defined(PCBGRUVIN9X) || defined(PCBMEGA2560)
|
||||
KEY_CASE(BTN_REa, pind, 0x20)
|
||||
#elif defined(ROTARY_ENCODER_NAVIGATION)
|
||||
KEY_CASE(BTN_REa, RotEncoder, 0x20)
|
||||
@@ -212,7 +212,15 @@ void simuSetSwitch(uint8_t swtch, int8_t state)
|
||||
SWITCH_CASE(4, pinc, 1<<INP_C_AileDR)
|
||||
SWITCH_CASE(5, ping, 1<<INP_G_Gear)
|
||||
SWITCH_CASE(6, pinb, 1<<INP_B_Trainer)
|
||||
#else // STOCK
|
||||
#elif defined(PCBMEGA2560)
|
||||
SWITCH_CASE(0, ping, 1<<INP_G_ThrCt)
|
||||
SWITCH_CASE(1, ping, 1<<INP_G_RuddDR)
|
||||
SWITCH_CASE(2, pinc, 1<<INP_C_ElevDR)
|
||||
SWITCH_3_CASE(3, pinc, pinc, (1<<INP_C_ID1), (1<<INP_C_ID2))
|
||||
SWITCH_CASE(4, pinc, 1<<INP_C_AileDR)
|
||||
SWITCH_CASE(5, ping, 1<<INP_G_Gear)
|
||||
SWITCH_CASE(6, pinb, 1<<INP_B_Trainer)
|
||||
#else // PCB9X
|
||||
#if defined(JETI) || defined(FRSKY) || defined(NMEA) || defined(ARDUPILOT)
|
||||
SWITCH_CASE(0, pinc, 1<<INP_C_ThrCt)
|
||||
SWITCH_CASE(4, pinc, 1<<INP_C_AileDR)
|
||||
|
||||
Reference in New Issue
Block a user