Add the ability to put the I2C in a known/default state
This commit is contained in:
parent
d1a1c16bd0
commit
0ad4b5f323
1 changed files with 7 additions and 5 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue