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

◆ add8()

LIB8STATIC_ALWAYS_INLINE uint8_t add8 ( uint8_t i,
uint8_t j )

Add one byte to another, with 8-bit result.

Note
This does not saturate and may overflow!
Parameters
ifirst byte to add
jsecond byte to add
Returns
the sum of i + j, 8-bit

Definition at line 144 of file math8.h.

144 {
145#if ADD8_C == 1
146 int t = i + j;
147 return static_cast<uint8_t>(t);
148#elif ADD8_AVRASM == 1
149 // Add j to i, period.
150 asm volatile("add %0, %1" : "+r"(i) : "r"(j));
151 return i;
152#else
153#error "No implementation for add8 available."
154#endif
155}
static uint32_t t
Definition Luminova.h:54

References LIB8STATIC_ALWAYS_INLINE, and t.