From 4ec08ef6cc8189f49f45966c05d9283a81c4977a Mon Sep 17 00:00:00 2001 From: Federico Fissore Date: Thu, 20 Jun 2013 16:32:12 +0200 Subject: reviewed bridge example added BridgeClass::writeMessage(const String& str) --- libraries/Bridge/Bridge.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'libraries/Bridge/Bridge.cpp') diff --git a/libraries/Bridge/Bridge.cpp b/libraries/Bridge/Bridge.cpp index 5802156..2485852 100644 --- a/libraries/Bridge/Bridge.cpp +++ b/libraries/Bridge/Bridge.cpp @@ -68,6 +68,10 @@ void BridgeClass::writeMessage(const uint8_t *buff, unsigned int size) { transfer(cmd, 1, buff, size, NULL, 0); } +void BridgeClass::writeMessage(const String& str) { + writeMessage((uint8_t*) str.c_str(), str.length()); +} + unsigned int BridgeClass::messageAvailable() { uint8_t tmp[] = {'n'}; uint8_t res[2]; -- cgit v1.2.3-18-g5258