Paparazzi UAS  v4.0.4_stable-3-gf39211a
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
ppm.h File Reference
#include "std.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)
 Event macro with handler callback PPM frame are normalize using the IIR filter. More...
 
#define DecodePpmFrame(_ppm_time)
 A valid ppm frame: More...
 

Functions

void ppm_arch_init (void)
 Architecture dependant code. More...
 

Variables

uint16_t ppm_pulses [RADIO_CONTROL_NB_CHANNEL]
 
volatile bool_t ppm_frame_available
 
uint8_t ppm_cur_pulse
 State machine for decoding ppm frames. More...
 
uint32_t ppm_last_pulse_time
 
bool_t ppm_data_valid
 

Macro Definition Documentation

#define DecodePpmFrame (   _ppm_time)

A valid ppm frame:

  • synchro blank
  • correct number of channels
  • synchro blank

Definition at line 89 of file ppm.h.

Referenced by tim2_irq_handler().

#define PPM_PULSE_TYPE_NEGATIVE   1

Definition at line 52 of file ppm.h.

#define PPM_PULSE_TYPE_POSITIVE   0

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

Definition at line 51 of file ppm.h.

#define RADIO_CONTROL_NB_CHANNEL   RADIO_CTL_NB

Generated code holding the description of a given transmitter.

Define number of channels Using generated code radio.h

Definition at line 46 of file ppm.h.

#define RadioControlEvent (   _received_frame_handler)
Value:
{ \
radio_control.frame_cpt++; \
radio_control.time_since_last_frame = 0; \
if (radio_control.radio_ok_cpt > 0) { \
radio_control.radio_ok_cpt--; \
} else { \
radio_control.status = RC_OK; \
NormalizePpmIIR(ppm_pulses,radio_control); \
_received_frame_handler(); \
} \
} \
}
#define FALSE
Definition: imu_chimu.h:141
uint16_t ppm_pulses[RADIO_CONTROL_NB_CHANNEL]
Definition: ppm.c:27
struct RadioControl radio_control
Definition: radio_control.c:27
volatile bool_t ppm_frame_available
Definition: ppm.c:28

Event macro with handler callback PPM frame are normalize using the IIR filter.

Definition at line 61 of file ppm.h.

Function Documentation

void ppm_arch_init ( void  )

Architecture dependant code.

Definition at line 31 of file ppm_arch.c.

References FALSE, PPM_CCR_CRF, PPM_CCR_CRI, PPM_CCR_CRR, ppm_cur_pulse, ppm_data_valid, ppm_frame_available, ppm_last_pulse_time, PPM_PINSEL, PPM_PINSEL_BIT, PPM_PINSEL_VAL, RADIO_CONTROL_NB_CHANNEL, T0CCR, and timer_rollover_cnt.

Referenced by radio_control_impl_init().

+ Here is the caller graph for this function:

Variable Documentation

uint8_t ppm_cur_pulse

State machine for decoding ppm frames.

Definition at line 27 of file ppm_arch.c.

Referenced by ppm_arch_init().

bool_t ppm_data_valid

Definition at line 29 of file ppm_arch.c.

Referenced by ppm_arch_init().

volatile bool_t ppm_frame_available

Definition at line 28 of file ppm.c.

Referenced by ppm_arch_init(), and radio_control_impl_init().

uint32_t ppm_last_pulse_time

Definition at line 28 of file ppm_arch.c.

Referenced by ppm_arch_init().

Definition at line 27 of file ppm.c.