添加 BSP_USING_WIFI 宏控制 (#8536)
This commit is contained in:
parent
abba40183e
commit
0c000b403f
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
|
Loading…
Reference in New Issue