Paparazzi UAS
v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
|
#include "std.h"
#include "generated/airframe.h"
#include "modules/radio_control/ppm_arch.h"
#include "generated/radio.h"
Go to the source code of this file.
Macros | |
#define | PPM_PULSE_TYPE_POSITIVE 0 |
Generated code holding the description of a given transmitter. More... | |
#define | PPM_PULSE_TYPE_NEGATIVE 1 |
Functions | |
void | ppm_arch_init (void) |
Architecture dependant code. More... | |
void | ppm_init (void) |
RC init function. More... | |
void | ppm_event (void) |
RC event function. 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 |
#define PPM_PULSE_TYPE_POSITIVE 0 |
void ppm_arch_init | ( | void | ) |
Architecture dependant code.
Definition at line 90 of file ppm_arch.c.
References FALSE, gpio_setup_pin_af(), ONE_MHZ_CLK, PPM_CC_IE, PPM_CHANNEL, ppm_cur_pulse, PPM_GPIO_AF, PPM_GPIO_PIN, PPM_GPIO_PORT, ppm_icucfg, PPM_IRQ, PPM_IRQ2, PPM_IRQ_PRIO, ppm_last_pulse_time, PPM_TIMER, PPM_TIMER_INPUT, RADIO_CONTROL_NB_CHANNEL, RC_PPM_TICKS_PER_USEC, timer_get_frequency(), and timer_rollover_cnt.
Referenced by ppm_init().
void ppm_decode_frame | ( | uint32_t | ppm_time | ) |
Decode a PPM frame from global timer value.
A valid ppm frame:
Definition at line 105 of file ppm.c.
References ppm_decode_frame_width(), and ppm_last_pulse_time.
void ppm_decode_frame_width | ( | uint32_t | ppm_width | ) |
Decode a PPM frame from last width.
A valid ppm frame:
Definition at line 120 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().
void ppm_event | ( | void | ) |
RC event function.
PPM frames are normalized using the IIR filter.
Definition at line 86 of file ppm.c.
References RadioControl::frame_cpt, ppm_frame_available, ppm_pulses, radio_control, RADIO_CONTROL_PPM_ID, RadioControl::radio_ok_cpt, RC_OK, RadioControl::status, and RadioControl::time_since_last_frame.
void ppm_init | ( | void | ) |
RC init function.
Definition at line 71 of file ppm.c.
References DefaultPeriodic, RadioControl::nb_channel, ppm_arch_init(), ppm_cur_pulse, ppm_data_valid, ppm_frame_available, ppm_last_pulse_time, radio_control, register_periodic_telemetry(), and send_ppm().
|
extern |
Definition at line 37 of file ppm.c.
Referenced by ppm_decode_frame_width(), ppm_event(), ppm_init(), and radio_control_feed().
|
extern |
Definition at line 36 of file ppm.c.
Referenced by ppm_decode_frame_width(), ppm_event(), radio_control_feed(), and send_ppm().