From d8f3eb266ec5015b1578ff81bc336915e909103b Mon Sep 17 00:00:00 2001 From: follower Date: Sat, 8 Dec 2007 11:26:37 +0000 Subject: [PATCH] Convert MAC address configuration to class method. git-svn-id: svn+ssh://oldsvn/home/mlalondesvn/svn/cral@95 3ee9b42a-b53c-0410-a25e-f0b6218d5d5b --- .../follower/wiz810mj/src/demo/WizDemo4/WizDemo4.pde | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/branches/follower/wiz810mj/src/demo/WizDemo4/WizDemo4.pde b/branches/follower/wiz810mj/src/demo/WizDemo4/WizDemo4.pde index 0702df0..e664a3d 100644 --- a/branches/follower/wiz810mj/src/demo/WizDemo4/WizDemo4.pde +++ b/branches/follower/wiz810mj/src/demo/WizDemo4/WizDemo4.pde @@ -106,6 +106,7 @@ class Wiz810MjDevice { void setIp(byte b0, byte b1, byte b2, byte b3); void setMask(byte b0, byte b1, byte b2, byte b3); void setGateway(byte b0, byte b1, byte b2, byte b3); + void setMac(byte b0, byte b1, byte b2, byte b3, byte b4, byte b5); private: void _init(void); @@ -205,6 +206,12 @@ void Wiz810MjDevice::setGateway(byte b0, byte b1, byte b2, byte b3) { setGAR(_packBuffer(b0, b1, b2, b3)); } +void Wiz810MjDevice::setMac(byte b0, byte b1, byte b2, byte b3, byte b4, byte b5) { + /* + + */ + setSHAR(_packBuffer(b0, b1, b2, b3, b4, b5)); +} /* ----------------------- */ @@ -233,8 +240,9 @@ void setup () { byte config_subnet_mask[] = {255,255,255,0}; byte config_mac_address[] = {0x02,0xDE,0xAD,0xBE,0xEF,0x00}; byte config_ip_address[] = {192,168,2,105}; + + WIZ810MJ.setMac(0x02,0xDE,0xAD,0xBE,0xEF,0x00); - setSHAR(config_mac_address); WIZ810MJ.setIp(192,168,2,105); WIZ810MJ.setMask(255,255,255,0); WIZ810MJ.setGateway(192,168,2,101);