添加 BSP_USING_WIFI 宏控制 (#8536)

This commit is contained in:
Shicheng Chu 2024-02-16 20:20:42 +08:00 committed by GitHub
parent abba40183e
commit 0c000b403f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 7 additions and 1 deletions

View File

@ -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;
}

View File

@ -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)