slightly faster to keep IRAM_ATTR for sPC and color_add
This commit is contained in:
@@ -938,7 +938,7 @@ static void xyFromBlock(uint16_t &x,uint16_t &y, uint16_t i, uint16_t vW, uint16
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void WLED_O2_ATTR __attribute__((hot)) Segment::setPixelColor(int i, uint32_t col) //WLEDMM: IRAM_ATTR conditionally
|
void IRAM_ATTR_YN WLED_O2_ATTR __attribute__((hot)) Segment::setPixelColor(int i, uint32_t col) //WLEDMM: IRAM_ATTR conditionally
|
||||||
{
|
{
|
||||||
if (!isActive()) return; // not active
|
if (!isActive()) return; // not active
|
||||||
#ifndef WLED_DISABLE_2D
|
#ifndef WLED_DISABLE_2D
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ uint32_t WLED_O3_ATTR IRAM_ATTR_YN __attribute__((hot)) color_blend(uint32_t col
|
|||||||
* color add function that preserves ratio
|
* color add function that preserves ratio
|
||||||
* idea: https://github.com/Aircoookie/WLED/pull/2465 by https://github.com/Proto-molecule
|
* idea: https://github.com/Aircoookie/WLED/pull/2465 by https://github.com/Proto-molecule
|
||||||
*/
|
*/
|
||||||
uint32_t WLED_O2_ATTR color_add(uint32_t c1, uint32_t c2, bool fast) // WLEDMM added IRAM_ATTR_YN
|
uint32_t WLED_O2_ATTR IRAM_ATTR_YN color_add(uint32_t c1, uint32_t c2, bool fast) // WLEDMM added IRAM_ATTR_YN
|
||||||
{
|
{
|
||||||
if (c2 == 0) return c1; // WLEDMM shortcut
|
if (c2 == 0) return c1; // WLEDMM shortcut
|
||||||
if (c1 == 0) return c2; // WLEDMM shortcut
|
if (c1 == 0) return c2; // WLEDMM shortcut
|
||||||
|
|||||||
Reference in New Issue
Block a user