Bohyun Bang / WIZnetInterface

Dependents:   w7500-paho-mqtt openHAB_mqtt_W7500 kakaoIoTchatbot w7500-RFID-mqtt

Fork of WIZnetInterface by WIZnet

Files at this revision

API Documentation at this revision

Comitter:
embeddist
Date:
Mon Jun 15 23:43:56 2015 +0000
Parent:
6:94a81e80c675
Child:
8:4c02de1dbf3a
Commit message:
changed eth_arch.h; * to select arch depending on TargetPlatfom automatically

Changed in this revision

EthernetInterface.cpp Show annotated file Show diff for this revision Revisions of this file
EthernetInterface.h Show annotated file Show diff for this revision Revisions of this file
eth_arch.h Show annotated file Show diff for this revision Revisions of this file
--- a/EthernetInterface.cpp	Mon Jun 15 22:44:54 2015 +0900
+++ b/EthernetInterface.cpp	Mon Jun 15 23:43:56 2015 +0000
@@ -18,6 +18,8 @@
 
 #include "EthernetInterface.h"
 #include "DHCPClient.h"
+
+#if not defined(TARGET_WIZwiki_W7500)
 EthernetInterface::EthernetInterface(PinName mosi, PinName miso, PinName sclk, PinName cs, PinName reset) :
         WIZnet_Chip(mosi, miso, sclk, cs, reset)
 {
@@ -29,7 +31,7 @@
 {
     ip_set = false;
 }
-
+#endif
 
 int EthernetInterface::init(uint8_t * mac)
 {
--- a/EthernetInterface.h	Mon Jun 15 22:44:54 2015 +0900
+++ b/EthernetInterface.h	Mon Jun 15 23:43:56 2015 +0000
@@ -23,10 +23,10 @@
  */
 class EthernetInterface: public WIZnet_Chip {
 public:
-
+#if not defined(TARGET_WIZwiki_W7500)
     EthernetInterface(PinName mosi, PinName miso, PinName sclk, PinName cs, PinName reset);
     EthernetInterface(SPI* spi, PinName cs, PinName reset);
-
+#endif
   /** Initialize the interface with DHCP.
   * Initialize the interface and configure it to use DHCP (no connection at this point).
   * \return 0 on success, a negative number on failure
--- a/eth_arch.h	Mon Jun 15 22:44:54 2015 +0900
+++ b/eth_arch.h	Mon Jun 15 23:43:56 2015 +0000
@@ -19,19 +19,20 @@
 
 #pragma once
 
-//#define USE_W7500 // used WIZwiki_W7500
-#define USE_W5500 // used W5500 Ethernet Shield & WIZ550io
+#if defined(TARGET_WIZwiki_W7500)
 
+#include "W7500x_toe.h"
+#define __DEF_USED_IC101AG__  //For using IC+101AG@WIZwiki-W7500
 
-#if defined(USE_W5500)
-#include "W5500.h"
-//#define USE_WIZ550IO_MAC    // using the MAC address stored in the WIZ550io
-#endif
+#else
 
-#if defined(USE_W7500)
-#include "W7500x_toe.h"
-#define __DEF_USED_IC101AG__ //For using IC+101AG@WIZwiki-W7500
+#include "W5500.h"            // W5500 Ethernet Shield 
+//#define USE_WIZ550IO_MAC    // WIZ550io; using the MAC address
+
 #endif
 
 
 
+
+
+