1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495 |
-
- #include "Marlin.h"
-
- #ifdef 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
|