diff options
author | Richard Braun <rbraun@sceen.net> | 2018-02-28 02:05:22 +0100 |
---|---|---|
committer | Richard Braun <rbraun@sceen.net> | 2018-02-28 02:05:22 +0100 |
commit | 9d41bed3f5c923de4aae10a27f05652b308459dd (patch) | |
tree | 2539b7b6ffb7048dada59d55591d9f3d583dd788 | |
parent | 4ab64988e360db004942acb811559ee78e5ea9ff (diff) |
gpio: initialize led at setup onlyolimex-stm32-h407
-rw-r--r-- | src/gpio.c | 7 |
1 files changed, 3 insertions, 4 deletions
@@ -87,8 +87,6 @@ gpio_set_output(volatile struct gpio_regs *regs, unsigned int io, bool high) { uint32_t shift, mask; - gpio_set_af(gpio_c_regs, io, 15, 0, 0); - gpio_compute_location(io, 1, &shift, &mask); if (high) { @@ -101,8 +99,9 @@ gpio_set_output(volatile struct gpio_regs *regs, unsigned int io, bool high) void gpio_setup(void) { - gpio_set_af(gpio_c_regs, 6, 8, 1, 1); /* UART6 TX */ - gpio_set_af(gpio_c_regs, 7, 8, 1, 1); /* UART6 RX */ + gpio_set_af(gpio_c_regs, 6, 8, 1, 1); /* UART6 TX */ + gpio_set_af(gpio_c_regs, 7, 8, 1, 1); /* UART6 RX */ + gpio_set_af(gpio_c_regs, 13, 15, 0, 0); /* LED */ } void |