Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Updated write() to sync with changes in Arduino 1.0.1

  • Loading branch information...
commit 3a55e4657b620fc91951554fdea32c5a42fb8366 1 parent ff9a2d1
@tigoe authored
Showing with 6 additions and 6 deletions.
  1. +3 −3 x10.cpp
  2. +3 −3 x10.h
View
6 x10.cpp
@@ -80,18 +80,18 @@ void x10Class::endTransmission(void)
}
-void x10Class::write(uint8_t data)
+size_t x10Class::write(uint8_t data)
{
if (transmitting) {
sendCommand(houseCode, data);
}
}
-void x10Class::write(const char * data)
+size_t x10Class::write(const char * data)
{
write((uint8_t*)data, strlen(data));
}
-void x10Class::write(const uint8_t *data, size_t quantity)
+size_t x10Class::write(const uint8_t *data, size_t quantity)
{
for(size_t i = 0; i < quantity; ++i){
write(data[i]);
View
6 x10.h
@@ -40,9 +40,9 @@ class x10Class : public Stream
void endTransmission(void);
// uint8_t requestFrom(uint8_t, uint8_t);
// uint8_t requestFrom(int, int);
- virtual void write(uint8_t data);
- virtual void write(const char *data);
- virtual void write(const uint8_t *, size_t);
+ virtual size_t write(uint8_t data);
+ virtual size_t write(const char *data);
+ virtual size_t write(const uint8_t *, size_t);
// the following are not implemented yet:
virtual int available(void);
Please sign in to comment.
Something went wrong with that request. Please try again.