connect_eth.h 759 B

1234567891011121314151617181920212223242526272829
  1. /*
  2. * SPDX-FileCopyrightText: 2022-2024 Espressif Systems (Shanghai) CO LTD
  3. *
  4. * SPDX-License-Identifier: Unlicense OR CC0-1.0
  5. *
  6. * https://docs.espressif.com/projects/esp-idf/en/stable/esp32/api-reference/network/esp_eth.html#basic-ethernet-concepts
  7. */
  8. #include "sdkconfig.h"
  9. #if (CONFIG_ETH_ENABLED && CONFIG_ETH_USE_SPI_ETHERNET && CONFIG_ETH_SPI_ETHERNET_W5500)
  10. #pragma once
  11. #include <string>
  12. #include <esp_err.h>
  13. #include <esp_http_server.h>
  14. #ifndef CONNECT_ETH_H
  15. #define CONNECT_ETH_H
  16. // Initialize Lan or WLAN based on config file
  17. esp_err_t eth_init_W5500(void);
  18. void eth_deinit_W5500(void);
  19. bool getETHisConnected(void);
  20. #endif // CONNECT_ETH_H
  21. #endif // (CONFIG_ETH_ENABLED && CONFIG_ETH_USE_SPI_ETHERNET && CONFIG_ETH_SPI_ETHERNET_W5500)