FastLED 3.9.15
Loading...
Searching...
No Matches
fastled_delay.h File Reference

Detailed Description

Utility functions and classes for managing delay cycles.

Definition in file fastled_delay.h.

#include "FastLED.h"
#include "fl/types.h"
#include "fl/force_inline.h"
+ Include dependency graph for fastled_delay.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  CMinWait< WAIT >
 Class to ensure that a minimum amount of time has kicked since the last time run - and delay if not enough time has passed yet. More...
 

Macros

Some timing related macros/definitions
#define CLKS_TO_MICROS(_CLKS)
 Convert from number of clock cycles to microseconds.
 
#define F_CPU_MHZ   (F_CPU / 1000000L)
 CPU speed, in megahertz (MHz)
 
#define NO_TIME(A, B, C)
 Macro for making sure there's enough time available.
 
#define NS(_NS)
 Convert from nanoseconds to number of clock cycles.
 

Clock cycle counted delay loop

template<fl::cycle_t CYCLES>
void delaycycles ()
 Delay N clock cycles.
 
template<fl::cycle_t CYCLES>
FASTLED_FORCE_INLINE void delaycycles ()
 Delay N clock cycles.
 
template<fl::cycle_t CYCLES>
void delaycycles_min1 ()
 A variant of delaycycles that will always delay at least one cycle.
 
#define FL_NOP   __asm__ __volatile__ ("nop\n");
 Single no operation ("no-op") instruction for delay.
 
#define FL_NOP2   __asm__ __volatile__ ("nop\n\t nop\n");
 Double no operation ("no-op") instruction for delay.