38 #include "data_types.h"
67 #define ERROR_SOCKET_INACTIVE -57
69 #define WLAN_ENABLE (1)
70 #define WLAN_DISABLE (0)
72 #define MAC_ADDR_LEN (6)
74 #define SP_PORTION_SIZE (32)
107 #define CC3000_MINIMAL_RX_SIZE (130 + 1)
108 #define CC3000_MAXIMAL_RX_SIZE (1519 + 1)
129 #define CC3000_MINIMAL_TX_SIZE (130 + 1)
130 #define CC3000_MAXIMAL_TX_SIZE (1519 + 1)
133 #ifdef CC3000_TINY_DRIVER
134 #define TINY_CC3000_MAXIMAL_RX_SIZE 44
135 #define TINY_CC3000_MAXIMAL_TX_SIZE 59
147 #ifndef CC3000_TINY_DRIVER
149 #define CC3000_RX_BUFFER_SIZE (CC3000_MINIMAL_RX_SIZE)
150 #define CC3000_TX_BUFFER_SIZE (CC3000_MINIMAL_TX_SIZE)
154 #define CC3000_RX_BUFFER_SIZE (TINY_CC3000_MAXIMAL_RX_SIZE)
155 #define CC3000_TX_BUFFER_SIZE (TINY_CC3000_MAXIMAL_TX_SIZE)
162 typedef INT32 time_t;
163 typedef UINT32 clock_t;
164 typedef INT32 suseconds_t;
174 typedef CHAR *(*tFWPatches)(UINT32 *usLength);
176 typedef CHAR *(*tDriverPatches)(UINT32 *usLength);
178 typedef CHAR *(*tBootLoaderPatches)(UINT32 *usLength);
180 typedef void (*tWlanCB)(INT32 event_type, CHAR * data, UINT8 length );
182 typedef INT32 (*tWlanReadInteruptPin)(void);
184 typedef void (*tWlanInterruptEnable)(void);
186 typedef void (*tWlanInterruptDisable)(void);
188 typedef void (*tWriteWlanPin)(UINT8 val);
192 UINT16 usRxEventOpcode;
193 UINT16 usEventOrDataReceived;
194 UINT8 *pucReceivedData;
195 UINT8 *pucTxCommandBuffer;
197 tFWPatches sFWPatches;
198 tDriverPatches sDriverPatches;
199 tBootLoaderPatches sBootLoaderPatches;
201 tWlanReadInteruptPin ReadWlanInterruptPin;
202 tWlanInterruptEnable WlanInterruptEnable;
203 tWlanInterruptDisable WlanInterruptDisable;
204 tWriteWlanPin WriteWlanPin;
206 INT32 slTransmitDataError;
207 UINT16 usNumberOfFreeBuffers;
208 UINT16 usSlBufferLength;
210 UINT16 usRxDataPending;
212 UINT32 NumberOfSentPackets;
213 UINT32 NumberOfReleasedPackets;
215 UINT8 InformHostOnTxComplete;
332 #define UINT8_TO_STREAM(_p, _val) {*(_p)++ = (_val);}
334 #define UINT16_TO_STREAM(_p, _u16) (UINT16_TO_STREAM_f(_p, _u16))
336 #define UINT32_TO_STREAM(_p, _u32) (UINT32_TO_STREAM_f(_p, _u32))
338 #define ARRAY_TO_STREAM(p, a, l) {register INT16 _i; for (_i = 0; _i < l; _i++) *(p)++ = ((UINT8 *) a)[_i];}
340 #define STREAM_TO_UINT8(_p, _offset, _u8) {_u8 = (UINT8)(*(_p + _offset));}
342 #define STREAM_TO_UINT16(_p, _offset, _u16) {_u16 = STREAM_TO_UINT16_f(_p, _offset);}
344 #define STREAM_TO_UINT32(_p, _offset, _u32) {_u32 = STREAM_TO_UINT32_f(_p, _offset);}
345 #define STREAM_TO_STREAM(p, a, l) {register INT16 _i; for (_i = 0; _i < l; _i++) *(a)++= ((UINT8 *) p)[_i];}
357 #endif // __cplusplus
359 #endif // __COMMON_H__
void SimpleLinkWaitEvent(UINT16 usOpcode, void *pRetParams)
Wait for event, pass it to the hci_event_handler and update the event opcode in a global variable...
Definition: evnt_handler.c:812
UINT8 * UINT32_TO_STREAM_f(UINT8 *p, UINT32 u32)
This function is used for copying 32 bit to stream while converting to little endian format...
Definition: cc3000_common.c:84
UINT32 STREAM_TO_UINT32_f(CHAR *p, UINT16 offset)
This function is used for copying received stream to 32 bit in little endian format.
Definition: cc3000_common.c:148
void SimpleLinkWaitData(UINT8 *pBuf, UINT8 *from, UINT8 *fromlen)
Wait for data, pass it to the hci_event_handler and update in a global variable that there is data to...
Definition: evnt_handler.c:836
Definition: cc3000_common.h:168
UINT8 * UINT16_TO_STREAM_f(UINT8 *p, UINT16 u16)
This function is used for copying 16 bit to stream while converting to little endian format...
Definition: cc3000_common.c:107
UINT16 STREAM_TO_UINT16_f(CHAR *p, UINT16 offset)
This function is used for copying received stream to 16 bit in little endian format.
Definition: cc3000_common.c:128