Changeset 1221
- Timestamp:
- 01/14/10 12:31:41 (14 years ago)
- Location:
- trunk
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/csctapi/icc_async.c
r1220 r1221 44 44 static void ICC_Async_Clear (ICC_Async * icc); 45 45 46 int fdmc=(-1); 46 47 47 48 /* … … 71 72 72 73 #if defined(SCI_DEV) || defined(COOL) 73 if (reader _type==R_INTERNAL)74 if (reader[ridx].typ==R_INTERNAL) 74 75 #ifdef SH4 75 76 reader[ridx].handle = open (reader[ridx].device, O_RDWR|O_NONBLOCK|O_NOCTTY); … … 88 89 89 90 #if defined(TUXBOX) && defined(PPC) 90 if ((reader _type == R_DB2COM1) || (reader_type== R_DB2COM2))91 if ((reader[ridx].typ == R_DB2COM1) || (reader[ridx].typ == R_DB2COM2)) 91 92 if ((fdmc = open(DEV_MULTICAM, O_RDWR)) < 0) 92 93 { … … 126 127 127 128 #if defined(TUXBOX) && defined(PPC) 128 if ((reader[ridx].typ==R_DB2COM1) || ( ifd->reader[ridx].typ==R_DB2COM2))129 if ((reader[ridx].typ==R_DB2COM1) || (reader[ridx].typ==R_DB2COM2)) 129 130 { 130 131 ushort msr=1; 131 132 extern int fdmc; 132 IO_Serial_Ioctl_Lock( ifd->io,1);133 IO_Serial_Ioctl_Lock(1); 133 134 ioctl(fdmc, GET_PCDAT, &msr); 134 135 if (reader[ridx].typ==R_DB2COM2) … … 136 137 else 137 138 in=((msr & 0x0f00) == 0x0f00); 138 IO_Serial_Ioctl_Lock( ifd->io,0);139 IO_Serial_Ioctl_Lock(0); 139 140 } 140 141 else … … 223 224 /* Reset ICC */ 224 225 #ifdef SCI_DEV 225 if ( ifd->reader[ridx].typ == R_INTERNAL) {226 if (reader[ridx].typ == R_INTERNAL) { 226 227 if (!Sci_Reset(ifd, &(icc->atr))) 227 228 { … … 326 327 #include "sci_global.h" 327 328 #include "sci_ioctl.h" 328 if ( icc->ifd->reader[ridx].typ == R_INTERNAL) {329 if (reader[ridx].typ == R_INTERNAL) { 329 330 SCI_PARAMETERS params; 330 if (ioctl( icc->reader[ridx].handle, IOCTL_GET_PARAMETERS, ¶ms) < 0 )331 if (ioctl(reader[ridx].handle, IOCTL_GET_PARAMETERS, ¶ms) < 0 ) 331 332 return ICC_ASYNC_IFD_ERROR; 332 333 switch (icc->protocol_type) { … … 342 343 break; 343 344 } 344 if (ioctl( icc->reader[ridx].handle, IOCTL_SET_PARAMETERS, ¶ms)!=0)345 if (ioctl(reader[ridx].handle, IOCTL_SET_PARAMETERS, ¶ms)!=0) 345 346 return ICC_ASYNC_IFD_ERROR; 346 347 -
trunk/csctapi/ifd_sci.c
r1216 r1221 14 14 #include "sci_ioctl.h" 15 15 #include "atr.h" 16 #include "string.h" 16 17 #ifdef SH4 17 18 #include <fcntl.h> -
trunk/csctapi/ifd_towitoko.c
r1220 r1221 445 445 ret = IFD_TOWITOKO_IO_ERROR; 446 446 447 IO_Serial_Ioctl_Lock( ifd->io,1);447 IO_Serial_Ioctl_Lock(1); 448 448 #ifdef USE_GPIO 449 449 if (gpio_detect) … … 471 471 IO_Serial_RTS_Clr(ifd->io); 472 472 473 IO_Serial_Ioctl_Lock( ifd->io,0);473 IO_Serial_Ioctl_Lock(0); 474 474 475 475 (*atr) = ATR_New (); -
trunk/csctapi/io_serial.c
r1220 r1221 73 73 int io_serial_need_dummy_char = 0; 74 74 75 int fdmc=(-1);75 extern int fdmc; 76 76 77 77 #if defined(TUXBOX) && defined(PPC) 78 void IO_Serial_Ioctl_Lock( IO_Serial * io,int flag)78 void IO_Serial_Ioctl_Lock(int flag) 79 79 { 80 80 extern int *oscam_sem; 81 if (( io->reader_type!=R_DB2COM1) && (io->reader_type!=R_DB2COM2)) return;81 if ((reader[ridx].typ!=R_DB2COM1) && (reader[ridx].typ!=R_DB2COM2)) return; 82 82 if (!flag) 83 83 *oscam_sem=0; 84 else while (*oscam_sem!= io->reader_type)84 else while (*oscam_sem!=reader[ridx].typ) 85 85 { 86 86 while (*oscam_sem) 87 usleep(( io->reader_type)*2000);88 *oscam_sem= io->reader_type;87 usleep((reader[ridx].typ)*2000); //FIXME is this right ?!?! 88 *oscam_sem=reader[ridx].typ; 89 89 usleep(1000); 90 90 } … … 570 570 // return FALSE; 571 571 572 IO_Serial_Ioctl_Lock( io,1);572 IO_Serial_Ioctl_Lock(1); 573 573 IO_Serial_DTR_RTS(io, 0, io->rts == IO_SERIAL_HIGH); 574 574 IO_Serial_DTR_RTS(io, 1, io->dtr == IO_SERIAL_HIGH); 575 IO_Serial_Ioctl_Lock( io,0);575 IO_Serial_Ioctl_Lock(0); 576 576 577 577 #ifdef DEBUG_IO -
trunk/csctapi/io_serial.h
r1208 r1221 93 93 extern bool IO_Serial_DTR_RTS(IO_Serial * io, int, int); 94 94 #if defined(TUXBOX) && defined(PPC) 95 extern void IO_Serial_Ioctl_Lock( IO_Serial *,int);95 extern void IO_Serial_Ioctl_Lock(int); 96 96 #else 97 #define IO_Serial_Ioctl_Lock( a, b) {}97 #define IO_Serial_Ioctl_Lock(b) {} //FIXME ugly !! 98 98 #endif 99 99 -
trunk/reader-common.c
r1209 r1221 42 42 } 43 43 } 44 reader[ridx].typ = rc; 44 45 return(rc); 45 46 }
Note:
See TracChangeset
for help on using the changeset viewer.