lwip: Use custom pbufs for eth and wifi port/netif

This commit is contained in:
David Cermak
2022-03-17 12:51:00 +01:00
parent 65bf5f2b10
commit dbc91f73e6
7 changed files with 124 additions and 79 deletions

View File

@@ -0,0 +1,32 @@
/*
* SPDX-FileCopyrightText: 2021-2022 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
/**
* @file esp_pbuf reference interface file
*/
#ifndef __LWIP_ESP_PBUF_REF_H__
#define __LWIP_ESP_PBUF_REF_H__
#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
#endif //__LWIP_ESP_PBUF_REF_H__