Paparazzi UAS  v5.2.2_stable-0-gd6b9f29
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
actuators_pwm_arch.c File Reference

STM32 PWM servos handling. More...

#include "subsystems/actuators/actuators_shared_arch.h"
#include "subsystems/actuators/actuators_pwm_arch.h"
#include "subsystems/actuators/actuators_pwm.h"
#include <libopencm3/stm32/gpio.h>
#include <libopencm3/stm32/rcc.h>
#include <libopencm3/stm32/timer.h>
#include "mcu_periph/gpio_arch.h"
+ Include dependency graph for actuators_pwm_arch.c:

Go to the source code of this file.

Functions

void actuators_pwm_arch_init (void)
 PWM arch init called by generic pwm driver. More...
 
void actuators_pwm_commit (void)
 Set pulse widths from actuator values, assumed to be in us. More...
 

Variables

int32_t actuators_pwm_values [ACTUATORS_PWM_NB]
 

Detailed Description

STM32 PWM servos handling.

Definition in file actuators_pwm_arch.c.

Function Documentation

void actuators_pwm_arch_init ( void  )

PWM arch init called by generic pwm driver.

Arch dependent init file.

Definition at line 44 of file actuators_pwm_arch.c.

References gpio_setup_pin_af(), PWM_SERVO_0_AF, PWM_SERVO_0_GPIO, PWM_SERVO_0_PIN, PWM_SERVO_1_AF, PWM_SERVO_1_ENA, PWM_SERVO_1_GPIO, PWM_SERVO_1_PIN, PWM_SERVO_1_PINSEL, PWM_SERVO_1_PINSEL_BIT, PWM_SERVO_1_PINSEL_MASK, PWM_SERVO_1_PINSEL_VAL, PWM_SERVO_2_AF, PWM_SERVO_2_ENA, PWM_SERVO_2_GPIO, PWM_SERVO_2_PIN, PWM_SERVO_2_PINSEL, PWM_SERVO_2_PINSEL_BIT, PWM_SERVO_2_PINSEL_MASK, PWM_SERVO_2_PINSEL_VAL, PWM_SERVO_3_AF, PWM_SERVO_3_ENA, PWM_SERVO_3_GPIO, PWM_SERVO_3_PIN, PWM_SERVO_3_PINSEL, PWM_SERVO_3_PINSEL_BIT, PWM_SERVO_3_PINSEL_MASK, PWM_SERVO_3_PINSEL_VAL, PWM_SERVO_4_AF, PWM_SERVO_4_ENA, PWM_SERVO_4_GPIO, PWM_SERVO_4_PIN, PWM_SERVO_4_PINSEL, PWM_SERVO_4_PINSEL_BIT, PWM_SERVO_4_PINSEL_MASK, PWM_SERVO_4_PINSEL_VAL, PWM_SERVO_5_AF, PWM_SERVO_5_ENA, PWM_SERVO_5_GPIO, PWM_SERVO_5_PIN, PWM_SERVO_5_PINSEL, PWM_SERVO_5_PINSEL_BIT, PWM_SERVO_5_PINSEL_MASK, PWM_SERVO_5_PINSEL_VAL, PWM_SERVO_6_AF, PWM_SERVO_6_GPIO, PWM_SERVO_6_PIN, PWM_SERVO_7_AF, PWM_SERVO_7_GPIO, PWM_SERVO_7_PIN, PWM_SERVO_8_AF, PWM_SERVO_8_GPIO, PWM_SERVO_8_PIN, PWM_SERVO_9_AF, PWM_SERVO_9_GPIO, PWM_SERVO_9_PIN, PWM_TIM12_CHAN_MASK, PWM_TIM1_CHAN_MASK, PWM_TIM2_CHAN_MASK, PWM_TIM3_CHAN_MASK, PWM_TIM4_CHAN_MASK, PWM_TIM5_CHAN_MASK, PWM_TIM8_CHAN_MASK, PWM_TIM9_CHAN_MASK, PWMLER, PWMLER_LATCH0, PWMMR0, PWMPCR, PWMPR, PWMTCR, PWMTCR_COUNTER_ENABLE, PWMTCR_PWM_ENABLE, SERVOS_PERIOD, set_servo_timer(), TIM12_SERVO_HZ, TIM1_SERVO_HZ, TIM2_SERVO_HZ, TIM3_SERVO_HZ, TIM4_SERVO_HZ, TIM5_SERVO_HZ, TIM8_SERVO_HZ, TIM9_SERVO_HZ, and TRUE.

+ Here is the call graph for this function:

Variable Documentation

int32_t actuators_pwm_values[ACTUATORS_PWM_NB]

Definition at line 39 of file actuators_pwm_arch.c.

Referenced by actuators_ardrone_commit(), and actuators_pwm_commit().