devbis / esp-idf-st7789

ST7789 Driver for esp-idf

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

esp-idf-st7789

ST7789 Driver for esp-idf

You have to set this config value with menuconfig.

  • CONFIG_WIDTH
  • CONFIG_HEIGHT
  • CONFIG_OFFSETX
  • CONFIG_OFFSETY
  • CONFIG_MOSI_GPIO
  • CONFIG_SCLK_GPIO
  • CONFIG_CS_GPIO
  • CONFIG_DC_GPIO
  • CONFIG_RESET_GPIO
  • CONFIG_BL_GPIO
git clone https://github.com/nopnop2002/esp-idf-st7789
cd esp-idf-st7789/
make menuconfig
make flash

st7789-config-1


Generic ST7789 1.3 Inch

There is 2 kinds of marking.
st7789-back

st7789-config-2

MISO is not use.

st7789-1 st7789-2 st7789-3 st7789-4 st7789-5 st7789-6 st7789-7 st7789-8 st7789-9 st7789-10

BMP file
st7789-11

JPEG file
st7789-JPEG

PNG file
st7789-PNG


Generic ST7789 1.14 Inch

st7789-135x240-1 st7789-135x240-2


LILYGO TTGO 1.14 Inch

ttgo-config-1 ttgo-1


JPEG Decoder

The ESP-IDF component includes Tiny JPEG Decompressor.
The document of Tiny JPEG Decompressor is here.
This can reduce the image to 1/2 1/4 1/8.


PNG Decoder

The ESP-IDF component includes part of the miniz library, such as mz_crc32.
But it doesn't support all of the miniz.
The document of miniz library is here.

And I ported the pngle library from here.
This can reduce the image to any size.


Font File

You can add your original font file.
The format of the font file is the FONTX format.
Your font file is put in font directory.
Your font file is uploaded to SPIFFS partition using meke flash.

Please refer this page about FONTX format.

FontxFile yourFont[2];
InitFontx(yourFont,"/spiffs/your_font_file_name","");
uint8_t ascii[10];
strcpy((char *)ascii, "MyFont");
uint16_t color = RED;
lcdDrawString(&dev, yourFont, x, y, ascii, color);

FONTX Editor

There is FONTX Editor.
This runs on Windows10.
Developer page is here.

FontxEditor

This library uses the following as default fonts:

  • font/ILGH16XB.FNT // 8x16Dot Gothic
  • font/ILGH24XB.FNT // 12x24Dot Gothic
  • font/ILGH32XB.FNT // 16x32Dot Gothic
  • font/ILMH16XB.FNT // 8x16Dot Mincyo
  • font/ILMH24XB.FNT // 12x24Dot Mincyo
  • font/ILMH32XB.FNT // 16x32Dot Mincyo

Changing this file will change the font.

About

ST7789 Driver for esp-idf


Languages

Language:C 99.1%Language:Makefile 0.6%Language:CMake 0.3%