NinjaFlight
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
pwm_mapping.c File Reference
#include <stdbool.h>
#include <stdint.h>
#include <string.h>
#include <stdlib.h>
#include <platform.h>
#include "gpio.h"
#include "timer.h"
#include "drivers/bus_i2c.h"
#include "pwm_output.h"
#include "pwm_rx.h"
#include "pwm_mapping.h"
#include "serial_uart.h"
Include dependency graph for pwm_mapping.c:

Enumerations

enum  { MAP_TO_PPM_INPUT = 1, MAP_TO_PWM_INPUT, MAP_TO_MOTOR_OUTPUT, MAP_TO_SERVO_OUTPUT }
 

Functions

void pwmBrushedMotorConfig (const timerHardware_t *timerHardware, uint8_t motorIndex, uint16_t motorPwmRate, uint16_t idlePulse)
 
void pwmBrushlessMotorConfig (const timerHardware_t *timerHardware, uint8_t motorIndex, uint16_t motorPwmRate, uint16_t idlePulse)
 
void pwmOneshotMotorConfig (const timerHardware_t *timerHardware, uint8_t motorIndex)
 
void pwmServoConfig (const timerHardware_t *timerHardware, uint8_t servoIndex, uint16_t servoPwmRate, uint16_t servoCenterPulse)
 
pwmIOConfiguration_tpwmGetOutputConfiguration (void)
 
void ppmAvoidPWMTimerClash (const timerHardware_t *timerHardwarePtr, TIM_TypeDef *sharedPwmTimer)
 
pwmIOConfiguration_tpwmInit (drv_pwm_config_t *init, const struct pwm_input_config *config)
 

Variables

bool pwmUseInputFiltering = false
 

Enumeration Type Documentation

anonymous enum
Enumerator
MAP_TO_PPM_INPUT 
MAP_TO_PWM_INPUT 
MAP_TO_MOTOR_OUTPUT 
MAP_TO_SERVO_OUTPUT 

Function Documentation

void ppmAvoidPWMTimerClash ( const timerHardware_t timerHardwarePtr,
TIM_TypeDef sharedPwmTimer 
)
void pwmBrushedMotorConfig ( const timerHardware_t timerHardware,
uint8_t  motorIndex,
uint16_t  motorPwmRate,
uint16_t  idlePulse 
)
void pwmBrushlessMotorConfig ( const timerHardware_t timerHardware,
uint8_t  motorIndex,
uint16_t  motorPwmRate,
uint16_t  idlePulse 
)
pwmIOConfiguration_t* pwmGetOutputConfiguration ( void  )
pwmIOConfiguration_t* pwmInit ( drv_pwm_config_t init,
const struct pwm_input_config config 
)

Here is the call graph for this function:

void pwmOneshotMotorConfig ( const timerHardware_t timerHardware,
uint8_t  motorIndex 
)
void pwmServoConfig ( const timerHardware_t timerHardware,
uint8_t  servoIndex,
uint16_t  servoPwmRate,
uint16_t  servoCenterPulse 
)

Variable Documentation

bool pwmUseInputFiltering = false