⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 lcd_drv.h

📁 意法半导体ARM7 STR710+DM9000A的TCP/IP实现
💻 H
字号:
//----------------------------------------------------------------------------
// Filename : LCD_DRV.h
//----------------------------------------------------------------------------
//
// Copyright (c) 2008,东莞太平计算机科技有限公司
// All rights reserved.
// www.pacific-gold.com.cn
//
// 历史版本:
//
//    版本:  V1.0
//    作者:  罗先能
//    日期:  2007-12-21
//    描述:  建立第一版本
//
//                                
// 描述:
//    1. LCD的驱动程序,
//    2. ST7541驱动IC.
//
//----------------------------------------------------------------------------


#ifndef __LCD_DRV_H__
#define __LCD_DRV_H__
//============================================================================


//----------------------------------------------------------------------------
// Includes
//----------------------------------------------------------------------------
#include "71x_lib.h"


//----------------------------------------------------------------------------
// Global Constant Definitions
//----------------------------------------------------------------------------
// 1. define the command of LCD contrl.
typedef enum 
{
        CLEAR  = 1,          /* Clear LCD */
        GOTO,                /* goto(line, colume) */ 
        REVERSE,             /* reverse datas      */
        UPDATE               /* Update lcd buffers */


} LCD_CMD;


//----------------------------------------------------------------------------
// Global Varable Declare
//----------------------------------------------------------------------------


//----------------------------------------------------------------------------
// Global Function Declare
//----------------------------------------------------------------------------
/**************************************************************
* Function:    lcd_init(...)
* Description:
*              initialize LCD && ports
* Input:       no
* Return:      no
*          
**************************************************************/
extern void lcd_init(void);


/**************************************************************
* Function:     lcd_test(...)
* Description:  test lcd
*           
* Input:        no
* Return:       true : lcd is ok
*               false: lcd is error
**************************************************************/
extern bool lcd_test(void);


/**************************************************************
* Function:     lcd_open(...)
* Description:  open lcd
*           
* Input:        no
* Return:       no
*          
**************************************************************/
extern void lcd_open(void);


/**************************************************************
* Function:     lcd_close(...)
* Description:  close lcd
*           
* Input:        no
* Return:       no
*          
**************************************************************/
extern void lcd_close(void);


/**************************************************************
* Function:     lcd_read(...)
* Description:  read data from LCD buffer
*
* Input:        line [--> ]: the number of line
*               col  [--> ]: the number of colume
*               size [<-->]: the size of data
*                      --> : the size of wanting to get data
*                     <--  : the size of really  getting data
*               buffer[<--]: the buffer of getting data
* Return:       TRUE:  ok
*               FALSE: error
**************************************************************/
extern bool lcd_read( u32 line, u32 col, u32 size, u8* buffer);


/**************************************************************
* Function:     lcd_write(...)
* Description:  write the data of buffer to LCD
*
* Input:        line   [--> ]: the number of line
*               col    [--> ]: the number of colume
*               size   [--> ]: the size of data
*               buffer [--> ]: the point of data
* Return:
*
**************************************************************/
extern bool lcd_write(u32 line, u32 col, u32 size, const u8* buffer);


/**************************************************************
* Function:     lcd_ctrl(...)
* Description:  controll the lcd
*
* Input:        command [--> ]: controll command
*               arg1    [--> ]: parameter1
*               arg2    [--> ]: parameter2
*
* Parameter:    (command,  arg1,    arg2)
*
*               REVERSE,   offset, size
*               GOTO,      line,   colume
*               UPDATE,    NULL,   NULL
*               CLEAR,     NULL,   NULL
*
* Return:       TRUE:  OK
*               FALSE: ERROR
**************************************************************/
extern bool lcd_ctrl( LCD_CMD command,  u32 arg1,   u32 arg2);



//============================================================================
#endif



⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -