SdFile.h 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. /* Arduino SdFat Library
  2. * Copyright (C) 2009 by William Greiman
  3. *
  4. * This file is part of the Arduino SdFat Library
  5. *
  6. * This Library is free software: you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License as published by
  8. * the Free Software Foundation, either version 3 of the License, or
  9. * (at your option) any later version.
  10. *
  11. * This Library is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. * GNU General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU General Public License
  17. * along with the Arduino SdFat Library. If not, see
  18. * <http://www.gnu.org/licenses/>.
  19. */
  20. /**
  21. * \file
  22. * \brief SdFile class
  23. */
  24. #include "Marlin.h"
  25. #ifdef SDSUPPORT
  26. #include "SdBaseFile.h"
  27. //#include <Print.h>
  28. #ifndef SdFile_h
  29. #define SdFile_h
  30. //------------------------------------------------------------------------------
  31. /**
  32. * \class SdFile
  33. * \brief SdBaseFile with Print.
  34. */
  35. class SdFile : public SdBaseFile/*, public Print*/ {
  36. public:
  37. SdFile() {}
  38. SdFile(const char* name, uint8_t oflag);
  39. #if ARDUINO >= 100
  40. size_t write(uint8_t b);
  41. #else
  42. void write(uint8_t b);
  43. #endif
  44. int16_t write(const void* buf, uint16_t nbyte);
  45. void write(const char* str);
  46. void write_P(PGM_P str);
  47. void writeln_P(PGM_P str);
  48. };
  49. #endif // SdFile_h
  50. #endif