mirror of https://github.com/ArduPilot/ardupilot
AP_Notify: init gpio state for LEDs
This commit is contained in:
parent
694543e8b2
commit
6df32d6851
|
@ -15,8 +15,7 @@
|
|||
|
||||
#include "PixRacerLED.h"
|
||||
|
||||
#if CONFIG_HAL_BOARD == HAL_BOARD_PX4 && CONFIG_HAL_BOARD_SUBTYPE == HAL_BOARD_SUBTYPE_PX4_V4 \
|
||||
|| CONFIG_HAL_BOARD == HAL_BOARD_CHIBIOS
|
||||
#if CONFIG_HAL_BOARD_SUBTYPE == HAL_BOARD_SUBTYPE_PX4_V4 || CONFIG_HAL_BOARD == HAL_BOARD_CHIBIOS
|
||||
|
||||
#ifndef HAL_GPIO_A_LED_PIN
|
||||
#define HAL_GPIO_A_LED_PIN -1
|
||||
|
@ -37,6 +36,9 @@ PixRacerLED::PixRacerLED() :
|
|||
|
||||
bool PixRacerLED::hw_init(void)
|
||||
{
|
||||
hal.gpio->pinMode(HAL_GPIO_A_LED_PIN, HAL_GPIO_OUTPUT);
|
||||
hal.gpio->pinMode(HAL_GPIO_B_LED_PIN, HAL_GPIO_OUTPUT);
|
||||
hal.gpio->pinMode(HAL_GPIO_C_LED_PIN, HAL_GPIO_OUTPUT);
|
||||
hal.gpio->write(HAL_GPIO_A_LED_PIN, HAL_GPIO_LED_OFF);
|
||||
hal.gpio->write(HAL_GPIO_B_LED_PIN, HAL_GPIO_LED_OFF);
|
||||
hal.gpio->write(HAL_GPIO_C_LED_PIN, HAL_GPIO_LED_OFF);
|
||||
|
|
Loading…
Reference in New Issue