SdErrorCodes.ino 530 B

1234567891011121314151617181920
  1. // Print a list of error codes, symbols, and comments.
  2. #include "SdFat.h"
  3. void setup() {
  4. Serial.begin(9600);
  5. while (!Serial) {
  6. }
  7. delay(1000);
  8. Serial.println();
  9. Serial.println(F("Code,Symbol - failed operation"));
  10. for (uint8_t code = 0; code <= SD_CARD_ERROR_UNKNOWN; code++) {
  11. Serial.print(code < 16 ? "0X0" : "0X");
  12. Serial.print(code, HEX);
  13. Serial.print(",");
  14. printSdErrorSymbol(&Serial, code);
  15. Serial.print(" - ");
  16. printSdErrorText(&Serial, code);
  17. Serial.println();
  18. }
  19. }
  20. void loop() {}