26 #ifndef ACTUATORS_PWM_SHARED_ARCH_H
27 #define ACTUATORS_PWM_SHARED_ARCH_H
33 #include <libopencm3/stm32/gpio.h>
34 #include <libopencm3/stm32/rcc.h>
35 #include <libopencm3/stm32/timer.h>
36 #include <libopencm3/cm3/nvic.h>
39 #define ONE_MHZ_CLK 1000000
42 #if ! defined(PWM_BASE_FREQ)
43 #define PWM_BASE_FREQ ONE_MHZ_CLK
54 #define TIM1_SERVO_HZ SERVO_HZ
57 #define TIM2_SERVO_HZ SERVO_HZ
60 #define TIM3_SERVO_HZ SERVO_HZ
63 #define TIM4_SERVO_HZ SERVO_HZ
66 #define TIM5_SERVO_HZ SERVO_HZ
69 #define TIM8_SERVO_HZ SERVO_HZ
72 #define TIM9_SERVO_HZ SERVO_HZ
74 #ifndef TIM12_SERVO_HZ
75 #define TIM12_SERVO_HZ SERVO_HZ
void actuators_pwm_arch_channel_init(uint32_t timer_peripheral, enum tim_oc_id oc_id)
Set PWM channel configuration.
void set_servo_timer(uint32_t timer, uint32_t period, uint8_t channels_mask)
Set Timer configuration.
unsigned int uint32_t
Typedef defining 32 bit unsigned int type.
unsigned char uint8_t
Typedef defining 8 bit unsigned char type.