[bsp][c3]: Add macro control to sconscript
This commit is contained in:
parent
53aa771aa5
commit
dfde6950df
@ -62,10 +62,15 @@ menu "On-chip Peripheral Drivers"
|
||||
select RT_USING_SERIAL_V1
|
||||
default y
|
||||
|
||||
config BSP_USING_I2C0
|
||||
bool "Enable I2C0"
|
||||
menuconfig BSP_USING_I2C
|
||||
bool "Enable I2C"
|
||||
default n
|
||||
select RT_USING_I2C
|
||||
default n
|
||||
if BSP_USING_I2C
|
||||
config BSP_USING_I2C0
|
||||
bool "Enable I2C0"
|
||||
default n
|
||||
endif
|
||||
|
||||
config BSP_USING_WIFI
|
||||
bool "Enable WIFI"
|
||||
@ -76,7 +81,7 @@ menu "On-chip Peripheral Drivers"
|
||||
bool "Enable BLE"
|
||||
default n
|
||||
|
||||
config BSP_USING_HWTIMER
|
||||
menuconfig BSP_USING_HWTIMER
|
||||
bool "Enable HWTIMER"
|
||||
select RT_USING_HWTIMER
|
||||
default n
|
||||
|
@ -2,10 +2,31 @@ import os
|
||||
from building import *
|
||||
|
||||
cwd = GetCurrentDir()
|
||||
src = Glob('*.c')
|
||||
src = ['board.c']
|
||||
|
||||
CPPPATH = [cwd]
|
||||
|
||||
if GetDepend('BSP_USING_GPIO'):
|
||||
src += ['drv_gpio.c']
|
||||
|
||||
if GetDepend('BSP_USING_UART'):
|
||||
src += ['drv_uart.c']
|
||||
|
||||
if GetDepend('BSP_USING_ADC'):
|
||||
src += ['drv_adc.c']
|
||||
|
||||
if GetDepend('BSP_USING_I2C'):
|
||||
src += ['drv_hw_i2c.c']
|
||||
|
||||
if GetDepend('BSP_USING_PWM'):
|
||||
src += ['drv_pwm.c']
|
||||
|
||||
if GetDepend('BSP_USING_HWTIMER'):
|
||||
src += ['drv_hwtimer.c']
|
||||
|
||||
if GetDepend('BSP_USING_WIFI'):
|
||||
src += ['drv_wifi.c']
|
||||
|
||||
group = DefineGroup('Drivers', src, depend = [''], CPPPATH = CPPPATH)
|
||||
|
||||
Return('group')
|
||||
|
Loading…
x
Reference in New Issue
Block a user