Changeset 11670
- Timestamp:
- 07/27/11 20:14:46 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
firmware/FSC/src/w5100_spi_interface.c
r11669 r11670 424 424 425 425 // now calculate the offset address 426 // calculated according to W5100 datasheet page: 44 427 if ((offset + NumBytes) > (S0_RX_MASK + 1) ) // if data is turned over in RX-mem 428 { 429 upper_size = (S0_RX_MASK + 1) - offset; 426 // calculated according to W5100 datasheet page: 44 427 /* 428 if ((offset + NumBytes) > (S0_TX_MASK + 1) ) // if data is turned over in RX-mem 429 { 430 upper_size = (S0_TX_MASK + 1) - offset; 430 431 lower_size = NumBytes - upper_size; 431 432 for (U16 i = 0; i < upper_size; ++i) … … 441 442 for (U16 i = 0; i < lower_size; ++i) 442 443 { 443 w5100_write(S0_ RX_BASE + i, string[upper_size+i]);444 w5100_write(S0_TX_BASE + i, string[upper_size+i]); 444 445 //usart_write_str((pU08)"wr:"); 445 446 //usart_write_U16_hex(S0_RX_BASE + i); … … 452 453 else // if not data turn over in RX-mem 453 454 { 454 455 { 456 w5100_write( start_address + i, string[i]);455 */ for (U16 i = 0; i < NumBytes; ++i) 456 { 457 w5100_write(SO_TX_BASE + (offset + i)&SO_TX_MASK, string[i]); 457 458 //usart_write_str((pU08)"wr:"); 458 459 //usart_write_U16_hex(start_address + i); … … 462 463 463 464 } 464 }465 //} 465 466 466 467 // inform W5100 about how much data was written.
Note:
See TracChangeset
for help on using the changeset viewer.