aboutsummaryrefslogtreecommitdiff
path: root/src/drivers/drv_pwm_output.h
diff options
context:
space:
mode:
authorLorenz Meier <lm@inf.ethz.ch>2013-09-10 21:35:50 +0200
committerLorenz Meier <lm@inf.ethz.ch>2013-09-10 21:38:32 +0200
commit8131d28a0faf7d33060cf067f5bd8dee41666fed (patch)
tree95b5c87f4925234e540f756840ff0dfe063b12de /src/drivers/drv_pwm_output.h
parent373a74adb9abc218ca8084fc3f59c0e50daf9bf4 (diff)
downloadpx4-firmware-8131d28a0faf7d33060cf067f5bd8dee41666fed.tar.gz
px4-firmware-8131d28a0faf7d33060cf067f5bd8dee41666fed.tar.bz2
px4-firmware-8131d28a0faf7d33060cf067f5bd8dee41666fed.zip
Exported disarmed PWM values as IOCTLs
Diffstat (limited to 'src/drivers/drv_pwm_output.h')
-rw-r--r--src/drivers/drv_pwm_output.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/drivers/drv_pwm_output.h b/src/drivers/drv_pwm_output.h
index ec9d4ca09..6ed9320cb 100644
--- a/src/drivers/drv_pwm_output.h
+++ b/src/drivers/drv_pwm_output.h
@@ -79,6 +79,7 @@ typedef uint16_t servo_position_t;
struct pwm_output_values {
/** desired pulse widths for each of the supported channels */
servo_position_t values[PWM_OUTPUT_MAX_CHANNELS];
+ int channel_count;
};
/*
@@ -118,9 +119,18 @@ ORB_DECLARE(output_pwm);
/** start DSM bind */
#define DSM_BIND_START _IOC(_PWM_SERVO_BASE, 7)
-/** Power up DSM receiver */
+/** power up DSM receiver */
#define DSM_BIND_POWER_UP _IOC(_PWM_SERVO_BASE, 8)
+/** set the PWM value when disarmed - should be no PWM (zero) by default */
+#define PWM_SERVO_SET_DISARMED_PWM _IOC(_PWM_SERVO_BASE, 9)
+
+/** set the minimum PWM value the output will send */
+#define PWM_SERVO_SET_MIN_PWM _IOC(_PWM_SERVO_BASE, 10)
+
+/** set the maximum PWM value the output will send */
+#define PWM_SERVO_SET_MAX_PWM _IOC(_PWM_SERVO_BASE, 11)
+
/** set a single servo to a specific value */
#define PWM_SERVO_SET(_servo) _IOC(_PWM_SERVO_BASE, 0x20 + _servo)