Changeset 1123
- Timestamp:
- 01/08/10 16:41:14 (14 years ago)
- Location:
- branches/smartreader
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/smartreader/cscrypt/bn.h
r821 r1123 59 59 #define I386_Only 60 60 61 //#ifdef __64BIT__62 //#define SIXTY_FOUR_BIT63 //#else61 #ifdef __LP64__ 62 #define SIXTY_FOUR_BIT 63 #else 64 64 #define THIRTY_TWO_BIT 65 //#endif65 #endif 66 66 67 67 #ifndef HEADER_BN_H … … 145 145 #define BN_MASK2h1 (0xffffffff80000000LL) 146 146 #define BN_TBIT (0x8000000000000000LL) 147 #define BN_DEC_CONV (10000000000000000000 LL)147 #define BN_DEC_CONV (10000000000000000000UL) 148 148 #define BN_DEC_FMT1 "%llu" 149 149 #define BN_DEC_FMT2 "%019llu" -
branches/smartreader/cscrypt/des.c
r64 r1123 1 #include <stdlib.h> 1 2 #include <stdio.h> 2 3 #include <string.h> -
branches/smartreader/csctapi/atr.c
r1072 r1123 25 25 #include "defines.h" 26 26 #include "atr.h" 27 #include "../globals.h"28 27 #include <stdlib.h> 29 28 #include <string.h> … … 33 32 */ 34 33 35 unsigned long atr_fs_table[16] = { 0, 5000000L, 6000000L, 8000000L, 12000000L, 16000000L, 20000000L, 0, 0, 5000000L, 7500000L, 10000000L, 15000000L, 20000000L, 0, 0};34 unsigned long atr_fs_table[16] = {4000000L, 5000000L, 6000000L, 8000000L, 12000000L, 16000000L, 20000000L, 0, 0, 5000000L, 7500000L, 10000000L, 15000000L, 20000000L, 0, 0}; 36 35 37 36 static unsigned atr_num_ib_table[16] = {0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 4}; … … 41 40 */ 42 41 43 unsigned atr_f_table[16] = { 0, 372, 558, 744, 1116, 1488, 1860, 0, 0, 512, 768, 1024, 1536, 2048, 0, 0};44 45 double atr_d_table[16] = {0, 1, 2, 4, 8, 16, 32, 0, 12, 20, 0.5, 0.25, 0.125, 0.0625, 0.03125, 0.015625};42 unsigned atr_f_table[16] = {372, 372, 558, 744, 1116, 1488, 1860, 0, 0, 512, 768, 1024, 1536, 2048, 0, 0}; 43 44 double atr_d_table[16] = {0, 1, 2, 4, 8, 16, 32, 64, 12, 20, 0.5, 0.25, 0.125, 0.0625, 0.03125, 0.015625}; 46 45 //old table has 0 for RFU: 47 46 //double atr_d_table[16] = {0, 1, 2, 4, 8, 16, 0, 0, 0, 0, 0.5, 0.25, 125, 0.0625, 0.03125, 0.015625}; -
branches/smartreader/csctapi/io_serial.c
r991 r1123 1023 1023 if(!IO_Serial_Write(io, 0, 4, cmd)) 1024 1024 return FALSE; 1025 usleep(50000); 1025 1026 1026 1027 cmd[0]=2; … … 1029 1030 if(!IO_Serial_Write(io, 0, 3, cmd)) 1030 1031 return FALSE; 1032 usleep(50000); 1031 1033 1032 1034 cmd[0]=3; … … 1034 1036 if(!IO_Serial_Write(io, 0, 2, cmd)) 1035 1037 return FALSE; 1038 usleep(50000); 1036 1039 1037 1040 cmd[0]=4; … … 1039 1042 if(!IO_Serial_Write(io, 0, 2, cmd)) 1040 1043 return FALSE; 1044 usleep(50000); 1041 1045 1042 1046 cmd[0]=5; … … 1044 1048 if(!IO_Serial_Write(io, 0, 2, cmd)) 1045 1049 return FALSE; 1050 usleep(50000); 1046 1051 1047 1052 1048 1053 // We're entering SmartReader+ mode; speed up serial communication. 1049 //cfsetispeed(&term,B115200);1050 //cfsetospeed(&term,B115200);1051 //io->input_bitrate=115200;1052 //io->output_bitrate=115200;1054 cfsetispeed(&term,B115200); 1055 cfsetospeed(&term,B115200); 1056 io->input_bitrate=115200; 1057 io->output_bitrate=115200; 1053 1058 1054 1059 // Set SmartReader+ in DATA mode. -
branches/smartreader/csctapi/pps.c
r1114 r1123 215 215 } 216 216 217 //FIXME Currently InitICC sets baudrate to 9600 for all T14 cards, which is the old behaviour...; for SCI TA1 is obeyed... 217 //FIXME Currently InitICC sets baudrate to 9600 for all T14 cards (=no switching); 218 //When for SCI, T14 protocol, TA1 is obeyed, this goes OK for mosts devices, but somehow on DM7025 Sky S02 card goes wrong when setting ETU (ok on DM800/DM8000) 219 //So either 220 //a) for ALL T14 ETU should not be set, or 221 //b) only for Irdeto T14 cards, 222 //c) or all Irdeto cards 223 //to be working on DM7025 and all other sci-devices ... 224 //we choose option b) for now, can always expand it... 225 //implemented it in InitICC 218 226 if (!PPS_success) {//last PPS not succesfull 219 227 BYTE TA1; … … 395 403 params.fs = atr_fs_table[pps->parameters.FI] / 1000000; 396 404 double F = (double) atr_f_table[pps->parameters.FI]; 397 params.ETU = F / pps->parameters.d; 405 //for Irdeto T14 cards, do not set ETU 406 if (!(atr->hbn >= 6 && !memcmp(atr->hb, "IRDETO", 6) && params.T == 14)) 407 params.ETU = F / pps->parameters.d; 398 408 if (pps->parameters.n == 255) //only for T0 or also for T1? 399 409 params.EGT = 0;
Note:
See TracChangeset
for help on using the changeset viewer.