esp_pbuf_ref.h 609 B

1234567891011121314151617181920212223242526272829
  1. /*
  2. * SPDX-FileCopyrightText: 2021-2022 Espressif Systems (Shanghai) CO LTD
  3. *
  4. * SPDX-License-Identifier: Apache-2.0
  5. */
  6. /**
  7. * @file esp_pbuf reference interface file
  8. */
  9. #pragma once
  10. #include <stddef.h>
  11. #include "lwip/pbuf.h"
  12. #include "esp_netif.h"
  13. #ifdef __cplusplus
  14. extern "C" {
  15. #endif
  16. /**
  17. * @brief Allocate custom pbuf containing pointer to a private l2-free function
  18. *
  19. * @note pbuf_free() will deallocate this custom pbuf and call the driver assigned free function
  20. */
  21. struct pbuf* esp_pbuf_allocate(esp_netif_t *esp_netif, void *buffer, size_t len, void *l2_buff);
  22. #ifdef __cplusplus
  23. }
  24. #endif