We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents f1ea35f + 8cf276b commit 3a10b29Copy full SHA for 3a10b29
drivers/inky73/inky73.cpp
@@ -47,8 +47,9 @@ namespace pimoroni {
47
return !(sr.read() & 128);
48
}
49
50
- void Inky73::busy_wait() {
51
- while(is_busy()) {
+ void Inky73::busy_wait(uint timeout_ms) {
+ absolute_time_t timeout = make_timeout_time_ms(timeout_ms);
52
+ while(is_busy() && !time_reached(timeout)) {
53
tight_loop_contents();
54
55
drivers/inky73/inky73.hpp
@@ -70,7 +70,7 @@ namespace pimoroni {
70
// Methods
71
//--------------------------------------------------
72
public:
73
- void busy_wait();
+ void busy_wait(uint timeout_ms=45000);
74
void reset();
75
void power_off();
76
0 commit comments