drv_glcd.c
来自「NXP LPC系列AMR7的开发程序源码(LCD」· C语言 代码 · 共 57 行
C
57 行
/*************************************************************************
*
* Used with ICCARM and AARM.
*
* (c) Copyright IAR Systems 2006
*
* File name : drv_glcd.c
* Description : Graphic LCD driver
*
* History :
* 1. Date : December 2, 2006
* Author : Stanimir Bonev
* Description : Create
*
* $Revision: 1.0 $
**************************************************************************/
#include "drv_glcd.h"
#include <assert.h>
/* delay definition */
#define GLCD_DLY_10US 80 // 10us
#define GLCD_RESET_DLY 50 // 5ms
#define GLCD_BOOSTER_ON_DLY 1200 // 120 ms
static const GLCD_CmdCtrl_t GLCD_Cmd_Iss0[GLCD_CMD_NUMB] =
{
// (ISS=0)
// NOP - No Operation
{0x00, GLCD_WRITE, 0, 0},
// SLPIN - Sleep in & booster off
{0x10, GLCD_WRITE, 0, 0},
// SLPOUT - Sleep out & booster on
{0x11, GLCD_WRITE, 0, 0},
// PTLOUT (NORON) - Partial off (Normal)
{0x13, GLCD_WRITE, 0, 0},
// INVOFF - Display inversion off (normal)
{0x20, GLCD_WRITE, 0, 0},
// INVON - Display inversion on
{0x21, GLCD_WRITE, 0, 0},
// DISPOFF - Display off
{0x28, GLCD_WRITE, 0, 0},
// DISPON - Display on
{0x29, GLCD_WRITE, 0, 0},
// CASET - Column address set
// X_ADR start: 0h <= XS <= 83h
// X_ADR end: 0h <= XS <= 83h
{0x2A, GLCD_WRITE, 0, 2},
// RASET - Row address set
// Y_ADR start: 0h <= YS <= 83h
// Y_ADR end: 0h <= YS <= 83h
{0x2B, GLCD_WRITE, 0, 2},
// RAMWR - Memory write
{0x2C, GLCD_WRITE, 0, (Int32U)-1},
// RGBSET - Color set for 256 color display
{0x2D, GLCD_WRITE, 0, 20},
// VSCSAD - Scroll start address of RAM
// SSA = 0, 1, 2,
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?