boards/cuav/x7pro: fix X7 LED SAFETY configuration

* keep the naming identical to the pinout
This commit is contained in:
CUAVcaijie 2020-06-12 09:32:53 +08:00 committed by GitHub
parent ab060cdab0
commit dee56e78aa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 4 deletions

View File

@ -174,10 +174,12 @@
/* RSSI_IN */
#define GPIO_RSSI_IN /* PB0 */ (GPIO_INPUT|GPIO_PULLUP|GPIO_PORTB|GPIO_PIN0)
/* Safety Switch is only on PX4IO */
#define GPIO_nSAFETY_SWITCH_LED_OUT /* PE12 */ (GPIO_INPUT|GPIO_PULLDOWN|GPIO_PORTE|GPIO_PIN12) // FMU_LED_AMBER
/* Safety Switch is only on FMU */
#define FMU_LED_AMBER /* PE12 */ (GPIO_OUTPUT|GPIO_PULLDOWN|GPIO_PORTE|GPIO_PIN12) // FMU_LED_AMBER
#define GPIO_BTN_SAFETY /* PE10 */ (GPIO_INPUT|GPIO_PULLDOWN|GPIO_PORTE|GPIO_PIN10) // SAFETY_SW
#define GPIO_LED_SAFETY FMU_LED_AMBER
/* By Providing BOARD_ADC_USB_CONNECTED (using the px4_arch abstraction)
* this board support the ADC system_power interface, and therefore
* provides the true logic GPIO BOARD_ADC_xxxx macros.
@ -231,7 +233,7 @@
GPIO_OTGFS_VBUS, \
PX4_GPIO_PIN_OFF(GPIO_HS_USB_EN), \
GPIO_RSSI_IN, \
GPIO_nSAFETY_SWITCH_LED_OUT, \
FMU_LED_AMBER, \
GPIO_BTN_SAFETY, \
}

View File

@ -64,7 +64,7 @@ __END_DECLS
# define xlat(p) (p)
static uint32_t g_ledmap[] = {
GPIO_nSAFETY_SWITCH_LED_OUT, // Indexed by LED_SAFETY (defaulted to an input)
FMU_LED_AMBER, // Indexed by LED_SAFETY (defaulted to an output)
};
__EXPORT void led_init(void)