add oneshot mode capability

change fmu to task

increase fmu_servo task priority to max and enable true oneshot

use lowest FMU priority which minimizes jitter

constrain oneshot updates to control group 0 events
This commit is contained in:
Mark Whitehorn
2017-03-23 08:28:15 +01:00
committed by Lorenz Meier
parent eac72051b8
commit aa9fbbedd5
10 changed files with 717 additions and 552 deletions
+10
View File
@@ -305,6 +305,9 @@ struct pwm_output_rc_config {
* This is the low-level API to the platform-specific PWM driver.
*/
__EXPORT extern void up_pwm_set_oneshot_mode(bool on);
__EXPORT extern bool up_pwm_get_oneshot_mode(void);
/**
* Intialise the PWM servo outputs using the specified configuration.
*
@@ -360,6 +363,13 @@ __EXPORT extern uint32_t up_pwm_servo_get_rate_group(unsigned group);
*/
__EXPORT extern int up_pwm_servo_set_rate_group_update(unsigned group, unsigned rate);
/**
* Force update of all timer channels in group.
*
* @param group The rate group to update.
*/
__EXPORT extern void up_pwm_force_update(void);
/**
* Set the current output value for a channel.
*