From 0ad4b5f323af5fd601d426273b3a03efb05f4b37 Mon Sep 17 00:00:00 2001 From: George Oikonomou Date: Fri, 1 May 2015 16:26:28 +0100 Subject: [PATCH] Add the ability to put the I2C in a known/default state --- platform/srf06-cc26xx/sensortag/board-i2c.h | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/platform/srf06-cc26xx/sensortag/board-i2c.h b/platform/srf06-cc26xx/sensortag/board-i2c.h index bed78cf46..c159bc527 100644 --- a/platform/srf06-cc26xx/sensortag/board-i2c.h +++ b/platform/srf06-cc26xx/sensortag/board-i2c.h @@ -48,13 +48,15 @@ #define BOARD_I2C_INTERFACE_0 0 #define BOARD_I2C_INTERFACE_1 1 /*---------------------------------------------------------------------------*/ -#define board_i2c_deselect(...) -/*---------------------------------------------------------------------------*/ /** - * \brief Initialise the I2C controller with defaults for the sensortag + * \brief Put the I2C controller in a known state + * + * In this state, pins SDA and SCL will be under i2c control and pins SDA HP + * and SCL HP will be configured as gpio inputs. This is equal to selecting + * BOARD_I2C_INTERFACE_0, but without selecting a slave device address */ -void board_i2c_init(void); - +#define board_i2c_deselect() board_i2c_select(BOARD_I2C_INTERFACE_0, 0) +/*---------------------------------------------------------------------------*/ /** * \brief Select an I2C slave * \param interface The I2C interface to be used (BOARD_I2C_INTERFACE_0 or _1)