kopia lustrzana https://github.com/espressif/esp-idf
ethernet: add event declarations
rodzic
8b57fe9515
commit
c001553027
|
@ -79,6 +79,7 @@ static bool pause_send = false;
|
||||||
#ifdef CONFIG_PM_ENABLE
|
#ifdef CONFIG_PM_ENABLE
|
||||||
static esp_pm_lock_handle_t s_pm_lock;
|
static esp_pm_lock_handle_t s_pm_lock;
|
||||||
#endif
|
#endif
|
||||||
|
ESP_EVENT_DEFINE_BASE(ETH_EVENT);
|
||||||
|
|
||||||
static esp_err_t emac_ioctl(emac_sig_t sig, emac_par_t par);
|
static esp_err_t emac_ioctl(emac_sig_t sig, emac_par_t par);
|
||||||
esp_err_t emac_post(emac_sig_t sig, emac_par_t par);
|
esp_err_t emac_post(emac_sig_t sig, emac_par_t par);
|
||||||
|
|
|
@ -19,6 +19,9 @@
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include <stdbool.h>
|
||||||
|
#include <stdint.h>
|
||||||
|
#include "esp_event_base.h"
|
||||||
#include "esp_types.h"
|
#include "esp_types.h"
|
||||||
#include "esp_err.h"
|
#include "esp_err.h"
|
||||||
|
|
||||||
|
@ -130,6 +133,17 @@ typedef struct {
|
||||||
uint32_t reset_timeout_ms; /*!< timeout value for reset emac */
|
uint32_t reset_timeout_ms; /*!< timeout value for reset emac */
|
||||||
} eth_config_t;
|
} eth_config_t;
|
||||||
|
|
||||||
|
/** Ethernet event declarations */
|
||||||
|
typedef enum {
|
||||||
|
ETHERNET_EVENT_START, /**< ESP32 ethernet start */
|
||||||
|
ETHERNET_EVENT_STOP, /**< ESP32 ethernet stop */
|
||||||
|
ETHERNET_EVENT_CONNECTED, /**< ESP32 ethernet phy link up */
|
||||||
|
ETHERNET_EVENT_DISCONNECTED, /**< ESP32 ethernet phy link down */
|
||||||
|
} eth_event_t;
|
||||||
|
|
||||||
|
/** @brief Ethernet event base declaration */
|
||||||
|
ESP_EVENT_DECLARE_BASE(ETH_EVENT);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Init ethernet mac
|
* @brief Init ethernet mac
|
||||||
*
|
*
|
||||||
|
|
Ładowanie…
Reference in New Issue