Paparazzi UAS  v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
actuators_shared_arch.c File Reference

STM32 PWM and dualPWM servos shared functions. More...

#include "arch/stm32/modules/actuators/actuators_shared_arch.h"
#include <libopencm3/stm32/timer.h>
#include "arch/stm32/mcu_arch.h"
+ Include dependency graph for actuators_shared_arch.c:

Go to the source code of this file.

Functions

void actuators_pwm_arch_channel_init (uint32_t timer_peripheral, enum tim_oc_id oc_id)
 Set PWM channel configuration. More...
 
void set_servo_timer (uint32_t timer, uint32_t freq, uint8_t channels_mask)
 Set Timer configuration. More...
 

Detailed Description

STM32 PWM and dualPWM servos shared functions.

Definition in file actuators_shared_arch.c.

Function Documentation

◆ actuators_pwm_arch_channel_init()

void actuators_pwm_arch_channel_init ( uint32_t  timer_peripheral,
enum tim_oc_id  oc_id 
)

Set PWM channel configuration.

Definition at line 35 of file actuators_shared_arch.c.

Referenced by set_servo_timer().

+ Here is the caller graph for this function:

◆ set_servo_timer()

void set_servo_timer ( uint32_t  timer,
uint32_t  freq,
uint8_t  channels_mask 
)

Set Timer configuration.

Parameters
[in]timerTimer register address base
[in]freqPWM frequency in Hz (1 / auto-reload period)
[in]channels_maskoutput compare channels to enable

Definition at line 59 of file actuators_shared_arch.c.

References actuators_pwm_arch_channel_init(), PWM_BASE_FREQ, and timer_get_frequency().

Referenced by actuators_dualpwm_arch_init(), and actuators_pwm_arch_init().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: