Paparazzi UAS
v5.14.0_stable-0-g3f680d1
Paparazzi is a free software Unmanned Aircraft System.
|
handling of smt32 PWM input using a timer with capture. More...
#include "mcu_periph/pwm_input.h"
#include <BOARD_CONFIG>
#include "generated/airframe.h"
#include <libopencm3/stm32/rcc.h>
#include <libopencm3/stm32/gpio.h>
#include <libopencm3/stm32/timer.h>
#include <libopencm3/cm3/nvic.h>
#include "mcu_periph/sys_time.h"
#include "mcu_periph/gpio.h"
#include "mcu_arch.h"
Go to the source code of this file.
Macros | |
#define | ONE_MHZ_CLK 1000000 |
#define | PWM_INPUT_IRQ_PRIO 2 |
Functions | |
static void | pwm_input_set_timer (uint32_t tim, uint32_t ticks_per_usec) |
void | pwm_input_init (void) |
handling of smt32 PWM input using a timer with capture.
Definition in file pwm_input_arch.c.
#define ONE_MHZ_CLK 1000000 |
Definition at line 44 of file pwm_input_arch.c.
Referenced by pwm_input_set_timer().
#define PWM_INPUT_IRQ_PRIO 2 |
Definition at line 48 of file pwm_input_arch.c.
Referenced by pwm_input_init().
void pwm_input_init | ( | void | ) |
Configure timers
Definition at line 61 of file pwm_input_arch.c.
References FALSE, gpio_setup_pin_af(), PWM_INPUT1_CC_IE, PWM_INPUT1_CHANNEL_DUTY, PWM_INPUT1_CHANNEL_PERIOD, PWM_INPUT1_GPIO_AF, PWM_INPUT1_GPIO_PIN, PWM_INPUT1_GPIO_PORT, PWM_INPUT1_IRQ, PWM_INPUT1_IRQ2, PWM_INPUT1_SLAVE_TRIG, PWM_INPUT1_TIMER, PWM_INPUT1_TIMER_INPUT, PWM_INPUT2_CC_IE, PWM_INPUT2_CHANNEL_DUTY, PWM_INPUT2_CHANNEL_PERIOD, PWM_INPUT2_GPIO_AF, PWM_INPUT2_GPIO_PIN, PWM_INPUT2_GPIO_PORT, PWM_INPUT2_IRQ, PWM_INPUT2_SLAVE_TRIG, PWM_INPUT2_TIMER, PWM_INPUT2_TIMER_INPUT, pwm_input_duty_tics, pwm_input_duty_valid, PWM_INPUT_IRQ_PRIO, PWM_INPUT_NB, pwm_input_period_tics, pwm_input_period_valid, and pwm_input_set_timer().
Definition at line 51 of file pwm_input_arch.c.
References ONE_MHZ_CLK, and timer_get_frequency().
Referenced by pwm_input_init().