summaryrefslogtreecommitdiffstats
path: root/app/led.c
diff options
context:
space:
mode:
Diffstat (limited to 'app/led.c')
-rw-r--r--app/led.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/app/led.c b/app/led.c
index 7d8303d..a6bd8ea 100644
--- a/app/led.c
+++ b/app/led.c
@@ -1,26 +1,31 @@
#include "project.h"
+#define LED GPIO13
+#define LED_PORT GPIOC
+
static int led = 0;
void
led_init (void)
{
- gpio_set_mode (GPIOC, GPIO_MODE_OUTPUT_2_MHZ,
- GPIO_CNF_OUTPUT_PUSHPULL, GPIO13);
+ MAP_OUTPUT_OD(LED);
+ SET(LED);
+
}
void
led_clear (void)
{
- gpio_set (GPIOC, GPIO13);
+ SET(LED);
+ led =0;
}
void
led_set (void)
{
- gpio_clear (GPIOC, GPIO13);
+ CLEAR(LED);
led = 200;
}