Loading...
Searching...
No Matches
fancy_leds.h File Reference

LED extended functions. More...

Detailed Description

LED extended functions.

Author
Antonio Lignan alina.nosp@m.n@zo.nosp@m.lerti.nosp@m.a.co.nosp@m.m

Definition in file fancy_leds.h.

#include "board_common.h"
+ Include dependency graph for fancy_leds.h:

Go to the source code of this file.

Macro to create blinking and rainbows with the LEDs

#define LED_FADE(led)
 
#define LED_FADE_EXPAND(led)
 
#define LED_RAINBOW()
 

Macro Definition Documentation

◆ LED_FADE

#define LED_FADE (   led)
Value:
volatile int i; \
int k, j; \
LED_FADE_EXPAND(led)

Definition at line 34 of file fancy_leds.h.

◆ LED_FADE_EXPAND

#define LED_FADE_EXPAND (   led)
Value:
for(k = 0; k < 800; ++k) { \
j = k > 400 ? 800 - k : k; \
led##_ON; \
for(i = 0; i < j; ++i) { \
__asm__("nop"); \
} \
led##_OFF; \
for(i = 0; i < 400 - j; ++i) { \
__asm__("nop"); \
} \
}

Definition at line 39 of file fancy_leds.h.

◆ LED_RAINBOW

#define LED_RAINBOW ( )
Value:
volatile int i; \
int k,j; \
LED_FADE_EXPAND(LED3); \
LED_FADE_EXPAND(LED0); \
LED_FADE_EXPAND(LED4); \
LED_FADE_EXPAND(LED2); \
LED_FADE_EXPAND(LED1);

Definition at line 52 of file fancy_leds.h.