Refactor Trigger System #635
This commit is contained in:
parent
ac209bf8ac
commit
8011d287c4
|
@ -245,7 +245,7 @@ static void timerCallback(PwmConfig *state) {
|
|||
* Incoming parameters are potentially just values on current stack, so we have to copy
|
||||
* into our own permanent storage, right?
|
||||
*/
|
||||
void copyPwmParameters(PwmConfig *state, int phaseCount, float *switchTimes, int waveCount, pin_state_t *const *pinStates) {
|
||||
void copyPwmParameters(PwmConfig *state, int phaseCount, float const *switchTimes, int waveCount, pin_state_t *const *pinStates) {
|
||||
state->phaseCount = phaseCount;
|
||||
|
||||
for (int phaseIndex = 0; phaseIndex < phaseCount; phaseIndex++) {
|
||||
|
@ -267,7 +267,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, ExecutorInterface *executor, int phaseCount, float *switchTimes, int waveCount,
|
||||
void PwmConfig::weComplexInit(const char *msg, ExecutorInterface *executor,
|
||||
const int phaseCount,
|
||||
float const *switchTimes,
|
||||
const int waveCount,
|
||||
pin_state_t *const*pinStates, pwm_cycle_callback *pwmCycleCallback, pwm_gen_callback *stateChangeCallback) {
|
||||
this->executor = executor;
|
||||
|
||||
|
|
|
@ -55,7 +55,7 @@ public:
|
|||
|
||||
void weComplexInit(const char *msg,
|
||||
ExecutorInterface *executor,
|
||||
int phaseCount, float *swithcTimes, int waveCount, pin_state_t *const*pinStates,
|
||||
const int phaseCount, float const *swithcTimes, const int waveCount, pin_state_t *const*pinStates,
|
||||
pwm_cycle_callback *pwmCycleCallback,
|
||||
pwm_gen_callback *callback);
|
||||
|
||||
|
@ -139,7 +139,7 @@ void startSimplePwmExt(SimplePwm *state,
|
|||
brain_pin_e brainPin, OutputPin *output,
|
||||
float frequency, float dutyCycle, pwm_gen_callback *stateChangeCallback);
|
||||
|
||||
void copyPwmParameters(PwmConfig *state, int phaseCount, float *switchTimes,
|
||||
void copyPwmParameters(PwmConfig *state, int phaseCount, float const *switchTimes,
|
||||
int waveCount, pin_state_t *const *pinStates);
|
||||
|
||||
#endif /* PWM_GENERATOR_LOGIC_H_ */
|
||||
|
|
Loading…
Reference in New Issue