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

PPM interface between ChibiOS and Paparazzi. More...

+ Include dependency graph for ppm_arch.c:

Go to the source code of this file.

Functions

static void icuperiodcb (ICUDriver *icup)
 PPM Pulse period callback. More...
 
static void icuoverflowcb (ICUDriver *icup)
 PPM Overflow callback. More...
 
void ppm_arch_init (void)
 Architecture dependant code. More...
 

Variables

uint8_t ppm_cur_pulse
 
uint32_t ppm_last_pulse_time
 
bool ppm_data_valid
 
static uint32_t timer_rollover_cnt
 
static ICUConfig ppm_icucfg
 ICU timer configuration. More...
 

Detailed Description

PPM interface between ChibiOS and Paparazzi.

Input capture configuration has to be defined in board.h

Definition in file ppm_arch.c.

Function Documentation

◆ icuoverflowcb()

static void icuoverflowcb ( ICUDriver *  icup)
static

PPM Overflow callback.

Definition at line 60 of file ppm_arch.c.

◆ icuperiodcb()

static void icuperiodcb ( ICUDriver *  icup)
static

PPM Pulse period callback.

Definition at line 52 of file ppm_arch.c.

References ppm_decode_frame_width().

+ Here is the call graph for this function:

◆ ppm_arch_init()

void ppm_arch_init ( void  )

Architecture dependant code.

Definition at line 90 of file ppm_arch.c.

References ppm_cur_pulse, ppm_icucfg, ppm_last_pulse_time, PPM_TIMER, RADIO_CONTROL_NB_CHANNEL, and timer_rollover_cnt.

Referenced by ppm_init().

+ Here is the caller graph for this function:

Variable Documentation

◆ ppm_cur_pulse

uint8_t ppm_cur_pulse

Definition at line 35 of file ppm_arch.c.

Referenced by ppm_arch_init().

◆ ppm_data_valid

bool ppm_data_valid

Definition at line 37 of file ppm_arch.c.

◆ ppm_icucfg

ICUConfig ppm_icucfg
static
Initial value:
= {
NULL,
0,
0xFFFFFFFFU
}
#define PPM_TIMER_FREQUENCY
Definition: board.h:387
#define PPM_CHANNEL
Definition: board.h:388
static void icuoverflowcb(ICUDriver *icup)
PPM Overflow callback.
Definition: ppm_arch.c:60
static void icuperiodcb(ICUDriver *icup)
PPM Pulse period callback.
Definition: ppm_arch.c:52

ICU timer configuration.

There appears to be no difference between ICU_INPUT_ACTIVE_HIGH and ICU_INPUT_ACTIVE_LOW, it works in both cases. Further investigation needed.

Definition at line 73 of file ppm_arch.c.

Referenced by ppm_arch_init().

◆ ppm_last_pulse_time

uint32_t ppm_last_pulse_time

Definition at line 36 of file ppm_arch.c.

Referenced by ppm_arch_init().

◆ timer_rollover_cnt

uint32_t timer_rollover_cnt
static

Definition at line 38 of file ppm_arch.c.

Referenced by ppm_arch_init().