APM:Libraries
Macros | Functions | Variables
pwm_in.c File Reference
#include "pwm_in.h"
#include <stdbool.h>
#include "hal_types.h"
#include "timer.h"
#include <systick.h>
#include "gpio_hal.h"
#include <boards.h>
#include "ring_buffer_pulse.h"
Include dependency graph for pwm_in.c:

Go to the source code of this file.

Macros

#define PPM_CHANNELS   2
 

Functions

static void pwmIRQHandler (uint32_t v)
 
static void pwmInitializeInput (uint8_t ppmsum)
 
void pwmInit (bool ppmsum)
 
bool getPPM_Pulse (Pulse *p, uint8_t ch)
 
uint16_t getPPM_count (uint8_t ch)
 

Variables

const struct TIM_Channel PWM_Channels []
 
struct PPM_State PPM_Inputs [PPM_CHANNELSIN_CCM
 
static uint16_t num_ppm_channels = 1
 

Macro Definition Documentation

◆ PPM_CHANNELS

#define PPM_CHANNELS   2

Function Documentation

◆ getPPM_count()

uint16_t getPPM_count ( uint8_t  ch)

Definition at line 193 of file pwm_in.c.

Referenced by F4Light::PPM_parser::parse_pulses().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getPPM_Pulse()

bool getPPM_Pulse ( Pulse p,
uint8_t  ch 
)

Definition at line 183 of file pwm_in.c.

Referenced by F4Light::PPM_parser::parse_pulses().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ pwmInit()

void pwmInit ( bool  ppmsum)

Definition at line 165 of file pwm_in.c.

Referenced by F4Light::RCInput::init().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ pwmInitializeInput()

static void pwmInitializeInput ( uint8_t  ppmsum)
inlinestatic

Definition at line 125 of file pwm_in.c.

Referenced by pwmInit().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ pwmIRQHandler()

static void pwmIRQHandler ( uint32_t  v)
static

Definition at line 62 of file pwm_in.c.

Referenced by pwmInitializeInput().

Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ IN_CCM

Definition at line 58 of file pwm_in.c.

◆ num_ppm_channels

uint16_t num_ppm_channels = 1
static

Definition at line 59 of file pwm_in.c.

Referenced by pwmInit(), pwmInitializeInput(), and pwmIRQHandler().

◆ PWM_Channels

const struct TIM_Channel PWM_Channels[]