Functions | |
_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_Stop_WithNwpLpdsPoll (const _u16 timeout) |
Stop the SimpleLink device. Additionally it makes sure the NWP is in LPDS before shutting it down. More... | |
_i32 | sl_DevSet (const _u8 DeviceSetId, const _u8 Option, const _u8 ConfigLen, const _u8 *pValues) |
Internal function for setting device configurations. More... | |
_i32 | sl_DevGet (const _u8 DeviceGetId, _u8 *pOption, _u8 *pConfigLen, _u8 *pValues) |
Internal function for getting device configurations. More... | |
_i16 | sl_EventMaskSet (const _u8 EventClass, const _u32 Mask) |
Set asynchronous event mask. More... | |
_i16 | sl_EventMaskGet (const _u8 EventClass, _u32 *pMask) |
Get current event mask of the device. More... | |
void | sl_Task (void) |
the simple link task entry More... | |
_i16 | sl_UartSetMode (const SlUartIfParams_t *pUartParams) |
Setting the internal uart mode. More... | |
Typedefs | |
typedef void(* | P_INIT_CALLBACK) (_u32 Status) |
_i32 sl_DevGet | ( | const _u8 | DeviceGetId, |
_u8 * | pOption, | ||
_u8 * | pConfigLen, | ||
_u8 * | 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 |
_i32 sl_DevSet | ( | const _u8 | DeviceSetId, |
const _u8 | Option, | ||
const _u8 | ConfigLen, | ||
const _u8 * | pValues | ||
) |
Internal function for setting device configurations.
[in] | DeviceSetId | configuration id |
[in] | Option | configurations option |
[in] | ConfigLen | configurations len |
[in] | pValues | configurations values |
_i16 sl_EventMaskGet | ( | const _u8 | EventClass, |
_u32 * | 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 |
_i16 sl_EventMaskSet | ( | 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
[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):
|
_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 | ( | 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
[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:
|
_i16 sl_Stop_WithNwpLpdsPoll | ( | const _u16 | timeout | ) |
Stop the SimpleLink device. Additionally it makes sure the NWP is in LPDS before shutting it down.
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 | ) |
the simple link task entry
This function must be called from the main loop or from dedicated thread in the following cases:
_i16 sl_UartSetMode | ( | const SlUartIfParams_t * | pUartParams | ) |
Setting the internal uart mode.
[in] | pUartParams | Pointer to the uart configuration parameter set: baudrate - up to 711 Kbps flow control - enable/disable comm port - the comm port number |
struct SlUartIfParams_t |
struct _SlPartialVersion |
struct SlVersionFull |
Data Fields | ||
---|---|---|
_SlPartialVersion | ChipFwAndPhyVersion | |
_u32 | NwpVersion[4] | |
_u16 | Padding | |
_u16 | RomVersion |
struct sl_DeviceReportAbort |
struct sl_DeviceReport |
union SlDeviceEventData_u |
Data Fields | ||
---|---|---|
sl_DeviceDriverErrorReport | deviceDriverReport | |
sl_DeviceReport | deviceEvent | |
sl_DeviceReportAbort | deviceReport |
struct SlDeviceEvent_t |
Data Fields | ||
---|---|---|
SlDeviceDriverError_e | Event | |
SlDeviceEventData_u | EventData |