Optimize ST7796 driver: Use bulk SPI transfers and blocking DMA for higher framerate

This commit is contained in:
Adolfo Reyna
2026-02-11 11:40:26 -05:00
parent 47fc02f05c
commit b59d716965
4 changed files with 69 additions and 2 deletions

View File

@@ -233,6 +233,21 @@ void st7796_set_cursor(uint16_t x, uint16_t y);
*/
void st7796_write(const uint16_t *data, size_t len);
/**
* @brief Write raw buffer data directly to display
*
* Writes a buffer of bytes directly to the display without any
* conversion or byte swapping. This function assume the data is
* already in the correct format (Big-Endian RGB565) for the display.
*
* This is significantly faster for large block transfers than
* st7796_write() as it uses a single SPI transaction.
*
* @param data Pointer to raw byte buffer
* @param len Number of bytes to send
*/
void st7796_write_raw(const uint8_t *data, size_t len);
/**
* @brief Draw a single pixel at specified coordinates
*