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,6 +107,7 @@ class Wiz810MjDevice {
private:
void _init(void);
byte * _packBuffer(byte b0, byte b1, byte b2, byte b3);
int _resetPin;
@ -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) {
/*
*/
@ -167,7 +168,14 @@ void Wiz810MjDevice::setIp(byte b0, byte b1, byte b2, byte b3) {
_scratchBuffer[2] = b2;
_scratchBuffer[3] = b3;
setSIPR(_scratchBuffer);
return _scratchBuffer;
}
void Wiz810MjDevice::setIp(byte b0, byte b1, byte b2, byte b3) {
/*
*/
setSIPR(_packBuffer(b0, b1, b2, b3));
}
/* ----------------------- */

Loading…
Cancel
Save