refactor(i2s): refactor of the private i2s caps

This commit is contained in:
laokaiyao
2025-12-11 10:25:42 +08:00
parent fd918efe43
commit 73ebd544fd
46 changed files with 81 additions and 118 deletions
@@ -15,7 +15,6 @@
#include <stdbool.h>
#include "hal/misc.h"
#include "hal/assert.h"
#include "hal/i2s_periph.h"
#include "soc/i2s_struct.h"
#include "soc/soc_etm_struct.h"
#include "soc/hp_sys_clkrst_struct.h"
@@ -26,6 +25,7 @@
#include "hal/config.h"
#define I2S_LL_GET(_attr) I2S_LL_ ## _attr
#define I2S_LL_INST_NUM 3
#ifdef __cplusplus
extern "C" {
@@ -52,7 +52,7 @@ extern "C" {
#define I2S_LL_SUPPORT_XTAL 1 // Support XTAL as I2S clock source
#define I2S_LL_ETM_EVENT_TABLE(i2s_port, chan_dir, event) \
(uint32_t[SOC_I2S_ATTR(INST_NUM)][2][I2S_ETM_EVENT_MAX]){ \
(uint32_t[I2S_LL_GET(INST_NUM)][2][I2S_ETM_EVENT_MAX]){ \
[0] = { \
[I2S_DIR_RX - 1] = { \
[I2S_ETM_EVENT_DONE] = I2S0_EVT_RX_DONE, \
@@ -86,7 +86,7 @@ extern "C" {
}[i2s_port][(chan_dir) - 1][event]
#define I2S_LL_ETM_TASK_TABLE(i2s_port, chan_dir, task) \
(uint32_t[SOC_I2S_ATTR(INST_NUM)][2][I2S_ETM_TASK_MAX]){ \
(uint32_t[I2S_LL_GET(INST_NUM)][2][I2S_ETM_TASK_MAX]){ \
[0] = { \
[I2S_DIR_RX - 1] = { \
[I2S_ETM_TASK_START] = I2S0_TASK_START_RX, \