Skip to content

Commit

Permalink
boards: adapt i2c config of cc2538 based boards
Browse files Browse the repository at this point in the history
  • Loading branch information
smlng committed Jul 5, 2017
1 parent ee58958 commit dbfb1a2
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 30 deletions.
11 changes: 5 additions & 6 deletions boards/cc2538dk/include/periph_conf.h
Original file line number Diff line number Diff line change
Expand Up @@ -92,23 +92,22 @@ static const timer_conf_t timer_config[] = {
* @name I2C configuration
* @{
*/
#define I2C_NUMOF 1
#define I2C_0_EN 1
#define I2C_IRQ_PRIO 1

/* I2C 0 device configuration */
#define I2C_0_DEV 0
#define I2C_0_IRQ I2C_IRQn
#define I2C_0_IRQ_HANDLER isr_i2c
#define I2C_0_SCL_PIN GPIO_PA2 /* SPI_SCK on the SmartRF06 baseboard */
#define I2C_0_SDA_PIN GPIO_PA4 /* SPI_MOSI on the SmartRF06 baseboard */

static const i2c_conf_t i2c_config[I2C_NUMOF] = {
static const i2c_conf_t i2c_config[] = {
{
.scl_pin = GPIO_PA2, /* SPI_SCK on the SmartRF06 baseboard */
.sda_pin = GPIO_PA4, /* SPI_MOSI on the SmartRF06 baseboard */
.scl_pin = GPIO_PIN(0, 2), /**< GPIO_PA2, SPI_SCK on SmartRF06 */
.sda_pin = GPIO_PIN(0, 4) /**< GPIO_PA4, SPI_MOSI on SmartRF06 */
},
};

#define I2C_NUMOF (sizeof(i2c_config) / sizeof(i2c_config[0]))
/** @} */

/**
Expand Down
11 changes: 5 additions & 6 deletions boards/openmote-cc2538/include/periph_conf.h
Original file line number Diff line number Diff line change
Expand Up @@ -85,23 +85,22 @@ static const timer_conf_t timer_config[] = {
* @name I2C configuration
* @{
*/
#define I2C_NUMOF 1
#define I2C_0_EN 1
#define I2C_IRQ_PRIO 1

/* I2C 0 device configuration */
#define I2C_0_DEV 0
#define I2C_0_IRQ I2C_IRQn
#define I2C_0_IRQ_HANDLER isr_i2c
#define I2C_0_SCL_PIN GPIO_PB3 /* OpenBattery */
#define I2C_0_SDA_PIN GPIO_PB4 /* OpenBattery */

static const i2c_conf_t i2c_config[I2C_NUMOF] = {
static const i2c_conf_t i2c_config[] = {
{
.scl_pin = GPIO_PB3, /* OpenBattery */
.sda_pin = GPIO_PB4, /* OpenBattery */
.scl_pin = GPIO_PIN(1, 3), /**< GPIO_PB3, OpenBattery */
.sda_pin = GPIO_PIN(1, 4) /**< GPIO_PB4, OpenBattery */
},
};

#define I2C_NUMOF (sizeof(i2c_config) / sizeof(i2c_config[0]))
/** @} */

/**
Expand Down
11 changes: 5 additions & 6 deletions boards/remote-pa/include/periph_conf.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,23 +48,22 @@
* @name I2C configuration
* @{
*/
#define I2C_NUMOF 1
#define I2C_0_EN 1
#define I2C_IRQ_PRIO 1

/* I2C 0 device configuration */
#define I2C_0_DEV 0
#define I2C_0_IRQ I2C_IRQn
#define I2C_0_IRQ_HANDLER isr_i2c
#define I2C_0_SCL_PIN GPIO_PB1
#define I2C_0_SDA_PIN GPIO_PB0

static const i2c_conf_t i2c_config[I2C_NUMOF] = {
static const i2c_conf_t i2c_config[] = {
{
.scl_pin = I2C_0_SCL_PIN,
.sda_pin = I2C_0_SDA_PIN,
.scl_pin = GPIO_PIN(1, 1), /**< GPIO_PB1 */
.sda_pin = GPIO_PIN(1, 0) /**< GPIO_PB0 */
},
};

#define I2C_NUMOF (sizeof(i2c_config) / sizeof(i2c_config[0]))
/** @} */

/**
Expand Down
11 changes: 5 additions & 6 deletions boards/remote-reva/include/periph_conf.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,23 +49,22 @@
* @name I2C configuration
* @{
*/
#define I2C_NUMOF 1
#define I2C_0_EN 1
#define I2C_IRQ_PRIO 1

/* I2C 0 device configuration */
#define I2C_0_DEV 0
#define I2C_0_IRQ I2C_IRQn
#define I2C_0_IRQ_HANDLER isr_i2c
#define I2C_0_SCL_PIN GPIO_PC3
#define I2C_0_SDA_PIN GPIO_PC2

static const i2c_conf_t i2c_config[I2C_NUMOF] = {
static const i2c_conf_t i2c_config[] = {
{
.scl_pin = I2C_0_SCL_PIN,
.sda_pin = I2C_0_SDA_PIN,
.scl_pin = GPIO_PIN(2, 3), /**< GPIO_PC3 */,
.sda_pin = GPIO_PIN(2, 2) /**< GPIO_PC2 */,
},
};

#define I2C_NUMOF (sizeof(i2c_config) / sizeof(i2c_config[0]))
/** @} */

/**
Expand Down
11 changes: 5 additions & 6 deletions boards/remote-revb/include/periph_conf.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,23 +51,22 @@
* @name I2C configuration
* @{
*/
#define I2C_NUMOF 1
#define I2C_0_EN 1
#define I2C_IRQ_PRIO 1

/* I2C 0 device configuration */
#define I2C_0_DEV 0
#define I2C_0_IRQ I2C_IRQn
#define I2C_0_IRQ_HANDLER isr_i2c
#define I2C_0_SCL_PIN GPIO_PC3
#define I2C_0_SDA_PIN GPIO_PC2

static const i2c_conf_t i2c_config[I2C_NUMOF] = {
static const i2c_conf_t i2c_config[] = {
{
.scl_pin = I2C_0_SCL_PIN,
.sda_pin = I2C_0_SDA_PIN,
.scl_pin = GPIO_PIN(2, 3), /**< GPIO_PC3 */
.sda_pin = GPIO_PIN(2, 2) /**< GPIO_PC2 */
},
};

#define I2C_NUMOF (sizeof(i2c_config) / sizeof(i2c_config[0]))
/** @} */

/**
Expand Down

0 comments on commit dbfb1a2

Please sign in to comment.