Show
Ignore:
Timestamp:
12/08/07 07:06:40 (13 months ago)
Author:
follower
Message:

Move default configuration into NetworkInterface? constructor. Change default values.

Files:
1 modified

Legend:

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

    r97 r98  
    237237          rather than having a new 'Wiz810MjDevice' instance created.  
    238238   */ 
     239    
     240   // This may not be the best place to do all this, but it'll do for now: 
     241  device.setMac(0x02,0xDE,0xAD,0xBE,0xEF,0x00); 
     242    
     243  device.setIp(169,254,254,169); // A local-link IP -- NOTE: This is out of spec. 
     244  device.setMask(255,255,0,0);   // Matches local-link IP /16 
     245   
     246  device.setGateway(0,0,0,0);   // We can't even guess this, so just skip it. 
     247    
    239248}; 
    240249 
     
    263272 
    264273  Serial.println("Test W5100 configuration...");         
    265    
    266   WIZ810MJ.setMac(0x02,0xDE,0xAD,0xBE,0xEF,0x00); 
    267     
    268   // WIZ810MJ.setIp(192,168,2,105); 
    269   WIZ810MJ.setMask(255,255,255,0); 
    270   WIZ810MJ.setGateway(192,168,2,101); 
    271     
     274      
    272275  NetworkInterface Network = NetworkInterface(WIZ810MJ);  
    273276   
    274277  Network.device.setIp(192,168,2,105); 
     278  Network.device.setMask(255,255,255,0); 
    275279    
    276280  Serial.println("End test W5100 configuration...");