123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102 |
-
-
-
- #include "Marlin.h"
-
- #if ENABLED(SDSUPPORT)
- #include "SdFile.h"
-
- SdFile::SdFile(const char* path, uint8_t oflag) : SdBaseFile(path, oflag) {
- }
-
-
- int16_t SdFile::write(const void* buf, uint16_t nbyte) {
- return SdBaseFile::write(buf, nbyte);
- }
-
-
- #if ARDUINO >= 100
- size_t SdFile::write(uint8_t b) {
- return SdBaseFile::write(&b, 1);
- }
- #else
- void SdFile::write(uint8_t b) {
- SdBaseFile::write(&b, 1);
- }
- #endif
-
-
- void SdFile::write(const char* str) {
- SdBaseFile::write(str, strlen(str));
- }
-
-
- void SdFile::write_P(PGM_P str) {
- for (uint8_t c; (c = pgm_read_byte(str)); str++) write(c);
- }
-
-
- void SdFile::writeln_P(PGM_P str) {
- write_P(str);
- write_P(PSTR("\r\n"));
- }
-
-
- #endif
|