Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
PaintYourDragon committed Oct 19, 2020
2 parents b9b663e + 864cc77 commit 7fd87fa
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -422,6 +422,16 @@ void _PM_resume(Protomatter_core *core) {
core->swapBuffers = 0;
core->frameCount = 0;

for (uint8_t line = 0, bit = 1; line < core->numAddressLines;
line++, bit <<= 1) {
_PM_pinOutput(core->addr[line].pin);
if (core->prevRow & bit) {
_PM_pinHigh(core->addr[line].pin);
} else {
_PM_pinLow(core->addr[line].pin);
}
}

_PM_timerInit(core->timer); // Configure timer
_PM_timerStart(core->timer, 1000); // Start timer
}
Expand Down

0 comments on commit 7fd87fa

Please sign in to comment.