diff options
author | Sam Guyer <sam.guyer@gmail.com> | 2021-12-15 19:21:52 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-15 19:21:52 +0300 |
commit | 1d236ab05a6bb241a3b9e02ed433f25517c725bb (patch) | |
tree | ccb04d6e0041eec0d5f113eeff79ab8edcc214fb /src/platforms/esp/32/clockless_rmt_esp32.h | |
parent | 1547b9312e9e0dd8f5198857dd766caf36172066 (diff) | |
parent | ebdfea049d46ddeeb23ebf46eca284eec690f57c (diff) |
Merge pull request #1308 from alorbach/master-rmtfix
esp32: Fix unitialized flags field in init of the RMT driver
Diffstat (limited to 'src/platforms/esp/32/clockless_rmt_esp32.h')
-rw-r--r-- | src/platforms/esp/32/clockless_rmt_esp32.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/platforms/esp/32/clockless_rmt_esp32.h b/src/platforms/esp/32/clockless_rmt_esp32.h index 5f522d97..66b04928 100644 --- a/src/platforms/esp/32/clockless_rmt_esp32.h +++ b/src/platforms/esp/32/clockless_rmt_esp32.h @@ -80,6 +80,13 @@ * send the data while the program continues to prepare the next * frame of data. * + * #define FASTLED_RMT_SERIAL_DEBUG 1 + * + * NEW (Oct 2021): If set enabled (Set to 1), output errorcodes to + * Serial for debugging if not ESP_OK. Might be useful to find + * bugs or problems with GPIO PINS. + * + * * Based on public domain code created 19 Nov 2016 by Chris Osborn <fozztexx@fozztexx.com> * http://insentricity.com * * @@ -155,6 +162,16 @@ __attribute__ ((always_inline)) inline static uint32_t __clock_cycles() { //#define FASTLED_RMT_SHOW_TIMER false //#endif +#ifndef FASTLED_RMT_SERIAL_DEBUG +#define FASTLED_RMT_SERIAL_DEBUG 0 +#endif + +#if FASTLED_RMT_SERIAL_DEBUG == 1 +#define FASTLED_DEBUG(format, errcode, ...) if (errcode != ESP_OK) { Serial.printf(PSTR("FASTLED: " format "\n"), errcode, ##__VA_ARGS__); } +#else +#define FASTLED_DEBUG(format, ...) +#endif + // -- Configuration constants #define DIVIDER 2 /* 4, 8 still seem to work, but timings become marginal */ |