From 4e9fb924b2ea4c1373edc09408db2ac0c402e68c Mon Sep 17 00:00:00 2001 From: Zach Eveland Date: Tue, 20 Dec 2011 17:09:44 -0500 Subject: changed Keyboard write() method to type(). Made write() an alias for type() to allow subclassing by Stream. --- cores/arduino/HID.cpp | 3 ++- cores/arduino/USBAPI.h | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/cores/arduino/HID.cpp b/cores/arduino/HID.cpp index 8ed1566..e6fb5f7 100644 --- a/cores/arduino/HID.cpp +++ b/cores/arduino/HID.cpp @@ -406,7 +406,8 @@ const uint8_t _asciimap[128] = }; uint8_t USBPutChar(uint8_t c); -size_t Keyboard_::write(uint8_t c) + +size_t Keyboard_::type(uint8_t c) { // Keydown { diff --git a/cores/arduino/USBAPI.h b/cores/arduino/USBAPI.h index 1772c3c..6a0b989 100644 --- a/cores/arduino/USBAPI.h +++ b/cores/arduino/USBAPI.h @@ -104,7 +104,8 @@ private: void setKeyMap(KeyMap* keyMap); public: Keyboard_(); - virtual size_t write(uint8_t); + virtual size_t write(uint8_t c) {type(c);}; + virtual size_t type(uint8_t c); }; extern Keyboard_ Keyboard; -- cgit v1.2.3-18-g5258