From 0c000b403f73834bb5b2792b96b854bdeadab128 Mon Sep 17 00:00:00 2001 From: Shicheng Chu <1468559561@qq.com> Date: Fri, 16 Feb 2024 20:20:42 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=20BSP=5FUSING=5FWIFI=20?= =?UTF-8?q?=E5=AE=8F=E6=8E=A7=E5=88=B6=20(#8536)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bsp/bouffalo_lab/bl808/m0/applications/main.c | 2 ++ bsp/bouffalo_lab/bl808/m0/board/wlan_port/SConscript | 6 +++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/bsp/bouffalo_lab/bl808/m0/applications/main.c b/bsp/bouffalo_lab/bl808/m0/applications/main.c index 8d315ddf8a..4486dc3281 100644 --- a/bsp/bouffalo_lab/bl808/m0/applications/main.c +++ b/bsp/bouffalo_lab/bl808/m0/applications/main.c @@ -17,9 +17,11 @@ int main(void) { rt_kprintf("Hello, RISC-V!\n"); +#ifdef BSP_USING_WIFI /* set wifi work mode */ rt_wlan_set_mode(RT_WLAN_DEVICE_STA_NAME, RT_WLAN_STATION); rt_wlan_set_mode(RT_WLAN_DEVICE_AP_NAME, RT_WLAN_AP); +#endif /* BSP_USING_WIFI */ return 0; } diff --git a/bsp/bouffalo_lab/bl808/m0/board/wlan_port/SConscript b/bsp/bouffalo_lab/bl808/m0/board/wlan_port/SConscript index 095e5be9dd..889d572d34 100755 --- a/bsp/bouffalo_lab/bl808/m0/board/wlan_port/SConscript +++ b/bsp/bouffalo_lab/bl808/m0/board/wlan_port/SConscript @@ -1,7 +1,11 @@ from building import * cwd = GetCurrentDir() -src = Glob('*.c') + Glob('*.cpp') +src = [] + +if GetDepend('BSP_USING_WIFI'): + src += ['drv_wifi.c'] + CPPPATH = [cwd] group = DefineGroup('drv_wifi', src, depend = [''], CPPPATH = CPPPATH)