From 525d9d6f1115e254d4c3c6664a246095b68fff7f Mon Sep 17 00:00:00 2001 From: yl1185 <1182784652@qq.com> Date: Sun, 24 Apr 2022 15:21:35 +0800 Subject: [PATCH] connection/bluetooth/bluetooth verify 1.write the SConscript 2.modify the config for rt-thread --- .../Framework/connection/bluetooth/SConscript | 18 ++++++++++++++++++ .../connection/bluetooth/hc08/Kconfig | 6 +++++- .../connection/bluetooth/hc08/SConscript | 10 ++++++++++ 3 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 APP_Framework/Framework/connection/bluetooth/SConscript create mode 100644 APP_Framework/Framework/connection/bluetooth/hc08/SConscript diff --git a/APP_Framework/Framework/connection/bluetooth/SConscript b/APP_Framework/Framework/connection/bluetooth/SConscript new file mode 100644 index 000000000..3fecfb61c --- /dev/null +++ b/APP_Framework/Framework/connection/bluetooth/SConscript @@ -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') \ No newline at end of file diff --git a/APP_Framework/Framework/connection/bluetooth/hc08/Kconfig b/APP_Framework/Framework/connection/bluetooth/hc08/Kconfig index 49a84ed96..8b17e83dd 100644 --- a/APP_Framework/Framework/connection/bluetooth/hc08/Kconfig +++ b/APP_Framework/Framework/connection/bluetooth/hc08/Kconfig @@ -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 diff --git a/APP_Framework/Framework/connection/bluetooth/hc08/SConscript b/APP_Framework/Framework/connection/bluetooth/hc08/SConscript new file mode 100644 index 000000000..5f904f361 --- /dev/null +++ b/APP_Framework/Framework/connection/bluetooth/hc08/SConscript @@ -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') \ No newline at end of file