Packages

A library to drive the Inky series of eInk displays from Pimoroni. Ported from the original Python project, all Elixir.

Current section

Files

Jump to
inky lib hal hal.ex
Raw

lib/hal/hal.ex

defmodule Inky.HAL do
@moduledoc """
A behaviour for defining the command interface between Inky and an IO implementation
"""
@type io_state :: any()
@callback init(opts :: map()) :: io_state()
@callback handle_update(
pixels :: map(),
border :: :white | :black | :red | :yellow | :accent,
policy :: :await | :once,
state :: Inky.IOCommands.State.t()
) ::
:ok | {:error, :device_busy}
end