|
NinjaFlight
|
#include <stdbool.h>#include <stdint.h>#include <stdlib.h>#include <platform.h>#include "target.h"#include "gpio.h"#include "timer.h"#include "system.h"#include "pwm_mapping.h"#include "pwm_output.h"#include "common/maths.h"
Data Structures | |
| struct | pwmOutputPort_t |
Macros | |
| #define | MAX_PWM_OUTPUT_PORTS MAX(MAX_MOTORS, MAX_SERVOS) |
Typedefs | |
| typedef void(* | pwmWriteFuncPtr )(uint8_t index, uint16_t value) |
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) |
| void | pwmWriteMotor (uint8_t index, uint16_t value) |
| void | pwmShutdownPulsesForAllMotors (uint8_t motorCount) |
| void | pwmWriteAllMotors (uint8_t motorCount, uint16_t mc, bool oneshot) |
| void | pwmStopMotors (bool oneshot) |
| void | pwmDisableMotors (void) |
| void | pwmEnableMotors (void) |
| void | pwmCompleteOneshotMotorUpdate (uint8_t motorCount) |
| bool | isMotorBrushed (uint16_t motorPwmRate) |
| #define MAX_PWM_OUTPUT_PORTS MAX(MAX_MOTORS, MAX_SERVOS) |
| typedef void(* pwmWriteFuncPtr)(uint8_t index, uint16_t value) |
| bool isMotorBrushed | ( | uint16_t | motorPwmRate | ) |
| 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 pwmCompleteOneshotMotorUpdate | ( | uint8_t | motorCount | ) |

| void pwmDisableMotors | ( | void | ) |
| void pwmEnableMotors | ( | void | ) |
| void pwmOneshotMotorConfig | ( | const timerHardware_t * | timerHardware, |
| uint8_t | motorIndex | ||
| ) |
| void pwmServoConfig | ( | const timerHardware_t * | timerHardware, |
| uint8_t | servoIndex, | ||
| uint16_t | servoPwmRate, | ||
| uint16_t | servoCenterPulse | ||
| ) |
| void pwmShutdownPulsesForAllMotors | ( | uint8_t | motorCount | ) |
| void pwmStopMotors | ( | bool | oneshot | ) |

| void pwmWriteAllMotors | ( | uint8_t | motorCount, |
| uint16_t | mc, | ||
| bool | oneshot | ||
| ) |

| void pwmWriteMotor | ( | uint8_t | index, |
| uint16_t | value | ||
| ) |