Open FFBoard
Open source force feedback firmware
MotorPWM.cpp File Reference

Go to the source code of this file.

Functions

void pwmInitTimer (TIM_HandleTypeDef *timer, uint32_t channel, uint32_t period, uint32_t prescaler)
 
void setPWM_HAL (uint32_t value, TIM_HandleTypeDef *timer, uint32_t channel, uint32_t period)
 

Variables

const std::vector< std::string > RC_SpeedNames = {"20ms","15ms","10ms","5ms"}
 
const std::vector< std::string > PWM_SpeedNames = {"3khz","9khz","17khz","24khz"}
 
const std::vector< std::string > PwmModeNames = {"RC PPM","0%-50%-100% Centered","0-100% PWM/DIR","0-100% dual PWM"}
 
cpp_freertos::MutexStandard pwmTimMutex
 

Function Documentation

◆ pwmInitTimer()

void pwmInitTimer ( TIM_HandleTypeDef *  timer,
uint32_t  channel,
uint32_t  period,
uint32_t  prescaler 
)

Definition at line 297 of file MotorPWM.cpp.

◆ setPWM_HAL()

void setPWM_HAL ( uint32_t  value,
TIM_HandleTypeDef *  timer,
uint32_t  channel,
uint32_t  period 
)

Changes the pwm value of the timer via HAL

Definition at line 321 of file MotorPWM.cpp.

Variable Documentation

◆ PWM_SpeedNames

const std::vector<std::string> PWM_SpeedNames = {"3khz","9khz","17khz","24khz"}

Definition at line 17 of file MotorPWM.cpp.

◆ PwmModeNames

const std::vector<std::string> PwmModeNames = {"RC PPM","0%-50%-100% Centered","0-100% PWM/DIR","0-100% dual PWM"}

Definition at line 19 of file MotorPWM.cpp.

◆ pwmTimMutex

Definition at line 296 of file MotorPWM.cpp.

◆ RC_SpeedNames

const std::vector<std::string> RC_SpeedNames = {"20ms","15ms","10ms","5ms"}

Definition at line 16 of file MotorPWM.cpp.