mirror of https://github.com/ArduPilot/ardupilot
HAL_ChibiOS: TBS-F7 is active low on sd power
This commit is contained in:
parent
94bace91a4
commit
27a1fec911
|
@ -24,6 +24,12 @@ undef UART8_TX
|
||||||
undef UART8_RX
|
undef UART8_RX
|
||||||
undef AP_FEATURE_SBUS_OUT
|
undef AP_FEATURE_SBUS_OUT
|
||||||
|
|
||||||
|
# SD power is active low on TBS board
|
||||||
|
undef PG7
|
||||||
|
undef VDD_3V3_SD_CARD_EN
|
||||||
|
PG7 nVDD_3V3_SD_CARD_EN OUTPUT HIGH
|
||||||
|
|
||||||
|
|
||||||
# allow the first 3 capture ports to be used as PWM outputs or GPIOs
|
# allow the first 3 capture ports to be used as PWM outputs or GPIOs
|
||||||
undef PA5
|
undef PA5
|
||||||
undef PB3
|
undef PB3
|
||||||
|
|
|
@ -262,7 +262,7 @@ void set_fast_reboot(enum rtc_boot_magic v)
|
||||||
*/
|
*/
|
||||||
void peripheral_power_enable(void)
|
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)
|
#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_nVDD_3V3_SD_CARD_EN) || defined(HAL_GPIO_PIN_VDD_3V3_SD_CARD_EN)
|
||||||
// we don't know what state the bootloader had the CTS pin in, so
|
// 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
|
// wait here with it pulled up from the PAL table for enough time
|
||||||
// for the radio to be definately powered down
|
// for the radio to be definately powered down
|
||||||
|
@ -278,9 +278,17 @@ void peripheral_power_enable(void)
|
||||||
palWriteLine(HAL_GPIO_PIN_nVDD_5V_HIPOWER_EN, 0);
|
palWriteLine(HAL_GPIO_PIN_nVDD_5V_HIPOWER_EN, 0);
|
||||||
#endif
|
#endif
|
||||||
#ifdef HAL_GPIO_PIN_VDD_3V3_SENSORS_EN
|
#ifdef HAL_GPIO_PIN_VDD_3V3_SENSORS_EN
|
||||||
// the TBS-Colibri-F7 needs PE3 low
|
// the TBS-Colibri-F7 needs PE3 low at power on
|
||||||
palWriteLine(HAL_GPIO_PIN_VDD_3V3_SENSORS_EN, 1);
|
palWriteLine(HAL_GPIO_PIN_VDD_3V3_SENSORS_EN, 1);
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef HAL_GPIO_PIN_nVDD_3V3_SD_CARD_EN
|
||||||
|
// the TBS-Colibri-F7 needs PG7 low for SD card
|
||||||
|
palWriteLine(HAL_GPIO_PIN_nVDD_3V3_SD_CARD_EN, 0);
|
||||||
|
#endif
|
||||||
|
#ifdef HAL_GPIO_PIN_VDD_3V3_SD_CARD_EN
|
||||||
|
// others need it active high
|
||||||
|
palWriteLine(HAL_GPIO_PIN_VDD_3V3_SD_CARD_EN, 1);
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue