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

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

@ -103,10 +103,14 @@ class Wiz810MjDevice {
public: public:
Wiz810MjDevice(int resetPin); Wiz810MjDevice(int resetPin);
void setIp(byte b1, byte b2, byte b3, byte b4);
private: private:
void _init(void); void _init(void);
int _resetPin; int _resetPin;
byte _scratchBuffer[6]; // Can we make this static?
}; };
@ -154,6 +158,18 @@ void Wiz810MjDevice::_init(void) {
sysinit(0x55, 0x55); sysinit(0x55, 0x55);
} }
void Wiz810MjDevice::setIp(byte b0, byte b1, byte b2, byte b3) {
/*
*/
_scratchBuffer[0] = b0;
_scratchBuffer[1] = b1;
_scratchBuffer[2] = b2;
_scratchBuffer[3] = b3;
setSIPR(_scratchBuffer);
}
/* ----------------------- */ /* ----------------------- */
@ -185,7 +201,7 @@ void setup () {
setGAR(config_gateway); setGAR(config_gateway);
setSUBR(config_subnet_mask); setSUBR(config_subnet_mask);
setSHAR(config_mac_address); setSHAR(config_mac_address);
setSIPR(config_ip_address); WIZ810MJ.setIp(192,168,2,105);
Serial.println("End test W5100 configuration..."); Serial.println("End test W5100 configuration...");

Loading…
Cancel
Save