[chore] adds SPI_UPDATE before writing data bits
This commit is contained in:
parent
e5105d99bc
commit
92668553f4
|
|
@ -73,10 +73,10 @@ SPI3_HOST = 2
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_IDF_TARGET_ESP32C3
|
#ifdef CONFIG_IDF_TARGET_ESP32C3
|
||||||
#define SPI_PORT 2 //FSPI(ESP32 C3)
|
#define SPI_PORT 2 //FSPI(ESP32 C3)
|
||||||
#else
|
#else
|
||||||
#define SPI_PORT 2 //FSPI(ESP32 S2)
|
#define SPI_PORT 2 //FSPI(ESP32 S2)
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef RPI_DISPLAY_TYPE
|
#ifdef RPI_DISPLAY_TYPE
|
||||||
|
|
@ -527,10 +527,19 @@ SPI3_HOST = 2
|
||||||
#define tft_Write_32D(C) TFT_WRITE_BITS((uint16_t)((C)<<8 | (C)>>8)<<16 | (uint16_t)((C)<<8 | (C)>>8), 32)
|
#define tft_Write_32D(C) TFT_WRITE_BITS((uint16_t)((C)<<8 | (C)>>8)<<16 | (uint16_t)((C)<<8 | (C)>>8), 32)
|
||||||
//*/
|
//*/
|
||||||
//* Replacement slimmer macros
|
//* Replacement slimmer macros
|
||||||
#define TFT_WRITE_BITS(D, B) *_spi_mosi_dlen = B-1; \
|
#if CONFIG_IDF_TARGET_ESP32C3
|
||||||
*_spi_w = D; \
|
#define TFT_WRITE_BITS(D, B) *_spi_mosi_dlen = B-1; \
|
||||||
*_spi_cmd = SPI_USR; \
|
*_spi_w = D; \
|
||||||
while (*_spi_cmd & SPI_USR);
|
*_spi_cmd = SPI_UPDATE; \
|
||||||
|
while (*_spi_cmd & SPI_UPDATE); \
|
||||||
|
*_spi_cmd = SPI_USR; \
|
||||||
|
while (*_spi_cmd & SPI_USR);
|
||||||
|
#else
|
||||||
|
#define TFT_WRITE_BITS(D, B) *_spi_mosi_dlen = B-1; \
|
||||||
|
*_spi_w = D; \
|
||||||
|
*_spi_cmd = SPI_USR; \
|
||||||
|
while (*_spi_cmd & SPI_USR);
|
||||||
|
#endif
|
||||||
|
|
||||||
// Write 8 bits
|
// Write 8 bits
|
||||||
#define tft_Write_8(C) TFT_WRITE_BITS(C, 8)
|
#define tft_Write_8(C) TFT_WRITE_BITS(C, 8)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue