mirror of
https://github.com/espressif/esp-idf.git
synced 2025-07-30 10:47:19 +02:00
feat(axi): add low level function for adjusting the arbitration priority
This commit is contained in:
41
components/hal/esp32c5/include/hal/axi_icm_ll.h
Normal file
41
components/hal/esp32c5/include/hal/axi_icm_ll.h
Normal file
@ -0,0 +1,41 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2025 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
#include "hal/assert.h"
|
||||
#include "soc/hp_system_struct.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Set arbitration priority for GDMA master port
|
||||
*
|
||||
* @param priority Arbitration priority for GDMA master port
|
||||
*/
|
||||
static inline void axi_icm_ll_set_gdma_arbiter_prio(uint8_t priority)
|
||||
{
|
||||
HAL_ASSERT(priority < 2); // Ensure priority is within valid range (0-1)
|
||||
HP_SYSTEM.axi_mst_pri.dma_priority = priority;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Set arbitration priority for Cache master port
|
||||
*
|
||||
* @param priority Arbitration priority for Cache master port
|
||||
*/
|
||||
static inline void axi_icm_ll_set_cache_arbiter_prio(uint8_t priority)
|
||||
{
|
||||
HAL_ASSERT(priority < 2); // Ensure priority is within valid range (0-1)
|
||||
HP_SYSTEM.axi_mst_pri.cache_priority = priority;
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
41
components/hal/esp32c61/include/hal/axi_icm_ll.h
Normal file
41
components/hal/esp32c61/include/hal/axi_icm_ll.h
Normal file
@ -0,0 +1,41 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2025 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
#include "hal/assert.h"
|
||||
#include "soc/hp_system_struct.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Set arbitration priority for GDMA master port
|
||||
*
|
||||
* @param priority Arbitration priority for GDMA master port
|
||||
*/
|
||||
static inline void axi_icm_ll_set_gdma_arbiter_prio(uint8_t priority)
|
||||
{
|
||||
HAL_ASSERT(priority < 2); // Ensure priority is within valid range (0-1)
|
||||
HP_SYSTEM.system_axi_mst_pri.system_dma_priority = priority;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Set arbitration priority for Cache master port
|
||||
*
|
||||
* @param priority Arbitration priority for Cache master port
|
||||
*/
|
||||
static inline void axi_icm_ll_set_cache_arbiter_prio(uint8_t priority)
|
||||
{
|
||||
HAL_ASSERT(priority < 2); // Ensure priority is within valid range (0-1)
|
||||
HP_SYSTEM.system_axi_mst_pri.system_cache_priority = priority;
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
Reference in New Issue
Block a user