Paparazzi UAS
v5.15_devel-230-gc96ce27
Paparazzi is a free software Unmanned Aircraft System.
|
#include "std.h"
#include "generated/airframe.h"
#include "subsystems/radio_control/ppm_arch.h"
#include "generated/radio.h"
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 |
#define PPM_PULSE_TYPE_POSITIVE 0 |
#define RADIO_CONTROL_NB_CHANNEL RADIO_CTL_NB |
#define RadioControlEvent | ( | _received_frame_handler | ) | radio_control_impl_event(_received_frame_handler) |
void ppm_arch_init | ( | void | ) |
Architecture dependant code.
Definition at line 89 of file ppm_arch.c.
References FALSE, gpio_setup_pin_af(), ONE_MHZ_CLK, PPM_CC_IE, PPM_CCR_CRF, PPM_CCR_CRI, PPM_CCR_CRR, 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_PINSEL, PPM_PINSEL_BIT, PPM_PINSEL_VAL, PPM_TIMER, PPM_TIMER_INPUT, RADIO_CONTROL_NB_CHANNEL, RC_PPM_TICKS_PER_USEC, T0CCR, timer_get_frequency(), and timer_rollover_cnt.
Referenced by radio_control_impl_init().
void ppm_decode_frame | ( | uint32_t | ppm_time | ) |
Decode a PPM frame from global timer value.
A valid ppm frame:
Definition at line 99 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 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().
void radio_control_impl_event | ( | void(*)(void) | _received_frame_handler | ) |
volatile bool ppm_frame_available |
Definition at line 32 of file ppm.c.
Referenced by ppm_decode_frame_width(), radio_control_impl_event(), radio_control_impl_init(), and send_ppm().
uint16_t ppm_pulses[RADIO_CTL_NB] |
Definition at line 31 of file ppm.c.
Referenced by ppm_decode_frame_width(), radio_control_impl_event(), send_ppm(), and update_rc_channel().