/[pcsclite]/trunk/Drivers/ccid/src/ifdhandler.c
ViewVC logotype

Diff of /trunk/Drivers/ccid/src/ifdhandler.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1780 by rousseau, Thu Dec 8 09:32:36 2005 UTC revision 1790 by rousseau, Wed Jan 11 07:51:13 2006 UTC
# Line 51  static pthread_mutex_t ifdh_context_mute Line 51  static pthread_mutex_t ifdh_context_mute
51    
52  int LogLevel = DEBUG_LEVEL_CRITICAL | DEBUG_LEVEL_INFO;  int LogLevel = DEBUG_LEVEL_CRITICAL | DEBUG_LEVEL_INFO;
53  int DriverOptions = 0;  int DriverOptions = 0;
54    int PowerOnVoltage = VOLTAGE_5V;
55  static int DebugInitialized = FALSE;  static int DebugInitialized = FALSE;
56    
57  /* local functions */  /* local functions */
# Line 763  RESPONSECODE IFDHPowerICC(DWORD Lun, DWO Line 764  RESPONSECODE IFDHPowerICC(DWORD Lun, DWO
764                  case IFD_POWER_UP:                  case IFD_POWER_UP:
765                  case IFD_RESET:                  case IFD_RESET:
766                          nlength = sizeof(pcbuffer);                          nlength = sizeof(pcbuffer);
767                          if (CmdPowerOn(reader_index, &nlength, pcbuffer) != IFD_SUCCESS)                          if (CmdPowerOn(reader_index, &nlength, pcbuffer, PowerOnVoltage)
768                                    != IFD_SUCCESS)
769                          {                          {
770                                  DEBUG_CRITICAL("PowerUp failed");                                  DEBUG_CRITICAL("PowerUp failed");
771                                  return_value = IFD_ERROR_POWER_ACTION;                                  return_value = IFD_ERROR_POWER_ACTION;
# Line 1108  void init_driver(void) Line 1110  void init_driver(void)
1110                  DEBUG_INFO2("DriverOptions: 0x%.4X", DriverOptions);                  DEBUG_INFO2("DriverOptions: 0x%.4X", DriverOptions);
1111          }          }
1112    
1113            /* get the voltage parameter */
1114            switch ((DriverOptions >> 4) & 0x03)
1115            {
1116                    case 0:
1117                            PowerOnVoltage = VOLTAGE_5V;
1118                            break;
1119    
1120                    case 1:
1121                            PowerOnVoltage = VOLTAGE_3V;
1122                            break;
1123    
1124                    case 2:
1125                            PowerOnVoltage = VOLTAGE_1_8V;
1126                            break;
1127    
1128                    case 3:
1129                            PowerOnVoltage = VOLTAGE_AUTO;
1130                            break;
1131            }
1132    
1133          /* initialise the Lun to reader_index mapping */          /* initialise the Lun to reader_index mapping */
1134          InitReaderIndex();          InitReaderIndex();
1135    

Legend:
Removed from v.1780  
changed lines
  Added in v.1790

  ViewVC Help
Powered by ViewVC 1.1.5