MCPcopy Create free account
hub / github.com/FastLED/FastLED / fl_progmem_read_float

Function fl_progmem_read_float

src/fl/audio/mic_response_data.h:25–30  ·  view source on GitHub ↗

Read a float from PROGMEM. On AVR this reads flash via pgm_read_dword; on other platforms it's a plain memory read via memcpy (no aliasing issues).

Source from the content-addressed store, hash-verified

23/// Read a float from PROGMEM. On AVR this reads flash via pgm_read_dword;
24/// on other platforms it's a plain memory read via memcpy (no aliasing issues).
25inline float fl_progmem_read_float(const float* addr) {
26 u32 raw = FL_PGM_READ_DWORD_ALIGNED(addr);
27 float result;
28 FL_BUILTIN_MEMCPY(&result, &raw, sizeof(float));
29 return result;
30}
31
32// ============================================================================
33// 1/6-octave frequency points: 61 points from 20 Hz to 20 kHz

Callers 2

interpolateMicResponseFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected