SWRU455M February 2017 – October 2020 CC3120 , CC3120MOD , CC3130 , CC3135 , CC3135MOD , CC3220MOD , CC3220MODA , CC3220R , CC3220S , CC3220SF , CC3230S , CC3230SF , CC3235MODAS , CC3235MODASF , CC3235MODS , CC3235MODSF , CC3235S , CC3235SF
The SimpleLink Wi-Fi device provides an option to read the device status according to the last event recorded in the SimpleLink device per API silo. The status is cleared when on read.
This option has two main return values:
Example:
_i16 Status;
_u32 statusWlan;
_u8 pConfigOpt;
_u16 pConfigLen;
pConfigOpt = SL_DEVICE_EVENT_CLASS_WLAN;
pConfigLen = sizeof(_u32);
Status = sl_DeviceGet(SL_DEVICE_STATUS,&pConfigOpt,&pConfigLen,(_u8 *)(&statusWlan));
if (SL_DEVICE_STATUS_WLAN_STA_CONNECTED & statusWlan )
{
/* The device is connected */
}
if (SL_DEVICE_EVENT_DROPPED_WLAN_RX_FILTERS & statusWlan )
{
/* RX filer event dropped */
}
The full list of possible values for possible device status or asynchronous events can be found in the host driver.