Changeset 91

Show
Ignore:
Timestamp:
12/08/07 02:50:48 (12 months ago)
Author:
follower
Message:

Begin moving network configuration into Wiz class and convert IP address configuration to the new method.

Files:
1 modified

Legend:

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

    r90 r91  
    103103  public: 
    104104    Wiz810MjDevice(int resetPin); 
     105     
     106    void setIp(byte b1, byte b2, byte b3, byte b4); 
    105107   
    106108  private: 
    107109    void _init(void); 
    108110     
    109     int _resetPin;   
     111    int _resetPin; 
     112   
     113    byte _scratchBuffer[6];   // Can we make this static? 
    110114}; 
    111115 
     
    153157  // configuration is used.) 
    154158  sysinit(0x55, 0x55);   
     159} 
     160 
     161void Wiz810MjDevice::setIp(byte b0, byte b1, byte b2, byte b3) { 
     162  /* 
     163   
     164   */ 
     165  _scratchBuffer[0] = b0; 
     166  _scratchBuffer[1] = b1; 
     167  _scratchBuffer[2] = b2; 
     168  _scratchBuffer[3] = b3; 
     169   
     170  setSIPR(_scratchBuffer);   
    155171} 
    156172 
     
    186202  setSUBR(config_subnet_mask); 
    187203  setSHAR(config_mac_address);  
    188   setSIPR(config_ip_address); 
     204  WIZ810MJ.setIp(192,168,2,105); 
    189205    
    190206  Serial.println("End test W5100 configuration...");