aboutsummaryrefslogtreecommitdiff
path: root/src/drivers/drv_pwm_output.h
diff options
context:
space:
mode:
authorThomas Gubler <thomasgubler@gmail.com>2014-11-24 07:41:26 +0100
committerThomas Gubler <thomasgubler@gmail.com>2014-11-24 07:41:26 +0100
commitc37ff71e625310cdc777719a04c3702d9afa1f7f (patch)
tree714ecb7b510e7ff53080ce3f0caebe8b128a26f5 /src/drivers/drv_pwm_output.h
parentf36f54c621cb5b36d345c5a26f72e89fc948fa65 (diff)
parent512779907e06f059a15d54c88d71b73aad9aced0 (diff)
downloadpx4-firmware-c37ff71e625310cdc777719a04c3702d9afa1f7f.tar.gz
px4-firmware-c37ff71e625310cdc777719a04c3702d9afa1f7f.tar.bz2
px4-firmware-c37ff71e625310cdc777719a04c3702d9afa1f7f.zip
Merge remote-tracking branch 'upstream/master' into ros
Conflicts: makefiles/config_px4fmu-v2_test.mk
Diffstat (limited to 'src/drivers/drv_pwm_output.h')
-rw-r--r--src/drivers/drv_pwm_output.h31
1 files changed, 30 insertions, 1 deletions
diff --git a/src/drivers/drv_pwm_output.h b/src/drivers/drv_pwm_output.h
index 6873f24b6..b10c3e18a 100644
--- a/src/drivers/drv_pwm_output.h
+++ b/src/drivers/drv_pwm_output.h
@@ -117,6 +117,23 @@ struct pwm_output_values {
unsigned channel_count;
};
+
+/**
+ * RC config values for a channel
+ *
+ * This allows for PX4IO_PAGE_RC_CONFIG values to be set without a
+ * param_get() dependency
+ */
+struct pwm_output_rc_config {
+ uint8_t channel;
+ uint16_t rc_min;
+ uint16_t rc_trim;
+ uint16_t rc_max;
+ uint16_t rc_dz;
+ uint16_t rc_assignment;
+ bool rc_reverse;
+};
+
/*
* ORB tag for PWM outputs.
*/
@@ -214,7 +231,19 @@ ORB_DECLARE(output_pwm);
#define PWM_SERVO_SET_TERMINATION_FAILSAFE _IOC(_PWM_SERVO_BASE, 25)
/** force safety switch on (to enable use of safety switch) */
-#define PWM_SERVO_SET_FORCE_SAFETY_ON _IOC(_PWM_SERVO_BASE, 26)
+#define PWM_SERVO_SET_FORCE_SAFETY_ON _IOC(_PWM_SERVO_BASE, 26)
+
+/** set RC config for a channel. This takes a pointer to pwm_output_rc_config */
+#define PWM_SERVO_SET_RC_CONFIG _IOC(_PWM_SERVO_BASE, 27)
+
+/** set the 'OVERRIDE OK' bit, which allows for RC control on FMU loss */
+#define PWM_SERVO_SET_OVERRIDE_OK _IOC(_PWM_SERVO_BASE, 28)
+
+/** clear the 'OVERRIDE OK' bit, which allows for RC control on FMU loss */
+#define PWM_SERVO_CLEAR_OVERRIDE_OK _IOC(_PWM_SERVO_BASE, 29)
+
+/** setup OVERRIDE_IMMEDIATE behaviour on FMU fail */
+#define PWM_SERVO_SET_OVERRIDE_IMMEDIATE _IOC(_PWM_SERVO_BASE, 30)
/*
*