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:
parent
298d573280
commit
b3658ad95e
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user