esp-idf/components/esp_netif/include/lwip/esp_pbuf_ref.h
David Cermak 5c383d7b73 esp_netif/lwip: Fix deps cycles to "lwip -> esp_netif -> phy-drivers"
Fix dependency tree so that lwip doesn't depend on any specific network
interface component.
Network interface drivers shall depend on esp_netif.
esp_netif shall depend on lwip (but not on any specific interface
driver) -- it optionally depends on vfs and esp_eth (need ethernet
header for L2/bridge mode)
2022-07-20 14:59:07 +02:00

30 lines
609 B
C

/*
* SPDX-FileCopyrightText: 2021-2022 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
/**
* @file esp_pbuf reference interface file
*/
#pragma once
#include <stddef.h>
#include "lwip/pbuf.h"
#include "esp_netif.h"
#ifdef __cplusplus
extern "C" {
#endif
/**
* @brief Allocate custom pbuf containing pointer to a private l2-free function
*
* @note pbuf_free() will deallocate this custom pbuf and call the driver assigned free function
*/
struct pbuf* esp_pbuf_allocate(esp_netif_t *esp_netif, void *buffer, size_t len, void *l2_buff);
#ifdef __cplusplus
}
#endif