diff options
author | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2016-10-09 00:56:46 +0300 |
---|---|---|
committer | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2016-10-09 00:56:46 +0300 |
commit | 3b3612c65b2de4fdb2d21945e98d1dad7e46b6d6 (patch) | |
tree | a826683fe13dd5e3809fc58c4fc24390a4b71c0b /esp8266/espneopixel.c | |
parent | dc43508cc2125b92b95b886bf687544508ae1854 (diff) |
esp8266: Make neopixel support configurable.
To save iRAM.
Diffstat (limited to 'esp8266/espneopixel.c')
-rw-r--r-- | esp8266/espneopixel.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/esp8266/espneopixel.c b/esp8266/espneopixel.c index e16c874f2..27c773106 100644 --- a/esp8266/espneopixel.c +++ b/esp8266/espneopixel.c @@ -5,6 +5,9 @@ // ESP8266 work for the NeoPixelBus library: github.com/Makuna/NeoPixelBus // Needs to be a separate .c file to enforce ICACHE_RAM_ATTR execution. +#include "py/mpconfig.h" +#if MICROPY_ESP8266_NEOPIXEL + #include "c_types.h" #include "eagle_soc.h" #include "user_interface.h" @@ -58,3 +61,5 @@ void /*ICACHE_RAM_ATTR*/ esp_neopixel_write(uint8_t pin, uint8_t *pixels, uint32 while((mp_hal_ticks_cpu() - startTime) < period); // Wait for last bit mp_hal_quiet_timing_exit(irq_state); } + +#endif // MICROPY_ESP8266_NEOPIXEL |