summaryrefslogtreecommitdiffstats
path: root/app/main.c
diff options
context:
space:
mode:
authorroot <root@lamia.panaceas.james.local>2015-07-16 08:47:30 +0100
committerroot <root@lamia.panaceas.james.local>2015-07-16 08:47:30 +0100
commit809b705559a51cac8cd301dbbe7e133e8607fbf6 (patch)
tree9f90b6f2b060171a94077b2972945fb5a9f39a66 /app/main.c
parent191be59e5fed6aba0158f9495df8b99894c13c17 (diff)
downloadstm32_ade-809b705559a51cac8cd301dbbe7e133e8607fbf6.tar.gz
stm32_ade-809b705559a51cac8cd301dbbe7e133e8607fbf6.tar.bz2
stm32_ade-809b705559a51cac8cd301dbbe7e133e8607fbf6.zip
change led code, and print something out
Diffstat (limited to 'app/main.c')
-rw-r--r--app/main.c23
1 files changed, 20 insertions, 3 deletions
diff --git a/app/main.c b/app/main.c
index 84edc6f..41aa657 100644
--- a/app/main.c
+++ b/app/main.c
@@ -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;