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

📄 piu_hw.h

📁 WinCE 3.0 BSP, 包含Inter SA1110, Intel_815E, Advantech_PCM9574 等
💻 H
字号:
/*
 * Copyright (C) NEC Electronics Inc. 1998.
 *
 * File:    Piu_hw.h
 *
 * Purpose:    H/W depend informations for VRC4173 PIU
 *
 */
#ifndef __PIU_HW_H__
#define __PIU_HW_H__

/*---------------------------------------------------------------------------*/
//--- register define ---------------------------------------------------------
/*---------------------------------------------------------------------------*/
//piuintreg
#define LOSTINT_CHECK ( PADPAGE0INTR | PADPAGE1INTR | PADADPINTR )
#define TOUCHINT_ID   ( PADDLOSTINTR | PADPAGE0INTR | PADPAGE1INTR | PADADPINTR )
#define ALL_TCHINTR   ( PENCHGINTR | PADDLOSTINTR | PADPAGE0INTR | PADPAGE1INTR | PADADPINTR )

//piucntreg
#define PENSTC      (1 << 13) // 
#define PADATSTOP   (1 << 9)  // 
#define PADATSTART  (1 << 8)  // 
#define PADSCANTYPE (1 << 5)  // 
#define PIUMODE     (3 << 3)  // 
#define PIUSEQEN    (1 << 2)  // 
#define PIUPWR      (1 << 1)  // 
#define PIUMODE_PEN_SAMPLE  0x0000
#define PIUMODE_ADP_SCAN    0x0008

//piucmdreg
#define STABLEON    (1 << 12) // 
#define ADIN3_PORT  0x0007    // 
#define ADIN2_PORT  0x0006    // 
#define ADIN1_PORT  0x0005    // 
#define ADIN0_PORT  0x0004    // 

//piuascnreg
#define TPPSCAN     (1 << 1)  // 
#define ADPSStart   (1 << 0)  // 

//piuamskreg
#define ADIN3_MASK  (1 << 7)  // 
#define ADIN2_MASK  (1 << 6)  // 
#define ADIN1_MASK  (1 << 5)  // 
#define ADIN0_MASK  (1 << 4)  // 

/*---------------------------------------------------------------------------*/
//--- PenSamples structure & define ------------------------------------------
/*---------------------------------------------------------------------------*/
#define PAD_STAT_DISABLE           0x0000
#define PAD_STAT_STANDBY           0x0001
#define PAD_STAT_ADPORT_SCAN       0x0002
#define PAD_STAT_WAIT_PEN_TOUCH    0x0004
#define PAD_STAT_PEN_DATA_SCAN     0x0005
#define PAD_STAT_INTVAL_NEXT_SCAN  0x0006
#define PAD_STAT_CMD_SCAN          0x0007

#define DELTA_X_COORD_VARIANCE         60
#define DELTA_Y_COORD_VARIANCE         80

#define penDataFormatValidMask16       0x0fff

#define INTVAL_1_MS 33
#define INTVAL_2_MS 67
#define INTVAL_3_MS 100
#define INTVAL_4_MS 133
#define INTVAL_5_MS 167
#define INTVAL_6_MS 200
#define INTVAL_7_MS 233
#define INTVAL_8_MS 267
#define INTVAL_9_MS 300
#define INTVAL_10_MS    333
#define INTVAL_12_MS    400
#define INTVAL_20_MS    667

#define INTVAL_DEFAULT  INTVAL_10_MS
#define INTVAL_HIGH INTVAL_8_MS

#define STABLE_DEFAULT  25
#define STABLE_HIGH 8

// Define values for GetDeviceCaps()
#define SAMPLES_PER_SECOND_DEFAULT  100 // 10 ms
#define SAMPLES_PER_SECOND_HIGH     125 // 8 ms

// -PenSample Structure-
typedef struct {
    USHORT XSample0;     //@field Y Coordinate(-).
    USHORT XSample1;     //@field Y Coordinate(+).
    USHORT YSample0;     //@field X Coordinate(-).
    USHORT YSample1;     //@field X Coordinate(+).
    USHORT ZSample;      //@field Z Coordinate.
} PIU_PENSAMPLE, *PPIU_PENSAMPLE;

#endif /*__PIU_HW_H__*/

⌨️ 快捷键说明

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