diff options
author | David Phillips <david@yeah.nah.nz> | 2021-02-27 22:48:17 +1300 |
---|---|---|
committer | David Phillips <david@yeah.nah.nz> | 2021-02-27 22:48:34 +1300 |
commit | 24aebac344e8fc672a93d921d492d61482e8c3ca (patch) | |
tree | 2870f8fa9fb8fd909100177e12d489120d188e52 /debug.h | |
parent | c9fd850359c1749d0bd2c6a6dfbbb8798a0e3b6c (diff) | |
download | altimeter-24aebac344e8fc672a93d921d492d61482e8c3ca.tar.xz |
Move debug macros to dedicated header
Also removes use of debug macros from altimeter.c
Diffstat (limited to 'debug.h')
-rw-r--r-- | debug.h | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -0,0 +1,13 @@ +#define DEBUG_ALL_VAL ((1 << 1) | (1 << 2) | (1 << 3) | (1 << 4) | (1 << 5) | (1 << 6)) +#define DEBUG_INIT do{DDRB |= DEBUG_ALL_VAL;}while(0) +#define DEBUG_MARK_SET_ALL do{PORTB |= DEBUG_ALL_VAL;}while(0) +#define DEBUG_MARK_1_SET do{PORTB |= 1 << 1;}while(0) +#define DEBUG_MARK_1_CLEAR do{PORTB &= ~(1 << 1);}while(0) +#define DEBUG_MARK_2_SET do{PORTB |= 1 << 3;}while(0) +#define DEBUG_MARK_2_CLEAR do{PORTB &= ~(1 << 3);}while(0) +#define DEBUG_MARK_3_SET do{PORTB |= 1 << 2;}while(0) +#define DEBUG_MARK_3_CLEAR do{PORTB &= ~(1 << 2);}while(0) +#define DEBUG_MARK_4_SET do{PORTB |= 1 << 6;}while(0) +#define DEBUG_MARK_4_CLEAR do{PORTB &= ~(1 << 6);}while(0) +#define DEBUG_MARK_5_SET do{PORTB |= 1 << 5;}while(0) +#define DEBUG_MARK_5_CLEAR do{PORTB &= ~(1 << 5);}while(0) |