STM32F3DISCOVERY - Updating L3GD20 alignment defaults. (MJ666)
[betaflight.git] / src / main / drivers / light_led.c
blob46d4efda25bed4b1eb650454c3e63fa4a1bba0d7
1 /*
2 * This file is part of Cleanflight.
4 * Cleanflight is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation, either version 3 of the License, or
7 * (at your option) any later version.
9 * Cleanflight is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with Cleanflight. If not, see <http://www.gnu.org/licenses/>.
18 initLeds(void)
20 struct {
21 GPIO_TypeDef *gpio;
22 gpio_config_t cfg;
23 } gpio_setup[] = {
24 #ifdef LED0
26 .gpio = LED0_GPIO,
27 .cfg = { LED0_PIN, Mode_Out_PP, Speed_2MHz }
29 #endif
30 #ifdef LED1
33 .gpio = LED1_GPIO,
34 .cfg = { LED1_PIN, Mode_Out_PP, Speed_2MHz }
36 #endif
39 uint8_t gpio_count = sizeof(gpio_setup) / sizeof(gpio_setup[0]);