@@ -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;
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user