diff options
Diffstat (limited to 'app/main.c')
-rw-r--r-- | app/main.c | 23 |
1 files changed, 20 insertions, 3 deletions
@@ -9,15 +9,15 @@ kbd_dispatch (void) if (ring_read_byte (&rx1_ring, &c)) return; - printf("KEY> %c\r\n",c); + printf ("KEY> %c\r\n", c); } int main (void) { -// rcc_clock_setup_in_hsi_out_48mhz (); - //nvic_set_priority_grouping(NVIC_PriorityGroup_4); + char buf[128]; + int c; /*set up pll */ rcc_clock_setup_in_hse_8mhz_out_72mhz (); @@ -49,9 +49,26 @@ main (void) for (;;) { + if (!ring_empty (&rx1_ring)) kbd_dispatch (); + delay_ms (1000); + + printf ("Counter is %x\n", c); + + sprintf (buf, "%8x", c++); + lcd_write (buf, 0, 1); + + led_set (c & 1 ? LED0 : LED1); + + + + + + + + } return 0; |