Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion yoRadio/src/audioVS1053/audioVS1053Ex.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1851,7 +1851,7 @@ bool Audio::connecttohost(const char* host, const char* user, const char* pwd) {
res = _client->connect(hostwoext, port, m_f_ssl ? m_timeout_ms_ssl : m_timeout_ms);
}else{
ConnectParams* params = new ConnectParams{ strdup(hostwoext), port, this }; _connectionResult = false;
xTaskCreatePinnedToCore(connectTask, "ConnectTask", WATCHDOG_TASK_SIZE, params, WATCHDOG_TASK_PRIORITY, &_connectTaskHandle, WATCHDOG_TASK_CORE_ID);
xTaskCreatePinnedToCore(connectTask, "ConnectTask", WATCHDOG_TASK_SIZE, params, WATCHDOG_TASK_PRIORITY, &_connectTaskHandle, ESP.getChipCores() > 1 ? WATCHDOG_TASK_CORE_ID : 0);
for(;;){
if(millis()-t>(m_f_ssl ? m_timeout_ms_ssl : m_timeout_ms) || _connectionResult) break;
vTaskDelay(10);
Expand Down
23 changes: 19 additions & 4 deletions yoRadio/src/audioVS1053/audioVS1053Ex.h
Original file line number Diff line number Diff line change
Expand Up @@ -248,10 +248,25 @@ class Audio : private AudioBuffer{
88,90,91,92,93,94,95,96,97,98,99,100}; //22 elements
uint8_t vuLeft, vuRight;
protected:
inline void DCS_HIGH() {(dcs_pin&0x20) ? GPIO.out1_w1ts.data = 1 << (dcs_pin - 32) : GPIO.out_w1ts = 1 << dcs_pin;}
inline void DCS_LOW() {(dcs_pin&0x20) ? GPIO.out1_w1tc.data = 1 << (dcs_pin - 32) : GPIO.out_w1tc = 1 << dcs_pin;}
inline void CS_HIGH() {( cs_pin&0x20) ? GPIO.out1_w1ts.data = 1 << ( cs_pin - 32) : GPIO.out_w1ts = 1 << cs_pin;}
inline void CS_LOW() {( cs_pin&0x20) ? GPIO.out1_w1tc.data = 1 << ( cs_pin - 32) : GPIO.out_w1tc = 1 << cs_pin;}

#ifndef ESP_ARDUINO_VERSION_VAL
#define ESP_ARDUINO_VERSION_MAJOR 0
#define ESP_ARDUINO_VERSION_MINOR 0
#define ESP_ARDUINO_VERSION_PATCH 0
#endif

#if ESP_IDF_VERSION_MAJOR < 5
inline void DCS_HIGH() {(dcs_pin&0x20) ? GPIO.out1_w1ts.data = 1 << (dcs_pin - 32) : GPIO.out_w1ts = 1 << dcs_pin;}
inline void DCS_LOW() {(dcs_pin&0x20) ? GPIO.out1_w1tc.data = 1 << (dcs_pin - 32) : GPIO.out_w1tc = 1 << dcs_pin;}
inline void CS_HIGH() {( cs_pin&0x20) ? GPIO.out1_w1ts.data = 1 << ( cs_pin - 32) : GPIO.out_w1ts = 1 << cs_pin;}
inline void CS_LOW() {( cs_pin&0x20) ? GPIO.out1_w1tc.data = 1 << ( cs_pin - 32) : GPIO.out_w1tc = 1 << cs_pin;}
#else
inline void DCS_HIGH() {gpio_set_level((gpio_num_t)dcs_pin, 1);}
inline void DCS_LOW() {gpio_set_level((gpio_num_t)dcs_pin, 0);}
inline void CS_HIGH() {gpio_set_level((gpio_num_t) cs_pin, 1);}
inline void CS_LOW() {gpio_set_level((gpio_num_t) cs_pin, 0);}
#endif

inline void await_data_request() {while(!digitalRead(dreq_pin)) NOP();} // Very short delay
inline bool data_request() {return(digitalRead(dreq_pin) == HIGH);}

Expand Down
4 changes: 2 additions & 2 deletions yoRadio/src/core/config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -988,7 +988,7 @@ void Config::doSleep(){
#ifdef USE_NEXTION
nextion.sleep();
#endif
#if !defined(ARDUINO_ESP32C3_DEV)
#if !(defined(ARDUINO_ESP32C3_DEV) || defined(ARDUINO_ESP32C6_DEV))
if(WAKE_PIN!=255) esp_sleep_enable_ext0_wakeup((gpio_num_t)WAKE_PIN, LOW);
esp_sleep_enable_timer_wakeup(config.sleepfor * 60 * 1000000ULL);
esp_deep_sleep_start();
Expand All @@ -1001,7 +1001,7 @@ void Config::doSleepW(){
#ifdef USE_NEXTION
nextion.sleep();
#endif
#if !defined(ARDUINO_ESP32C3_DEV)
#if !(defined(ARDUINO_ESP32C3_DEV) || defined(ARDUINO_ESP32C6_DEV))
if(WAKE_PIN!=255) esp_sleep_enable_ext0_wakeup((gpio_num_t)WAKE_PIN, LOW);
esp_deep_sleep_start();
#endif
Expand Down
4 changes: 2 additions & 2 deletions yoRadio/src/core/display.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,6 @@ void Display::init() {
displayQueue=NULL;
displayQueue = xQueueCreate( 5, sizeof( requestParams_t ) );
while(displayQueue==NULL){;}
_createDspTask();
while(!_bootStep==0) { delay(10); }
//_pager.begin();
//_bootScreen();
_pager = new Pager();
Expand All @@ -121,6 +119,8 @@ void Display::init() {
_meta = new ScrollWidget();
_title1 = new ScrollWidget();
_plcurrent = new ScrollWidget();
_createDspTask();
while(!_bootStep==0) { delay(10); }
Serial.println("done");
}

Expand Down
2 changes: 1 addition & 1 deletion yoRadio/src/core/options.h
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ The connection tables are located here https://github.com/e2002/yoradio#connecti
#endif

/* ESP DEVBOARD */
#if defined(ARDUINO_ESP32S3_DEV) || defined(ARDUINO_ESP32C3_DEV)
#if defined(ARDUINO_ESP32S3_DEV) || defined(ARDUINO_ESP32C3_DEV) || defined(ARDUINO_ESP32C6_DEV)
#define ESP_S3C3 1
#ifndef USE_BUILTIN_LED
#define USE_BUILTIN_LED true
Expand Down
2 changes: 1 addition & 1 deletion yoRadio/src/core/optionschecker.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# error YOU MUST CHOOSE BETWEEN I2S DAC AND VS1053 BY DISABLING THE SECOND MODULE IN THE myoptions.h
#endif

#if !(defined(ARDUINO_ESP32_DEV) || defined(ARDUINO_ESP32S3_DEV) || defined(ARDUINO_ESP32C3_DEV))
#if !(defined(ARDUINO_ESP32_DEV) || defined(ARDUINO_ESP32S3_DEV) || defined(ARDUINO_ESP32C3_DEV) || defined(ARDUINO_ESP32C6_DEV))
# error ONLY MODULES "ESP32 Dev Module", "ESP32 Wrover Module" AND "ESP32 S3 Dev Module" ARE SUPPORTED. PLEASE SELECT ONE OF THEM IN THE MENU >> TOOLS >> BOARD
#endif

Expand Down