29 #include "subsystems/actuators/actuators_pwm_arch.h"
32 #include <libopencm3/stm32/gpio.h>
33 #include <libopencm3/stm32/rcc.h>
34 #include <libopencm3/stm32/timer.h>
36 #include "mcu_periph/gpio_arch.h"
50 rcc_periph_clock_enable(RCC_TIM1);
53 rcc_periph_clock_enable(RCC_TIM2);
56 rcc_periph_clock_enable(RCC_TIM3);
59 rcc_periph_clock_enable(RCC_TIM4);
62 rcc_periph_clock_enable(RCC_TIM5);
65 rcc_periph_clock_enable(RCC_TIM8);
68 rcc_periph_clock_enable(RCC_TIM9);
71 rcc_periph_clock_enable(RCC_TIM12);
#define PWM_TIM9_CHAN_MASK
void set_servo_timer(uint32_t timer, uint32_t freq, uint8_t channels_mask)
Set Timer configuration.
void actuators_pwm_arch_init(void)
Arch dependent init file.
#define PWM_SERVO_8_TIMER
#define PWM_SERVO_4_TIMER
#define PWM_SERVO_0_TIMER
#define PWM_SERVO_2_TIMER
#define PWM_SERVO_7_TIMER
#define PWM_SERVO_1_TIMER
#define PWM_SERVO_5_TIMER
#define PWM_TIM4_CHAN_MASK
#define PWM_TIM5_CHAN_MASK
#define PWM_TIM1_CHAN_MASK
#define PWM_TIM2_CHAN_MASK
#define PWM_TIM12_CHAN_MASK
STM32 PWM and dualPWM servos shared functions.
void gpio_setup_pin_af(ioportid_t port, uint16_t pin, uint8_t af)
Setup a gpio for input or output with alternate function.
#define PWM_SERVO_6_TIMER
#define PWM_TIM8_CHAN_MASK
void actuators_pwm_commit(void)
#define PWM_SERVO_10_GPIO
#define PWM_SERVO_10_TIMER
#define PWM_SERVO_9_TIMER
#define PWM_TIM3_CHAN_MASK
#define PWM_SERVO_3_TIMER
int32_t actuators_pwm_values[ACTUATORS_PWM_NB]