Merge branch 'contrib/github_pr_16016' into 'master'

Enable Timestamping for Non-PTP Ethernet frames (GitHub PR)

Closes IDFGH-15359

See merge request espressif/esp-idf!39581
This commit is contained in:
Ondrej Kosta
2025-06-09 16:58:07 +08:00
4 changed files with 26 additions and 2 deletions

View File

@@ -517,6 +517,12 @@ esp_err_t emac_hal_ptp_set_target_time(emac_hal_context_t *hal, uint32_t seconds
emac_ll_ts_target_int_trig_enable(hal->ptp_regs);
return ESP_OK;
}
esp_err_t emac_hal_ptp_enable_ts4all(emac_hal_context_t *hal, bool enable)
{
emac_ll_ts_all_enable(hal->ptp_regs, enable);
return ESP_OK;
}
#endif // SOC_EMAC_IEEE1588V2_SUPPORTED

View File

@@ -415,6 +415,16 @@ esp_err_t emac_hal_ptp_get_sys_time(emac_hal_context_t *hal, uint32_t *seconds,
*/
esp_err_t emac_hal_ptp_set_target_time(emac_hal_context_t *hal, uint32_t seconds, uint32_t nano_seconds);
/**
* @brief Enable rx/tx timestamps for all Ethernet frames
*
* @param hal EMAC HAL context infostructure
* @param enable timestamping for non-PTP Ethernet frames
* @return
* - ESP_OK on success
*/
esp_err_t emac_hal_ptp_enable_ts4all(emac_hal_context_t *hal, bool enable);
/**
* @brief Get timestamp from receive descriptor
*