diff options
author | Changwoo Ryu <cwryu@debian.org> | 2012-02-27 00:26:37 +0900 |
---|---|---|
committer | Changwoo Ryu <cwryu@debian.org> | 2012-03-05 00:10:16 +0900 |
commit | b4911b203af268005f82dd1dd3eee19fd01cb35d (patch) | |
tree | bed514295643083ce0b8e6e359d101e6a1fdf697 /Sprinter/SdFat.h | |
parent | 0ed514e153a7fe6fa6d9810e7373798ac4088dff (diff) |
Correct SD for Arduino 1.0 compatibility
With Arduino 1.0 Print class:
- write() should return, and
- print() with a uint_8 or int_8 character argument does not call
print(char) anymore. So character argument should be casted to
'char' explicitly.
Diffstat (limited to 'Sprinter/SdFat.h')
-rw-r--r-- | Sprinter/SdFat.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Sprinter/SdFat.h b/Sprinter/SdFat.h index 048fa71..7a11bba 100644 --- a/Sprinter/SdFat.h +++ b/Sprinter/SdFat.h @@ -283,7 +283,11 @@ class SdFile : public Print { }
/** \return SdVolume that contains this file. */
SdVolume* volume(void) const {return vol_;}
+#if ARDUINO >= 100
+ size_t write(uint8_t b);
+#else
void write(uint8_t b);
+#endif
int16_t write(const void* buf, uint16_t nbyte);
void write(const char* str);
void write_P(PGM_P str);
|