File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -49,10 +49,6 @@ menu "Peripheral Drivers"
4949 select SAL_USING_WINSOCK
5050 default y
5151
52- config SAL_USING_WINSOCK
53- bool "Docking with Windows socket (winsock)"
54- default n
55-
5652 config BSP_USING_LVGL
5753 bool "Enable LVGL for LCD"
5854 select PKG_USING_LVGL
Original file line number Diff line number Diff line change 4040
4141if GetDepend ('BSP_USING_RTC' ) == False :
4242 SrcRemove (src , 'drv_rtc.c' )
43+ if GetDepend ('BSP_USING_SOCKET' ) == False :
44+ SrcRemove (src , 'drv_win_eth.c' )
4345if GetDepend ('RT_USING_DFS' ) == False or GetDepend ('RT_USING_DFS_ELMFAT' ) == False :
4446 SrcRemove (src , 'sd_sim.c' )
4547if GetDepend ('RT_USING_DFS' ) == False or GetDepend ('RT_USING_MTD_NAND' ) == False :
@@ -50,8 +52,6 @@ if GetDepend('RT_USING_DFS') == False or GetDepend('RT_USING_DFS_WINSHAREDIR') =
5052 SrcRemove (src , 'dfs_win32.c' )
5153if GetDepend ('RT_USING_DFS' ) == False or GetDepend ('RT_USING_MODULE' ) == False :
5254 SrcRemove (src , ['module_win32.c' ])
53- if GetDepend ('SAL_USING_WINSOCK' ) == False :
54- SrcRemove (src , 'af_inet_winsock.c' )
5555if sys .platform [0 :5 ]== "linux" : #check whether under linux
5656 SrcRemove (src , ['module_win32.c' , 'dfs_win32.c' ])
5757
Original file line number Diff line number Diff line change @@ -21,6 +21,10 @@ if RT_USING_SAL
2121 bool "Docking with AT commands stack"
2222 default n
2323
24+ config SAL_USING_WINSOCK
25+ bool "Docking with Windows socket (winsock)"
26+ default n
27+
2428 config SAL_USING_TLS
2529 bool "Docking with MbedTLS protocol"
2630 default n
Original file line number Diff line number Diff line change @@ -10,7 +10,9 @@ src += ['socket/net_netdb.c']
1010CPPPATH = [cwd + '/include' ]
1111CPPPATH += [cwd + '/include/socket' ]
1212
13- if GetDepend ('SAL_USING_LWIP' ) or GetDepend ('SAL_USING_AT' ):
13+ if GetDepend ('SAL_USING_LWIP' ) or \
14+ GetDepend ('SAL_USING_AT' ) or \
15+ GetDepend ('SAL_USING_WINSOCK' ):
1416 CPPPATH += [cwd + '/impl' ]
1517
1618if GetDepend ('SAL_USING_LWIP' ):
@@ -19,6 +21,9 @@ if GetDepend('SAL_USING_LWIP'):
1921if GetDepend ('SAL_USING_AT' ):
2022 src += ['impl/af_inet_at.c' ]
2123
24+ if GetDepend ('SAL_USING_WINSOCK' ):
25+ src += ['impl/af_inet_winsock.c' ]
26+
2227if GetDepend ('SAL_USING_TLS' ):
2328 src += ['impl/proto_mbedtls.c' ]
2429
Original file line number Diff line number Diff line change 1717extern "C" {
1818#endif
1919
20- #ifdef SAL_USING_LWIP
21-
2220/* Set lwIP network interface device protocol family information */
21+ #ifdef SAL_USING_LWIP
2322int sal_lwip_netdev_set_pf_info (struct netdev * netdev );
24-
2523#endif /* SAL_USING_LWIP */
2624
27- #ifdef SAL_USING_AT
28-
2925/* Set AT network interface device protocol family information */
26+ #ifdef SAL_USING_AT
3027int sal_at_netdev_set_pf_info (struct netdev * netdev );
31-
3228#endif /* SAL_USING_AT */
3329
30+ /* Set lwIP network interface device protocol family information */
31+ #ifdef SAL_USING_WINSOCK
32+ int sal_win_netdev_set_pf_info (struct netdev * netdev )
33+ #endif /* SAL_USING_WINSOCK */
34+
3435#ifdef __cplusplus
3536}
3637#endif
Original file line number Diff line number Diff line change 88 * 2022-05-26 xiangxistu first version
99 */
1010
11+ /* Do NOT include sys/time.h in this file */
1112#include <WinSock2.h>
1213#include <rtthread.h>
1314#include <sal_low_lvl.h>
You can’t perform that action at this time.
0 commit comments