1 // Copyright 2020 Espressif Systems (Shanghai) PTE LTD
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 //     http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
14 
15 #pragma once
16 #include "soc/soc.h"
17 #include "soc/periph_defs.h"
18 #include "soc/i2s_struct.h"
19 #include "soc/i2s_reg.h"
20 #include "soc/soc_caps.h"
21 
22 #ifdef __cplusplus
23 extern "C" {
24 #endif
25 
26 /*
27  Stores a bunch of per-I2S-peripheral data.
28 */
29 typedef struct {
30     const uint8_t mck_out_sig;
31 
32     const uint8_t m_tx_bck_sig;
33     const uint8_t m_rx_bck_sig;
34     const uint8_t m_tx_ws_sig;
35     const uint8_t m_rx_ws_sig;
36 
37     const uint8_t s_tx_bck_sig;
38     const uint8_t s_rx_bck_sig;
39     const uint8_t s_tx_ws_sig;
40     const uint8_t s_rx_ws_sig;
41 
42     const uint8_t data_out_sig;
43     const uint8_t data_in_sig;
44 
45     const uint8_t irq;
46     const periph_module_t module;
47 } i2s_signal_conn_t;
48 
49 extern const i2s_signal_conn_t i2s_periph_signal[SOC_I2S_NUM];
50 
51 #ifdef __cplusplus
52 }
53 #endif
54