We started rolling out a higher resolution SSD1608 e-paper screen on Inky pHAT from late 2020 (250x122 pixels instead of 212x104!). These new screens require different drivers ...
As I looked into the Pimoroni's Python library, they are pretty different despite physically looking identical. The device variants can be found here in the source code.
So I ended up writing a dedicated HAL module for pHAT with SSD1608.
## Usage
# when type is `:phat_ssd1608`, `Inky.HAL.PhatSSD1608` module is used by default
Inky.start_link(:phat_ssd1608, :red, %{name: InkySample})
Notes
I realized that the Display struct is not so useful for this particular model since only accent is changeable; others are static. So I decided to specify the display info as module attributes in Inky.HAL.PhatSSD1608 module.
I like this overall, though I think that there could have been some deduplication in the nearly identical HAL files. Something for a later clean-up PR, I suppose.
According to Pimoroni's catalog:
As I looked into the Pimoroni's Python library, they are pretty different despite physically looking identical. The device variants can be found here in the source code.
So I ended up writing a dedicated HAL module for pHAT with SSD1608.
Notes
Display
struct is not so useful for this particular model since onlyaccent
is changeable; others are static. So I decided to specify the display info as module attributes inInky.HAL.PhatSSD1608
module.