SdFile.h

Fri, 17 Nov 2017 10:13:31 +0100

author
mdd
date
Fri, 17 Nov 2017 10:13:31 +0100
changeset 3
770b218a4931
parent 0
2c8ba1964db7
permissions
-rw-r--r--

proper configuration, homing and planner optimization

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

mercurial