tapio.h 634 B

123456789101112131415161718192021222324252627
  1. /*
  2. * SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD
  3. *
  4. * SPDX-License-Identifier: Apache-2.0
  5. */
  6. #pragma once
  7. #include "esp_err.h"
  8. #include "esp_netif.h"
  9. /**
  10. * @brief Creates tapio layer as a driver interface to esp-netif
  11. *
  12. * @warning Implemented as singleton, can use only one tapio in the system!
  13. *
  14. * @return pointer to the tapio driver handle
  15. */
  16. void *tapio_create(void);
  17. /**
  18. * @brief esp-netif driver I/O output path
  19. *
  20. * @param h Driver's handle
  21. * @param buffer Data to output
  22. * @param len Data size
  23. * @return ESP_OK on success
  24. */
  25. esp_err_t tapio_output(void *h, void *buffer, size_t len);