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

boards/hifive1b: provide i2c configuration

This commit is contained in:
Alexandre Abadie 2019-12-08 12:15:06 +01:00
parent 298d573280
commit b3658ad95e
No known key found for this signature in database
GPG Key ID: 1C919A403CAE1405
2 changed files with 17 additions and 1 deletions

View File

@ -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

View File

@ -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