📄 adc_init.h
字号:
//------------------------------------------------------------------------------
//
// Copyright (C) 2004-2006, Freescale Semiconductor, Inc. All Rights Reserved.
// THIS SOURCE CODE, AND ITS USE AND DISTRIBUTION, IS SUBJECT TO THE TERMS
// AND CONDITIONS OF THE APPLICABLE LICENSE AGREEMENT
//
//------------------------------------------------------------------------------
//
// File: adc_init.h
//
// local header file.
//
//------------------------------------------------------------------------------
#ifndef __ADC_INIT_H__
#define __ADC_INIT_H__
#ifdef __cplusplus
extern "C" {
#endif
//------------------------------------------------------------------------------
// Defines
#define SCREEN_PIX_WIDTH 176
#define SCREEN_PIX_HEIGHT 220
#define DISP_BPP 16
#define DISP_BYTES_PP (DISP_BPP / 8)
#define LCD_CONTRAST_MIN 0x00000000
#define LCD_CONTRAST_MAX 0x000000FF
#define LCD_CONTRAST_DEFAULT 0x0000007F
#define LCD_CONTRAST_STEP 0x00000001
//Define Constants
#define CHANNEL_SYS1 1
#define CHANNEL_SYS2 2
#define CHANNEL_PRP 3
#define CHANNEL_PP 4
#define CHANNEL_SYS1_CMD 5
#define CHANNEL_SYS2_CMD 6
//Define template command opcodes
#define RD_DATA 0x0
#define RD_ACK 0x1
#define RD_WAIT 0x2
#define WR_XADDR 0x3
#define WR_YADDR 0x4
#define WR_ADDR 0x5
#define WR_CMND 0x6
#define WR_DATA 0x7
//Define template flow control commands
#define SINGLE_STEP 0x0
#define STOP 0x1
#define JUMP 0x2
#define ATM_ADDR_RANGE 0x20
#define ADBM_ADDR_RANGE 0x40
#define TEMPLATE_BUF_SIZE 32
#define RGB_666_FORMAT 0
#define RGB_565_FORMAT 1
#define RGB_444_FORMAT 2
//Espon smart LCD L2F50032T03 commands
#define CMD_DISON 0xAF //DISON
#define CMD_DISOFF 0xAE //DISOFF
#define CMD_DISNOR 0xA6 //DISNOR
#define CMD_DISINV 0xA7 //DISINV
#define CMD_DISCTL 0xCA //DISCTL
#define CMD_GCP64 0xCB //GCP64
#define CMD_GCP16 0xCC //GCP16
#define CMD_GSSET 0xCD //GSSET
#define CMD_OSSEL 0xD0 //OSSEL
#define CMD_SLPIN 0x95 //SLPIN
#define CMD_SLPOUT 0x94 //SPLOUT
#define CMD_SD_PSET 0x75 //SD_PSET
#define CMD_MD_PSET 0x76 //MD_PSET
#define CMD_SD_CSET 0x15 //SD_CSET
#define CMD_MD_CSET 0x16 //MD_CSET
#define CMD_DATCTL 0xBC //DATCTL
#define CMD_RAMWR 0x5C //RAMWR
#define CMD_RAMRD 0x5D //RAMRD
#define CMD_PTLIN 0xA8 //PTLIN
#define CMD_PTLOUT 0xA9 //PTLOUT
#define CMD_ASCSET 0xAA //ASCSET
#define CMD_SCSTART 0xAB //SCSTART
#define CMD_NOP 0x25 //NOP
#define CMD_STREAD 0x00 //STREAD
#define CMD_VOLCTL 0xC6 //VOLCTL
#define CMD_EPCTIN 0x61 //EPCTIN
#define CMD_EPCTOUT 0x62 //EPCTOUT
#define CMD_EPSRWR 0x63 //EPSRWR
#define CMD_EPMWR 0x64 //EPMWR
#define CMD_EPMRD 0x65 //EPMRD
#define CMD_EPSRRD 0x66 //EPSRRD
//------------------------------------------------------------------------------
// Enumerations and Structures
// Field structure for Template commands
typedef struct
{
unsigned Data:24,
Opcode:3,
FlowControl:2,
RS:1,
Reserved:2;
} TEMPLATE_CMD_REG_FIELDS;
// Register data union for TEMPLATE_CMD
typedef union
{
TEMPLATE_CMD_REG_FIELDS reg;
unsigned int data;
} TEMPLATE_CMD_REG;
//------------------------------------------------------------------------------
// Functions
UINT32 InitializeADC(int width, int height, int bpp);
void EnableADC(void);
void DisableADC(void);
#ifdef __cplusplus
}
#endif
#endif // __ADC_INIT_H__
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -