Skip to content

Commit

Permalink
Add Print::write(const char *, size_t)
Browse files Browse the repository at this point in the history
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).
  • Loading branch information
matthijskooijman committed Dec 24, 2013
1 parent 618aace commit c2c503d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cores/arduino/Print.h
Expand Up @@ -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 &);
Expand Down

0 comments on commit c2c503d

Please sign in to comment.