mirror of https://github.com/rusefi/rusefi-1.git
docs & state validation
This commit is contained in:
parent
aade11d993
commit
c5999bf358
|
@ -201,6 +201,10 @@ void copyPwmParameters(PwmConfig *state, int phaseCount, float *switchTimes, int
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* this method also starts the timer cycle
|
||||||
|
* See also startSimplePwm
|
||||||
|
*/
|
||||||
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 *pwmCycleCallback, pwm_gen_callback *stateChangeCallback) {
|
pin_state_t **pinStates, pwm_cycle_callback *pwmCycleCallback, pwm_gen_callback *stateChangeCallback) {
|
||||||
|
|
||||||
|
@ -232,6 +236,7 @@ void PwmConfig::weComplexInit(const char *msg, int phaseCount, float *switchTime
|
||||||
}
|
}
|
||||||
|
|
||||||
void startSimplePwm(PwmConfig *state, const char *msg, OutputPin *output, float frequency, float dutyCycle, pwm_gen_callback *stateChangeCallback) {
|
void startSimplePwm(PwmConfig *state, const char *msg, OutputPin *output, float frequency, float dutyCycle, pwm_gen_callback *stateChangeCallback) {
|
||||||
|
efiAssertVoid(CUSTOM_ERR_6692, state != NULL, "state");
|
||||||
efiAssertVoid(CUSTOM_ERR_6665, dutyCycle >= 0 && dutyCycle <= 1, "dutyCycle");
|
efiAssertVoid(CUSTOM_ERR_6665, dutyCycle >= 0 && dutyCycle <= 1, "dutyCycle");
|
||||||
if (frequency < 1) {
|
if (frequency < 1) {
|
||||||
warning(CUSTOM_OBD_LOW_FREQUENCY, "low frequency %.2f", frequency);
|
warning(CUSTOM_OBD_LOW_FREQUENCY, "low frequency %.2f", frequency);
|
||||||
|
|
Loading…
Reference in New Issue