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

git-svn-id: svn+ssh://oldsvn/home/mlalondesvn/svn/cral@92 3ee9b42a-b53c-0410-a25e-f0b6218d5d5b
master
follower 17 years ago
parent 395266e282
commit 0cc5fc9107

@ -107,9 +107,10 @@ class Wiz810MjDevice {
private:
void _init(void);
byte * _packBuffer(byte b0, byte b1, byte b2, byte b3);
int _resetPin;
byte _scratchBuffer[6]; // Can we make this static?
};
@ -158,7 +159,7 @@ void Wiz810MjDevice::_init(void) {
sysinit(0x55, 0x55);
}
void Wiz810MjDevice::setIp(byte b0, byte b1, byte b2, byte b3) {
byte * Wiz810MjDevice::_packBuffer(byte b0, byte b1, byte b2, byte b3) {
/*
*/
@ -166,8 +167,15 @@ void Wiz810MjDevice::setIp(byte b0, byte b1, byte b2, byte b3) {
_scratchBuffer[1] = b1;
_scratchBuffer[2] = b2;
_scratchBuffer[3] = b3;
return _scratchBuffer;
}
void Wiz810MjDevice::setIp(byte b0, byte b1, byte b2, byte b3) {
/*
setSIPR(_scratchBuffer);
*/
setSIPR(_packBuffer(b0, b1, b2, b3));
}
/* ----------------------- */

Loading…
Cancel
Save