summaryrefslogtreecommitdiffstats
path: root/app/led.c
diff options
context:
space:
mode:
authorJames McKenzie <git@madingley.org>2014-11-16 11:12:25 +0000
committerJames McKenzie <git@madingley.org>2014-11-16 11:12:25 +0000
commit500561f54adabc9aaf5b3548744b5bc8b4381c89 (patch)
tree89d1157b5b2260bc91a59a8ff00f5036edbccea4 /app/led.c
parent5950acfb05fb3e172fa5710f1cda6ab347f51f2f (diff)
downloadstm32_usb_kvm-500561f54adabc9aaf5b3548744b5bc8b4381c89.tar.gz
stm32_usb_kvm-500561f54adabc9aaf5b3548744b5bc8b4381c89.tar.bz2
stm32_usb_kvm-500561f54adabc9aaf5b3548744b5bc8b4381c89.zip
tidy up
Diffstat (limited to 'app/led.c')
-rw-r--r--app/led.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/app/led.c b/app/led.c
index 9481b2e..fbe3d11 100644
--- a/app/led.c
+++ b/app/led.c
@@ -3,6 +3,15 @@
static int led=0;
+void led_init(void )
+{
+gpio_set_mode (GPIOB, GPIO_MODE_OUTPUT_2_MHZ,
+ GPIO_CNF_OUTPUT_PUSHPULL, GPIO8);
+ gpio_set_mode (GPIOB, GPIO_MODE_OUTPUT_2_MHZ,
+ GPIO_CNF_OUTPUT_PUSHPULL, GPIO9);
+}
+
+
void led_clear(void)
{
gpio_set(GPIOB,GPIO8);