Ignore:
Timestamp:
05/13/11 11:48:49 (14 years ago)
Author:
neise
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • firmware/FSC/src/w5100_spi_interface.c

    r10677 r10697  
    5959void w5100_write( U16 addr, U08 data)
    6060{
     61        // setup the SPI interface according to W5100 specs.
     62        // This is needed, because AD7719 has different SPI specs.
     63        spi_setup_w5100();     
     64
    6165spi_write_buffer[0]=0xF0;
    6266spi_write_buffer[1]=(U08)(addr>>8);
     
    7074U08 w5100_read( U16 addr)
    7175{
     76        // setup the SPI interface according to W5100 specs.
     77        // This is needed, because AD7719 has different SPI specs.
     78        spi_setup_w5100();     
     79
    7280spi_write_buffer[0]=0x0F;
    7381spi_write_buffer[1]=(U08)(addr>>8);
     
    244252        U16 offset = last_RX_read_pointer & S0_RX_MASK;
    245253        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');
    254254
    255255        if ((offset + NumBytes) > (S0_RX_MASK + 1) )  // if data is turned over in RX-mem
     
    299299
    300300// returns number of words, transmitted into TX - buffer.
    301 U08 w5100_set_TX(U08 NumBytes) {
     301U16 w5100_set_TX(U08* string, U16 NumBytes) {
    302302        U16 freesize = get_S0_TX_FSR();
    303303        if (freesize == 0)
     
    334334                for (U08 i = 0; i < upper_size; ++i)
    335335                {
    336                         w5100_write(start_address + i, eth_write_buffer[i]);
     336                        w5100_write(start_address + i, string[i]);
    337337                }
    338338                for (U08 i = 0; i < lower_size; ++i)
    339339                {
    340                         w5100_write(S0_RX_BASE + i, eth_write_buffer[upper_size+i]);
     340                        w5100_write(S0_RX_BASE + i, string[upper_size+i]);
    341341                }
    342342        }
     
    345345                for (U08 i = 0; i < NumBytes; ++i)
    346346                {
    347                         w5100_write(start_address + i, eth_write_buffer[i]);
     347                        w5100_write(start_address + i, string[i]);
    348348                }
    349349        }
Note: See TracChangeset for help on using the changeset viewer.