diff options
| author | Dan Halbert <halbert@halwitz.org> | 2019-03-06 13:45:48 -0500 |
|---|---|---|
| committer | Dan Halbert <halbert@halwitz.org> | 2019-03-06 13:45:48 -0500 |
| commit | c854f6617a0b343333635fe0cc91419daff7cdd5 (patch) | |
| tree | e784d33bdf651927f5ea71029327ce966ae83c49 /shared-bindings/displayio/ParallelBus.c | |
| parent | 2eaa98ad7103ea4a03fc10fbcee7d2ec7a045a70 (diff) | |
check display-bus transaction status and act accordingly
Diffstat (limited to 'shared-bindings/displayio/ParallelBus.c')
| -rw-r--r-- | shared-bindings/displayio/ParallelBus.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/shared-bindings/displayio/ParallelBus.c b/shared-bindings/displayio/ParallelBus.c index a54a84471..6a499ed06 100644 --- a/shared-bindings/displayio/ParallelBus.c +++ b/shared-bindings/displayio/ParallelBus.c @@ -114,7 +114,12 @@ STATIC mp_obj_t displayio_parallelbus_obj_send(mp_obj_t self, mp_obj_t command_o mp_buffer_info_t bufinfo; mp_get_buffer_raise(data_obj, &bufinfo, MP_BUFFER_READ); - common_hal_displayio_parallelbus_begin_transaction(self); + // Wait for display bus to be available. + while (!common_hal_displayio_parallelbus_begin_transaction(self)) { +#ifdef MICROPY_VM_HOOK_LOOP + MICROPY_VM_HOOK_LOOP ; +#endif + } common_hal_displayio_parallelbus_send(self, true, &command, 1); common_hal_displayio_parallelbus_send(self, false, ((uint8_t*) bufinfo.buf), bufinfo.len); common_hal_displayio_parallelbus_end_transaction(self); |
