1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-17 13:25:30 +03:00

Fixed naming of function prototypes in 'pwm_output.h'.

This commit is contained in:
Michael Keller 2017-07-31 18:38:23 +08:00
parent 175dbc1123
commit a9da874d83
2 changed files with 7 additions and 7 deletions

View file

@ -28,12 +28,12 @@
#include "timer.h" #include "timer.h"
#include "drivers/pwm_output.h" #include "drivers/pwm_output.h"
static pwmWriteFunc *pwmWrite; static pwmWriteFn *pwmWrite;
static pwmOutputPort_t motors[MAX_SUPPORTED_MOTORS]; static pwmOutputPort_t motors[MAX_SUPPORTED_MOTORS];
static pwmCompleteWriteFunc *pwmCompleteWrite = NULL; static pwmCompleteWriteFn *pwmCompleteWrite = NULL;
#ifdef USE_DSHOT #ifdef USE_DSHOT
loadDmaBufferFunc *loadDmaBuffer; loadDmaBufferFn *loadDmaBuffer;
#endif #endif
#ifdef USE_SERVOS #ifdef USE_SERVOS

View file

@ -120,8 +120,8 @@ typedef struct {
motorDmaOutput_t *getMotorDmaOutput(uint8_t index); motorDmaOutput_t *getMotorDmaOutput(uint8_t index);
struct timerHardware_s; struct timerHardware_s;
typedef void pwmWriteFunc(uint8_t index, float value); // function pointer used to write motors typedef void pwmWriteFn(uint8_t index, float value); // function pointer used to write motors
typedef void pwmCompleteWriteFunc(uint8_t motorCount); // function pointer used after motors are written typedef void pwmCompleteWriteFn(uint8_t motorCount); // function pointer used after motors are written
typedef struct { typedef struct {
volatile timCCR_t *ccr; volatile timCCR_t *ccr;
@ -161,11 +161,11 @@ void pwmServoConfig(const struct timerHardware_s *timerHardware, uint8_t servoIn
bool isMotorProtocolDshot(void); bool isMotorProtocolDshot(void);
#ifdef USE_DSHOT #ifdef USE_DSHOT
typedef uint8_t loadDmaBufferFunc(motorDmaOutput_t *const motor, uint16_t packet); // function pointer used to encode a digital motor value into the DMA buffer representation typedef uint8_t loadDmaBufferFn(motorDmaOutput_t *const motor, uint16_t packet); // function pointer used to encode a digital motor value into the DMA buffer representation
uint16_t prepareDshotPacket(motorDmaOutput_t *const motor, uint16_t value); uint16_t prepareDshotPacket(motorDmaOutput_t *const motor, uint16_t value);
extern loadDmaBufferFunc *loadDmaBuffer; extern loadDmaBufferFn *loadDmaBuffer;
uint32_t getDshotHz(motorPwmProtocolTypes_e pwmProtocolType); uint32_t getDshotHz(motorPwmProtocolTypes_e pwmProtocolType);
void pwmWriteDshotCommand(uint8_t index, uint8_t command); void pwmWriteDshotCommand(uint8_t index, uint8_t command);