Subversion Repositories FlightCtrl

Rev

Rev 1793 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1793 Rev 1799
Line 13... Line 13...
13
unsigned char s_exparity = 0;                // Parity Bit for Spektrum-Expander
13
unsigned char s_exparity = 0;                // Parity Bit for Spektrum-Expander
14
signed char s_exdata[11];         // Data for Spektrum-Expander
14
signed char s_exdata[11];         // Data for Spektrum-Expander
15
#endif
15
#endif
16
//--------------------------------------------------------------//
16
//--------------------------------------------------------------//
17
//--------------------------------------------------------------//
17
//--------------------------------------------------------------//
-
 
18
 
18
/*
19
/*
19
void SpektrumBinding(void)
20
void SpektrumBinding(void)
20
{
21
{
21
  unsigned int timerTimeout = SetDelay(10000);  // Timeout 10 sec.
22
  unsigned int timerTimeout = SetDelay(10000);  // Timeout 10 sec.
22
  unsigned char connected = 0;
23
  unsigned char connected = 0;
Line 73... Line 74...
73
//############################################################################
74
//############################################################################
74
// USART1 initialisation from killagreg
75
// USART1 initialisation from killagreg
75
void SpektrumUartInit(void)
76
void SpektrumUartInit(void)
76
//############################################################################
77
//############################################################################
77
    {
78
    {
-
 
79
        /* MartinW Codesize red
78
        // -- Start of USART1 initialisation for Spekturm seriell-mode
80
        // -- Start of USART1 initialisation for Spekturm seriell-mode
79
        // USART1 Control and Status Register A, B, C and baud rate register
81
        // USART1 Control and Status Register A, B, C and baud rate register
80
        uint8_t sreg = SREG;
82
        uint8_t sreg = SREG;
Line 81... Line 83...
81
       
83
       
Line 126... Line 128...
126
        UCSR1B |= (1 << RXCIE1);
128
        UCSR1B |= (1 << RXCIE1);
127
        // -- End of USART1 initialisation
129
        // -- End of USART1 initialisation
128
        // restore global interrupt flags
130
        // restore global interrupt flags
Line 129... Line 131...
129
   
131
   
-
 
132
        SREG = sreg;
130
        SREG = sreg;
133
                */ //MartinW Codesize red
131
  return;
134
  return;
Line 132... Line 135...
132
 }
135
 }
133
 
136
 
Line 208... Line 211...
208
//############################################################################
211
//############################################################################
209
// Wird im UART-Interrupt aufgerufen
212
// Wird im UART-Interrupt aufgerufen
210
//############################################################################
213
//############################################################################
211
void SpektrumParser(unsigned char c)
214
void SpektrumParser(unsigned char c)
212
{
215
{
-
 
216
/* //MartinW Codesize red
-
 
217
 
213
    static unsigned char Sync=0, FrameCnt=0, ByteHigh=0, ReSync=1, Frame2=0;
218
    static unsigned char Sync=0, FrameCnt=0, ByteHigh=0, ReSync=1, Frame2=0;
214
        unsigned int Channel, index = 0;
219
        unsigned int Channel, index = 0;
215
        signed int signal = 0, tmp;
220
        signed int signal = 0, tmp;
216
        int bCheckDelay;
221
        int bCheckDelay;
217
//      c = UDR1; // get data byte
222
//      c = UDR1; // get data byte
Line 402... Line 407...
402
                Frame2 = 0;
407
                Frame2 = 0;
403
                Sync = 0;
408
                Sync = 0;
404
                SpektrumTimer = MIN_FRAMEGAP;
409
                SpektrumTimer = MIN_FRAMEGAP;
405
                }
410
                }
406
   }
411
   }
-
 
412
  */ //MartinW Codesize red 
407
}
413
}