diff --git a/boards/hifive1b/Makefile.features b/boards/hifive1b/Makefile.features index 9ab282f177..69b658fd31 100644 --- a/boards/hifive1b/Makefile.features +++ b/boards/hifive1b/Makefile.features @@ -2,7 +2,7 @@ CPU = fe310 CPU_MODEL = fe310_g002 # Put defined MCU peripherals here (in alphabetical order) -#FEATURES_PROVIDED += periph_i2c +FEATURES_PROVIDED += periph_i2c #FEATURES_PROVIDED += periph_pwm FEATURES_PROVIDED += periph_rtc FEATURES_PROVIDED += periph_rtt diff --git a/boards/hifive1b/include/periph_conf.h b/boards/hifive1b/include/periph_conf.h index dd5679a514..7217102fef 100644 --- a/boards/hifive1b/include/periph_conf.h +++ b/boards/hifive1b/include/periph_conf.h @@ -129,6 +129,22 @@ static const uart_conf_t uart_config[] = { #define PWM_NUMOF (3) /** @} */ +/** + * @name I2C configuration + * @{ + */ +static const i2c_conf_t i2c_config[] = { + { + .addr = I2C0_CTRL_ADDR, + .scl = GPIO_PIN(0, 13), + .sda = GPIO_PIN(0, 12), + .speed = I2C_SPEED_NORMAL, + }, +}; + +#define I2C_NUMOF ARRAY_SIZE(i2c_config) +/** @} */ + #ifdef __cplusplus } #endif