unique name
This commit is contained in:
parent
4d1cbfd4dd
commit
eaf6440530
|
@ -30,7 +30,7 @@ void PwmConfig::baseConstructor() {
|
||||||
periodNt = NAN;
|
periodNt = NAN;
|
||||||
memset(&outputPins, 0, sizeof(outputPins));
|
memset(&outputPins, 0, sizeof(outputPins));
|
||||||
phaseCount = 0;
|
phaseCount = 0;
|
||||||
cycleCallback = NULL;
|
pwmCycleCallback = NULL;
|
||||||
stateChangeCallback = NULL;
|
stateChangeCallback = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -93,8 +93,8 @@ void PwmConfig::setFrequency(float frequency) {
|
||||||
|
|
||||||
void PwmConfig::handleCycleStart() {
|
void PwmConfig::handleCycleStart() {
|
||||||
if (safe.phaseIndex == 0) {
|
if (safe.phaseIndex == 0) {
|
||||||
if (cycleCallback != NULL) {
|
if (pwmCycleCallback != NULL) {
|
||||||
cycleCallback(this);
|
pwmCycleCallback(this);
|
||||||
}
|
}
|
||||||
efiAssertVoid(periodNt != 0, "period not initialized");
|
efiAssertVoid(periodNt != 0, "period not initialized");
|
||||||
if (safe.periodNt != periodNt || safe.iteration == ITERATION_LIMIT) {
|
if (safe.periodNt != periodNt || safe.iteration == ITERATION_LIMIT) {
|
||||||
|
@ -194,7 +194,7 @@ void copyPwmParameters(PwmConfig *state, int phaseCount, float *switchTimes, int
|
||||||
}
|
}
|
||||||
|
|
||||||
void PwmConfig::weComplexInit(const char *msg, int phaseCount, float *switchTimes, int waveCount,
|
void PwmConfig::weComplexInit(const char *msg, int phaseCount, float *switchTimes, int waveCount,
|
||||||
pin_state_t **pinStates, pwm_cycle_callback *cycleCallback, pwm_gen_callback *stateChangeCallback) {
|
pin_state_t **pinStates, pwm_cycle_callback *pwmCycleCallback, pwm_gen_callback *stateChangeCallback) {
|
||||||
|
|
||||||
efiAssertVoid(periodNt != 0, "period is not initialized");
|
efiAssertVoid(periodNt != 0, "period is not initialized");
|
||||||
if (phaseCount == 0) {
|
if (phaseCount == 0) {
|
||||||
|
@ -208,7 +208,7 @@ void PwmConfig::weComplexInit(const char *msg, int phaseCount, float *switchTime
|
||||||
efiAssertVoid(waveCount > 0, "waveCount should be positive");
|
efiAssertVoid(waveCount > 0, "waveCount should be positive");
|
||||||
checkSwitchTimes2(phaseCount, switchTimes);
|
checkSwitchTimes2(phaseCount, switchTimes);
|
||||||
|
|
||||||
this->cycleCallback = cycleCallback;
|
this->pwmCycleCallback = pwmCycleCallback;
|
||||||
this->stateChangeCallback = stateChangeCallback;
|
this->stateChangeCallback = stateChangeCallback;
|
||||||
|
|
||||||
multiWave.waveCount = waveCount;
|
multiWave.waveCount = waveCount;
|
||||||
|
|
|
@ -47,7 +47,7 @@ public:
|
||||||
|
|
||||||
void weComplexInit(const char *msg,
|
void weComplexInit(const char *msg,
|
||||||
int phaseCount, float *swithcTimes, int waveCount, pin_state_t **pinStates,
|
int phaseCount, float *swithcTimes, int waveCount, pin_state_t **pinStates,
|
||||||
pwm_cycle_callback *cycleCallback,
|
pwm_cycle_callback *pwmCycleCallback,
|
||||||
pwm_gen_callback *callback);
|
pwm_gen_callback *callback);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -75,7 +75,7 @@ public:
|
||||||
/**
|
/**
|
||||||
* this callback is invoked before each wave generation cycle
|
* this callback is invoked before each wave generation cycle
|
||||||
*/
|
*/
|
||||||
pwm_cycle_callback *cycleCallback;
|
pwm_cycle_callback *pwmCycleCallback;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* this main callback is invoked when it's time to switch level on any of the output channels
|
* this main callback is invoked when it's time to switch level on any of the output channels
|
||||||
|
|
Loading…
Reference in New Issue