Bsongis/frsky xlite (#5574)

FrSky X-Lite support added
This commit is contained in:
Bertrand Songis
2018-01-02 14:36:48 +01:00
committed by GitHub
parent 269831e0c4
commit c4001c8507
85 changed files with 1555 additions and 976 deletions
+2 -2
View File
@@ -247,9 +247,9 @@ void setupPulses(uint8_t port)
#endif
#if defined(MULTIMODULE)
case PROTO_MULTIMODULE:
case PROTO_MULTIMODULE:
#endif
case PROTO_SBUS:
case PROTO_SBUS:
init_sbusOut(port);
break;
+5 -4
View File
@@ -64,7 +64,7 @@ PACK(struct Dsm2SerialPulsesData {
});
#endif
#if defined(PPM_PIN_UART)
#if defined(INTMODULE_USART)
PACK(struct PxxUartPulsesData {
uint8_t pulses[64];
uint8_t * ptr;
@@ -74,7 +74,7 @@ PACK(struct PxxUartPulsesData {
#endif
#define MULTIMODULE_BAUDRATE 100000
#if defined(PPM_PIN_TIMER)
#if defined(INTMODULE_PULSES) || defined(EXTMODULE_PULSES)
/* PXX uses 20 bytes (as of Rev 1.1 document) with 8 changes per byte + stop bit ~= 162 max pulses */
/* DSM2 uses 2 header + 12 channel bytes, with max 10 changes (8n2) per byte + 16 bits trailer ~= 156 max pulses */
/* Multimodule uses 3 bytes header + 22 channel bytes with max 11 changes per byte (8e2) + 16 bits trailer ~= 291 max pulses */
@@ -108,11 +108,12 @@ union ModulePulsesData {
#if defined(PPM_PIN_SERIAL)
PxxSerialPulsesData pxx;
Dsm2SerialPulsesData dsm2;
#else
#endif
#if defined(INTMODULE_PULSES) || defined(EXTMODULE_PULSES)
PxxTimerPulsesData pxx;
Dsm2TimerPulsesData dsm2;
#endif
#if defined(PPM_PIN_UART)
#if defined(INTMODULE_USART)
PxxUartPulsesData pxx_uart;
#endif
PpmPulsesData<pulse_duration_t> ppm;
+2 -2
View File
@@ -60,7 +60,7 @@ const uint16_t CRCTable[]=
0x7bc7,0x6a4e,0x58d5,0x495c,0x3de3,0x2c6a,0x1ef1,0x0f78
};
#if defined(PPM_PIN_UART)
#if defined(INTMODULE_USART)
inline void uartPutPcmPart(uint8_t port, uint8_t byte)
{
if (0x7E == byte) {
@@ -204,7 +204,7 @@ void pxxPutPcmCrc(uint8_t port)
pxxPutPcmByte(port, pulseValue);
}
#if defined(PPM_PIN_UART)
#if defined(INTMODULE_USART)
inline void initPcmArray(uint8_t port)
{
if (IS_UART_MODULE(port))