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 Dec 28 15:56:02 2016 +0000
Revision:
8:b9332109461d
Parent:
5:f9a2b1916a8d
Child:
9:312e0937630f
Abstract Print Class added

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 8:b9332109461d 24 #include "Server.h"
cassyarduino 0:e3fb1267e3c3 25 #endif
cassyarduino 0:e3fb1267e3c3 26 #if defined(__MBED__)
cassyarduino 8:b9332109461d 27 #include <mbed.h>
cassyarduino 8:b9332109461d 28 #include "mbed/Print.h"
cassyarduino 8:b9332109461d 29 #include "mbed/Server.h"
cassyarduino 0:e3fb1267e3c3 30 #endif
cassyarduino 0:e3fb1267e3c3 31 #include "UIPClient.h"
cassyarduino 0:e3fb1267e3c3 32
cassyarduino 8:b9332109461d 33 #if defined(__MBED__)
cassyarduino 8:b9332109461d 34 class UIPServer : public Print, public Server {
cassyarduino 8:b9332109461d 35 #else
cassyarduino 8:b9332109461d 36 class UIPServer : public Server {
cassyarduino 8:b9332109461d 37 #endif
cassyarduino 0:e3fb1267e3c3 38
cassyarduino 0:e3fb1267e3c3 39 public:
cassyarduino 0:e3fb1267e3c3 40 UIPServer(uint16_t);
cassyarduino 0:e3fb1267e3c3 41 UIPClient available();
cassyarduino 5:f9a2b1916a8d 42 virtual void begin();
cassyarduino 0:e3fb1267e3c3 43 size_t write(uint8_t);
cassyarduino 0:e3fb1267e3c3 44 size_t write(const uint8_t *buf, size_t size);
cassyarduino 8:b9332109461d 45 //#if defined(ARDUINO)
cassyarduino 8:b9332109461d 46 using Print::write;
cassyarduino 8:b9332109461d 47 //#endif
cassyarduino 0:e3fb1267e3c3 48
cassyarduino 0:e3fb1267e3c3 49 private:
cassyarduino 0:e3fb1267e3c3 50 uint16_t _port;
cassyarduino 0:e3fb1267e3c3 51 };
cassyarduino 0:e3fb1267e3c3 52
cassyarduino 0:e3fb1267e3c3 53 #endif