📄 touchpanel.h
字号:
/*************************************************************************************
* Copyright (c) 2005 by National ASIC System Engineering Research Center.
* PROPRIETARY RIGHTS of ASIC are involved in the subject matter of this
* material. All manufacturing, reproduction, use, and sales rights
* pertaining to this subject matter are governed by the license agreement.
* The recipient of this software implicitly accepts the terms of the license.
*
* File Name: rtc.h
*
* File Description:
* The file define some macro definition used in rtc.c file.
*
* Created by Michael <yuyu_zh@seu.edu.cn>, 2005-03-22
**************************************************************************************/
#ifndef TOUCHPANEL_H
#define TOUCHPANEL_H
#include "typedef.h"
/* definition of register address */
#define BASE_SPI_1 0X10006000
#define SPICR (BASE_SPI_1 + 0X00)
#define SPIBR (BASE_SPI_1 + 0X04)
#define SPISR (BASE_SPI_1 + 0X08)
#define SPITR (BASE_SPI_1 + 0X0C)
#define SPIRR (BASE_SPI_1 + 0x10)
/* define LCDC registers */
#define BASE_LCDC 0x11002000 //;BASE ADDRESS OF LCDC
#define VS_BASE 0x31af0000 //;WHICH IS ASSUMED BECAUSE OF UN-ALLOCARTION
#define SSA (BASE_LCDC+0x00) //;Screen Start Address Register
#define SIZE (BASE_LCDC+0x04) //;Size Register
#define PCR (BASE_LCDC+0x08) //;Panel Configuration Register
#define HCR (BASE_LCDC+0x0c) //;Horizontal Configuration Register
#define VCR (BASE_LCDC+0x10) //;Vertical Configuration Register
#define PWMR (BASE_LCDC+0x14) //;PWM Contrast Control Register
#define LECR (BASE_LCDC+0x18) //;LCD Gray Palette Mapping Register
#define DMACR (BASE_LCDC+0x1c) //;DMA Control Register
#define LCDICR (BASE_LCDC+0x20) //;Interrupt Configuration Register
#define LCDISR (BASE_LCDC+0x24) //;Interrupt Status Register
#define LGPMR (BASE_LCDC+0x40) //;The begin of address of grey_reg
/* definition of command */
#define READ 0x80000000
#define WRITE 0x0
#define MAX_PENBUF 10
#define x_location 0x90
#define y_location 0xd0
#define transenable 0x80
#define val_upper 0x00
#define val_lower 0x00
#define ctrlw 0x77
#define bt256 0x0507
/* declaration of function */
void tp_handler(void);
STATUS PenRead(void);
void PenDisable(void);
void PenEnable(void);
void TurnOFFADS7843(void);
void TurnOnADS7843(void);
void SPISetup(void);
U16 PenSPIXfer(U16 ADCommd);
void init_Pen(void);
STATUS ModuleTouchpanel(void);
void init_LCD(void);
void ResetUCB(void);
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -