ethernet: add event declarations

pull/3335/head
Ivan Grokhotkov 2018-08-23 17:50:29 +08:00
rodzic 8b57fe9515
commit c001553027
2 zmienionych plików z 15 dodań i 0 usunięć

Wyświetl plik

@ -79,6 +79,7 @@ static bool pause_send = false;
#ifdef CONFIG_PM_ENABLE
static esp_pm_lock_handle_t s_pm_lock;
#endif
ESP_EVENT_DEFINE_BASE(ETH_EVENT);
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);

Wyświetl plik

@ -19,6 +19,9 @@
extern "C" {
#endif
#include <stdbool.h>
#include <stdint.h>
#include "esp_event_base.h"
#include "esp_types.h"
#include "esp_err.h"
@ -130,6 +133,17 @@ typedef struct {
uint32_t reset_timeout_ms; /*!< timeout value for reset emac */
} 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
*