Skip to content

Commit ae8dcee

Browse files
author
HaiLong Yang
committed
modules: hal_gigadevice: add usb support
This add usb support for hal_gigadevice. Signed-off-by: HaiLong Yang <[email protected]>
1 parent 5cb53ee commit ae8dcee

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

modules/hal_gigadevice/CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,10 @@ zephyr_include_directories(${gd32_std_dir}/include)
5757
zephyr_include_directories(${ZEPHYR_HAL_GIGADEVICE_MODULE_DIR}/include)
5858
zephyr_include_directories(${ZEPHYR_HAL_GIGADEVICE_MODULE_DIR}/common_include)
5959

60+
if (${CONFIG_GD32_USB_SUPPORT})
61+
zephyr_include_directories(${gd32_soc_dir}/usb_drivers/include)
62+
endif()
63+
6064
zephyr_library_sources(${gd32_soc_sys_dir}/source/system_${CONFIG_SOC_SERIES}.c)
6165

6266
zephyr_library_sources_ifdef(CONFIG_USE_GD32_ADC ${gd32_std_src_dir}/${CONFIG_SOC_SERIES}_adc.c)

modules/hal_gigadevice/Kconfig

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,11 @@ config GD32_DBG_SUPPORT
7979
This option makes allows using functions that access to
8080
DBG_CTL register such as dbg_periph_enable().
8181

82+
config GD32_USB_SUPPORT
83+
bool "USB driver support"
84+
help
85+
Enable this if usb driver is supported for certain gd32 soc.
86+
8287
config USE_GD32_ADC
8388
bool
8489
help

0 commit comments

Comments
 (0)