240
SWRU455A – February 2017 – Revised March 2017
Copyright © 2017, Texas Instruments Incorporated
Host APIs
Appendix A
SWRU455A – February 2017 – Revised March 2017
Host APIs
provides a brief description of the different host APIs.
Table A-1. Host APIs
API
Silo
Description
sl_Start
Device
Start the SimpleLink device by initializing the communication
interface, setting the enable pin, allocating resources, and
calling to the init complete callback if provided.
sl_Stop
Device
Stop the SimpleLink device by clearing the enable pin of the
device, closing the communication, and releasing all
resources allocated by the driver.
sl_Task
Device
The SimpleLink task entry function. This function must be
called from the main loop in non-OS platform or otherwise
from dedicated thread if the internal spawn is used.
sl_DeviceGet
Device
Retrieves device configurations and statuses.
sl_DeviceSet
Device
Sets device configurations and statuses.
sl_DeviceEventMaskGet
Device
Retrieves the current asynchronous events bit mask of the
device.
sl_DeviceEventMaskSet
Device
Sets the asynchronous event bit mask of the device. Masked
events do not generate asynchronous messages to the host.
By default all events are active.
sl_DeviceUartSetMode
Device
Relevant for UART host interface only. Used to change the
baud rate of the UART after the device was started.
sl_RegisterEventHandler
Device
This API enables registration of the SimpleLink host driver in
runtime
sl_WlanConnect
Wlan
Initiates a connection to Wi-Fi network.
sl_WlanDisconnect
Wlan
Initiates a disconnection from the current connected Wi-Fi
network. If the Auto connection policy is active, a new
connection is initiated immediately.
sl_WlanProfileAdd
Wlan
Adds a preferred network profile.
sl_WlanProfileGet
Wlan
Retrieves the nonconfidential data of existing preferred
network profile.
sl_WlanProfileDel
Wlan
Deletes a preferred network profile.
sl_WlanSet
Wlan
Sets Wlan configurations.
sl_WlanGet
Wlan
Retrieves Wlan configurations
sl_WlanPolicySet
Wlan
Sets Wlan policy configurations
sl_WlanPolicyGet
Wlan
Retrieves Wlan policy configurations
sl_WlanGetNetworkList
Wlan
Gets the last Wlan scan results
sl_WlanRxStatStart
Wlan
Starts collecting wlan RX statistics
sl_WlanRxStatStop
Wlan
Stops collecting wlan RX statistics
sl_WlanRxStatGet
Wlan
Retrieves Wlan RX statistics. Upon calling this function, the
statistics are cleared and collected from beginning.
sl_WlanSetMode
Wlan
Sets the Wlan mode
sl_WlanProvisioning
Wlan
Starts the provisioning process
sl_WlanRxFilterAdd
Wlan
Adds a new receive filter rule to the system
sl_Socket
Socket
Creates an endpoint for communication
sl_Listen
Socket
Listens for connections on a socket
sl_Accept
Socket
Accepts a connection on a socket