Changeset 1186 for branches/smartreader/csctapi/pps.c
- Timestamp:
- 01/11/10 17:55:21 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/smartreader/csctapi/pps.c
r1144 r1186 30 30 #include <stdio.h> 31 31 #include <string.h> 32 #include "ifd.h" 32 33 33 34 /* … … 341 342 342 343 cs_debug("PTS: Sending request: %s", cs_hexdump(1, params, len_request)); 343 344 344 345 /* Send PPS request */ 346 #ifdef COOL 347 //unsigned char ptsAck[10]; 348 //u_int8 ptsLen = len_request; 349 unsigned short int ptsLen = len_request; 350 int Status = cnxt_smc_start_pps(handle, params, confirm, &ptsLen, TRUE); 351 printf ("cnxt_smc_start_pps Status=%i\n", Status); 352 len_confirm = ptsLen; 353 #ifdef DEBUG_PROTOCOL 354 printf("COOL: confirm: \n"); 355 for (i = 0; i < ptsLen; i++) 356 printf ("%02X", confirm[i]); 357 printf ("\n"); 358 fflush(stdout); 359 printf("COOL: req: \n"); 360 for (i = 0; i < len_request; i++) 361 printf ("%02X", params[i]); 362 printf ("\n"); 363 fflush(stdout); 364 #endif 365 if (Status) 366 return PPS_HANDSAKE_ERROR; 367 #else 345 368 if (ICC_Async_Transmit (pps->icc, len_request, params) != ICC_ASYNC_OK) 346 369 return PPS_ICC_ERROR; … … 368 391 else 369 392 ret = PPS_OK; 393 #endif 370 394 371 395 /* Copy PPS handsake */ … … 444 468 445 469 } 470 else 471 #elif COOL 472 if(pps->icc->ifd->io->com==RTYP_SCI) { 473 int mhz = atr_fs_table[pps->parameters.FI] / 10000; 474 if (!Cool_SetBaudrate(mhz)) 475 return PPS_ICC_ERROR; 476 #ifdef DEBUG_PROTOCOL 477 printf("Coolstream: set clock to %i * 10kHz\n", mhz); 478 #endif 479 return PPS_OK; 480 } 481 else 446 482 #endif 447 483 {
Note:
See TracChangeset
for help on using the changeset viewer.