Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ if GetDepend(['RT_USING_WDT']):

if GetDepend(['RT_USING_SDIO']):
src += ['GD32F10x_standard_peripheral/Source/gd32f10x_sdio.c']
src += ['GD32F10x_standard_peripheral/Source/gd32f10x_dma.c']

path = [
cwd + '/CMSIS/GD/GD32F10x/Include',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ if GetDepend(['RT_USING_WDT']):

if GetDepend(['RT_USING_SDIO']):
src += ['GD32F20x_standard_peripheral/Source/gd32f20x_sdio.c']
src += ['GD32F20x_standard_peripheral/Source/gd32f20x_dma.c']

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dma这个文件是不是单独搞个宏来控制比较好,以后其他的驱动可能也会依赖这个文件吧。如果后面有LCD驱动也需要dma就容易重复添加了。

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

郭老师这个应该是scons的责任 如果驱动里使用到了dma和sdio,直接把这两个加进来没啥问题。scons里在汇总的时候去除重复文件即可,毕竟Python处理这个比强制用户处理方便多了


path = [
cwd + '/CMSIS/GD/GD32F20x/Include',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ if GetDepend(['RT_USING_WDT']):

if GetDepend(['RT_USING_SDIO']):
src += ['GD32F30x_standard_peripheral/Source/gd32f30x_sdio.c']
src += ['GD32F30x_standard_peripheral/Source/gd32f30x_dma.c']

path = [
cwd + '/CMSIS/GD/GD32F30x/Include',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ if GetDepend(['RT_USING_WDT']):

if GetDepend(['RT_USING_SDIO']):
src += ['GD32F4xx_standard_peripheral/Source/gd32f4xx_sdio.c']
src += ['GD32F4xx_standard_peripheral/Source/gd32f4xx_dma.c']

path = [
cwd + '/CMSIS/GD/GD32F4xx/Include',
Expand Down
4 changes: 4 additions & 0 deletions bsp/gd32/arm/libraries/gd32_drivers/SConscript
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ if GetDepend('RT_USING_HWTIMER'):
# add adc drivers.
if GetDepend('RT_USING_ADC'):
src += ['drv_adc.c']

# add sdio drivers.
if GetDepend('RT_USING_SDIO'):
src += ['drv_sdio.c']

path = [cwd]

Expand Down
27 changes: 27 additions & 0 deletions bsp/gd32/arm/libraries/gd32_drivers/drv_log.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
/*
* Copyright (c) 2006-2021, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
* Change Logs:
* Date Author Notes
* 2018-11-15 SummerGift first version
*/

/*
* NOTE: DO NOT include this file on the header file.
*/

#ifndef LOG_TAG
#define DBG_TAG "drv"
#else
#define DBG_TAG LOG_TAG
#endif /* LOG_TAG */

#ifdef DRV_DEBUG
#define DBG_LVL DBG_LOG
#else
#define DBG_LVL DBG_INFO
#endif /* DRV_DEBUG */

#include <rtdbg.h>
Loading