summaryrefslogtreecommitdiffstats
path: root/app/led.c
diff options
context:
space:
mode:
Diffstat (limited to 'app/led.c')
-rw-r--r--app/led.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/app/led.c b/app/led.c
index a6a688b..4da19ee 100644
--- a/app/led.c
+++ b/app/led.c
@@ -29,21 +29,21 @@ void
led_tick (void)
{
- led_cycle++;
+ led_cycle++;
- if (led_cycle<500)
- return;
+ if (led_cycle < 500)
+ return;
- led_cycle=0;
+ led_cycle = 0;
- led_on=!led_on;
+ led_on = !led_on;
+
+ if (led_on)
+ gpio_clear (GPIOC, GPIO13);
+ else
+ gpio_set (GPIOC, GPIO13);
- if (led_on)
- gpio_clear (GPIOC, GPIO13);
- else
- gpio_set (GPIOC, GPIO13);
-
}