rusEFI
The most advanced open source ECU
|
Definition in file pwm_generator_logic.h.
Data Structures | |
struct | pwm_config_safe_state_s |
class | PwmConfig |
Multi-channel software PWM output configuration. More... | |
struct | IPwm |
class | SimplePwm |
Typedefs | |
typedef void() | pwm_cycle_callback(PwmConfig *state) |
typedef void() | pwm_gen_callback(int stateIndex, PwmConfig *pwm) |
Enumerations | |
enum | pwm_mode_e { PM_ZERO , PM_NORMAL , PM_FULL } |
Functions | |
void | applyPinState (int stateIndex, PwmConfig *state) |
void | startSimplePwm (SimplePwm *state, const char *msg, Scheduler *executor, OutputPin *output, float frequency, float dutyCycle, pwm_gen_callback *callback=NULL) |
void | startSimplePwmExt (SimplePwm *state, const char *msg, Scheduler *executor, brain_pin_e brainPin, OutputPin *output, float frequency, float dutyCycle, pwm_gen_callback *callback=NULL) |
void | startSimplePwmHard (SimplePwm *state, const char *msg, Scheduler *executor, brain_pin_e brainPin, OutputPin *output, float frequency, float dutyCycle) |
void | copyPwmParameters (PwmConfig *state, MultiChannelStateSequence const *seq) |
Definition at line 38 of file pwm_generator_logic.h.
typedef void() pwm_gen_callback(int stateIndex, PwmConfig *pwm) |
Definition at line 39 of file pwm_generator_logic.h.
enum pwm_mode_e |
Enumerator | |
---|---|
PM_ZERO | |
PM_NORMAL | |
PM_FULL |
Definition at line 41 of file pwm_generator_logic.h.
void applyPinState | ( | int | stateIndex, |
PwmConfig * | state | ||
) |
default implementation of pwm_gen_callback which simply toggles the pins
This method controls the actual hardware pins
Definition at line 403 of file pwm_generator_logic.cpp.
Referenced by emulatorApplyPinState(), and startSimplePwm().
void copyPwmParameters | ( | PwmConfig * | state, |
MultiChannelStateSequence const * | seq | ||
) |
Incoming parameters are potentially just values on current stack, so we have to copy into our own permanent storage, right?
Definition at line 279 of file pwm_generator_logic.cpp.
Referenced by updateTriggerWaveformIfNeeded(), and PwmConfig::weComplexInit().
void startSimplePwm | ( | SimplePwm * | state, |
const char * | msg, | ||
Scheduler * | executor, | ||
OutputPin * | output, | ||
float | frequency, | ||
float | dutyCycle, | ||
pwm_gen_callback * | callback = NULL |
||
) |
Start a one-channel software PWM driver.
This method should be called after scheduling layer is started by initSignalExecutor()
Definition at line 315 of file pwm_generator_logic.cpp.
Referenced by applyIACposition(), TachometerModule::init(), Generic4TransmissionController::init(), Gm4l6xTransmissionController::init(), initAlternatorCtrl(), initGpPwm(), initSpeedometer(), startBoostPin(), and startSimplePwmExt().
void startSimplePwmExt | ( | SimplePwm * | state, |
const char * | msg, | ||
Scheduler * | executor, | ||
brain_pin_e | brainPin, | ||
OutputPin * | output, | ||
float | frequency, | ||
float | dutyCycle, | ||
pwm_gen_callback * | callback = NULL |
||
) |
initialize GPIO pin and start a one-channel software PWM driver.
This method should be called after scheduling layer is started by initSignalExecutor()
Definition at line 361 of file pwm_generator_logic.cpp.
Referenced by startPwm(), startSimplePwmHard(), and turnVvtPidOn().
void startSimplePwmHard | ( | SimplePwm * | state, |
const char * | msg, | ||
Scheduler * | executor, | ||
brain_pin_e | brainPin, | ||
OutputPin * | output, | ||
float | frequency, | ||
float | dutyCycle | ||
) |
dutyCycle | value between 0 and 1 |
Definition at line 374 of file pwm_generator_logic.cpp.
Referenced by initVrThresholdPwm(), and DcHardware::start().