28 lines
684 B
C
28 lines
684 B
C
#ifndef __GDEW0213M21_EPD_H
|
|
#define __GDEW0213M21_EPD_H
|
|
#include <stdint.h>
|
|
|
|
#define DES_EPD_PANEL_SELECTION gdew0213m21_init_sequence
|
|
|
|
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 (*check_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);
|
|
|
|
#endif |