mirror of https://github.com/ArduPilot/ardupilot
HAL_ChibiOS: support VDD_5V_PERIPH_EN with active high
This commit is contained in:
parent
34a52142c8
commit
91227433e9
|
@ -298,7 +298,7 @@ void get_rtc_backup(uint8_t idx, uint32_t *v, uint8_t n)
|
|||
*/
|
||||
void peripheral_power_enable(void)
|
||||
{
|
||||
#if defined(HAL_GPIO_PIN_nVDD_5V_PERIPH_EN) || defined(HAL_GPIO_PIN_nVDD_5V_HIPOWER_EN) || defined(HAL_GPIO_PIN_VDD_3V3_SENSORS_EN)|| defined(HAL_GPIO_PIN_VDD_3V3_SENSORS2_EN) || defined(HAL_GPIO_PIN_VDD_3V3_SENSORS3_EN) || defined(HAL_GPIO_PIN_VDD_3V3_SENSORS4_EN) || defined(HAL_GPIO_PIN_nVDD_3V3_SD_CARD_EN) || defined(HAL_GPIO_PIN_VDD_3V3_SD_CARD_EN) || defined(HAL_GPIO_PIN_VDD_3V5_LTE_EN)
|
||||
#if defined(HAL_GPIO_PIN_nVDD_5V_PERIPH_EN) || defined(HAL_GPIO_PIN_VDD_5V_PERIPH_EN) || defined(HAL_GPIO_PIN_nVDD_5V_HIPOWER_EN) || defined(HAL_GPIO_PIN_VDD_3V3_SENSORS_EN)|| defined(HAL_GPIO_PIN_VDD_3V3_SENSORS2_EN) || defined(HAL_GPIO_PIN_VDD_3V3_SENSORS3_EN) || defined(HAL_GPIO_PIN_VDD_3V3_SENSORS4_EN) || defined(HAL_GPIO_PIN_nVDD_3V3_SD_CARD_EN) || defined(HAL_GPIO_PIN_VDD_3V3_SD_CARD_EN) || defined(HAL_GPIO_PIN_VDD_3V5_LTE_EN)
|
||||
// we don't know what state the bootloader had the CTS pin in, so
|
||||
// wait here with it pulled up from the PAL table for enough time
|
||||
// for the radio to be definately powered down
|
||||
|
@ -310,6 +310,9 @@ void peripheral_power_enable(void)
|
|||
#ifdef HAL_GPIO_PIN_nVDD_5V_PERIPH_EN
|
||||
palWriteLine(HAL_GPIO_PIN_nVDD_5V_PERIPH_EN, 0);
|
||||
#endif
|
||||
#ifdef HAL_GPIO_PIN_VDD_5V_PERIPH_EN
|
||||
palWriteLine(HAL_GPIO_PIN_VDD_5V_PERIPH_EN, 1);
|
||||
#endif
|
||||
#ifdef HAL_GPIO_PIN_nVDD_5V_HIPOWER_EN
|
||||
palWriteLine(HAL_GPIO_PIN_nVDD_5V_HIPOWER_EN, 0);
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue