sl45sms / gc9a01-esp-idf

GC9A01 ESP-IDF Component for ESP32

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

GC9A01 ESP-IDF Component

Clone to components folder and run idf.py menuconfig

ESP-IDF_menuconfig

Add as submodule:

git submodule add https://github.com/liyanboy74/gc9a01-esp-idf.git components/gc9a01

Example Test:

#include <stdio.h>
#include <string.h>
#include <math.h>
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#include "driver/gpio.h"
#include "sdkconfig.h"

#include "gc9a01.h"

#define STACK_SIZE              2048

void LCD(void * arg)
{
    uint16_t Color;
    GC9A01_Init();
    for(;;)
    {
        Color=rand();
        GC9A01_FillRect(0,0,239,239,Color);
        GC9A01_Update();
        vTaskDelay(1000/portTICK_PERIOD_MS);
    }
}

void app_main(void)
{
    TaskHandle_t LCDHandle;

    xTaskCreate(LCD,"Test LCD",STACK_SIZE,NULL,tskIDLE_PRIORITY,&LCDHandle);
    configASSERT(LCDHandle);
}
  • If you succeed, it's time to go one layer higher! Try Dispcolor
  • You can also use the BMP24 to RGB565 tools to convert and display images

About

GC9A01 ESP-IDF Component for ESP32

License:BSD 3-Clause "New" or "Revised" License


Languages

Language:C 99.7%Language:CMake 0.3%