![]() |
SimpleLink Host Driver
0.0.5.1
|
Data Structures | |
struct | _SlPartialVersion |
struct | SlVersionFull |
struct | sl_DeviceReport |
union | SlDeviceEventData_u |
struct | SlDeviceEvent_t |
struct | SlDateTime_t |
Macros | |
#define | SL_DEVICE_GENERAL_CONFIGURATION (1) |
#define | SL_DEVICE_GENERAL_CONFIGURATION_DATE_TIME (11) |
#define | SL_DEVICE_GENERAL_VERSION (12) |
#define | SL_DEVICE_STATUS (2) |
#define | SL_EVENT_CLASS_GLOBAL (0) |
#define | SL_EVENT_CLASS_DEVICE (1) |
#define | SL_EVENT_CLASS_WLAN (2) |
#define | SL_EVENT_CLASS_BSD (3) |
#define | SL_EVENT_CLASS_NETAPP (4) |
#define | SL_EVENT_CLASS_NETCFG (5) |
#define | SL_EVENT_CLASS_NVMEM (6) |
#define | SL_WLAN_CONNECT_EVENT (1) |
#define | SL_WLAN_DISCONNECT_EVENT (2) |
#define | SL_WLAN_SMART_CONFIG_START_EVENT (3) |
#define | SL_WLAN_SMART_CONFIG_STOP_EVENT (4) |
#define | SL_WLAN_STA_CONNECTED_EVENT (5) |
#define | SL_WLAN_STA_DISCONNECTED_EVENT (6) |
#define | SL_WLAN_P2P_DEV_FOUND_EVENT (7) |
#define | SL_WLAN_P2P_NEG_REQ_RECEIVED_EVENT (8) |
#define | SL_WLAN_CONNECTION_FAILED_EVENT (9) |
#define | SL_DEVICE_FATAL_ERROR_EVENT (1) |
#define | SL_SOCKET_TX_FAILED_EVENT (1) |
#define | SL_SOCKET_SSL_ACCEPT_EVENT (2) |
#define | SL_NETAPP_IPACQUIRED_EVENT (1) |
#define | SL_NETAPP_IPACQUIRED_V6_EVENT (2) |
#define | SL_POOL_IS_EMPTY -2000 |
#define | SL_ESMALLBUF -2001 |
#define | SL_EZEROLEN -2002 |
#define | SL_INVALPARAM -2003 |
#define | EVENT_DROPPED_DEVICE_ASYNC_GENERAL_ERROR 0x00000001L |
#define | STATUS_DEVICE_SMART_CONFIG_ACTIVE 0x80000000L |
#define | EVENT_DROPPED_WLAN_WLANASYNCONNECTEDRESPONSE 0x00000001L |
#define | EVENT_DROPPED_WLAN_WLANASYNCDISCONNECTEDRESPONSE 0x00000002L |
#define | EVENT_DROPPED_WLAN_STA_CONNECTED 0x00000004L |
#define | EVENT_DROPPED_WLAN_STA_DISCONNECTED 0x00000008L |
#define | STATUS_WLAN_STA_CONNECTED 0x80000000L |
#define | EVENT_DROPPED_NETAPP_IPACQUIRED 0x00000001L |
#define | EVENT_DROPPED_NETAPP_IPACQUIRED_V6 0x00000002L |
#define | EVENT_DROPPED_NETAPP_IP_LEASED 0x00000004L |
#define | EVENT_DROPPED_NETAPP_IP_RELEASED 0x00000008L |
#define | EVENT_DROPPED_SOCKET_TXFAILEDASYNCRESPONSE 0x00000001L |
Enumerations | |
enum | SlErrorSender_e { SL_ERR_SENDER_HEALTH_MON, SL_ERR_SENDER_CLI_UART, SL_ERR_SENDER_SUPPLICANT, SL_ERR_SENDER_NETWORK_STACK, SL_ERR_NUM_SENDER_LAST =0xFF } |
Functions | |
long | sl_DevSet (unsigned char DeviceSetId, unsigned char Option, unsigned char ConfigLen, unsigned char *pValues) |
Internal function for setting device configurations. More... | |
long | sl_DevGet (unsigned char DeviceGetId, unsigned char *pOption, unsigned char *pConfigLen, unsigned char *pValues) |
Internal function for getting device configurations. More... | |
int | sl_Start (const void *pIfHdl, char *pDevName, const P_INIT_CALLBACK pInitCallBack) |
Start the SimpleLink device. More... | |
int | sl_Stop (unsigned short timeout) |
Stop the SimpleLink device. More... | |
int | sl_EventMaskSet (unsigned char EventClass, unsigned long Mask) |
Set asynchronous event mask. More... | |
int | sl_EventMaskGet (unsigned char EventClass, unsigned long *pMask) |
Get current event mask of the device. More... | |
#define EVENT_DROPPED_DEVICE_ASYNC_GENERAL_ERROR 0x00000001L |
Declare the different event group classifications for sl_DevGet
long sl_DevGet | ( | unsigned char | DeviceGetId, |
unsigned char * | pOption, | ||
unsigned char * | pConfigLen, | ||
unsigned char * | pValues | ||
) |
Internal function for getting device configurations.
[in] | DeviceGetId | configuration id - example SL_DEVICE_STATUS |
[out] | pOption | Get configurations option, example for get status options
|
[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 configurations values |
long sl_DevSet | ( | unsigned char | DeviceSetId, |
unsigned char | Option, | ||
unsigned char | ConfigLen, | ||
unsigned char * | pValues | ||
) |
Internal function for setting device configurations.
[in] | DeviceSetId | configuration id |
[in] | Option | configurations option |
[in] | ConfigLen | configurations len |
[in] | pValues | configurations values |
int sl_EventMaskGet | ( | unsigned char | EventClass, |
unsigned long * | pMask | ||
) |
Get current event mask of the device.
return the events bit mask from the device. In case that event is masked, the device is not sending this event.
[in] | EventClass | The classification groups that the mask is referred to. Need to be one of the following:
|
[out] | pMask | Pointer to Mask bitmap where the value should be stored. Bitmasks are the same as in sl_EventMaskSet |
int sl_EventMaskSet | ( | unsigned char | EventClass, |
unsigned long | Mask | ||
) |
Set asynchronous event mask.
Mask asynchronous events from the device. Masked events do not generate asynchronous messages from the device.
[in] | EventClass | The classification groups that the mask is referred to. Need to be one of the following:
|
[in] | Mask | Event Mask bitmap. Valid mask are (per group):
|
int sl_Start | ( | const void * | pIfHdl, |
char * | 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.
[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 |
[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. |
int sl_Stop | ( | unsigned short | timeout | ) |
Stop the SimpleLink device.
This function clears the enable pin of the device, closes the communication
interface and invokes the stop complete callback
[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. Addional options:
|