Paparazzi UAS  v5.18.0_stable
Paparazzi is a free software Unmanned Aircraft System.
actuators_dualpwm_arch.h File Reference
#include "std.h"
#include <BOARD_CONFIG>
+ Include dependency graph for actuators_dualpwm_arch.h:
+ This graph shows which files directly or indirectly include this file:

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]
 

Detailed Description

STM32 PWM servos handling.

Definition in file actuators_dualpwm_arch.h.

Macro Definition Documentation

◆ ActuatorDualpwmSet

#define ActuatorDualpwmSet (   _i,
  _v 
)    { actuators_dualpwm_values[_i] = _v; }

Definition at line 53 of file actuators_dualpwm_arch.h.

◆ ACTUATORS_DUALPWM_NB

#define ACTUATORS_DUALPWM_NB   4

Definition at line 35 of file actuators_dualpwm_arch.h.

◆ ActuatorsDualpwmCommit

#define ActuatorsDualpwmCommit   actuators_dualpwm_commit

Definition at line 54 of file actuators_dualpwm_arch.h.

◆ SERVOS_TICS_OF_USEC

#define SERVOS_TICS_OF_USEC (   _v)    (_v)

Definition at line 51 of file actuators_dualpwm_arch.h.

Function Documentation

◆ actuators_dualpwm_commit()

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.

◆ clear_timer_flag()

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().

+ Here is the caller graph for this function:

◆ 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().

+ Here is the call graph for this function:

◆ set_dual_pwm_timer_s_oc()

void set_dual_pwm_timer_s_oc ( uint32_t  oc_value,
uint32_t  oc_value2 
)

Definition at line 135 of file actuators_dualpwm_arch.c.

Referenced by dual_pwm_isr().

+ Here is the caller graph for this function:

◆ set_dual_pwm_timer_s_period()

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().

+ Here is the caller graph for this function:

Variable Documentation

◆ actuators_dualpwm_values

uint32_t actuators_dualpwm_values[ACTUATORS_DUALPWM_NB]

Definition at line 42 of file actuators_dualpwm_arch.c.

Referenced by dual_pwm_isr().