feat(spi_lcd): add spi cs timing parameters

Some lcd hardware drivers need different CS setup time. Add pretrans
and posttrans parameters to control the CS time.

Closes https://github.com/espressif/esp-idf/issues/13071
This commit is contained in:
Chen Jichang
2024-07-01 19:23:28 +08:00
parent 9bae186123
commit 8d0990806c
4 changed files with 10 additions and 0 deletions

View File

@@ -29,6 +29,8 @@ typedef struct {
void *user_ctx; /*!< User private data, passed directly to on_color_trans_done's user_ctx */
int lcd_cmd_bits; /*!< Bit-width of LCD command */
int lcd_param_bits; /*!< Bit-width of LCD parameter */
uint8_t cs_ena_pretrans; /*!< Amount of SPI bit-cycles the cs should be activated before the transmission (0-16) */
uint8_t cs_ena_posttrans; /*!< Amount of SPI bit-cycles the cs should stay active after the transmission (0-16) */
struct {
unsigned int dc_high_on_cmd: 1; /*!< If enabled, DC level = 1 indicates command transfer */
unsigned int dc_low_on_data: 1; /*!< If enabled, DC level = 0 indicates color data transfer */