Skip to content

Commit

Permalink
a26: fix RIOT timer
Browse files Browse the repository at this point in the history
  • Loading branch information
LukeUsher committed Aug 21, 2023
1 parent 62eadd8 commit 1647d3f
Showing 1 changed file with 4 additions and 11 deletions.
15 changes: 4 additions & 11 deletions ares/a26/riot/riot.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,11 @@ auto RIOT::unload() -> void {
}

auto RIOT::main() -> void {
decrementTimer();
step(1);
}

auto RIOT::decrementTimer() -> void {
if(--timer.interval == 0) {
if(--timer.counter == 0xff) {
timer.reload = 1;
}

timer.interval = timer.reload;
if(--timer.counter == 0xff) {
timer.interval = 1;
}

step(timer.interval);
}

auto RIOT::step(u32 clocks) -> void {
Expand Down

0 comments on commit 1647d3f

Please sign in to comment.