feat: Add rfid feature and .gitignore file
This commit is contained in:
134
apps/earphone/include/ui/lcd_seg/lcd_seg3x9_driver.h
Normal file
134
apps/earphone/include/ui/lcd_seg/lcd_seg3x9_driver.h
Normal file
@ -0,0 +1,134 @@
|
||||
#ifndef _LCD_SEG3X9_DRV_H_
|
||||
#define _LCD_SEG3X9_DRV_H_
|
||||
|
||||
typedef struct _lcd_seg3x9_var {
|
||||
u8 bCoordinateX;
|
||||
u8 bFlashChar;
|
||||
u8 bShowBuff[4]; //[0] ~ [3]显示的数字/字母显示的所有段
|
||||
u32 bShowIcon; //每1bit对应LED4的1段, maybe icon > 7段
|
||||
u32 bFlashIcon; //闪烁标志
|
||||
} LCD_SEG3X9_VAR;
|
||||
|
||||
#define LCD_SEG3X9_USB BIT(0) //0: USB图标
|
||||
#define LCD_SEG3X9_SD BIT(1) //1: SD图标
|
||||
#define LCD_SEG3X9_VOL BIT(2) //2: SD图标
|
||||
#define LCD_SEG3X9_MHZ BIT(3) //3: FM图标
|
||||
#define LCD_SEG3X9_DIGIT1 BIT(4) //4: 数字1
|
||||
#define LCD_SEG3X9_2POINT BIT(5) //5: 冒号
|
||||
#define LCD_SEG3X9_DOT BIT(6) //6: 点
|
||||
|
||||
typedef u32 UI_LCD_SEG3X9_ICON;
|
||||
|
||||
struct lcd_seg3x9_pin {
|
||||
u8 pin_com[3];
|
||||
u8 pin_seg[9];
|
||||
};
|
||||
|
||||
enum LCD_SEG3X9_BIAS {
|
||||
LCD_SEG3X9_BIAS_OFF = 0,
|
||||
LCD_SEG3X9_BIAS_1_2, // 1/2 bias
|
||||
LCD_SEG3X9_BIAS_1_3, // 1/3 bias
|
||||
LCD_SEG3X9_BIAS_1_4, // 1/4 bias
|
||||
};
|
||||
|
||||
enum LCD_SEG3X9_COM_NUMBER {
|
||||
LCD_SEG3X9_COM_NUMBER_3 = 0,
|
||||
LCD_SEG3X9_COM_NUMBER_4,
|
||||
LCD_SEG3X9_COM_NUMBER_5,
|
||||
LCD_SEG3X9_COM_NUMBER_6,
|
||||
};
|
||||
|
||||
enum LCD_SEG3X9_VOLTAGE {
|
||||
LCD_SEG3X9_VOLTAGE_2_6V = 0, //000b
|
||||
LCD_SEG3X9_VOLTAGE_2_7V, //001b
|
||||
LCD_SEG3X9_VOLTAGE_2_8V, //010b
|
||||
LCD_SEG3X9_VOLTAGE_2_9V, //011b
|
||||
LCD_SEG3X9_VOLTAGE_3_0V, //100b
|
||||
LCD_SEG3X9_VOLTAGE_3_1V, //101b
|
||||
LCD_SEG3X9_VOLTAGE_3_2V, //110b
|
||||
LCD_SEG3X9_VOLTAGE_3_3V, //111b
|
||||
};
|
||||
|
||||
|
||||
struct lcd_seg3x9_platform_data {
|
||||
enum LCD_SEG3X9_VOLTAGE vlcd;
|
||||
enum LCD_SEG3X9_BIAS bias;
|
||||
struct lcd_seg3x9_pin pin_cfg;
|
||||
};
|
||||
|
||||
|
||||
//=================================================================================//
|
||||
// 关于LCD段码屏接线问题 //
|
||||
// 1.COM口需要从COM0按顺序开始连接, 如3COM, 则IO必须占用COM0/1/2,而不能COM1/2/3;
|
||||
// 2.COM0/1/2与LCD屏可以不按照对应需要接线, 如:
|
||||
// LCD_COM0 --> CHIP_COM2;
|
||||
// LCD_COM1 --> CHIP_COM1;
|
||||
// LCD_COM2 --> CHIP_COM0;
|
||||
// 但一般建议按顺序接线;
|
||||
// 2.SEG可以根据实际情况选择SEG0~SEG21接线, 如;
|
||||
// LCD_SEG0 --> CHIP_SEG7;
|
||||
// LCD_SEG1 --> CHIP_SEG8;
|
||||
// LCD_SEG2 --> CHIP_SEG9;
|
||||
//=================================================================================//
|
||||
#define LCD_SEG3X9_PLATFORM_DATA_BEGIN(data) \
|
||||
const struct lcd_seg3x9_platform_data data = {
|
||||
|
||||
#define LCD_SEG3X9_PLATFORM_DATA_END() \
|
||||
};
|
||||
|
||||
//UI LED7 API:
|
||||
//=================================================================================//
|
||||
// 模块初始化显示接口 //
|
||||
//=================================================================================//
|
||||
void lcd_seg3x9_init(const struct lcd_seg3x9_platform_data *_data);
|
||||
const struct ui_display_api *ui_lcd_seg3x9_init(void *para);
|
||||
//=================================================================================//
|
||||
// 设置显示坐标接口 //
|
||||
/*
|
||||
___ ___ ___
|
||||
|___| |___| |___|
|
||||
|___| |___| |___|
|
||||
---0------1------2----> X
|
||||
*/
|
||||
//=================================================================================//
|
||||
void lcd_seg3x9_setX(u8 X);
|
||||
|
||||
//=================================================================================//
|
||||
// 字符类显示接口 //
|
||||
//=================================================================================//
|
||||
void lcd_seg3x9_show_char(u8 chardata); //显示字符(追加方式)
|
||||
void lcd_seg3x9_flash_char_start(u8 index); //闪烁单个字符
|
||||
void lcd_seg3x9_flash_char_stop(u8 index); //取消闪烁单个字符
|
||||
void lcd_seg3x9_show_string(u8 *str); //显示字符串(追加方式)
|
||||
void lcd_seg3x9_show_string_reset_x(u8 *str); //显示字符串, x从0开始
|
||||
void lcd_seg3x9_show_string_align_right(u8 *str); //led7显示字符串(清屏&右方式)
|
||||
void lcd_seg3x9_show_string_align_left(u8 *str); //led7显示字符串(清屏&左方式)
|
||||
|
||||
//=================================================================================//
|
||||
// 数字类显示接口 //
|
||||
//=================================================================================//
|
||||
void lcd_seg3x9_show_number(u16 val); //显示数字(清屏&高位显示0)
|
||||
void lcd_seg3x9_show_number2(u16 val); //显示数字(清屏&高位不显示)
|
||||
void lcd_seg3x9_show_number_add(u16 val); //显示数字(追加方式)
|
||||
|
||||
//=================================================================================//
|
||||
// 图标类显示接口 //
|
||||
//=================================================================================//
|
||||
void lcd_seg3x9_show_icon(UI_LCD_SEG3X9_ICON icon); //显示单个图标(追加)
|
||||
void lcd_seg3x9_flash_icon(UI_LCD_SEG3X9_ICON icon); //闪烁单个图标(追加)
|
||||
|
||||
//=================================================================================//
|
||||
// 模式类类显示接口 //
|
||||
//=================================================================================//
|
||||
|
||||
//=================================================================================//
|
||||
// 清屏类显示接口 //
|
||||
//=================================================================================//
|
||||
void lcd_seg3x9_show_null(void); //清除所有显示(数字,字符串和图标)
|
||||
void lcd_seg3x9_clear_string(void); //清除显示数字和字母
|
||||
void lcd_seg3x9_clear_icon(UI_LCD_SEG3X9_ICON icon); //清除显示单个图标
|
||||
void lcd_seg3x9_clear_all_icon(void); //清除显示所有图标
|
||||
|
||||
|
||||
#endif /* #ifndef _LCD_SEG3X9_DRV_H_ */
|
||||
|
||||
363
apps/earphone/include/ui/lcd_simple/menu.h
Normal file
363
apps/earphone/include/ui/lcd_simple/menu.h
Normal file
@ -0,0 +1,363 @@
|
||||
|
||||
//generated by ResBuilder in 2011//
|
||||
|
||||
#ifndef _MENU_H_
|
||||
#define _MENU_H_
|
||||
|
||||
////StringResID Define Table////
|
||||
#define Chinese_Simplified 1
|
||||
#define Chinese_Traditional 2
|
||||
#define Japanese 3
|
||||
#define Korean 4
|
||||
#define English 5
|
||||
#define French 6
|
||||
#define German 7
|
||||
#define Italian 8
|
||||
#define Dutch 9
|
||||
#define Portuguese 10
|
||||
#define Spanish 11
|
||||
#define Swedish 12
|
||||
#define Czech 13
|
||||
#define Danish 14
|
||||
#define Polish 15
|
||||
#define Russian 16
|
||||
#define Turkey 17
|
||||
#define Hebrew 18
|
||||
#define Thai 19
|
||||
#define Hungarian 20
|
||||
#define Romanian 21
|
||||
#define Arabic 22
|
||||
|
||||
#define LANGUAGEID_SUM 22
|
||||
|
||||
|
||||
|
||||
////Multi Language Define Table////
|
||||
#define vplaym1 1
|
||||
#define mplay2 2
|
||||
#define mplay4 3
|
||||
#define mplay5 4
|
||||
#define vstopm1 5
|
||||
#define vstopm2 6
|
||||
#define udisk 7
|
||||
#define cdelfile 8
|
||||
#define cdelall 9
|
||||
#define mstop5 10
|
||||
#define vloopm1 11
|
||||
#define vloopm2 12
|
||||
#define vloopm3 13
|
||||
#define vloopm4 14
|
||||
#define vloopm5 15
|
||||
#define vloopm6 16
|
||||
#define meq1 17
|
||||
#define meq2 18
|
||||
#define meq3 19
|
||||
#define meq4 20
|
||||
#define meq5 21
|
||||
#define meq6 22
|
||||
#define meq7 23
|
||||
#define meq8 24
|
||||
#define recpara 25
|
||||
#define mrstop3 26
|
||||
#define rsetgain 27
|
||||
#define main2 28
|
||||
#define mbps 29
|
||||
#define msrate 30
|
||||
#define smain7 31
|
||||
#define mrbps0 32
|
||||
#define mrbps1 33
|
||||
#define mrbps2 34
|
||||
#define mrbps3 35
|
||||
#define mrbps4 36
|
||||
#define mrbps5 37
|
||||
#define mrbps6 38
|
||||
#define mrbps7 39
|
||||
#define mrbps8 40
|
||||
#define mrbps9 41
|
||||
#define mrbps10 42
|
||||
#define mrbps11 43
|
||||
#define srate48k 44
|
||||
#define srate32k 45
|
||||
#define srate24k 46
|
||||
#define srate16k 47
|
||||
#define srate12k 48
|
||||
#define record1 49
|
||||
#define record2 50
|
||||
#define record 51
|
||||
#define rsaving 52
|
||||
#define fmenu16 53
|
||||
#define sreplay1 54
|
||||
#define fmenu1 55
|
||||
#define fmenu15 56
|
||||
#define fmfreq 57
|
||||
#define fmenu2 58
|
||||
#define fmenu3 59
|
||||
#define smain1 60
|
||||
#define smain2 61
|
||||
#define smain3 62
|
||||
#define s_tools 63
|
||||
#define kvoice1 64
|
||||
#define kvoice2 65
|
||||
#define smain6 66
|
||||
#define smain8 67
|
||||
#define smain9 68
|
||||
#define slan1 69
|
||||
#define slan3 70
|
||||
#define slan4 71
|
||||
#define slan5 72
|
||||
#define slan2 73
|
||||
#define slan6 74
|
||||
#define slan7 75
|
||||
#define slan8 76
|
||||
#define slan9 77
|
||||
#define slan10 78
|
||||
#define slan11 79
|
||||
#define slan12 80
|
||||
#define slan13 81
|
||||
#define slan14 82
|
||||
#define slan15 83
|
||||
#define slan16 84
|
||||
#define slan17 85
|
||||
#define slan18 86
|
||||
#define slan19 87
|
||||
#define slan20 88
|
||||
#define slan21 89
|
||||
#define slan22 90
|
||||
#define smain4 91
|
||||
#define clock 92
|
||||
#define fmset 93
|
||||
#define alarmon 94
|
||||
#define alarmoff 95
|
||||
#define alarmtm 96
|
||||
#define alarmcyc 97
|
||||
#define alarmmus 98
|
||||
#define alarmvol 99
|
||||
#define ringonce 100
|
||||
#define ringday 101
|
||||
#define ringweek 102
|
||||
#define ringinl 103
|
||||
#define fm_rmon 104
|
||||
#define fm_rtue 105
|
||||
#define fm_rwed 106
|
||||
#define fm_rthu 107
|
||||
#define fm_rfri 108
|
||||
#define fm_rsat 109
|
||||
#define fm_rsun 110
|
||||
#define timingfmon 111
|
||||
#define timingfmoff 112
|
||||
#define fmrecordon 113
|
||||
#define fmrecordoff 114
|
||||
#define fmtime 115
|
||||
#define fm_manual 116
|
||||
#define fmautoload 117
|
||||
#define fm_switch 118
|
||||
#define fm_vol 119
|
||||
#define t_cal 120
|
||||
#define t_music 121
|
||||
#define t_record 122
|
||||
#define t_fm 123
|
||||
#define t_sys 124
|
||||
#define f_browse 125
|
||||
#define alarm1 126
|
||||
#define t_ebook 127
|
||||
#define sel_file 128
|
||||
#define play_set 129
|
||||
#define handplay 130
|
||||
#define autoplay 131
|
||||
#define playspeed 132
|
||||
|
||||
#define STRINGID_SUM 132
|
||||
|
||||
|
||||
|
||||
////BmpResID Define Table////
|
||||
#define CH_NOFILE 1
|
||||
#define CLOCK 2
|
||||
#define CLOCKA 3
|
||||
#define CONTRSTW 4
|
||||
#define DELLA 5
|
||||
#define DIRROOTA 6
|
||||
#define EBOOK 7
|
||||
#define EBOOKA 8
|
||||
#define ENGDELLA 9
|
||||
#define EN_NOFILE 10
|
||||
#define FM 11
|
||||
#define FMA 12
|
||||
#define MMP3 13
|
||||
#define MUSIC1 14
|
||||
#define MUSICA 15
|
||||
#define MWAV 16
|
||||
#define MWMA 17
|
||||
#define NOUDISK 18
|
||||
#define PMDSCOM 19
|
||||
#define RTC_NUM_0 20
|
||||
#define RTC_NUM_1 21
|
||||
#define RTC_NUM_2 22
|
||||
#define RTC_NUM_3 23
|
||||
#define RTC_NUM_4 24
|
||||
#define RTC_NUM_5 25
|
||||
#define RTC_NUM_6 26
|
||||
#define RTC_NUM_7 27
|
||||
#define RTC_NUM_8 28
|
||||
#define RTC_NUM_9 29
|
||||
#define RTC_NUM_A 30
|
||||
#define RTC_NUM_B 31
|
||||
#define RECORD1 32
|
||||
#define RECORDA 33
|
||||
#define SDMMC 34
|
||||
#define SIGNAL_1 35
|
||||
#define SIGNAL_2 36
|
||||
#define SIGNAL_3 37
|
||||
#define SIGNAL_4 38
|
||||
#define SIGNAL_5 39
|
||||
#define SIGNAL_6 40
|
||||
#define SYSTEM1 41
|
||||
#define SYSTEMA 42
|
||||
#define UDISK 43
|
||||
#define UDISKOUT 44
|
||||
#define ACTIVE 45
|
||||
#define ALARM 46
|
||||
#define ALARM_C 47
|
||||
#define ALARM_CA 48
|
||||
#define ALARM_O 49
|
||||
#define ALARM_OA 50
|
||||
#define ALARM_T 51
|
||||
#define ALARM_TA 52
|
||||
#define ALARM_V 53
|
||||
#define ALARM_VA 54
|
||||
#define ALMICON 55
|
||||
#define BATTERY01 56
|
||||
#define BATTERY02 57
|
||||
#define BATTERY03 58
|
||||
#define BATTERY04 59
|
||||
#define BATTERY05 60
|
||||
#define BATTERY06 61
|
||||
#define BIGBAT1 62
|
||||
#define BIGBAT2 63
|
||||
#define BIGBAT3 64
|
||||
#define BIGBAT4 65
|
||||
#define BIGBAT5 66
|
||||
#define BKCLR1 67
|
||||
#define BPS128 68
|
||||
#define BPS160 69
|
||||
#define BPS48 70
|
||||
#define BPS64 71
|
||||
#define BPS96 72
|
||||
#define C_NOSEL 73
|
||||
#define C_SEL 74
|
||||
#define CALENDAR 75
|
||||
#define CALENDAR1 76
|
||||
#define CALENDAR2 77
|
||||
#define CARDOUT 78
|
||||
#define CDEL_NO 79
|
||||
#define CDEL_YES 80
|
||||
#define CHNDEL 81
|
||||
#define CHNSAVE 82
|
||||
#define CHNWAIT 83
|
||||
#define CONTRSTB 84
|
||||
#define CYCLE1 85
|
||||
#define CYCLE2 86
|
||||
#define CYCLE3 87
|
||||
#define CYCLE4 88
|
||||
#define DELFILE 89
|
||||
#define DISCERR 90
|
||||
#define EDELFILE 91
|
||||
#define EFICON 92
|
||||
#define ENGCOUT 93
|
||||
#define ENGDEL 94
|
||||
#define ENGDICERR 95
|
||||
#define ENGNOCARD 96
|
||||
#define ENGNODISK 97
|
||||
#define ENGNOSPAC 98
|
||||
#define ENGSAVE 99
|
||||
#define ENGUOUT 100
|
||||
#define ENGWAIT 101
|
||||
#define ENOFILE 102
|
||||
#define EQCLAS 103
|
||||
#define EQDBB 104
|
||||
#define EQJAZZ 105
|
||||
#define EQNOR 106
|
||||
#define EQPOP 107
|
||||
#define EQROCK 108
|
||||
#define EQSOFT 109
|
||||
#define EQWOW 110
|
||||
#define FLASH 111
|
||||
#define FMUSIC 112
|
||||
#define FOLDER 113
|
||||
#define FOLDERM 114
|
||||
#define FQBAR 115
|
||||
#define FQBAR2 116
|
||||
#define GOODBYTE 117
|
||||
#define LARROW 118
|
||||
#define LINEIN1 119
|
||||
#define LINEIN2 120
|
||||
#define LINEINBIG 121
|
||||
#define LINEINXXX 122
|
||||
#define LOGOFM 123
|
||||
#define LOWBAT 124
|
||||
#define MICIN 125
|
||||
#define MLOOP1 126
|
||||
#define MLOOP2 127
|
||||
#define MLOOP3 128
|
||||
#define MLOOP4 129
|
||||
#define MLOOP5 130
|
||||
#define MLOOP6 131
|
||||
#define MP3_128 132
|
||||
#define MP3_16 133
|
||||
#define MP3_192 134
|
||||
#define MP3_24K 135
|
||||
#define MP3_256 136
|
||||
#define MP3_32 137
|
||||
#define MP3_320 138
|
||||
#define MP3_32K 139
|
||||
#define MP3_48 140
|
||||
#define MP3_48K 141
|
||||
#define MP3_64 142
|
||||
#define MP3_8 143
|
||||
#define MP3_96 144
|
||||
#define MREC 145
|
||||
#define MWAV128K 146
|
||||
#define MWAV176K 147
|
||||
#define MWAV192K 148
|
||||
#define MWAV256K 149
|
||||
#define MWAV32K 150
|
||||
#define MWAV353K 151
|
||||
#define MWAV384K 152
|
||||
#define MWAV64K 153
|
||||
#define MWMA128K 154
|
||||
#define MWMA176K 155
|
||||
#define MWMA192K 156
|
||||
#define MWMA32K 157
|
||||
#define MWMA64K 158
|
||||
#define MWMA96K 159
|
||||
#define NO_ICON 160
|
||||
#define NOCARD 161
|
||||
#define NOFILE 162
|
||||
#define NOMEMORY 163
|
||||
#define NONGZI 164
|
||||
#define OFF_SEL 165
|
||||
#define ON_SEL 166
|
||||
#define PAUSE 167
|
||||
#define PAUSE1 168
|
||||
#define RARROW 169
|
||||
#define REC_FILE 170
|
||||
#define RECSAVE 171
|
||||
#define SCANSD1 172
|
||||
#define SCANSDMMC 173
|
||||
#define SCANUD1 174
|
||||
#define SCANUDISK 175
|
||||
#define SLIDER 176
|
||||
#define SLIDER_P 177
|
||||
#define TOOLP 178
|
||||
#define TOOLPA 179
|
||||
#define UNACTIVE 180
|
||||
#define WAV_12K 181
|
||||
#define WAV_16K 182
|
||||
#define WAV_24K 183
|
||||
#define WAV_32K 184
|
||||
#define WAV_48K 185
|
||||
#define WAV_8K 186
|
||||
|
||||
#define BMPID_SUM 186
|
||||
|
||||
#endif
|
||||
76
apps/earphone/include/ui/lcd_simple/ui.h
Normal file
76
apps/earphone/include/ui/lcd_simple/ui.h
Normal file
@ -0,0 +1,76 @@
|
||||
#ifndef __LCDSIMULATOR_H__
|
||||
#define __LCDSIMULATOR_H__
|
||||
|
||||
#include "menu.h"
|
||||
#include "font/language_list.h"
|
||||
#include "typedef.h"
|
||||
|
||||
// #define USE_BLANK_FUNC 1
|
||||
// #define LCDPAGE 8
|
||||
// #define LCDCOLUMN 128
|
||||
// #define SCR_WIDTH LCDCOLUMN
|
||||
// #define SCR_HEIGHT (LCDPAGE*8)
|
||||
|
||||
#define MENUICONWIDTH 12 //菜单项目左边图标的宽度(象素)
|
||||
#define MENUITEMHEIGHT 16 //菜单项目的高度(象素)
|
||||
#define SCROLLBARWIDTH 6 //垂直滚动条的宽度(象素)
|
||||
#define MENUITEMSUMPERSCR (SCR_HEIGHT/MENUITEMHEIGHT) //每屏可显示的最大菜单项
|
||||
#define MENUITEMPAGEHEIGHT 2 //每个菜单项所占的页数 2个LCDPAGE --> 2*8=16个像素
|
||||
|
||||
#define RESFILESTARTADDRESS 0 //资源文件的起始地址
|
||||
|
||||
|
||||
#define PROGRESSLENGTH 100 //进度条长度(象素)
|
||||
#define SLIDERLENGTH 100 //滑动条长度(象素)
|
||||
#define SLIDERMOVESTEP 5 //滑动块的移动步长
|
||||
#define SLIDER_NOMOVE_TIMEEXIT 10 //滑动条不动超过此时间自动退出,(*0.5S)
|
||||
|
||||
#define MENUWAITTIME (8*2) //菜单界面不操作超过MENUWAITTIME时间则自动返回
|
||||
|
||||
#define ntohl(x) (unsigned long)((x>>24)|((x>>8)&0xff00)|(x<<24)|((x&0xff00)<<8))
|
||||
#define ntoh(x) (unsigned short int )((x>>8&0x00ff)|x<<8&0xff00)
|
||||
|
||||
//#pragma pack(1)
|
||||
typedef u8(* FUN)(u8 mode);
|
||||
|
||||
typedef struct _MENULIST {
|
||||
u8 ItemSum; //菜单项目总数
|
||||
u8 ActiveItemNum; //当前活动菜单项目序号:1--ItemSum
|
||||
u8 IconID[2]; //第一个为菜单选中时显示图标的ID号,第二个为菜单未选中时显示图标的ID号
|
||||
u16 TitleID; //菜单的标题字符串ID号,没有标题此值为0
|
||||
u16 *ItemString; //菜单项目对应的字符串ID号
|
||||
// FUN fun;
|
||||
} MENULIST;
|
||||
|
||||
//////函数声明//////
|
||||
|
||||
u8 TurnPixelReverse_Page(u8 startpage, u8 pagelen);
|
||||
u8 TurnPixelReverse_Rect(u8 left, u8 top, u8 right, u8 bottom);
|
||||
|
||||
void UI_MenuSelectOn(u8 showitemnum);
|
||||
void Scrol_String(u16 StringID);
|
||||
u8 SetScrollBar(u8 Start_x);
|
||||
u8 SetSlideBlock(u8 Start_x, u8 Start_y);
|
||||
|
||||
u8 UI_Slider(FUN gslider);
|
||||
u8 UI_Progress(u8 currentpos, u8 progress_y_pos, u8 progresslength);
|
||||
u8 SetSlider(u8 start_x, u8 start_y, u8 length);
|
||||
u8 SetProgress(u8 start_x, u8 start_y, u8 length);
|
||||
u8 ClearLcdBuf_Page(u8 startpage, u8 pagelen);
|
||||
u8 ClearLcdBuf_Rect(u8 left, u8 top, u8 right, u8 bottom);
|
||||
u8 draw_slider(s8 currentpos, u8 slider_y_pos, u8 sliderlength);
|
||||
#define UI_SLIDER_CURR_VALUE 0
|
||||
#define UI_SLIDER_DEC 1
|
||||
#define UI_SLIDER_INC 2
|
||||
|
||||
extern s8 MenuItemSelectOnNum; //当前屏幕活动page序号:0--(MENUITEMSUMPERSCR-1)
|
||||
extern s8 CurrentScreenNum; //当前所处屏幕数,从0序号开始
|
||||
extern u8 NeedScreenSumViaItem; //菜单项目总数将占用屏幕的屏数
|
||||
extern u8 LaseScreenRemainMenuItem; //最后一屏只需显示的菜单项目数
|
||||
extern u8 LanguageMode;
|
||||
|
||||
extern void clear_lcd();
|
||||
extern void draw_lcd(u8 start_page, u8 page_len);
|
||||
extern void clear_lcd_area(u8 start_page, u8 end_page);
|
||||
|
||||
#endif
|
||||
21
apps/earphone/include/ui/lcd_simple/ui_mainmenu.h
Normal file
21
apps/earphone/include/ui/lcd_simple/ui_mainmenu.h
Normal file
@ -0,0 +1,21 @@
|
||||
#ifndef __UI_MAINMENU_H__
|
||||
#define __UI_MAINMENU_H__
|
||||
|
||||
#define AUTORUNTIMEMAX 10
|
||||
#define TASKTOTLE 24 //任务总数
|
||||
#define SCREENSHOWTASKSUM 5 //屏幕需显示的任务图标
|
||||
//#define SHOWTASKSUM 8 //需显示的任务图标总数
|
||||
|
||||
typedef struct {
|
||||
u8 taskname[16]; //任务名
|
||||
u16 bmpID; //该任务在主界面显示的图标
|
||||
u16 strID; //该任务在主界面显示的字符串
|
||||
u8 showflag; //标识该任务是否显式的显示任务图标
|
||||
} TASKSTRUCT;
|
||||
|
||||
extern const TASKSTRUCT taskbuf[TASKTOTLE];
|
||||
extern u8 taskshow[TASKTOTLE];
|
||||
|
||||
u8 UI_mainmenu(s8 apprun);
|
||||
void findtaskexist(u8 tasksum);
|
||||
#endif
|
||||
150
apps/earphone/include/ui/lcd_spi/lcd_drive.h
Normal file
150
apps/earphone/include/ui/lcd_spi/lcd_drive.h
Normal file
@ -0,0 +1,150 @@
|
||||
#ifndef __SPI_LCD_DRIVER_H
|
||||
#define __SPI_LCD_DRIVER_H
|
||||
|
||||
|
||||
#include "asm/spi.h"
|
||||
|
||||
|
||||
#if (SPI_LCD_DEBUG_ENABLE == 0)
|
||||
#define lcd_d(...)
|
||||
#define lcd_w(...)
|
||||
#define lcd_e(fmt, ...) printf("[LCD ERROR]: "fmt, ##__VA_ARGS__)
|
||||
#elif (SPI_LCD_DEBUG_ENABLE == 1)
|
||||
#define lcd_d(...)
|
||||
#define lcd_w(fmt, ...) printf("[LCD WARNING]: "fmt, ##__VA_ARGS__)
|
||||
#define lcd_e(fmt, ...) printf("[LCD ERROR]: "fmt, ##__VA_ARGS__)
|
||||
#else
|
||||
#define lcd_d(fmt, ...) printf("[LCD DEBUG]: "fmt, ##__VA_ARGS__)
|
||||
#define lcd_w(fmt, ...) printf("[LCD WARNING]: "fmt, ##__VA_ARGS__)
|
||||
#define lcd_e(fmt, ...) printf("[LCD ERROR]: "fmt, ##__VA_ARGS__)
|
||||
#endif
|
||||
|
||||
// 两毫秒延时
|
||||
extern void delay_2ms(int cnt);
|
||||
#define delay2ms(t) delay_2ms(t)
|
||||
|
||||
|
||||
/* 定义初始化数据结构体 */
|
||||
typedef struct {
|
||||
u8 cmd; // 地址
|
||||
u8 cnt; // 数据个数
|
||||
u8 dat[64]; // 数据
|
||||
} InitCode;
|
||||
|
||||
#define REGFLAG_DELAY 0xFF
|
||||
|
||||
struct spi_lcd_init {
|
||||
char *name; // 名称
|
||||
u8 spi_pending;
|
||||
u8 soft_spi;
|
||||
u16 lcd_width;
|
||||
u16 lcd_height;
|
||||
u8 color_format;
|
||||
u8 interface;
|
||||
u8 column_addr_align;
|
||||
u8 row_addr_align;
|
||||
u8 backlight_status;
|
||||
u8 *dispbuf;
|
||||
u32 bufsize;
|
||||
InitCode *initcode; // 初始化代码
|
||||
u16 initcode_cnt; // 初始化代码条数
|
||||
void (*Init)(void);
|
||||
void (*WriteComm)(u16 cmd); // 写命令
|
||||
void (*WriteData)(u16 dat); // 写数据
|
||||
void (*WriteMap)(char *map, int size); // 写整个buf
|
||||
void (*WritePAGE)(char *map, u8 page_star, u8 page_len); // 写page
|
||||
void (*SetDrawArea)(int, int, int, int);
|
||||
void (*Reset)(void);
|
||||
void (*BackLightCtrl)(u8);
|
||||
void (*EnterSleep)();
|
||||
void (*ExitSleep)();
|
||||
};
|
||||
|
||||
|
||||
void spi_dma_send_byte(u8 dat);
|
||||
void spi_dma_send_map(u8 *map, u32 size);
|
||||
void SPI_LcdTest();
|
||||
|
||||
|
||||
|
||||
|
||||
struct lcd_spi_platform_data {
|
||||
u32 pin_reset;
|
||||
u32 pin_cs;
|
||||
u32 pin_rs;
|
||||
u32 pin_bl;
|
||||
spi_dev spi_cfg;
|
||||
const struct spi_platform_data *spi_pdata;
|
||||
};
|
||||
|
||||
|
||||
|
||||
// LCD 初始化接口
|
||||
#define REGISTER_LCD_DRIVE() \
|
||||
const struct spi_lcd_init dev_drive
|
||||
|
||||
enum LCD_COLOR {
|
||||
LCD_COLOR_RGB565,
|
||||
LCD_COLOR_MONO,
|
||||
};
|
||||
|
||||
enum LCD_IF {
|
||||
LCD_SPI,
|
||||
LCD_EMI,
|
||||
};
|
||||
|
||||
struct lcd_info {
|
||||
u16 width;
|
||||
u16 height;
|
||||
u8 color_format;
|
||||
u8 interface;
|
||||
u8 col_align;
|
||||
u8 row_align;
|
||||
u8 bl_status;
|
||||
};
|
||||
|
||||
|
||||
struct lcd_interface {
|
||||
void (*init)(void *);
|
||||
void (*get_screen_info)(struct lcd_info *info);
|
||||
void (*buffer_malloc)(u8 **buf, u32 *size);
|
||||
void (*buffer_free)(u8 *buf);
|
||||
void (*draw)(u8 *buf, u32 len, u8 wait);
|
||||
void (*set_draw_area)(u16 xs, u16 xe, u16 ys, u16 ye);
|
||||
void (*clear_screen)(u16 color);
|
||||
int (*backlight_ctrl)(u8 on);
|
||||
void (*draw_page)(u8 *buf, u8 page_star, u8 page_len);
|
||||
};
|
||||
|
||||
extern struct lcd_interface lcd_interface_begin[];
|
||||
extern struct lcd_interface lcd_interface_end[];
|
||||
|
||||
#define REGISTER_LCD_INTERFACE(lcd) \
|
||||
static const struct lcd_interface lcd sec(.lcd_if_info) __attribute__((used))
|
||||
|
||||
struct lcd_interface *lcd_get_hdl();
|
||||
|
||||
#define LCD_SPI_PLATFORM_DATA_BEGIN(data) \
|
||||
const struct lcd_spi_platform_data data = {
|
||||
|
||||
#define LCD_SPI__PLATFORM_DATA_END() \
|
||||
};
|
||||
|
||||
|
||||
void lcd_reset_l();
|
||||
void lcd_reset_h();
|
||||
void lcd_cs_l();
|
||||
void lcd_cs_h();
|
||||
void lcd_rs_l();
|
||||
void lcd_rs_h();
|
||||
void lcd_bl_l();
|
||||
void lcd_bl_h();
|
||||
u8 lcd_bl_io();
|
||||
|
||||
extern int lcd_backlight_status();
|
||||
u8 lcd_spi_recv_byte();
|
||||
int lcd_spi_send_byte(u8 byte);
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
143
apps/earphone/include/ui/led7/led7_driver.h
Normal file
143
apps/earphone/include/ui/led7/led7_driver.h
Normal file
@ -0,0 +1,143 @@
|
||||
#ifndef _LED7_DRV_H_
|
||||
#define _LED7_DRV_H_
|
||||
|
||||
|
||||
typedef struct _led7_VAR {
|
||||
u8 bCoordinateX;
|
||||
u8 bFlashChar;
|
||||
u8 bShowBuff[4]; //[0] ~ [3]显示的数字/字母显示的所有段
|
||||
u32 bShowIcon; //每1bit对应LED4的1段, maybe icon > 7段
|
||||
u32 bFlashIcon; //闪烁标志
|
||||
u8 bShowBuff1[9]; //[i]->第i个管脚, value的每一bit对应一个管脚, scan时使用
|
||||
} LED7_VAR;
|
||||
|
||||
#define LED7_PLAY BIT(0) //0: 播放图标
|
||||
#define LED7_PAUSE BIT(1) //1: 暂停图标
|
||||
#define LED7_USB BIT(2) //2: USB图标
|
||||
#define LED7_SD BIT(3) //3: SD图标
|
||||
#define LED7_2POINT BIT(4) //4: 冒号图标
|
||||
#define LED7_FM BIT(5) //5: FM图标
|
||||
#define LED7_DOT BIT(6) //6: 小数点图标
|
||||
#define LED7_MP3 BIT(7) //7: MP3图标
|
||||
#define LED7_REPEAT BIT(8) //8: REPEAT图标
|
||||
#define LED7_CHARGE BIT(9) //9: 充电图标
|
||||
#define LED7_BT BIT(10) //10: 充电图标
|
||||
#define LED7_AUX BIT(11) //11: AUX图标
|
||||
#define LED7_WMA BIT(12) //12: WMA图标
|
||||
|
||||
typedef u32 UI_LED7_ICON;
|
||||
|
||||
typedef enum _led7_pin_type {
|
||||
LED7_PIN7, //7个引脚
|
||||
LED7_PIN12, //12个引脚
|
||||
LED7_PIN13, //13个引脚
|
||||
} LED7_PIN_TYPE;
|
||||
|
||||
struct seg2pin {
|
||||
u8 pinH;
|
||||
u8 pinL;
|
||||
};
|
||||
|
||||
struct icon_seg2pin {
|
||||
UI_LED7_ICON icon;
|
||||
struct seg2pin seg2pin;
|
||||
};
|
||||
|
||||
struct led7_pin7 {
|
||||
u8 pin[7];
|
||||
};
|
||||
|
||||
struct led7_pin12 {
|
||||
u8 pin_comh[5];
|
||||
u8 pin_segl[7];
|
||||
};
|
||||
|
||||
struct led7_pin13 {
|
||||
u8 pin_com[6];
|
||||
u8 pin_seg[7];
|
||||
};
|
||||
|
||||
|
||||
union led7_pin_cfg {
|
||||
struct led7_pin7 pin7;
|
||||
struct led7_pin12 pin12;
|
||||
struct led7_pin13 pin13;
|
||||
};
|
||||
|
||||
#define LED_A BIT(0)
|
||||
#define LED_B BIT(1)
|
||||
#define LED_C BIT(2)
|
||||
#define LED_D BIT(3)
|
||||
#define LED_E BIT(4)
|
||||
#define LED_F BIT(5)
|
||||
#define LED_G BIT(6)
|
||||
#define LED_H BIT(7)
|
||||
|
||||
|
||||
struct led7_platform_data {
|
||||
LED7_PIN_TYPE pin_type;
|
||||
union led7_pin_cfg pin_cfg;
|
||||
};
|
||||
|
||||
#define LED7_PLATFORM_DATA_BEGIN(data) \
|
||||
const struct led7_platform_data data = {
|
||||
|
||||
#define LED7_PLATFORM_DATA_END() \
|
||||
};
|
||||
|
||||
//UI LED7 API:
|
||||
//=================================================================================//
|
||||
// 模块初始化显示接口 //
|
||||
//=================================================================================//
|
||||
void *led7_init(const struct led7_platform_data *_data);
|
||||
const struct ui_display_api *ui_led7_init(void *para);
|
||||
|
||||
//=================================================================================//
|
||||
// 设置显示坐标接口 //
|
||||
/*
|
||||
___ ___ ___ ___
|
||||
|___| |___| |___| |___|
|
||||
|___| |___| |___| |___|
|
||||
---0------1------2------3------> X
|
||||
*/
|
||||
//=================================================================================//
|
||||
void led7_setX(u8 X);
|
||||
|
||||
//=================================================================================//
|
||||
// 字符类显示接口 //
|
||||
//=================================================================================//
|
||||
void led7_show_char(u8 chardata); //显示字符(追加方式)
|
||||
void led7_flash_char_start(u8 index); //闪烁单个字符
|
||||
void led7_flash_char_stop(u8 index); //取消闪烁单个字符
|
||||
void led7_show_string(u8 *str); //显示字符串(追加方式)
|
||||
void led7_show_string_reset_x(u8 *str); //显示字符串, x从0开始
|
||||
void led7_show_string_align_right(u8 *str); //led7显示字符串(清屏&右方式)
|
||||
void led7_show_string_align_left(u8 *str); //led7显示字符串(清屏&左方式)
|
||||
|
||||
//=================================================================================//
|
||||
// 数字类显示接口 //
|
||||
//=================================================================================//
|
||||
void led7_show_number(u16 val); //显示数字(清屏&高位显示0)
|
||||
void led7_show_number2(u16 val); //显示数字(清屏&高位不显示)
|
||||
void led7_show_number_add(u16 val); //显示数字(追加方式)
|
||||
|
||||
//=================================================================================//
|
||||
// 图标类显示接口 //
|
||||
//=================================================================================//
|
||||
void led7_show_icon(UI_LED7_ICON icon); //显示单个图标(追加)
|
||||
void led7_flash_icon(UI_LED7_ICON icon); //闪烁单个图标(追加)
|
||||
|
||||
//=================================================================================//
|
||||
// 模式类类显示接口 //
|
||||
//=================================================================================//
|
||||
|
||||
//=================================================================================//
|
||||
// 清屏类显示接口 //
|
||||
//=================================================================================//
|
||||
void led7_show_null(void); //清除所有显示(数字,字符串和图标)
|
||||
void led7_clear_string(void); //清除显示数字和字母
|
||||
void led7_clear_icon(UI_LED7_ICON icon); //清除显示单个图标
|
||||
void led7_clear_all_icon(void); //清除显示所有图标
|
||||
|
||||
|
||||
#endif /* _LED_H_ */
|
||||
26
apps/earphone/include/ui/res_config.h
Normal file
26
apps/earphone/include/ui/res_config.h
Normal file
@ -0,0 +1,26 @@
|
||||
#ifndef __RES_CONFIG_H__
|
||||
#define __RES_CONFIG_H__
|
||||
|
||||
|
||||
#define EXTERN_PATH "storage/virfat_flash/C/"
|
||||
#define INTERN_PATH "mnt/sdfile/res/"
|
||||
#define RES_PATH INTERN_PATH
|
||||
|
||||
#define FONT_PATH RES_PATH
|
||||
|
||||
|
||||
#define UI_STY_CHECK_PATH \
|
||||
RES_PATH"JL.sty",
|
||||
|
||||
#define UI_RES_CHECK_PATH \
|
||||
RES_PATH"JL.res",
|
||||
|
||||
#define UI_STR_CHECK_PATH \
|
||||
RES_PATH"JL.str",
|
||||
|
||||
|
||||
|
||||
#define UI_WATCH_RES_ENABLE 0//表盘功能
|
||||
|
||||
|
||||
#endif
|
||||
130
apps/earphone/include/ui/style_led7.h
Normal file
130
apps/earphone/include/ui/style_led7.h
Normal file
@ -0,0 +1,130 @@
|
||||
#ifndef UI_STYLE_LED7_H
|
||||
#define UI_STYLE_LED7_H
|
||||
|
||||
#include "ui/ui_common.h"
|
||||
#include "ui/led7/led7_driver.h"
|
||||
#include "ui/lcd_seg/lcd_seg3x9_driver.h"
|
||||
|
||||
|
||||
|
||||
enum ui_menu_main {
|
||||
UI_MENU_MAIN_NULL = 0,
|
||||
UI_RTC_MENU_MAIN,
|
||||
UI_MUSIC_MENU_MAIN,
|
||||
UI_AUX_MENU_MAIN,
|
||||
UI_BT_MENU_MAIN,
|
||||
UI_RECORD_MENU_MAIN,
|
||||
UI_FM_MENU_MAIN,
|
||||
UI_PC_MENU_MAIN,
|
||||
UI_IDLE_MENU_MAIN,
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
enum {
|
||||
|
||||
MENU_POWER_UP = 1,
|
||||
MENU_WAIT,
|
||||
MENU_BT,
|
||||
MENU_PC,
|
||||
MENU_PC_VOL_UP,
|
||||
MENU_PC_VOL_DOWN,
|
||||
MENU_AUX,
|
||||
MENU_ALM_UP,
|
||||
|
||||
MENU_SHOW_STRING,
|
||||
MENU_MAIN_VOL,
|
||||
MENU_SET_EQ,
|
||||
MENU_SET_PLAY_MODE,
|
||||
|
||||
MENU_PLAY_TIME,
|
||||
MENU_FILENUM,
|
||||
MENU_INPUT_NUMBER,
|
||||
MENU_MUSIC_PAUSE,
|
||||
MENU_MUSIC_REPEATMODE,
|
||||
|
||||
MENU_FM_MAIN,
|
||||
MENU_FM_DISP_FRE,
|
||||
MENU_FM_SET_FRE,
|
||||
MENU_FM_STATION,
|
||||
MENU_IR_FM_SET_FRE,
|
||||
|
||||
MENU_RTC_SET,
|
||||
MENU_RTC_PWD,
|
||||
MENU_ALM_SET,
|
||||
|
||||
MENU_BT_SEARCH_DEVICE,
|
||||
MENU_BT_CONNECT_DEVICE,
|
||||
MENU_BT_DEVICE_ADD,
|
||||
MENU_BT_DEVICE_NAME,
|
||||
MENU_RECODE_MAIN,
|
||||
MENU_RECODE_ERR,
|
||||
MENU_POWER,
|
||||
MENU_LIST_DISPLAY,
|
||||
|
||||
|
||||
MENU_LED0,
|
||||
MENU_LED1,
|
||||
|
||||
|
||||
MENU_RECORD,
|
||||
|
||||
MENU_SEC_REFRESH = 0x80,
|
||||
MENU_REFRESH,
|
||||
MENU_MAIN = 0xff,
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//=================================================================================//
|
||||
// UI 配置数据结构 //
|
||||
//=================================================================================//
|
||||
struct ui_dis_api {
|
||||
int ui;
|
||||
void *(*open)(void *hd);
|
||||
void (*ui_main)(void *hd, void *private);
|
||||
int (*ui_user)(void *hd, void *private, int menu, int arg);
|
||||
void (*close)(void *hd, void *private);
|
||||
};
|
||||
|
||||
|
||||
|
||||
typedef struct _LCD_DISP_API {
|
||||
void (*clear)(void);
|
||||
void (*setXY)(u32 x, u32 y);
|
||||
void (*FlashChar)(u32);
|
||||
void (*Clear_FlashChar)(u32);
|
||||
void (*show_string)(u8 *);
|
||||
void (*show_char)(u8);
|
||||
void (*show_number)(u8);
|
||||
void (*show_icon)(u32);
|
||||
void (*flash_icon)(u32);
|
||||
void (*clear_icon)(u32);
|
||||
void (*show_pic)(u32);
|
||||
void (*hide_pic)(u32);
|
||||
void (*lock)(u32);
|
||||
} LCD_API;
|
||||
|
||||
|
||||
|
||||
extern const struct ui_dis_api bt_main;
|
||||
extern const struct ui_dis_api fm_main;
|
||||
extern const struct ui_dis_api music_main;
|
||||
extern const struct ui_dis_api record_main;
|
||||
extern const struct ui_dis_api rtc_main;
|
||||
extern const struct ui_dis_api pc_main;
|
||||
extern const struct ui_dis_api linein_main;
|
||||
extern const struct ui_dis_api idle_main;
|
||||
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
131
apps/earphone/include/ui/ui_api.h
Normal file
131
apps/earphone/include/ui/ui_api.h
Normal file
@ -0,0 +1,131 @@
|
||||
#ifndef _UI_API_H_
|
||||
#define _UI_API_H_
|
||||
|
||||
#include "app_config.h"
|
||||
#include "ui/lcd_spi/lcd_drive.h"
|
||||
#include "ui/ui.h"
|
||||
#include "ui/ui_style.h"
|
||||
|
||||
#define GRT_CUR_MENU (0)
|
||||
#define GET_MAIN_MENU (1)
|
||||
|
||||
|
||||
enum ui_devices_type {
|
||||
LED_7,
|
||||
LCD_SEG3X9,
|
||||
TFT_LCD,//彩屏
|
||||
DOT_LCD,//点阵屏
|
||||
};
|
||||
|
||||
//板级配置数据结构
|
||||
struct ui_devices_cfg {
|
||||
enum ui_devices_type type;
|
||||
void *private_data;
|
||||
};
|
||||
|
||||
|
||||
struct touch_event {
|
||||
int event;
|
||||
int x;
|
||||
int y;
|
||||
};
|
||||
|
||||
|
||||
//led7 api
|
||||
extern int led7_ui_init(const struct ui_devices_cfg *ui_cfg);
|
||||
extern void ui_set_main_menu(enum ui_menu_main menu);
|
||||
extern void ui_menu_reflash(u8 break_in);//break_in 是否打断显示,例如显示设置过程中需要刷新新界面。是是否打断设置界面显示
|
||||
extern u8 ui_get_app_menu(u8);
|
||||
extern void ui_set_led(u8 app_menu, u8 on, u8 phase, u16 highlight, u16 period);
|
||||
extern void ui_set_auto_reflash(u32 msec);//自动刷新主页
|
||||
extern void ui_close_main_menu();
|
||||
extern void ui_set_tmp_menu(u8 app_menu, u16 ret_time, s32 arg, void (*timeout_cb)(u8 menu));
|
||||
extern void ui_common(void *hd, void *private, u8 menu, u32 arg);//公共显示
|
||||
|
||||
|
||||
//lcd api
|
||||
//
|
||||
extern int lcd_ui_init(void *arg);
|
||||
extern int ui_hide_main(int id);
|
||||
extern int ui_show_main(int id);
|
||||
|
||||
extern int ui_server_msg_post(const char *msg, ...);
|
||||
extern int ui_hide_curr_main();
|
||||
extern int ui_touch_msg_post(struct touch_event *event);
|
||||
extern int ui_key_msg_post(int msg);
|
||||
extern void key_ui_takeover(u8 on);
|
||||
extern int key_is_ui_takeover();
|
||||
extern void ui_backlight_open(void);
|
||||
extern void ui_backlight_close(void);
|
||||
|
||||
extern void ui_touch_timer_delete();
|
||||
extern void ui_touch_timer_start();
|
||||
extern void ui_auto_shut_down_modify(void);
|
||||
extern void ui_auto_shut_down_enable(void);
|
||||
extern void ui_auto_shut_down_disable(void);
|
||||
extern int ui_simple_key_msg_post(int, int);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//=================================================================================//
|
||||
// UI API //
|
||||
//=================================================================================//
|
||||
#if (TCFG_UI_ENABLE)
|
||||
#if(CONFIG_UI_STYLE == STYLE_JL_LED7)//led7 显示
|
||||
#define UI_INIT(a) led7_ui_init(a)
|
||||
#define UI_SHOW_WINDOW(a) ui_set_main_menu(a)
|
||||
#define UI_HIDE_WINDOW(...) ui_close_main_menu()
|
||||
#define UI_HIDE_CURR_WINDOW() ui_close_main_menu()
|
||||
#define UI_GET_WINDOW_ID() ui_get_app_menu(GET_MAIN_MENU)
|
||||
#define UI_GET_CURR_MENU() ui_get_app_menu(GRT_CUR_MENU)
|
||||
#define UI_REFLASH_WINDOW(a) ui_menu_reflash(a)
|
||||
#define UI_SHOW_MENU ui_set_tmp_menu
|
||||
#define UI_MSG_POST(...)
|
||||
#define UI_KEY_MSG_POST(...)
|
||||
|
||||
|
||||
#elif(CONFIG_UI_STYLE == STYLE_UI_SIMPLE)//去框架显示显示
|
||||
|
||||
#define UI_INIT(a) lcd_ui_init(a)
|
||||
#define UI_SHOW_WINDOW(...)
|
||||
#define UI_HIDE_WINDOW(...)
|
||||
#define UI_GET_WINDOW_ID() (0)
|
||||
#define UI_HIDE_CURR_WINDOW()
|
||||
#define UI_SHOW_MENU(...)
|
||||
#define UI_MSG_POST(...)
|
||||
#define UI_REFLASH_WINDOW(a)
|
||||
#define UI_KEY_MSG_POST(a)
|
||||
|
||||
#else
|
||||
|
||||
#define UI_INIT(a) lcd_ui_init(a)
|
||||
#define UI_SHOW_WINDOW(a) ui_show_main(a)
|
||||
#define UI_HIDE_WINDOW(a) ui_hide_main(a)
|
||||
#define UI_HIDE_CURR_WINDOW() ui_hide_curr_main()
|
||||
#define UI_GET_WINDOW_ID() ui_get_current_window_id()
|
||||
#define UI_MSG_POST ui_server_msg_post
|
||||
#define UI_SHOW_MENU(...)
|
||||
#define UI_GET_CURR_MENU()
|
||||
#define UI_REFLASH_WINDOW(a)
|
||||
#define UI_KEY_MSG_POST(a) ui_key_msg_post
|
||||
|
||||
|
||||
#endif//if(CONFIG_UI_STYLE == STYLE_JL_LED7)
|
||||
|
||||
#else
|
||||
|
||||
//common api lcd屏和led7 通用api
|
||||
#define UI_INIT(...)
|
||||
#define UI_SHOW_WINDOW(...)
|
||||
#define UI_HIDE_WINDOW(...)
|
||||
#define UI_GET_WINDOW_ID()
|
||||
#define UI_HIDE_CURR_WINDOW()
|
||||
#define UI_SHOW_MENU(...)
|
||||
#define UI_MSG_POST(...)
|
||||
#define UI_REFLASH_WINDOW(a)
|
||||
#define UI_KEY_MSG_POST(...)
|
||||
#endif /* #if TCFG_UI_ENABLE */
|
||||
|
||||
#endif
|
||||
15
apps/earphone/include/ui/ui_common.h
Normal file
15
apps/earphone/include/ui/ui_common.h
Normal file
@ -0,0 +1,15 @@
|
||||
#ifndef _UI_COMMON_H_
|
||||
#define _UI_COMMON_H_
|
||||
|
||||
#include "typedef.h"
|
||||
/* =================== 十进制数值(1位)转ASCII值 =================== */
|
||||
void itoa1(u8 i, u8 *buf);
|
||||
/* =================== 十进制数值(2位)转ASCII值 =================== */
|
||||
void itoa2(u8 i, u8 *buf);
|
||||
/* =================== 十进制数值(3位)转ASCII值 =================== */
|
||||
void itoa3(u16 i, u8 *buf);
|
||||
/* =================== 十进制数值(4位)转ASCII值 =================== */
|
||||
void itoa4(u16 i, u8 *buf);
|
||||
|
||||
|
||||
#endif
|
||||
72
apps/earphone/include/ui/ui_style.h
Normal file
72
apps/earphone/include/ui/ui_style.h
Normal file
@ -0,0 +1,72 @@
|
||||
#ifndef UI_STYLE_H
|
||||
#define UI_STYLE_H
|
||||
|
||||
#include "ui/style_led7.h"//led7
|
||||
|
||||
|
||||
|
||||
#if(CONFIG_UI_STYLE == STYLE_JL_WTACH)
|
||||
#include "ui/style_jl01.h"//彩屏//
|
||||
#define ID_WINDOW_MAIN PAGE_3
|
||||
#define ID_WINDOW_BT PAGE_0
|
||||
#define ID_WINDOW_MUSIC PAGE_1
|
||||
#define ID_WINDOW_LINEIN PAGE_1
|
||||
// #define ID_WINDOW_FM PAGE_2
|
||||
#define ID_WINDOW_CLOCK PAGE_0
|
||||
// #define ID_WINDOW_BT_MENU PAGE_3
|
||||
#define ID_WINDOW_POWER_ON PAGE_4
|
||||
#define ID_WINDOW_POWER_OFF PAGE_5
|
||||
#define CONFIG_UI_STYLE_JL_ENABLE
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
#if(CONFIG_UI_STYLE == STYLE_JL_SOUNDBOX)
|
||||
#include "ui/style_jl02.h"//点阵//
|
||||
#define ID_WINDOW_MAIN PAGE_0
|
||||
#define ID_WINDOW_BT PAGE_1
|
||||
#define ID_WINDOW_FM PAGE_2
|
||||
#define ID_WINDOW_CLOCK PAGE_3
|
||||
#define ID_WINDOW_MUSIC PAGE_4
|
||||
#define ID_WINDOW_LINEIN PAGE_9
|
||||
#define ID_WINDOW_POWER_ON PAGE_5
|
||||
#define ID_WINDOW_POWER_OFF PAGE_6
|
||||
#define ID_WINDOW_SYS PAGE_7
|
||||
#define ID_WINDOW_PC PAGE_8
|
||||
#define ID_WINDOW_IDLE (-1)
|
||||
#define ID_WINDOW_REC PAGE_10
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
#if(CONFIG_UI_STYLE == STYLE_JL_LED7)//led7 显示
|
||||
#define ID_WINDOW_BT UI_BT_MENU_MAIN
|
||||
#define ID_WINDOW_FM UI_FM_MENU_MAIN
|
||||
#define ID_WINDOW_CLOCK UI_RTC_MENU_MAIN
|
||||
#define ID_WINDOW_MUSIC UI_MUSIC_MENU_MAIN
|
||||
#define ID_WINDOW_LINEIN UI_AUX_MENU_MAIN
|
||||
#define ID_WINDOW_PC UI_PC_MENU_MAIN
|
||||
#define ID_WINDOW_REC UI_RECORD_MENU_MAIN
|
||||
#define ID_WINDOW_POWER_ON UI_IDLE_MENU_MAIN
|
||||
#define ID_WINDOW_POWER_OFF UI_IDLE_MENU_MAIN
|
||||
#define ID_WINDOW_SPDIF UI_IDLE_MENU_MAIN
|
||||
#define ID_WINDOW_IDLE UI_IDLE_MENU_MAIN
|
||||
#endif
|
||||
|
||||
#if(CONFIG_UI_STYLE == STYLE_UI_SIMPLE)//lcd 去架构
|
||||
#define ID_WINDOW_BT (0)
|
||||
#define ID_WINDOW_FM (0)
|
||||
#define ID_WINDOW_CLOCK (0)
|
||||
#define ID_WINDOW_MUSIC (0)
|
||||
#define ID_WINDOW_LINEIN (0)
|
||||
#define ID_WINDOW_PC (0)
|
||||
#define ID_WINDOW_REC (0)
|
||||
#define ID_WINDOW_POWER_ON (0)
|
||||
#define ID_WINDOW_POWER_OFF (0)
|
||||
#define ID_WINDOW_SPDIF (0)
|
||||
#define ID_WINDOW_IDLE (0)
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user