| 1 |
rousseau |
269 |
/*
|
| 2 |
|
|
commands.h: Commands sent to the card
|
| 3 |
rousseau |
4973 |
Copyright (C) 2003-2009 Ludovic Rousseau
|
| 4 |
rousseau |
269 |
|
| 5 |
rousseau |
1399 |
This library is free software; you can redistribute it and/or
|
| 6 |
|
|
modify it under the terms of the GNU Lesser General Public
|
| 7 |
|
|
License as published by the Free Software Foundation; either
|
| 8 |
|
|
version 2.1 of the License, or (at your option) any later version.
|
| 9 |
rousseau |
269 |
|
| 10 |
rousseau |
1399 |
This library is distributed in the hope that it will be useful,
|
| 11 |
rousseau |
269 |
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
| 12 |
rousseau |
1399 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
| 13 |
|
|
Lesser General Public License for more details.
|
| 14 |
rousseau |
269 |
|
| 15 |
rousseau |
2974 |
You should have received a copy of the GNU Lesser General Public License
|
| 16 |
|
|
along with this library; if not, write to the Free Software Foundation,
|
| 17 |
|
|
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
| 18 |
rousseau |
269 |
*/
|
| 19 |
|
|
|
| 20 |
|
|
/*
|
| 21 |
|
|
* $Id$
|
| 22 |
|
|
*/
|
| 23 |
|
|
|
| 24 |
|
|
#define SIZE_GET_SLOT_STATUS 10
|
| 25 |
|
|
#define STATUS_OFFSET 7
|
| 26 |
|
|
#define ERROR_OFFSET 8
|
| 27 |
rousseau |
2089 |
#define CHAIN_PARAMETER_OFFSET 9
|
| 28 |
rousseau |
269 |
|
| 29 |
rousseau |
1106 |
RESPONSECODE CmdPowerOn(unsigned int reader_index, unsigned int * nlength,
|
| 30 |
rousseau |
3270 |
/*@out@*/ unsigned char buffer[], int voltage);
|
| 31 |
rousseau |
1043 |
|
| 32 |
rousseau |
1630 |
RESPONSECODE SecurePINVerify(unsigned int reader_index,
|
| 33 |
rousseau |
1800 |
unsigned char TxBuffer[], unsigned int TxLength,
|
| 34 |
rousseau |
1106 |
unsigned char RxBuffer[], unsigned int *RxLength);
|
| 35 |
rousseau |
1043 |
|
| 36 |
rousseau |
1630 |
RESPONSECODE SecurePINModify(unsigned int reader_index,
|
| 37 |
rousseau |
1793 |
unsigned char TxBuffer[], unsigned int TxLength,
|
| 38 |
rousseau |
1630 |
unsigned char RxBuffer[], unsigned int *RxLength);
|
| 39 |
|
|
|
| 40 |
rousseau |
1106 |
RESPONSECODE CmdEscape(unsigned int reader_index,
|
| 41 |
|
|
const unsigned char TxBuffer[], unsigned int TxLength,
|
| 42 |
|
|
unsigned char RxBuffer[], unsigned int *RxLength);
|
| 43 |
rousseau |
1043 |
|
| 44 |
rousseau |
1106 |
RESPONSECODE CmdPowerOff(unsigned int reader_index);
|
| 45 |
rousseau |
1043 |
|
| 46 |
rousseau |
1106 |
RESPONSECODE CmdGetSlotStatus(unsigned int reader_index,
|
| 47 |
rousseau |
3270 |
/*@out@*/ unsigned char buffer[]);
|
| 48 |
rousseau |
1043 |
|
| 49 |
rousseau |
1106 |
RESPONSECODE CmdXfrBlock(unsigned int reader_index, unsigned int tx_length,
|
| 50 |
rousseau |
892 |
unsigned char tx_buffer[], unsigned int *rx_length,
|
| 51 |
|
|
unsigned char rx_buffer[], int protoccol);
|
| 52 |
rousseau |
1043 |
|
| 53 |
rousseau |
1106 |
RESPONSECODE CCID_Transmit(unsigned int reader_index, unsigned int tx_length,
|
| 54 |
rousseau |
1286 |
const unsigned char tx_buffer[], unsigned short rx_length, unsigned char bBWI);
|
| 55 |
rousseau |
1043 |
|
| 56 |
rousseau |
3270 |
RESPONSECODE CCID_Receive(unsigned int reader_index,
|
| 57 |
|
|
/*@out@*/ unsigned int *rx_length,
|
| 58 |
|
|
/*@out@*/ unsigned char rx_buffer[], unsigned char *chain_parameter);
|
| 59 |
rousseau |
1043 |
|
| 60 |
rousseau |
1106 |
RESPONSECODE SetParameters(unsigned int reader_index, char protocol,
|
| 61 |
|
|
unsigned int length, unsigned char buffer[]);
|
| 62 |
rousseau |
269 |
|
| 63 |
rousseau |
1286 |
int isCharLevel(int reader_index);
|
| 64 |
|
|
|