UIPEthernet library for Arduino IDE, Eclipse with arduino plugin and MBED/SMeshStudio (AVR,STM32F,ESP8266,Intel ARC32,Nordic nRF51,Teensy boards,Realtek Ameba(RTL8195A,RTL8710)), ENC28j60 network chip. Compatible with Wiznet W5100 Ethernet library API. Compiled and tested on Nucleo-F302R8. Master repository is: https://github.com/UIPEthernet/UIPEthernet/

Committer:
cassyarduino
Date:
Wed Jan 04 18:32:00 2017 +0100
Revision:
19:e416943f7119
Parent:
10:cd62b2205c2a
Child:
33:7ba5d53df0f2
Changes

Who changed what in which revision?

UserRevisionLine numberNew contents of line
cassyarduino 0:e3fb1267e3c3 1 /*
cassyarduino 0:e3fb1267e3c3 2 UIPServer.h - Arduino implementation of a uIP wrapper class.
cassyarduino 0:e3fb1267e3c3 3 Copyright (c) 2013 Norbert Truchsess <norbert.truchsess@t-online.de>
cassyarduino 0:e3fb1267e3c3 4 All rights reserved.
cassyarduino 0:e3fb1267e3c3 5
cassyarduino 0:e3fb1267e3c3 6 This program is free software: you can redistribute it and/or modify
cassyarduino 0:e3fb1267e3c3 7 it under the terms of the GNU General Public License as published by
cassyarduino 0:e3fb1267e3c3 8 the Free Software Foundation, either version 3 of the License, or
cassyarduino 0:e3fb1267e3c3 9 (at your option) any later version.
cassyarduino 0:e3fb1267e3c3 10
cassyarduino 0:e3fb1267e3c3 11 This program is distributed in the hope that it will be useful,
cassyarduino 0:e3fb1267e3c3 12 but WITHOUT ANY WARRANTY; without even the implied warranty of
cassyarduino 0:e3fb1267e3c3 13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
cassyarduino 0:e3fb1267e3c3 14 GNU General Public License for more details.
cassyarduino 0:e3fb1267e3c3 15
cassyarduino 0:e3fb1267e3c3 16 You should have received a copy of the GNU General Public License
cassyarduino 0:e3fb1267e3c3 17 along with this program. If not, see <http://www.gnu.org/licenses/>.
cassyarduino 0:e3fb1267e3c3 18 */
cassyarduino 0:e3fb1267e3c3 19 #ifndef UIPSERVER_H
cassyarduino 0:e3fb1267e3c3 20 #define UIPSERVER_H
cassyarduino 0:e3fb1267e3c3 21
cassyarduino 0:e3fb1267e3c3 22 #include "ethernet_comp.h"
cassyarduino 0:e3fb1267e3c3 23 #if defined(ARDUINO)
cassyarduino 9:312e0937630f 24 #include "Print.h"
cassyarduino 19:e416943f7119 25 #if defined(__STM32F3__) || defined(STM32F3)
cassyarduino 19:e416943f7119 26 #include "mbed/Server.h"
cassyarduino 19:e416943f7119 27 #else
cassyarduino 19:e416943f7119 28 #include "Server.h"
cassyarduino 19:e416943f7119 29 #endif
cassyarduino 0:e3fb1267e3c3 30 #endif
cassyarduino 0:e3fb1267e3c3 31 #if defined(__MBED__)
cassyarduino 8:b9332109461d 32 #include "mbed/Print.h"
cassyarduino 8:b9332109461d 33 #include "mbed/Server.h"
cassyarduino 0:e3fb1267e3c3 34 #endif
cassyarduino 0:e3fb1267e3c3 35 #include "UIPClient.h"
cassyarduino 0:e3fb1267e3c3 36
cassyarduino 19:e416943f7119 37 #if defined(ARDUINO) && !defined(STM32F3)
cassyarduino 10:cd62b2205c2a 38 class UIPServer : public Server {
cassyarduino 10:cd62b2205c2a 39 #endif
cassyarduino 19:e416943f7119 40 #if defined(__MBED__) || defined(STM32F3)
cassyarduino 10:cd62b2205c2a 41 class UIPServer : public Print, public Server {
cassyarduino 10:cd62b2205c2a 42 #endif
cassyarduino 0:e3fb1267e3c3 43 public:
cassyarduino 0:e3fb1267e3c3 44 UIPServer(uint16_t);
cassyarduino 0:e3fb1267e3c3 45 UIPClient available();
cassyarduino 5:f9a2b1916a8d 46 virtual void begin();
cassyarduino 9:312e0937630f 47 virtual size_t write(uint8_t);
cassyarduino 9:312e0937630f 48 virtual size_t write(const uint8_t *buf, size_t size);
cassyarduino 9:312e0937630f 49
cassyarduino 8:b9332109461d 50 using Print::write;
cassyarduino 0:e3fb1267e3c3 51
cassyarduino 0:e3fb1267e3c3 52 private:
cassyarduino 0:e3fb1267e3c3 53 uint16_t _port;
cassyarduino 0:e3fb1267e3c3 54 };
cassyarduino 0:e3fb1267e3c3 55
cassyarduino 0:e3fb1267e3c3 56 #endif