mirror of
https://github.com/espressif/esp-idf.git
synced 2025-10-28 12:10:45 +00:00
Fixed ESP32 EMAC driver insufficient TX buffer size which could followed esp_eth_stop and esp_eth_start sequence
This commit is contained in:
@@ -1,16 +1,8 @@
|
||||
// Copyright 2019 Espressif Systems (Shanghai) PTE LTD
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2021 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
@@ -381,9 +373,24 @@ uint32_t emac_hal_get_phy_data(emac_hal_context_t *hal);
|
||||
|
||||
void emac_hal_set_address(emac_hal_context_t *hal, uint8_t *mac_addr);
|
||||
|
||||
|
||||
/**
|
||||
* @brief Starts EMAC Transmission & Reception
|
||||
*
|
||||
* @param hal EMAC HAL context infostructure
|
||||
*/
|
||||
void emac_hal_start(emac_hal_context_t *hal);
|
||||
|
||||
void emac_hal_stop(emac_hal_context_t *hal);
|
||||
/**
|
||||
* @brief Stops EMAC Transmission & Reception
|
||||
*
|
||||
* @param hal EMAC HAL context infostructure
|
||||
* @return
|
||||
* - ESP_OK: succeed
|
||||
* - ESP_ERR_INVALID_STATE: previous frame transmission is not completed. When this error occurs,
|
||||
* wait and reapeat the EMAC stop again.
|
||||
*/
|
||||
esp_err_t emac_hal_stop(emac_hal_context_t *hal);
|
||||
|
||||
uint32_t emac_hal_get_tx_desc_owner(emac_hal_context_t *hal);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user