39 lines
1.0 KiB
C
39 lines
1.0 KiB
C
#ifndef __GDEW0213M21_EPD_H
|
|
#define __GDEW0213M21_EPD_H
|
|
#include <stdint.h>
|
|
|
|
#define DES_EPD_PANEL_SELECTION gdew0213m21_init_sequence
|
|
#define DES_EPD_PANEL_SELECTION_PART gdew0213m21_init_sequence_part
|
|
|
|
#if DES_EPD_PANEL_SELECTION == gdew0213m21_init_sequence
|
|
|
|
#define DES_EPD_LUT_VCOM gdew0213m21_lut_vcom
|
|
#define DES_EPD_LUT_WW gdew0213m21_lut_ww
|
|
#define DES_EPD_LUT_BW gdew0213m21_lut_bw
|
|
#define DES_EPD_LUT_WB gdew0213m21_lut_wb
|
|
#define DES_EPD_LUT_BB gdew0213m21_lut_bb
|
|
|
|
#endif
|
|
|
|
typedef enum {
|
|
DES_EPD_OK,
|
|
DES_EPD_ERROR
|
|
} des_epd_ret_t;
|
|
|
|
typedef struct {
|
|
des_epd_ret_t (*write_cmd_cb)(void *handle, uint8_t *cmd, uint8_t len);
|
|
des_epd_ret_t (*write_data_cb)(void *handle, uint8_t *data, uint16_t len);
|
|
des_epd_ret_t (*reset_cb)(void *handle);
|
|
des_epd_ret_t (*poll_busy_cb)(void *handle);
|
|
} des_epd_cb_t;
|
|
|
|
typedef struct {
|
|
void *user_data;
|
|
des_epd_cb_t cb;
|
|
} des_epd_t;
|
|
|
|
#define DES_EPD_ERROR_CHECK(x) if(x != DES_EPD_OK) return DES_EPD_ERROR
|
|
|
|
des_epd_ret_t des_epd_init(des_epd_t *epd, uint8_t partial);
|
|
|
|
#endif |