Fix PWM software watchdogs

Fix PWM software watchdogs by correctly initializing variables (#8721)
This commit is contained in:
Theo Arends 2020-06-23 17:28:15 +02:00
parent 7784156376
commit 6e8928b8a1
2 changed files with 6 additions and 6 deletions

View File

@ -133,9 +133,9 @@ constexpr int maxPWMs = 8;
// PWM machine state
typedef struct PWMState {
uint32_t mask; // Bitmask of active pins
uint32_t cnt; // How many entries
uint32_t idx; // Where the state machine is along the list
uint32_t mask = 0; // Bitmask of active pins
uint32_t cnt = 0; // How many entries
uint32_t idx = 0; // Where the state machine is along the list
uint8_t pin[maxPWMs + 1];
uint32_t delta[maxPWMs + 1];
uint32_t nextServiceCycle; // Clock cycle for next step