SimpleLink CC31xx/CC32xx Host Driver
Version 3.0.1.46
Simplifies the implementation of Internet connectivity
|
Controls the behaviour of the CC31xx/CC32xx device (start/stop, events masking and obtaining specific device status) More...
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_DeviceSet (const _u8 DeviceSetId, const _u8 Option, const _u16 ConfigLen, const _u8 *pValues) |
Setting device configurations. More... | |
_i16 | sl_DeviceGet (const _u8 DeviceGetId, _u8 *pOption, _u16 *pConfigLen, _u8 *pValues) |
Internal function for getting device configurations. More... | |
_i16 | sl_DeviceEventMaskSet (const _u8 EventClass, const _u32 Mask) |
Set asynchronous event mask. More... | |
_i16 | sl_DeviceEventMaskGet (const _u8 EventClass, _u32 *pMask) |
Get current event mask of the device. More... | |
void * | sl_Task (void *pEntry) |
The SimpleLink task entry. More... | |
_i16 | sl_DeviceUartSetMode (const SlDeviceUartIfParams_t *pUartParams) |
Setting the internal uart mode. More... | |
_i32 | sl_WifiConfig () |
Configure SimpleLink to default state. More... | |
Typedefs | |
typedef struct SlDeviceFatalNoCmdAck_t | SlDeviceFatalCmdTimeout_t |
typedef void(* | P_INIT_CALLBACK) (_u32 Status, SlDeviceInitInfo_t *DeviceInitInfo) |
Controls the behaviour of the CC31xx/CC32xx device (start/stop, events masking and obtaining specific device status)
_i16 sl_DeviceEventMaskGet | ( | const _u8 | EventClass, |
_u32 * | pMask | ||
) |
Get current event mask of the device.
Return the events bit mask from the device. In case event is masked, the device will not send that 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_DeviceEventMaskSet |
Definition at line 437 of file device.c.
_i16 sl_DeviceEventMaskSet | ( | 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):
|
Definition at line 399 of file device.c.
_i16 sl_DeviceGet | ( | const _u8 | DeviceGetId, |
_u8 * | pOption, | ||
_u16 * | pConfigLen, | ||
_u8 * | pValues | ||
) |
Internal function for getting device configurations.
[in] | DeviceGetId | configuration id:
|
[out] | pOption | Get configurations option:
|
[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 requested configurations values |
Definition at line 478 of file device.c.
_i16 sl_DeviceSet | ( | const _u8 | DeviceSetId, |
const _u8 | Option, | ||
const _u16 | ConfigLen, | ||
const _u8 * | pValues | ||
) |
Setting device configurations.
[in] | DeviceSetId | configuration id:
|
[in] | Option | configurations option:
|
[in] | ConfigLen | configurations len |
[in] | pValues | configurations values |
Definition at line 550 of file device.c.
_i16 sl_DeviceUartSetMode | ( | const SlDeviceUartIfParams_t * | pUartParams | ) |
Setting the internal uart mode.
[in] | pUartParams | Pointer to the uart configuration parameter set:
|
Definition at line 721 of file device.c.
_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. |
Definition at line 119 of file device.c.
_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:
|
Definition at line 273 of file device.c.
void* sl_Task | ( | void * | pEntry | ) |
The SimpleLink task entry.
This function must be called from the main loop or from dedicated thread in the following cases:
_i32 sl_WifiConfig | ( | ) |
Configure SimpleLink to default state.
The sl_WifiConfig function allows to configure the device to a pre-configured state by sysconfig UI\ ti_drivers_net_wifi_Config.c. The configuration of the SimpleLink Wifi is usually persistent, and can be reconfigured at runtime. Reconfiguration should be performed only when needed since the process involves flash writes and might impact system lifetime (flash write endurance) and power consumption.
It's important to note that this is one example for a 'restore to default state' function, which meet the needs of this application. User who wish to incorporate this function into he's app, must adjust the implementation and make sure it meets he's needs.
Definition at line 46 of file wlanconfig.c.
struct SlDeviceEventResetRequest_t |
struct SlDeviceEventError_t |
union SlDeviceEventData_u |
Data Fields | ||
---|---|---|
SlDeviceEventError_t | Error | |
SlDeviceEventResetRequest_t | ResetRequest |
struct SlDeviceEvent_t |
Data Fields | ||
---|---|---|
SlDeviceEventData_u | Data | |
_u32 | Id |
struct SlDeviceFatalDeviceAssert_t |
union SlDeviceFatalData_u |
Data Fields | ||
---|---|---|
SlDeviceFatalCmdTimeout_t | CmdTimeout | |
SlDeviceFatalDeviceAssert_t | DeviceAssert | |
SlDeviceFatalNoCmdAck_t | NoCmdAck |
struct SlDeviceFatal_t |
Data Fields | ||
---|---|---|
SlDeviceFatalData_u | Data | |
_u32 | Id |
struct SlDeviceUartIfParams_t |
struct SlDeviceVersion_t |
struct SlDateTime_t |