1
0
Fork 0
mirror of https://github.com/opentx/opentx.git synced 2025-07-19 14:25:11 +03:00

#2894 - Crossfire (inverted serial) sent on S.PORT pin in the module bay (ported from master f7044a20ec)

16 channels sent every 2.5ms now @ 200KBauds with CRC
This commit is contained in:
Damjan Adamic 2015-12-20 17:10:32 +01:00
parent e8983250ca
commit 91e80d446a
31 changed files with 435 additions and 92 deletions

View file

@ -464,7 +464,7 @@
#endif
#if defined(CPUARM)
static const int8_t maxChannelsModules[] = { 0, 8, 8, -2 }; // relative to 8!
static const int8_t maxChannelsModules[] = { 0, 8, 8, -2, 8 }; // relative to 8!
static const int8_t maxChannelsXJT[] = { 0, 8, 0, 4 }; // relative to 8!
#define NUM_CHANNELS(idx) (8+g_model.moduleData[idx].channelsCount)
#define MAX_TRAINER_CHANNELS() (8)
@ -483,6 +483,11 @@
#else
#define IS_MODULE_DSM2(idx) (false)
#endif
#if defined(CROSSFIRE)
#define IS_MODULE_CROSSFIRE(idx) (idx==EXTERNAL_MODULE && g_model.moduleData[EXTERNAL_MODULE].type==MODULE_TYPE_CROSSFIRE)
#else
#define IS_MODULE_CROSSFIRE(idx) (false)
#endif
#if defined(TARANIS_INTERNAL_PPM)
#define MAX_INTERNAL_MODULE_CHANNELS() ((g_model.moduleData[INTERNAL_MODULE].type == MODULE_TYPE_XJT) ? maxChannelsXJT[1+g_model.moduleData[0].rfProtocol] : maxChannelsModules[g_model.moduleData[INTERNAL_MODULE].type])
#else
@ -964,8 +969,8 @@ void checkAll();
void getADC();
#endif
#if defined(PCBTARANIS)
void processSbusInput();
#if defined(SBUS)
#include "sbus.h"
#endif
extern void backlightOn();
@ -1385,6 +1390,10 @@ void evalFunctions();
#include "telemetry/mavlink.h"
#endif
#if defined(CPUARM)
uint16_t crc16(uint8_t * buf, uint32_t len);
#endif
#define PLAY_REPEAT(x) (x) /* Range 0 to 15 */
#define PLAY_NOW 0x10
#define PLAY_BACKGROUND 0x20