diff --git a/components/esp_eth/include/esp_eth.h b/components/esp_eth/include/esp_eth.h index a093c6e830..c133f3be4e 100644 --- a/components/esp_eth/include/esp_eth.h +++ b/components/esp_eth/include/esp_eth.h @@ -13,14 +13,14 @@ // limitations under the License. #pragma once -#ifdef __cplusplus -extern "C" { -#endif - #include "esp_eth_com.h" #include "esp_eth_mac.h" #include "esp_eth_phy.h" +#ifdef __cplusplus +extern "C" { +#endif + /** * @brief Handle of Ethernet driver * diff --git a/components/esp_eth/include/esp_eth_com.h b/components/esp_eth/include/esp_eth_com.h index 2f40c645b7..aa8c041db6 100644 --- a/components/esp_eth/include/esp_eth_com.h +++ b/components/esp_eth/include/esp_eth_com.h @@ -13,13 +13,13 @@ // limitations under the License. #pragma once +#include "esp_err.h" +#include "esp_event_base.h" + #ifdef __cplusplus extern "C" { #endif -#include "esp_err.h" -#include "esp_event_base.h" - /** * @brief Maximum Ethernet payload size * diff --git a/components/esp_eth/include/esp_eth_mac.h b/components/esp_eth/include/esp_eth_mac.h index 5f3c8975ef..a369e2b1a1 100644 --- a/components/esp_eth/include/esp_eth_mac.h +++ b/components/esp_eth/include/esp_eth_mac.h @@ -13,10 +13,6 @@ // limitations under the License. #pragma once -#ifdef __cplusplus -extern "C" { -#endif - #include #include "esp_eth_com.h" #include "sdkconfig.h" @@ -24,6 +20,10 @@ extern "C" { #include "driver/spi_master.h" #endif +#ifdef __cplusplus +extern "C" { +#endif + /** * @brief Ethernet MAC * diff --git a/components/esp_eth/include/esp_eth_phy.h b/components/esp_eth/include/esp_eth_phy.h index 2e27350e3a..65167095be 100644 --- a/components/esp_eth/include/esp_eth_phy.h +++ b/components/esp_eth/include/esp_eth_phy.h @@ -13,14 +13,15 @@ // limitations under the License. #pragma once -#ifdef __cplusplus -extern "C" { -#endif - #include #include "esp_eth_com.h" #include "sdkconfig.h" +#ifdef __cplusplus +extern "C" { +#endif + +#define ESP_ETH_PHY_ADDR_AUTO (-1) /** * @brief Ethernet PHY * diff --git a/components/esp_eth/include/eth_phy_regs_struct.h b/components/esp_eth/include/eth_phy_regs_struct.h index 023ccf2a6b..e725333e52 100644 --- a/components/esp_eth/include/eth_phy_regs_struct.h +++ b/components/esp_eth/include/eth_phy_regs_struct.h @@ -13,12 +13,12 @@ // limitations under the License. #pragma once +#include + #ifdef __cplusplus extern "C" { #endif -#include - /******************Basic PHY Registers*******************/ /**