You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have an embedded device that may or may not have an EPD display connected. When the device is initialized without a display attached (but is not configured as such), the initialization routine hangs indefinitely waiting for the device to get 'idle'. Also this can happen when the display module is defective or not properly connected. As a faulty/not connected display is not a total failure in our use case, I would like to gracefully handle such cases.
For this I would like to introduce a timeout to the typical wait_until_idle functions (e.g. introduce wait_until_idle_with_timeout or have the timeout by default).
What makes this hard to do this properly, is that across the epd-waveshare library SPI::Error is used as the general error type, but now we also need to support errors like e.g. Timeout or DisplayNotFound. So the proposal here is to move away from using the external generic SPI::Error in this library and instead use a predefined local epd_waveshare::Error type or possibly an associated type to the WaveshareDisplay Trait.
I'm interested in your opinion on this!
The text was updated successfully, but these errors were encountered:
I have an embedded device that may or may not have an EPD display connected. When the device is initialized without a display attached (but is not configured as such), the initialization routine hangs indefinitely waiting for the device to get 'idle'. Also this can happen when the display module is defective or not properly connected. As a faulty/not connected display is not a total failure in our use case, I would like to gracefully handle such cases.
For this I would like to introduce a timeout to the typical
wait_until_idle
functions (e.g. introducewait_until_idle_with_timeout
or have the timeout by default).What makes this hard to do this properly, is that across the epd-waveshare library
SPI::Error
is used as the general error type, but now we also need to support errors like e.g.Timeout
orDisplayNotFound
. So the proposal here is to move away from using the external genericSPI::Error
in this library and instead use a predefined localepd_waveshare::Error
type or possibly an associated type to theWaveshareDisplay
Trait.I'm interested in your opinion on this!
The text was updated successfully, but these errors were encountered: