Login
1 branch 0 tags
Ben (T14/NixOS) Updated sdl2 lvgl and fixed some font issues 34c136d 1 month ago 51 Commits
moon / esp32 / main / st7735.h
#pragma once

#include <stdint.h>
#include <stddef.h>
#include "driver/spi_master.h"

// Initialize ST7735 display over SPI
void st7735_init(void);

// Set drawing window (column/row address)
void st7735_set_window(uint16_t x0, uint16_t y0, uint16_t x1, uint16_t y1);

// Write RGB565 pixel data to display (blocking, 2 bytes per pixel)
void st7735_write_pixels(const uint16_t *data, size_t len);

// Queue RGB565 pixel data for async DMA transfer
void st7735_write_pixels_async(const uint16_t *data, size_t len, spi_transaction_t *trans);

// Wait for the previous async transfer to complete
void st7735_wait_async(void);