Show
Ignore:
Timestamp:
12/07/07 18:53:04 (13 months ago)
Author:
follower
Message:

Move the byte receiving into a convenience function and stop using the rx buffer.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • branches/follower/wiz810mj/src/demo/WizDemo3/WizDemo3.pde

    r76 r77  
    194194 
    195195 
     196uint8_t readByte() { 
     197  uint8_t theByte; 
     198  recv(testSocket, &theByte, 1); 
     199  return theByte; 
     200} 
     201 
     202 
    196203void loop() { 
    197204  Serial.println("Test W5100 socket..."); 
     
    257264  while (getSn_SR(testSocket) == SOCK_ESTABLISHED) { 
    258265   while (getSn_RX_RSR(testSocket) > 0) { 
    259      recv(testSocket, bytesReceived, 1); 
    260      theByte = bytesReceived[0]; 
     266     theByte = readByte(); 
    261267     //Serial.print(bytesReceived[0], BYTE); 
    262268     Serial.print(theByte, BYTE);