📄 lcd_old.h
字号:
#ifndef __LCD_H__
#define __LCD_H__
/* 7 segment:
a
----
f | \ | b
| h \ |
-----
e | g | c
| |
-----
d
*/
//new lcd
#define NUM_SEGMENT 10
#define SEG7_A 0x08
#define SEG7_B 0x04
#define SEG7_C 0x02
#define SEG7_D 0x10
#define SEG7_E 0x20
#define SEG7_F 0x80
#define SEG7_G 0x40
#define VALUE0 (SEG7_A | SEG7_B | SEG7_C | SEG7_D | SEG7_E | SEG7_F)
#define VALUE1 (SEG7_B | SEG7_C)
#define VALUE2 (SEG7_A | SEG7_B | SEG7_G | SEG7_E | SEG7_D)
#define VALUE3 (SEG7_A | SEG7_B | SEG7_G | SEG7_C | SEG7_D)
#define VALUE4 (SEG7_F | SEG7_G | SEG7_B | SEG7_C)
#define VALUE5 (SEG7_A | SEG7_F | SEG7_G | SEG7_C | SEG7_D)
#define VALUE6 (SEG7_A | SEG7_F | SEG7_E | SEG7_G | SEG7_C | SEG7_D)
#define VALUE7 (SEG7_A | SEG7_B | SEG7_C)
#define VALUE8 (SEG7_A | SEG7_B | SEG7_C | SEG7_D | SEG7_E | SEG7_F | SEG7_G)
#define VALUE9 (SEG7_A | SEG7_F | SEG7_G | SEG7_B | SEG7_C | SEG7_D)
#define CHAR_A (SEG7_F | SEG7_E | SEG7_A | SEG7_B | SEG7_C | SEG7_G)
#define CHAR_B (SEG7_F | SEG7_E | SEG7_G | SEG7_C | SEG7_D)
#define CHAR_C (SEG7_A | SEG7_F | SEG7_E | SEG7_D)
#define CHAR_D (SEG7_G | SEG7_E | SEG7_D | SEG7_B | SEG7_C)
#define CHAR_E (SEG7_F | SEG7_E | SEG7_A | SEG7_G | SEG7_D)
#define CHAR_F (SEG7_F | SEG7_E | SEG7_A | SEG7_G)
#define CHAR_G (SEG7_A | SEG7_F | SEG7_G | SEG7_B | SEG7_C | SEG7_D)
#define CHAR_H (SEG7_F | SEG7_E | SEG7_G | SEG7_B | SEG7_C)
#define CHAR_I (SEG7_F | SEG7_E)
#define CHAR_J 0x00
#define CHAR_K 0x00
#define CHAR_L (SEG7_F | SEG7_E | SEG7_D)
#define CHAR_M 0x00
#define CHAR_N (SEG7_F | SEG7_E | SEG7_A | SEG7_B | SEG7_C)
#define CHAR_O (SEG7_A | SEG7_B | SEG7_C | SEG7_D | SEG7_E | SEG7_F)
#define CHAR_P (SEG7_F | SEG7_E | SEG7_A | SEG7_B | SEG7_G)
#define CHAR_Q (SEG7_A | SEG7_F | SEG7_G | SEG7_B | SEG7_C)
#define CHAR_R (SEG7_E | SEG7_G)
#define CHAR_S (SEG7_A | SEG7_F | SEG7_G | SEG7_C | SEG7_D)
#define CHAR_T (SEG7_D| SEG7_E | SEG7_F| SEG7_G)
#define CHAR_U (SEG7_F | SEG7_E | SEG7_D | SEG7_C | SEG7_B)
#define CHAR_V (SEG7_F | SEG7_E | SEG7_D | SEG7_C | SEG7_B)
#define CHAR_W 0x00
#define CHAR_X 0x00
#define CHAR_Y (SEG7_F | SEG7_G | SEG7_B | SEG7_C)
#define CHAR_Z (SEG7_F | SEG7_E)
#define CHAR_DOT SEG7_G
#define CHAR_SPACE 0x00
#define FP_INFO_ST 0x0001
#define FP_INFO_DTS 0x0804
#define FP_INFO_DX 0x0004
#define FP_INFO_DOLBY 0x0801
#define FP_INFO_CD 0x0108
#define FP_INFO_V 0x0308
#define FP_INFO_S 0x0708
#define FP_INFO_PLAY 0x0908
//#define FP_INFO_S8 0x0420
//#define FP_INFO_S10 0x0440
//#define FP_INFO_S11 0x0480
#define FP_INFO_PAUSE 0x0a08
//#define FP_INFO_S7 0x0502
//#define FP_INFO_S9 0x0504
//#define FP_INFO_S12 0x0508
#define FP_INFO_S1 0x0f08
#define FP_INFO_S3 0x0d08
//#define FP_INFO_S6 0x0520
#define FP_INFO_S2 0x1308
//#define FP_INFO_S4 0x0604
//#define FP_INFO_S5 0x0602
#define FP_INFO_LINE 0x1908
#define FP_INFO_DOT_MIN1 0x0000
#define FP_INFO_DOT_MIN2 0x0d08
#define FP_INFO_DOT_HOUR 0x00f08
#define FP_INFO_KHZ 0x1108
#define FP_INFO_MHZ 0x1508
#define FP_INFO_DVD 0x1708
#define FP_INFO_MP3 0x1801
#define FP_INFO_FM 0x1802
#define FP_INFO_TV 0x1804
#define FP_INFO_AM 0x1808
#define FP_INFO_REPEAT 0x0b08
void FpClearStr();
void FpDisplayBass(unsigned char ucvalue);
void FpDisplayTreble(unsigned char ucvalue);
void FpDisplayBalance(unsigned char ucvalue);
void FpDisplayFade(unsigned char ucvalue);
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -