@@ -155,21 +155,14 @@ bool ConfigSettings::begin() {
155155 case esp_chip_model_t ::CHIP_ESP32S3 :
156156 strcpy (this ->chipModel , " s3" );
157157 break ;
158- case esp_chip_model_t ::CHIP_ESP32S2 :
159- strcpy (this ->chipModel , " s2" );
160- break ;
161158 case esp_chip_model_t ::CHIP_ESP32C3 :
162159 strcpy (this ->chipModel , " c3" );
163160 break ;
164- // case esp_chip_model_t::CHIP_ESP32C2:
165- // strcpy(this->chipModel, "c2");
166- // break;
167- // case esp_chip_model_t::CHIP_ESP32C6:
168- // strcpy(this->chipModel, "c6");
169- // break;
170- case esp_chip_model_t ::CHIP_ESP32H2 :
171- strcpy (this ->chipModel , " h2" );
161+ #ifdef CHIP_ESP32C6
162+ case esp_chip_model_t ::CHIP_ESP32C6 :
163+ strcpy (this ->chipModel , " c6" );
172164 break ;
165+ #endif
173166 default :
174167 sprintf (this ->chipModel , " UNK%d" , static_cast <int >(ci.model ));
175168 break ;
@@ -188,7 +181,9 @@ bool ConfigSettings::begin() {
188181 this ->Security .begin ();
189182 this ->IP .begin ();
190183 this ->WIFI .begin ();
184+ #ifndef CONFIG_IDF_TARGET_ESP32C6
191185 this ->Ethernet .begin ();
186+ #endif
192187 this ->NTP .begin ();
193188 this ->MQTT .begin ();
194189 this ->print ();
@@ -258,7 +253,9 @@ void ConfigSettings::print() {
258253 ESP_LOGD (TAG , " Connection Type: %u" , (unsigned int ) this ->connType );
259254 this ->NTP .print ();
260255 if (this ->connType == conn_types_t ::wifi || this ->connType == conn_types_t ::unset) this ->WIFI .print ();
256+ #ifndef CONFIG_IDF_TARGET_ESP32C6
261257 if (this ->connType == conn_types_t ::ethernet || this ->connType == conn_types_t ::ethernetpref) this ->Ethernet .print ();
258+ #endif
262259}
263260void ConfigSettings::emitSockets () {}
264261void ConfigSettings::emitSockets (uint8_t num) {}
@@ -590,6 +587,7 @@ bool WifiSettings::ssidExists(const char *ssid) {
590587 }
591588 return false ;
592589}
590+ #ifndef CONFIG_IDF_TARGET_ESP32C6
593591EthernetSettings::EthernetSettings () {}
594592bool EthernetSettings::begin () {
595593 this ->load ();
@@ -653,6 +651,7 @@ void EthernetSettings::print() {
653651 ESP_LOGD (TAG , " Ethernet Settings Board:%d PHYType:%d CLK:%d ADDR:%d PWR:%d MDC:%d MDIO:%d" ,
654652 this ->boardType , this ->phyType , this ->CLKMode , this ->phyAddress , this ->PWRPin , this ->MDCPin , this ->MDIOPin );
655653}
654+ #endif // CONFIG_IDF_TARGET_ESP32C6
656655void ConfigSettings::printAvailHeap () {
657656 ESP_LOGD (TAG , " Max Heap: %u" , (unsigned int )ESP .getMaxAllocHeap ());
658657 ESP_LOGD (TAG , " Free Heap: %u" , (unsigned int )ESP .getFreeHeap ());
0 commit comments