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)