Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/utkumaden/esp-idf-lcd

Generic LCD Driver as an ESP32 Component
https://github.com/utkumaden/esp-idf-lcd

character-lcd display driver esp-idf esp32 esp32-idf lcd lcd16x2

Last synced: about 1 month ago
JSON representation

Generic LCD Driver as an ESP32 Component

Awesome Lists containing this project

README

        

Generic LCD driver as a ESP32 Component
=======================================

This is a generic LCD driver wrapped as a ESP32 component. You are free to use
the driver component as you wish as long as you follow the license agreement in
[LICENSE.md](LICENSE.md).

Usage Example
-------------

```c

int lcdBusIO(lcdDriver_t *driver, bool rw, bool rs, bool en, uint8_t data)
{
// Implement for your own setup.
}

int lcdDelay(lcdDriver_t *driver, uint32_t delay)
{
// Implement for your own setup.
return usleep((useconds_t)delay);
}

void app_main(void)
{
lcdDriver_t lcd = {
.userData = NULL,
.dimensions = {16, 2},
.writeOnly = true,
.fourBits = true
};

// Do GPIO initialization.

// Reset GPIO pins to their default state.
lcdBusIO(&lcd, false, false, false, 0xFF);

lcdLoadDefaultTiming(&lcd); // Load default LCD timings.
lcdInit(&lcd); // Initialize the LCD and driver.

lcdDirection(&lcd, true); // Set the direction to forward.
lcdSetDisplay(&lcd, true, false, false); // Enable display.
lcdHome(&lcd); // Home the LCD cursor.

lcdPutZString(&driver, "Hello World!");
}
```

TO-DO
-----
* Implement read-write mode.
* Implement 8-bit mode.