Commit 2b8a718d authored by danicampora's avatar danicampora
Browse files

drivers: Update CC3100 driver library to SDK release version 1.1.0.

parent c292632b
......@@ -34,14 +34,16 @@
*
*/
#ifndef __DEVICE_H__
#define __DEVICE_H__
/*****************************************************************************/
/* Include files */
/*****************************************************************************/
#include "simplelink.h"
#ifndef __DEVICE_H__
#define __DEVICE_H__
#ifdef __cplusplus
extern "C" {
#endif
......@@ -79,6 +81,10 @@ extern "C" {
/* User supplied invalid parameter */
#define SL_INVALPARAM (-2003)
/* Failed to open interface */
#define SL_BAD_INTERFACE (-2004)
/* End of SL internal Error codes */
......@@ -171,6 +177,8 @@ typedef enum
#define SL_WLAN_CONNECTION_FAILED_EVENT (9)
/* SL_EVENT_CLASS_DEVICE user events */
#define SL_DEVICE_FATAL_ERROR_EVENT (1)
#define SL_DEVICE_ABORT_ERROR_EVENT (2)
/* SL_EVENT_CLASS_BSD user events */
#define SL_SOCKET_TX_FAILED_EVENT (1)
#define SL_SOCKET_ASYNC_EVENT (2)
......@@ -228,6 +236,8 @@ typedef enum
/* Structure/Enum declarations */
/*****************************************************************************/
#define ROLE_UNKNOWN_ERR (-1)
#ifdef SL_IF_TYPE_UART
typedef struct
{
......@@ -252,6 +262,14 @@ typedef struct
_u16 Padding;
}SlVersionFull;
typedef struct
{
_u32 AbortType;
_u32 AbortData;
}sl_DeviceReportAbort;
typedef struct
{
_i8 status;
......@@ -261,6 +279,7 @@ typedef struct
typedef union
{
sl_DeviceReport deviceEvent;
sl_DeviceReportAbort deviceReport;
} _SlDeviceEventData_u;
typedef struct
......@@ -376,7 +395,7 @@ _i16 sl_Start(const void* pIfHdl, _i8* pDevName, const P_INIT_CALLBACK pInitCal
\warning
*/
#if _SL_INCLUDE_FUNC(sl_Stop)
_i16 sl_Stop(_u16 timeout);
_i16 sl_Stop(const _u16 timeout);
#endif
......@@ -399,7 +418,7 @@ _i16 sl_Stop(_u16 timeout);
Setting device time and date example:
SlDateTime_t dateTime= {0};
dateTime.sl_tm_day = (_u32)23; // Day of month (DD format) range 1-13
dateTime.sl_tm_day = (_u32)23; // Day of month (DD format) range 1-31
dateTime.sl_tm_mon = (_u32)6; // Month (MM format) in the range of 1-12
dateTime.sl_tm_year = (_u32)2014; // Year (YYYY format)
dateTime.sl_tm_hour = (_u32)17; // Hours in the range of 0-23
......@@ -413,7 +432,7 @@ _i16 sl_Stop(_u16 timeout);
\endcode
*/
#if _SL_INCLUDE_FUNC(sl_DevSet)
_i32 sl_DevSet(_u8 DeviceSetId ,_u8 Option,_u8 ConfigLen, _u8 *pValues);
_i32 sl_DevSet(const _u8 DeviceSetId ,const _u8 Option,const _u8 ConfigLen,const _u8 *pValues);
#endif
/*!
......@@ -446,9 +465,11 @@ _i32 sl_DevSet(_u8 DeviceSetId ,_u8 Option,_u8 ConfigLen, _u8 *pValues);
_u8 pConfigOpt;
_u8 pConfigLen;
pConfigOpt = SL_EVENT_CLASS_WLAN;
pConfigLen = sizeof(_u32);
sl_DevGet(SL_DEVICE_STATUS,&pConfigOpt,&pConfigLen,(_u8 *)(&statusWlan));
Example for getting version:
SlVersionFull ver;
pConfigLen = sizeof(ver);
pConfigOpt = SL_DEVICE_GENERAL_VERSION;
sl_DevGet(SL_DEVICE_GENERAL_CONFIGURATION,&pConfigOpt,&pConfigLen,(_u8 *)(&ver));
printf("CHIP %d\nMAC 31.%d.%d.%d.%d\nPHY %d.%d.%d.%d\nNWP %d.%d.%d.%d\nROM %d\nHOST %d.%d.%d.%d\n",
......@@ -475,7 +496,7 @@ _i32 sl_DevSet(_u8 DeviceSetId ,_u8 Option,_u8 ConfigLen, _u8 *pValues);
\endcode
*/
#if _SL_INCLUDE_FUNC(sl_DevGet)
_i32 sl_DevGet(_u8 DeviceGetId, _u8 *pOption,_u8 *pConfigLen, _u8 *pValues);
_i32 sl_DevGet(const _u8 DeviceGetId,_u8 *pOption,_u8 *pConfigLen, _u8 *pValues);
#endif
......@@ -527,7 +548,7 @@ _i32 sl_DevGet(_u8 DeviceGetId, _u8 *pOption,_u8 *pConfigLen, _u8 *pValues);
\endcode
*/
#if _SL_INCLUDE_FUNC(sl_EventMaskSet)
_i16 sl_EventMaskSet(_u8 EventClass , _u32 Mask);
_i16 sl_EventMaskSet(const _u8 EventClass ,const _u32 Mask);
#endif
/*!
......@@ -567,7 +588,7 @@ _i16 sl_EventMaskSet(_u8 EventClass , _u32 Mask);
\endcode
*/
#if _SL_INCLUDE_FUNC(sl_EventMaskGet)
_i16 sl_EventMaskGet(_u8 EventClass, _u32 *pMask);
_i16 sl_EventMaskGet(const _u8 EventClass,_u32 *pMask);
#endif
......
......@@ -61,8 +61,8 @@ typedef struct
typedef struct
{
_u16 TxPayloadLen;
_u16 RxPayloadLen;
_u16 ActualRxPayloadLen;
_i16 RxPayloadLen;
_i16 ActualRxPayloadLen;
_u8 *pTxPayload;
_u8 *pRxPayload;
}_SlCmdExt_t;
......@@ -97,12 +97,20 @@ typedef enum
SOCKET_6,
SOCKET_7,
MAX_SOCKET_ENUM_IDX,
#ifndef SL_TINY_EXT
ACCEPT_ID = MAX_SOCKET_ENUM_IDX,
CONNECT_ID,
#else
CONNECT_ID = MAX_SOCKET_ENUM_IDX,
#endif
#ifndef SL_TINY_EXT
SELECT_ID,
#endif
GETHOSYBYNAME_ID,
#ifndef SL_TINY_EXT
GETHOSYBYSERVICE_ID,
PING_ID,
#endif
START_STOP_ID,
RECV_ID
}_SlActionID_e;
......@@ -166,21 +174,18 @@ typedef struct
_SlSyncObj_t CmdSyncObj;
_u8 IsCmdRespWaited;
_SlFlowContCB_t FlowContCB;
_SlFlowContCB_t FlowContCB;
_u8 TxSeqNum;
_volatile _u8 RxIrqCnt;
_u8 RxDoneCnt;
_u8 SocketNonBlocking;
_u8 SocketTXFailure;
_u8 RelayFlagsViaRxPayload;
/* for stack reduction the parameters are globals */
_SlFunctionParams_t FunctionParams;
_u8 ActionIndex;
}_SlDriverCb_t;
extern _volatile _u8 RxIrqCnt;
extern _SlDriverCb_t* g_pCB;
extern P_SL_DEV_PING_CALLBACK pPingCallBackFunc;
......@@ -195,25 +200,47 @@ extern _SlReturnVal_t _SlDrvCmdOp(_SlCmdCtrl_t *pCmdCtrl , void* pTxRxDescBuff
extern _SlReturnVal_t _SlDrvCmdSend(_SlCmdCtrl_t *pCmdCtrl , void* pTxRxDescBuff , _SlCmdExt_t* pCmdExt);
extern _SlReturnVal_t _SlDrvDataReadOp(_SlSd_t Sd, _SlCmdCtrl_t *pCmdCtrl , void* pTxRxDescBuff , _SlCmdExt_t* pCmdExt);
extern _SlReturnVal_t _SlDrvDataWriteOp(_SlSd_t Sd, _SlCmdCtrl_t *pCmdCtrl , void* pTxRxDescBuff , _SlCmdExt_t* pCmdExt);
extern _i16 _SlDrvBasicCmd(_SlOpcode_t Opcode);
extern void _sl_HandleAsync_InitComplete(void *pVoidBuf);
extern void _sl_HandleAsync_Connect(void *pVoidBuf);
#ifndef SL_TINY_EXT
extern _i16 _SlDrvBasicCmd(_SlOpcode_t Opcode);
extern void _sl_HandleAsync_Accept(void *pVoidBuf);
extern void _sl_HandleAsync_DnsGetHostByService(void *pVoidBuf);
extern void _sl_HandleAsync_Select(void *pVoidBuf);
#endif
extern void _sl_HandleAsync_DnsGetHostByName(void *pVoidBuf);
extern void _sl_HandleAsync_DnsGetHostByService(void *pVoidBuf);
extern void _sl_HandleAsync_DnsGetHostByAddr(void *pVoidBuf);
extern void _sl_HandleAsync_PingResponse(void *pVoidBuf);
extern void _SlDrvNetAppEventHandler(void *pArgs);
extern void _SlDrvDeviceEventHandler(void *pArgs);
extern void _SlDrvNetAppEventHandler(void* pArgs);
extern void _SlDrvDeviceEventHandler(void* pArgs);
extern void _sl_HandleAsync_Stop(void *pVoidBuf);
extern _i16 _SlDrvWaitForPoolObj(_u32 ActionID, _u8 SocketID);
extern _u8 _SlDrvWaitForPoolObj(_u8 ActionID, _u8 SocketID);
extern void _SlDrvReleasePoolObj(_u8 pObj);
extern void _SlDrvObjInit(void);
extern _u16 _SlDrvAlignSize(_u16 msgLen);
extern _u8 _SlDrvProtectAsyncRespSetting(_u8 *pAsyncRsp, _u8 ActionID, _u8 SocketID);
extern void _SlDrvSyncObjWaitForever(_SlSyncObj_t *pSyncObj);
extern void _SlDrvSyncObjSignal(_SlSyncObj_t *pSyncObj);
extern void _SlDrvObjLock(_SlLockObj_t *pLockObj, _SlTime_t Timeout);
extern void _SlDrvObjLockWaitForever(_SlLockObj_t *pLockObj);
extern void _SlDrvProtectionObjLockWaitForever();
extern void _SlDrvObjUnLock(_SlLockObj_t *pLockObj);
extern void _SlDrvProtectionObjUnLock();
extern void _SlDrvMemZero(void* Addr, _u16 size);
extern void _SlDrvResetCmdExt(_SlCmdExt_t* pCmdExt);
#define _SL_PROTOCOL_ALIGN_SIZE(msgLen) (((msgLen)+3) & (~3))
#define _SL_IS_PROTOCOL_ALIGNED_SIZE(msgLen) (!((msgLen) & 3))
#define _SL_PROTOCOL_CALC_LEN(pCmdCtrl,pCmdExt) ((pCmdExt) ? \
(_SL_PROTOCOL_ALIGN_SIZE(pCmdCtrl->TxDescLen) + _SL_PROTOCOL_ALIGN_SIZE(pCmdExt->TxPayloadLen)) : \
(_SL_PROTOCOL_ALIGN_SIZE(pCmdCtrl->TxDescLen)))
......
......@@ -33,15 +33,17 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
#ifndef __FS_H__
#define __FS_H__
/*****************************************************************************/
/* Include files */
/*****************************************************************************/
#include "simplelink.h"
#ifndef __FS_H__
#define __FS_H__
#ifdef __cplusplus
extern "C" {
......@@ -180,7 +182,7 @@ typedef enum
_FS_FILE_OPEN_FLAG_NO_SIGNATURE_TEST = 0x4, /* Relevant to secure file only */
_FS_FILE_OPEN_FLAG_STATIC = 0x8, /* Relevant to secure file only */
_FS_FILE_OPEN_FLAG_VENDOR = 0x10, /* Relevant to secure file only */
_FS_FILE_PUBLIC_WRITE = 0x20, /* Relevant to secure file only, the file can be opened for write without Token */
_FS_FILE_PUBLIC_WRITE= 0x20, /* Relevant to secure file only, the file can be opened for write without Token */
_FS_FILE_PUBLIC_READ = 0x40 /* Relevant to secure file only, the file can be opened for read without Token */
}SlFileOpenFlags_e;
......@@ -256,7 +258,7 @@ _u32 _sl_GetCreateFsMode(_u32 maxSizeInBytes,_u32 accessFlags);
\endcode
*/
#if _SL_INCLUDE_FUNC(sl_FsOpen)
_i32 sl_FsOpen(_u8 *pFileName,_u32 AccessModeAndMaxSize,_u32 *pToken,_i32 *pFileHandle);
_i32 sl_FsOpen(const _u8 *pFileName,const _u32 AccessModeAndMaxSize,_u32 *pToken,_i32 *pFileHandle);
#endif
/*!
......@@ -279,7 +281,7 @@ _i32 sl_FsOpen(_u8 *pFileName,_u32 AccessModeAndMaxSize,_u32 *pToken,_i32 *pFile
\endcode
*/
#if _SL_INCLUDE_FUNC(sl_FsClose)
_i16 sl_FsClose(_i32 FileHdl,_u8* pCeritificateFileName,_u8* pSignature,_u32 SignatureLen);
_i16 sl_FsClose(const _i32 FileHdl,const _u8* pCeritificateFileName,const _u8* pSignature,const _u32 SignatureLen);
#endif
/*!
......@@ -301,7 +303,7 @@ _i16 sl_FsClose(_i32 FileHdl,_u8* pCeritificateFileName,_u8* pSignature,_u32 Sig
\endcode
*/
#if _SL_INCLUDE_FUNC(sl_FsRead)
_i32 sl_FsRead(_i32 FileHdl,_u32 Offset ,_u8* pData,_u32 Len);
_i32 sl_FsRead(const _i32 FileHdl,_u32 Offset ,_u8* pData,_u32 Len);
#endif
/*!
......@@ -323,7 +325,7 @@ _i32 sl_FsRead(_i32 FileHdl,_u32 Offset ,_u8* pData,_u32 Len);
\endcode
*/
#if _SL_INCLUDE_FUNC(sl_FsWrite)
_i32 sl_FsWrite(_i32 FileHdl,_u32 Offset,_u8* pData,_u32 Len);
_i32 sl_FsWrite(const _i32 FileHdl,_u32 Offset,_u8* pData,_u32 Len);
#endif
/*!
......@@ -344,7 +346,7 @@ _i32 sl_FsWrite(_i32 FileHdl,_u32 Offset,_u8* pData,_u32 Len);
\endcode
*/
#if _SL_INCLUDE_FUNC(sl_FsGetInfo)
_i16 sl_FsGetInfo(_u8 *pFileName,_u32 Token,SlFsFileInfo_t* pFsFileInfo);
_i16 sl_FsGetInfo(const _u8 *pFileName,const _u32 Token,SlFsFileInfo_t* pFsFileInfo);
#endif
/*!
......@@ -363,7 +365,7 @@ _i16 sl_FsGetInfo(_u8 *pFileName,_u32 Token,SlFsFileInfo_t* pFsFileInfo);
\endcode
*/
#if _SL_INCLUDE_FUNC(sl_FsDel)
_i16 sl_FsDel(_u8 *pFileName,_u32 Token);
_i16 sl_FsDel(const _u8 *pFileName,const _u32 Token);
#endif
/*!
......
......@@ -34,15 +34,17 @@
*
*/
#ifndef __NETAPP_H__
#define __NETAPP_H__
/*****************************************************************************/
/* Include files */
/*****************************************************************************/
#include "simplelink.h"
#ifndef __NETAPP_H__
#define __NETAPP_H__
#ifdef __cplusplus
extern "C" {
......@@ -356,7 +358,7 @@ typedef void (*P_SL_DEV_PING_CALLBACK)(SlPingReport_t*);
\endcode
*/
#if _SL_INCLUDE_FUNC(sl_NetAppStart)
_i16 sl_NetAppStart(_u32 AppBitMap);
_i16 sl_NetAppStart(const _u32 AppBitMap);
#endif
/*!
\brief Stops a network application
......@@ -382,7 +384,7 @@ _i16 sl_NetAppStart(_u32 AppBitMap);
\endcode
*/
#if _SL_INCLUDE_FUNC(sl_NetAppStop)
_i16 sl_NetAppStop(_u32 AppBitMap);
_i16 sl_NetAppStop(const _u32 AppBitMap);
#endif
/*!
......@@ -417,6 +419,8 @@ _i16 sl_NetAppStop(_u32 AppBitMap);
In this case, MAX_CONCURRENT_ACTIONS can be increased (result in memory increase) or try
again later to issue the command.
\warning
In case an IP address in a string format is set as input, without any prefix (e.g. "1.2.3.4") the device will not
try to access the DNS and it will return the input address on the 'out_ip_addr' field
\par Example:
\code
_u32 DestinationIP;
......@@ -430,7 +434,7 @@ _i16 sl_NetAppStop(_u32 AppBitMap);
\endcode
*/
#if _SL_INCLUDE_FUNC(sl_NetAppDnsGetHostByName)
_i16 sl_NetAppDnsGetHostByName(_i8 * hostname, _u16 usNameLen, _u32* out_ip_addr,_u8 family );
_i16 sl_NetAppDnsGetHostByName(_i8 * hostname,const _u16 usNameLen, _u32* out_ip_addr,const _u8 family );
#endif
/*!
......@@ -490,8 +494,8 @@ _i16 sl_NetAppDnsGetHostByName(_i8 * hostname, _u16 usNameLen, _u32* out_ip_add
*/
#if _SL_INCLUDE_FUNC(sl_NetAppDnsGetHostByService)
_i32 sl_NetAppDnsGetHostByService(_i8 *pServiceName, /* string containing all (or only part): name + subtype + service */
_u8 ServiceLen,
_u8 Family, /* 4-IPv4 , 16-IPv6 */
const _u8 ServiceLen,
const _u8 Family, /* 4-IPv4 , 16-IPv6 */
_u32 pAddr[],
_u32 *pPort,
_u16 *pTextLen, /* in: max len , out: actual len */
......@@ -549,11 +553,11 @@ _i32 sl_NetAppDnsGetHostByService(_i8 *pServiceName, /* string containing all
*/
#if _SL_INCLUDE_FUNC(sl_NetAppGetServiceList)
_i16 sl_NetAppGetServiceList(_u8 IndexOffest,
_u8 MaxServiceCount,
_u8 Flags,
_i8 *pBuffer,
_u32 RxBufferLength
_i16 sl_NetAppGetServiceList(const _u8 IndexOffest,
const _u8 MaxServiceCount,
const _u8 Flags,
_i8 *pBuffer,
const _u32 RxBufferLength
);
#endif
......@@ -582,7 +586,7 @@ _i16 sl_NetAppGetServiceList(_u8 IndexOffest,
The size of the service length should be smaller than 255.
*/
#if _SL_INCLUDE_FUNC(sl_NetAppMDNSUnRegisterService)
_i16 sl_NetAppMDNSUnRegisterService(const _i8 *pServiceName,_u8 ServiceNameLen);
_i16 sl_NetAppMDNSUnRegisterService(const _i8 *pServiceName,const _u8 ServiceNameLen);
#endif
/*!
......@@ -651,12 +655,12 @@ _i16 sl_NetAppMDNSUnRegisterService(const _i8 *pServiceName,_u8 ServiceNameLen);
*/
#if _SL_INCLUDE_FUNC(sl_NetAppMDNSRegisterService)
_i16 sl_NetAppMDNSRegisterService( const _i8* pServiceName,
_u8 ServiceNameLen,
const _u8 ServiceNameLen,
const _i8* pText,
_u8 TextLen,
_u16 Port,
_u32 TTL,
_u32 Options);
const _u8 TextLen,
const _u16 Port,
const _u32 TTL,
_u32 Options);
#endif
/*!
......@@ -720,7 +724,7 @@ _i16 sl_NetAppMDNSRegisterService( const _i8* pServiceName,
\endcode
*/
#if _SL_INCLUDE_FUNC(sl_NetAppPingStart)
_i16 sl_NetAppPingStart(SlPingStartCommand_t* pPingParams,_u8 family,SlPingReport_t *pReport,const P_SL_DEV_PING_CALLBACK pPingCallback);
_i16 sl_NetAppPingStart(const SlPingStartCommand_t* pPingParams,const _u8 family,SlPingReport_t *pReport,const P_SL_DEV_PING_CALLBACK pPingCallback);
#endif
/*!
......@@ -732,10 +736,27 @@ _i16 sl_NetAppPingStart(SlPingStartCommand_t* pPingParams,_u8 family,SlPingRepor
\param[in] AppId Application id, could be one of the following: \n
- SL_NET_APP_HTTP_SERVER_ID
- SL_NET_APP_DHCP_SERVER_ID
- SL_NET_APP_DHCP_SERVER_ID
- SL_NET_APP_MDNS_ID
- SL_NET_APP_DEVICE_CONFIG_ID
\param[in] SetOptions set option, could be one of the following: \n
NETAPP_SET_BASIC_OPT
- SL_NET_APP_DHCP_SERVER_ID
- NETAPP_SET_DHCP_SRV_BASIC_OPT
- SL_NET_APP_HTTP_SERVER_ID
- NETAPP_SET_GET_HTTP_OPT_PORT_NUMBER
- NETAPP_SET_GET_HTTP_OPT_AUTH_CHECK
- NETAPP_SET_GET_HTTP_OPT_AUTH_NAME
- NETAPP_SET_GET_HTTP_OPT_AUTH_PASSWORD
- NETAPP_SET_GET_HTTP_OPT_AUTH_REALM
- NETAPP_SET_GET_HTTP_OPT_ROM_PAGES_ACCESS
- SL_NET_APP_MDNS_ID
- NETAPP_SET_GET_MDNS_CONT_QUERY_OPT
- NETAPP_SET_GET_MDNS_QEVETN_MASK_OPT
- NETAPP_SET_GET_MDNS_TIMING_PARAMS_OPT
- SL_NET_APP_DEVICE_CONFIG_ID
- NETAPP_SET_GET_DEV_CONF_OPT_DEVICE_URN
- NETAPP_SET_GET_DEV_CONF_OPT_DOMAIN_NAME
\param[in] OptionLen option structure length
......@@ -770,7 +791,7 @@ _i16 sl_NetAppPingStart(SlPingStartCommand_t* pPingParams,_u8 family,SlPingRepor
*/
#if _SL_INCLUDE_FUNC(sl_NetAppSet)
_i32 sl_NetAppSet(_u8 AppId ,_u8 Option,_u8 OptionLen, _u8 *pOptionValue);
_i32 sl_NetAppSet(const _u8 AppId ,const _u8 Option,const _u8 OptionLen,const _u8 *pOptionValue);
#endif
/*!
......@@ -782,9 +803,27 @@ _i32 sl_NetAppSet(_u8 AppId ,_u8 Option,_u8 OptionLen, _u8 *pOptionValue);
\param[in] AppId Application id, could be one of the following: \n
- SL_NET_APP_HTTP_SERVER_ID
- SL_NET_APP_DHCP_SERVER_ID
- SL_NET_APP_MDNS_ID
- SL_NET_APP_DEVICE_CONFIG_ID
\param[in] SetOptions set option, could be one of the following: \n
- SL_NET_APP_DHCP_SERVER_ID
- NETAPP_SET_DHCP_SRV_BASIC_OPT
- SL_NET_APP_HTTP_SERVER_ID
- NETAPP_SET_GET_HTTP_OPT_PORT_NUMBER
- NETAPP_SET_GET_HTTP_OPT_AUTH_CHECK
- NETAPP_SET_GET_HTTP_OPT_AUTH_NAME
- NETAPP_SET_GET_HTTP_OPT_AUTH_PASSWORD
- NETAPP_SET_GET_HTTP_OPT_AUTH_REALM
- NETAPP_SET_GET_HTTP_OPT_ROM_PAGES_ACCESS
- SL_NET_APP_MDNS_ID
- NETAPP_SET_GET_MDNS_CONT_QUERY_OPT
- NETAPP_SET_GET_MDNS_QEVETN_MASK_OPT
- NETAPP_SET_GET_MDNS_TIMING_PARAMS_OPT
- SL_NET_APP_DEVICE_CONFIG_ID
- NETAPP_SET_GET_DEV_CONF_OPT_DEVICE_URN
- NETAPP_SET_GET_DEV_CONF_OPT_DOMAIN_NAME
\param[in] Options Get option, could be one of the following: \n
NETAPP_SET_BASIC_OPT
\param[in] OptionLen The length of the allocated memory as input, when the
function complete, the value of this parameter would be
......@@ -824,7 +863,7 @@ _i32 sl_NetAppSet(_u8 AppId ,_u8 Option,_u8 OptionLen, _u8 *pOptionValue);
\endcode
*/
#if _SL_INCLUDE_FUNC(sl_NetAppGet)
_i32 sl_NetAppGet(_u8 AppId, _u8 Option,_u8 *pOptionLen, _u8 *pOptionValue);
_i32 sl_NetAppGet(const _u8 AppId,const _u8 Option,_u8 *pOptionLen, _u8 *pOptionValue);
#endif
......
......@@ -33,15 +33,17 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
#ifndef __NETCFG_H__
#define __NETCFG_H__
/*****************************************************************************/
/* Include files */
/*****************************************************************************/
#include "simplelink.h"
#ifndef __NETCFG_H__
#define __NETCFG_H__
#ifdef __cplusplus
extern "C" {
#endif
......@@ -182,7 +184,7 @@ typedef struct
*/
#if _SL_INCLUDE_FUNC(sl_NetCfgSet)
_i32 sl_NetCfgSet(_u8 ConfigId ,_u8 ConfigOpt, _u8 ConfigLen, _u8 *pValues);
_i32 sl_NetCfgSet(const _u8 ConfigId,const _u8 ConfigOpt,const _u8 ConfigLen,const _u8 *pValues);
#endif
......@@ -262,7 +264,7 @@ _i32 sl_NetCfgSet(_u8 ConfigId ,_u8 ConfigOpt, _u8 ConfigLen, _u8 *pValues);
*/
#if _SL_INCLUDE_FUNC(sl_NetCfgGet)
_i32 sl_NetCfgGet(_u8 ConfigId ,_u8 *pConfigOpt, _u8 *pConfigLen, _u8 *pValues);
_i32 sl_NetCfgGet(const _u8 ConfigId ,_u8 *pConfigOpt, _u8 *pConfigLen, _u8 *pValues);
#endif
/*!
......
......@@ -55,7 +55,7 @@ extern "C" {
#define NONOS_WAIT_FOREVER 0xFF
#define NONOS_NO_WAIT 0x01
#define NONOS_NO_WAIT 0x00
#define NONOS_RET_OK (0)
#define NONOS_RET_ERR (0xFF)
......
......@@ -168,25 +168,25 @@ extern "C" {
#define _SL_INCLUDE_FUNC(Name) (_SL_INC_##Name)
/* Driver */
#define _SL_INC_sl_NetAppStart __nap
#define _SL_INC_sl_NetAppStart __nap__ext
#define _SL_INC_sl_NetAppStop __nap__ext
#define _SL_INC_sl_NetAppStop __nap
#define _SL_INC_sl_NetAppDnsGetHostByName __nap__clt
#define _SL_INC_sl_NetAppDnsGetHostByName __nap__clt
#define _SL_INC_sl_NetAppDnsGetHostByService __nap__clt
#define _SL_INC_sl_NetAppMDNSRegisterService __nap__clt
#define _SL_INC_sl_NetAppMDNSUnRegisterService __nap__clt
#define _SL_INC_sl_NetAppMDNSRegisterUnregisterService __nap__clt
#define _SL_INC_sl_NetAppGetServiceList __nap__clt
#define _SL_INC_sl_NetAppDnsGetHostByService __nap__ext
#define _SL_INC_sl_NetAppMDNSRegisterService __nap__ext
#define _SL_INC_sl_NetAppMDNSUnRegisterService __nap__ext
#define _SL_INC_sl_NetAppMDNSRegisterUnregisterService __nap__ext
#define _SL_INC_sl_NetAppGetServiceList __nap__ext
#define _SL_INC_sl_DnsGetHostByAddr __nap__ext
#define _SL_INC_sl_NetAppPingStart __nap__ext
#define _SL_INC_sl_NetAppPingReport __nap__ext
#define _SL_INC_sl_NetAppSet __nap__ext
#define _SL_INC_sl_NetAppGet __nap__ext
#define _SL_INC_sl_NetAppPingStart __nap
#define _SL_INC_sl_NetAppPingReport __nap
/* FS */
#define _SL_INC_sl_FsOpen __nvm
......@@ -210,14 +210,11 @@ extern "C" {
#define _SL_INC_sl_NetCfgSet __ncg
#define _SL_INC_sl_NetAppSet __nap
#define _SL_INC_sl_NetAppGet __nap
/* socket */
#define _SL_INC_sl_Socket __sck
#define _SL_INC_sl_Close __sck__ext
#define _SL_INC_sl_Close __sck
#define _SL_INC_sl_Accept __sck__srv
......@@ -306,7 +303,7 @@ extern "C" {
#define _SL_INC_sl_StatusGet __dev
#ifdef SL_IF_TYPE_UART
#define _SL_INC_sl_UartSetMode __dev
#define _SL_INC_sl_UartSetMode __dev__ext
#endif
#define _SL_INC_sl_EventMaskGet __dev__ext
......
......@@ -149,6 +149,7 @@ typedef struct
#define SL_FLAGS_MASK (0xF)
#define SL_OPCODE_DEVICE_INITCOMPLETE 0x0008
#define SL_OPCODE_DEVICE_ABORT 0x000C
#define SL_OPCODE_DEVICE_STOP_COMMAND 0x8473
#define SL_OPCODE_DEVICE_STOP_RESPONSE 0x0473