00001 /* 00002 Simple Operating System for Smartcard Education 00003 Copyright (C) 2002 Matthias Bruestle <m@mbsks.franken.de> 00004 00005 This program is free software; you can redistribute it and/or modify 00006 it under the terms of the GNU General Public License as published by 00007 the Free Software Foundation; either version 2 of the License, or 00008 (at your option) any later version. 00009 00010 This program is distributed in the hope that it will be useful, 00011 but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00013 GNU General Public License for more details. 00014 00015 You should have received a copy of the GNU General Public License 00016 along with this program; if not, write to the Free Software 00017 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00018 */ 00019 00031 #ifndef SOSSE_T0_H 00032 #define SOSSE_T0_H 00033 00034 #define CLA ioheader[0] 00035 #define INS ioheader[1] 00036 #define P1 ioheader[2] 00037 #define P2 ioheader[3] 00038 #define P3 ioheader[4] 00039 00040 extern bool ioin; 00041 extern iu8 ioheader[5]; 00042 extern iu8 iodata[CONF_IODATA_SIZE]; 00043 extern iu16 iodatalen; 00044 00049 void t0_init( void ); 00050 00058 void t0_recBlock( iu8 *dst, iu16 len ); 00059 00067 void t0_recBlock( iu8 *dst, iu16 len ); 00068 00071 void t0_wtx( void ); 00072 00087 bool t0_dir( bool in ); 00088 00089 #define T0_DIR_IN TRUE 00090 #define T0_DIR_OUT FALSE 00091 00092 00096 void t0_exchApdu( void ); 00097 00102 void t0_getResponse( void ); 00103 00114 bool t0_testP1P2( iu16 p1p2 ); 00125 bool t0_testP3( iu8 p3 ); 00126 00127 #endif /* SOSSE_T0_H */