Controls the behaviour of the CC31xx/CC32xx device (start/stop, events masking and obtaining specific device status)
More...
|
_i16 | sl_Start (const void *pIfHdl, _i8 *pDevName, const P_INIT_CALLBACK pInitCallBack) |
| Start the SimpleLink device. More...
|
|
_i16 | sl_Stop (const _u16 Timeout) |
| Stop the SimpleLink device. More...
|
|
_i16 | sl_DeviceSet (const _u8 DeviceSetId, const _u8 Option, const _u16 ConfigLen, const _u8 *pValues) |
| Setting device configurations. More...
|
|
_i16 | sl_DeviceGet (const _u8 DeviceGetId, _u8 *pOption, _u16 *pConfigLen, _u8 *pValues) |
| Internal function for getting device configurations. More...
|
|
_i16 | sl_DeviceEventMaskSet (const _u8 EventClass, const _u32 Mask) |
| Set asynchronous event mask. More...
|
|
_i16 | sl_DeviceEventMaskGet (const _u8 EventClass, _u32 *pMask) |
| Get current event mask of the device. More...
|
|
void * | sl_Task (void *pEntry) |
| The SimpleLink task entry. More...
|
|
_i16 | sl_DeviceUartSetMode (const SlDeviceUartIfParams_t *pUartParams) |
| Setting the internal uart mode. More...
|
|
|
enum | SlDeviceEventId_e {
SL_DEVICE_EVENT_FATAL_DEVICE_ABORT = 1,
SL_DEVICE_EVENT_FATAL_DRIVER_ABORT,
SL_DEVICE_EVENT_FATAL_SYNC_LOSS,
SL_DEVICE_EVENT_FATAL_NO_CMD_ACK,
SL_DEVICE_EVENT_FATAL_CMD_TIMEOUT,
SL_DEVICE_EVENT_RESET_REQUEST,
SL_DEVICE_EVENT_ERROR,
SL_DEVICE_EVENT_MAX
} |
|
enum | SlDeviceSource_e {
SL_DEVICE_SOURCE_OTHER,
SL_DEVICE_SOURCE_WLAN,
SL_DEVICE_SOURCE_NETCFG,
SL_DEVICE_SOURCE_NETAPP,
SL_DEVICE_SOURCE_SECURITY,
SL_DEVICE_SOURCE_LAST = 0xFF
} |
|
enum | SlDeviceResetRequestCaller_e {
SL_DEVICE_RESET_REQUEST_CALLER_PROVISIONING,
SL_DEVICE_RESET_REQUEST_CALLER_PROVISIONING_EXTERNAL_CONFIGURATION,
SL_DEVICE_RESET_REQUEST_NUM_OF_CALLERS
} |
|
Controls the behaviour of the CC31xx/CC32xx device (start/stop, events masking and obtaining specific device status)
_i16 sl_DeviceEventMaskGet |
( |
const _u8 |
EventClass, |
|
|
_u32 * |
pMask |
|
) |
| |
Get current event mask of the device.
Return the events bit mask from the device. In case event is masked, the device will not send that event.
- Parameters
-
[in] | EventClass | The classification groups that the mask is referred to. Need to be one of the following:
- SL_DEVICE_EVENT_CLASS_GLOBAL
- SL_DEVICE_EVENT_CLASS_DEVICE
- SL_DEVICE_EVENT_CLASS_WLAN
- SL_DEVICE_EVENT_CLASS_BSD
- SL_DEVICE_EVENT_CLASS_NETAPP
- SL_DEVICE_EVENT_CLASS_NETCFG
- SL_DEVICE_EVENT_CLASS_FS
|
[out] | pMask | Pointer to mask bitmap where the value should be stored. Bitmasks are the same as in sl_DeviceEventMaskSet |
- Returns
- Zero on success, or a negative value if an error occurred
- See also
- sl_DeviceEventMaskSet
- Note
- Belongs to ext_api
- Warning
- Example
- Getting an event mask for WLAN class:
2 sl_DeviceEventMaskGet(SL_DEVICE_EVENT_CLASS_WLAN,&maskWlan);
Definition at line 413 of file device.c.
415 _SlEventMaskGetMsg_u Msg;
419 VERIFY_API_ALLOWED(SL_OPCODE_SILO_DEVICE);
421 Msg.Cmd.Group = EventClass;
423 VERIFY_RET_OK(_SlDrvCmdOp((
_SlCmdCtrl_t *)&_SlEventMaskGetCmdCtrl, &Msg, NULL));
425 *pMask = Msg.Rsp.Mask;
427 return SL_RET_CODE_OK;
_i16 sl_DeviceEventMaskSet |
( |
const _u8 |
EventClass, |
|
|
const _u32 |
Mask |
|
) |
| |
Set asynchronous event mask.
Mask asynchronous events from the device.
Masked events do not generate asynchronous messages from the device.
By default - all events are active
- Parameters
-
[in] | EventClass | The classification groups that the mask is referred to. Need to be one of the following:
- SL_DEVICE_EVENT_CLASS_DEVICE
- SL_DEVICE_EVENT_CLASS_WLAN
- SL_DEVICE_EVENT_CLASS_BSD
- SL_DEVICE_EVENT_CLASS_NETAPP
- SL_DEVICE_EVENT_CLASS_NETCFG
- SL_DEVICE_EVENT_CLASS_FS
|
[in] | Mask | Event Mask bitmap. Valid mask are (per group):
- SL_DEVICE_EVENT_CLASS_WLAN user events
- SL_WLAN_EVENT_CONNECT
- SL_WLAN_EVENT_P2P_CONNECT
- SL_WLAN_EVENT_DISCONNECT
- SL_WLAN_EVENT_P2P_DISCONNECT
- SL_WLAN_EVENT_STA_ADDED
- SL_WLAN_EVENT_STA_REMOVED
- SL_WLAN_EVENT_P2P_CLIENT_ADDED
- SL_WLAN_EVENT_P2P_CLIENT_REMOVED
- SL_WLAN_EVENT_P2P_DEVFOUND
- SL_WLAN_EVENT_P2P_REQUEST
- SL_WLAN_EVENT_P2P_CONNECTFAIL
- SL_WLAN_EVENT_PROVISIONING_STATUS
- SL_WLAN_EVENT_PROVISIONING_PROFILE_ADDED
- SL_WLAN_EVENT_RXFILTER
- SL_DEVICE_EVENT_CLASS_DEVICE user events
- SL_DEVICE_EVENT_CLASS_BSD user events
- SL_SOCKET_TX_FAILED_EVENT
- SL_SOCKET_ASYNC_EVENT
- SL_DEVICE_EVENT_CLASS_NETAPP user events
- SL_NETAPP_EVENT_IPV4_ACQUIRED
- SL_NETAPP_EVENT_IPV6_ACQUIRED
- SL_NETAPP_EVENT_DHCPV4_LEASED
- SL_NETAPP_EVENT_DHCPV4_RELEASED
- SL_NETAPP_EVENT_IP_COLLISION
- SL_NETAPP_EVENT_IPV4_LOST
- SL_NETAPP_EVENT_DHCP_IPV4_ACQUIRE_TIMEOUT
- SL_NETAPP_EVENT_IPV6_LOST
|
- Returns
- Zero on success, or a negative value if an error occurred
- Persistent System Persistent
- See also
- sl_DeviceEventMaskGet
- Note
- Belongs to ext_api
- Warning
- Example
- Masking connection/disconnection async events from WLAN class:
1 sl_DeviceEventMaskSet(SL_DEVICE_EVENT_CLASS_WLAN, (SL_DEVICE_EVENT_BIT(SL_WLAN_EVENT_CONNECT) | SL_DEVICE_EVENT_BIT(SL_WLAN_EVENT_DISCONNECT) ) );
Definition at line 375 of file device.c.
377 _SlEventMaskSetMsg_u Msg;
381 VERIFY_API_ALLOWED(SL_OPCODE_SILO_DEVICE);
383 Msg.Cmd.Group = EventClass;
386 VERIFY_RET_OK(_SlDrvCmdOp((
_SlCmdCtrl_t *)&_SlEventMaskSetCmdCtrl, &Msg, NULL));
388 return (_i16)Msg.Rsp.status;
_i16 sl_DeviceGet |
( |
const _u8 |
DeviceGetId, |
|
|
_u8 * |
pOption, |
|
|
_u16 * |
pConfigLen, |
|
|
_u8 * |
pValues |
|
) |
| |
Internal function for getting device configurations.
- Parameters
-
[in] | DeviceGetId | configuration id:
- SL_DEVICE_STATUS
- SL_DEVICE_GENERAL
- SL_DEVICE_IOT
|
[out] | pOption | Get configurations option:
- SL_DEVICE_STATUS:
- SL_DEVICE_EVENT_CLASS_DEVICE
- SL_DEVICE_EVENT_CLASS_WLAN
- SL_DEVICE_EVENT_CLASS_BSD
- SL_DEVICE_EVENT_CLASS_NETAPP
- SL_DEVICE_EVENT_CLASS_NETCFG
- SL_DEVICE_EVENT_CLASS_FS
- SL_DEVICE_GENERAL:
- SL_DEVICE_GENERAL_VERSION
- SL_DEVICE_GENERAL_DATE_TIME
- SL_DEVICE_GENERAL_PERSISTENT
- SL_DEVICE_IOT:
|
[out] | pConfigLen | The length of the allocated memory as input, when the function complete, the value of this parameter would be the len that actually read from the device.
If the device return length that is longer from the input value, the function will cut the end of the returned structure and will return SL_ESMALLBUF |
[out] | pValues | Get requested configurations values |
- Returns
- Zero on success, or a negative value if an error occurred
- See also
- Note
- Warning
- Examples
- Getting WLAN class status (status is always cleared on read):
4 pConfigOpt = SL_DEVICE_EVENT_CLASS_WLAN;
5 pConfigLen = sizeof(_u32);
6 sl_DeviceGet(SL_DEVICE_STATUS,&pConfigOpt,&pConfigLen,(_u8 *)(&statusWlan));
7 if (SL_DEVICE_STATUS_WLAN_STA_CONNECTED & statusWlan )
9 printf("Device is connected\n");
11 if (SL_DEVICE_EVENT_DROPPED_WLAN_RX_FILTERS & statusWlan )
13 printf("RX filer event dropped\n");
- Getting version:
2 pConfigLen = sizeof(ver);
3 pConfigOpt = SL_DEVICE_GENERAL_VERSION;
4 sl_DeviceGet(SL_DEVICE_GENERAL,&pConfigOpt,&pConfigLen,(_u8 *)(&ver));
5 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",
7 ver.FwVersion[0],ver.FwVersion[1],
8 ver.FwVersion[2],ver.FwVersion[3],
9 ver.PhyVersion[0],ver.PhyVersion[1],
10 ver.PhyVersion[2],ver.PhyVersion[3],
11 ver.NwpVersion[0],ver.NwpVersion[1],ver.NwpVersion[2],ver.NwpVersion[3],
13 SL_MAJOR_VERSION_NUM,SL_MINOR_VERSION_NUM,SL_VERSION_NUM,SL_SUB_VERSION_NUM);
- Getting Device time and date:
1 SlDateTime_t dateTime = {0};
2 _i16 configLen = sizeof(SlDateTime_t);
3 _i8 configOpt = SL_DEVICE_GENERAL_DATE_TIME;
4 sl_DeviceGet(SL_DEVICE_GENERAL,&configOpt, &configLen,(_u8 *)(&dateTime));
6 printf("Day %d,Mon %d,Year %d,Hour %,Min %d,Sec %d\n",dateTime.tm_day,dateTime.tm_mon,dateTime.tm_year,
7 dateTime.tm_hour,dateTime.tm_min,dateTime.tm_sec);
- Getting persistency system configuration:
1 _i16 configLen = sizeof(_u8);
2 _i8 configOpt = SL_DEVICE_GENERAL_PERSISTENT;
3 sl_DeviceGet(SL_DEVICE_GENERAL,&configOpt, &configLen,&persistent);
Definition at line 454 of file device.c.
456 _SlDeviceMsgGet_u Msg;
461 VERIFY_API_ALLOWED(SL_OPCODE_SILO_DEVICE);
463 if (*pConfigLen == 0)
471 _SlDrvResetCmdExt(&CmdExt);
472 CmdExt.RxPayloadLen = (_i16)*pConfigLen;
473 CmdExt.pRxPayload = (_u8 *)pValues;
475 Msg.Cmd.DeviceSetId = DeviceGetId;
477 Msg.Cmd.Option = (_u16)*pOption;
479 VERIFY_RET_OK(_SlDrvCmdOp((
_SlCmdCtrl_t *)&_SlDeviceGetCmdCtrl, &Msg, &CmdExt));
483 *pOption = (_u8)Msg.Rsp.Option;
486 if (CmdExt.RxPayloadLen < CmdExt.ActualRxPayloadLen)
488 *pConfigLen = (_u16)CmdExt.RxPayloadLen;
494 *pConfigLen = (_u16)CmdExt.ActualRxPayloadLen;
497 return (_i16)Msg.Rsp.Status;
501 return SL_RET_CODE_INVALID_INPUT;
_i16 sl_DeviceSet |
( |
const _u8 |
DeviceSetId, |
|
|
const _u8 |
Option, |
|
|
const _u16 |
ConfigLen, |
|
|
const _u8 * |
pValues |
|
) |
| |
Setting device configurations.
- Parameters
-
[in] | DeviceSetId | configuration id:
|
[in] | Option | configurations option:
- SL_DEVICE_GENERAL_DATE_TIME
- SL_DEVICE_GENERAL_PERSISTENT
|
[in] | ConfigLen | configurations len |
[in] | pValues | configurations values |
- Returns
- Zero on success, or a negative value if an error occurred
- Persistent
- SL_DEVICE_GENERAL_DATE_TIME - Non-Persistent (Kept during hibernate) SL_DEVICE_GENERAL_PERSISTENT - Persistent
- See also
- Note
- Warning
- Examples:
- Setting device time and date example:
1 SlDateTime_t dateTime= {0};
2 dateTime.tm_day = (_u32)23; // Day of month (DD format) range 1-31
3 dateTime.tm_mon = (_u32)6; // Month (MM format) in the range of 1-12
4 dateTime.tm_year = (_u32)2014; // Year (YYYY format)
5 dateTime.tm_hour = (_u32)17; // Hours in the range of 0-23
6 dateTime.tm_min = (_u32)55; // Minutes in the range of 0-59
7 dateTime.tm_sec = (_u32)22; // Seconds in the range of 0-59
8 sl_DeviceSet(SL_DEVICE_GENERAL,
9 SL_DEVICE_GENERAL_DATE_TIME,
- Setting system persistent configuration:
Sets the default system-wide configuration persistence mode. In case true, all APIs that follow 'system configured' persistence (see persistence attribute noted per API) shall maintain the configured settings. In case false, all calls to APIs that follow 'system configured' persistence shall be volatile. Configuration should revert to default after reset or power recycle
2 sl_DeviceSet(SL_DEVICE_GENERAL,
3 SL_DEVICE_GENERAL_PERSISTENT,
Definition at line 526 of file device.c.
528 _SlDeviceMsgSet_u Msg;
533 VERIFY_API_ALLOWED(SL_OPCODE_SILO_DEVICE);
535 _SlDrvResetCmdExt(&CmdExt);
537 CmdExt.TxPayload1Len = (ConfigLen+3) & (~3);
538 CmdExt.pTxPayload1 = (_u8 *)pValues;
540 Msg.Cmd.DeviceSetId = DeviceSetId;
541 Msg.Cmd.ConfigLen = ConfigLen;
542 Msg.Cmd.Option = Option;
544 VERIFY_RET_OK(_SlDrvCmdOp((
_SlCmdCtrl_t *)&_SlDeviceSetCmdCtrl, &Msg, &CmdExt));
546 return (_i16)Msg.Rsp.status;
Setting the internal uart mode.
- Parameters
-
[in] | pUartParams | Pointer to the uart configuration parameter set:
- baudrate - up to 711 Kbps
- flow control - enable/disable
- comm port - the comm port number
|
- Returns
- On success zero is returned, otherwise - Failed.
- See also
- Note
- Belongs to basic_api
- Warning
- This function must consider the host uart capability
Definition at line 705 of file device.c.
707 _SlUartSetModeMsg_u Msg;
708 _u32 magicCode = (_u32)0xFFFFFFFF;
710 Msg.Cmd.BaudRate = pUartParams->BaudRate;
711 Msg.Cmd.FlowControlEnable = pUartParams->FlowControlEnable;
714 VERIFY_RET_OK(_SlDrvCmdOp((
_SlCmdCtrl_t *)&_SlUartSetModeCmdCtrl, &Msg, NULL));
717 if (SL_RET_CODE_OK == Msg.Rsp.status)
722 sl_IfClose(g_pCB->FD);
725 sl_IfOpen((
void * )pUartParams, SL_IF_UART_REOPEN_FLAGS);
727 sl_IfUnMaskIntHdlr();
730 sl_IfWrite(g_pCB->FD, (_u8* )&magicCode, 4);
732 magicCode = UART_SET_MODE_MAGIC_CODE;
733 sl_IfWrite(g_pCB->FD, (_u8* )&magicCode, 4);
739 sl_IfRead(g_pCB->FD, (_u8* )&magicCode, 4);
742 if (UART_SET_MODE_MAGIC_CODE != magicCode)
748 return (_i16)Msg.Rsp.status;
_i16 sl_Start |
( |
const void * |
pIfHdl, |
|
|
_i8 * |
pDevName, |
|
|
const P_INIT_CALLBACK |
pInitCallBack |
|
) |
| |
Start the SimpleLink device.
This function initialize the communication interface, set the enable pin of the device, and call to the init complete callback.
- Parameters
-
[in] | pIfHdl | Opened Interface Object. In case the interface must be opened outside the SimpleLink Driver, the user might give the handler to be used in
any access of the communication interface with the device (UART/SPI).
The SimpleLink driver will open an interface port only if this parameter is null!
|
[in] | pDevName | The name of the device to open. Could be used when the pIfHdl is null, to transfer information to the open interface function
This pointer could be used to pass additional information to sl_IfOpen in case it is required (e.g. UART com port name) |
[in] | pInitCallBack | Pointer to function that would be called on completion of the initialization process.
If this parameter is NULL the function is blocked until the device initialization is completed, otherwise the function returns immediately. |
- Returns
- Returns the current active role (STA/AP/P2P) or an error code:
- ROLE_STA, ROLE_AP, ROLE_P2P in case of success, otherwise in failure one of the following is return:
- SL_ERROR_ROLE_STA_ERR (Failure to load MAC/PHY in STA role)
- SL_ERROR_ROLE_AP_ERR (Failure to load MAC/PHY in AP role)
- SL_ERROR_ROLE_P2P_ERR (Failure to load MAC/PHY in P2P role)
- SL_ERROR_CALIB_FAIL (Failure of calibration)
- SL_ERROR_FS_CORRUPTED_ERR (FS is corrupted, Return to Factory Image or Program new image should be invoked (see sl_FsCtl, sl_FsProgram))
- SL_ERROR_FS_ALERT_ERR (Device is locked, Return to Factory Image or Program new image should be invoked (see sl_FsCtl, sl_FsProgram))
- SL_ERROR_RESTORE_IMAGE_COMPLETE (Return to factory image completed, perform reset)
- SL_ERROR_GENERAL_ERR (General error during init)
- See also
- sl_Stop
- Note
- Belongs to basic_api
- Warning
- This function must be called before any other SimpleLink API is used, or after sl_Stop is called for reinit the device
- Example:
- Open interface without callback routine. The interface name and handler are handled by the sl_IfOpen routine:
1 if( sl_Start(NULL, NULL, NULL) < 0 )
3 LOG("Error opening interface to device\n");
- Open interface with a callback routine:
1 void SimpleLinkInitCallback(_u32 status)
3 LOG("Handle SimpleLink Interface acording to ststus %d\n", status);
8 if (sl_Start(NULL, NULL, SimpleLinkInitCallback) < 0)
10 LOG("Error opening interface to device\n");
Definition at line 102 of file device.c.
104 _u8 ObjIdx = MAX_CONCURRENT_ACTIONS;
109 VERIFY_NO_ERROR_HANDLING_IN_PROGRESS();
110 if (SL_IS_DEVICE_STARTED)
112 return SL_RET_CODE_DEV_ALREADY_STARTED;
115 #ifdef sl_DeviceEnablePreamble
116 sl_DeviceEnablePreamble();
120 (void)_SlDrvDriverCBInit();
125 g_pCB->FD = sl_IfOpen((
void *)pDevName, SL_IF_OPEN_FLAGS);
129 g_pCB->FD = (_SlFd_t)pIfHdl;
132 ObjIdx = _SlDrvProtectAsyncRespSetting((_u8 *)&AsyncRsp, START_STOP_ID, SL_MAX_SOCKETS);
134 if (MAX_CONCURRENT_ACTIONS == ObjIdx)
136 return SL_POOL_IS_EMPTY;
139 if( g_pCB->FD >= (_SlFd_t)0)
143 DeviceCB.pIfHdl = pIfHdl;
144 DeviceCB.pDevName = pDevName;
147 SL_SET_DEVICE_START_IN_PROGRESS;
151 sl_IfRegIntHdlr((SL_P_EVENT_HANDLER)_SlDrvRxIrqHandler, NULL);
153 g_pCB->pInitCallback = pInitCallBack;
156 if (NULL == pInitCallBack)
159 _SlDrvSyncObjWaitForever(&g_pCB->ObjPool[ObjIdx].SyncObj);
161 SL_DRV_SYNC_OBJ_WAIT_TIMEOUT(&g_pCB->ObjPool[ObjIdx].SyncObj,
162 INIT_COMPLETE_TIMEOUT,
163 SL_OPCODE_DEVICE_INITCOMPLETE);
166 SL_UNSET_DEVICE_START_IN_PROGRESS;
168 SL_SET_DEVICE_STARTED;
171 _SlDrvReleasePoolObj(g_pCB->FunctionParams.AsyncExt.ActionIndex);
172 return _SlDeviceGetStartResponseConvert(AsyncRsp.Status);
176 return SL_RET_CODE_OK;
179 return SL_BAD_INTERFACE;
_i16 sl_Stop |
( |
const _u16 |
Timeout | ) |
|
Stop the SimpleLink device.
This function clears the enable pin of the device, closes the communication
interface and invokes the stop complete callback
- Parameters
-
[in] | Timeout | Stop timeout in msec. Should be used to give the device time to finish
any transmission/reception that is not completed when the function was called.
Additional options:
- 0 Enter to hibernate immediately
- 0xFFFF Host waits for device's response before
hibernating, without timeout protection
- 0 < Timeout[msec] < 0xFFFF Host waits for device's response before
hibernating, with a defined timeout protection
This timeout defines the max time to wait. The NWP
response can be sent earlier than this timeout.
|
- Returns
- Zero on success, or a negative value if an error occurred
- See also
- sl_Start
- Note
- This API will shutdown the device and invoke the "i/f close" function regardless
if it was opened implicitly or explicitly.
It is up to the platform interface library to properly handle interface close
routine
Belongs to basic_api
- Warning
Definition at line 261 of file device.c.
266 _u8 ObjIdx = MAX_CONCURRENT_ACTIONS;
267 _u8 ReleasePoolObject = FALSE;
268 _u8 IsProvInProgress = FALSE;
278 && (!SL_IS_RESTART_REQUIRED)
283 Msg.Cmd.Timeout = Timeout;
285 IsProvInProgress = SL_IS_PROVISIONING_IN_PROGRESS;
288 if (!IsProvInProgress)
290 ObjIdx = _SlDrvProtectAsyncRespSetting((_u8 *)&AsyncRsp, START_STOP_ID, SL_MAX_SOCKETS);
291 if (MAX_CONCURRENT_ACTIONS == ObjIdx)
293 return SL_POOL_IS_EMPTY;
296 ReleasePoolObject = TRUE;
300 SL_SET_DEVICE_STOP_IN_PROGRESS;
302 VERIFY_RET_OK(_SlDrvCmdOp((
_SlCmdCtrl_t *)&_SlStopCmdCtrl, &Msg, NULL));
306 if((SL_OS_RET_CODE_OK == (_i16)Msg.Rsp.status) && (!(IsProvInProgress)))
310 _SlDrvSyncObjWaitForever(&g_pCB->ObjPool[ObjIdx].SyncObj);
313 SL_DRV_SYNC_OBJ_WAIT_TIMEOUT(&g_pCB->ObjPool[ObjIdx].SyncObj,
315 SL_OPCODE_DEVICE_STOP_ASYNC_RESPONSE);
319 Msg.Rsp.status = AsyncRsp.status;
320 RetVal = Msg.Rsp.status;
324 if (ReleasePoolObject == TRUE)
326 _SlDrvReleasePoolObj(ObjIdx);
332 WAIT_NWP_SHUTDOWN_READY;
337 SL_SET_DEVICE_STOP_IN_PROGRESS;
340 sl_IfRegIntHdlr(NULL, NULL);
342 RetVal = sl_IfClose(g_pCB->FD);
344 (void)_SlDrvDriverCBDeinit();
346 SL_UNSET_DEVICE_STOP_IN_PROGRESS;
void* sl_Task |
( |
void * |
pEntry | ) |
|
The SimpleLink task entry.
This function must be called from the main loop or from dedicated thread in the following cases:
- Non-Os Platform - should be called from the mail loop
- Multi Threaded Platform when the user does not implement the external spawn functions - should be called from dedicated thread allocated to the SimpleLink driver. In this mode the function never return.
- parameters
- None
- Returns
- None
- See also
- Note
- Belongs to basic_api
- Warning
- This function must be called from a thread that is start running before any call to other SimpleLink API
Definition at line 87 of file device.c.
90 return (
void*)_SlTaskEntry();
struct SlDeviceEventResetRequest_t |
Definition at line 63 of file device.h.
Data Fields |
_u16 |
Caller |
|
_i16 |
Status |
|
struct SlDeviceEventError_t |
Definition at line 80 of file device.h.
Data Fields |
_i16 |
Code |
|
SlDeviceSource_e |
Source |
|
union SlDeviceEventData_u |
struct SlDeviceFatalDeviceAssert_t |
Definition at line 115 of file device.h.
Data Fields |
_u32 |
Code |
|
_u32 |
Value |
|
struct SlDeviceFatalNoCmdAck_t |
union SlDeviceFatalData_u |
struct SlDeviceUartIfParams_t |
Definition at line 215 of file device.h.
Data Fields |
_u32 |
BaudRate |
|
_u8 |
CommPort |
|
_u8 |
FlowControlEnable |
|
Definition at line 237 of file device.h.
Data Fields |
_u32 |
ChipId |
|
_u8 |
FwVersion[4] |
|
_u8 |
NwpVersion[4] |
|
_u16 |
Padding |
|
_u8 |
PhyVersion[4] |
|
_u16 |
RomVersion |
|
Definition at line 248 of file device.h.
Data Fields |
_u32 |
reserved[3] |
|
_u32 |
tm_day |
|
_u32 |
tm_hour |
|
_u32 |
tm_min |
|
_u32 |
tm_mon |
|
_u32 |
tm_sec |
|
_u32 |
tm_week_day |
|
_u32 |
tm_year |
|
_u32 |
tm_year_day |
|
struct SlDeviceInitInfo_t |
Definition at line 267 of file device.h.
Data Fields |
_u32 |
ChipId |
|
_u32 |
MoreData |
|