summaryrefslogtreecommitdiffstats
path: root/app/led.c
blob: 9481b2ea04d6f48a19cea1df6e0913e8aaef97a5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#include "project.h"


static int led=0;

void led_clear(void)
{
      gpio_set(GPIOB,GPIO8);
      gpio_set(GPIOB,GPIO9);
}

void led_set(uint32_t v)
{
	gpio_clear(GPIOB,v);
	led=50;
}

void led_tick(void)
{
if (led) {
	led--;
	if (!led) led_clear();
}
}