![]() |
SimpleLink Host Driver
1.0.0.1
|
Data Structures | |
struct | _SlPartialVersion |
struct | SlVersionFull |
struct | sl_DeviceReport |
union | _SlDeviceEventData_u |
struct | SlDeviceEvent_t |
struct | SlDateTime_t |
Typedefs | |
typedef void(* | P_INIT_CALLBACK )(_u32 Status) |
Functions | |
_i16 | sl_Start (const void *pIfHdl, _i8 *pDevName, const P_INIT_CALLBACK pInitCallBack) |
Start the SimpleLink device. More... | |
_i16 | sl_Stop (_u16 timeout) |
Stop the SimpleLink device. More... | |
void | sl_Task (void) |
Internal function for setting device configurations. More... | |
struct _SlPartialVersion |
struct SlVersionFull |
Data Fields | ||
---|---|---|
_SlPartialVersion | ChipFwAndPhyVersion | |
_u32 | NwpVersion[4] | |
_u16 | Padding | |
_u16 | RomVersion |
struct sl_DeviceReport |
union _SlDeviceEventData_u |
struct SlDeviceEvent_t |
struct SlDateTime_t |
_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.
[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. |
_i16 sl_Stop | ( | _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
[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:
|
void sl_Task | ( | void | ) |
Internal function for setting device configurations.
[in] | DeviceSetId | configuration id |
[in] | Option | configurations option |
[in] | ConfigLen | configurations len |
[in] | pValues | configurations values |
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 |
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
[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):
|
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 |
the simple link task entry
This function must be called from the main loop or from dedicated thread in the following cases: