Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FastLED/FastLED.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Garcia <danielgarcia@gmail.com>2014-11-18 10:53:57 +0300
committerDaniel Garcia <danielgarcia@gmail.com>2014-11-18 10:53:57 +0300
commitc7766f85f070f8dfab8727d105c78bb42db77f49 (patch)
tree1dcde4d004e4bb0105e17581d53a1c64b566e524 /led_sysdefs.h
parent5b8c97da6f5629c5ee2b234744555e1eec4eeb8b (diff)
Re-arranging code layout, pulling off platform specific headers into their own directories.
Diffstat (limited to 'led_sysdefs.h')
-rw-r--r--led_sysdefs.h82
1 files changed, 6 insertions, 76 deletions
diff --git a/led_sysdefs.h b/led_sysdefs.h
index e16ce2db..29bced42 100644
--- a/led_sysdefs.h
+++ b/led_sysdefs.h
@@ -2,91 +2,21 @@
#define __INC_LED_SYSDEFS_H
#if defined(__MK20DX128__) || defined(__MK20DX256__)
-
-#define FASTLED_TEENSY3
-#define FASTLED_ARM
-#define FASTLED_ACCURATE_CLOCK
-#ifndef INTERRUPT_THRESHOLD
-#define INTERRUPT_THRESHOLD 1
-#endif
-#if (F_CPU == 96000000)
-#define CLK_DBL 1
-#endif
-
+// Include k20/T3 headers
+#include "platforms/arm/k20/led_sysdefs_arm_k20.h"
#elif defined(__SAM3X8E__)
-
-#define FASTLED_ARM
-
-// Setup DUE timer defines/channels/etc...
-#ifndef DUE_TIMER_CHANNEL
-#define DUE_TIMER_GROUP 0
-#endif
-
-#ifndef DUE_TIMER_CHANNEL
-#define DUE_TIMER_CHANNEL 0
-#endif
-
-#define DUE_TIMER ((DUE_TIMER_GROUP==0) ? TC0 : ((DUE_TIMER_GROUP==1) ? TC1 : TC2))
-#define DUE_TIMER_ID (ID_TC0 + (DUE_TIMER_GROUP*3) + DUE_TIMER_CHANNEL)
-#define DUE_TIMER_VAL (DUE_TIMER->TC_CHANNEL[DUE_TIMER_CHANNEL].TC_CV << 1)
-#define DUE_TIMER_RUNNING ((DUE_TIMER->TC_CHANNEL[DUE_TIMER_CHANNEL].TC_SR & TC_SR_CLKSTA) != 0)
-
+// Include sam/due headers
+#include "platforms/arm/sam/led_sysdefs_arm_sam.h"
#else
-
-#define FASTLED_AVR
-#define FASTLED_ACCURATE_CLOCK
-#ifndef INTERRUPT_THRESHOLD
-#define INTERRUPT_THRESHOLD 2
+// AVR platforms
+#include "platforms/avr/led_sysdefs_avr.h"
#endif
-#endif
-
-#ifndef CLK_DBL
-#define CLK_DBL 0
-#endif
-#if defined(FASTLED_AVR) || defined(FASTLED_TEENSY3)
-#include <avr/io.h>
-#include <avr/interrupt.h> // for cli/se definitions
-
-// Define the rgister 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
-
-#else
-// reuseing/abusing cli/sei defs for due
-#define cli() __disable_irq(); __disable_fault_irq();
-#define sei() __enable_irq(); __enable_fault_irq();
-
-#endif
-
-#if 0
-#if defined(ARDUINO) && defined(FASTLED_AVR) && ARDUINO >= 157
-#error Arduion versions 1.5.7 and later not yet supported by FastLED for AVR
-#endif
-
-#if defined(ARDUINO) && defined (FASTLED_AVR) && (__GNUC__ == 4) && (__GNUC_MINOR__ > 7)
-#error gcc versions 4.8 and above are not yet supported by FastLED for AVR
-#endif
-#endif
// Arduino.h needed for convinience functions digitalPinToPort/BitMask/portOutputRegister and the pinMode methods.
#include<Arduino.h>
-// Scaling macro choice
-#if defined(LIB8_ATTINY)
-# define INLINE_SCALE(B, SCALE) delaycycles<3>()
-# warning "No hardware multiply, inline brightness scaling disabled"
-#else
-# define INLINE_SCALE(B, SCALE) B = scale8_video(B, SCALE)
-#endif
-
#define CLKS_PER_US (F_CPU/1000000)
-#ifndef INTERRUPT_THRESHOLD
-#define INTERRUPT_THRESHOLD 1
-#endif
-
#endif