ESP32-WROVER-KIT-LCD-DRIVER
LCD.c File Reference

sets and writes framebuffer More...

#include "LCD.h"
#include "Driver.h"
Include dependency graph for LCD.c:

Functions

esp_err_t iLCD_allocateFramebuffer (uint16_t ***pData)
 allocate framebuffer More...
 
void vLCD_writeChar (uint16_t u16xPos, uint16_t u16yPos, char cCharacter, uint16_t u16ColorFont, uint16_t u16ColorBackground)
 write string/text into framebuffer More...
 
esp_err_t iLCD_init (void)
 init More...
 
esp_err_t iLCD_clearFramebuffer (uint16_t u16Color)
 clear complete framebuffer with a color More...
 
esp_err_t iLCD_writeString (uint16_t u16xPos, uint16_t u16yPos, char *pcText, uint16_t u16ColorFont, uint16_t u16ColorBackground)
 write string/text into framebuffer More...
 

Variables

uint16_t ** pu16Framebuffer
 
static const uint8_t font6_8 [][6]
 

Detailed Description

sets and writes framebuffer

Author
Hendrik Schutter
Version
V1.0
Date
03.11.2020

This code displays graphics on the 320x240 LCD on an ESP-WROVER_KIT board.

Some info about the ILI9341/ST7789V: It has an C/D line, which is connected to a GPIO here. It expects this line to be low for a command and high for data. We use a pre-transmit callback here to control that line: every transaction has as the user-definable argument the needed state of the D/C line and just before the transaction is sent, the callback will set this line to the correct state.

Function Documentation

◆ iLCD_allocateFramebuffer()

esp_err_t iLCD_allocateFramebuffer ( uint16_t ***  pData)

allocate framebuffer

Parameters
pointerof framebuffer two dimensional array
Returns
esp error code
Author
Hendrik Schutter
Date
3.11.2020
Here is the caller graph for this function:

◆ iLCD_clearFramebuffer()

esp_err_t iLCD_clearFramebuffer ( uint16_t  u16Color)

clear complete framebuffer with a color

Parameters
RGB586color code
Returns
esp error code
Author
Hendrik Schutter
Date
3.11.2020
Here is the call graph for this function:

◆ iLCD_init()

esp_err_t iLCD_init ( void  )

init

Parameters
void
Returns
int
Author
Hendrik Schutter
Date
3.11.2020
Here is the call graph for this function:

◆ iLCD_writeString()

esp_err_t iLCD_writeString ( uint16_t  u16xPos,
uint16_t  u16yPos,
char *  pcText,
uint16_t  u16ColorFont,
uint16_t  u16ColorBackground 
)

write string/text into framebuffer

Parameters
uint16_tu16xPos
uint16_tu16yPos
char*pcText
RGB586color code for font uint16_t u16ColorFont
RGB586color code for background uint16_t u16ColorBackground
Returns
esp error code
Author
Hendrik Schutter
Date
4.11.2020
Here is the call graph for this function:

◆ vLCD_writeChar()

void vLCD_writeChar ( uint16_t  u16xPos,
uint16_t  u16yPos,
char  cCharacter,
uint16_t  u16ColorFont,
uint16_t  u16ColorBackground 
)

write string/text into framebuffer

Parameters
uint16_tu16xPos
uint16_tu16yPos
charcCharacter
RGB586color code for font uint16_t u16ColorFont
RGB586color code for background uint16_t u16ColorBackground
Returns
esp error code
Author
Hendrik Schutter
Date
4.11.2020
Here is the caller graph for this function:

Variable Documentation

◆ font6_8

const uint8_t font6_8[][6]
static

◆ pu16Framebuffer

uint16_t** pu16Framebuffer