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
22 // last slash
23 if (last_slash) {
24 return last_slash + 1;
25 }
26 return file; // If no slashes found at all, return original path
27}
static FASTLED_NAMESPACE_BEGIN uint8_t const p[]
Definition noise.cpp:30

References p.