# driver_ST7262 C++ driver for the **ST7262 RGB LCD panel** (1024×600, 16-bit parallel RGB565) on ESP32-S3 / ESP32-P4, designed for the [ESP-IDF Component Registry](https://components.espressif.com/). Inherits from [`andresragot/driver_lcd`](https://github.com/andresragot/driver_lcd). ## Features - 16-bit parallel RGB interface with configurable timing - Double-buffered frame output with bounce buffer for DMA - Vsync-synchronized rendering with FreeRTOS semaphore - Frame buffer in PSRAM ## Requirements - ESP-IDF **>= 5.4.1** - Target: **ESP32-S3** or **ESP32-P4** ## Installation Add the dependency to your project's `idf_component.yml`: ```yaml dependencies: andresragot/driver_ST7262: "^1.0.0" ``` Then run `idf.py build` — the component manager will download it and its dependency (`driver_lcd`) automatically. ## Usage ```cpp #include "Driver_ST7262.hpp" // Default constructor initializes the panel automatically Ragot::Driver_ST7262 display; // Send a frame buffer to the panel display.send_frame_buffer(my_frame_buffer); // Clean up display.deinit(); ``` ## API | Method | Description | |---|---| | `Driver_ST7262()` | Constructor — calls `init()` with default pins | | `init(reset_pin, bk_pin)` | Initialize RGB bus, panel, and vsync callback | | `deinit()` | Release panel handle and semaphore | | `send_frame_buffer(buf)` | Wait for vsync, then draw the frame buffer | | `set_pixel(x, y, color)` | Not implemented — returns `ESP_FAIL` | ## Panel Specifications | Parameter | Value | |---|---| | Resolution | 1024 × 600 | | Color format | RGB565 (16-bit) | | Pixel clock | ~30.85 MHz | | Data width | 16-bit parallel RGB | | Frame buffers | 2 (double-buffered, PSRAM) | | Bounce buffer | 600 × 32 px | ## Default Pin Mapping (ESP32-S3) | Signal | GPIO | |---|---| | HSYNC | 46 | | VSYNC | 3 | | DE | 5 | | PCLK | 7 | | D0–D15 | 14, 38, 18, 17, 10, 39, 0, 45, 48, 47, 21, 1, 2, 42, 41, 40 | ## Dependencies - [`andresragot/driver_lcd`](https://github.com/andresragot/driver_lcd) — Base LCD driver class ## License MIT — see [LICENSE](LICENSE) for details.
idf.py add-dependency "andresragot/driver_st7262^1.0.0"