diff options
author | David A. Mellis <d.mellis@arduino.cc> | 2009-04-26 13:10:34 +0000 |
---|---|---|
committer | David A. Mellis <d.mellis@arduino.cc> | 2009-04-26 13:10:34 +0000 |
commit | 0681fc1f177f7c94b4e98bb0931a5efda50f32b0 (patch) | |
tree | 2174000a919ea016385dac3cdb482ce2d21fee9f /cores/arduino/Print.h | |
parent | a42326aba2fd9696a4b2e1239a5a222014056ff5 (diff) |
Adding write(str) and write(buf, size) methods to Print class and Ethernet library Client and Server classes. This allows sending a whole string or buffer at once, reducing the number of ethernet packets.
Diffstat (limited to 'cores/arduino/Print.h')
-rwxr-xr-x | cores/arduino/Print.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/cores/arduino/Print.h b/cores/arduino/Print.h index c95a0dc..a69e85d 100755 --- a/cores/arduino/Print.h +++ b/cores/arduino/Print.h @@ -21,6 +21,7 @@ #define Print_h #include <inttypes.h> +#include <stdio.h> // for size_t #define DEC 10 #define HEX 16 @@ -34,7 +35,9 @@ class Print void printNumber(unsigned long, uint8_t); void printFloat(double, uint8_t); public: - virtual void write(uint8_t); + virtual void write(uint8_t) = 0; + virtual void write(const char *str); + virtual void write(const uint8_t *buffer, size_t size); void print(char); void print(const char[]); void print(uint8_t); |