#pragma once #include #include #include "esp_err.h" /* ST7735 0.96" 80x160 SPI display (T-Dongle C5). * Shares the SPI2_HOST bus with the microSD card (different CS). * Manual RS (D/C) pin; SPI-managed CS. */ esp_err_t st7735_init(void); bool st7735_ready(void); void st7735_clear(uint16_t color); void st7735_fill_rect(int x, int y, int w, int h, uint16_t color); void st7735_set_fg(uint16_t color); void st7735_set_bg(uint16_t color); /* Render a C string at (x, y) using a 5x7 font (1x scale, 6px advance). */ void st7735_text(int x, int y, const char *s); /* RGB565 helpers */ uint16_t st7735_rgb565(int r, int g, int b);