3#ifndef __INC_FL_DELAY_H
4#define __INC_FL_DELAY_H
17#if (!defined(NO_MINIMUM_WAIT) || (NO_MINIMUM_WAIT==0))
69# define FL_NOP __asm__ __volatile__ ("cp r0,r0\n");
70# define FL_NOP2 __asm__ __volatile__ ("rjmp .+0");
73# define FL_NOP __asm__ __volatile__ ("nop\n");
75# define FL_NOP2 __asm__ __volatile__ ("nop\n\t nop\n");
84template<fl::cycle_t CYCLES>
inline void delaycycles();
97#if defined(FASTLED_AVR)
99template<
int LOOP, fl::cycle_t PAD>
inline void _delaycycles_AVR() {
104 __asm__ __volatile__ (
115 _delaycycles_AVR<CYCLES / 3, CYCLES % 3>();
172 const fl::u32 termination = 4294966398 / 10;
173 const fl::u32 remainder = 4294966398 % 10;
174 for (fl::u32 i = 0; i < termination; i++) {
205#define F_CPU_MHZ (F_CPU / 1000000L)
210#define NS(_NS) (((_NS * F_CPU_MHZ) + 999) / 1000)
212#define CLKS_TO_MICROS(_CLKS) ((long)(_CLKS)) / (F_CPU / 1000000L)
215#define NO_TIME(A, B, C) (NS(A) < 3 || NS(B) < 3 || NS(C) < 6)
central include file for FastLED, defines the CFastLED class/object
fl::u16 mLastMicros
Timestamp of the last time this was run, in microseconds.
void mark()
Reset the timestamp that marks the start of the wait period.
void wait()
Blocking delay until WAIT time since mark() has passed.
Class to ensure that a minimum amount of time has kicked since the last time run - and delay if not e...
#define FL_NOP2
Double no operation ("no-op") instruction for delay.
void delaycycles_min1()
A variant of delaycycles that will always delay at least one cycle.
void delaycycles()
Delay N clock cycles.
#define FL_NOP
Single no operation ("no-op") instruction for delay.
#define FASTLED_FORCE_INLINE
#define FASTLED_NAMESPACE_END
#define FASTLED_NAMESPACE_BEGIN