Changeset 92

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

Move scratch buffer manipulation into helper method. Convert IP address configuration to use new method.

Files:
1 modified

Legend:

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

    r91 r92  
    108108  private: 
    109109    void _init(void); 
     110    byte * _packBuffer(byte b0, byte b1, byte b2, byte b3); 
    110111     
    111112    int _resetPin; 
    112    
     113 
    113114    byte _scratchBuffer[6];   // Can we make this static? 
    114115}; 
     
    159160} 
    160161 
    161 void Wiz810MjDevice::setIp(byte b0, byte b1, byte b2, byte b3) { 
     162byte * Wiz810MjDevice::_packBuffer(byte b0, byte b1, byte b2, byte b3) { 
    162163  /* 
    163164   
     
    167168  _scratchBuffer[2] = b2; 
    168169  _scratchBuffer[3] = b3; 
    169    
    170   setSIPR(_scratchBuffer);   
     170 
     171  return _scratchBuffer; 
     172} 
     173 
     174void Wiz810MjDevice::setIp(byte b0, byte b1, byte b2, byte b3) { 
     175  /* 
     176   
     177   */ 
     178  setSIPR(_packBuffer(b0, b1, b2, b3));   
    171179} 
    172180