28 lines
787 B
C
28 lines
787 B
C
#ifndef __GDEW042T2_EPD_H
|
|
#define __GDEW042T2_EPD_H
|
|
|
|
#include <stdint.h>
|
|
|
|
typedef enum {
|
|
EPD_OK = 0,
|
|
EPD_ERR = 1
|
|
} gd_epd_042_ret_t;
|
|
|
|
typedef struct {
|
|
gd_epd_042_ret_t (* write_cmd_cb)(void *handle, uint8_t *cmd, uint8_t len);
|
|
gd_epd_042_ret_t (* write_data_cb)(void *handle, uint8_t *data, uint32_t len);
|
|
gd_epd_042_ret_t (* reset_cb)(void *handle);
|
|
gd_epd_042_ret_t (* poll_busy_cb)(void *handle);
|
|
} gd_epd_042_cb_t;
|
|
|
|
typedef struct {
|
|
gd_epd_042_cb_t cb;
|
|
void *user_data;
|
|
} gd_epd_042_t;
|
|
|
|
gd_epd_042_ret_t gd_epd_042_init(gd_epd_042_t *epd);
|
|
gd_epd_042_ret_t gd_epd_042_load(gd_epd_042_t *epd, uint8_t *old_data, uint8_t *new_data);
|
|
gd_epd_042_ret_t gd_epd_042_update(gd_epd_042_t *epd);
|
|
gd_epd_042_ret_t gd_epd_042_deepsleep(gd_epd_042_t *epd);
|
|
|
|
#endif |