mirror of
https://github.com/oliverschmidt/contiki.git
synced 2025-08-07 18:25:14 +00:00
Add the ability to put the I2C in a known/default state
This commit is contained in:
@@ -48,13 +48,15 @@
|
|||||||
#define BOARD_I2C_INTERFACE_0 0
|
#define BOARD_I2C_INTERFACE_0 0
|
||||||
#define BOARD_I2C_INTERFACE_1 1
|
#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
|
* \brief Select an I2C slave
|
||||||
* \param interface The I2C interface to be used (BOARD_I2C_INTERFACE_0 or _1)
|
* \param interface The I2C interface to be used (BOARD_I2C_INTERFACE_0 or _1)
|
||||||
|
Reference in New Issue
Block a user