diff options
-rw-r--r-- | can.c | 1 | ||||
-rw-r--r-- | lightctrl.c | 5 | ||||
-rw-r--r-- | tick.c | 1 |
3 files changed, 7 insertions, 0 deletions
@@ -203,6 +203,7 @@ ISR(INT0_vect) #ifdef HAVE_TICK uart_puttick(); #endif +// dbg_dump_ret(); uart_puts("can: irqh<"); spi_ss(0); diff --git a/lightctrl.c b/lightctrl.c index bc5e67e..66f726a 100644 --- a/lightctrl.c +++ b/lightctrl.c @@ -1,3 +1,8 @@ +#define _dbg_dump_ret() +#define dbg_dump_ret() do { \ + union { uint16_t u; void *p; } ret = { .p = __builtin_return_address(0) }; \ + _uart_putch('#'); uart_puthex16((ret.u & 0xfff) << 1); _uart_putch('\n'); } while (0) + #define F_CPU 8000000 #include <stdint.h> #include <stdbool.h> @@ -8,6 +8,7 @@ static union { ISR(TIMER1_COMPA_vect) { systick.u32++; +// dbg_dump_ret(); } static void uart_puttick(void) |