From f93b1167f1df54ec083b56b21f2c27e3d5bacc29 Mon Sep 17 00:00:00 2001 From: Blaz Kristan Date: Sun, 28 Mar 2021 21:00:07 +0200 Subject: [PATCH] Reduced SPI speed for WS2801 to 2MHz. Added HW SPI for busses 0 and 1. --- wled00/bus_wrapper.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/wled00/bus_wrapper.h b/wled00/bus_wrapper.h index 976d109a6..5ed53e556 100644 --- a/wled00/bus_wrapper.h +++ b/wled00/bus_wrapper.h @@ -185,7 +185,10 @@ #define B_SS_LPD_3 NeoPixelBrightnessBus //WS2801 -#define B_HS_WS1_3 NeoPixelBrightnessBus +//#define B_HS_WS1_3 NeoPixelBrightnessBus +//#define B_HS_WS1_3 NeoPixelBrightnessBus +//#define B_HS_WS1_3 NeoPixelBrightnessBus // 10MHz +#define B_HS_WS1_3 NeoPixelBrightnessBus //slower, more compatible #define B_SS_WS1_3 NeoPixelBrightnessBus //P9813 @@ -849,7 +852,8 @@ class PolyBus { if (pins[0] == P_8266_HS_MOSI && pins[1] == P_8266_HS_CLK) isHSPI = true; #else // temporary hack to limit use of hardware SPI to a single SPI peripheral: only allow ESP32 hardware serial on segment 0 - if (!num && pins[0] == P_32_HS_MOSI && pins[1] == P_32_HS_CLK) isHSPI = true; + if (num==0 && pins[0] == P_32_VS_MOSI && pins[1] == P_32_VS_CLK) isHSPI = true; + if (num==1 && pins[0] == P_32_HS_MOSI && pins[1] == P_32_HS_CLK) isHSPI = true; #endif uint8_t t = I_NONE; switch (busType) {