diff --git a/wled00/bus_manager.h b/wled00/bus_manager.h index 8ed68020..e767fcc7 100644 --- a/wled00/bus_manager.h +++ b/wled00/bus_manager.h @@ -193,7 +193,7 @@ class BusPwm : public Bus { #ifdef ESP8266 analogWriteRange(255); //same range as one RGB channel - analogWriteFreq(WLED_PWM_FREQ_ESP8266); + analogWriteFreq(WLED_PWM_FREQ); #else _ledcStart = pinManager.allocateLedc(numPins); if (_ledcStart == 255) { //no more free LEDC channels @@ -209,7 +209,7 @@ class BusPwm : public Bus { #ifdef ESP8266 pinMode(_pins[i], OUTPUT); #else - ledcSetup(_ledcStart + i, WLED_PWM_FREQ_ESP32, 8); + ledcSetup(_ledcStart + i, WLED_PWM_FREQ, 8); ledcAttachPin(_pins[i], _ledcStart + i); #endif } diff --git a/wled00/const.h b/wled00/const.h index 43aff244..1f18d5cc 100644 --- a/wled00/const.h +++ b/wled00/const.h @@ -138,10 +138,13 @@ #define BTN_TYPE_SWITCH_ACT_HIGH 5 //not implemented //Ethernet board types +#define WLED_NUM_ETH_TYPES 5 + #define WLED_ETH_NONE 0 #define WLED_ETH_WT32_ETH01 1 #define WLED_ETH_ESP32_POE 2 #define WLED_ETH_WESP32 3 +#define WLED_ETH_QUINLED 4 //Hue error codes #define HUE_ERROR_INACTIVE 0 @@ -201,9 +204,13 @@ #define ABL_MILLIAMPS_DEFAULT 850 // auto lower brightness to stay close to milliampere limit // PWM settings -#define WLED_PWM_FREQ_ESP8266 880 //PWM frequency proven as good for LEDs -#define WLED_PWM_FREQ_ESP32 5000 - +#ifndef WLED_PWM_FREQ +#ifdef ESP8266 + #define WLED_PWM_FREQ 880 //PWM frequency proven as good for LEDs +#else + #define WLED_PWM_FREQ 19531 +#endif +#endif #define TOUCH_THRESHOLD 32 // limit to recognize a touch, higher value means more sensitive diff --git a/wled00/data/settings_wifi.htm b/wled00/data/settings_wifi.htm index 78fa7888..31924526 100644 --- a/wled00/data/settings_wifi.htm +++ b/wled00/data/settings_wifi.htm @@ -68,9 +68,11 @@

Ethernet Type



+


diff --git a/wled00/html_settings.h b/wled00/html_settings.h index 05f9b6ac..3c6416ff 100644 --- a/wled00/html_settings.h +++ b/wled00/html_settings.h @@ -63,10 +63,10 @@ Disable WiFi sleep:
Can help with connectivity issues.
Do not enable if WiFi is working correctly, increases power consumption.

Ethernet Type




)====="; + +


+)====="; // Autogenerated from wled00/data/settings_leds.htm, do not edit!! diff --git a/wled00/wled.cpp b/wled00/wled.cpp index a0450f03..651f484e 100644 --- a/wled00/wled.cpp +++ b/wled00/wled.cpp @@ -58,6 +58,16 @@ ethernet_settings ethernetBoards[] = { 17, // eth_mdio, ETH_PHY_LAN8720, // eth_type, ETH_CLOCK_GPIO0_IN // eth_clk_mode + }, + + // QuinLed-ESP32-Ethernet + { + 0, // eth_address, + 5, // eth_power, + 23, // eth_mdc, + 18, // eth_mdio, + ETH_PHY_LAN8720, // eth_type, (confirm this is right?) + ETH_CLOCK_GPIO17_OUT // eth_clk_mode } }; @@ -439,7 +449,7 @@ void WLED::initConnection() #if defined(ARDUINO_ARCH_ESP32) && defined(WLED_USE_ETHERNET) // Only initialize ethernet board if not NONE - if (ethernetType != WLED_ETH_NONE) { + if (ethernetType != WLED_ETH_NONE && ethernetType < WLED_NUM_ETH_TYPES) { ethernet_settings es = ethernetBoards[ethernetType]; ETH.begin( (uint8_t) es.eth_address, diff --git a/wled00/xml.cpp b/wled00/xml.cpp index 780d3022..c8deebb5 100644 --- a/wled00/xml.cpp +++ b/wled00/xml.cpp @@ -220,7 +220,7 @@ void getSettingsJS(byte subPage, char* dest) sappend('c',SET_F("WS"),noWifiSleep); #ifdef WLED_USE_ETHERNET - sappend('i',SET_F("ETH"),ethernetType); + sappend('v',SET_F("ETH"),ethernetType); #else //hide ethernet setting if not compiled in oappend(SET_F("document.getElementById('ethd').style.display='none';"));