Default I2C configuration for GD32VF103 boards. More...
Default I2C configuration for GD32VF103 boards.
Definition in file cfg_i2c_default.h.
#include "periph_cpu.h"
Go to the source code of this file.
I2C configuration | |
| |
#define | I2C_DEV_1_USED 0 |
Disable the second I2C device I2C_DEV(1) by default. | |
#define | I2C_NUMOF ARRAY_SIZE(i2c_config) |
static const i2c_conf_t | i2c_config [] |
Default I2C device configuration. | |
#define I2C_DEV_1_USED 0 |
Disable the second I2C device I2C_DEV(1)
by default.
The second I2C device I2C_DEV(1)
is only defined if I2C_DEV_1_USED
is set to 1 by the board. This allows to use the default configuration with one or two I2C devices depending on whether other peripherals are enabled that would collide with the I2C devices.
Definition at line 45 of file cfg_i2c_default.h.
#define I2C_NUMOF ARRAY_SIZE(i2c_config) |
Definition at line 80 of file cfg_i2c_default.h.
|
static |
Default I2C device configuration.
The default I2C device configuration allows to define up to two I2C devices I2C_DEV(0)
and I2C_DEV(1)
. I2C_DEV(0)
is always defined if the I2C peripheral is enabled by the module periph_spi
. The second I2C device I2C_DEV(1)
is only defined if I2C_DEV_1_USED
is set to 1 by the board. This allows to use the default configuration with one or two I2C devices depending on whether other peripherals are enabled that would collide with the I2C devices.
Definition at line 59 of file cfg_i2c_default.h.