Skip to content

Commit

Permalink
Merge pull request #72 from mutoo/review
Browse files Browse the repository at this point in the history
doc: explain MAX_COMPONENT_LEN
  • Loading branch information
per1234 authored Apr 17, 2022
2 parents dc34e49 + a84a0da commit aa96633
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/SD.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,11 @@

namespace SDLib {

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

bool getNextPathComponent(const char *path, unsigned int *p_offset,
char *buffer) {
Expand Down

0 comments on commit aa96633

Please sign in to comment.