Commit 50073ed5 authored by Damien George's avatar Damien George
Browse files

stmhal/cc3k: Remove spaces and tabs at end of lines.

parent 94d82462
...@@ -3,9 +3,9 @@ ...@@ -3,9 +3,9 @@
* cc3000_common.c.c - CC3000 Host Driver Implementation. * cc3000_common.c.c - CC3000 Host Driver Implementation.
* Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/ * Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/
* *
* Adapted for use with the Arduino/AVR by KTOWN (Kevin Townsend) * Adapted for use with the Arduino/AVR by KTOWN (Kevin Townsend)
* & Limor Fried for Adafruit Industries * & Limor Fried for Adafruit Industries
* This library works with the Adafruit CC3000 breakout * This library works with the Adafruit CC3000 breakout
* ----> https://www.adafruit.com/products/1469 * ----> https://www.adafruit.com/products/1469
* Adafruit invests time and resources providing this open source code, * Adafruit invests time and resources providing this open source code,
* please support Adafruit and open-source hardware by purchasing * please support Adafruit and open-source hardware by purchasing
...@@ -20,23 +20,23 @@ ...@@ -20,23 +20,23 @@
* *
* Redistributions in binary form must reproduce the above copyright * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the * notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the * documentation and/or other materials provided with the
* distribution. * distribution.
* *
* Neither the name of Texas Instruments Incorporated nor the names of * Neither the name of Texas Instruments Incorporated nor the names of
* its contributors may be used to endorse or promote products derived * its contributors may be used to endorse or promote products derived
* from this software without specific prior written permission. * from this software without specific prior written permission.
* *
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* *
*****************************************************************************/ *****************************************************************************/
...@@ -173,7 +173,7 @@ uint16_t STREAM_TO_UINT16_f(char* cp, uint16_t offset) ...@@ -173,7 +173,7 @@ uint16_t STREAM_TO_UINT16_f(char* cp, uint16_t offset)
uint32_t STREAM_TO_UINT32_f(char * cp, uint16_t offset) uint32_t STREAM_TO_UINT32_f(char * cp, uint16_t offset)
{ {
uint8_t *p = (uint8_t *)cp; uint8_t *p = (uint8_t *)cp;
/* /*
DEBUGPRINT_F("\tStream2u32: "); DEBUGPRINT_F("\tStream2u32: ");
DEBUGPRINT_HEX(cp[offset+3]); DEBUGPRINT_F(" + "); DEBUGPRINT_HEX(cp[offset+3]); DEBUGPRINT_F(" + ");
......
...@@ -3,9 +3,9 @@ ...@@ -3,9 +3,9 @@
* cc3000_common.h - CC3000 Host Driver Implementation. * cc3000_common.h - CC3000 Host Driver Implementation.
* Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/ * Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/
* *
* Adapted for use with the Arduino/AVR by KTOWN (Kevin Townsend) * Adapted for use with the Arduino/AVR by KTOWN (Kevin Townsend)
* & Limor Fried for Adafruit Industries * & Limor Fried for Adafruit Industries
* This library works with the Adafruit CC3000 breakout * This library works with the Adafruit CC3000 breakout
* ----> https://www.adafruit.com/products/1469 * ----> https://www.adafruit.com/products/1469
* Adafruit invests time and resources providing this open source code, * Adafruit invests time and resources providing this open source code,
* please support Adafruit and open-source hardware by purchasing * please support Adafruit and open-source hardware by purchasing
...@@ -20,23 +20,23 @@ ...@@ -20,23 +20,23 @@
* *
* Redistributions in binary form must reproduce the above copyright * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the * notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the * documentation and/or other materials provided with the
* distribution. * distribution.
* *
* Neither the name of Texas Instruments Incorporated nor the names of * Neither the name of Texas Instruments Incorporated nor the names of
* its contributors may be used to endorse or promote products derived * its contributors may be used to endorse or promote products derived
* from this software without specific prior written permission. * from this software without specific prior written permission.
* *
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* *
*****************************************************************************/ *****************************************************************************/
...@@ -70,9 +70,9 @@ extern "C" { ...@@ -70,9 +70,9 @@ extern "C" {
//***************************************************************************** //*****************************************************************************
// COMMON DEFINES // COMMON DEFINES
//***************************************************************************** //*****************************************************************************
#define ERROR_SOCKET_INACTIVE -57 #define ERROR_SOCKET_INACTIVE -57
#define WLAN_ENABLE (1) #define WLAN_ENABLE (1)
#define WLAN_DISABLE (0) #define WLAN_DISABLE (0)
#define MAC_ADDR_LEN (6) #define MAC_ADDR_LEN (6)
...@@ -80,8 +80,8 @@ extern "C" { ...@@ -80,8 +80,8 @@ extern "C" {
#define SP_PORTION_SIZE (32) #define SP_PORTION_SIZE (32)
// #define CC3000_TINY_DRIVER // #define CC3000_TINY_DRIVER
/*Defines for minimal and maximal RX buffer size. This size includes the spi /*Defines for minimal and maximal RX buffer size. This size includes the spi
header and hci header. header and hci header.
The maximal buffer size derives from: The maximal buffer size derives from:
MTU + HCI header + SPI header + sendto() agrs size MTU + HCI header + SPI header + sendto() agrs size
...@@ -89,26 +89,26 @@ extern "C" { ...@@ -89,26 +89,26 @@ extern "C" {
HCI header + SPI header + max args size HCI header + SPI header + max args size
This buffer is used for receiving events and data. This buffer is used for receiving events and data.
The packet can not be longer than MTU size and CC3000 does not support The packet can not be longer than MTU size and CC3000 does not support
fragmentation. Note that the same buffer is used for reception of the data fragmentation. Note that the same buffer is used for reception of the data
and events from CC3000. That is why the minimum is defined. and events from CC3000. That is why the minimum is defined.
The calculation for the actual size of buffer for reception is: The calculation for the actual size of buffer for reception is:
Given the maximal data size MAX_DATA that is expected to be received by Given the maximal data size MAX_DATA that is expected to be received by
application, the required buffer is: application, the required buffer is:
Using recv() or recvfrom(): Using recv() or recvfrom():
max(CC3000_MINIMAL_RX_SIZE, MAX_DATA + HEADERS_SIZE_DATA + fromlen max(CC3000_MINIMAL_RX_SIZE, MAX_DATA + HEADERS_SIZE_DATA + fromlen
+ ucArgsize + 1) + ucArgsize + 1)
Using gethostbyname() with minimal buffer size will limit the host name Using gethostbyname() with minimal buffer size will limit the host name
returned to 99 bytes only. returned to 99 bytes only.
The 1 is used for the overrun detection The 1 is used for the overrun detection
Buffer size increased to 130 following the add_profile() with WEP security Buffer size increased to 130 following the add_profile() with WEP security
which requires TX buffer size of 130 bytes: which requires TX buffer size of 130 bytes:
HEADERS_SIZE_EVNT + WLAN_ADD_PROFILE_WEP_PARAM_LEN + MAX SSID LEN + 4 * MAX KEY LEN = 130 HEADERS_SIZE_EVNT + WLAN_ADD_PROFILE_WEP_PARAM_LEN + MAX SSID LEN + 4 * MAX KEY LEN = 130
MAX SSID LEN = 32 MAX SSID LEN = 32
MAX SSID LEN = 13 (with add_profile only ascii key setting is supported, MAX SSID LEN = 13 (with add_profile only ascii key setting is supported,
therfore maximum key size is 13) therfore maximum key size is 13)
*/ */
...@@ -117,24 +117,24 @@ extern "C" { ...@@ -117,24 +117,24 @@ extern "C" {
/*Defines for minimal and maximal TX buffer size. /*Defines for minimal and maximal TX buffer size.
This buffer is used for sending events and data. This buffer is used for sending events and data.
The packet can not be longer than MTU size and CC3000 does not support The packet can not be longer than MTU size and CC3000 does not support
fragmentation. Note that the same buffer is used for transmission of the data fragmentation. Note that the same buffer is used for transmission of the data
and commands. That is why the minimum is defined. and commands. That is why the minimum is defined.
The calculation for the actual size of buffer for transmission is: The calculation for the actual size of buffer for transmission is:
Given the maximal data size MAX_DATA, the required buffer is: Given the maximal data size MAX_DATA, the required buffer is:
Using Sendto(): Using Sendto():
max(CC3000_MINIMAL_TX_SIZE, MAX_DATA + SPI_HEADER_SIZE max(CC3000_MINIMAL_TX_SIZE, MAX_DATA + SPI_HEADER_SIZE
+ SOCKET_SENDTO_PARAMS_LEN + SIMPLE_LINK_HCI_DATA_HEADER_SIZE + 1) + SOCKET_SENDTO_PARAMS_LEN + SIMPLE_LINK_HCI_DATA_HEADER_SIZE + 1)
Using Send(): Using Send():
max(CC3000_MINIMAL_TX_SIZE, MAX_DATA + SPI_HEADER_SIZE max(CC3000_MINIMAL_TX_SIZE, MAX_DATA + SPI_HEADER_SIZE
+ HCI_CMND_SEND_ARG_LENGTH + SIMPLE_LINK_HCI_DATA_HEADER_SIZE + 1) + HCI_CMND_SEND_ARG_LENGTH + SIMPLE_LINK_HCI_DATA_HEADER_SIZE + 1)
The 1 is used for the overrun detection */
#define CC3000_MINIMAL_TX_SIZE (130 + 1) The 1 is used for the overrun detection */
#define CC3000_MINIMAL_TX_SIZE (130 + 1)
#define CC3000_MAXIMAL_TX_SIZE (1519 + 1) #define CC3000_MAXIMAL_TX_SIZE (1519 + 1)
//TX and RX buffer sizes, allow to receive and transmit maximum data at length 8. //TX and RX buffer sizes, allow to receive and transmit maximum data at length 8.
...@@ -143,26 +143,26 @@ extern "C" { ...@@ -143,26 +143,26 @@ extern "C" {
#define TINY_CC3000_MAXIMAL_TX_SIZE 59 #define TINY_CC3000_MAXIMAL_TX_SIZE 59
#endif #endif
/*In order to determine your preferred buffer size, /*In order to determine your preferred buffer size,
change CC3000_MAXIMAL_RX_SIZE and CC3000_MAXIMAL_TX_SIZE to a value between change CC3000_MAXIMAL_RX_SIZE and CC3000_MAXIMAL_TX_SIZE to a value between
the minimal and maximal specified above. the minimal and maximal specified above.
Note that the buffers are allocated by SPI. Note that the buffers are allocated by SPI.
In case you change the size of those buffers, you might need also to change In case you change the size of those buffers, you might need also to change
the linker file, since for example on MSP430 FRAM devices the buffers are the linker file, since for example on MSP430 FRAM devices the buffers are
allocated in the FRAM section that is allocated manually and not by IDE. allocated in the FRAM section that is allocated manually and not by IDE.
*/ */
#ifndef CC3000_TINY_DRIVER #ifndef CC3000_TINY_DRIVER
#define CC3000_RX_BUFFER_SIZE (CC3000_MINIMAL_RX_SIZE) #define CC3000_RX_BUFFER_SIZE (CC3000_MINIMAL_RX_SIZE)
#define CC3000_TX_BUFFER_SIZE (CC3000_MINIMAL_TX_SIZE) #define CC3000_TX_BUFFER_SIZE (CC3000_MINIMAL_TX_SIZE)
//if defined TINY DRIVER we use smaller RX and TX buffer in order to minimize RAM consumption //if defined TINY DRIVER we use smaller RX and TX buffer in order to minimize RAM consumption
#else #else
#define CC3000_RX_BUFFER_SIZE (TINY_CC3000_MAXIMAL_RX_SIZE) #define CC3000_RX_BUFFER_SIZE (TINY_CC3000_MAXIMAL_RX_SIZE)
#define CC3000_TX_BUFFER_SIZE (TINY_CC3000_MAXIMAL_TX_SIZE) #define CC3000_TX_BUFFER_SIZE (TINY_CC3000_MAXIMAL_TX_SIZE)
#endif #endif
//***************************************************************************** //*****************************************************************************
// Compound Types // Compound Types
...@@ -177,7 +177,7 @@ typedef long suseconds_t; ...@@ -177,7 +177,7 @@ typedef long suseconds_t;
typedef struct timeval timeval; typedef struct timeval timeval;
struct timeval struct timeval
{ {
time_t tv_sec; /* seconds */ time_t tv_sec; /* seconds */
suseconds_t tv_usec; /* microseconds */ suseconds_t tv_usec; /* microseconds */
...@@ -263,7 +263,7 @@ extern void SimpleLinkWaitEvent(unsigned short usOpcode, void *pRetParams); ...@@ -263,7 +263,7 @@ extern void SimpleLinkWaitEvent(unsigned short usOpcode, void *pRetParams);
//! @return none //! @return none
//! //!
//! @brief Wait for data, pass it to the hci_event_handler //! @brief Wait for data, pass it to the hci_event_handler
//! and update in a global variable that there is //! and update in a global variable that there is
//! data to read. //! data to read.
// //
//***************************************************************************** //*****************************************************************************
...@@ -295,7 +295,7 @@ extern uint8_t* UINT32_TO_STREAM_f (uint8_t *p, uint32_t u32); ...@@ -295,7 +295,7 @@ extern uint8_t* UINT32_TO_STREAM_f (uint8_t *p, uint32_t u32);
//! //!
//! \return pointer to the new stream //! \return pointer to the new stream
//! //!
//! \brief This function is used for copying 16 bit to stream //! \brief This function is used for copying 16 bit to stream
//! while converting to little endian format. //! while converting to little endian format.
// //
//***************************************************************************** //*****************************************************************************
...@@ -311,7 +311,7 @@ extern uint8_t* UINT16_TO_STREAM_f (uint8_t *p, uint16_t u16); ...@@ -311,7 +311,7 @@ extern uint8_t* UINT16_TO_STREAM_f (uint8_t *p, uint16_t u16);
//! //!
//! \return pointer to the new 16 bit //! \return pointer to the new 16 bit
//! //!
//! \brief This function is used for copying received stream to //! \brief This function is used for copying received stream to
//! 16 bit in little endian format. //! 16 bit in little endian format.
// //
//***************************************************************************** //*****************************************************************************
......
...@@ -3,9 +3,9 @@ ...@@ -3,9 +3,9 @@
* spi.c - CC3000 Host Driver Implementation. * spi.c - CC3000 Host Driver Implementation.
* Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/ * Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/
* *
* Adapted for use with the Arduino/AVR by KTOWN (Kevin Townsend) * Adapted for use with the Arduino/AVR by KTOWN (Kevin Townsend)
* & Limor Fried for Adafruit Industries * & Limor Fried for Adafruit Industries
* This library works with the Adafruit CC3000 breakout * This library works with the Adafruit CC3000 breakout
* ----> https://www.adafruit.com/products/1469 * ----> https://www.adafruit.com/products/1469
* Adafruit invests time and resources providing this open source code, * Adafruit invests time and resources providing this open source code,
* please support Adafruit and open-source hardware by purchasing * please support Adafruit and open-source hardware by purchasing
...@@ -141,7 +141,7 @@ void SpiInit(void) ...@@ -141,7 +141,7 @@ void SpiInit(void)
void SpiClose(void) void SpiClose(void)
{ {
DEBUGPRINT_F("\tCC3000: SpiClose"); DEBUGPRINT_F("\tCC3000: SpiClose");
if (sSpiInformation.pRxPacket) if (sSpiInformation.pRxPacket)
{ {
sSpiInformation.pRxPacket = 0; sSpiInformation.pRxPacket = 0;
...@@ -159,7 +159,7 @@ void SpiClose(void) ...@@ -159,7 +159,7 @@ void SpiClose(void)
void SpiOpen(gcSpiHandleRx pfRxHandler) void SpiOpen(gcSpiHandleRx pfRxHandler)
{ {
DEBUGPRINT_F("\tCC3000: SpiOpen"); DEBUGPRINT_F("\tCC3000: SpiOpen");
sSpiInformation.ulSpiState = eSPI_STATE_POWERUP; sSpiInformation.ulSpiState = eSPI_STATE_POWERUP;
memset(spi_buffer, 0, sizeof(spi_buffer)); memset(spi_buffer, 0, sizeof(spi_buffer));
...@@ -170,7 +170,7 @@ void SpiOpen(gcSpiHandleRx pfRxHandler) ...@@ -170,7 +170,7 @@ void SpiOpen(gcSpiHandleRx pfRxHandler)
sSpiInformation.pTxPacket = NULL; sSpiInformation.pTxPacket = NULL;
sSpiInformation.pRxPacket = (unsigned char *)spi_buffer; sSpiInformation.pRxPacket = (unsigned char *)spi_buffer;
sSpiInformation.usRxPacketLength = 0; sSpiInformation.usRxPacketLength = 0;
spi_buffer[CC3000_RX_BUFFER_SIZE - 1] = CC3000_BUFFER_MAGIC_NUMBER; spi_buffer[CC3000_RX_BUFFER_SIZE - 1] = CC3000_BUFFER_MAGIC_NUMBER;
wlan_tx_buffer[CC3000_TX_BUFFER_SIZE - 1] = CC3000_BUFFER_MAGIC_NUMBER; wlan_tx_buffer[CC3000_TX_BUFFER_SIZE - 1] = CC3000_BUFFER_MAGIC_NUMBER;
...@@ -192,7 +192,7 @@ int init_spi(void) ...@@ -192,7 +192,7 @@ int init_spi(void)
{ {
DEBUGPRINT_F("\tCC3000: init_spi\n\r"); DEBUGPRINT_F("\tCC3000: init_spi\n\r");
/* Set POWER_EN pin to output and disable the CC3000 by default */ /* Set POWER_EN pin to output and disable the CC3000 by default */
pinMode(g_vbatPin, OUTPUT); pinMode(g_vbatPin, OUTPUT);
digitalWrite(g_vbatPin, 0); digitalWrite(g_vbatPin, 0);
...@@ -214,7 +214,7 @@ int init_spi(void) ...@@ -214,7 +214,7 @@ int init_spi(void)
SPI.setDataMode(SPI_MODE1); SPI.setDataMode(SPI_MODE1);
SPI.setBitOrder(MSBFIRST); SPI.setBitOrder(MSBFIRST);
SPI.setClockDivider(g_SPIspeed); SPI.setClockDivider(g_SPIspeed);
// Newly-initialized SPI is in the same state that ASSERT_CS will set it // Newly-initialized SPI is in the same state that ASSERT_CS will set it
// to. Invoke DEASSERT (which also restores SPI registers) so the next // to. Invoke DEASSERT (which also restores SPI registers) so the next
// ASSERT call won't clobber the ccspi_old* values -- we need those! // ASSERT call won't clobber the ccspi_old* values -- we need those!
...@@ -223,7 +223,7 @@ int init_spi(void) ...@@ -223,7 +223,7 @@ int init_spi(void)
/* ToDo: Configure IRQ interrupt! */ /* ToDo: Configure IRQ interrupt! */
DEBUGPRINT_F("\tCC3000: Finished init_spi\n\r"); DEBUGPRINT_F("\tCC3000: Finished init_spi\n\r");
return(ESUCCESS); return(ESUCCESS);
} }
#endif #endif
...@@ -236,7 +236,7 @@ int init_spi(void) ...@@ -236,7 +236,7 @@ int init_spi(void)
long SpiFirstWrite(unsigned char *ucBuf, unsigned short usLength) long SpiFirstWrite(unsigned char *ucBuf, unsigned short usLength)
{ {
DEBUGPRINT_F("\tCC3000: SpiWriteFirst\n\r"); DEBUGPRINT_F("\tCC3000: SpiWriteFirst\n\r");
/* Workaround for the first transaction */ /* Workaround for the first transaction */
CC3000_ASSERT_CS(); CC3000_ASSERT_CS();
...@@ -268,7 +268,7 @@ long SpiWrite(unsigned char *pUserBuffer, unsigned short usLength) ...@@ -268,7 +268,7 @@ long SpiWrite(unsigned char *pUserBuffer, unsigned short usLength)
unsigned char ucPad = 0; unsigned char ucPad = 0;
DEBUGPRINT_F("\tCC3000: SpiWrite\n\r"); DEBUGPRINT_F("\tCC3000: SpiWrite\n\r");
/* Figure out the total length of the packet in order to figure out if there is padding or not */ /* Figure out the total length of the packet in order to figure out if there is padding or not */
if(!(usLength & 0x0001)) if(!(usLength & 0x0001))
{ {
...@@ -510,7 +510,7 @@ void SpiTriggerRxProcessing(void) ...@@ -510,7 +510,7 @@ void SpiTriggerRxProcessing(void)
void SSIContReadOperation(void) void SSIContReadOperation(void)
{ {
DEBUGPRINT_F("\tCC3000: SpiContReadOperation\n\r"); DEBUGPRINT_F("\tCC3000: SpiContReadOperation\n\r");
/* The header was read - continue with the payload read */ /* The header was read - continue with the payload read */
if (!SpiReadDataCont()) if (!SpiReadDataCont())
{ {
...@@ -527,7 +527,7 @@ void SSIContReadOperation(void) ...@@ -527,7 +527,7 @@ void SSIContReadOperation(void)
*/ */
/**************************************************************************/ /**************************************************************************/
void WriteWlanPin( unsigned char val ) void WriteWlanPin( unsigned char val )
{ {
#if 0 #if 0
if (DEBUG_MODE) if (DEBUG_MODE)
{ {
...@@ -688,7 +688,7 @@ void SPI_IRQ(void) ...@@ -688,7 +688,7 @@ void SPI_IRQ(void)
ccspi_is_in_irq = 1; ccspi_is_in_irq = 1;
DEBUGPRINT_F("\tCC3000: Entering SPI_IRQ\n\r"); DEBUGPRINT_F("\tCC3000: Entering SPI_IRQ\n\r");
if (sSpiInformation.ulSpiState == eSPI_STATE_POWERUP) if (sSpiInformation.ulSpiState == eSPI_STATE_POWERUP)
{ {
/* IRQ line was low ... perform a callback on the HCI Layer */ /* IRQ line was low ... perform a callback on the HCI Layer */
...@@ -697,7 +697,7 @@ void SPI_IRQ(void) ...@@ -697,7 +697,7 @@ void SPI_IRQ(void)
else if (sSpiInformation.ulSpiState == eSPI_STATE_IDLE) else if (sSpiInformation.ulSpiState == eSPI_STATE_IDLE)
{ {
//DEBUGPRINT_F("IDLE\n\r"); //DEBUGPRINT_F("IDLE\n\r");
sSpiInformation.ulSpiState = eSPI_STATE_READ_IRQ; sSpiInformation.ulSpiState = eSPI_STATE_READ_IRQ;
/* IRQ line goes down - start reception */ /* IRQ line goes down - start reception */
CC3000_ASSERT_CS(); CC3000_ASSERT_CS();
......
...@@ -3,9 +3,9 @@ ...@@ -3,9 +3,9 @@
* spi.h - CC3000 Host Driver Implementation. * spi.h - CC3000 Host Driver Implementation.
* Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/ * Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/
* *
* Adapted for use with the Arduino/AVR by KTOWN (Kevin Townsend) * Adapted for use with the Arduino/AVR by KTOWN (Kevin Townsend)
* & Limor Fried for Adafruit Industries * & Limor Fried for Adafruit Industries
* This library works with the Adafruit CC3000 breakout * This library works with the Adafruit CC3000 breakout
* ----> https://www.adafruit.com/products/1469 * ----> https://www.adafruit.com/products/1469
* Adafruit invests time and resources providing this open source code, * Adafruit invests time and resources providing this open source code,
* please support Adafruit and open-source hardware by purchasing * please support Adafruit and open-source hardware by purchasing
......
...@@ -3,9 +3,9 @@ ...@@ -3,9 +3,9 @@
* evnt_handler.h - CC3000 Host Driver Implementation. * evnt_handler.h - CC3000 Host Driver Implementation.
* Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/ * Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/
* *
* Adapted for use with the Arduino/AVR by KTOWN (Kevin Townsend) * Adapted for use with the Arduino/AVR by KTOWN (Kevin Townsend)
* & Limor Fried for Adafruit Industries * & Limor Fried for Adafruit Industries
* This library works with the Adafruit CC3000 breakout * This library works with the Adafruit CC3000 breakout
* ----> https://www.adafruit.com/products/1469 * ----> https://www.adafruit.com/products/1469
* Adafruit invests time and resources providing this open source code, * Adafruit invests time and resources providing this open source code,
* please support Adafruit and open-source hardware by purchasing * please support Adafruit and open-source hardware by purchasing
...@@ -20,23 +20,23 @@ ...@@ -20,23 +20,23 @@
* *
* Redistributions in binary form must reproduce the above copyright * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the * notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the * documentation and/or other materials provided with the
* distribution. * distribution.
* *
* Neither the name of Texas Instruments Incorporated nor the names of * Neither the name of Texas Instruments Incorporated nor the names of
* its contributors may be used to endorse or promote products derived * its contributors may be used to endorse or promote products derived
* from this software without specific prior written permission. * from this software without specific prior written permission.
* *
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* *
*****************************************************************************/ *****************************************************************************/
...@@ -100,7 +100,7 @@ extern long hci_unsol_event_handler(char *event_hdr); ...@@ -100,7 +100,7 @@ extern long hci_unsol_event_handler(char *event_hdr);
//! //!
//! @return ESUCCESS if successful, EFAIL if an error occurred //! @return ESUCCESS if successful, EFAIL if an error occurred
//! //!
//! @brief Parse the incoming unsolicited event packets and issues //! @brief Parse the incoming unsolicited event packets and issues
//! corresponding event handler. //! corresponding event handler.
// //
//***************************************************************************** //*****************************************************************************
...@@ -126,7 +126,7 @@ typedef struct _bsd_accept_return_t ...@@ -126,7 +126,7 @@ typedef struct _bsd_accept_return_t
long iSocketDescriptor; long iSocketDescriptor;
long iStatus; long iStatus;
sockaddr tSocketAddress; sockaddr tSocketAddress;
} tBsdReturnParams; } tBsdReturnParams;
......
...@@ -3,9 +3,9 @@ ...@@ -3,9 +3,9 @@
* hci.c - CC3000 Host Driver Implementation. * hci.c - CC3000 Host Driv