Skip to content

Commit

Permalink
Merge pull request #1042 from jaeheonshim-forks/inky-blocking-fix
Browse files Browse the repository at this point in the history
Fix: Properly implement non-blocking update functions for the Inky Frame
  • Loading branch information
Gadgetoid authored Jan 15, 2025
2 parents d014b28 + 3811195 commit f7c45a9
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
3 changes: 1 addition & 2 deletions drivers/inky73/inky73.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -181,8 +181,7 @@ namespace pimoroni {
busy_wait();

command(DRF, {0}); // start display refresh
busy_wait();


if(blocking) {
busy_wait();

Expand Down
4 changes: 2 additions & 2 deletions libraries/inky_frame/inky_frame.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,11 @@ namespace pimoroni {
}

void InkyFrame::update(bool blocking) {
while(is_busy()) {
while(blocking && is_busy()) {
tight_loop_contents();
}
uc8159.update((PicoGraphics_PenP4 *)this);
while(is_busy()) {
while(blocking && is_busy()) {
tight_loop_contents();
}
uc8159.power_off();
Expand Down
4 changes: 2 additions & 2 deletions libraries/inky_frame_7/inky_frame_7.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,11 @@ namespace pimoroni {
}

void InkyFrame::update(bool blocking) {
while(is_busy()) {
while(blocking && is_busy()) {
tight_loop_contents();
}
inky73.update((PicoGraphics_PenInky7 *)this);
while(is_busy()) {
while(blocking && is_busy()) {
tight_loop_contents();
}
inky73.power_off();
Expand Down

0 comments on commit f7c45a9

Please sign in to comment.