ESP32 LCD Driver v1.0
LCD Driver Documenation
Loading...
Searching...
No Matches
esp_lcd.h
Go to the documentation of this file.
1
10#ifndef _ESP_LCD_H_
11#define _ESP_LCD_H_
12
13#include "driver/gpio.h"
14
15/* LCD Error */
16typedef int lcd_err_t;
18#define LCD_FAIL -1
19#define LCD_OK 0
22#define LCD_DATA_LINE 4
24
28typedef enum {
32
33
47typedef struct
48{
49 gpio_num_t data[LCD_DATA_LINE];
50 gpio_num_t en;
51 gpio_num_t regSel;
53} lcd_t;
54
55void lcdDefault(lcd_t *const lcd);
56
57void lcdInit(lcd_t *const lcd);
58
59void lcdCtor(lcd_t *lcd, gpio_num_t data[LCD_DATA_LINE], gpio_num_t en, gpio_num_t regSel);
60
61lcd_err_t lcdSetText(lcd_t *const lcd, char *text, int x, int y);
62
63lcd_err_t lcdSetInt(lcd_t *const lcd, int val, int x, int y);
64
65lcd_err_t lcdClear(lcd_t *const lcd);
66
67void lcdFree(lcd_t * const lcd);
68
69void assert_lcd(lcd_err_t lcd_error);
70
71#endif
lcd_state_t
Definition: esp_lcd.h:28
@ LCD_ACTIVE
Definition: esp_lcd.h:30
@ LCD_INACTIVE
Definition: esp_lcd.h:29
void lcdCtor(lcd_t *lcd, gpio_num_t data[LCD_DATA_LINE], gpio_num_t en, gpio_num_t regSel)
LCD constructor.
Definition: esp_lcd.c:176
int lcd_err_t
Definition: esp_lcd.h:16
lcd_err_t lcdSetText(lcd_t *const lcd, char *text, int x, int y)
Set text.
Definition: esp_lcd.c:240
void assert_lcd(lcd_err_t lcd_error)
Definition: esp_lcd.c:349
#define LCD_DATA_LINE
Definition: esp_lcd.h:22
void lcdInit(lcd_t *const lcd)
Initialize LCD object.
Definition: esp_lcd.c:105
lcd_err_t lcdSetInt(lcd_t *const lcd, int val, int x, int y)
Set integer.
Definition: esp_lcd.c:285
void lcdFree(lcd_t *const lcd)
Reset pins to default configuration.
Definition: esp_lcd.c:325
lcd_err_t lcdClear(lcd_t *const lcd)
Clear LCD screen Detailed description starts here.
Definition: esp_lcd.c:306
void lcdDefault(lcd_t *const lcd)
LCD default constructor.
Definition: esp_lcd.c:154
LCD object.
Definition: esp_lcd.h:48
lcd_state_t state
Definition: esp_lcd.h:52
gpio_num_t en
Definition: esp_lcd.h:50
gpio_num_t regSel
Definition: esp_lcd.h:51
lcd_state_t
Definition: esp_lcd.h:28