
What about something like this to grab what we can (which could mean incomplete/partial packet) instead of discarding the entire packet. A partial packet could cause more confusion in the end...
- Code: Select all
spi_transfer(zg_buf, rx_byte_cnt + 1 < (U16)UIP_BUFSIZE ? rx_byte_cnt + 1 : (U16)UIP_BUFSIZE, 1);
Greg