Go Down

Topic: SD error codes (Read 1 time) previous topic - next topic

David Pankhurst

While testing  my SD card, I had to expose the error code provided by the Sd2Card 'card' in the class SDClass (\SD\SD.h)

Code: [Select]
class SDClass {
...
 Sd2Card card;
...
public:
int error(void)
{
 return card.errorCode();
}


I'd like to suggest this be added to the code, since others might want to know what the error code is when their SD card fails.

robtillaart

Sounds like a good idea, if all errorcodes are documented, what they mean, cq how to solve (could be in a separate txt file, not in the SDclass)
Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

David Pankhurst


Sounds like a good idea, if all errorcodes are documented, what they mean, cq how to solve (could be in a separate txt file, not in the SDclass)


currently, they are in \libraries\SD\utility\Sd2Card.h starting from line 95, so even the error function as it stands would provide some use/help

fat16lib

In the beginning I used error codes for debug in SdFat.  They have not been the same from version to version.

Error codes have become useful for diagnosing hardware problems so I plan to implement a error code to text function in a future version of SdFat.

SD.h is a wrapper for an old version of SdFat so this won't help SD.h users. 

Go Up