1 // Copyright 2015-2019 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 #include "soc/i2c_periph.h" 16 #include "soc/gpio_sig_map.h" 17 18 /* 19 Bunch of constants for every I2C peripheral: GPIO signals, irqs, hw addr of registers etc 20 */ 21 const i2c_signal_conn_t i2c_periph_signal[SOC_I2C_NUM] = { 22 { 23 .sda_out_sig = I2CEXT0_SDA_OUT_IDX, 24 .sda_in_sig = I2CEXT0_SDA_IN_IDX, 25 .scl_out_sig = I2CEXT0_SCL_OUT_IDX, 26 .scl_in_sig = I2CEXT0_SCL_IN_IDX, 27 .irq = ETS_I2C_EXT0_INTR_SOURCE, 28 .module = PERIPH_I2C0_MODULE, 29 }, 30 { 31 .sda_out_sig = I2CEXT1_SDA_OUT_IDX, 32 .sda_in_sig = I2CEXT1_SDA_IN_IDX, 33 .scl_out_sig = I2CEXT1_SCL_OUT_IDX, 34 .scl_in_sig = I2CEXT1_SCL_IN_IDX, 35 .irq = ETS_I2C_EXT1_INTR_SOURCE, 36 .module = PERIPH_I2C1_MODULE, 37 }, 38 }; 39