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

Function is_aligned

src/fl/stl/isr/memcpy.h:22–24  ·  view source on GitHub ↗

@brief Check if a pointer is aligned to a specific byte boundary @param ptr Pointer to check @param alignment Alignment requirement in bytes (must be power of 2) @return true if aligned, false otherwise

Source from the content-addressed store, hash-verified

20/// @param alignment Alignment requirement in bytes (must be power of 2)
21/// @return true if aligned, false otherwise
22FASTLED_FORCE_INLINE bool is_aligned(const void* ptr, size_t alignment) {
23 return (fl::ptr_to_int(ptr) & (alignment - 1)) == 0;
24}
25
26/// @brief ISR-optimized 32-bit block copy for 4-byte aligned memory
27/// @param dst Destination pointer (must be 4-byte aligned)

Callers

nothing calls this directly

Calls 1

ptr_to_intFunction · 0.85

Tested by

no test coverage detected