📄 lcd.h
字号:
/*
* Start of Zoran Standard Header
* Copyright (c) 2002, 2005 Zoran Corporation
*
*
* All rights reserved. Proprietary and confidential.
*
* DESCRIPTION for lcd.h
* LCD driver interface for the text-only user interface card.
*
* NEW HISTORY COMMENT (description must be followed by a blank line)
* <Enter change description here>
* ===== HISTORY of changes in //depot/imgeng/sw/se_gw/ui/fs/textui/lcd.h
*
* 5/Aug/05 #2 dstrauss Moved declaration of "common" routines to uilcd.h
*
* End of Zoran Standard Header
*/
/******************************************************************************
* Copyright 2002, Oak Imaging Group
* A subsidiary of Oak Technology, Inc.
*
* Author: Mark V. Dobrosielski
*
* Description: This is the header file for the UI lcd driver. The driver
* supports any LCD character modules based on the Hitachi
* HD44780 Dot Matrix LCD Controller. The following display
* configurations are supported:
*
* 1 line x 16 characters 2 x 16 4 x 16
* 1 x 20 2 x 20 4 x 20
* 1 x 24 2 x 24
* 1 x 40 2 x 40
*
* Revision History:
* Date Author Description
* ---- ------ -----------
* 8/5/02 Dobro Initial release.
******************************************************************************/
#ifndef __LCD
#define __LCD
#include "standard.h"
/******************************************************************************
constants/enums/typedefinitions
******************************************************************************/
/* default number of lcd rows (can be overridden in sys.h) */
#ifndef LCD_NUM_ROWS
#define LCD_NUM_ROWS 2
#endif
/* make sure # lines = 1, 2, or 4 */
#if ((LCD_NUM_ROWS != 1) && (LCD_NUM_ROWS != 2) && (LCD_NUM_ROWS != 4))
#error "LCD_NUM_ROWS != 1, 2, or 4"
#endif
/* default number of lcd characters per line (can be overridden in sys.h) */
#ifndef LCD_NUM_COLS
#define LCD_NUM_COLS 16
#endif
/* make sure # characters = 16, 20, 24, or 40 */
#if ((LCD_NUM_COLS != 16) && (LCD_NUM_COLS != 20) && (LCD_NUM_COLS != 24) && (LCD_NUM_COLS != 40))
#error "LCD_NUM_COLS != 16, 20, 24, or 40"
#endif
/***************************************************************
HD44780 Commands
----------------
Entry Mode: I/D = 1 Cursor increments on data write
S = 0 No display shift on data write
Display Control: D = 1 Display on
C = 0 Cursor off
B = 0 Blinking off
Shift Control: S/C = 0 Don't shift display
R/L = 0 Don't shift cursor
Function Mode: DL = 1 Data Length = 8 bits
N = 1 Number of lines = 2
F = 0 5x8 font
***************************************************************/
#define LCD_CMD_CLS 0x01 /* Clear display */
#define LCD_CMD_ENTRY 0x06 /* Entry Mode Set */
#define LCD_CMD_DISPLAY 0x0C /* Display Control */
#define LCD_CMD_SHIFT 0x10 /* Shift Control */
#define LCD_CMD_FNCT 0x38 /* Function Mode Set */
/******************************************************************************
structures
******************************************************************************/
/******************************************************************************
externs
******************************************************************************/
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -