mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2026-09-23 04:04:15 +08:00
[bsp][gd32]:add gd32vw533xx pwm support
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
scons.args: &scons
|
||||
scons_arg:
|
||||
- '--strict'
|
||||
|
||||
# ------ component CI ------
|
||||
component.pwm:
|
||||
kconfig:
|
||||
- CONFIG_BSP_USING_PWM=y
|
||||
- CONFIG_BSP_USING_PWM0=y
|
||||
@@ -78,6 +78,30 @@ menu "On-chip Peripheral Drivers"
|
||||
default n
|
||||
endif
|
||||
|
||||
menuconfig BSP_USING_PWM
|
||||
bool "Enable PWM"
|
||||
default n
|
||||
select RT_USING_PWM
|
||||
if BSP_USING_PWM
|
||||
config BSP_USING_PWM0
|
||||
bool "Enable PWM0"
|
||||
default y
|
||||
config BSP_USING_PWM1
|
||||
bool "Enable PWM1"
|
||||
default n
|
||||
config BSP_USING_PWM2
|
||||
bool "Enable PWM2"
|
||||
default n
|
||||
config BSP_USING_PWM15
|
||||
bool "Enable PWM15"
|
||||
default n
|
||||
config BSP_USING_PWM16
|
||||
bool "Enable PWM16"
|
||||
default n
|
||||
endif
|
||||
|
||||
|
||||
|
||||
source "$(BSP_DIR)/../libraries/gd32_drivers/Kconfig"
|
||||
|
||||
endmenu
|
||||
|
||||
@@ -45,6 +45,10 @@ if GetDepend('RT_USING_CLOCK_TIME'):
|
||||
if GetDepend('RT_USING_ADC'):
|
||||
src += ['drv_adc.c']
|
||||
|
||||
# add pwm drivers.
|
||||
if GetDepend(['RT_USING_PWM', 'SOC_GD32VW553H']):
|
||||
src += ['drv_pwm.c']
|
||||
|
||||
path = [cwd]
|
||||
|
||||
group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path)
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user