[sal] add draft for docking winsock
This commit is contained in:
parent
19abf927d2
commit
b793b6427a
|
@ -29,6 +29,11 @@ config RT_USING_DFS_WINSHAREDIR
|
|||
select RT_USING_POSIX_FS
|
||||
default n
|
||||
|
||||
config BSP_USING_SAL_WINSOCK
|
||||
bool "Enable Windows socket (winsock) with SAL"
|
||||
select RT_USING_SAL
|
||||
default n
|
||||
|
||||
config BSP_USING_LVGL
|
||||
bool "Enable LVGL for LCD"
|
||||
select PKG_USING_LVGL
|
||||
|
|
|
@ -43,14 +43,14 @@ struct timezone
|
|||
int tz_dsttime; /* type of dst correction */
|
||||
};
|
||||
|
||||
#if !defined(_TIMEVAL_DEFINED)
|
||||
#ifndef _TIMEVAL_DEFINED
|
||||
#define _TIMEVAL_DEFINED
|
||||
struct timeval
|
||||
{
|
||||
time_t tv_sec; /* seconds */
|
||||
suseconds_t tv_usec; /* and microseconds */
|
||||
};
|
||||
#endif /* !defined(_TIMEVAL_DEFINED) && !defined(_WIN32) */
|
||||
#endif /* _TIMEVAL_DEFINED */
|
||||
|
||||
#if defined(__ARMCC_VERSION) || defined(_WIN32) || (defined(__ICCARM__) && (__VER__ < 8010001))
|
||||
struct timespec
|
||||
|
|
|
@ -12,27 +12,28 @@ if RT_USING_SAL
|
|||
help
|
||||
The ability that check internet status is provided by RT-Thread.
|
||||
|
||||
if RT_USING_LWIP || AT_USING_SOCKET
|
||||
menu "Docking with protocol stacks"
|
||||
|
||||
menu "protocol stack implement"
|
||||
config SAL_USING_LWIP
|
||||
bool "Docking with lwIP stack"
|
||||
default y
|
||||
depends on RT_USING_LWIP
|
||||
|
||||
config SAL_USING_LWIP
|
||||
bool "Support lwIP stack"
|
||||
default y
|
||||
depends on RT_USING_LWIP
|
||||
config SAL_USING_AT
|
||||
bool "Docking with AT commands stack"
|
||||
default y
|
||||
depends on AT_USING_SOCKET
|
||||
|
||||
config SAL_USING_AT
|
||||
bool "Support AT Commands stack"
|
||||
default y
|
||||
depends on AT_USING_SOCKET
|
||||
config SAL_USING_WINSOCK
|
||||
bool "Docking with Windows socket (winsock)"
|
||||
default y
|
||||
depends on BSP_USING_SAL_WINSOCK
|
||||
|
||||
config SAL_USING_TLS
|
||||
bool "Support MbedTLS protocol"
|
||||
default y
|
||||
depends on PKG_USING_MBEDTLS
|
||||
endmenu
|
||||
|
||||
endif
|
||||
config SAL_USING_TLS
|
||||
bool "Docking with MbedTLS protocol"
|
||||
default y
|
||||
depends on PKG_USING_MBEDTLS
|
||||
endmenu
|
||||
|
||||
config SAL_USING_POSIX
|
||||
bool
|
||||
|
|
|
@ -11,16 +11,19 @@ CPPPATH = [cwd + '/include']
|
|||
CPPPATH += [cwd + '/include/socket']
|
||||
|
||||
if GetDepend('SAL_USING_LWIP'):
|
||||
src += Glob('impl/af_inet_lwip.c')
|
||||
src += Glob('docking/af_inet_lwip.c')
|
||||
|
||||
if GetDepend('SAL_USING_AT'):
|
||||
src += Glob('impl/af_inet_at.c')
|
||||
src += Glob('docking/af_inet_at.c')
|
||||
|
||||
if GetDepend('SAL_USING_LWIP') or GetDepend('SAL_USING_AT'):
|
||||
CPPPATH += [cwd + '/impl']
|
||||
CPPPATH += [cwd + '/docking']
|
||||
|
||||
if GetDepend('SAL_USING_WINSOCK'):
|
||||
src += Glob('docking/af_inet_winsock.c')
|
||||
|
||||
if GetDepend('SAL_USING_TLS'):
|
||||
src += Glob('impl/proto_mbedtls.c')
|
||||
src += Glob('docking/proto_mbedtls.c')
|
||||
|
||||
if GetDepend('SAL_USING_POSIX'):
|
||||
CPPPATH += [cwd + '/include/dfs_net']
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
/*
|
||||
* Copyright (c) 2006-2022, RT-Thread Development Team
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*
|
||||
* Change Logs:
|
||||
* Date Author Notes
|
||||
*/
|
||||
|
||||
#include <winsock.h>
|
||||
|
||||
/* Do NOT include sys/time.h in this file */
|
Loading…
Reference in New Issue