Paparazzi UAS  v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
pwm_input.c File Reference

arch independent PWM input capture API More...

#include "std.h"
#include "mcu_periph/pwm_input.h"
+ Include dependency graph for pwm_input.c:

Go to the source code of this file.

Functions

uint32_t get_pwm_input_duty_in_usec (uint32_t channel)
 
uint32_t get_pwm_input_period_in_usec (uint32_t channel)
 

Variables

static const uint32_t pwm_input_ticks_per_usec []
 
volatile uint32_t pwm_input_duty_tics [PWM_INPUT_NB]
 
volatile uint8_t pwm_input_duty_valid [PWM_INPUT_NB]
 
volatile uint32_t pwm_input_period_tics [PWM_INPUT_NB]
 
volatile uint8_t pwm_input_period_valid [PWM_INPUT_NB]
 

Detailed Description

arch independent PWM input capture API

Definition in file pwm_input.c.

Function Documentation

◆ get_pwm_input_duty_in_usec()

uint32_t get_pwm_input_duty_in_usec ( uint32_t  channel)

Definition at line 39 of file pwm_input.c.

References pwm_input_duty_tics, and pwm_input_ticks_per_usec.

Referenced by aoa_pwm_update(), and sonar_pwm_read().

+ Here is the caller graph for this function:

◆ get_pwm_input_period_in_usec()

uint32_t get_pwm_input_period_in_usec ( uint32_t  channel)

Definition at line 44 of file pwm_input.c.

References pwm_input_period_tics, and pwm_input_ticks_per_usec.

Referenced by mf_ptu_periodic(), and rpm_sensor_get_rpm().

+ Here is the caller graph for this function:

Variable Documentation

◆ pwm_input_duty_tics

volatile uint32_t pwm_input_duty_tics[PWM_INPUT_NB]

Definition at line 34 of file pwm_input.c.

Referenced by get_pwm_input_duty_in_usec(), pwm_input_init(), and xtend_rssi_periodic().

◆ pwm_input_duty_valid

volatile uint8_t pwm_input_duty_valid[PWM_INPUT_NB]

Definition at line 35 of file pwm_input.c.

Referenced by pwm_input_init(), and xtend_rssi_periodic().

◆ pwm_input_period_tics

volatile uint32_t pwm_input_period_tics[PWM_INPUT_NB]

Definition at line 36 of file pwm_input.c.

Referenced by get_pwm_input_period_in_usec(), meteo_stick_periodic(), and pwm_input_init().

◆ pwm_input_period_valid

volatile uint8_t pwm_input_period_valid[PWM_INPUT_NB]

Definition at line 37 of file pwm_input.c.

Referenced by pwm_input_init().

◆ pwm_input_ticks_per_usec

const uint32_t pwm_input_ticks_per_usec[]
static
Initial value:
= {
}
#define PWM_INPUT2_TICKS_PER_USEC
#define PWM_INPUT1_TICKS_PER_USEC
The default pwm counter is set-up to have 1/6 us resolution.

Definition at line 29 of file pwm_input.c.

Referenced by get_pwm_input_duty_in_usec(), and get_pwm_input_period_in_usec().