Subversion Repositories FlightCtrl

Rev

Rev 1612 | Rev 1796 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1612 Rev 1775
Line 5... Line 5...
5
 
5
 
6
// This is for LEDs connected directly between +5V and the AVR port, without transistors.
6
// This is for LEDs connected directly between +5V and the AVR port, without transistors.
7
// PORTbit = 0 --> LED on.
7
// PORTbit = 0 --> LED on.
8
// To use the normal transistor set-up where 1 --> transistor conductive, reverse the 
8
// To use the normal transistor set-up where 1 --> transistor conductive, reverse the 
9
// ON and OFF statements.
9
// ON and OFF statements.
10
#define J16_ON          PORTC &= ~(1<<PORTC2)
10
#define OUTPUT_ON(num)          {PORTC |=  (4 << (num));}
-
 
11
#define OUTPUT_OFF(num)         {PORTC &= ~(4 << (num));}
11
#define J16_OFF         PORTC |=  (1<<PORTC2)
12
#define OUTPUT_SET(num, state)  {if ((state)) OUTPUT_ON(num) else OUTPUT_OFF(num)}
Line -... Line 13...
-
 
13
#define OUTPUT_TOGGLE(num) (    {PORTC ^=  (4 << (num));}
12
#define J16_TOGGLE      PORTC ^=  (1<<PORTC2)
14
 
-
 
15
#define DEBUG_LEDTEST 256
13
 
16
#define DEBUG_HEIGHT_SWITCH 1
-
 
17
#define DEBUG_HEIGHT_DIFF 2
14
#define J17_ON          PORTC &= ~(1<<PORTC3)
18
#define DEBUG_HOVERTHROTTLE 4
Line 15... Line 19...
15
#define J17_OFF         PORTC |=  (1<<PORTC3)
19
#define DEBUG_ACC0THORDER 8
16
#define J17_TOGGLE      PORTC ^=  (1<<PORTC3)
20
#define DEBUG_COMMANDREPEATED 16
Line 17... Line 21...
17
 
21
 
18
void output_init(void);
-