Paparazzi UAS  v5.18.0_stable
Paparazzi is a free software Unmanned Aircraft System.
ppm.h File Reference
#include "std.h"
#include "generated/airframe.h"
#include "subsystems/radio_control/ppm_arch.h"
#include "generated/radio.h"
+ Include dependency graph for ppm.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define RADIO_CONTROL_NB_CHANNEL   RADIO_CTL_NB
 Generated code holding the description of a given transmitter. More...
 
#define PPM_PULSE_TYPE_POSITIVE   0
 ppm pulse type : futaba is falling edge clocked whereas JR is rising edge More...
 
#define PPM_PULSE_TYPE_NEGATIVE   1
 
#define RadioControlEvent(_received_frame_handler)   radio_control_impl_event(_received_frame_handler)
 

Functions

void ppm_arch_init (void)
 Architecture dependant code. More...
 
void radio_control_impl_event (void(*_received_frame_handler)(void))
 RC event function with handler callback. More...
 
void ppm_decode_frame (uint32_t ppm_time)
 Decode a PPM frame from global timer value. More...
 
void ppm_decode_frame_width (uint32_t ppm_width)
 Decode a PPM frame from last width. More...
 

Variables

uint16_t ppm_pulses [RADIO_CTL_NB]
 
volatile bool ppm_frame_available
 

Macro Definition Documentation

◆ PPM_PULSE_TYPE_NEGATIVE

#define PPM_PULSE_TYPE_NEGATIVE   1

Definition at line 58 of file ppm.h.

◆ PPM_PULSE_TYPE_POSITIVE

#define PPM_PULSE_TYPE_POSITIVE   0

ppm pulse type : futaba is falling edge clocked whereas JR is rising edge

Definition at line 57 of file ppm.h.

◆ RADIO_CONTROL_NB_CHANNEL

#define RADIO_CONTROL_NB_CHANNEL   RADIO_CTL_NB

Generated code holding the description of a given transmitter.

Default number of channels to actually use.

Definition at line 47 of file ppm.h.

◆ RadioControlEvent

#define RadioControlEvent (   _received_frame_handler)    radio_control_impl_event(_received_frame_handler)

Definition at line 69 of file ppm.h.

Function Documentation

◆ ppm_arch_init()

void ppm_arch_init ( void  )

◆ ppm_decode_frame()

void ppm_decode_frame ( uint32_t  ppm_time)

Decode a PPM frame from global timer value.

A valid ppm frame:

  • synchro blank
  • correct number of channels
  • synchro blank

Definition at line 99 of file ppm.c.

References ppm_decode_frame_width(), and ppm_last_pulse_time.

+ Here is the call graph for this function:

◆ ppm_decode_frame_width()

void ppm_decode_frame_width ( uint32_t  ppm_width)

Decode a PPM frame from last width.

A valid ppm frame:

  • synchro blank
  • correct number of channels
  • synchro blank

Definition at line 114 of file ppm.c.

References ppm_cur_pulse, ppm_data_valid, ppm_frame_available, ppm_pulses, RC_PPM_TICKS_OF_USEC, and RssiValid.

Referenced by icuperiodcb(), and ppm_decode_frame().

+ Here is the caller graph for this function:

◆ radio_control_impl_event()

void radio_control_impl_event ( void(*)(void)  _received_frame_handler)

RC event function with handler callback.

PPM frames are normalized using the IIR filter.

Definition at line 61 of file cc2500_paparazzi.c.

Variable Documentation

◆ ppm_frame_available

volatile bool ppm_frame_available

◆ ppm_pulses

uint16_t ppm_pulses[RADIO_CTL_NB]