simplelink.h
1  /*
2  * simplelink.h - CC31xx/CC32xx Host Driver Implementation
3  *
4  * Copyright (C) 2015 Texas Instruments Incorporated - https://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 
195 #ifndef __SIMPLELINK_H__
196 #define __SIMPLELINK_H__
197 
198 /* define the default types
199  * If user wants to overwrite it,
200  * he need to undef and define again */
201 #define _u8 unsigned char
202 #define _i8 signed char
203 #define _u16 unsigned short
204 #define _i16 signed short
205 #define _u32 unsigned long
206 #define _i32 signed long
207 
208 #define _volatile volatile
209 #define _const const
210 
211 #include "../user.h"
212 
213 #ifdef __cplusplus
214 extern "C"
215 {
216 #endif
217 
218 
242 /*****************************************************************************/
243 /* Macro declarations for Host Driver version */
244 /*****************************************************************************/
245 #define SL_DRIVER_VERSION "1.0.1.6"
246 #define SL_MAJOR_VERSION_NUM 1L
247 #define SL_MINOR_VERSION_NUM 0L
248 #define SL_VERSION_NUM 1L
249 #define SL_SUB_VERSION_NUM 6L
250 
251 
252 /*****************************************************************************/
253 /* Macro declarations for predefined configurations */
254 /*****************************************************************************/
255 
256 #ifdef SL_TINY
257 
258 #undef SL_INC_ARG_CHECK
259 #undef SL_INC_EXT_API
260 #undef SL_INC_SOCK_SERVER_SIDE_API
261 #undef SL_INC_WLAN_PKG
262 #undef SL_INC_NET_CFG_PKG
263 #undef SL_INC_FS_PKG
264 #undef SL_INC_SET_UART_MODE
265 #undef SL_INC_NVMEM_PKG
266 #define SL_INC_STD_BSD_API_NAMING
267 #define SL_INC_SOCK_CLIENT_SIDE_API
268 #define SL_INC_SOCK_RECV_API
269 #define SL_INC_SOCK_SEND_API
270 #define SL_INC_SOCKET_PKG
271 #define SL_INC_NET_APP_PKG
272 
273 #endif
274 
275 #ifdef SL_SMALL
276 #undef SL_INC_EXT_API
277 #undef SL_INC_NET_APP_PKG
278 #undef SL_INC_NET_CFG_PKG
279 #undef SL_INC_FS_PKG
280 #define SL_INC_ARG_CHECK
281 #define SL_INC_WLAN_PKG
282 #define SL_INC_SOCKET_PKG
283 #define SL_INC_SOCK_CLIENT_SIDE_API
284 #define SL_INC_SOCK_SERVER_SIDE_API
285 #define SL_INC_SOCK_RECV_API
286 #define SL_INC_SOCK_SEND_API
287 #define SL_INC_SET_UART_MODE
288 #endif
289 
290 #ifdef SL_FULL
291 #define SL_INC_EXT_API
292 #define SL_INC_NET_APP_PKG
293 #define SL_INC_NET_CFG_PKG
294 #define SL_INC_FS_PKG
295 #define SL_INC_ARG_CHECK
296 #define SL_INC_WLAN_PKG
297 #define SL_INC_SOCKET_PKG
298 #define SL_INC_SOCK_CLIENT_SIDE_API
299 #define SL_INC_SOCK_SERVER_SIDE_API
300 #define SL_INC_SOCK_RECV_API
301 #define SL_INC_SOCK_SEND_API
302 #define SL_INC_SET_UART_MODE
303 #endif
304 
305 #define SL_RET_CODE_OK (0)
306 #define SL_RET_CODE_INVALID_INPUT (-2)
307 #define SL_RET_CODE_SELF_ERROR (-3)
308 #define SL_RET_CODE_NWP_IF_ERROR (-4)
309 #define SL_RET_CODE_MALLOC_ERROR (-5)
310 #define SL_RET_CODE_ABORT (-6)
311 #define SL_RET_CODE_PROTOCOL_ERROR (-7)
312 
313 
314 /* #define sl_Memcpy memcpy */
315 #define sl_Memset(addr, val, len) memset(addr, val, (size_t)len)
316 #define sl_Memcpy(dest, src, len) memcpy(dest, src, (size_t)len)
317 
318 #ifndef SL_TINY_EXT
319 #define SL_MAX_SOCKETS (_u8)(8)
320 #else
321 #define SL_MAX_SOCKETS (_u8)(2)
322 #endif
323 
324 
325 /*****************************************************************************/
326 /* Types definitions */
327 /*****************************************************************************/
328 
329 #ifndef NULL
330 #define NULL (0)
331 #endif
332 
333 #ifndef FALSE
334 #define FALSE (0)
335 #endif
336 
337 #ifndef TRUE
338 #define TRUE (!FALSE)
339 #endif
340 
341 #ifndef OK
342 #define OK (0)
343 #endif
344 
345 typedef _u16 _SlOpcode_t;
346 typedef _u8 _SlArgSize_t;
347 typedef _i16 _SlDataSize_t;
348 typedef _i16 _SlReturnVal_t;
349 
350 #ifdef __cplusplus
351 }
352 #endif /* __cplusplus */
353 
354 
355 
356 /*
357  * This event status used to block or continue the event propagation
358  * through all the registered external libs/user application
359  *
360  */
361 
362  typedef enum {
363  EVENT_PROPAGATION_BLOCK = 0,
364  EVENT_PROPAGATION_CONTINUE
365 
366  } _SlEventPropogationStatus_e;
367 
368 
369 
370 
371 
372 
373 /*****************************************************************************/
374 /* Include files */
375 /*****************************************************************************/
376 
377 
378 /*
379  objInclusion.h and user.h must be included before all api header files
380  objInclusion.h must be the last arrangement just before including the API header files
381  since it based on the other configurations to decide which object should be included
382 */
383 #include "../source/objInclusion.h"
384 #include "trace.h"
385 #include "fs.h"
386 #include "socket.h"
387 #include "netapp.h"
388 #include "wlan.h"
389 #include "device.h"
390 #include "netcfg.h"
391 #include "wlan_rx_filters.h"
392 
393 
394  /* The general events dispatcher which is
395  * initialized to the user handler */
396 #ifdef sl_GeneralEvtHdlr
397 #define _SlDrvHandleGeneralEvents sl_GeneralEvtHdlr
398 #endif
399 
400  /* The wlan events dispatcher which is
401  * initialized to the user handler */
402 #ifdef sl_WlanEvtHdlr
403 #define _SlDrvHandleWlanEvents sl_WlanEvtHdlr
404 #endif
405 
406  /* The NetApp events dispatcher which is
407  * initialized to the user handler */
408 #ifdef sl_NetAppEvtHdlr
409 #define _SlDrvHandleNetAppEvents sl_NetAppEvtHdlr
410 #endif
411 
412  /* The http server events dispatcher which is
413  * initialized to the user handler if exists */
414 #ifdef sl_HttpServerCallback
415 #define _SlDrvHandleHttpServerEvents sl_HttpServerCallback
416 #endif
417 
418  /* The socket events dispatcher which is
419  * initialized to the user handler */
420 #ifdef sl_SockEvtHdlr
421 #define _SlDrvHandleSockEvents sl_SockEvtHdlr
422 #endif
423 
424 
425 
426 #define __CONCAT(x,y) x ## y
427 #define __CONCAT2(x,y) __CONCAT(x,y)
428 
429 
430 /*
431  * The section below handles the external lib event registration
432  * according to the desired events it specified in its API header file.
433  * The external lib should be first installed by the user (see user.h)
434  */
435 #ifdef SL_EXT_LIB_1
436 
437  /* General Event Registration */
438  #if __CONCAT2(SL_EXT_LIB_1, _NOTIFY_GENERAL_EVENT)
439  extern _SlEventPropogationStatus_e __CONCAT2(SL_EXT_LIB_1, _GeneralEventHdl) (SlDeviceEvent_t *);
440  #define SlExtLib1GeneralEventHandler __CONCAT2(SL_EXT_LIB_1, _GeneralEventHdl)
441 
442  #undef EXT_LIB_REGISTERED_GENERAL_EVENTS
443  #define EXT_LIB_REGISTERED_GENERAL_EVENTS
444  #endif
445 
446  /* Wlan Event Registration */
447  #if __CONCAT2(SL_EXT_LIB_1, _NOTIFY_WLAN_EVENT)
448  extern _SlEventPropogationStatus_e __CONCAT2(SL_EXT_LIB_1, _WlanEventHdl) (SlWlanEvent_t *);
449  #define SlExtLib1WlanEventHandler __CONCAT2(SL_EXT_LIB_1, _WlanEventHdl)
450 
451  #undef EXT_LIB_REGISTERED_WLAN_EVENTS
452  #define EXT_LIB_REGISTERED_WLAN_EVENTS
453  #endif
454 
455  /* NetApp Event Registration */
456  #if __CONCAT2(SL_EXT_LIB_1, _NOTIFY_NETAPP_EVENT)
457  extern _SlEventPropogationStatus_e __CONCAT2(SL_EXT_LIB_1, _NetAppEventHdl) (SlNetAppEvent_t *);
458  #define SlExtLib1NetAppEventHandler __CONCAT2(SL_EXT_LIB_1, _NetAppEventHdl)
459 
460  #undef EXT_LIB_REGISTERED_NETAPP_EVENTS
461  #define EXT_LIB_REGISTERED_NETAPP_EVENTS
462  #endif
463 
464  /* Http Server Event Registration */
465  #if __CONCAT2(SL_EXT_LIB_1, _NOTIFY_HTTP_SERVER_EVENT)
466  extern _SlEventPropogationStatus_e __CONCAT2(SL_EXT_LIB_1, _HttpServerEventHdl) (SlHttpServerEvent_t* , SlHttpServerResponse_t*);
467  #define SlExtLib1HttpServerEventHandler __CONCAT2(SL_EXT_LIB_1, _HttpServerEventHdl)
468 
469  #undef EXT_LIB_REGISTERED_HTTP_SERVER_EVENTS
470  #define EXT_LIB_REGISTERED_HTTP_SERVER_EVENTS
471  #endif
472 
473  /* Socket Event Registration */
474  #if __CONCAT2(SL_EXT_LIB_1, _NOTIFY_SOCK_EVENT)
475  extern _SlEventPropogationStatus_e __CONCAT2(SL_EXT_LIB_1, _SockEventHdl) (SlSockEvent_t *);
476  #define SlExtLib1SockEventHandler __CONCAT2(SL_EXT_LIB_1, _SockEventHdl)
477 
478  #undef EXT_LIB_REGISTERED_SOCK_EVENTS
479  #define EXT_LIB_REGISTERED_SOCK_EVENTS
480  #endif
481 
482 #endif
483 
484 
485 #ifdef SL_EXT_LIB_2
486 
487  /* General Event Registration */
488  #if __CONCAT2(SL_EXT_LIB_2, _NOTIFY_GENERAL_EVENT)
489  extern _SlEventPropogationStatus_e __CONCAT2(SL_EXT_LIB_2, _GeneralEventHdl) (SlDeviceEvent_t *);
490  #define SlExtLib2GeneralEventHandler __CONCAT2(SL_EXT_LIB_2, _GeneralEventHdl)
491 
492  #undef EXT_LIB_REGISTERED_GENERAL_EVENTS
493  #define EXT_LIB_REGISTERED_GENERAL_EVENTS
494  #endif
495 
496  /* Wlan Event Registration */
497  #if __CONCAT2(SL_EXT_LIB_2, _NOTIFY_WLAN_EVENT)
498  extern _SlEventPropogationStatus_e __CONCAT2(SL_EXT_LIB_2, _WlanEventHdl) (SlWlanEvent_t *);
499  #define SlExtLib2WlanEventHandler __CONCAT2(SL_EXT_LIB_2, _WlanEventHdl)
500 
501  #undef EXT_LIB_REGISTERED_WLAN_EVENTS
502  #define EXT_LIB_REGISTERED_WLAN_EVENTS
503  #endif
504 
505  /* NetApp Event Registration */
506  #if __CONCAT2(SL_EXT_LIB_2, _NOTIFY_NETAPP_EVENT)
507  extern _SlEventPropogationStatus_e __CONCAT2(SL_EXT_LIB_2, _NetAppEventHdl) (SlNetAppEvent_t *);
508  #define SlExtLib2NetAppEventHandler __CONCAT2(SL_EXT_LIB_2, _NetAppEventHdl)
509 
510  #undef EXT_LIB_REGISTERED_NETAPP_EVENTS
511  #define EXT_LIB_REGISTERED_NETAPP_EVENTS
512  #endif
513 
514  /* Http Server Event Registration */
515  #if __CONCAT2(SL_EXT_LIB_2, _NOTIFY_HTTP_SERVER_EVENT)
516  extern _SlEventPropogationStatus_e __CONCAT2(SL_EXT_LIB_2, _HttpServerEventHdl) (SlHttpServerEvent_t* , SlHttpServerResponse_t*);
517  #define SlExtLib2HttpServerEventHandler __CONCAT2(SL_EXT_LIB_2, _HttpServerEventHdl)
518 
519  #undef EXT_LIB_REGISTERED_HTTP_SERVER_EVENTS
520  #define EXT_LIB_REGISTERED_HTTP_SERVER_EVENTS
521  #endif
522 
523  /* Socket Event Registration */
524  #if __CONCAT2(SL_EXT_LIB_2, _NOTIFY_SOCK_EVENT)
525  extern _SlEventPropogationStatus_e __CONCAT2(SL_EXT_LIB_2, _SockEventHdl) (SlSockEvent_t *);
526  #define SlExtLib2SockEventHandler __CONCAT2(SL_EXT_LIB_2, _SockEventHdl)
527 
528  #undef EXT_LIB_REGISTERED_SOCK_EVENTS
529  #define EXT_LIB_REGISTERED_SOCK_EVENTS
530  #endif
531 
532 #endif
533 
534 
535 #ifdef SL_EXT_LIB_3
536 
537  /* General Event Registration */
538  #if __CONCAT2(SL_EXT_LIB_3, _NOTIFY_GENERAL_EVENT)
539  extern _SlEventPropogationStatus_e __CONCAT2(SL_EXT_LIB_3, _GeneralEventHdl) (SlDeviceEvent_t *);
540  #define SlExtLib3GeneralEventHandler __CONCAT2(SL_EXT_LIB_3, _GeneralEventHdl)
541 
542  #undef EXT_LIB_REGISTERED_GENERAL_EVENTS
543  #define EXT_LIB_REGISTERED_GENERAL_EVENTS
544  #endif
545 
546  /* Wlan Event Registration */
547  #if __CONCAT2(SL_EXT_LIB_3, _NOTIFY_WLAN_EVENT)
548  extern _SlEventPropogationStatus_e __CONCAT2(SL_EXT_LIB_3, _WlanEventHdl) (SlWlanEvent_t *);
549  #define SlExtLib3WlanEventHandler __CONCAT2(SL_EXT_LIB_3, _WlanEventHdl)
550 
551  #undef EXT_LIB_REGISTERED_WLAN_EVENTS
552  #define EXT_LIB_REGISTERED_WLAN_EVENTS
553  #endif
554 
555  /* NetApp Event Registration */
556  #if __CONCAT2(SL_EXT_LIB_3, _NOTIFY_NETAPP_EVENT)
557  extern _SlEventPropogationStatus_e __CONCAT2(SL_EXT_LIB_3, _NetAppEventHdl) (SlNetAppEvent_t *);
558  #define SlExtLib3NetAppEventHandler __CONCAT2(SL_EXT_LIB_3, _NetAppEventHdl)
559 
560  #undef EXT_LIB_REGISTERED_NETAPP_EVENTS
561  #define EXT_LIB_REGISTERED_NETAPP_EVENTS
562  #endif
563 
564  /* Http Server Event Registration */
565  #if __CONCAT2(SL_EXT_LIB_3, _NOTIFY_HTTP_SERVER_EVENT)
566  extern _SlEventPropogationStatus_e __CONCAT2(SL_EXT_LIB_3, _HttpServerEventHdl) (SlHttpServerEvent_t* , SlHttpServerResponse_t*);
567  #define SlExtLib3HttpServerEventHandler __CONCAT2(SL_EXT_LIB_3, _HttpServerEventHdl)
568 
569  #undef EXT_LIB_REGISTERED_HTTP_SERVER_EVENTS
570  #define EXT_LIB_REGISTERED_HTTP_SERVER_EVENTS
571  #endif
572 
573  /* Socket Event Registration */
574  #if __CONCAT2(SL_EXT_LIB_3, _NOTIFY_SOCK_EVENT)
575  extern _SlEventPropogationStatus_e __CONCAT2(SL_EXT_LIB_3, _SockEventHdl) (SlSockEvent_t *);
576  #define SlExtLib3SockEventHandler __CONCAT2(SL_EXT_LIB_3, _SockEventHdl)
577 
578  #undef EXT_LIB_REGISTERED_SOCK_EVENTS
579  #define EXT_LIB_REGISTERED_SOCK_EVENTS
580  #endif
581 
582 #endif
583 
584 
585 #ifdef SL_EXT_LIB_4
586 
587  /* General Event Registration */
588  #if __CONCAT2(SL_EXT_LIB_4, _NOTIFY_GENERAL_EVENT)
589  extern _SlEventPropogationStatus_e __CONCAT2(SL_EXT_LIB_4, _GeneralEventHdl) (SlDeviceEvent_t *);
590  #define SlExtLib4GeneralEventHandler __CONCAT2(SL_EXT_LIB_4, _GeneralEventHdl)
591 
592  #undef EXT_LIB_REGISTERED_GENERAL_EVENTS
593  #define EXT_LIB_REGISTERED_GENERAL_EVENTS
594  #endif
595 
596  /* Wlan Event Registration */
597  #if __CONCAT2(SL_EXT_LIB_4, _NOTIFY_WLAN_EVENT)
598  extern _SlEventPropogationStatus_e __CONCAT2(SL_EXT_LIB_4, _WlanEventHdl) (SlWlanEvent_t *);
599  #define SlExtLib4WlanEventHandler __CONCAT2(SL_EXT_LIB_4, _WlanEventHdl)
600 
601  #undef EXT_LIB_REGISTERED_WLAN_EVENTS
602  #define EXT_LIB_REGISTERED_WLAN_EVENTS
603  #endif
604 
605  /* NetApp Event Registration */
606  #if __CONCAT2(SL_EXT_LIB_4, _NOTIFY_NETAPP_EVENT)
607  extern _SlEventPropogationStatus_e __CONCAT2(SL_EXT_LIB_4, _NetAppEventHdl) (SlNetAppEvent_t *);
608  #define SlExtLib4NetAppEventHandler __CONCAT2(SL_EXT_LIB_4, _NetAppEventHdl)
609 
610  #undef EXT_LIB_REGISTERED_NETAPP_EVENTS
611  #define EXT_LIB_REGISTERED_NETAPP_EVENTS
612  #endif
613 
614  /* Http Server Event Registration */
615  #if __CONCAT2(SL_EXT_LIB_4, _NOTIFY_HTTP_SERVER_EVENT)
616  extern _SlEventPropogationStatus_e __CONCAT2(SL_EXT_LIB_4, _HttpServerEventHdl) (SlHttpServerEvent_t* , SlHttpServerResponse_t*);
617  #define SlExtLib4HttpServerEventHandler __CONCAT2(SL_EXT_LIB_4, _HttpServerEventHdl)
618 
619  #undef EXT_LIB_REGISTERED_HTTP_SERVER_EVENTS
620  #define EXT_LIB_REGISTERED_HTTP_SERVER_EVENTS
621  #endif
622 
623  /* Socket Event Registration */
624  #if __CONCAT2(SL_EXT_LIB_4, _NOTIFY_SOCK_EVENT)
625  extern _SlEventPropogationStatus_e __CONCAT2(SL_EXT_LIB_4, _SockEventHdl) (SlSockEvent_t *);
626  #define SlExtLib4SockEventHandler __CONCAT2(SL_EXT_LIB_4, _SockEventHdl)
627 
628  #undef EXT_LIB_REGISTERED_SOCK_EVENTS
629  #define EXT_LIB_REGISTERED_SOCK_EVENTS
630  #endif
631 
632 #endif
633 
634 
635 #ifdef SL_EXT_LIB_5
636 
637  /* General Event Registration */
638  #if __CONCAT2(SL_EXT_LIB_5, _NOTIFY_GENERAL_EVENT)
639  extern _SlEventPropogationStatus_e __CONCAT2(SL_EXT_LIB_5, _GeneralEventHdl) (SlDeviceEvent_t *);
640  #define SlExtLib5GeneralEventHandler __CONCAT2(SL_EXT_LIB_5, _GeneralEventHdl)
641 
642  #undef EXT_LIB_REGISTERED_GENERAL_EVENTS
643  #define EXT_LIB_REGISTERED_GENERAL_EVENTS
644  #endif
645 
646  /* Wlan Event Registration */
647  #if __CONCAT2(SL_EXT_LIB_5, _NOTIFY_WLAN_EVENT)
648  extern _SlEventPropogationStatus_e __CONCAT2(SL_EXT_LIB_5, _WlanEventHdl) (SlWlanEvent_t *);
649  #define SlExtLib5WlanEventHandler __CONCAT2(SL_EXT_LIB_5, _WlanEventHdl)
650 
651  #undef EXT_LIB_REGISTERED_WLAN_EVENTS
652  #define EXT_LIB_REGISTERED_WLAN_EVENTS
653  #endif
654 
655  /* NetApp Event Registration */
656  #if __CONCAT2(SL_EXT_LIB_5, _NOTIFY_NETAPP_EVENT)
657  extern _SlEventPropogationStatus_e __CONCAT2(SL_EXT_LIB_5, _NetAppEventHdl) (SlNetAppEvent_t *);
658  #define SlExtLib5NetAppEventHandler __CONCAT2(SL_EXT_LIB_5, _NetAppEventHdl)
659 
660  #undef EXT_LIB_REGISTERED_NETAPP_EVENTS
661  #define EXT_LIB_REGISTERED_NETAPP_EVENTS
662  #endif
663 
664  /* Http Server Event Registration */
665  #if __CONCAT2(SL_EXT_LIB_5, _NOTIFY_HTTP_SERVER_EVENT)
666  extern _SlEventPropogationStatus_e __CONCAT2(SL_EXT_LIB_5, _HttpServerEventHdl) (SlHttpServerEvent_t* , SlHttpServerResponse_t*);
667  #define SlExtLib5HttpServerEventHandler __CONCAT2(SL_EXT_LIB_5, _HttpServerEventHdl)
668 
669  #undef EXT_LIB_REGISTERED_HTTP_SERVER_EVENTS
670  #define EXT_LIB_REGISTERED_HTTP_SERVER_EVENTS
671  #endif
672 
673  /* Socket Event Registration */
674  #if __CONCAT2(SL_EXT_LIB_5, _NOTIFY_SOCK_EVENT)
675  extern _SlEventPropogationStatus_e __CONCAT2(SL_EXT_LIB_5, _SockEventHdl) (SlSockEvent_t *);
676  #define SlExtLib5SockEventHandler __CONCAT2(SL_EXT_LIB_5, _SockEventHdl)
677 
678  #undef EXT_LIB_REGISTERED_SOCK_EVENTS
679  #define EXT_LIB_REGISTERED_SOCK_EVENTS
680  #endif
681 
682 #endif
683 
684 
685 
686 #if defined(EXT_LIB_REGISTERED_GENERAL_EVENTS)
687 extern void _SlDrvHandleGeneralEvents(SlDeviceEvent_t *slGeneralEvent);
688 #endif
689 
690 #if defined(EXT_LIB_REGISTERED_WLAN_EVENTS)
691 extern void _SlDrvHandleWlanEvents(SlWlanEvent_t *slWlanEvent);
692 #endif
693 
694 #if defined (EXT_LIB_REGISTERED_NETAPP_EVENTS)
695 extern void _SlDrvHandleNetAppEvents(SlNetAppEvent_t *slNetAppEvent);
696 #endif
697 
698 #if defined(EXT_LIB_REGISTERED_HTTP_SERVER_EVENTS)
699 extern void _SlDrvHandleHttpServerEvents(SlHttpServerEvent_t *slHttpServerEvent, SlHttpServerResponse_t *slHttpServerResponse);
700 #endif
701 
702 
703 #if defined(EXT_LIB_REGISTERED_SOCK_EVENTS)
704 extern void _SlDrvHandleSockEvents(SlSockEvent_t *slSockEvent);
705 #endif
706 
707 
708 typedef short (*_SlSpawnEntryFunc_t)(void* pValue);
709 
710 #define SL_SPAWN_FLAG_FROM_SL_IRQ_HANDLER (0X1)
711 
712 #ifdef SL_PLATFORM_MULTI_THREADED
713  #include "../source/spawn.h"
714 #else
715  #include "../source/nonos.h"
716 #endif
717 
718 
719 
720 /* Async functions description*/
721 
755 #if (defined(_SlDrvHandleGeneralEvents))
756 extern void _SlDrvHandleGeneralEvents(SlDeviceEvent_t *pSlDeviceEvent);
757 #endif
758 
759 
833 #if (defined(sl_WlanEvtHdlr))
834 extern void sl_WlanEvtHdlr(SlWlanEvent_t* pSlWlanEvent);
835 #endif
836 
837 
864 #if (defined(sl_NetAppEvtHdlr))
865 extern void sl_NetAppEvtHdlr(SlNetAppEvent_t* pSlNetApp);
866 #endif
867 
886 #if (defined(sl_SockEvtHdlr))
887 extern void sl_SockEvtHdlr(SlSockEvent_t* pSlSockEvent);
888 #endif
889 
918 #if (defined(sl_HttpServerCallback))
919 extern void sl_HttpServerCallback(SlHttpServerEvent_t *pSlHttpServerEvent, SlHttpServerResponse_t *pSlHttpServerResponse);
920 #endif
921 
922 
923 
924 
934 #if defined (sl_GetTimestamp)
935 extern _u32 sl_GetTimestamp(void);
936 #endif
937 
945 #ifdef __cplusplus
946 }
947 #endif /* __cplusplus */
948 
949 #endif /* __SIMPLELINK_H__ */
950 
_u32 sl_GetTimestamp(void)
SL get timestamp routine. It returns the timer counter value in ticks unit. The counter must count fr...
void sl_HttpServerCallback(SlHttpServerEvent_t *pSlHttpServerEvent, SlHttpServerResponse_t *pSlHttpServerResponse)
HTTP server async event.
void _SlDrvHandleGeneralEvents(SlDeviceEvent_t *slGeneralEvent)
General async event for inspecting general events.
void sl_SockEvtHdlr(SlSockEvent_t *pSlSockEvent)
Socket Async event handler.
void sl_WlanEvtHdlr(SlWlanEvent_t *pSlWlanEvent)
WLAN Async event handler.
void sl_NetAppEvtHdlr(SlNetAppEvent_t *pSlNetApp)
NETAPP Async event handler.