mirror of
https://github.com/espressif/esp-idf.git
synced 2025-11-27 04:55:53 +00:00
ethernet: add reference counter for mac and phy
This commit is contained in:
@@ -18,8 +18,9 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
#include <stdbool.h>
|
||||
#include "esp_eth_com.h"
|
||||
#include <stdatomic.h>
|
||||
#include "sdkconfig.h"
|
||||
#include "esp_eth_com.h"
|
||||
|
||||
/**
|
||||
* @brief Ethernet PHY
|
||||
@@ -32,6 +33,12 @@ typedef struct esp_eth_phy_s esp_eth_phy_t;
|
||||
*
|
||||
*/
|
||||
struct esp_eth_phy_s {
|
||||
/**
|
||||
* @brief Reference count of PHY instance
|
||||
*
|
||||
*/
|
||||
atomic_int ref_count;
|
||||
|
||||
/**
|
||||
* @brief Set mediator for PHY
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user