diff options
author | Christian Cunningham <cc@localhost> | 2022-03-25 12:14:11 -0700 |
---|---|---|
committer | Christian Cunningham <cc@localhost> | 2022-03-25 12:14:11 -0700 |
commit | 667e5e8cf02e3d5c530d76fa1921bafdd460b70c (patch) | |
tree | d34ffd9788e2aa7f8b0ab3c71f6c8323a40c654a /usr | |
parent | 75ca654c2a3a4cce24459a381311c259ce7ce8a3 (diff) |
Uart and GPIO IRQ
Diffstat (limited to 'usr')
-rw-r--r-- | usr/main.c | 3 | ||||
-rw-r--r-- | usr/timed.c | 6 |
2 files changed, 7 insertions, 2 deletions
@@ -35,7 +35,7 @@ static struct UartInfo UART_INFO = { }; static struct GPIOInfo gpinfo = { - .pin = (1<<16), + .pin = (1<<16 | 1<<12), .priority = 0, }; @@ -59,4 +59,5 @@ void main(void) subscribe_irq(GPIO_BANK_1_IRQ, gptest, &gpinfo); add_thread(loop, 0, 8); add_thread(consumer, 0, 3); + uart_string("00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"); } diff --git a/usr/timed.c b/usr/timed.c index fd4f923..5f3b52e 100644 --- a/usr/timed.c +++ b/usr/timed.c @@ -28,6 +28,8 @@ void consumer(void) void loop(void) { + unsigned long long ti, tf; + sys0_64(SYS_TIME, &ti); static char str[13]; static unsigned long previous = 0; char* start; @@ -49,8 +51,10 @@ void loop(void) // draw_hex32(0, 17, count++); // add_thread(producer, 0, 4); //} + sys0_64(SYS_TIME, &tf); + draw_hex32(0, 13, tf-ti); wait_msec(30000); - add_thread(loop, 0, 3); + //add_thread(loop, 0, 3); } void loopt(void) |