Rev 1960 | Rev 1968 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1960 | Rev 1964 | ||
---|---|---|---|
Line 18... | Line 18... | ||
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. |
19 | #define DIGITAL_DEBUG_INVERT 0 |
19 | #define DIGITAL_DEBUG_INVERT 0 |
Line 20... | Line 20... | ||
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));} |
- | |
23 | #define OUTPUT_SET(num, state) {if (DIGITAL_DEBUG_INVERT){if(state) OUTPUT_LOW(num) else OUTPUT_HIGH(num)} else {if(state) OUTPUT_HIGH(num) else OUTPUT_LOW(num)}} |
22 | #define OUTPUT_LOW(num) {PORTC &= ~(4 << (num));} |
Line 24... | Line 23... | ||
24 | #define OUTPUT_TOGGLE(num) ( {PORTC ^= (4 << (num));} |
23 | #define OUTPUT_TOGGLE(num) ( {PORTC ^= (4 << (num));} |
25 | 24 | ||
26 | /* |
25 | /* |
Line 56... | Line 55... | ||
56 | 55 | ||
57 | // #1 on |
56 | // #1 on |
Line 58... | Line 57... | ||
58 | #define DEBUG_LEDTEST_1 1003 |
57 | #define DEBUG_LEDTEST_1 1003 |
59 | 58 | ||
60 | #define DEBUG_MAINLOOP_TIMER 1 |
59 | #define DEBUG_MAINLOOP_TIMER 1 |
61 | #define DEBUG_HEIGHT_DIFF 2 |
60 | #define DEBUG_HEIGHT_DIFF 2 |
62 | #define DEBUG_HOVERTHROTTLE 4 |
61 | #define DEBUG_HOVERTHROTTLE 4 |
63 | #define DEBUG_ACC0THORDER 8 |
62 | #define DEBUG_ACC0THORDER 8 |
64 | #define DEBUG_COMMANDREPEATED 16 |
63 | #define DEBUG_SIGNAL 16 |
65 | #define DEBUG_PRESSURERANGE 32 |
64 | #define DEBUG_PRESSURERANGE 32 |
- | 65 | #define DEBUG_CLIP 64 |
|
- | 66 | #define DEBUG_SENSORLIMIT 128 |
|
- | 67 | ||
- | 68 | #define OUTPUTOPTIONS_INVERT_0 1 |
|
- | 69 | #define OUTPUTOPTIONS_INVERT_1 2 |
|
- | 70 | #define OUTPUTOPTIONS_FLASH_AT_BEEP 4 |
|
- | 71 | #define OUTPUTOPTIONS_USE_ONBOARD_LEDS 8 |
|
Line 66... | Line 72... | ||
66 | #define DEBUG_CLIP 64 |
72 | #define OUTPUTOPTIONS_TEST_LO 64 |
67 | #define DEBUG_SENSORLIMIT 128 |
73 | #define OUTPUTOPTIONS_TEST_HI 128 |
68 | 74 | ||
69 | /* |
75 | /* |
70 | * Set to 0 for using outputs as the usual flashing lights. |
76 | * Set to 0 for using outputs as the usual flashing lights. |
Line 71... | Line 77... | ||
71 | * Set to one of the DEBUG_... defines h for using the outputs as debug lights. |
77 | * Set to one of the DEBUG_... defines h for using the outputs as debug lights. |
- | 78 | */ |
|
72 | */ |
79 | #define DIGITAL_DEBUG_MASK 0 |
73 | #define DIGITAL_DEBUG_MASK 0 |
80 | |
74 | 81 | void output_init(void); |
|
75 | void output_init(void); |
82 | void outputSet(uint8_t num, uint8_t state); |
76 | void output_update(void); |
83 | void output_update(void); |