esp_eth: Remove deprecated esp_eth_receive()

pull/9179/head
David Cermak 2022-05-27 09:12:31 +02:00 zatwierdzone przez David Čermák
rodzic 343cf2696e
commit fd366fac9e
2 zmienionych plików z 0 dodań i 36 usunięć

Wyświetl plik

@ -268,29 +268,6 @@ esp_err_t esp_eth_transmit(esp_eth_handle_t hdl, void *buf, size_t length);
*/
esp_err_t esp_eth_transmit_vargs(esp_eth_handle_t hdl, uint32_t argc, ...);
/**
* @brief General Receive is deprecated and shall not be accessed from app code,
* as polling is not supported by Ethernet.
*
* @param[in] hdl: handle of Ethernet driver
* @param[out] buf: buffer to preserve the received packet
* @param[out] length: length of the received packet
*
* @note Before this function got invoked, the value of "length" should set by user, equals the size of buffer.
* After the function returned, the value of "length" means the real length of received data.
* @note This API was exposed by accident, users should not use this API in their applications.
* Ethernet driver is interrupt driven, and doesn't support polling mode.
* Instead, users should register input callback with ``esp_eth_update_input_path``.
*
* @return
* - ESP_OK: receive frame buffer successfully
* - ESP_ERR_INVALID_ARG: receive frame buffer failed because of some invalid argument
* - ESP_ERR_INVALID_SIZE: input buffer size is not enough to hold the incoming data.
* in this case, value of returned "length" indicates the real size of incoming data.
* - ESP_FAIL: receive frame buffer failed because some other error occurred
*/
esp_err_t esp_eth_receive(esp_eth_handle_t hdl, uint8_t *buf, uint32_t *length) __attribute__((deprecated("Ethernet driver is interrupt driven only, please register input callback with esp_eth_update_input_path")));
/**
* @brief Misc IO function of Etherent driver
*

Wyświetl plik

@ -388,19 +388,6 @@ err:
return ret;
}
esp_err_t esp_eth_receive(esp_eth_handle_t hdl, uint8_t *buf, uint32_t *length)
{
esp_err_t ret = ESP_OK;
esp_eth_driver_t *eth_driver = (esp_eth_driver_t *)hdl;
ESP_GOTO_ON_FALSE(buf && length, ESP_ERR_INVALID_ARG, err, TAG, "can't set buf and length to null");
ESP_GOTO_ON_FALSE(*length > 60, ESP_ERR_INVALID_ARG, err, TAG, "length can't be less than 60");
ESP_GOTO_ON_FALSE(eth_driver, ESP_ERR_INVALID_ARG, err, TAG, "ethernet driver handle can't be null");
esp_eth_mac_t *mac = eth_driver->mac;
ret = mac->receive(mac, buf, length);
err:
return ret;
}
esp_err_t esp_eth_ioctl(esp_eth_handle_t hdl, esp_eth_io_cmd_t cmd, void *data)
{
esp_err_t ret = ESP_OK;