SimpleLink Host Driver
1.0.0.1
Main Page
Modules
Data Structures
Files
File List
All
Data Structures
Functions
Variables
Groups
Pages
simplelink.h
1
/*
2
* simplelink.h - CC31xx/CC32xx Host Driver Implementation
3
*
4
* Copyright (C) 2014 Texas Instruments Incorporated - http://www.ti.com/
5
*
6
*
7
* Redistribution and use in source and binary forms, with or without
8
* modification, are permitted provided that the following conditions
9
* are met:
10
*
11
* Redistributions of source code must retain the above copyright
12
* notice, this list of conditions and the following disclaimer.
13
*
14
* Redistributions in binary form must reproduce the above copyright
15
* notice, this list of conditions and the following disclaimer in the
16
* documentation and/or other materials provided with the
17
* distribution.
18
*
19
* Neither the name of Texas Instruments Incorporated nor the names of
20
* its contributors may be used to endorse or promote products derived
21
* from this software without specific prior written permission.
22
*
23
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
24
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
25
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
26
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
27
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
28
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
29
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
30
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
31
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
32
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
33
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
34
*
35
*/
36
37
216
#ifndef __SIMPLELINK_H__
217
#define __SIMPLELINK_H__
218
219
#include "../user.h"
220
221
#ifdef __cplusplus
222
extern
"C"
223
{
224
#endif
225
226
250
/*****************************************************************************/
251
/* Macro declarations for Host Driver version */
252
/*****************************************************************************/
253
#define SL_DRIVER_VERSION "1.0.0.1"
254
#define SL_MAJOR_VERSION_NUM 1L
255
#define SL_MINOR_VERSION_NUM 0L
256
#define SL_VERSION_NUM 0L
257
#define SL_SUB_VERSION_NUM 1L
258
259
260
/*****************************************************************************/
261
/* Macro declarations for predefined configurations */
262
/*****************************************************************************/
263
264
#ifdef SL_TINY
265
#undef SL_INC_ARG_CHECK
266
#undef SL_INC_EXT_API
267
#undef SL_INC_SOCK_CLIENT_SIDE_API
268
#undef SL_INC_SOCK_SEND_API
269
#undef SL_INC_WLAN_PKG
270
#undef SL_INC_NET_APP_PKG
271
#undef SL_INC_NET_CFG_PKG
272
#undef SL_INC_FS_PKG
273
#define SL_INC_SOCK_SERVER_SIDE_API
274
#define SL_INC_SOCK_RECV_API
275
#define SL_INC_SOCKET_PKG
276
#endif
277
278
#ifdef SL_SMALL
279
#undef SL_INC_EXT_API
280
#undef SL_INC_NET_APP_PKG
281
#undef SL_INC_NET_CFG_PKG
282
#undef SL_INC_FS_PKG
283
#define SL_INC_ARG_CHECK
284
#define SL_INC_WLAN_PKG
285
#define SL_INC_SOCKET_PKG
286
#define SL_INC_SOCK_CLIENT_SIDE_API
287
#define SL_INC_SOCK_SERVER_SIDE_API
288
#define SL_INC_SOCK_RECV_API
289
#define SL_INC_SOCK_SEND_API
290
#endif
291
292
#ifdef SL_FULL
293
#define SL_INC_EXT_API
294
#define SL_INC_NET_APP_PKG
295
#define SL_INC_NET_CFG_PKG
296
#define SL_INC_FS_PKG
297
#define SL_INC_ARG_CHECK
298
#define SL_INC_WLAN_PKG
299
#define SL_INC_SOCKET_PKG
300
#define SL_INC_SOCK_CLIENT_SIDE_API
301
#define SL_INC_SOCK_SERVER_SIDE_API
302
#define SL_INC_SOCK_RECV_API
303
#define SL_INC_SOCK_SEND_API
304
#endif
305
306
#define SL_RET_CODE_OK (0)
307
#define SL_RET_CODE_INVALID_INPUT (-2)
308
#define SL_RET_CODE_SELF_ERROR (-3)
309
#define SL_RET_CODE_NWP_IF_ERROR (-4)
310
#define SL_RET_CODE_MALLOC_ERROR (-5)
311
312
#define sl_Memcpy memcpy
313
#define sl_Memset memset
314
315
#define sl_SyncObjClear(pObj) sl_SyncObjWait(pObj,SL_OS_NO_WAIT)
316
317
#define SL_MAX_SOCKETS (8)
318
319
320
/*****************************************************************************/
321
/* Types definitions */
322
/*****************************************************************************/
323
typedef
void (*_SlSpawnEntryFunc_t)(
void
* pValue);
324
325
#ifndef NULL
326
#define NULL (0)
327
#endif
328
329
#ifndef FALSE
330
#define FALSE (0)
331
#endif
332
333
#ifndef TRUE
334
#define TRUE (!FALSE)
335
#endif
336
337
#ifndef OK
338
#define OK (0)
339
#endif
340
341
#ifndef _SL_USER_TYPES
342
#define _u8 unsigned char
343
#define _i8 signed char
344
345
#define _u16 unsigned short
346
#define _i16 signed short
347
348
#define _u32 unsigned long
349
#define _i32 signed long
350
#define _volatile volatile
351
#define _const const
352
#endif
353
354
typedef
_u16 _SlOpcode_t;
355
typedef
_u8 _SlArgSize_t;
356
typedef
_i16 _SlDataSize_t;
357
typedef
_i16 _SlReturnVal_t;
358
359
#ifdef __cplusplus
360
}
361
#endif
/* __cplusplus */
362
363
364
365
/*****************************************************************************/
366
/* Include files */
367
/*****************************************************************************/
368
369
#ifdef SL_PLATFORM_MULTI_THREADED
370
#include "../source/spawn.h"
371
#else
372
#include "../source/nonos.h"
373
#endif
374
375
376
/*
377
objInclusion.h and user.h must be included before all api header files
378
objInclusion.h must be the last arrangement just before including the API header files
379
since it based on the other configurations to decide which object should be included
380
*/
381
#include "../source/objInclusion.h"
382
#include "trace.h"
383
#include "fs.h"
384
#include "socket.h"
385
#include "netapp.h"
386
#include "wlan.h"
387
#include "device.h"
388
#include "netcfg.h"
389
#include "wlan_rx_filters.h"
390
391
392
393
/* Async functions description*/
394
414
#if (defined(sl_GeneralEvtHdlr))
415
extern
void
sl_GeneralEvtHdlr(
SlDeviceEvent_t
*pSlDeviceEvent);
416
#endif
417
418
492
#if (defined(sl_WlanEvtHdlr))
493
extern
void
sl_WlanEvtHdlr(
SlWlanEvent_t
*pSlWlanEvent);
494
#endif
495
496
523
#if (defined(sl_NetAppEvtHdlr))
524
extern
void
sl_NetAppEvtHdlr(
SlNetAppEvent_t
*pSlNetApp);
525
#endif
526
545
#if (defined(sl_SockEvtHdlr))
546
extern
void
sl_SockEvtHdlr(
SlSockEvent_t
*pSlSockEvent);
547
#endif
548
577
#if (defined(sl_HttpServerCallback))
578
extern
void
sl_HttpServerCallback(
SlHttpServerEvent_t
*pSlHttpServerEvent,
SlHttpServerResponse_t
*pSlHttpServerResponse);
579
#endif
580
587
#ifdef __cplusplus
588
}
589
#endif
/* __cplusplus */
590
591
#endif
/* __SIMPLELINK_H__ */
592
SlNetAppEvent_t
Definition:
socket.h:554
SlWlanEvent_t
Definition:
wlan.h:409
SlDeviceEvent_t
Definition:
device.h:266
SlHttpServerEvent_t
Definition:
netapp.h:247
SlHttpServerResponse_t
Definition:
netapp.h:253
SlSockEvent_t
Definition:
socket.h:433
include
simplelink.h
Generated by
1.8.6