1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

boards: fix config of cc2538 boards for new I2C API

This commit is contained in:
smlng 2018-06-14 12:26:00 +02:00 committed by dylad
parent eee4f36ef5
commit dce3bba8c4
5 changed files with 30 additions and 60 deletions

View File

@ -84,23 +84,17 @@ static const uart_conf_t uart_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 */
.speed = I2C_SPEED_FAST, /**< bus speed */
.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]))
/** @} */
/**

View File

@ -107,23 +107,17 @@ static const uart_conf_t uart_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 */
.speed = I2C_SPEED_FAST, /**< bus speed */
.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]))
/** @} */
/**

View File

@ -32,23 +32,17 @@
* @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,
.speed = I2C_SPEED_FAST, /**< bus speed */
.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]))
/** @} */
/**

View File

@ -32,23 +32,17 @@
* @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,
.speed = I2C_SPEED_FAST, /**< bus speed */
.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]))
/** @} */
/**

View File

@ -35,23 +35,17 @@
* @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,
.speed = I2C_SPEED_FAST, /**< bus speed */
.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]))
/** @} */
/**