2024-01-28 16:05:52 +08:00
|
|
|
from building import *
|
|
|
|
|
|
|
|
cwd = GetCurrentDir()
|
2024-03-21 13:13:52 +08:00
|
|
|
src = Split('''
|
|
|
|
drv_uart.c
|
|
|
|
drv_por.c
|
|
|
|
''')
|
2024-01-28 16:05:52 +08:00
|
|
|
CPPDEFINES = []
|
|
|
|
|
|
|
|
CPPPATH = [cwd]
|
|
|
|
|
2024-01-29 09:13:21 +08:00
|
|
|
if GetDepend('BSP_USING_CV1800B') or GetDepend('BSP_USING_C906_LITTLE'):
|
2024-01-28 16:05:52 +08:00
|
|
|
CPPPATH += [cwd + r'/cv1800b']
|
|
|
|
|
2024-01-29 09:13:21 +08:00
|
|
|
if GetDepend('BSP_USING_CV1800B'):
|
|
|
|
src += ['drv_gpio.c']
|
|
|
|
|
2024-02-16 07:05:39 +08:00
|
|
|
if GetDepend('BSP_USING_I2C'):
|
|
|
|
src += ['drv_hw_i2c.c']
|
|
|
|
|
2024-02-28 00:04:31 +08:00
|
|
|
if GetDepend('BSP_USING_ADC'):
|
|
|
|
src += ['drv_adc.c']
|
|
|
|
|
2024-03-04 00:37:38 +08:00
|
|
|
if GetDepend('BSP_USING_WDT'):
|
|
|
|
src += ['drv_wdt.c']
|
|
|
|
|
2024-03-02 16:16:22 +08:00
|
|
|
if GetDepend('BSP_USING_PWM'):
|
|
|
|
src += ['drv_pwm.c']
|
|
|
|
CPPPATH += [cwd + r'/cv1800b/pwm']
|
2024-01-28 16:05:52 +08:00
|
|
|
CPPDEFINES += ['-DCONFIG_64BIT']
|
|
|
|
|
2024-03-08 06:18:53 +08:00
|
|
|
if GetDepend('BSP_USING_RTC'):
|
|
|
|
src += ['drv_rtc.c']
|
|
|
|
|
2024-01-28 16:05:52 +08:00
|
|
|
group = DefineGroup('drivers', src, depend = [''], CPPDEFINES = CPPDEFINES, CPPPATH = CPPPATH)
|
|
|
|
|
|
|
|
Return('group')
|