diff options
Diffstat (limited to 'tick.c')
-rw-r--r-- | tick.c | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -13,6 +13,7 @@ ISR(TIMER1_COMPA_vect) static void uart_puttick(void) { uint16_t frac = TCNT1; + _uart_putch('@'); uart_puthex(systick.u8[3]); uart_puthex(systick.u8[2]); @@ -20,6 +21,16 @@ static void uart_puttick(void) uart_puthex(systick.u8[0]); _uart_putch('.'); uart_puthex16(frac); +#if DEBUG_SP + _uart_putch('~'); + uint8_t spl, sph; + asm ("\n\ + in %[spl], 0x3d\n\ + in %[sph], 0x3e\n\ + " : [spl] "=r" (spl), [sph] "=r" (sph)); + uart_puthex(sph); + uart_puthex(spl); +#endif _uart_putch(' '); } |