These functions are more efficient for scaling multiple bytes at once, but require calling cleanup_R1() afterwards.
◆ cleanup_R1()
LIB8STATIC_ALWAYS_INLINE void cleanup_R1 |
( |
| ) |
|
Clean up the r1 register after a series of *LEAVING_R1_DIRTY calls.
Definition at line 333 of file scale8.h.
◆ nscale8_LEAVING_R1_DIRTY()
LIB8STATIC_ALWAYS_INLINE void nscale8_LEAVING_R1_DIRTY |
( |
uint8_t & | i, |
|
|
fract8 | scale ) |
In place modifying version of scale8() that does not clean up the R1 register on AVR.
If you are doing several "scale8()'s" in a row, use this, and then explicitly call cleanup_R1().
- Warning
- You MUST call cleanup_R1() after using this function!
- Warning
- This function always modifies its arguments in place!
- Parameters
-
i | input value to scale |
scale | scale factor, in n/256 units |
- See also
- scale8()
Definition at line 217 of file scale8.h.
◆ nscale8_video_LEAVING_R1_DIRTY()
LIB8STATIC_ALWAYS_INLINE void nscale8_video_LEAVING_R1_DIRTY |
( |
uint8_t & | i, |
|
|
fract8 | scale ) |
In place modifying version of scale8_video() that does not clean up the R1 register on AVR.
If you are doing several "scale8_video()'s" in a row, use this, and then explicitly call cleanup_R1().
- Warning
- You MUST call cleanup_R1() after using this function!
- Warning
- This function always modifies its arguments in place!
- Parameters
-
i | input value to scale |
scale | scale factor, in n/256 units |
- See also
- scale8_video()
Definition at line 311 of file scale8.h.
◆ nscale8x3_constexpr()
CRGB nscale8x3_constexpr |
( |
uint8_t | r, |
|
|
uint8_t | g, |
|
|
uint8_t | b, |
|
|
fract8 | scale ) |
|
constexpr |
◆ scale8_LEAVING_R1_DIRTY()
LIB8STATIC_ALWAYS_INLINE uint8_t scale8_LEAVING_R1_DIRTY |
( |
uint8_t | i, |
|
|
fract8 | scale ) |
This version of scale8() does not clean up the R1 register on AVR.
If you are doing several "scale8()'s" in a row, use this, and then explicitly call cleanup_R1().
- Warning
- You MUST call cleanup_R1() after using this function!
- Parameters
-
i | input value to scale |
scale | scale factor, in n/256 units |
- Returns
- scaled value
- See also
- scale8()
Definition at line 170 of file scale8.h.
◆ scale8_video_LEAVING_R1_DIRTY()
LIB8STATIC_ALWAYS_INLINE uint8_t scale8_video_LEAVING_R1_DIRTY |
( |
uint8_t | i, |
|
|
fract8 | scale ) |
This version of scale8_video() does not clean up the R1 register on AVR.
If you are doing several "scale8_video()'s" in a row, use this, and then explicitly call cleanup_R1().
- Warning
- You MUST call cleanup_R1() after using this function!
- Parameters
-
i | input value to scale |
scale | scale factor, in n/256 units |
- Returns
- scaled value
- See also
- scale8_video()
Definition at line 262 of file scale8.h.