FastLED 3.9.15
Loading...
Searching...
No Matches

◆ fastled_file_offset()

const char * fl::fastled_file_offset ( const char * file)
inline

Definition at line 8 of file dbg.h.

8 {
9 const char* p = file;
10 const char* last_slash = nullptr;
11
12 while (*p) {
13 if (p[0] == 's' && p[1] == 'r' && p[2] == 'c' && p[3] == '/') {
14 return p; // Skip past "src/"
15 }
16 if (*p == '/') { // fallback to using last slash
17 last_slash = p;
18 }
19 p++;
20 }
21 // If "src/" not found but we found at least one slash, return after the last slash
22 if (last_slash) {
23 return last_slash + 1;
24 }
25 return file; // If no slashes found at all, return original path
26}
static FASTLED_NAMESPACE_BEGIN uint8_t const p[]
Definition noise.cpp:56

References p.