diff options
Diffstat (limited to 'cores/arduino/IPAddress.cpp')
| -rw-r--r-- | cores/arduino/IPAddress.cpp | 14 | 
1 files changed, 13 insertions, 1 deletions
| diff --git a/cores/arduino/IPAddress.cpp b/cores/arduino/IPAddress.cpp index 408d518..fe3deb7 100644 --- a/cores/arduino/IPAddress.cpp +++ b/cores/arduino/IPAddress.cpp @@ -1,5 +1,5 @@ -#include <WProgram.h> +#include <Arduino.h>  #include <IPAddress.h>  IPAddress::IPAddress() @@ -42,3 +42,15 @@ bool IPAddress::operator==(const uint8_t* addr)      return memcmp(addr, _address, sizeof(_address)) == 0;  } +size_t IPAddress::printTo(Print& p) const +{ +    size_t n = 0; +    for (int i =0; i < 3; i++) +    { +        n += p.print(_address[i], DEC); +        n += p.print('.'); +    } +    n += p.print(_address[3], DEC); +    return n; +} + | 
