summaryrefslogtreecommitdiffstats
path: root/app/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'app/main.c')
-rw-r--r--app/main.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/app/main.c b/app/main.c
index ee0dd40..1106316 100644
--- a/app/main.c
+++ b/app/main.c
@@ -6,7 +6,7 @@
int
main (void)
{
- unsigned cnt=0;
+ unsigned cnt = 0;
//nvic_set_priority_grouping(NVIC_PriorityGroup_4);
@@ -21,15 +21,15 @@ main (void)
/*Adjust interrupt priorities so that taco trumps uarts trumps timer trumps dma */
- nvic_set_priority (TACHO_IRQ,0x20);
+ nvic_set_priority (TACHO_IRQ, 0x20);
nvic_set_priority (NVIC_USART1_IRQ, 0x40);
nvic_set_priority (NVIC_SYSTICK_IRQ, 0x60);
nvic_set_priority (NVIC_DMA1_CHANNEL6_IRQ, 0x80);
- /* Claw some pins pack*/
+ /* Claw some pins pack */
gpio_primary_remap (AFIO_MAPR_SWJ_CFG_JTAG_OFF_SW_ON, 0);
- dwt_enable_cycle_counter();
+ dwt_enable_cycle_counter ();
ticker_init ();
@@ -44,28 +44,28 @@ main (void)
oled_init ();
- tacho_init();
+ tacho_init ();
font8x8_put_str ("ABC fish soup!", 0, 0);
- MAP_OUTPUT_PP(WIGGLE);
+ MAP_OUTPUT_PP (WIGGLE);
for (;;)
{
- char buf[20];
+ char buf[20];
- sprintf(buf,"%6u rpm",(unsigned) raw_tacho);
- font8x16_put_str (buf, 30, 8);
+ sprintf (buf, "%6u rpm", (unsigned) raw_tacho);
+ font8x16_put_str (buf, 30, 8);
- sprintf(buf,"%8d",cnt++);
- font8x8_put_str (buf, 0, 24);
+ sprintf (buf, "%8d", cnt++);
+ font8x8_put_str (buf, 0, 24);
- if (cnt&1)
- SET(WIGGLE);
- else
- CLEAR(WIGGLE);
+ if (cnt & 1)
+ SET (WIGGLE);
+ else
+ CLEAR (WIGGLE);
}