Skip to content

Commit 4994dd9

Browse files
committed
[bsp][gd32]:add gd32vw533xx pwm support
1 parent f556099 commit 4994dd9

File tree

4 files changed

+619
-0
lines changed

4 files changed

+619
-0
lines changed
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
scons.args: &scons
2+
scons_arg:
3+
- '--strict'
4+
5+
# ------ component CI ------
6+
component.pwm:
7+
kconfig:
8+
- CONFIG_BSP_USING_PWM=y
9+
- CONFIG_BSP_USING_PWM0=y

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

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,30 @@ menu "On-chip Peripheral Drivers"
7878
default n
7979
endif
8080

81+
menuconfig BSP_USING_PWM
82+
bool "Enable PWM"
83+
default n
84+
select RT_USING_PWM
85+
if BSP_USING_PWM
86+
config BSP_USING_PWM0
87+
bool "Enable PWM0"
88+
default n
89+
config BSP_USING_PWM1
90+
bool "Enable PWM1"
91+
default n
92+
config BSP_USING_PWM2
93+
bool "Enable PWM2"
94+
default n
95+
config BSP_USING_PWM15
96+
bool "Enable PWM15"
97+
default n
98+
config BSP_USING_PWM16
99+
bool "Enable PWM16"
100+
default n
101+
endif
102+
103+
104+
81105
source "$(BSP_DIR)/../libraries/gd32_drivers/Kconfig"
82106

83107
endmenu

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,10 @@ if GetDepend('RT_USING_HWTIMER'):
4545
if GetDepend('RT_USING_ADC'):
4646
src += ['drv_adc.c']
4747

48+
# add pwm drivers.
49+
if GetDepend(['RT_USING_PWM', 'SOC_GD32VW553H']):
50+
src += ['drv_pwm.c']
51+
4852
path = [cwd]
4953

5054
group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path)

0 commit comments

Comments
 (0)