Skip to content

Commit aa96633

Browse files
authored
Merge pull request #72 from mutoo/review
doc: explain MAX_COMPONENT_LEN
2 parents dc34e49 + a84a0da commit aa96633

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/SD.cpp

+5-3
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,11 @@
5454

5555
namespace SDLib {
5656

57-
// Used by `getNextPathComponent`
58-
#define MAX_COMPONENT_LEN 12 // What is max length?
59-
#define PATH_COMPONENT_BUFFER_LEN MAX_COMPONENT_LEN+1
57+
// Used by `getNextPathComponent`
58+
#define MAX_COMPONENT_LEN 12
59+
#define PATH_COMPONENT_BUFFER_LEN (MAX_COMPONENT_LEN + 1)
60+
// BASENAME:char(8) + '.':char(1) + EXT:char(3) = 12 (a.k.a short 8.3 name)
61+
// And an extra space for '\0' for path buffer
6062

6163
bool getNextPathComponent(const char *path, unsigned int *p_offset,
6264
char *buffer) {

0 commit comments

Comments
 (0)