1 /* 2 * SPDX-FileCopyrightText: 2020-2022 Espressif Systems (Shanghai) CO LTD 3 * 4 * SPDX-License-Identifier: Apache-2.0 5 */ 6 7 #pragma once 8 #include "soc/soc.h" 9 #include "soc/periph_defs.h" 10 #include "soc/i2s_struct.h" 11 #include "soc/i2s_reg.h" 12 #include "soc/soc_caps.h" 13 14 #ifdef __cplusplus 15 extern "C" { 16 #endif 17 18 /* 19 Stores a bunch of per-I2S-peripheral data. 20 */ 21 typedef struct { 22 const uint8_t mck_out_sig; 23 24 const uint8_t m_tx_bck_sig; 25 const uint8_t m_rx_bck_sig; 26 const uint8_t m_tx_ws_sig; 27 const uint8_t m_rx_ws_sig; 28 29 const uint8_t s_tx_bck_sig; 30 const uint8_t s_rx_bck_sig; 31 const uint8_t s_tx_ws_sig; 32 const uint8_t s_rx_ws_sig; 33 34 union { 35 const uint8_t data_out_sig; 36 #if SOC_I2S_PDM_MAX_TX_LINES 37 const uint8_t data_out_sigs[SOC_I2S_PDM_MAX_TX_LINES]; // Only valid in version 2 38 #endif 39 }; 40 41 union { 42 const uint8_t data_in_sig; 43 #if SOC_I2S_PDM_MAX_RX_LINES 44 const uint8_t data_in_sigs[SOC_I2S_PDM_MAX_RX_LINES]; 45 #endif 46 }; 47 48 const uint8_t irq; 49 const periph_module_t module; 50 } i2s_signal_conn_t; 51 52 extern const i2s_signal_conn_t i2s_periph_signal[SOC_I2S_NUM]; 53 54 #ifdef __cplusplus 55 } 56 #endif 57