Changeset 10677 for firmware/FSC/src/w5100_spi_interface.c
- Timestamp:
- 05/12/11 17:47:17 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
firmware/FSC/src/w5100_spi_interface.c
r10674 r10677 24 24 if (socket_status == SR_SOCK_ESTABLISHED) { 25 25 w5100_ready = true; 26 26 27 // everything is fine... 27 28 return 0; … … 63 64 spi_write_buffer[3]=data; 64 65 65 spi_transfer (4, 0);66 spi_transfer_w5100(4); 66 67 // spi_read_buffer should contain 0x00 0x01 0x02 and 0x03 ... nice check! 67 68 } … … 74 75 spi_write_buffer[3]=0x00; 75 76 76 spi_transfer (4, 0);77 spi_transfer_w5100(4); 77 78 return spi_read_buffer[3]; 78 79 // spi_read_buffer should contain 0x00 0x01 0x02 and data ... nice check! … … 117 118 w5100_write ( S0_PORT0, 0x13 ); // Port 5000 -> 0x1388 118 119 w5100_write ( S0_PORT1, 0x88 ); 119 usart_write_str((pU08)"Issuing Socket open command. NOW\n");120 120 w5100_write ( S0_CR, CR_OPEN ); // issue Socket open command 121 121 while (sock0_status != SR_SOCK_INIT) { 122 122 sock0_status = w5100_read(S0_SR); // request socket 0 status 123 usart_write_str((pU08)"Socket 0 status is:"); 124 usart_write_U08_hex(sock0_status); 125 usart_write_char('\n'); 126 } 127 128 usart_write_str((pU08)"Issuing Socket LISTEN command. NOW\n"); 123 } 124 129 125 w5100_write ( S0_CR, CR_LISTEN ); // issue Socket listen command 130 131 126 while (sock0_status != SR_SOCK_LISTEN) { 132 127 sock0_status = w5100_read(S0_SR); // request socket 0 status 133 usart_write_str((pU08)"Socket 0 status is:");134 usart_write_U08_hex(sock0_status);135 usart_write_char('\n');136 128 } 137 129 return sock0_status;
Note:
See TracChangeset
for help on using the changeset viewer.