Skip to content

Commit b325a8d

Browse files
authored
Merge branch 'master' into gd32
2 parents 752461d + aa79cd8 commit b325a8d

29 files changed

Lines changed: 1452 additions & 401 deletions

File tree

bsp/README.md

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -317,18 +317,19 @@ This document is based on the RT-Thread mainline repository and categorizes the
317317

318318
| BSP Name | GPIO | UART | ADC | CAN | DAC | HWTimer | I2C | RTC | SPI | WDT |
319319
|----------|------|------|-----|-----|-----|---------|-----|-----|-----|-----|
320-
| [n32g43xcl-stb](n32/n32g43xcl-stb) |||||||||||
321-
| [n32g457gel-stb](n32) |||||||||||
322-
| [n32g45xcl-stb](n32/n32g45xcl-stb) |||||||||||
323-
| [n32g45xml-stb](n32/n32g45xml-stb) |||||||||||
324-
| [n32g45xrl-stb](n32/n32g45xrl-stb) |||||||||||
325-
| [n32g45xvl-stb](n32/n32g45xvl-stb) |||||||||||
326-
| [n32g47rml-stb](n32/n32g47rml-stb) |||||||||||
327-
| [n32l40xcl-stb](n32/n32l40xcl-stb) |||||||||||
328-
| [n32l436-evb](n32/n32l436-evb) |||||||||||
329-
| [n32l43xml-stb](n32/n32l43xml-stb) |||||||||||
330-
| [n32l43xrl-stb](n32/n32l43xrl-stb) |||||||||||
331-
| [n32wb45xl-evb](n32/n32wb45xl-evb) |||||||||||
320+
| [n32g43xcl-stb](n32/n32gxx_lxx/n32g43xcl-stb) |||||||||||
321+
| [n32g457gel-stb](n32/n32gxx_lxx/n32g457gel-stb) |||||||||||
322+
| [n32g45xcl-stb](n32/n32gxx_lxx/n32g45xcl-stb) |||||||||||
323+
| [n32g45xml-stb](n32/n32gxx_lxx/n32g45xml-stb) |||||||||||
324+
| [n32g45xrl-stb](n32/n32gxx_lxx/n32g45xrl-stb) |||||||||||
325+
| [n32g45xvl-stb](n32/n32gxx_lxx/n32g45xvl-stb) |||||||||||
326+
| [n32g47rml-stb](n32/n32gxx_lxx/n32g47rml-stb) |||||||||||
327+
| [n32l40xcl-stb](n32/n32gxx_lxx/n32l40xcl-stb) |||||||||||
328+
| [n32l436-evb](n32/n32gxx_lxx/n32l436-evb) |||||||||||
329+
| [n32l43xml-stb](n32/n32gxx_lxx/n32l43xml-stb) |||||||||||
330+
| [n32l43xrl-stb](n32/n32gxx_lxx/n32l43xrl-stb) |||||||||||
331+
| [n32wb45xl-evb](n32/n32gxx_lxx/n32wb45xl-evb) |||||||||||
332+
| [n32h760zil7-stb](n32/n32hxxx/n32h760zil7-stb) |||| - | - | - |||| - |
332333

333334
#### 🟡 NRF5x
334335

bsp/gd32/risc-v/gd32vw553h-eval/.ci/attachconfig/ci.attachconfig.yml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,16 @@ component.pwm:
77
kconfig:
88
- CONFIG_BSP_USING_PWM=y
99
- CONFIG_BSP_USING_PWM0=y
10+
# ------ devices ------
11+
devices.i2c:
12+
kconfig:
13+
- CONFIG_BSP_USING_HW_I2C=y
14+
- CONFIG_BSP_USING_HW_I2C0=y
15+
- CONFIG_BSP_HW_I2C0_PIN_PA2_PA3=y
16+
- CONFIG_BSP_HW_I2C0_CLK=100
17+
- CONFIG_BSP_USING_HW_I2C1=y
18+
- CONFIG_BSP_HW_I2C1_PIN_PB12_PB13=y
19+
- CONFIG_BSP_HW_I2C1_CLK=100
1020
# ------ peripheral CI ------
1121
peripheral.at24c02:
1222
kconfig:
@@ -40,4 +50,5 @@ peripheral.at24c02:
4050
- CONFIG_BSP_USING_HW_I2C=y
4151
- CONFIG_BSP_USING_HW_I2C0=y
4252
- CONFIG_BSP_HW_I2C0_PIN_PA2_PA3=y
43-
- CONFIG_BSP_HW_I2C0_CLK=100
53+
- CONFIG_BSP_HW_I2C0_CLK=100
54+

bsp/gd32/risc-v/gd32vw553h-eval/board/Kconfig

Lines changed: 55 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -56,26 +56,6 @@ menu "On-chip Peripheral Drivers"
5656
depends on BSP_USING_UART2
5757
select RT_SERIAL_USING_DMA
5858
default n
59-
60-
config BSP_USING_UART3
61-
bool "Enable UART3"
62-
default n
63-
64-
config BSP_UART3_RX_USING_DMA
65-
bool "Enable UART3 RX DMA"
66-
depends on BSP_USING_UART3
67-
select RT_SERIAL_USING_DMA
68-
default n
69-
70-
config BSP_USING_UART4
71-
bool "Enable UART4"
72-
default n
73-
74-
config BSP_UART4_RX_USING_DMA
75-
bool "Enable UART4 RX DMA"
76-
depends on BSP_USING_UART4
77-
select RT_SERIAL_USING_DMA
78-
default n
7959
endif
8060

8161
menuconfig BSP_USING_PWM
@@ -99,8 +79,63 @@ menu "On-chip Peripheral Drivers"
9979
bool "Enable PWM16"
10080
default n
10181
endif
82+
menuconfig BSP_USING_HW_I2C
83+
bool "Enable Hardware I2C"
84+
default n
85+
select RT_USING_I2C
86+
if BSP_USING_HW_I2C
87+
config BSP_USING_HW_I2C0
88+
bool "Enable Hardware I2C0"
89+
default n
10290

91+
# config i2c0 pins
92+
choice
93+
prompt "Select I2C0 pins"
94+
depends on BSP_USING_HW_I2C0
95+
config BSP_HW_I2C0_PIN_PA2_PA3
96+
bool "SCL=PA2, SDA=PA3"
97+
config BSP_HW_I2C0_PIN_PA15_PC8
98+
bool "SCL=PA15, SDA=PC8"
99+
config BSP_HW_I2C0_PIN_PB0_PB1
100+
bool "SCL=PB0, SDA=PB1"
101+
config BSP_HW_I2C0_PIN_PB15_PA8
102+
bool "SCL=PB15, SDA=PA8"
103+
endchoice
104+
105+
# config i2c0 clock
106+
config BSP_HW_I2C0_CLK
107+
int "I2C0 clock frequency(KHz)"
108+
default 100
109+
depends on BSP_USING_HW_I2C0
110+
range 10 1000
111+
112+
config BSP_USING_HW_I2C1
113+
bool "Enable Hardware I2C1"
114+
default n
103115

116+
# config i2c1 pins
117+
choice
118+
prompt "Select I2C1 pins"
119+
depends on BSP_USING_HW_I2C1
120+
config BSP_HW_I2C1_PIN_PA6_PA7
121+
bool "SCL=PA6, SDA=PA7"
122+
config BSP_HW_I2C1_PIN_PA13_PA14
123+
bool "SCL=PA13, SDA=PA14"
124+
config BSP_HW_I2C1_PIN_PA15_PC8
125+
bool "SCL=PA15, SDA=PC8"
126+
config BSP_HW_I2C1_PIN_PB12_PB13
127+
bool "SCL=PB12, SDA=PB13"
128+
config BSP_HW_I2C1_PIN_PB15_PA8
129+
bool "SCL=PB15, SDA=PA8"
130+
endchoice
131+
132+
# config i2c1 clock
133+
config BSP_HW_I2C1_CLK
134+
int "I2C1 clock frequency(KHz)"
135+
default 100
136+
depends on BSP_USING_HW_I2C1
137+
range 10 1000
138+
endif
104139

105140
source "$(BSP_DIR)/../libraries/gd32_drivers/Kconfig"
106141

bsp/gd32/risc-v/libraries/gd32_drivers/SConscript

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ if GetDepend(['RT_USING_SERIAL']):
2020
if GetDepend(['RT_USING_I2C', 'RT_USING_I2C_BITOPS']):
2121
if GetDepend('BSP_USING_I2C0') or GetDepend('BSP_USING_I2C1') or GetDepend('BSP_USING_I2C2') or GetDepend('BSP_USING_I2C3'):
2222
src += ['drv_soft_i2c.c']
23+
if GetDepend(['RT_USING_I2C', 'BSP_USING_HW_I2C']):
24+
if GetDepend('BSP_USING_HW_I2C0') or GetDepend('BSP_USING_HW_I2C1'):
25+
src += ['drv_i2c.c']
2326

2427
# add spi drivers.
2528
if GetDepend('RT_USING_SPI'):

0 commit comments

Comments
 (0)