From b4911b203af268005f82dd1dd3eee19fd01cb35d Mon Sep 17 00:00:00 2001 From: Changwoo Ryu Date: Mon, 27 Feb 2012 00:26:37 +0900 Subject: 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. --- Sprinter/SdFat.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'Sprinter/SdFat.h') 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); -- cgit v1.2.1