inline frequently used color utilities (up to 15% faster)
* moving color_blend, color_add, and color_fade to a seperate file, to allow the compiler to inline the functions. * inlining slightly increases firmware size - original non-inline functions get used on 8266, or when WLEDMM_SAVE_FLASH is defined.
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
#include "wled.h"
|
||||
|
||||
#if !defined(ARDUINO_ARCH_ESP32) || !defined(WLEDMM_FASTPATH) || defined(WLEDMM_SAVE_FLASH) // WLEDMM: color utils moved into colorTools.hpp, so comiler can inline calls (up to 12% faster)
|
||||
/*
|
||||
* Color conversion & utility methods
|
||||
*/
|
||||
@@ -108,6 +109,7 @@ IRAM_ATTR_YN __attribute__((hot)) uint32_t color_fade(uint32_t c1, uint8_t amoun
|
||||
return scaledcolor;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
void setRandomColor(byte* rgb)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user