Skip to content

Commit 7aef151

Browse files
authored
Merge pull request #67 from lvgl/st7789_expose_cmd_api
ST7789: Expose send_cmd and send_data to the user
2 parents 8f4ba03 + 2390771 commit 7aef151

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

lvgl_tft/st7789.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,6 @@ typedef struct {
3535
**********************/
3636
static void st7789_set_orientation(uint8_t orientation);
3737

38-
static void st7789_send_cmd(uint8_t cmd);
39-
static void st7789_send_data(void *data, uint16_t length);
4038
static void st7789_send_color(void *data, uint16_t length);
4139

4240
/**********************
@@ -201,14 +199,14 @@ void st7789_flush(lv_disp_drv_t * drv, const lv_area_t * area, lv_color_t * colo
201199
/**********************
202200
* STATIC FUNCTIONS
203201
**********************/
204-
static void st7789_send_cmd(uint8_t cmd)
202+
void st7789_send_cmd(uint8_t cmd)
205203
{
206204
disp_wait_for_pending_transactions();
207205
gpio_set_level(ST7789_DC, 0);
208206
disp_spi_send_data(&cmd, 1);
209207
}
210208

211-
static void st7789_send_data(void * data, uint16_t length)
209+
void st7789_send_data(void * data, uint16_t length)
212210
{
213211
disp_wait_for_pending_transactions();
214212
gpio_set_level(ST7789_DC, 1);

lvgl_tft/st7789.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,9 @@ void st7789_init(void);
123123
void st7789_flush(lv_disp_drv_t *drv, const lv_area_t *area, lv_color_t *color_map);
124124
void st7789_enable_backlight(bool backlight);
125125

126+
void st7789_send_cmd(uint8_t cmd);
127+
void st7789_send_data(void *data, uint16_t length);
128+
126129
#ifdef __cplusplus
127130
} /* extern "C" */
128131
#endif

0 commit comments

Comments
 (0)