Rev 1864 | Rev 1874 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1864 | Rev 1869 | ||
---|---|---|---|
Line 14... | Line 14... | ||
14 | #define J5HIGH PORTD |= (1<<PORTD3) |
14 | #define J5HIGH PORTD |= (1<<PORTD3) |
15 | #define J5LOW PORTD &= ~(1<<PORTD3) |
15 | #define J5LOW PORTD &= ~(1<<PORTD3) |
16 | #define J5TOGGLE PORTD ^= (1<<PORTD3) |
16 | #define J5TOGGLE PORTD ^= (1<<PORTD3) |
Line 17... | Line 17... | ||
17 | 17 | ||
18 | // invert means: An "1" bit in digital debug data make a LOW on the output. |
18 | // invert means: An "1" bit in digital debug data make a LOW on the output. |
Line 19... | Line 19... | ||
19 | #define DIGITAL_DEBUG_INVERT 1 |
19 | #define DIGITAL_DEBUG_INVERT 0 |
20 | 20 | ||
21 | #define OUTPUT_HIGH(num) {PORTC |= (4 << (num));} |
21 | #define OUTPUT_HIGH(num) {PORTC |= (4 << (num));} |
22 | #define OUTPUT_LOW(num) {PORTC &= ~(4 << (num));} |
22 | #define OUTPUT_LOW(num) {PORTC &= ~(4 << (num));} |
Line 42... | Line 42... | ||
42 | * } |
42 | * } |
43 | * |
43 | * |
44 | * Digital debugs may be added as desired, and removed when the mystery |
44 | * Digital debugs may be added as desired, and removed when the mystery |
45 | * at hand is resolved. |
45 | * at hand is resolved. |
46 | */ |
46 | */ |
- | 47 | ||
- | 48 | #define DEBUG_LEDTEST_ON 1000 |
|
- | 49 | #define DEBUG_LEDTEST_OFF 1001 |
|
47 | #define DEBUG_LEDTEST 256 |
50 | #define DEBUG_LEDTEST_0 1002 |
- | 51 | #define DEBUG_LEDTEST_1 1003 |
|
- | 52 | ||
48 | #define DEBUG_HEIGHT_SWITCH 1 |
53 | #define DEBUG_MAINLOOP_TIMER 1 |
49 | #define DEBUG_HEIGHT_DIFF 2 |
54 | #define DEBUG_HEIGHT_DIFF 2 |
50 | #define DEBUG_HOVERTHROTTLE 4 |
55 | #define DEBUG_HOVERTHROTTLE 4 |
51 | #define DEBUG_ACC0THORDER 8 |
56 | #define DEBUG_ACC0THORDER 8 |
52 | #define DEBUG_COMMANDREPEATED 16 |
57 | #define DEBUG_COMMANDREPEATED 16 |
53 | #define DEBUG_PRESSURERANGE 32 |
58 | #define DEBUG_PRESSURERANGE 32 |
Line 56... | Line 61... | ||
56 | 61 | ||
57 | /* |
62 | /* |
58 | * Set to 0 for using outputs as the usual flashing lights. |
63 | * Set to 0 for using outputs as the usual flashing lights. |
59 | * Set to one of the DEBUG_... defines h for using the outputs as debug lights. |
64 | * Set to one of the DEBUG_... defines h for using the outputs as debug lights. |
60 | */ |
65 | */ |
Line 61... | Line 66... | ||
61 | #define DIGITAL_DEBUG_MASK DEBUG_ACC0THORDER |
66 | #define DIGITAL_DEBUG_MASK DEBUG_MAINLOOP_TIMER |
62 | 67 | ||
Line 63... | Line 68... | ||
63 | void output_init(void); |
68 | void output_init(void); |