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

◆ is_aligned()

FASTLED_FORCE_INLINE bool fl::isr::is_aligned ( const void * ptr,
size_t alignment )

Check if a pointer is aligned to a specific byte boundary.

Parameters
ptrPointer to check
alignmentAlignment requirement in bytes (must be power of 2)
Returns
true if aligned, false otherwise

Definition at line 22 of file memcpy.h.

22 {
23 return (fl::ptr_to_int(ptr) & (alignment - 1)) == 0;
24}
uptr ptr_to_int(T *ptr) FL_NOEXCEPT
Definition bit_cast.h:71

References FASTLED_FORCE_INLINE, and fl::ptr_to_int().

+ Here is the call graph for this function: