From 395266e28200080d8992f8db4176c30f0da46f8d Mon Sep 17 00:00:00 2001 From: follower Date: Sat, 8 Dec 2007 10:50:48 +0000 Subject: [PATCH] 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 --- .../wiz810mj/src/demo/WizDemo4/WizDemo4.pde | 20 +++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/branches/follower/wiz810mj/src/demo/WizDemo4/WizDemo4.pde b/branches/follower/wiz810mj/src/demo/WizDemo4/WizDemo4.pde index e780f3d..fb15159 100644 --- a/branches/follower/wiz810mj/src/demo/WizDemo4/WizDemo4.pde +++ b/branches/follower/wiz810mj/src/demo/WizDemo4/WizDemo4.pde @@ -102,11 +102,15 @@ class Wiz810MjDevice { public: Wiz810MjDevice(int resetPin); + + void setIp(byte b1, byte b2, byte b3, byte b4); private: 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); } +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); setSUBR(config_subnet_mask); setSHAR(config_mac_address); - setSIPR(config_ip_address); + WIZ810MJ.setIp(192,168,2,105); Serial.println("End test W5100 configuration...");