diff options
author | Christian Cunningham <cc@localhost> | 2022-03-24 16:49:32 -0700 |
---|---|---|
committer | Christian Cunningham <cc@localhost> | 2022-03-24 16:49:32 -0700 |
commit | 6839008c6aa82ef257231ed1f8087c32266d2d66 (patch) | |
tree | 833c755f91ab90d05da0485dd279d2984a97f56f /usr | |
parent | 49bd4c133fc83de1cb1761ff089a2de03699d991 (diff) |
Added in 3 other timer compares
Diffstat (limited to 'usr')
-rw-r--r-- | usr/main.c | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -66,14 +66,16 @@ void loop(void) void loopt(void) { static char str[13]; - draw_string(0, 9, ulong_to_string(*(volatile unsigned long*)SYS_TIMER_CHI, str)); + draw_string(0, 14, ulong_to_string(*(volatile unsigned long*)SYS_TIMER_CHI, str)); } -static unsigned long TICK_RATE = 5000000; +static unsigned long TICK_RATE_0 = 5000000; +static unsigned long TICK_RATE_1 = 300000; static unsigned long UART_PRIORITY = 2; void main(void) { subscribe_irq(UART_IRQ, handle_data, &UART_PRIORITY); - subscribe_irq(SYS_TIMER_0_IRQ, loopt, &TICK_RATE); + subscribe_irq(SYS_TIMER_0_IRQ, loopt, &TICK_RATE_0); + subscribe_irq(SYS_TIMER_1_IRQ, loopt, &TICK_RATE_1); add_thread(loop, 0, 0); } |