aboutsummaryrefslogtreecommitdiff
path: root/cores/arduino/Print.h
diff options
context:
space:
mode:
authorMatthijs Kooijman <matthijs@stdin.nl>2013-12-24 10:57:32 +0100
committerMatthijs Kooijman <matthijs@stdin.nl>2013-12-24 13:22:42 +0100
commit7ded03787817f65fac27cb0969b7cab00dc4821a (patch)
tree86e3899e603c82e62b9afab7fdf0b4ca9b9ff7f1 /cores/arduino/Print.h
parentdce9146485869ed6008dce30777ffd08c1f92311 (diff)
Add Print::write(const char *, size_t)
The new function just calls Print::write(const uint8_t *, size_t), but this allows writing out a buffer of chars (without having to learn about casts).
Diffstat (limited to 'cores/arduino/Print.h')
-rw-r--r--cores/arduino/Print.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/cores/arduino/Print.h b/cores/arduino/Print.h
index dc76150..7b53aa4 100644
--- a/cores/arduino/Print.h
+++ b/cores/arduino/Print.h
@@ -51,6 +51,9 @@ class Print
return write((const uint8_t *)str, strlen(str));
}
virtual size_t write(const uint8_t *buffer, size_t size);
+ size_t write(const char *buffer, size_t size) {
+ return write((const uint8_t *)buffer, size);
+ }
size_t print(const __FlashStringHelper *);
size_t print(const String &);