- Timestamp:
- 05/29/15 00:17:01 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
firmware/FSC/src/w5100_spi_interface.c
r17631 r18182 344 344 345 345 // returns number of bytes, transmitted into TX - buffer. 346 U16 w5100_set_TX(U08* string, U16 NumBytes) { 347 348 U08 repetitions; 346 U16 w5100_set_TX(volatile U08* string, U16 NumBytes) { 347 349 348 U16 freesize; 350 349 U16 last_TX_write_pointer; 351 350 352 351 freesize = get_S0_TX_FSR(); 353 for (repetitions=0 ; repetitions < 3; ) { // increase is *inside the loop*354 if ( freesize != get_S0_TX_FSR()) {355 freesize = get_S0_TX_FSR();356 }357 else {358 repetitions++;359 }360 }361 352 if (freesize == 0) { 362 353 return 0; … … 364 355 365 356 last_TX_write_pointer = get_S0_TX_WR(); 366 for (repetitions=0 ; repetitions < 3; ) { // increase is *inside the loop*367 if ( last_TX_write_pointer != get_S0_TX_WR()) {368 last_TX_write_pointer = get_S0_TX_WR();369 }370 else {371 repetitions++;372 }373 }374 357 375 358 U16 offset = last_TX_write_pointer & S0_TX_MASK; … … 390 373 } 391 374 for (U16 i = 0; i < lower_size; ++i) { 392 w5100_write(S0_ RX_BASE + i, string[upper_size+i]);375 w5100_write(S0_TX_BASE + i, string[upper_size+i]); 393 376 } 394 377 }
Note:
See TracChangeset
for help on using the changeset viewer.