Add ifdef to invert heater pin for px4 IO firmware.

This commit is contained in:
Mirko Denecke
2020-07-22 11:29:27 +02:00
committed by Daniel Agar
parent f014d0de8e
commit 2581badabd
+5
View File
@@ -159,7 +159,12 @@ extern output_limit_t pwm_limit;
/*
* GPIO handling.
*/
/* HEX Cube Orange and Cube Yellow uses an inverted signal to control the IMU heater */
#ifdef CONFIG_ARCH_BOARD_HEX_IO_V2
#define LED_BLUE(_s) px4_arch_gpiowrite(GPIO_LED1, (_s))
#else
#define LED_BLUE(_s) px4_arch_gpiowrite(GPIO_LED1, !(_s))
#endif
#define LED_AMBER(_s) px4_arch_gpiowrite(GPIO_LED2, !(_s))
#define LED_SAFETY(_s) px4_arch_gpiowrite(GPIO_LED3, !(_s))
#define LED_RING(_s) px4_arch_gpiowrite(GPIO_LED4, (_s))