Paparazzi UAS
v5.15_devel-230-gc96ce27
Paparazzi is a free software Unmanned Aircraft System.
|
STM32 PWM servos handling. More...
#include "std.h"
#include <BOARD_CONFIG>
Go to the source code of this file.
Macros | |
#define | ACTUATORS_DUALPWM_NB 4 |
#define | SERVOS_TICS_OF_USEC(_v) (_v) |
#define | ActuatorDualpwmSet(_i, _v) { actuators_dualpwm_values[_i] = _v; } |
#define | ActuatorsDualpwmCommit actuators_dualpwm_commit |
Functions | |
void | actuators_dualpwm_commit (void) |
Set pulse widths from actuator values, assumed to be in us. More... | |
void | dual_pwm_isr (void) |
void | clear_timer_flag (void) |
Interuption called at the end of the timer. More... | |
void | set_dual_pwm_timer_s_period (uint32_t period) |
void | set_dual_pwm_timer_s_oc (uint32_t oc_value, uint32_t oc_value2) |
Variables | |
uint32_t | actuators_dualpwm_values [ACTUATORS_DUALPWM_NB] |
STM32 PWM servos handling.
Definition in file actuators_dualpwm_arch.h.
#define ActuatorDualpwmSet | ( | _i, | |
_v | |||
) | { actuators_dualpwm_values[_i] = _v; } |
Definition at line 53 of file actuators_dualpwm_arch.h.
#define ACTUATORS_DUALPWM_NB 4 |
Definition at line 35 of file actuators_dualpwm_arch.h.
#define ActuatorsDualpwmCommit actuators_dualpwm_commit |
Definition at line 54 of file actuators_dualpwm_arch.h.
#define SERVOS_TICS_OF_USEC | ( | _v | ) | (_v) |
Definition at line 51 of file actuators_dualpwm_arch.h.
void actuators_dualpwm_commit | ( | void | ) |
Set pulse widths from actuator values, assumed to be in us.
Definition at line 172 of file actuators_dualpwm_arch.c.
void clear_timer_flag | ( | void | ) |
Interuption called at the end of the timer.
In our case alternatively very 4ms and 16ms (twice every 20ms)Fonction that clears the flag of interuption in order to reactivate the interuption
Definition at line 117 of file actuators_dualpwm_arch.c.
Referenced by dual_pwm_isr().
void dual_pwm_isr | ( | void | ) |
Definition at line 147 of file actuators_dualpwm_arch.c.
References actuators_dualpwm_values, clear_timer_flag(), ratio_16ms, ratio_4ms, set_dual_pwm_timer_s_oc(), and set_dual_pwm_timer_s_period().
Definition at line 135 of file actuators_dualpwm_arch.c.
Referenced by dual_pwm_isr().
void set_dual_pwm_timer_s_period | ( | uint32_t | period | ) |
Definition at line 126 of file actuators_dualpwm_arch.c.
Referenced by dual_pwm_isr().
uint32_t actuators_dualpwm_values[ACTUATORS_DUALPWM_NB] |
Definition at line 42 of file actuators_dualpwm_arch.c.
Referenced by dual_pwm_isr().