Changeset 10911 for firmware/FSC/src/w5100_spi_interface.c
- Timestamp:
- 06/05/11 18:37:23 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
firmware/FSC/src/w5100_spi_interface.c
r10910 r10911 217 217 U08 high_byte = (value>>8); 218 218 U08 low_byte = value&0x00FF; 219 w5100_write(S0_TX_WR1, low_byte); 219 220 w5100_write(S0_TX_WR0, high_byte); 220 w5100_write(S0_TX_WR1, low_byte); 221 221 222 } 222 223 … … 279 280 w5100_write ( S0_CR, CR_RECV ); 280 281 282 /* 281 283 usart_write_U16_hex(get_S0_TX_FSR()); usart_write_char('\t'); usart_write_char('|'); 282 284 usart_write_U16_hex(get_S0_TX_RD()); usart_write_char('\t'); usart_write_char('|'); … … 284 286 usart_write_U16_hex(get_S0_RX_RSR()); usart_write_char('\t'); usart_write_char('|'); 285 287 usart_write_U16_hex(get_S0_RX_RD()); usart_write_char('\t'); usart_write_char('|'); 286 288 */ 289 287 290 // if user wishes, W5100 may inform peer about receiption. 288 291 // this should be done quickly, otherwise timeout may occur on … … 306 309 { 307 310 return 0; 308 } 311 } 312 309 313 U16 last_TX_write_pointer = get_S0_TX_WR(); 310 314 U16 offset = last_TX_write_pointer & S0_TX_MASK; 311 315 U16 start_address = S0_TX_BASE + offset; 312 316 317 usart_write_crlf(); 318 usart_write_crlf(); 319 usart_write_str((pU08)"lwp :"); 320 usart_write_U16_hex(last_TX_write_pointer); 321 usart_write_crlf(); 322 323 usart_write_str((pU08)"off :"); 324 usart_write_U16_hex(offset); 325 usart_write_crlf(); 326 327 usart_write_str((pU08)"stad:"); 328 usart_write_U16_hex(start_address); 329 usart_write_crlf(); 330 313 331 314 332 U16 upper_size, lower_size; … … 338 356 { 339 357 w5100_write(start_address + i, string[i]); 358 usart_write_str((pU08)"wr:"); 359 usart_write_U16_hex(start_address + i); 360 usart_write_char(' '); 361 usart_write_char(string[i]); 362 usart_write_crlf(); 363 340 364 } 341 365 for (U16 i = 0; i < lower_size; ++i) 342 366 { 343 367 w5100_write(S0_RX_BASE + i, string[upper_size+i]); 368 usart_write_str((pU08)"wr:"); 369 usart_write_U16_hex(S0_RX_BASE + i); 370 usart_write_char(' '); 371 usart_write_char(string[upper_size+i]); 372 usart_write_crlf(); 373 344 374 } 345 375 } … … 349 379 { 350 380 w5100_write(start_address + i, string[i]); 351 } 352 } 353 354 // inform W5100 about how much data was read out. 381 usart_write_str((pU08)"wr:"); 382 usart_write_U16_hex(start_address + i); 383 usart_write_char(' '); 384 usart_write_char(string[i]); 385 usart_write_crlf(); 386 387 } 388 } 389 390 // inform W5100 about how much data was written. 355 391 set_S0_TX_WR(last_TX_write_pointer + NumBytes); 356 392 usart_write_str((pU08)"wrpt:"); 393 usart_write_U16_hex(last_TX_write_pointer + NumBytes); 394 usart_write_crlf(); 395 357 396 // tell it to send now the data away 358 397 w5100_write( S0_CR, CR_SEND);
Note:
See TracChangeset
for help on using the changeset viewer.