Files
tactility/Drivers/ST7305/Source/esp_lcd_st7305.h
T
Adolfo Reyna 1a96307de2 feat(rlcd): Waveshare ESP32-S3-RLCD-4.2 support on latest main
- ST7305 driver with persistent 15KB DMA buffer (fix use-after-free +
  WDT lockup that caused freeze after flash)
- Reset timing fix: 150ms after reset, 50ms after init
- DTS: i2s0 mclk 16, bclk 9, ws 45, out 8, in 10 - fixes GPIO5 conflict
- i2c0 uses esp32-i2c-master, SDMMC 1-bit
- device.properties: colorDepth 16, fontSize 20, DefaultDark
- Amp GPIO46 init in initBoot
- Buttons: two-button control GPIO18 (cycle) + GPIO0 (select)

Base: origin/main f9453d89
2026-07-18 22:44:53 -04:00

50 lines
1.4 KiB
C

#pragma once
#include <stdint.h>
#include "esp_lcd_types.h"
#include "esp_lcd_panel_vendor.h"
#include "sdkconfig.h"
#ifdef __cplusplus
extern "C" {
#endif
typedef struct {
int cmd; /*<! The specific LCD command */
const void *data; /*<! Buffer that holds the command specific data */
size_t data_bytes; /*<! Size of `data` in memory, in bytes */
unsigned int delay_ms; /*<! Delay in milliseconds after this command */
} st7305_lcd_init_cmd_t;
typedef struct {
const st7305_lcd_init_cmd_t *init_cmds;
uint16_t init_cmds_size;
} st7305_vendor_config_t;
#define ST7305_WIDTH 400
#define ST7305_HEIGHT 300
#define ST7305_CMD_NOP 0x00
#define ST7305_CMD_SWRESET 0x01
#define ST7305_CMD_SLPOUT 0x11
#define ST7305_CMD_NORON 0x13
#define ST7305_CMD_INVOFF 0x20
#define ST7305_CMD_INVON 0x21
#define ST7305_CMD_DISPOFF 0x28
#define ST7305_CMD_DISPON 0x29
#define ST7305_CMD_CASET 0x2A
#define ST7305_CMD_RASET 0x2B
#define ST7305_CMD_RAMWR 0x2C
#define ST7305_CMD_MADCTL 0x36
#define ST7305_MADCTL_MY 0x80
#define ST7305_MADCTL_MX 0x40
#define ST7305_MADCTL_MV 0x20
#define ST7305_MADCTL_ML 0x10
esp_err_t esp_lcd_new_panel_st7305(const esp_lcd_panel_io_handle_t io, const esp_lcd_panel_dev_config_t *panel_dev_config, esp_lcd_panel_handle_t *ret_panel);
#ifdef __cplusplus
}
#endif