pappersverk / inky

A library for managing Inky e-ink displays from Elixir.
Apache License 2.0
72 stars 11 forks source link

Support pHAT with SSD1608 #38

Closed mnishiguchi closed 3 years ago

mnishiguchi commented 3 years ago

According to Pimoroni's catalog:

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

nyaray commented 3 years ago

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.