#include <stdlib.h>
#include <errno.h>
#include <stdint.h>
Go to the source code of this file.
|
| #define | ESUCCESS 0 |
| |
| #define | EFAIL -1 |
| |
| #define | EERROR EFAIL |
| |
| #define | ERROR_SOCKET_INACTIVE -57 |
| |
| #define | WLAN_ENABLE (1) |
| |
| #define | WLAN_DISABLE (0) |
| |
| #define | MAC_ADDR_LEN (6) |
| |
| #define | SP_PORTION_SIZE (32) |
| |
| #define | CC3000_MINIMAL_RX_SIZE (130 + 1) |
| |
| #define | CC3000_MAXIMAL_RX_SIZE (1519 + 1) |
| |
| #define | CC3000_MINIMAL_TX_SIZE (130 + 1) |
| |
| #define | CC3000_MAXIMAL_TX_SIZE (1519 + 1) |
| |
| #define | CC3000_RX_BUFFER_SIZE (CC3000_MINIMAL_RX_SIZE) |
| |
| #define | CC3000_TX_BUFFER_SIZE (CC3000_MINIMAL_TX_SIZE) |
| |
| #define | UINT8_TO_STREAM(_p, _val) {*(_p)++ = (_val);} |
| |
| #define | UINT16_TO_STREAM(_p, _u16) (UINT16_TO_STREAM_f(_p, _u16)) |
| |
| #define | UINT32_TO_STREAM(_p, _u32) (UINT32_TO_STREAM_f(_p, _u32)) |
| |
| #define | ARRAY_TO_STREAM(p, a, l) {register short _i; for (_i = 0; _i < l; _i++) *(p)++ = ((unsigned char *) a)[_i];} |
| |
| #define | STREAM_TO_UINT8(_p, _offset, _u8) {_u8 = (unsigned char)(*(_p + _offset));} |
| |
| #define | STREAM_TO_UINT16(_p, _offset, _u16) {_u16 = STREAM_TO_UINT16_f(_p, _offset);} |
| |
| #define | STREAM_TO_UINT32(_p, _offset, _u32) {_u32 = STREAM_TO_UINT32_f(_p, _offset);} |
| |
| #define | STREAM_TO_STREAM(p, a, l) {register short _i; for (_i = 0; _i < l; _i++) *(a)++= ((unsigned char *) p)[_i];} |
| |
|
| void | SimpleLinkWaitEvent (unsigned short usOpcode, void *pRetParams) |
| | Wait for event, pass it to the hci_event_handler and update the event opcode in a global variable.
|
| |
| void | SimpleLinkWaitData (unsigned char *pBuf, unsigned char *from, unsigned char *fromlen) |
| | Wait for data, pass it to the hci_event_handler and update in a global variable that there is data to read.
|
| |
| unsigned char * | UINT32_TO_STREAM_f (unsigned char *p, unsigned long u32) |
| | This function is used for copying 32 bit to stream while converting to little endian format.
|
| |
| unsigned char * | UINT16_TO_STREAM_f (unsigned char *p, unsigned short u16) |
| | This function is used for copying 16 bit to stream while converting to little endian format.
|
| |
| unsigned short | STREAM_TO_UINT16_f (char *p, unsigned short offset) |
| | This function is used for copying received stream to 16 bit in little endian format.
|
| |
| unsigned long | STREAM_TO_UINT32_f (char *p, unsigned short offset) |
| | This function is used for copying received stream to 32 bit in little endian format.
|
| |
| #define ERROR_SOCKET_INACTIVE -57 |
| #define SP_PORTION_SIZE (32) |
| #define CC3000_MINIMAL_RX_SIZE (130 + 1) |
| #define CC3000_MAXIMAL_RX_SIZE (1519 + 1) |
| #define CC3000_MINIMAL_TX_SIZE (130 + 1) |
| #define CC3000_MAXIMAL_TX_SIZE (1519 + 1) |
| #define UINT8_TO_STREAM |
( |
|
_p, |
|
|
|
_val |
|
) |
| {*(_p)++ = (_val);} |
| #define ARRAY_TO_STREAM |
( |
|
p, |
|
|
|
a, |
|
|
|
l |
|
) |
| {register short _i; for (_i = 0; _i < l; _i++) *(p)++ = ((unsigned char *) a)[_i];} |
| #define STREAM_TO_UINT8 |
( |
|
_p, |
|
|
|
_offset, |
|
|
|
_u8 |
|
) |
| {_u8 = (unsigned char)(*(_p + _offset));} |
| #define STREAM_TO_STREAM |
( |
|
p, |
|
|
|
a, |
|
|
|
l |
|
) |
| {register short _i; for (_i = 0; _i < l; _i++) *(a)++= ((unsigned char *) p)[_i];} |
| typedef char*(* tFWPatches)(unsigned long *usLength) |
| typedef char*(* tDriverPatches)(unsigned long *usLength) |
| typedef char*(* tBootLoaderPatches)(unsigned long *usLength) |
| typedef void(* tWlanCB)(long event_type, char *data, unsigned char length) |
| typedef long(* tWlanReadInteruptPin)(void) |
| typedef void(* tWlanInterruptEnable)(void) |
| typedef void(* tWlanInterruptDisable)(void) |
| typedef void(* tWriteWlanPin)(unsigned char val) |
| void SimpleLinkWaitEvent |
( |
unsigned short |
usOpcode, |
|
|
void * |
pRetParams |
|
) |
| |
Wait for event, pass it to the hci_event_handler and update the event opcode in a global variable.
SimpleLinkWaitEvent
- Parameters
-
| usOpcode | command operation code |
| pRetParams | command return parameters |
- Returns
- none
| void SimpleLinkWaitData |
( |
unsigned char * |
pBuf, |
|
|
unsigned char * |
from, |
|
|
unsigned char * |
fromlen |
|
) |
| |
Wait for data, pass it to the hci_event_handler and update in a global variable that there is data to read.
SimpleLinkWaitData
- Parameters
-
| pBuf | data buffer |
| from | from information |
| fromlen | from information length |
- Returns
- none
| unsigned char* UINT32_TO_STREAM_f |
( |
unsigned char * |
p, |
|
|
unsigned long |
u32 |
|
) |
| |
This function is used for copying 32 bit to stream while converting to little endian format.
UINT32_TO_STREAM_f
- Parameters
-
| p | pointer to the new stream |
| u32 | pointer to the 32 bit |
- Returns
- pointer to the new stream
| unsigned char* UINT16_TO_STREAM_f |
( |
unsigned char * |
p, |
|
|
unsigned short |
u16 |
|
) |
| |
This function is used for copying 16 bit to stream while converting to little endian format.
UINT16_TO_STREAM_f
- Parameters
-
| p | pointer to the new stream |
| u32 | pointer to the 16 bit |
- Returns
- pointer to the new stream
| unsigned short STREAM_TO_UINT16_f |
( |
char * |
p, |
|
|
unsigned short |
offset |
|
) |
| |
This function is used for copying received stream to 16 bit in little endian format.
STREAM_TO_UINT16_f
- Parameters
-
| p | pointer to the stream |
| offset | offset in the stream |
- Returns
- pointer to the new 16 bit
| unsigned long STREAM_TO_UINT32_f |
( |
char * |
p, |
|
|
unsigned short |
offset |
|
) |
| |
This function is used for copying received stream to 32 bit in little endian format.
STREAM_TO_UINT32_f
- Parameters
-
| p | pointer to the stream |
| offset | offset in the stream |
- Returns
- pointer to the new 32 bit