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

📄 fps200.h

📁 小程序,但是有点用出处的.进攻参考.请多多提意见.
💻 H
字号:
#ifndef FPS200_H#define FPS200_H/*****************************************************************************//* *      fps200.h  --  defines for using with the fps200usb driver * *      Copyright (C) 2002,2003 -  Cristiano Rodrigues de Carvalho  *                                 (crc@cefala.org) * *      This program is free software; you can redistribute it and/or modify *      it under the terms of the GNU General Public License as published by *      the Free Software Foundation; either version 2 of the License, or *      (at your option) any later version. * *      This program is distributed in the hope that it will be useful, *      but WITHOUT ANY WARRANTY; without even the implied warranty of *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the *      GNU General Public License for more details. * *      You should have received a copy of the GNU General Public License *      along with this program; if not, write to the Free Software *      Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * * * * *//*****************************************************************************//* abbreviations:  * FDC = Finger Detect Circuit *//** the number of columns in the image */#define FPS200_WIDTH  256/** the number of lines in the image */#define FPS200_HEIGHT 300/** maximum size of the image */#define FPS200_IMAGESIZE (FPS200_WIDTH*FPS200_HEIGHT)/** which Endpoint does what */#define FPS200_USB_ENDPOINT_READDATA 1#define FPS200_USB_ENDPOINT_IRQ      2/* Registers to be used with the FPS200 fingerprint sensor series */#define FPS200_RAH   0x00 /**< Row Address, High */#define FPS200_RAL   0x01 /**< Row Address, Low */#define FPS200_CAL   0x02 /**< Column Address, Low */#define FPS200_REH   0x03 /**< Row Address End, High */#define FPS200_REL   0x04 /**< Row Address End, Low */#define FPS200_CEL   0x05 /**< Column Address End, Low */#define FPS200_DTR   0x06 /**< Discharge Time Register */#define FPS200_DCR   0x07 /**< Discharge Current Register */#define FPS200_CTRLA 0x08 /**< Control Register A */#define FPS200_CTRLB 0x09 /**< Control Register B */#define FPS200_CTRLC 0x0a /**< Control Register C */#define FPS200_SRA   0x0b /**< Read Only, Status Register A */#define FPS200_PGC   0x0c /**< Programmable Gain Control Register */#define FPS200_ICR   0x0d /**< Interrupt Control Register */#define FPS200_ISR   0x0e /**< Interrupt Status Register */#define FPS200_THR   0x0f /**< Threshold Register */#define FPS200_CIDH  0x10 /**< Read Only, Chip Identification, High */#define FPS200_CIDL  0x11 /**< Read Only, Chip Identification, Low */#define FPS200_TEST  0x12 /**< Test Mode Register */#define FPS200_USB_READ_REQUEST 0xc3  /**< use this for the request parameter 					 when reading the device */#define FPS200_USB_WRITE_REQUEST 0xc2 /**< use this for the request parameter 					 when writing to the device */#define FPS200_USB_TIMEOUT  (3*HZ)  /**< timeout for register read and write on				       the sensor *//* bitmap for FPS200_CTRLA *//** 0=Select Array for conversion, 1=Select External Analog Input Pin and    start conversion */#define FPS200_CTRLA_AINSEL    0x08/** Initiates auto-increment for sub-image */#define FPS200_CTRLA_GETSUB    0x04/** Initiates auto-increment for whole-image */#define FPS200_CTRLA_GETIMG    0x02/** Initiates auto-increment for selected row */#define FPS200_CTRLA_GETROW    0x01/* bitmap for FPS200_CTRLB *//**< bits 7-6 reflect the state of the MODE pins */#define FPS200_CTRLB_MODMASK   0xc0   /** 1 = A/D idle, 0 = A/D in progress */#define FPS200_CTRLB_RDY       0x20   /** reserved, write 0 to this bit */#define FPS200_CTRLB_RSVD      0x10   /** Automatic Finger Detect (1=Enable) */#define FPS200_CTRLB_AFDEN     0x08   /** Automatic Increment Column and Row Control */#define FPS200_CTRLB_AUTOINCEN 0x04 /** 0 = Selects the internal 12MHz multi-vibrator, 1=Selects the XTAL1 pin */#define FPS200_CTRLB_XTALSEL   0x02   /** Enable Control (1=ENABLE) */#define FPS200_CTRLB_ENABLE    0x01/* bitmap for FPS200_ICR */#define FPS200_ICR_IE0         0x01 /* 0=Finger Detect Interrupt Disabled */#define FPS200_ICR_IE1         0x02 /* 0=EXTINT Interrupt Disabled */#define FPS200_ICR_IM0         0x04 /* 0=Finger Detect Int. Not Masked */#define FPS200_ICR_IM1         0x08 /* 0=EXTINT Interrupt Not Masked */#define FPS200_ICR_IT0         0x10 /* 0=Finger Detect Int. is Edge Trigged */#define FPS200_ICR_IT1         0x20 /* 0=EXTINT Interrupt is Edge Trigged */#define FPS200_ICR_IP0         0x40 /* 0=FDC Polarity is Falling Edge or Active				       low. Set to detect finger down or				       clear to detect finger up. */#define FPS200_ICR_IP1         0x80 /* 0=EXTINT Int. Polarity is Falling Edge				       or Active low *//* bitmap for FPS200_ISR */#define FPS200_ISR_IR0         0x01 /* FDC Interrupt Request Pending */#define FPS200_ISR_IR1         0x02 /* EXTINT Interrupt Request Pending */#define FPS200_ISR_IS0         0x04 /* Reflects the state of the Finger				       Detect Sensor. Write 0 to this bit */#define FPS200_ISR_IS1         0x08 /* Relfects the state of the EXTINT pin.				       Write 0 to this pin *//* control fo the P0 and P1 pins */#define FPS200_PIN_P0_HIGH   0x01 /* P0 high */#define FPS200_PIN_PO_LOW    0x00 /* P0 low */#define FPS200_PIN_P1_HIGH   0x02 /* P1 high */#define FPS200_PIN_P1_LOW    0x00 /* P1 low */#define FPS200_PIN_P0_FOLLOW 0   /* P0 follow the state of bit P0 (output) */#define FPS200_PIN_PO_CLKDIV_24 (1 << 2) /* P0 = CLK / 2^24 */#define FPS200_PIN_PO_CLKDIV_23 (2 << 2) /* P0 = CLK / 2^23 */#define FPS200_PIN_PO_CLKDIV_22 (3 << 2) /* P0 = CLK / 2^22 */#define FPS200_PIN_PO_CLKDIV_21 (4 << 2) /* P0 = CLK / 2^21 */#define FPS200_PIN_P1_FOLLOW 0 /* P1 follow the state of bit P1 (output) */#define FPS200_PIN_P1_CLKDIV_24 (1 << 5) /* P1 = CLK / 2^24 */#define FPS200_PIN_P1_CLKDIV_23 (2 << 5) /* P1 = CLK / 2^23 */#define FPS200_PIN_P1_CLKDIV_22 (3 << 5) /* P1 = CLK / 2^22 */#define FPS200_PIN_P1_CLKDIV_21 (4 << 5) /* P1 = CLK / 2^21 *//* example of using IO pins: to set the P0 and P1 pins:   ioctl(file, FPS200_CONTROLOUTPUTPINS, FPS200_PIN_P0_HIGH |    FPS200_PIN_PO_HIGH); to set P0 and make P1 pulse at CLK / 2^23   ioctl(file, FPS200_CONTROLOUTPUTPINS, FPS200_PIN_P0_HIGH |    FPS200_PIN_P1_CLKDIV_23); */#endif /* FPS200_H */

⌨️ 快捷键说明

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