3#ifndef __INC_FL_DELAY_H
4#define __INC_FL_DELAY_H
16#if (!defined(NO_MINIMUM_WAIT) || (NO_MINIMUM_WAIT==0))
68# define FL_NOP __asm__ __volatile__ ("cp r0,r0\n");
69# define FL_NOP2 __asm__ __volatile__ ("rjmp .+0");
72# define FL_NOP __asm__ __volatile__ ("nop\n");
74# define FL_NOP2 __asm__ __volatile__ ("nop\n\t nop\n");
83template<fl::cycle_t CYCLES>
inline void delaycycles();
96#if defined(FASTLED_AVR)
98template<
int LOOP, fl::cycle_t PAD>
inline void _delaycycles_AVR() {
103 __asm__ __volatile__ (
114 _delaycycles_AVR<CYCLES / 3, CYCLES % 3>();
171 const uint32_t termination = 4294966398 / 10;
172 const uint32_t remainder = 4294966398 % 10;
173 for (uint32_t i = 0; i < termination; i++) {
204#define F_CPU_MHZ (F_CPU / 1000000L)
209#define NS(_NS) (((_NS * F_CPU_MHZ) + 999) / 1000)
211#define CLKS_TO_MICROS(_CLKS) ((long)(_CLKS)) / (F_CPU / 1000000L)
214#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
uint16_t 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