diff --git a/boards/seeedstudio-gd32/Kconfig b/boards/seeedstudio-gd32/Kconfig index d81aa9f0f6..b0dcf5773c 100644 --- a/boards/seeedstudio-gd32/Kconfig +++ b/boards/seeedstudio-gd32/Kconfig @@ -14,6 +14,7 @@ config BOARD_SEEEDSTUDIO_GD32 select CPU_MODEL_GD32VF103VBT6 select BOARD_HAS_HXTAL select BOARD_HAS_LXTAL + select HAS_PERIPH_I2C select HAS_PERIPH_PWM select HAS_PERIPH_TIMER select HAS_PERIPH_UART diff --git a/boards/seeedstudio-gd32/Makefile.features b/boards/seeedstudio-gd32/Makefile.features index fd23f163dc..7f8956607c 100644 --- a/boards/seeedstudio-gd32/Makefile.features +++ b/boards/seeedstudio-gd32/Makefile.features @@ -1,6 +1,7 @@ CPU_MODEL = gd32vf103vbt6 # Put defined MCU peripherals here (in alphabetical order) +FEATURES_PROVIDED += periph_i2c FEATURES_PROVIDED += periph_pwm FEATURES_PROVIDED += periph_timer FEATURES_PROVIDED += periph_uart diff --git a/boards/seeedstudio-gd32/doc.txt b/boards/seeedstudio-gd32/doc.txt index dc5a407126..1ddffa1445 100644 --- a/boards/seeedstudio-gd32/doc.txt +++ b/boards/seeedstudio-gd32/doc.txt @@ -42,7 +42,7 @@ on-board components: | UART | 2 | yes | | USART | 3 | yes | | SPI | 3 | no | -| I2C | 2 x Fast Mode 400 kHz | no | +| I2C | 2 x Fast Mode 400 kHz | yes | | I2S | 2 | no | | CAN | 2 x CAN 2.0B with up to 1 Mbps | no | | PWM | 6 Channels | yes | @@ -64,15 +64,19 @@ MCU pins and their configuration in RIOT. | MCU Pin | MCU Peripheral | RIOT Peripheral | Board Function | Remark | |:--------|:---------------|:-----------------|:---------------|:-----------------------------| -| PA0 | | | BTN0 | | +| PA0 | | BTN0 | KEY1 | | | PA9 | USART0 TX | UART_DEV(0) TX | UART TX | | | PA10 | USART0 RX | UART_DEV(0) RX | UART RX | | | PB0 | | PWM_DEV(0) CH0 | LED1 green | | | PB1 | | PWM_DEV(0) CH1 | LED2 blue | | | PB5 | | | LED0 red | | +| PB6 | I2C0 SCL | I2C_DEV(0) SCL | | | +| PB7 | I2C0 SDA | I2C_DEV(0) SDA | | | | PB8 | | PWM_DEV(1) CH0 | | N/A if CAN is used | -| PB9 | | PWM_DEV(2) CH1 | | N/A if CAN is used | -| PC13 | | | BTN1 | | +| PB9 | | PWM_DEV(1) CH1 | | N/A if CAN is used | +| PB10 | I2C1 SCL | I2C_DEV(1) SCL | | | +| PB11 | I2C1 SDA | I2C_DEV(1) SDA | | | +| PC13 | | BTN1 | KEY2 | | ## Flash the board diff --git a/boards/seeedstudio-gd32/include/periph_conf.h b/boards/seeedstudio-gd32/include/periph_conf.h index 9dfcd5a448..64b667b112 100644 --- a/boards/seeedstudio-gd32/include/periph_conf.h +++ b/boards/seeedstudio-gd32/include/periph_conf.h @@ -36,6 +36,7 @@ #include "periph_cpu.h" #include "periph_common_conf.h" +#include "cfg_i2c_default.h" #include "cfg_timer_default.h" #include "cfg_uart_default.h"