diff options
Diffstat (limited to 'Библиотеки/FastLED-master/platforms/avr/led_sysdefs_avr.h')
-rw-r--r-- | Библиотеки/FastLED-master/platforms/avr/led_sysdefs_avr.h | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/Библиотеки/FastLED-master/platforms/avr/led_sysdefs_avr.h b/Библиотеки/FastLED-master/platforms/avr/led_sysdefs_avr.h new file mode 100644 index 0000000..37f8cff --- /dev/null +++ b/Библиотеки/FastLED-master/platforms/avr/led_sysdefs_avr.h @@ -0,0 +1,54 @@ +#ifndef __INC_LED_SYSDEFS_AVR_H +#define __INC_LED_SYSDEFS_AVR_H + +#define FASTLED_AVR + +#ifndef INTERRUPT_THRESHOLD +#define INTERRUPT_THRESHOLD 2 +#endif + +#define FASTLED_SPI_BYTE_ONLY + +#include <avr/io.h> +#include <avr/interrupt.h> // for cli/se definitions + +// Define the register types +#if defined(ARDUINO) // && ARDUINO < 150 +typedef volatile uint8_t RoReg; /**< Read only 8-bit register (volatile const unsigned int) */ +typedef volatile uint8_t RwReg; /**< Read-Write 8-bit register (volatile unsigned int) */ +#endif + + +// Default to disallowing interrupts (may want to gate this on teensy2 vs. other arm platforms, since the +// teensy2 has a good, fast millis interrupt implementation) +#ifndef FASTLED_ALLOW_INTERRUPTS +#define FASTLED_ALLOW_INTERRUPTS 0 +#endif + +#if FASTLED_ALLOW_INTERRUPTS == 1 +#define FASTLED_ACCURATE_CLOCK +#endif + + +// Default to using PROGMEM here +#ifndef FASTLED_USE_PROGMEM +#define FASTLED_USE_PROGMEM 1 +#endif + +#if defined(ARDUINO_AVR_DIGISPARK) || defined(ARDUINO_AVR_DIGISPARKPRO) +#ifndef NO_CORRECTION +#define NO_CORRECTION 1 +#endif +#endif + +extern "C" { +# if defined(CORE_TEENSY) || defined(TEENSYDUINO) +extern volatile unsigned long timer0_millis_count; +# define MS_COUNTER timer0_millis_count +# else +extern volatile unsigned long timer0_millis; +# define MS_COUNTER timer0_millis +# endif +}; + +#endif |