aboutsummaryrefslogtreecommitdiff
path: root/src/modules/px4iofirmware/px4io.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/px4iofirmware/px4io.h')
-rw-r--r--src/modules/px4iofirmware/px4io.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/modules/px4iofirmware/px4io.h b/src/modules/px4iofirmware/px4io.h
index 47bcb8ddf..4965d0724 100644
--- a/src/modules/px4iofirmware/px4io.h
+++ b/src/modules/px4iofirmware/px4io.h
@@ -128,7 +128,9 @@ extern struct sys_state_s system_state;
#define LED_AMBER(_s) stm32_gpiowrite(GPIO_LED2, !(_s))
#define LED_SAFETY(_s) stm32_gpiowrite(GPIO_LED3, !(_s))
-#define POWER_SERVO(_s) stm32_gpiowrite(GPIO_SERVO_PWR_EN, (_s))
+#ifdef GPIO_SERVO_PWR_EN
+# define POWER_SERVO(_s) stm32_gpiowrite(GPIO_SERVO_PWR_EN, (_s))
+#endif
#ifdef GPIO_ACC1_PWR_EN
# define POWER_ACC1(_s) stm32_gpiowrite(GPIO_ACC1_PWR_EN, (_s))
#endif