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

STM32 PWM servos handling. More...

#include "firmwares/rotorcraft/actuators/actuators_pwm.h"
#include <stm32/gpio.h>
#include <stm32/rcc.h>
#include <stm32/flash.h>
#include <stm32/misc.h>
#include <stm32/tim.h>
+ Include dependency graph for actuators_pwm_arch.c:

Go to the source code of this file.

Macros

#define PCLK   72000000
 
#define ONE_MHZ_CLK   1000000
 
#define SERVO_HZ   40
 
#define PWM_5AND6_TIMER   TIM4
 
#define PWM_5AND6_RCC   RCC_APB1Periph_TIM4
 
#define PWM_5AND6_GPIO   GPIOB
 
#define PWM5_OC   3
 
#define PWM6_OC   4
 
#define PWM5_Pin   GPIO_Pin_8
 
#define PWM6_Pin   GPIO_Pin_9
 
#define _TIM_OC_INIT(n)   TIM_OC##n##Init
 
#define TIM_OC_INIT(n)   _TIM_OC_INIT(n)
 
#define _TIM_OC_PRELOADCONFIG(n)   TIM_OC##n##PreloadConfig
 
#define TIM_OC_PRELOADCONFIG(n)   _TIM_OC_PRELOADCONFIG(n)
 
#define _TIM_SETCOMPARE(n)   TIM_SetCompare##n
 
#define TIM_SETCOMPARE(n)   _TIM_SETCOMPARE(n)
 

Functions

void actuators_pwm_arch_init (void)
 
void actuators_pwm_commit (void)
 

Detailed Description

STM32 PWM servos handling.

Definition in file actuators_pwm_arch.c.

Macro Definition Documentation

#define _TIM_OC_INIT (   n)    TIM_OC##n##Init

Definition at line 50 of file actuators_pwm_arch.c.

#define _TIM_OC_PRELOADCONFIG (   n)    TIM_OC##n##PreloadConfig

Definition at line 53 of file actuators_pwm_arch.c.

#define _TIM_SETCOMPARE (   n)    TIM_SetCompare##n

Definition at line 56 of file actuators_pwm_arch.c.

#define ONE_MHZ_CLK   1000000

Definition at line 35 of file actuators_pwm_arch.c.

Referenced by actuators_pwm_arch_init().

#define PCLK   72000000

Definition at line 34 of file actuators_pwm_arch.c.

Referenced by actuators_pwm_arch_init().

#define PWM5_OC   3

Definition at line 44 of file actuators_pwm_arch.c.

Referenced by actuators_pwm_arch_init(), and actuators_pwm_commit().

#define PWM5_Pin   GPIO_Pin_8

Definition at line 46 of file actuators_pwm_arch.c.

Referenced by actuators_pwm_arch_init().

#define PWM6_OC   4

Definition at line 45 of file actuators_pwm_arch.c.

Referenced by actuators_pwm_arch_init(), and actuators_pwm_commit().

#define PWM6_Pin   GPIO_Pin_9

Definition at line 47 of file actuators_pwm_arch.c.

Referenced by actuators_pwm_arch_init().

#define PWM_5AND6_GPIO   GPIOB

Definition at line 43 of file actuators_pwm_arch.c.

Referenced by actuators_pwm_arch_init().

#define PWM_5AND6_RCC   RCC_APB1Periph_TIM4

Definition at line 42 of file actuators_pwm_arch.c.

Referenced by actuators_pwm_arch_init().

#define PWM_5AND6_TIMER   TIM4

Definition at line 41 of file actuators_pwm_arch.c.

Referenced by actuators_pwm_arch_init(), and actuators_pwm_commit().

#define SERVO_HZ   40

Definition at line 37 of file actuators_pwm_arch.c.

Referenced by actuators_pwm_arch_init().

#define TIM_OC_INIT (   n)    _TIM_OC_INIT(n)

Definition at line 51 of file actuators_pwm_arch.c.

Referenced by actuators_pwm_arch_init().

#define TIM_OC_PRELOADCONFIG (   n)    _TIM_OC_PRELOADCONFIG(n)

Definition at line 54 of file actuators_pwm_arch.c.

Referenced by actuators_pwm_arch_init().

#define TIM_SETCOMPARE (   n)    _TIM_SETCOMPARE(n)

Definition at line 57 of file actuators_pwm_arch.c.

Referenced by actuators_pwm_commit().

Function Documentation

void actuators_pwm_arch_init ( void  )
void actuators_pwm_commit ( void  )