connection/bluetooth/bluetooth verify

1.write the SConscript
2.modify the config for rt-thread
This commit is contained in:
yl1185 2022-04-24 15:21:35 +08:00 committed by chunyexixiaoyu
parent ec446bb44c
commit 525d9d6f11
3 changed files with 33 additions and 1 deletions

View File

@ -0,0 +1,18 @@
import os
Import('RTT_ROOT')
from building import *
SOURCES = []
SOURCES = ['adapter_bluetooth.c'] + SOURCES
objs = []
cwd = GetCurrentDir()
path = [cwd]
group = DefineGroup('bluetooth', SOURCES, depend = [], CPPPATH = [cwd])
objs = objs + group
list = os.listdir(cwd)
for d in list:
path = os.path.join(cwd, d)
if os.path.isfile(os.path.join(path, 'SConscript')):
objs = objs + SConscript(os.path.join(path, 'SConscript'))
Return('objs')

View File

@ -36,5 +36,9 @@ if ADD_NUTTX_FETURES
endif
if ADD_RTTHREAD_FETURES
config ADAPTER_HC08_DRIVER
string "HC08 device uart driver path"
default "/dev/uart4"
config ADAPTER_HC08_WORK_ROLE
string "HC08 work role M(MASTER) or S(SLAVER)"
endif

View File

@ -0,0 +1,10 @@
from building import *
import os
cwd = GetCurrentDir()
src = []
if GetDepend(['ADAPTER_HC08']):
src += ['hc08.c']
group = DefineGroup('connection bluetooth hc08', src, depend = [], CPPPATH = [cwd])
Return('group')