Skip to content

ST7789: Expose send_cmd and send_data to the user #67

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 8, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions lvgl_tft/st7789.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@ typedef struct {
**********************/
static void st7789_set_orientation(uint8_t orientation);

static void st7789_send_cmd(uint8_t cmd);
static void st7789_send_data(void *data, uint16_t length);
static void st7789_send_color(void *data, uint16_t length);

/**********************
Expand Down Expand Up @@ -201,14 +199,14 @@ void st7789_flush(lv_disp_drv_t * drv, const lv_area_t * area, lv_color_t * colo
/**********************
* STATIC FUNCTIONS
**********************/
static void st7789_send_cmd(uint8_t cmd)
void st7789_send_cmd(uint8_t cmd)
{
disp_wait_for_pending_transactions();
gpio_set_level(ST7789_DC, 0);
disp_spi_send_data(&cmd, 1);
}

static void st7789_send_data(void * data, uint16_t length)
void st7789_send_data(void * data, uint16_t length)
{
disp_wait_for_pending_transactions();
gpio_set_level(ST7789_DC, 1);
Expand Down
3 changes: 3 additions & 0 deletions lvgl_tft/st7789.h
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,9 @@ void st7789_init(void);
void st7789_flush(lv_disp_drv_t *drv, const lv_area_t *area, lv_color_t *color_map);
void st7789_enable_backlight(bool backlight);

void st7789_send_cmd(uint8_t cmd);
void st7789_send_data(void *data, uint16_t length);

#ifdef __cplusplus
} /* extern "C" */
#endif
Expand Down