Data Structures | |
struct | _VSF_Obj_ |
Defines the VSF handle. More... | |
Macros | |
#define | VSF_NUM_DELTA 1 |
Defines the changing PWM frequency delta. More... | |
#define | VSF_NUM_WAIT_TIME 10 |
Defines the changing PWM frequency wait time. More... | |
#define | VSF_NUM_MAX_FREQ_HZ 25000 |
Defines the maximum PWM frequency. More... | |
#define | VSF_NUM_MIN_FREQ_HZ 5000 |
Defines the minimum PWM frequency. More... | |
Typedefs | |
typedef struct _VSF_Obj_ | VSF_Obj |
Defines the VSF handle. More... | |
typedef struct _VSF_Obj_ * | VSF_Handle |
Defines the online variable switching frequency (VSF) handle. More... | |
Enumerations | |
enum | VSF_State_e { VSF_STATE_IDLE = 0, VSF_STATE_CTRL_SET = 1, VSF_STATE_PERIOD_SET = 2, VSF_STATE_EST_SET = 3, VSF_STATE_ALL_DONE = 4 } |
Functions | |
VSF_Handle | VSF_init (void *pMemory, const size_t numBytes) |
Initializes the variable switching frequency module. More... | |
void | VSF_initParams (VSF_Handle vsfHandle, USER_Params *pUserParams) |
init the variable switching frequency parameters More... | |
void | VSF_computeFreqParams (VSF_Handle vsfHandle) |
calculates the variable switching frequency parameters More... | |
uint16_t | VSF_getFreq (VSF_Handle vsfHandle) |
Get the current switching frequency. More... | |
VSF_State_e | VSF_getState (VSF_Handle vsfHandle) |
Set the variable switching frequency state. More... | |
void | VSF_getPeriod (VSF_Handle vsfHandle, uint16_t *pPeriodValue) |
Get the calculated PWM period. More... | |
void | VSF_setFreq (VSF_Handle vsfHandle, const uint16_t vsf_Hz) |
Set the variable switching frequency target value. More... | |
void | VSF_setFreqDelta (VSF_Handle vsfHandle, const uint16_t pwmFreqDelta_Hz) |
Set the variable switching frequency delta changing value. More... | |
void | VSF_setFreqMax (VSF_Handle vsfHandle, const uint16_t pwmFreqMax_Hz) |
Set the variable switching frequency maximum value. More... | |
void | VSF_setFreqMin (VSF_Handle vsfHandle, const uint16_t pwmFreqMin_Hz) |
Set the variable switching frequency minimum value. More... | |
void | VSF_setPeriod (VSF_Handle vsfHandle) |
Set the variable switching frequency PWM period. More... | |
void | VSF_setState (VSF_Handle vsfHandle, const VSF_State_e state) |
Set the variable switching frequency state. More... | |
void | VSF_setWaitTime (VSF_Handle vsfHandle, const uint16_t pwmWaitTime) |
Set the variable switching frequency wait time. More... | |
#define VSF_NUM_DELTA 1 |
Defines the changing PWM frequency delta.
#define VSF_NUM_WAIT_TIME 10 |
Defines the changing PWM frequency wait time.
#define VSF_NUM_MAX_FREQ_HZ 25000 |
Defines the maximum PWM frequency.
#define VSF_NUM_MIN_FREQ_HZ 5000 |
Defines the minimum PWM frequency.
typedef struct _VSF_Obj_* VSF_Handle |
Defines the online variable switching frequency (VSF) handle.
enum VSF_State_e |
VSF_Handle VSF_init | ( | void * | pMemory, |
const size_t | numBytes | ||
) |
Initializes the variable switching frequency module.
[in] | pMemory | A pointer to the variable pwm frequency object memory |
[in] | numBytes | The number of bytes allocated for the variable pwm frequency object, bytes |
void VSF_initParams | ( | VSF_Handle | vsfHandle, |
USER_Params * | pUserParams | ||
) |
init the variable switching frequency parameters
[in] | vsfHandle | The variable switching frequency (VSF) object handle |
[in] | pUserParams | The pointer to the user param structure |
void VSF_computeFreqParams | ( | VSF_Handle | vsfHandle | ) |
calculates the variable switching frequency parameters
[in] | vsfHandle | The variable switching frequency object handle |
|
inline |
Get the current switching frequency.
[in] | The | variable switching frequency (VSF) object handle |
References _VSF_Obj_::pwmFreqNow_Hz.
|
inline |
Set the variable switching frequency state.
[in] | The | variable switching frequency (VSF) object handle |
References _VSF_Obj_::state.
|
inline |
Get the calculated PWM period.
[in] | The | variable switching frequency (VSF) object handle |
References _VSF_Obj_::pwmPeriodNow.
|
inline |
Set the variable switching frequency target value.
[in] | The | variable switching frequency (VSF) object handle |
[in] | The | pwm switching frequency |
References _VSF_Obj_::pwmFreqSet_Hz.
|
inline |
Set the variable switching frequency delta changing value.
[in] | The | variable switching frequency (VSF) object handle |
[in] | The | vvariable switching frequency changing delta value |
References _VSF_Obj_::pwmFreqDelta_Hz.
|
inline |
Set the variable switching frequency maximum value.
[in] | The | variable switching frequency (VSF) object handle |
[in] | The | vvariable switching frequency maximum value |
References _VSF_Obj_::pwmFreqMax_Hz.
|
inline |
Set the variable switching frequency minimum value.
[in] | The | variable switching frequency (VSF) object handle |
[in] | The | variable switching frequency minimum value |
References _VSF_Obj_::pwmFreqMin_Hz.
|
inline |
Set the variable switching frequency PWM period.
[in] | The | variable switching frequency (VSF) object handle |
References _VSF_Obj_::pwmCounter, _VSF_Obj_::pwmPeriod, _VSF_Obj_::pwmPeriodNow, _VSF_Obj_::pwmWaitTime, _VSF_Obj_::state, VSF_STATE_IDLE, and VSF_STATE_PERIOD_SET.
|
inline |
Set the variable switching frequency state.
[in] | The | variable switching frequency (VSF) object handle |
[in] | The | variable switching frequency state |
References _VSF_Obj_::state.
|
inline |
Set the variable switching frequency wait time.
[in] | The | variable switching frequency (VSF) object handle |
[in] | The | variable switching frequency wait time |
References _VSF_Obj_::pwmWaitTime.