File tree Expand file tree Collapse file tree 6 files changed +32
-13
lines changed
Expand file tree Collapse file tree 6 files changed +32
-13
lines changed Original file line number Diff line number Diff line change @@ -193,7 +193,7 @@ class BusPwm : public Bus {
193193
194194 #ifdef ESP8266
195195 analogWriteRange (255 ); // same range as one RGB channel
196- analogWriteFreq (WLED_PWM_FREQ_ESP8266 );
196+ analogWriteFreq (WLED_PWM_FREQ );
197197 #else
198198 _ledcStart = pinManager.allocateLedc (numPins);
199199 if (_ledcStart == 255 ) { // no more free LEDC channels
@@ -209,7 +209,7 @@ class BusPwm : public Bus {
209209 #ifdef ESP8266
210210 pinMode (_pins[i], OUTPUT);
211211 #else
212- ledcSetup (_ledcStart + i, WLED_PWM_FREQ_ESP32 , 8 );
212+ ledcSetup (_ledcStart + i, WLED_PWM_FREQ , 8 );
213213 ledcAttachPin (_pins[i], _ledcStart + i);
214214 #endif
215215 }
Original file line number Diff line number Diff line change 138138#define BTN_TYPE_SWITCH_ACT_HIGH 5 //not implemented
139139
140140//Ethernet board types
141+ #define WLED_NUM_ETH_TYPES 5
142+
141143#define WLED_ETH_NONE 0
142144#define WLED_ETH_WT32_ETH01 1
143145#define WLED_ETH_ESP32_POE 2
144146#define WLED_ETH_WESP32 3
147+ #define WLED_ETH_QUINLED 4
145148
146149//Hue error codes
147150#define HUE_ERROR_INACTIVE 0
201204#define ABL_MILLIAMPS_DEFAULT 850 // auto lower brightness to stay close to milliampere limit
202205
203206// PWM settings
204- #define WLED_PWM_FREQ_ESP8266 880 //PWM frequency proven as good for LEDs
205- #define WLED_PWM_FREQ_ESP32 5000
206-
207+ #ifndef WLED_PWM_FREQ
208+ #ifdef ESP8266
209+ #define WLED_PWM_FREQ 880 //PWM frequency proven as good for LEDs
210+ #else
211+ #define WLED_PWM_FREQ 19531
212+ #endif
213+ #endif
207214
208215#define TOUCH_THRESHOLD 32 // limit to recognize a touch, higher value means more sensitive
209216
Original file line number Diff line number Diff line change @@ -68,9 +68,11 @@ <h3>Experimental</h3>
6868 < h3 > Ethernet Type</ h3 >
6969 < select name ="ETH ">
7070 < option value ="0 "> None</ option >
71+ < option value ="2 "> ESP32-POE</ option >
72+ < option value ="4 "> QuinLED-ESP32</ option >
73+ < option value ="3 "> WESP32</ option >
7174 < option value ="1 "> WT32-ETH01</ option >
72- < option value ="2 "> ESP32-POE</ option >
73- < option value ="3 "> WESP32</ option > </ select > < br > < br > </ div >
75+ </ select > < br > < br > </ div >
7476 < hr >
7577 < button type ="button " onclick ="B() "> Back</ button > < button type ="submit "> Save & Connect</ button >
7678 </ form >
Original file line number Diff line number Diff line change @@ -63,10 +63,10 @@ Disable WiFi sleep: <input type="checkbox" name="WS"><br><i>
6363Can help with connectivity issues .< br >
6464Do not enable if WiFi is working correctly , increases power consumption .< /i > < div
6565 id = "ethd" > < h3 > Ethernet Type < /h3 > < select name = "ETH" > < option value = "0" > None
66- < /option > < option value = "1" > WT32 - ETH01 < /option > < option value = "2" > ESP32 - POE
67- < /option > < option value = "3" > WESP32 < /option > < / select > < br > < br > < / div > < hr > < button
68- type = "button" onclick = "B()" > Back < /button > < button type = "submit" > Save & Connect
69- < /button > < /form > < /body > < /html > )== = == ";
66+ < /option > < option value = "2" > ESP32 - POE < /option > < option value = "4" > QuinLED - ESP32
67+ < /option > < option value = "3" > WESP32 < /option > < option value = "1" > WT32 - ETH01 < / option >
68+ < / select > < br > < br > < / div > < hr > < button type = "button" onclick = "B()" > Back < /button >
69+ < button type = "submit" > Save & Connect < /button > < /form > < /body > < /html > )== = == ";
7070
7171
7272// Autogenerated from wled00/data/settings_leds.htm, do not edit!!
Original file line number Diff line number Diff line change @@ -58,6 +58,16 @@ ethernet_settings ethernetBoards[] = {
5858 17 , // eth_mdio,
5959 ETH_PHY_LAN8720, // eth_type,
6060 ETH_CLOCK_GPIO0_IN // eth_clk_mode
61+ },
62+
63+ // QuinLed-ESP32-Ethernet
64+ {
65+ 0 , // eth_address,
66+ 5 , // eth_power,
67+ 23 , // eth_mdc,
68+ 18 , // eth_mdio,
69+ ETH_PHY_LAN8720, // eth_type, (confirm this is right?)
70+ ETH_CLOCK_GPIO17_OUT // eth_clk_mode
6171 }
6272};
6373
@@ -439,7 +449,7 @@ void WLED::initConnection()
439449
440450#if defined(ARDUINO_ARCH_ESP32) && defined(WLED_USE_ETHERNET)
441451 // Only initialize ethernet board if not NONE
442- if (ethernetType != WLED_ETH_NONE) {
452+ if (ethernetType != WLED_ETH_NONE && ethernetType < WLED_NUM_ETH_TYPES ) {
443453 ethernet_settings es = ethernetBoards[ethernetType];
444454 ETH.begin (
445455 (uint8_t ) es.eth_address ,
Original file line number Diff line number Diff line change @@ -220,7 +220,7 @@ void getSettingsJS(byte subPage, char* dest)
220220 sappend (' c' ,SET_F (" WS" ),noWifiSleep);
221221
222222 #ifdef WLED_USE_ETHERNET
223- sappend (' i ' ,SET_F (" ETH" ),ethernetType);
223+ sappend (' v ' ,SET_F (" ETH" ),ethernetType);
224224 #else
225225 // hide ethernet setting if not compiled in
226226 oappend (SET_F (" document.getElementById('ethd').style.display='none';" ));
You can’t perform that action at this time.
0 commit comments