huangcm
2025-07-03 c26084b3642f262f858535ab4e46c1e9b520d3a1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
/*
 * drivers/video/sunxi/disp2/disp/de/lowlevel_v2x/disp_waveform.h
 *
 * Copyright (c) 2007-2019 Allwinnertech Co., Ltd.
 * Author: zhengxiaobin <zhengxiaobin@allwinnertech.com>
 *
 * This software is licensed under the terms of the GNU General Public
 * License version 2, as published by the Free Software Foundation, and
 * may be copied, distributed, and modified under those terms.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 */
#ifndef DISP_WAVEFORM_H
#define DISP_WAVEFORM_H
 
#include "../include.h"
#if 0
typedef enum update_mode {
   /* ALL AREA flush mode */
   EINK_INIT_MODE     = 0x01,
   EINK_DU_MODE         = 0x02,
   EINK_GC16_MODE     = 0x04,
   EINK_A2_MODE         = 0x10,
   EINK_GC16_LOCAL_MODE    = 0x84,
 
   /* RECTANGLE flush mode */
   EINK_DU_RECT_MODE     = 0x402,
   EINK_GC16_RECT_MODE     = 0x404,
   EINK_A2_RECT_MODE     = 0x410,
   EINK_GC16_LOCAL_RECT_MODE = 0x484
} EINK_UPDATE_MODE;
#endif
typedef enum  {
   ED060SC4 = 0x01,
   ED060SC7 = 0x02,
   OPM060A1 = 0x03,
   ED060XC3 = 0x04,
   ED060XD4 = 0x05
} EINK_PANEL_TYPE;
/*
typedef enum  {
   EINK_BIT_1 = 0x01,
   EINK_BIT_2 = 0x02,
   EINK_BIT_3 = 0x03,
   EINK_BIT_4 = 0x04,
   EINK_BIT_5 = 0x05
} EINK_BIT_NUM;
*/
 
#if 0
#define DEBUG_WAVEFILE
#ifdef DEBUG_WAVEFILE
#define WF_DBG(msg, fmt...)        printk(KERN_WARNING msg, ##fmt)
#define WF_INFO(msg, fmt...)        printk(KERN_WARNING msg, ##fmt)
#define WF_WRN(msg, fmt...)        printk(KERN_WARNING msg, ##fmt)
#define WF_ERR(msg, fmt...)        printk(KERN_ERR msg, ##fmt)
#else
#define WF_DBG(msg, fmt...)
#define WF_INFO(msg, fmt...)
#define WF_WRN(msg, fmt...)        printk(KERN_WARNING msg, ##fmt)
#define WF_ERR(msg, fmt...)        printk(KERN_ERR msg, ##fmt)
#endif
#endif
 
extern __s32 init_waveform(const char *path);
extern int get_eink_panel_type(EINK_PANEL_TYPE *type);
extern int get_eink_panel_bit_num(enum  eink_bit_num *bit_num);
extern int get_waveform_data(u32 mode, u32 temp, u32 *total_frames, u32 *wf_buf);
extern void free_waveform(void);
#endif