/* * ESPRSSIF MIT License * * Copyright (c) 2016 * * Permission is hereby granted for use on ESPRESSIF SYSTEMS ESP8266 only, in which case, * it is free of charge, to any person obtaining a copy of this software and associated * documentation files (the "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, * and/or sell copies of the Software, and to permit persons to whom the Software is furnished * to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all copies or * substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * */ #ifndef __I2C_MASTER_H__ #define __I2C_MASTER_H__ /*------------------------------------------------------------------------------*/ // Configuration for V0.2 ideasX Module // SCL Line = I2C Clock // SDA Line = I2C Data /*------------------------------------------------------------------------------*/ #define I2C_MASTER_SDA_MUX PERIPHS_IO_MUX_MTCK_U //PERIPHS_IO_MUX_GPIO2_U #define I2C_MASTER_SCL_MUX PERIPHS_IO_MUX_MTMS_U //PERIPHS_IO_MUX_MTMS_U #define I2C_MASTER_SDA_GPIO 13 //2 #define I2C_MASTER_SCL_GPIO 14 //14 #define I2C_MASTER_SDA_FUNC FUNC_GPIO13 //FUNC_GPIO2 #define I2C_MASTER_SCL_FUNC FUNC_GPIO14 //FUNC_GPIO14 // #define I2C_MASTER_SDA_MUX PERIPHS_IO_MUX_GPIO2_U // #define I2C_MASTER_SCL_MUX PERIPHS_IO_MUX_MTMS_U // #define I2C_MASTER_SDA_GPIO 2 // #define I2C_MASTER_SCL_GPIO 14 // #define I2C_MASTER_SDA_FUNC FUNC_GPIO2 // #define I2C_MASTER_SCL_FUNC FUNC_GPIO14 //#define I2C_MASTER_SDA_MUX PERIPHS_IO_MUX_GPIO2_U //#define I2C_MASTER_SCL_MUX PERIPHS_IO_MUX_GPIO0_U //#define I2C_MASTER_SDA_GPIO 2 //#define I2C_MASTER_SCL_GPIO 0 //#define I2C_MASTER_SDA_FUNC FUNC_GPIO2 //#define I2C_MASTER_SCL_FUNC FUNC_GPIO0 #if 0 #define I2C_MASTER_GPIO_SET(pin) \ gpio_output_set(1<