Changeset 1279 for trunk/csctapi/protocol_t1.c
- Timestamp:
- 01/18/10 12:28:06 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/csctapi/protocol_t1.c
r1278 r1279 49 49 50 50 static int 51 Protocol_T1_SendBlock ( Protocol_T1 * t1,T1_Block * block);51 Protocol_T1_SendBlock (T1_Block * block); 52 52 53 53 static int … … 55 55 56 56 static int 57 Protocol_T1_UpdateBWT ( Protocol_T1 * t1,unsigned short bwt);57 Protocol_T1_UpdateBWT (unsigned short bwt); 58 58 59 59 /* … … 75 75 76 76 int 77 Protocol_T1_Init (Protocol_T1 * t1, ICC_Async * icc,int selected_protocol)77 Protocol_T1_Init (Protocol_T1 * t1, int selected_protocol) 78 78 { 79 79 BYTE ta, tb, tc, cwi, bwi; … … 81 81 double work_etu; 82 82 int i; 83 84 /* Set ICC */85 t1->icc = icc;86 83 87 84 /* Set IFSC */ … … 116 113 117 114 /* Work etu = (1000 / baudrate) milliseconds */ 118 ICC_Async_GetBaudrate ( t1->icc,&baudrate);115 ICC_Async_GetBaudrate (&baudrate); 119 116 work_etu = 1000 / (double)baudrate; 120 117 … … 180 177 #endif 181 178 /* Send IFSD request */ 182 ret = Protocol_T1_SendBlock ( t1,block);179 ret = Protocol_T1_SendBlock (block); 183 180 184 181 /* Delete block */ … … 225 222 226 223 /* Send a block */ 227 ret = Protocol_T1_SendBlock ( t1,block);224 ret = Protocol_T1_SendBlock (block); 228 225 229 226 /* Delete I-block */ … … 266 263 #endif 267 264 /* Send a block */ 268 ret = Protocol_T1_SendBlock ( t1,block);265 ret = Protocol_T1_SendBlock (block); 269 266 270 267 /* Delete I-block */ … … 296 293 { 297 294 if (wtx > 1) 298 Protocol_T1_UpdateBWT ( t1,wtx * (t1->bwt));295 Protocol_T1_UpdateBWT (wtx * (t1->bwt)); 299 296 300 297 /* Receive a block */ … … 303 300 if (wtx > 1) 304 301 { 305 Protocol_T1_UpdateBWT (t1 , t1->bwt);302 Protocol_T1_UpdateBWT (t1->bwt); 306 303 wtx = 0; 307 304 } … … 340 337 #endif 341 338 /* Send R-Block */ 342 ret = Protocol_T1_SendBlock ( t1,block);339 ret = Protocol_T1_SendBlock (block); 343 340 344 341 /* Delete I-block */ … … 364 361 #endif 365 362 /* Send WTX response */ 366 ret = Protocol_T1_SendBlock ( t1,block);363 ret = Protocol_T1_SendBlock (block); 367 364 368 365 /* Delete block */ … … 405 402 406 403 static int 407 Protocol_T1_SendBlock ( Protocol_T1 * t1,T1_Block * block)404 Protocol_T1_SendBlock (T1_Block * block) 408 405 { 409 406 BYTE *buffer; … … 445 442 { 446 443 /* Set timings to read the remaining block */ 447 Protocol_T1_UpdateBWT (t1 , t1->cwt);444 Protocol_T1_UpdateBWT (t1->cwt); 448 445 449 446 /* Receive remaining bytes */ … … 462 459 463 460 /* Restore timings */ 464 Protocol_T1_UpdateBWT (t1 , t1->bwt);461 Protocol_T1_UpdateBWT (t1->bwt); 465 462 } 466 463 else … … 477 474 Protocol_T1_Clear (Protocol_T1 * t1) 478 475 { 479 t1->icc = NULL;480 476 t1->ifsc = 0; 481 477 t1->ifsd = 0; … … 488 484 489 485 static int 490 Protocol_T1_UpdateBWT ( Protocol_T1 * t1,unsigned short bwt)486 Protocol_T1_UpdateBWT (unsigned short bwt) 491 487 { 492 488 icc_timings.block_timeout = bwt;
Note:
See TracChangeset
for help on using the changeset viewer.