|
@@ -25,6 +25,8 @@
|
25
|
25
|
* NeoPixel support
|
26
|
26
|
*/
|
27
|
27
|
|
|
28
|
+#define MAX_NEOPIXELS 127
|
|
29
|
+
|
28
|
30
|
#ifndef _NEOPIXEL_INCLUDE_
|
29
|
31
|
#error "Always include 'leds.h' and not 'neopixel.h' directly."
|
30
|
32
|
#endif
|
|
@@ -63,7 +65,13 @@
|
63
|
65
|
#endif
|
64
|
66
|
|
65
|
67
|
// ------------------------
|
66
|
|
-// Function prototypes
|
|
68
|
+// Types
|
|
69
|
+// ------------------------
|
|
70
|
+
|
|
71
|
+typedef IF<(MAX_NEOPIXELS > 127), int16_t, int8_t>::type pixel_index_t;
|
|
72
|
+
|
|
73
|
+// ------------------------
|
|
74
|
+// Classes
|
67
|
75
|
// ------------------------
|
68
|
76
|
|
69
|
77
|
class Marlin_NeoPixel {
|
|
@@ -74,7 +82,7 @@ private:
|
74
|
82
|
#endif
|
75
|
83
|
|
76
|
84
|
public:
|
77
|
|
- static int8_t neoindex;
|
|
85
|
+ static pixel_index_t neoindex;
|
78
|
86
|
|
79
|
87
|
static void init();
|
80
|
88
|
static void set_color_startup(const uint32_t c);
|
|
@@ -150,7 +158,7 @@ extern Marlin_NeoPixel neo;
|
150
|
158
|
static Adafruit_NeoPixel adaneo;
|
151
|
159
|
|
152
|
160
|
public:
|
153
|
|
- static int8_t neoindex;
|
|
161
|
+ static pixel_index_t neoindex;
|
154
|
162
|
|
155
|
163
|
static void init();
|
156
|
164
|
static void set_color_startup(const uint32_t c);
|