Changeset 1235


Ignore:
Timestamp:
01/15/10 11:28:21 (11 years ago)
Author:
dingo35
Message:

Cleanup reader_type code in csctapi

Location:
trunk/csctapi
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/csctapi/ifd_towitoko.c

    r1234 r1235  
    164164   
    165165#ifdef DEBUG_IFD
    166     printf ("IFD: Initializing slot number %d, com=%d\n", slot, io->reader_type);
     166    printf ("IFD: Initializing slot number %d, com=%d\n", slot, reader[ridx].typ);
    167167#endif
    168168   
     
    171171        return IFD_TOWITOKO_PARAM_ERROR;
    172172       
    173     if(io->reader_type==R_INTERNAL)
     173    if(reader[ridx].typ == R_INTERNAL)
    174174    {
    175175        ifd->io = io;
     
    256256int IFD_Towitoko_SetBaudrate (IFD * ifd, unsigned long baudrate)
    257257{
    258     if(ifd->io->reader_type==R_INTERNAL)
     258    if(reader[ridx].typ == R_INTERNAL)
    259259    {
    260260        return IFD_TOWITOKO_OK;
     
    283283int IFD_Towitoko_GetBaudrate (IFD * ifd, unsigned long *baudrate)
    284284{
    285     if(ifd->io->reader_type==R_INTERNAL)
     285    if(reader[ridx].typ == R_INTERNAL)
    286286    {
    287287        return IFD_TOWITOKO_OK;
     
    299299extern int IFD_Towitoko_SetParity (IFD * ifd, BYTE parity)
    300300{
    301     if(ifd->io->reader_type==R_INTERNAL)
     301    if(reader[ridx].typ == R_INTERNAL)
    302302    {
    303303        return IFD_TOWITOKO_OK;
     
    334334#endif
    335335#ifdef SCI_DEV
    336     if(ifd->io->reader_type==R_INTERNAL)
     336    if(reader[ridx].typ == R_INTERNAL)
    337337    {
    338338        int in;
     
    372372
    373373#ifdef SCI_DEV
    374     if(ifd->io->reader_type==R_INTERNAL)
     374    if(reader[ridx].typ == R_INTERNAL)
    375375    {
    376376        int in;
  • trunk/csctapi/io_serial.c

    r1234 r1235  
    171171bool IO_Serial_Init (IO_Serial * io, int reader_type)
    172172{
    173     reader[ridx].typ = reader_type;
    174     reader[ridx].handle = reader[ridx].handle;
    175 
    176     if (reader_type != R_INTERNAL)
     173    if (reader[ridx].typ != R_INTERNAL)
    177174        IO_Serial_InitPnP (io);
    178175   
  • trunk/csctapi/io_serial.h

    r1234 r1235  
    6464    int rts;   
    6565    /* end settings that can be modified */
    66     int reader_type;
    6766    BYTE PnP_id[IO_SERIAL_PNPID_SIZE];  /* PnP Id of the serial device */
    6867    unsigned PnP_id_size;           /* Length of PnP Id */
  • trunk/csctapi/pps.c

    r1234 r1235  
    432432#include "sci_global.h"
    433433#include "sci_ioctl.h"
    434     if(pps->icc->ifd->io->reader_type == R_INTERNAL)
     434    if(reader[ridx].typ == R_INTERNAL)
    435435    {
    436436        int n;
  • trunk/csctapi/protocol_t0.c

    r1224 r1235  
    10011001        return PROTOCOL_T14_ERROR;
    10021002   
    1003     if(t14->icc->ifd->io->reader_type!=R_INTERNAL)
     1003    if (reader[ridx].typ != R_INTERNAL)
    10041004    {
    10051005        /* Send 0x01 byte */
Note: See TracChangeset for help on using the changeset viewer.