From c0266615d5e6d02a22b2178bcf4b0815a0c37bf9 Mon Sep 17 00:00:00 2001 From: Drake Youngkun Min Date: Thu, 17 Nov 2016 19:33:42 +0900 Subject: [PATCH] Add TwoWire::write(const char *) (#56) --- libraries/Wire/src/Wire.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libraries/Wire/src/Wire.h b/libraries/Wire/src/Wire.h index bd54c750..c2a92847 100644 --- a/libraries/Wire/src/Wire.h +++ b/libraries/Wire/src/Wire.h @@ -71,6 +71,10 @@ public: int peek(void); void flush(void); + inline size_t write(const char * s) + { + return write((uint8_t*) s, strlen(s)); + } inline size_t write(unsigned long n) { return write((uint8_t)n); @@ -92,4 +96,3 @@ public: extern TwoWire Wire; #endif -