write(), print(), and println() now return number of bytes written.
The type is long, and negative values indicate errors. Needs more testing. http://code.google.com/p/arduino/issues/detail?id=551
This commit is contained in:
@@ -258,8 +258,9 @@ inline void LiquidCrystal::command(uint8_t value) {
|
|||||||
send(value, LOW);
|
send(value, LOW);
|
||||||
}
|
}
|
||||||
|
|
||||||
inline void LiquidCrystal::write(uint8_t value) {
|
inline long LiquidCrystal::write(uint8_t value) {
|
||||||
send(value, HIGH);
|
send(value, HIGH);
|
||||||
|
return 1; // assume sucess
|
||||||
}
|
}
|
||||||
|
|
||||||
/************ low level data pushing commands **********/
|
/************ low level data pushing commands **********/
|
||||||
|
|||||||
@@ -79,7 +79,7 @@ public:
|
|||||||
|
|
||||||
void createChar(uint8_t, uint8_t[]);
|
void createChar(uint8_t, uint8_t[]);
|
||||||
void setCursor(uint8_t, uint8_t);
|
void setCursor(uint8_t, uint8_t);
|
||||||
virtual void write(uint8_t);
|
virtual long write(uint8_t);
|
||||||
void command(uint8_t);
|
void command(uint8_t);
|
||||||
private:
|
private:
|
||||||
void send(uint8_t, uint8_t);
|
void send(uint8_t, uint8_t);
|
||||||
|
|||||||
Reference in New Issue
Block a user