Changeset 11669 for firmware


Ignore:
Timestamp:
Jul 27, 2011, 7:34:29 PM (8 years ago)
Author:
tbretz
Message:
Fixed a possible dead lock in eth_write_*
File:
1 edited

Legend:

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

    r11667 r11669  
    490490void eth_write_str( U08* str ){
    491491
    492         while (*str) {
    493                 if (eth_write_index < ETH_WRITE_BUFFER_SIZE) {
    494                         eth_write_buffer[eth_write_index++] = *str++;
    495                 }
    496                
     492        while (*str && eth_write_index < ETH_WRITE_BUFFER_SIZE)
     493        {
     494            eth_write_buffer[eth_write_index++] = *str++;
    497495        }
    498496        w5100_set_TX(eth_write_buffer, eth_write_index);
     
    502500void eth_writeln_str( U08* str ){
    503501
    504         while (*str)
    505         {
    506                 if (eth_write_index < ETH_WRITE_BUFFER_SIZE) {
    507                         eth_write_buffer[eth_write_index++] = *str++;
    508                 }
     502        while (*str && eth_write_index < ETH_WRITE_BUFFER_SIZE)
     503        {
     504            eth_write_buffer[eth_write_index++] = *str++;
    509505        }
    510506        if (eth_write_index < ETH_WRITE_BUFFER_SIZE) {
Note: See TracChangeset for help on using the changeset viewer.