Skip to content
Snippets Groups Projects
Commit 75362c7a authored by Emilio Corigliano's avatar Emilio Corigliano
Browse files

[CountedPWM] Non resetting the pulse counter so that we won't be stuck if we...

[CountedPWM] Non resetting the pulse counter so that we won't be stuck if we call generatePulses too frequently
parent 53a1c471
No related branches found
No related tags found
No related merge requests found
...@@ -86,7 +86,7 @@ void CountedPWM::setDutyCycleResolution(unsigned int dutyCycleResolution) ...@@ -86,7 +86,7 @@ void CountedPWM::setDutyCycleResolution(unsigned int dutyCycleResolution)
void CountedPWM::generatePulses(uint16_t pulses) void CountedPWM::generatePulses(uint16_t pulses)
{ {
// Reset the counters // Reset the counters
pulseTimer.setCounter(0); // pulseTimer.setCounter(0);
counterTimer.setCounter(0); counterTimer.setCounter(0);
// Set the capture and compare register to the number of pulses to generate // Set the capture and compare register to the number of pulses to generate
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment