summaryrefslogtreecommitdiffstats
path: root/app/led.c
diff options
context:
space:
mode:
authorroot <root@lamia.panaceas.james.local>2016-08-20 23:04:53 +0100
committerroot <root@lamia.panaceas.james.local>2016-08-20 23:04:53 +0100
commit4dfc42565c2d1f5b900d8d725126bfde886a8423 (patch)
tree6ebfaaee2ea16bcaddae776c91b6182d33ebd3d6 /app/led.c
parent2565f4857ea9cdebdbba483e35a07d012aa3afce (diff)
downloadcandlestick-4dfc42565c2d1f5b900d8d725126bfde886a8423.tar.gz
candlestick-4dfc42565c2d1f5b900d8d725126bfde886a8423.tar.bz2
candlestick-4dfc42565c2d1f5b900d8d725126bfde886a8423.zip
tidy
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);
-
}