mirror of
https://github.com/esp8266/Arduino.git
synced 2025-04-22 21:23:07 +03:00
Make FILE_WRITE append in SD.h wrapper (#6106)
* Make FILE_WRITE append in SD.h wrapper Fixes #6105 * Update host tests
This commit is contained in:
parent
25c95ac185
commit
968d6fcb0a
@ -27,7 +27,7 @@
|
||||
#undef FILE_READ
|
||||
#define FILE_READ sdfat::O_READ
|
||||
#undef FILE_WRITE
|
||||
#define FILE_WRITE (sdfat::O_READ | sdfat::O_WRITE | sdfat::O_CREAT)
|
||||
#define FILE_WRITE (sdfat::O_READ | sdfat::O_WRITE | sdfat::O_CREAT | sdfat::O_APPEND)
|
||||
|
||||
class SDClass {
|
||||
public:
|
||||
|
@ -350,10 +350,10 @@ TEST_CASE("Multisplendored File::writes", "[fs]")
|
||||
f.write((const uint8_t*)&bigone, 4);
|
||||
f.close();
|
||||
REQUIRE(readFileSD("/file.txt") == "aAbbcctheendxyz@@@@");
|
||||
File g = SD.open("/file.txt", FILE_WRITE);
|
||||
File g = SD.open("/file2.txt", FILE_WRITE);
|
||||
g.write(0);
|
||||
g.close();
|
||||
g = SD.open("/file.txt", FILE_READ);
|
||||
g = SD.open("/file2.txt", FILE_READ);
|
||||
uint8_t u = 0x66;
|
||||
g.read(&u, 1);
|
||||
g.close();
|
||||
|
Loading…
x
Reference in New Issue
Block a user