ILI9486-Elixir

ILI9486 driver for Elixir.

Tested on

Example

# default
# assuming LCD device at /dev/spidev0.0
# DC connects to PIN 24
# RST not connected
# SPI speed: 16MHz
# Pixel Format: BGR565
{:ok, disp} = ILI9486.new()
# default with touch panel
# DC connects to PIN 24
# RST connects to PIN 25
# SPI speed: 16MHz
# Pixel Format: RGB666 (for demo only, not necessary)
# Touch panel device at /dev/spidev0.1
# Touch panel IRQ PIN 17
{:ok, disp} = ILI9486.new(
    speed_hz: 16_000_000,
    pix_fmt: :bgr666,
    rst: 25,
    touch_cs: 1,
    touch_irq: 17
)

high-speed variant (125MHz SPI)

# assuming LCD device at /dev/spidev0.0
# DC connects to PIN 24
# RST connects to PIN 25 (for demo only, not necessary)
# SPI speed: 125MHz
# Pixel Format: BGR666 (for demo only, not necessary)
{:ok, disp} = ILI9486.new(
    is_high_speed: true,
    speed_hz: 125_000_000,
    pix_fmt: :bgr666,
    rst: 25
)

high-speed variant (125MHz SPI) with touch panel

# assuming LCD device at /dev/spidev0.0
# DC connects to PIN 24
# RST connects to PIN 25 (for demo only, not necessary)
# SPI speed: 125MHz
# Pixel Format: BGR666 (for demo only, not necessary)
# Touch panel device at /dev/spidev0.1
# Touch panel IRQ PIN 17
{:ok, disp} = ILI9486.new(
    is_high_speed: true,
    speed_hz: 125_000_000,
    pix_fmt: :bgr666,
    rst: 25,
    touch_cs: 1,
    touch_irq: 17
)

Installation

If available in Hex, the package can be installed by adding ili9486_elixir to your list of dependencies in mix.exs:

def deps do
  [
    {:ili9486_elixir, "~> 0.1.1"}
  ]
end

Documentation can be generated with ExDoc and published on HexDocs. Once published, the docs can be found at https://hexdocs.pm/ili9486_elixir.