Subversion Repositories FlightCtrl

Compare Revisions

Ignore whitespace Rev 1748 → Rev 1749

/branches/MartinW_Jeti+/Spektrum.c
8,11 → 8,11
 
unsigned char SpektrumTimer = 0;
 
#ifdef RECEIVER_SPEKTRUM_EXP
#ifdef RECEIVER_SPEKTRUM_EXP //#endif
unsigned char s_excnt = 0; // Counter for Spektrum-Expander
unsigned char s_exparity = 0; // Parity Bit for Spektrum-Expander
signed char s_exdata[11]; // Data for Spektrum-Expander
#endif
//#endif
//--------------------------------------------------------------//
//--------------------------------------------------------------//
void SpektrumBinding(void)
68,13 → 68,15
 
SpektrumUartInit(); // init Uart again
}
 
#endif
//############################################################################
// USART1 initialisation from killagreg
void SpektrumUartInit(void)
//############################################################################
{
// -- Start of USART1 initialisation for Spekturm seriell-mode
#ifdef RECEIVER_SPEKTRUM_EXP //#endif
 
// -- Start of USART1 initialisation for Spekturm seriell-mode
// USART1 Control and Status Register A, B, C and baud rate register
uint8_t sreg = SREG;
128,6 → 130,7
SREG = sreg;
return;
#endif
}
 
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
209,6 → 212,8
//############################################################################
void SpektrumParser(unsigned char c)
{
#ifdef RECEIVER_SPEKTRUM_EXP //#endif
 
static unsigned char Sync=0, FrameCnt=0, ByteHigh=0, ReSync=1, Frame2=0;
unsigned int Channel, index = 0;
signed int signal = 0, tmp;
403,4 → 408,5
SpektrumTimer = MIN_FRAMEGAP;
}
}
#endif
}