28 lines
621 B
C
28 lines
621 B
C
#ifndef __ST7789_LCD_H
|
|
#define __ST7789_LCD_H
|
|
|
|
#include <stdint.h>
|
|
|
|
#define ST7789_PANEL_SELECTION st7789_zjy_240_240_init_sequence
|
|
|
|
#define ST7789_ERROR_CHECK(x) if(x != ST7789_RET_OK) return ST7789_RET_ERR
|
|
|
|
typedef enum {
|
|
ST7789_RET_OK,
|
|
ST7789_RET_ERR
|
|
} st7789_ret_t;
|
|
|
|
typedef struct {
|
|
st7789_ret_t (*write_cmd_cb)(void *handle, uint8_t *cmd, uint16_t len);
|
|
st7789_ret_t (*write_data_cb)(void *handle, uint8_t *data, uint16_t len);
|
|
} st7789_cb_t;
|
|
|
|
typedef struct {
|
|
void *user_data;
|
|
st7789_cb_t cb;
|
|
} st7789_handle_t;
|
|
|
|
st7789_ret_t st7789_lcd_init(st7789_handle_t *lcd);
|
|
|
|
#endif //__ST7789_LCD_H
|