Changeset 1219 for trunk/csctapi/icc_async.c
- Timestamp:
- 01/14/10 11:10:32 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/csctapi/icc_async.c
r1208 r1219 142 142 icc->ifd = ifd; 143 143 144 #ifdef NO_PAR_SWITCH145 144 if (icc->convention == ATR_CONVENTION_INVERSE) 146 145 { … … 162 161 #endif 163 162 IO_Serial_Flush(ifd->io); 164 #endif165 163 return ICC_ASYNC_OK; 166 164 #else … … 248 246 } 249 247 250 int ICC_Async_BeginTransmission (ICC_Async * icc)251 {252 /* Setup parity for this ICC */253 #ifndef NO_PAR_SWITCH254 if (icc->convention == ATR_CONVENTION_INVERSE)255 {256 if (IFD_Towitoko_SetParity (icc->ifd, IFD_TOWITOKO_PARITY_ODD) != IFD_TOWITOKO_OK)257 return ICC_ASYNC_IFD_ERROR;258 }259 else if(icc->protocol_type == ATR_PROTOCOL_TYPE_T14)260 {261 if (IFD_Towitoko_SetParity (icc->ifd, IFD_TOWITOKO_PARITY_NONE) != IFD_TOWITOKO_OK)262 return ICC_ASYNC_IFD_ERROR;263 }264 else265 {266 if (IFD_Towitoko_SetParity (icc->ifd, IFD_TOWITOKO_PARITY_EVEN) != IFD_TOWITOKO_OK)267 return ICC_ASYNC_IFD_ERROR;268 }269 270 /* Setup baudrate for this ICC */271 /* if (IFD_Towitoko_SetBaudrate (icc->ifd, icc->baudrate)!= IFD_TOWITOKO_OK)272 return ICC_ASYNC_IFD_ERROR;273 */274 #endif275 return ICC_ASYNC_OK;276 }277 278 248 int ICC_Async_Transmit (ICC_Async * icc, unsigned size, BYTE * data) 279 249 { … … 332 302 if (icc->convention == ATR_CONVENTION_INVERSE && icc->ifd->io->reader_type!=R_INTERNAL) 333 303 ICC_Async_InvertBuffer (size, data); 334 335 return ICC_ASYNC_OK;336 }337 338 int ICC_Async_EndTransmission (ICC_Async * icc)339 {340 #ifndef NO_PAR_SWITCH341 /* Restore parity */342 if (IFD_Towitoko_SetParity (icc->ifd, IFD_TOWITOKO_PARITY_NONE) != IFD_TOWITOKO_OK)343 return ICC_ASYNC_IFD_ERROR;344 #endif345 304 346 305 return ICC_ASYNC_OK;
Note:
See TracChangeset
for help on using the changeset viewer.