Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 50073ed

Browse files
committed
stmhal/cc3k: Remove spaces and tabs at end of lines.
1 parent 94d8246 commit 50073ed

17 files changed

+885
-885
lines changed

stmhal/cc3k/cc3000_common.c

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
* cc3000_common.c.c - CC3000 Host Driver Implementation.
44
* Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/
55
*
6-
* Adapted for use with the Arduino/AVR by KTOWN (Kevin Townsend)
6+
* Adapted for use with the Arduino/AVR by KTOWN (Kevin Townsend)
77
* & Limor Fried for Adafruit Industries
8-
* This library works with the Adafruit CC3000 breakout
8+
* This library works with the Adafruit CC3000 breakout
99
* ----> https://www.adafruit.com/products/1469
1010
* Adafruit invests time and resources providing this open source code,
1111
* please support Adafruit and open-source hardware by purchasing
@@ -20,23 +20,23 @@
2020
*
2121
* Redistributions in binary form must reproduce the above copyright
2222
* notice, this list of conditions and the following disclaimer in the
23-
* documentation and/or other materials provided with the
23+
* documentation and/or other materials provided with the
2424
* distribution.
2525
*
2626
* Neither the name of Texas Instruments Incorporated nor the names of
2727
* its contributors may be used to endorse or promote products derived
2828
* from this software without specific prior written permission.
2929
*
30-
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
31-
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
30+
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
31+
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
3232
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
33-
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
34-
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
35-
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
33+
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
34+
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
35+
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
3636
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
3737
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
38-
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
39-
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
38+
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
39+
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
4040
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
4141
*
4242
*****************************************************************************/
@@ -173,7 +173,7 @@ uint16_t STREAM_TO_UINT16_f(char* cp, uint16_t offset)
173173
uint32_t STREAM_TO_UINT32_f(char * cp, uint16_t offset)
174174
{
175175
uint8_t *p = (uint8_t *)cp;
176-
176+
177177
/*
178178
DEBUGPRINT_F("\tStream2u32: ");
179179
DEBUGPRINT_HEX(cp[offset+3]); DEBUGPRINT_F(" + ");

stmhal/cc3k/cc3000_common.h

Lines changed: 40 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
* cc3000_common.h - CC3000 Host Driver Implementation.
44
* Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/
55
*
6-
* Adapted for use with the Arduino/AVR by KTOWN (Kevin Townsend)
6+
* Adapted for use with the Arduino/AVR by KTOWN (Kevin Townsend)
77
* & Limor Fried for Adafruit Industries
8-
* This library works with the Adafruit CC3000 breakout
8+
* This library works with the Adafruit CC3000 breakout
99
* ----> https://www.adafruit.com/products/1469
1010
* Adafruit invests time and resources providing this open source code,
1111
* please support Adafruit and open-source hardware by purchasing
@@ -20,23 +20,23 @@
2020
*
2121
* Redistributions in binary form must reproduce the above copyright
2222
* notice, this list of conditions and the following disclaimer in the
23-
* documentation and/or other materials provided with the
23+
* documentation and/or other materials provided with the
2424
* distribution.
2525
*
2626
* Neither the name of Texas Instruments Incorporated nor the names of
2727
* its contributors may be used to endorse or promote products derived
2828
* from this software without specific prior written permission.
2929
*
30-
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
31-
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
30+
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
31+
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
3232
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
33-
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
34-
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
35-
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
33+
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
34+
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
35+
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
3636
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
3737
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
38-
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
39-
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
38+
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
39+
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
4040
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
4141
*
4242
*****************************************************************************/
@@ -70,45 +70,45 @@ extern "C" {
7070
//*****************************************************************************
7171
// COMMON DEFINES
7272
//*****************************************************************************
73-
#define ERROR_SOCKET_INACTIVE -57
73+
#define ERROR_SOCKET_INACTIVE -57
7474

75-
#define WLAN_ENABLE (1)
75+
#define WLAN_ENABLE (1)
7676
#define WLAN_DISABLE (0)
7777

7878
#define MAC_ADDR_LEN (6)
7979

8080
#define SP_PORTION_SIZE (32)
8181

8282
// #define CC3000_TINY_DRIVER
83-
84-
/*Defines for minimal and maximal RX buffer size. This size includes the spi
83+
84+
/*Defines for minimal and maximal RX buffer size. This size includes the spi
8585
header and hci header.
8686
The maximal buffer size derives from:
8787
MTU + HCI header + SPI header + sendto() agrs size
8888
The minimum buffer size derives from:
8989
HCI header + SPI header + max args size
9090
9191
This buffer is used for receiving events and data.
92-
The packet can not be longer than MTU size and CC3000 does not support
93-
fragmentation. Note that the same buffer is used for reception of the data
94-
and events from CC3000. That is why the minimum is defined.
92+
The packet can not be longer than MTU size and CC3000 does not support
93+
fragmentation. Note that the same buffer is used for reception of the data
94+
and events from CC3000. That is why the minimum is defined.
9595
The calculation for the actual size of buffer for reception is:
9696
Given the maximal data size MAX_DATA that is expected to be received by
9797
application, the required buffer is:
9898
Using recv() or recvfrom():
99-
99+
100100
max(CC3000_MINIMAL_RX_SIZE, MAX_DATA + HEADERS_SIZE_DATA + fromlen
101101
+ ucArgsize + 1)
102-
102+
103103
Using gethostbyname() with minimal buffer size will limit the host name
104104
returned to 99 bytes only.
105-
The 1 is used for the overrun detection
105+
The 1 is used for the overrun detection
106106
107107
Buffer size increased to 130 following the add_profile() with WEP security
108-
which requires TX buffer size of 130 bytes:
108+
which requires TX buffer size of 130 bytes:
109109
HEADERS_SIZE_EVNT + WLAN_ADD_PROFILE_WEP_PARAM_LEN + MAX SSID LEN + 4 * MAX KEY LEN = 130
110-
MAX SSID LEN = 32
111-
MAX SSID LEN = 13 (with add_profile only ascii key setting is supported,
110+
MAX SSID LEN = 32
111+
MAX SSID LEN = 13 (with add_profile only ascii key setting is supported,
112112
therfore maximum key size is 13)
113113
*/
114114

@@ -117,24 +117,24 @@ extern "C" {
117117

118118
/*Defines for minimal and maximal TX buffer size.
119119
This buffer is used for sending events and data.
120-
The packet can not be longer than MTU size and CC3000 does not support
120+
The packet can not be longer than MTU size and CC3000 does not support
121121
fragmentation. Note that the same buffer is used for transmission of the data
122122
and commands. That is why the minimum is defined.
123123
The calculation for the actual size of buffer for transmission is:
124124
Given the maximal data size MAX_DATA, the required buffer is:
125125
Using Sendto():
126-
126+
127127
max(CC3000_MINIMAL_TX_SIZE, MAX_DATA + SPI_HEADER_SIZE
128128
+ SOCKET_SENDTO_PARAMS_LEN + SIMPLE_LINK_HCI_DATA_HEADER_SIZE + 1)
129-
129+
130130
Using Send():
131-
131+
132132
max(CC3000_MINIMAL_TX_SIZE, MAX_DATA + SPI_HEADER_SIZE
133133
+ HCI_CMND_SEND_ARG_LENGTH + SIMPLE_LINK_HCI_DATA_HEADER_SIZE + 1)
134-
135-
The 1 is used for the overrun detection */
136134
137-
#define CC3000_MINIMAL_TX_SIZE (130 + 1)
135+
The 1 is used for the overrun detection */
136+
137+
#define CC3000_MINIMAL_TX_SIZE (130 + 1)
138138
#define CC3000_MAXIMAL_TX_SIZE (1519 + 1)
139139

140140
//TX and RX buffer sizes, allow to receive and transmit maximum data at length 8.
@@ -143,26 +143,26 @@ extern "C" {
143143
#define TINY_CC3000_MAXIMAL_TX_SIZE 59
144144
#endif
145145

146-
/*In order to determine your preferred buffer size,
146+
/*In order to determine your preferred buffer size,
147147
change CC3000_MAXIMAL_RX_SIZE and CC3000_MAXIMAL_TX_SIZE to a value between
148-
the minimal and maximal specified above.
148+
the minimal and maximal specified above.
149149
Note that the buffers are allocated by SPI.
150150
In case you change the size of those buffers, you might need also to change
151151
the linker file, since for example on MSP430 FRAM devices the buffers are
152152
allocated in the FRAM section that is allocated manually and not by IDE.
153153
*/
154-
154+
155155
#ifndef CC3000_TINY_DRIVER
156-
156+
157157
#define CC3000_RX_BUFFER_SIZE (CC3000_MINIMAL_RX_SIZE)
158158
#define CC3000_TX_BUFFER_SIZE (CC3000_MINIMAL_TX_SIZE)
159-
159+
160160
//if defined TINY DRIVER we use smaller RX and TX buffer in order to minimize RAM consumption
161161
#else
162162
#define CC3000_RX_BUFFER_SIZE (TINY_CC3000_MAXIMAL_RX_SIZE)
163163
#define CC3000_TX_BUFFER_SIZE (TINY_CC3000_MAXIMAL_TX_SIZE)
164164

165-
#endif
165+
#endif
166166

167167
//*****************************************************************************
168168
// Compound Types
@@ -177,7 +177,7 @@ typedef long suseconds_t;
177177

178178
typedef struct timeval timeval;
179179

180-
struct timeval
180+
struct timeval
181181
{
182182
time_t tv_sec; /* seconds */
183183
suseconds_t tv_usec; /* microseconds */
@@ -263,7 +263,7 @@ extern void SimpleLinkWaitEvent(unsigned short usOpcode, void *pRetParams);
263263
//! @return none
264264
//!
265265
//! @brief Wait for data, pass it to the hci_event_handler
266-
//! and update in a global variable that there is
266+
//! and update in a global variable that there is
267267
//! data to read.
268268
//
269269
//*****************************************************************************
@@ -295,7 +295,7 @@ extern uint8_t* UINT32_TO_STREAM_f (uint8_t *p, uint32_t u32);
295295
//!
296296
//! \return pointer to the new stream
297297
//!
298-
//! \brief This function is used for copying 16 bit to stream
298+
//! \brief This function is used for copying 16 bit to stream
299299
//! while converting to little endian format.
300300
//
301301
//*****************************************************************************
@@ -311,7 +311,7 @@ extern uint8_t* UINT16_TO_STREAM_f (uint8_t *p, uint16_t u16);
311311
//!
312312
//! \return pointer to the new 16 bit
313313
//!
314-
//! \brief This function is used for copying received stream to
314+
//! \brief This function is used for copying received stream to
315315
//! 16 bit in little endian format.
316316
//
317317
//*****************************************************************************

stmhal/cc3k/ccspi.c

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
* spi.c - CC3000 Host Driver Implementation.
44
* Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/
55
*
6-
* Adapted for use with the Arduino/AVR by KTOWN (Kevin Townsend)
6+
* Adapted for use with the Arduino/AVR by KTOWN (Kevin Townsend)
77
* & Limor Fried for Adafruit Industries
8-
* This library works with the Adafruit CC3000 breakout
8+
* This library works with the Adafruit CC3000 breakout
99
* ----> https://www.adafruit.com/products/1469
1010
* Adafruit invests time and resources providing this open source code,
1111
* please support Adafruit and open-source hardware by purchasing
@@ -141,7 +141,7 @@ void SpiInit(void)
141141
void SpiClose(void)
142142
{
143143
DEBUGPRINT_F("\tCC3000: SpiClose");
144-
144+
145145
if (sSpiInformation.pRxPacket)
146146
{
147147
sSpiInformation.pRxPacket = 0;
@@ -159,7 +159,7 @@ void SpiClose(void)
159159
void SpiOpen(gcSpiHandleRx pfRxHandler)
160160
{
161161
DEBUGPRINT_F("\tCC3000: SpiOpen");
162-
162+
163163
sSpiInformation.ulSpiState = eSPI_STATE_POWERUP;
164164

165165
memset(spi_buffer, 0, sizeof(spi_buffer));
@@ -170,7 +170,7 @@ void SpiOpen(gcSpiHandleRx pfRxHandler)
170170
sSpiInformation.pTxPacket = NULL;
171171
sSpiInformation.pRxPacket = (unsigned char *)spi_buffer;
172172
sSpiInformation.usRxPacketLength = 0;
173-
173+
174174
spi_buffer[CC3000_RX_BUFFER_SIZE - 1] = CC3000_BUFFER_MAGIC_NUMBER;
175175
wlan_tx_buffer[CC3000_TX_BUFFER_SIZE - 1] = CC3000_BUFFER_MAGIC_NUMBER;
176176

@@ -192,7 +192,7 @@ int init_spi(void)
192192
{
193193

194194
DEBUGPRINT_F("\tCC3000: init_spi\n\r");
195-
195+
196196
/* Set POWER_EN pin to output and disable the CC3000 by default */
197197
pinMode(g_vbatPin, OUTPUT);
198198
digitalWrite(g_vbatPin, 0);
@@ -214,7 +214,7 @@ int init_spi(void)
214214
SPI.setDataMode(SPI_MODE1);
215215
SPI.setBitOrder(MSBFIRST);
216216
SPI.setClockDivider(g_SPIspeed);
217-
217+
218218
// Newly-initialized SPI is in the same state that ASSERT_CS will set it
219219
// to. Invoke DEASSERT (which also restores SPI registers) so the next
220220
// ASSERT call won't clobber the ccspi_old* values -- we need those!
@@ -223,7 +223,7 @@ int init_spi(void)
223223
/* ToDo: Configure IRQ interrupt! */
224224

225225
DEBUGPRINT_F("\tCC3000: Finished init_spi\n\r");
226-
226+
227227
return(ESUCCESS);
228228
}
229229
#endif
@@ -236,7 +236,7 @@ int init_spi(void)
236236
long SpiFirstWrite(unsigned char *ucBuf, unsigned short usLength)
237237
{
238238
DEBUGPRINT_F("\tCC3000: SpiWriteFirst\n\r");
239-
239+
240240
/* Workaround for the first transaction */
241241
CC3000_ASSERT_CS();
242242

@@ -268,7 +268,7 @@ long SpiWrite(unsigned char *pUserBuffer, unsigned short usLength)
268268
unsigned char ucPad = 0;
269269

270270
DEBUGPRINT_F("\tCC3000: SpiWrite\n\r");
271-
271+
272272
/* Figure out the total length of the packet in order to figure out if there is padding or not */
273273
if(!(usLength & 0x0001))
274274
{
@@ -510,7 +510,7 @@ void SpiTriggerRxProcessing(void)
510510
void SSIContReadOperation(void)
511511
{
512512
DEBUGPRINT_F("\tCC3000: SpiContReadOperation\n\r");
513-
513+
514514
/* The header was read - continue with the payload read */
515515
if (!SpiReadDataCont())
516516
{
@@ -527,7 +527,7 @@ void SSIContReadOperation(void)
527527
*/
528528
/**************************************************************************/
529529
void WriteWlanPin( unsigned char val )
530-
{
530+
{
531531
#if 0
532532
if (DEBUG_MODE)
533533
{
@@ -688,7 +688,7 @@ void SPI_IRQ(void)
688688
ccspi_is_in_irq = 1;
689689

690690
DEBUGPRINT_F("\tCC3000: Entering SPI_IRQ\n\r");
691-
691+
692692
if (sSpiInformation.ulSpiState == eSPI_STATE_POWERUP)
693693
{
694694
/* IRQ line was low ... perform a callback on the HCI Layer */
@@ -697,7 +697,7 @@ void SPI_IRQ(void)
697697
else if (sSpiInformation.ulSpiState == eSPI_STATE_IDLE)
698698
{
699699
//DEBUGPRINT_F("IDLE\n\r");
700-
sSpiInformation.ulSpiState = eSPI_STATE_READ_IRQ;
700+
sSpiInformation.ulSpiState = eSPI_STATE_READ_IRQ;
701701
/* IRQ line goes down - start reception */
702702

703703
CC3000_ASSERT_CS();

stmhal/cc3k/ccspi.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
* spi.h - CC3000 Host Driver Implementation.
44
* Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/
55
*
6-
* Adapted for use with the Arduino/AVR by KTOWN (Kevin Townsend)
6+
* Adapted for use with the Arduino/AVR by KTOWN (Kevin Townsend)
77
* & Limor Fried for Adafruit Industries
8-
* This library works with the Adafruit CC3000 breakout
8+
* This library works with the Adafruit CC3000 breakout
99
* ----> https://www.adafruit.com/products/1469
1010
* Adafruit invests time and resources providing this open source code,
1111
* please support Adafruit and open-source hardware by purchasing

0 commit comments

Comments
 (0)