TI-RTOS Drivers  tidrivers_full_2_20_00_08
Data Structures | Typedefs | Variables
WiFiCC3200.h File Reference

Detailed Description

WiFi driver implementation for the SimpleLink Wi-Fi CC3200 device.

===========================================================================

The WiFi header file should be included in the application as follows:

Refer to WiFi.h for a complete description of APIs & example of use.

This WiFi driver implementation is designed for the SimpleLink Wi-Fi CC3200 device. The CC3200 has a dedicated SPI peripheral utilized by this driver. Corresponding DMA channels are utilized as well. This means that in addition to a WiFi_config array, a SPI_config array SPI entry must be provided. See SPI.h, for more details.

The SPI transport layer used by the CC3200 uses an interrupt to signal when the network processor requires attention. The interrupt number is configured in the WiFiCC3200_HWAttrs structure. GPIO interrupts are not used, unlike other WiFi driver implementations.

This WiFi driver implementation provides the SPI transport layer required by the SimpleLink Host Driver. In the case of unsolicited events that require the application to make decisions (such as an unsolicited disconnect from an AP), the SimpleLink Host Driver specifies callbacks which must be modified to fit application requirements. Contrary to other WiFi driver implementations, callback function pointers are not provided to WiFi_open() as arguments. An example of how to modify the SimpleLink Host Driver callbacks is shown below:

void SimpleLinkWlanEventHandler(SlWlanEvent_t *pArgs)
{
switch(pArgs->Event){
case SL_WLAN_CONNECT_EVENT:
// CC3200 connected to an AP
deviceConnected = true;
break;
case SL_WLAN_DISCONNECT_EVENT:
// CC3200 disconnected from an AP
deviceConnected = false;
break;
case SL_WLAN_SMART_CONFIG_START_EVENT:
break;
case SL_WLAN_SMART_CONFIG_STOP_EVENT:
break;
}
}
void function0()
{
WiFi_Handle handle;
WiFi_Params params;
WiFi_Params_init(&params);
handle = WiFi_open(WiFi_configIndex, SPI_configIndex, NULL, &params);
if (!handle) {
System_abort("WiFi did not open");
}
// Wi-Fi device's host driver APIs (such as socket()) may now be used
}

For a list of all events and details on what data they may provide, see the Porting - Event Handlers section of the SimpleLink Host Driver API reference guide on SimpleLink Wi-Fi CC3200 Wiki.

The SimpleLink Host Driver APIs sl_Start() must be called by the user application to start the network processor. Additionally, sl_Start() and *sl_Stop() can be called by the application to restart the CC3200 without having to close and reopen the WiFi Driver instance.

The SimpleLink Host Driver for the CC3200 device is featured as in TI-Middleware (tidrivers_install_dir/packages/ti/mw/wifi/cc3x00).

For more on the SimpleLink Host Driver APIs see SimpleLink Wi-Fi CC3200 Wiki.


#include <ti/sysbios/knl/Semaphore.h>
#include <ti/sysbios/family/arm/m3/Hwi.h>
#include <ti/drivers/SPI.h>
#include <ti/drivers/WiFi.h>
Include dependency graph for WiFiCC3200.h:

Go to the source code of this file.

Data Structures

struct  WiFiCC3200_HWAttrs
 WiFiCC3200 Hardware attributes. More...
 
struct  WiFiCC3200_Object
 WiFiCC3200 Object. More...
 

Typedefs

typedef struct WiFiCC3200_HWAttrs WiFiCC3200_HWAttrs
 WiFiCC3200 Hardware attributes. More...
 
typedef struct WiFiCC3200_Object WiFiCC3200_Object
 WiFiCC3200 Object. More...
 

Variables

const WiFi_FxnTable WiFiCC3200_fxnTable
 WiFi function table for CC3200 devices. More...
 

Typedef Documentation

WiFiCC3200 Hardware attributes.

These fields are used by driverlib APIs and therefore must be populated by driverlib macro definitions. For CCWare, these definitions are found in:

  • inc/hw_ints.h

A sample structure is shown below:

1 const WiFiCC3200_HWAttrs wiFiCC3000HWAttrs[] = {
2  {
3  INT_NWPIC,
4  }
5 };

WiFiCC3200 Object.

The application must not access any member variables of this structure!

Variable Documentation

const WiFi_FxnTable WiFiCC3200_fxnTable

WiFi function table for CC3200 devices.

Copyright 2016, Texas Instruments Incorporated