From 630edf83d9eb59bb58433c05a10a5e6b50f68b60 Mon Sep 17 00:00:00 2001 From: Gunar Schorcht Date: Fri, 8 Sep 2023 09:28:53 +0200 Subject: [PATCH] drivers/st7735: add init sequence support --- drivers/st77xx/include/st77xx_params.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/drivers/st77xx/include/st77xx_params.h b/drivers/st77xx/include/st77xx_params.h index ab8d3555d2a80..dd500cc0afd3f 100644 --- a/drivers/st77xx/include/st77xx_params.h +++ b/drivers/st77xx/include/st77xx_params.h @@ -187,6 +187,20 @@ extern "C" { #define ST77XX_PARAM_IF_MODE #endif +#if MODULE_LCD_INIT_SEQUENCE || DOXYGEN +#ifndef ST77XX_PARAM_INIT_SEQ +#define ST77XX_PARAM_INIT_SEQ (NULL) /**< Init sequence not used by default */ +#endif +#ifndef ST77XX_PARAM_INIT_SEQ_LEN +#define ST77XX_PARAM_INIT_SEQ_LEN 0 /**< Init sequence length is 0 by default */ +#endif +/** Additional default parameters if init sequence is enabled */ +#define ST77XX_PARAMS_INIT .init_seq = ST77XX_PARAM_INIT_SEQ, \ + .init_seq_len = ST77XX_PARAM_INIT_SEQ_LEN, +#else /* MODULE_LCD_INIT_SEQUENCE */ +#define ST77XX_PARAMS_INIT +#endif /* MODULE_LCD_INIT_SEQUENCE */ + /** * @brief Default params * @@ -214,6 +228,7 @@ extern "C" { .rotation = ST77XX_PARAM_ROTATION, \ .offset_x = ST77XX_PARAM_OFFSET_X, \ .offset_y = ST77XX_PARAM_OFFSET_Y, \ + ST77XX_PARAMS_INIT \ } #endif /* ST77XX_PARAMS */ /** @} */