TI-RTOS for TivaC  2.14.04.31
WiFiCC3100.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2015, Texas Instruments Incorporated
3  * All rights reserved.
4  *
5  * Redistribution and use in source and binary forms, with or without
6  * modification, are permitted provided that the following conditions
7  * are met:
8  *
9  * * Redistributions of source code must retain the above copyright
10  * notice, this list of conditions and the following disclaimer.
11  *
12  * * Redistributions in binary form must reproduce the above copyright
13  * notice, this list of conditions and the following disclaimer in the
14  * documentation and/or other materials provided with the distribution.
15  *
16  * * Neither the name of Texas Instruments Incorporated nor the names of
17  * its contributors may be used to endorse or promote products derived
18  * from this software without specific prior written permission.
19  *
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31  */
125 #ifndef ti_drivers_wifi_WiFiCC3100__include
126 #define ti_drivers_wifi_WiFiCC3100__include
127 
128 #ifdef __cplusplus
129 extern "C" {
130 #endif
131 
132 #if defined(MSP430WARE)
133 #include <ti/sysbios/hal/Hwi.h>
134 #else
135 #include <ti/sysbios/family/arm/m3/Hwi.h>
136 #endif
137 
138 #include <ti/sysbios/knl/Semaphore.h>
139 
140 #include <ti/drivers/SPI.h>
141 #include <ti/drivers/WiFi.h>
142 
145 
149 typedef enum WiFiCC3100_SPI_State {
157 
201 typedef struct WiFiCC3100_HWAttrs {
202  uint32_t irqPort;
203  uint32_t irqPin;
204  uint32_t irqIntNum;
206  uint32_t csPort;
207  uint32_t csPin;
209  uint32_t enPort;
210  uint32_t enPin;
212 
218 typedef struct WiFiCC3100_Object {
219  Hwi_Struct wifiHwi;
221 
222  uint32_t bitRate;
223  unsigned int spiIndex;
224 
225  void (*wifiIntFxn)();
226 
227  Semaphore_Struct readSemaphore;
228  Semaphore_Struct writeSemaphore;
229 
231 
232  bool isOpen;
234 
235 #ifdef __cplusplus
236 }
237 #endif
238 
239 #endif /* ti_drivers_wifi_WiFiCC3100__include */
uint32_t irqIntNum
Definition: WiFiCC3100.h:204
unsigned int spiIndex
Definition: WiFiCC3100.h:223
uint32_t enPort
Definition: WiFiCC3100.h:209
The definition of a WiFi function table that contains the required set of functions to control a spec...
Definition: WiFi.h:237
SPI driver interface.
Definition: WiFiCC3100.h:152
void(* wifiIntFxn)()
Definition: WiFiCC3100.h:225
Definition: WiFiCC3100.h:150
struct WiFiCC3100_HWAttrs WiFiCC3100_HWAttrs
WiFiCC3100 Hardware attributes.
struct WiFiCC3100_Object WiFiCC3100_Object
WiFiCC3100 Object.
Semaphore_Struct readSemaphore
Definition: WiFiCC3100.h:227
Definition: WiFiCC3100.h:155
uint32_t csPin
Definition: WiFiCC3100.h:207
SPI Global configuration.
Definition: SPI.h:418
WiFiCC3100 Hardware attributes.
Definition: WiFiCC3100.h:201
Definition: WiFiCC3100.h:153
uint32_t bitRate
Definition: WiFiCC3100.h:222
WiFi driver interface.
volatile WiFiCC3100_SPI_State spiState
Definition: WiFiCC3100.h:230
uint32_t enPin
Definition: WiFiCC3100.h:210
bool isOpen
Definition: WiFiCC3100.h:232
uint32_t irqPort
Definition: WiFiCC3100.h:202
SPI_Handle spiHandle
Definition: WiFiCC3100.h:220
Definition: WiFiCC3100.h:151
WiFiCC3100 Object.
Definition: WiFiCC3100.h:218
Definition: WiFiCC3100.h:154
const WiFi_FxnTable WiFiCC3100_fxnTable
WiFi function table for CC3100 devices.
WiFiCC3100_SPI_State
SPI state machine. Not needed by user application.
Definition: WiFiCC3100.h:149
uint32_t irqPin
Definition: WiFiCC3100.h:203
Semaphore_Struct writeSemaphore
Definition: WiFiCC3100.h:228
Hwi_Struct wifiHwi
Definition: WiFiCC3100.h:219
uint32_t csPort
Definition: WiFiCC3100.h:206
Copyright 2015, Texas Instruments Incorporated