boards: fix config of cc2538 boards for new I2C API
This commit is contained in:
parent
eee4f36ef5
commit
dce3bba8c4
@ -84,23 +84,17 @@ static const uart_conf_t uart_config[] = {
|
|||||||
* @name I2C configuration
|
* @name I2C configuration
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
#define I2C_NUMOF 1
|
|
||||||
#define I2C_0_EN 1
|
|
||||||
#define I2C_IRQ_PRIO 1
|
#define I2C_IRQ_PRIO 1
|
||||||
|
|
||||||
/* I2C 0 device configuration */
|
static const i2c_conf_t i2c_config[] = {
|
||||||
#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] = {
|
|
||||||
{
|
{
|
||||||
.scl_pin = GPIO_PA2, /* SPI_SCK on the SmartRF06 baseboard */
|
.speed = I2C_SPEED_FAST, /**< bus speed */
|
||||||
.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]))
|
||||||
/** @} */
|
/** @} */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -107,23 +107,17 @@ static const uart_conf_t uart_config[] = {
|
|||||||
* @name I2C configuration
|
* @name I2C configuration
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
#define I2C_NUMOF 1
|
|
||||||
#define I2C_0_EN 1
|
|
||||||
#define I2C_IRQ_PRIO 1
|
#define I2C_IRQ_PRIO 1
|
||||||
|
|
||||||
/* I2C 0 device configuration */
|
static const i2c_conf_t i2c_config[] = {
|
||||||
#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] = {
|
|
||||||
{
|
{
|
||||||
.scl_pin = GPIO_PB3, /* OpenBattery */
|
.speed = I2C_SPEED_FAST, /**< bus speed */
|
||||||
.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]))
|
||||||
/** @} */
|
/** @} */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -32,23 +32,17 @@
|
|||||||
* @name I2C configuration
|
* @name I2C configuration
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
#define I2C_NUMOF 1
|
|
||||||
#define I2C_0_EN 1
|
|
||||||
#define I2C_IRQ_PRIO 1
|
#define I2C_IRQ_PRIO 1
|
||||||
|
|
||||||
/* I2C 0 device configuration */
|
static const i2c_conf_t i2c_config[] = {
|
||||||
#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] = {
|
|
||||||
{
|
{
|
||||||
.scl_pin = I2C_0_SCL_PIN,
|
.speed = I2C_SPEED_FAST, /**< bus speed */
|
||||||
.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]))
|
||||||
/** @} */
|
/** @} */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -32,23 +32,17 @@
|
|||||||
* @name I2C configuration
|
* @name I2C configuration
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
#define I2C_NUMOF 1
|
|
||||||
#define I2C_0_EN 1
|
|
||||||
#define I2C_IRQ_PRIO 1
|
#define I2C_IRQ_PRIO 1
|
||||||
|
|
||||||
/* I2C 0 device configuration */
|
static const i2c_conf_t i2c_config[] = {
|
||||||
#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] = {
|
|
||||||
{
|
{
|
||||||
.scl_pin = I2C_0_SCL_PIN,
|
.speed = I2C_SPEED_FAST, /**< bus speed */
|
||||||
.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]))
|
||||||
/** @} */
|
/** @} */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -35,23 +35,17 @@
|
|||||||
* @name I2C configuration
|
* @name I2C configuration
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
#define I2C_NUMOF 1
|
|
||||||
#define I2C_0_EN 1
|
|
||||||
#define I2C_IRQ_PRIO 1
|
#define I2C_IRQ_PRIO 1
|
||||||
|
|
||||||
/* I2C 0 device configuration */
|
static const i2c_conf_t i2c_config[] = {
|
||||||
#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] = {
|
|
||||||
{
|
{
|
||||||
.scl_pin = I2C_0_SCL_PIN,
|
.speed = I2C_SPEED_FAST, /**< bus speed */
|
||||||
.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]))
|
||||||
/** @} */
|
/** @} */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user