Skip to content

Commit bccaad9

Browse files
committed
Adding constants for SEEK_SET/CUR/END without the 'SPIFFS_' prefix which are to be used for the 'whence' parameter of 'lseek'
1 parent 1b5b9e4 commit bccaad9

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

keywords.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,10 @@ READ_WRITE LITERAL1
6868
DIRECT LITERAL1
6969
EXCLUSIVE LITERAL1
7070

71+
START LITERAL1
72+
CURRENT LITERAL1
73+
END LITERAL1
74+
7175
SPIFFS_APPEND LITERAL1
7276
SPIFFS_TRUNC LITERAL1
7377
SPIFFS_CREAT LITERAL1

src/Arduino_SPIFFS_File.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,14 @@ extern "C"
3030
#include "spiffs.h"
3131
}
3232

33+
/**************************************************************************************
34+
* CLASS DECLARATION
35+
**************************************************************************************/
36+
37+
static int constexpr START = SPIFFS_SEEK_SET; /* Start to seek from the beginning of the file */
38+
static int constexpr CURRENT = SPIFFS_SEEK_CUR; /* Start to seek from the current position of the file pointer */
39+
static int constexpr END = SPIFFS_SEEK_END; /* Start to seek from the end of the file */
40+
3341
/**************************************************************************************
3442
* CLASS DECLARATION
3543
**************************************************************************************/

0 commit comments

Comments
 (0)