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

📄 touchscr.h

📁 Cirrus EP9315 wince bsp
💻 H
字号:
//**********************************************************************
//                                                                      
// Filename: touchscr.h
//                                                                      
// Description: Include file for ADS7846E touch screen interface
//
// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
// ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
// PARTICULAR PURPOSE.
//
// Use of this source code is subject to the terms of the Cirrus end-user
// license agreement (EULA) under which you licensed this SOFTWARE PRODUCT.
// If you did not accept the terms of the EULA, you are not authorized to 
// use this source code. For a copy of the EULA, please see the 
// LICENSE.RTF on your install media.
//
// Copyright(c) Cirrus Logic Corporation 2002, All Rights Reserved                       
//                                                                      
//**********************************************************************
//************************************************************************
//
// TOUCHSCR.H - include file for ADS7846E touch screen interface
//
// Copyright (c) 2001 Cogent Computer Systems, Inc.
//
//************************************************************************

#ifndef _H_TOUCHSCR
#define _H_TOUCHSCR

//
// Bit positions for ADS7846E Control byte
//
#define ADS7846E_S              0x80   // Start bit, always 1
#define ADS7846E_ADD            0x70   // Input Channel Address
#define ADS7846E_ADD_SHIFT      4
#define ADS7846E_8BIT           0x08   // 0 = 12-bit conversion, 1 = 8-bits
#define ADS7846E_SER            0x04   // 0 = Differential, 1 = Single ended
#define ADS7846E_PD             0x03   // Power-Down modes
#define ADS7846E_PD_SHIFT       0   

//
// Address select defines for single ended mode
//
#define ADS7846E_ADD_SER_TEMP0  0x0     // temperature measurement 1
#define ADS7846E_ADD_SER_Y      0x1     // Y position measurement
#define ADS7846E_ADD_SER_BAT    0x2     // battery input measurement
#define ADS7846E_ADD_SER_Z1     0x3     // pressure measurement 1
#define ADS7846E_ADD_SER_Z2     0x4     // pressure measurement 2
#define ADS7846E_ADD_SER_X      0x5     // X position measurement
#define ADS7846E_ADD_SER_AUX    0x6     // auxillary input measurement
#define ADS7846E_ADD_SER_TEMP1  0x7     // temperature measurement 2

//
// Address select defines for differential mode
//
#define ADS7846E_ADD_DFR_Y      0x1     // Y position measurement
#define ADS7846E_ADD_DFR_Z1     0x3     // pressure measurement 1
#define ADS7846E_ADD_DFR_Z2     0x4     // pressure measurement 2
#define ADS7846E_ADD_DFR_X      0x5     // X position measurement


//
// Power Down Modes
//
#define ADS7846E_PD_LPWR        0x0     // low-power mode, no power-up delay, *IRQ is enabled
#define ADS7846E_PD_REF         0x1     // 2.5V reference off, ADC on, requires delay before conversion
#define ADS7846E_PD_ADC         0x2     // ADC off, REF on, no delay required
#define ADS7846E_PD_IRQ         0x3     // device on, but *IRQ is disabled

#endif // _H_TOUCHSCR

⌨️ 快捷键说明

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