?? tsc2046touch.h
字號:
/*************************************************************/
//
// Copyright (c) Texas Instruments 2005. All rights reserved.
//
/**************************************************************
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.
Module Name:
TSC2046Touch.H
Abstract:
This module is the header for TSC2046Touch.CPP.
Revision History:
Rev 0.0 Original Release WXF 9-30-2005
***************************************************************/
#ifndef __TSC2046Touch_H__
#define __TSC2046Touch_H__
#ifdef __cplusplus
extern "C"{
#endif
//
// Digitizer related definitions.
//
//
// @doc INTERNAL DRIVERS PDD TOUCH_PANEL
// @const ULONG | DELTA_X_COORD_VARIANCE |
// Maximum allowed variance in the X coordinate samples.
//
#define DELTA_X_COORD_VARIANCE 0x50
//
// @doc INTERNAL DRIVERS PDD TOUCH_PANEL
// @const ULONG | DELTA_Y_COORD_VARIANCE |
// Maximum allowed variance in the X coordinate samples.
//
#define DELTA_Y_COORD_VARIANCE 0x50
//
// @doc INTERNAL DRIVERS PDD TOUCH_PANEL
// @const ULONG | TOUCHPANEL_SAMPLE_RATE_LOW |
// Low sampling rate.
#define TOUCHPANEL_SAMPLE_RATE_LOW 150
//
// @doc INTERNAL DRIVERS PDD TOUCH_PANEL
// @const ULONG | TOUCHPANEL_SAMPLE_RATE_HIGH |
// High sampling rate.
#define TOUCHPANEL_SAMPLE_RATE_HIGH 150
#define NUMBER_SAMPLES_PER_POINT 4
#define MAX_ADC_VAL 0x3FF
//
// TOUCH_TIMER_INCREMENT is the constant that decides the sampling
// rate of the touch controller's ADC. The formulae used to get
// the number below is :-
// (3.6864 * 10^6)
// TOUCH_TIMER_INCREMENT = ---------------
// Sample Rate
// For Example if the Sample Rate decided is 150 samples per second
// then the TOUCH_TIMER_INCREMENT should be 0x6000
#define TOUCH_TIMER_INCREMENT 0x6000
// There are two expected stylus interrupt states: sylus down
// (the stylus is currently up) and stylus up or a timer event
// (the stylus is down and will either be lifted or the timer
// will fire and gwes will capture the point for drawing).
typedef enum
{
PEN_DOWN,
PEN_UP_OR_TIMER
} EXPECTED_INT_EVENT;
//
// @doc INTERNAL DRIVERS PDD TOUCH_PANEL
// @type TOUCHPANEL_POINT_SAMPLES |
// Array of NUMBER_SAMPLES_PER_POINT samples.
//
typedef struct
{
USHORT XSample; //@field X Coordinate.
USHORT YSample; //@field Y Coordinate.
} TOUCHPANEL_POINT_SAMPLE, *PTOUCHPANEL_POINT_SAMPLE;
typedef TOUCHPANEL_POINT_SAMPLE TOUCHPANEL_POINT_SAMPLES[NUMBER_SAMPLES_PER_POINT];
void EnableTouchPanelIRQ(void);
BOOL PrepareNextInterrupt(EXPECTED_INT_EVENT irqMode);
TOUCH_PANEL_SAMPLE_FLAGS PDDSampleTouchScreen(INT *x,INT *y);
BOOL TouchDriverCalibrationPointGet(TPDC_CALIBRATION_POINT *pTCP);
#ifdef __cplusplus
}
#endif
#endif // __TSC2046Touch_H__
///////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -