Changeset 10697 for firmware/FSC/src/w5100_spi_interface.c
- Timestamp:
- 05/13/11 11:48:49 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
firmware/FSC/src/w5100_spi_interface.c
r10677 r10697 59 59 void w5100_write( U16 addr, U08 data) 60 60 { 61 // setup the SPI interface according to W5100 specs. 62 // This is needed, because AD7719 has different SPI specs. 63 spi_setup_w5100(); 64 61 65 spi_write_buffer[0]=0xF0; 62 66 spi_write_buffer[1]=(U08)(addr>>8); … … 70 74 U08 w5100_read( U16 addr) 71 75 { 76 // setup the SPI interface according to W5100 specs. 77 // This is needed, because AD7719 has different SPI specs. 78 spi_setup_w5100(); 79 72 80 spi_write_buffer[0]=0x0F; 73 81 spi_write_buffer[1]=(U08)(addr>>8); … … 244 252 U16 offset = last_RX_read_pointer & S0_RX_MASK; 245 253 U16 start_address = S0_RX_BASE + offset; 246 247 usart_write_str("last_read_pointer:");248 usart_write_U16_hex(last_RX_read_pointer);249 usart_write_str("\noffset:");250 usart_write_U16_hex(offset);251 usart_write_str("\nstart_address:");252 usart_write_U16_hex(start_address);253 usart_write_char('\n');254 254 255 255 if ((offset + NumBytes) > (S0_RX_MASK + 1) ) // if data is turned over in RX-mem … … 299 299 300 300 // returns number of words, transmitted into TX - buffer. 301 U 08 w5100_set_TX(U08NumBytes) {301 U16 w5100_set_TX(U08* string, U16 NumBytes) { 302 302 U16 freesize = get_S0_TX_FSR(); 303 303 if (freesize == 0) … … 334 334 for (U08 i = 0; i < upper_size; ++i) 335 335 { 336 w5100_write(start_address + i, eth_write_buffer[i]);336 w5100_write(start_address + i, string[i]); 337 337 } 338 338 for (U08 i = 0; i < lower_size; ++i) 339 339 { 340 w5100_write(S0_RX_BASE + i, eth_write_buffer[upper_size+i]);340 w5100_write(S0_RX_BASE + i, string[upper_size+i]); 341 341 } 342 342 } … … 345 345 for (U08 i = 0; i < NumBytes; ++i) 346 346 { 347 w5100_write(start_address + i, eth_write_buffer[i]);347 w5100_write(start_address + i, string[i]); 348 348 } 349 349 }
Note:
See TracChangeset
for help on using the changeset viewer.