2024-01-02 17:09:37 +08:00
|
|
|
/*
|
|
|
|
* SPDX-FileCopyrightText: 2023-2024 Espressif Systems (Shanghai) CO LTD
|
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include "esp_wifi.h"
|
2024-03-04 20:26:02 +01:00
|
|
|
#include "esp_wifi_remote_api.h"
|
2024-01-02 17:09:37 +08:00
|
|
|
|
2024-03-04 20:26:02 +01:00
|
|
|
/**
|
|
|
|
* @brief Remote channel Rx function pointer
|
|
|
|
*/
|
2024-01-02 17:09:37 +08:00
|
|
|
typedef esp_err_t (*esp_remote_channel_rx_fn_t)(void *h, void *buffer, void *buff_to_free, size_t len);
|
2024-03-04 20:26:02 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief Remote channel Tx function pointer
|
|
|
|
*/
|
2024-01-02 17:09:37 +08:00
|
|
|
typedef esp_err_t (*esp_remote_channel_tx_fn_t)(void *h, void *buffer, size_t len);
|
|
|
|
|
2024-03-04 20:26:02 +01:00
|
|
|
/**
|
|
|
|
* @brief Remote channel handle
|
|
|
|
*/
|
2024-01-02 17:09:37 +08:00
|
|
|
typedef struct esp_remote_channel *esp_remote_channel_t;
|
|
|
|
|
2024-03-04 20:26:02 +01:00
|
|
|
/**
|
|
|
|
* @brief Remote channel configuration
|
|
|
|
*/
|
|
|
|
typedef struct esp_remote_channel_config *esp_remote_channel_config_t;
|
2024-01-02 17:09:37 +08:00
|
|
|
|
|
|
|
|
|
|
|
// handling channels
|
2024-03-04 20:26:02 +01:00
|
|
|
/**
|
|
|
|
* @brief Receive packet to the esp_wifi network layers
|
|
|
|
* @param h Channel handle
|
|
|
|
* @param buffer Packet buffer ptr
|
|
|
|
* @param buff_to_free Packet ptr to free
|
|
|
|
* @param len Packet len
|
|
|
|
* @return ESP_OK on success
|
|
|
|
*/
|
2024-01-02 17:09:37 +08:00
|
|
|
esp_err_t esp_wifi_remote_channel_rx(void *h, void *buffer, void *buff_to_free, size_t len);
|
2024-03-04 20:26:02 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief Sets Tx callback for the remote channel
|
|
|
|
* @param ifx Wifi interface
|
|
|
|
* @param h Channel handle
|
|
|
|
* @param tx_cb Callback type
|
|
|
|
* @return ESP_OK on success
|
|
|
|
*/
|
2024-01-02 17:09:37 +08:00
|
|
|
esp_err_t esp_wifi_remote_channel_set(wifi_interface_t ifx, void *h, esp_remote_channel_tx_fn_t tx_cb);
|