/* * Allwinner SoCs eink driver. * * Copyright (C) 2019 Allwinner. * * This file is licensed under the terms of the GNU General Public * License version 2. This program is licensed "as is" without any * warranty of any kind, whether express or implied. * * File name : sunxi_eink.h * * Description : eink engine 2.0 struct declaration * * History : 2019/03/20 liuli initial version * */ #ifndef _SUNXI_EINK_H_ #define _SUNXI_EINK_H_ enum EINK_CMD { EINK_UPDATE_IMG, EINK_SET_TEMP, EINK_GET_TEMP, EINK_SET_GC_CNT, }; enum upd_mode { EINK_INIT_MODE = 0x01, EINK_DU_MODE = 0x02, EINK_GC16_MODE = 0x04, EINK_GC4_MODE = 0x08, EINK_A2_MODE = 0x10, EINK_GL16_MODE = 0x20, EINK_GLR16_MODE = 0x40, EINK_GLD16_MODE = 0x80, EINK_GU16_MODE = 0x84, /* use self upd win not de*/ EINK_RECT_MODE = 0x400, /* AUTO MODE: auto select update mode by E-ink driver */ EINK_AUTO_MODE = 0x8000, /* EINK_NO_MERGE = 0x80000000,*/ }; enum dither_mode { QUANTIZATION, FLOYD_STEINBERG, ATKINSON, ORDERED, SIERRA_LITE, BURKES, }; struct upd_win { u32 left; u32 top; u32 right; u32 bottom; }; enum upd_pixel_fmt { EINK_Y8 = 0x09, EINK_Y5 = 0x0a, EINK_Y4 = 0x0b, EINK_Y3 = 0x0e, }; struct eink_upd_cfg { struct upd_win upd_win; enum upd_mode upd_mode; enum dither_mode dither_mode; enum upd_pixel_fmt out_fmt; bool force_fresh; bool upd_all_en; bool de_bypass; }; #endif