Skip to content

Commit be9e27e

Browse files
committed
C3 bitbanging test
1 parent ae4b2b3 commit be9e27e

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

wled00/bus_wrapper.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,15 @@
248248
#if !defined(WLED_USE_SHARED_RMT) && !defined(__riscv)
249249
#include <NeoEsp32RmtHIMethod.h>
250250
#define NeoEsp32RmtMethod(x) NeoEsp32RmtHIN ## x ## Method
251+
#elif defined(CONFIG_IDF_TARGET_ESP32C3)
252+
// We're going to cheat and use bitbanging
253+
// Wrapper type strips the 'channel' argument
254+
template<typename T> class NPBMethodStripChannelWrapper : public T {
255+
public:
256+
NPBMethodStripChannelWrapper(uint8_t pin, uint16_t pixelCount, size_t elementSize, size_t settingsSize, NeoBusChannel channel) : T(pin, pixelCount, elementSize, settingsSize) {
257+
};
258+
};
259+
#define NeoEsp32RmtMethod(x) NPBMethodStripChannelWrapper<NeoEsp32BitBang ## x ## Method>
251260
#else
252261
#define NeoEsp32RmtMethod(x) NeoEsp32RmtN ## x ## Method
253262
#endif

0 commit comments

Comments
 (0)