Skip to content

Commit a78fa1d

Browse files
committedNov 28, 2010
Renaming constants: SD_MODE -> FILE_MODE
1 parent ff89afb commit a78fa1d

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed
 

‎libraries/ArduinoTestSuite/examples/ATS_SD_File/ATS_SD_File.pde

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,21 +15,21 @@ void setup()
1515
ATS_PrintTestStatus("SD.begin()", b = SD.begin(4));
1616
if (!b) goto done;
1717

18-
f = SD.open("test.txt", SD_TRUNCATE);
18+
f = SD.open("test.txt", FILE_TRUNCATE);
1919
ATS_PrintTestStatus("SD.open()", f);
2020
if (!f) goto done;
2121

2222
f.print("1234");
2323
f.close();
2424

25-
f = SD.open("test.txt", SD_TRUNCATE);
25+
f = SD.open("test.txt", FILE_TRUNCATE);
2626
ATS_PrintTestStatus("SD.open()", f);
2727
if (!f) goto done;
2828

2929
f.print("abcde");
3030
f.close();
3131

32-
f = SD.open("test.txt", SD_APPEND);
32+
f = SD.open("test.txt", FILE_APPEND);
3333
ATS_PrintTestStatus("SD.open()", f);
3434
if (!f) goto done;
3535

@@ -71,7 +71,7 @@ void setup()
7171

7272
f.close();
7373

74-
f = SD.open("test2.txt", SD_TRUNCATE);
74+
f = SD.open("test2.txt", FILE_TRUNCATE);
7575
ATS_PrintTestStatus("SD.open()", f);
7676
if (!f) goto done;
7777

‎libraries/ArduinoTestSuite/examples/ATS_SD_Files/ATS_SD_Files.pde

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ void setup()
1313
if (!b) goto done;
1414

1515
ATS_PrintTestStatus("!SD.exists()", !SD.exists("asdf.txt"));
16-
ATS_PrintTestStatus("SD.open()", f = SD.open("asdf.txt", SD_TRUNCATE)); f.close();
16+
ATS_PrintTestStatus("SD.open()", f = SD.open("asdf.txt", FILE_TRUNCATE)); f.close();
1717
ATS_PrintTestStatus("SD.exists()", SD.exists("asdf.txt"));
1818
ATS_PrintTestStatus("SD.exists()", SD.exists("/asdf.txt"));
1919
ATS_PrintTestStatus("SD.remove()", SD.remove("asdf.txt"));
@@ -48,13 +48,13 @@ void setup()
4848
ATS_PrintTestStatus("!SD.exists()", !SD.exists("x/y"));
4949
ATS_PrintTestStatus("!SD.exists()", !SD.exists("x/y/z"));
5050

51-
ATS_PrintTestStatus("!SD.open()", !(f = SD.open("asdf/asdf.txt", SD_TRUNCATE))); f.close();
51+
ATS_PrintTestStatus("!SD.open()", !(f = SD.open("asdf/asdf.txt", FILE_TRUNCATE))); f.close();
5252
ATS_PrintTestStatus("!SD.exists()", !SD.exists("asdf"));
5353
ATS_PrintTestStatus("!SD.exists()", !SD.exists("asdf.txt"));
5454
ATS_PrintTestStatus("!SD.exists()", !SD.exists("asdf/asdf.txt"));
5555
ATS_PrintTestStatus("SD.mkdir()", SD.mkdir("asdf"));
5656
ATS_PrintTestStatus("SD.exists()", SD.exists("asdf"));
57-
ATS_PrintTestStatus("SD.open()", f = SD.open("asdf/asdf.txt", SD_TRUNCATE)); f.close();
57+
ATS_PrintTestStatus("SD.open()", f = SD.open("asdf/asdf.txt", FILE_TRUNCATE)); f.close();
5858
ATS_PrintTestStatus("SD.exists()", SD.exists("asdf/asdf.txt"));
5959
ATS_PrintTestStatus("!SD.rmdir()", !SD.rmdir("asdf"));
6060
ATS_PrintTestStatus("SD.exists()", SD.exists("asdf"));

‎libraries/SD/SD.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@
2020
#include <utility/SdFat.h>
2121
#include <utility/SdFatUtil.h>
2222

23-
#define SD_READ O_READ
24-
#define SD_TRUNCATE (O_WRITE | O_CREAT | O_TRUNC)
25-
#define SD_APPEND (O_WRITE | O_CREAT | O_APPEND)
23+
#define FILE_READ O_READ
24+
#define FILE_TRUNCATE (O_WRITE | O_CREAT | O_TRUNC)
25+
#define FILE_APPEND (O_WRITE | O_CREAT | O_APPEND)
2626

2727
class File : public Stream {
2828
public:
@@ -53,7 +53,7 @@ class SDClass {
5353
// Open the specified file/directory with the supplied mode (e.g. read or
5454
// write, etc). Returns a File object for interacting with the file.
5555
// Note that currently only one file can be open at a time.
56-
File open(char *filename, uint8_t mode = SD_READ);
56+
File open(char *filename, uint8_t mode = FILE_READ);
5757

5858
// Methods to determine if the requested file path exists.
5959
boolean exists(char *filepath);

0 commit comments

Comments
 (0)
Please sign in to comment.