📄 lcddef.h
字号:
// LcdDef.h: LCD specific definitions
/*-------------------------------------------------------------------
LCD commands
-------------------------------------------------------------------*/
#define DISP_ON 0x0C // Display on - no cursor
#define DISP_ON_C 0x0E // Display on, Cursor on
#define DISP_ON_B 0x0F // Display on, Cursor on, Blink cursor
#define DISP_OFF 0x08 // Display off
#define CLR_DISP 0x01 // Clear the Display
#define ENTRY_INC 0x06
#define ENTRY_INC_S 0x07
#define ENTRY_DEC 0x04
#define ENTRY_DEC_S 0x05
#define DD_RAM_ADDR 0x80 // Least Significant 7-bit are for address
#define DD_RAM_UL 0x80 // Upper Left coner of the Display
#define CG_RAM_ADDR 0x40 // bit[5:0] are CGRAM address A[5:0], A[6] must be set DD_RAM_ADDR
// 4 bit operation, 1/16 duty cycle, font=5*11
#define LCD_FONT 0x2C
// Display Control command: 0000 1dcb => d=1 display on; c=1 cursor on, b=1 blink char at cursor
#define SET_DISP 0x08
#define DISP_EN 0x04
#define CURS_ON 0x02
#define BLINK_ON 0x01
// Display RAM address Set command: 1laa aaaa => l=line 0/1; aa aaaa: column (0x00 - 0x13)
#define SET_CURSOR 0x80 // Bit 7=1 for Display RAM Address Set command
/*-------------------------------------------------------------------
Position for 2x16 display
-------------------------------------------------------------------*/
#define LCD_LINE0 0x00 // Bit 6=0, Bit 6 is row address
#define LCD_LINE1 0x40 // Bit 6=1, bit [5:0] are column address
#define CURS_HOME (SET_CURSOR|LCD_LINE0|0) // Line 0, pos 0
#define CURS_0_0 CURS_HOME // line 0, pos 0
#define CURS_1_0 (SET_CURSOR|LCD_LINE1|0) // line 1, pos 0
#define CURS_CURPOS ((BYTE)0xFF) // No cursor setting, use current pos.
/*-------------------------------------------------------------------
ICON (Bolymin LCD only)
-------------------------------------------------------------------*/
#ifdef BOLYMIN_LCD
#define ICON_ATENNA (CG_RAM_ADDR|16) // Atenna symbol
#define ICON_TELEPHONE (CG_RAM_ADDR|18) // Telephone symbol
#define ICON_WIDE_SOUND (CG_RAM_ADDR|20) // dot with wave symbol
#define ICON_ENTRY (CG_RAM_ADDR|22) // Arrow into a square symbol
#define ICON_TRIANGLE_UP (CG_RAM_ADDR|22) // Write 0 to 22 show only triangle up (Clear ICON_ENTRY), write FF show both (entry & triangle up)
#define ICON_TRIANGLE_UD (CG_RAM_ADDR|23) // Write 0 clear triangle up and down, write FF show both
#define ICON_LOCKED (CG_RAM_ADDR|25) // Lock icon
#define ICON_MUTED (CG_RAM_ADDR|27) // No speaker icon
#define ICON_EMPTY_BAT (CG_RAM_ADDR|28) // Empty battery
#define ICON_FULL_BAT (CG_RAM_ADDR|29) // Full battery
#define ICON_TIP (CG_RAM_ADDR|31) // Light with question mark symbol
#define SHOW_ICON ((BYTE)0xFF)
#define HIDE_ICON ((BYTE)0x00)
#endif //BOLYMIN_LCD
/*-------------------------------------------------------------------
Special charaters
-------------------------------------------------------------------*/
#ifdef BOLYMIN_LCD
#define LCDC_ARROW_RIGHT ((BYTE)0x20) // Arrow right
#define LCDC_ARROW_LEFT ((BYTE)0x10) // Arrow left
#define LCDC_SQUARE_L ((BYTE)0x4B) // Circle
#define LCDC_SQUARE_H ((BYTE)0x4C) // Filled circle
#define LCDC_SPACE ((BYTE)0xA0) // Space
#define LCDC_DOT ((BYTE)('.'|0x80)) // Dot
#define LCDC_ZERO ((BYTE)('0'|0x80)) // Character zero
#define EVK_MONO 0x00 // Mono
#define EVK_STEREO ICON_TRIANGLE_UD // Stereo enabled
#define EVK_STEREO_DET ICON_WIDE_SOUND // Stereo detected
#endif //BOLYMIN_LCD
#ifdef HITACHI_LCD
#define LCDC_ARROW_RIGHT ((BYTE)0x7E) // Arrow right
#define LCDC_ARROW_LEFT ((BYTE)0x7F) // Arrow left
#define LCDC_SQUARE_L ((BYTE)0xA1) // Square on low line
#define LCDC_SQUARE_H ((BYTE)0xDF) // Square on high line
#define LCDC_SPACE ((BYTE)0x20) // Space
#define LCDC_DOT ((BYTE)'.') // Dot
#define LCDC_ZERO ((BYTE)'0') // Character zero
#define EVK_MONO LCDC_SPACE // Space to indicate mono
#define EVK_STEREO LCDC_SQUARE_L // Low square: stereo enabled
#define EVK_STEREO_DET LCDC_SQUARE_H // High square: stereo enabled and detected
#endif //HITACHI_LCD
// LV2400x EVK specific
#define EVK_SCAN_UP LCDC_ARROW_RIGHT
#define EVK_SCAN_DOWN LCDC_ARROW_LEFT
/*-------------------------------------------------------------------
Screen positions (LV2400x EVK specific)
-------------------------------------------------------------------*/
// Line 1 is meant for action (first 10 positions)/status (next 6 positions)
#define LCDPOS_STATUS (SET_CURSOR|LCD_LINE1|0x0) // Position to display action/status
#define LCDLEN_STATUS 16 // length of status field (whole line)
// Features, actions
#define LCDPOS_FNAME (SET_CURSOR|LCD_LINE1|0x0) // Position to display feature name
#define LCDLEN_FNAME 10 // length of feature name
#define LCDPOS_FVAL (SET_CURSOR|LCD_LINE1|0xA) // Position to display feature value
#define LCDLEN_FVAL 6 // length of feature value
#define LCDPOS_ACTNAME (SET_CURSOR|LCD_LINE1|0x0) // Position to display action name
#define LCDLEN_ACTNAME 10 // length of action name
#define LCDPOS_ACTSTAT (SET_CURSOR|LCD_LINE1|0xA) // Position to display action status
#define LCDLEN_ACTSTAT 6 // length of action status
// Station data
#define LCDPOS_FREQ CURS_0_0 // Position to display frequency
#define LCDPOS_FS (SET_CURSOR|LCD_LINE0|0xF) // Position to display field strength
#define LCDPOS_MS (SET_CURSOR|LCD_LINE0|0xE) // Position to display stereo/mono indicator
// Manual Input
#define LCDPOS_INPFREQ (SET_CURSOR|LCD_LINE1|0x0) // Position to display input frequency
/* -------------------------------EOF------------------------------------------ */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -