SimpleLink CC3120/CC3220 Host Driver  Version 2.0.1.15
Simplifies the implementation of Internet connectivity
simplelink.h
1 /*
2  * Copyright (C) 2015 Texas Instruments Incorporated
3  *
4  * All rights reserved. Property of Texas Instruments Incorporated.
5  * Restricted rights to use, duplicate or disclose this code are
6  * granted through contract.
7  *
8  * The program may not be used without the written permission of
9  * Texas Instruments Incorporated or against the terms and conditions
10  * stipulated in the agreement under which this program has been supplied,
11  * and under no circumstances can it be used with non-TI connectivity device.
12  *
13  */
14 
15 
259 #ifndef __SIMPLELINK_H__
260 #define __SIMPLELINK_H__
261 
262 /* define the default types
263  * If user wants to overwrite it,
264  * he need to undef and define again */
265 #define _u8 unsigned char
266 #define _i8 signed char
267 #define _u16 unsigned short
268 #define _i16 signed short
269 #define _u32 unsigned long
270 #define _i32 signed long
271 
272 #define _volatile volatile
273 #define _const const
274 
275 #include <ti/drivers/net/wifi/porting/user.h>
276 
277 #ifdef __cplusplus
278 extern "C"
279 {
280 #endif
281 
311 /*****************************************************************************/
312 /* Macro declarations for Host Driver version */
313 /*****************************************************************************/
314 #define SL_DRIVER_VERSION "2.0.1.15"
315 #define SL_MAJOR_VERSION_NUM 2L
316 #define SL_MINOR_VERSION_NUM 0L
317 #define SL_VERSION_NUM 1L
318 #define SL_SUB_VERSION_NUM 15L
319 
320 
321 /*****************************************************************************/
322 /* Macro declarations for predefined configurations */
323 /*****************************************************************************/
324 
325 #ifdef SL_TINY
326 
327 #undef SL_INC_ARG_CHECK
328 #undef SL_INC_EXT_API
329 #undef SL_INC_SOCK_SERVER_SIDE_API
330 #undef SL_INC_WLAN_PKG
331 #undef SL_INC_NET_CFG_PKG
332 #undef SL_INC_FS_PKG
333 #undef SL_INC_SET_UART_MODE
334 #undef SL_INC_NVMEM_PKG
335 #define SL_INC_SOCK_CLIENT_SIDE_API
336 #define SL_INC_SOCK_RECV_API
337 #define SL_INC_SOCK_SEND_API
338 #define SL_INC_SOCKET_PKG
339 #define SL_INC_NET_APP_PKG
340 
341 #endif
342 
343 #ifdef SL_SMALL
344 #undef SL_INC_EXT_API
345 #undef SL_INC_NET_APP_PKG
346 #undef SL_INC_NET_CFG_PKG
347 #undef SL_INC_FS_PKG
348 #define SL_INC_ARG_CHECK
349 #define SL_INC_WLAN_PKG
350 #define SL_INC_SOCKET_PKG
351 #define SL_INC_SOCK_CLIENT_SIDE_API
352 #define SL_INC_SOCK_SERVER_SIDE_API
353 #define SL_INC_SOCK_RECV_API
354 #define SL_INC_SOCK_SEND_API
355 #define SL_INC_SET_UART_MODE
356 #endif
357 
358 #ifdef SL_FULL
359 #define SL_INC_EXT_API
360 #define SL_INC_NET_APP_PKG
361 #define SL_INC_NET_CFG_PKG
362 #define SL_INC_FS_PKG
363 #define SL_INC_ARG_CHECK
364 #define SL_INC_WLAN_PKG
365 #define SL_INC_SOCKET_PKG
366 #define SL_INC_SOCK_CLIENT_SIDE_API
367 #define SL_INC_SOCK_SERVER_SIDE_API
368 #define SL_INC_SOCK_RECV_API
369 #define SL_INC_SOCK_SEND_API
370 #define SL_INC_SET_UART_MODE
371 #endif
372 
373 
374 
375 /* #define sl_Memcpy memcpy */
376 #define sl_Memset(addr, val, len) memset(addr, val, (size_t)len)
377 #define sl_Memcpy(dest, src, len) memcpy(dest, src, (size_t)len)
378 #define sl_Memmove(dest, src, len) memmove(dest, src, (size_t)len)
379 
380 
381 #ifndef SL_TINY
382 #define SL_MAX_SOCKETS (_u8)(16)
383 #else
384 #define SL_MAX_SOCKETS (_u8)(2)
385 #endif
386 
387 
388 /*****************************************************************************/
389 /* Types definitions */
390 /*****************************************************************************/
391 
392 #ifndef NULL
393 #define NULL (0)
394 #endif
395 
396 #ifndef FALSE
397 #define FALSE (0)
398 #endif
399 
400 #ifndef TRUE
401 #define TRUE (!FALSE)
402 #endif
403 
404 #ifndef OK
405 #define OK (0)
406 #endif
407 
408 typedef _u16 _SlOpcode_t;
409 typedef _u8 _SlArgSize_t;
410 typedef _i16 _SlDataSize_t;
411 typedef _i16 _SlReturnVal_t;
412 
413 /*
414  * This event status used to block or continue the event propagation
415  * through all the registered external libs/user application
416  *
417  */
418 
419  typedef enum {
420  EVENT_PROPAGATION_BLOCK = 0,
421  EVENT_PROPAGATION_CONTINUE
422 
423  } _SlEventPropogationStatus_e;
424 
425 
426 
427 /*****************************************************************************/
428 /* Include files */
429 /*****************************************************************************/
430 
431 
432 /*
433  objInclusion.h and user.h must be included before all api header files
434  objInclusion.h must be the last arrangement just before including the API header files
435  since it based on the other configurations to decide which object should be included
436 */
437 #include "source/objInclusion.h"
438 #include "trace.h"
439 #include "fs.h"
440 #include "sl_socket.h"
441 #include "netapp.h"
442 #include "wlan.h"
443 #include "device.h"
444 #include "netcfg.h"
445 #include "netutil.h"
446 #include "errors.h"
447 #include "eventreg.h"
448 
452  /* In case of use dynamic event registration
453  * redirect the event to the internal mechanism */
454 #if (defined(SL_RUNTIME_EVENT_REGISTERATION))
455 
456 #define _SlDrvHandleFatalErrorEvents _SlDeviceFatalErrorEvtHdlr
457 #define _SlDrvHandleGeneralEvents _SlDeviceGeneralEvtHdlr
458 #define _SlDrvHandleWlanEvents _SlWlanEvtHdlr
459 #define _SlDrvHandleNetAppEvents _SlNetAppEvtHdlr
460 #define _SlDrvHandleSockEvents _SlSockEvtHdlr
461 #define _SlDrvHandleHttpServerEvents _SlNetAppHttpServerHdlr
462 #define _SlDrvHandleNetAppRequestEvents _SlNetAppRequestHdlr
463 #define _SlDrvHandleNetAppRequestMemFreeEvents _SlNetAppRequestMemFree
464 #define _SlDrvHandleSocketTriggerEvents _SlSocketTriggerEventHandler
465 
466 #else
467 
468  /* The fatal error events dispatcher which is
469  * initialized to the user handler */
470 #ifdef slcb_DeviceFatalErrorEvtHdlr
471 #define _SlDrvHandleFatalErrorEvents slcb_DeviceFatalErrorEvtHdlr
472 #endif
473 
474  /* The general events dispatcher which is
475  * initialized to the user handler */
476 #ifdef slcb_DeviceGeneralEvtHdlr
477 #define _SlDrvHandleGeneralEvents slcb_DeviceGeneralEvtHdlr
478 #endif
479 
480  /* The wlan events dispatcher which is
481  * initialized to the user handler */
482 #ifdef slcb_WlanEvtHdlr
483 #define _SlDrvHandleWlanEvents slcb_WlanEvtHdlr
484 #endif
485 
486  /* The NetApp events dispatcher which is
487  * initialized to the user handler */
488 #ifdef slcb_NetAppEvtHdlr
489 #define _SlDrvHandleNetAppEvents slcb_NetAppEvtHdlr
490 #endif
491 
492  /* The http server events dispatcher which is
493  * initialized to the user handler if exists */
494 #ifdef slcb_NetAppHttpServerHdlr
495 #define _SlDrvHandleHttpServerEvents slcb_NetAppHttpServerHdlr
496 #endif
497 
498  /* The socket events dispatcher which is
499  * initialized to the user handler */
500 #ifdef slcb_SockEvtHdlr
501 #define _SlDrvHandleSockEvents slcb_SockEvtHdlr
502 #endif
503 
504 
505 /* The netapp requests dispatcher which is
506  * initialized to the user handler if exists */
507 #ifdef slcb_NetAppRequestHdlr
508 #define _SlDrvHandleNetAppRequestEvents slcb_NetAppRequestHdlr
509 #endif
510 
511 /* The netapp request mem free requests dispatcher which is
512 * initialized to the user handler if exists */
513 #ifdef slcb_NetAppRequestMemFree
514 #define _SlDrvHandleNetAppRequestMemFreeEvents slcb_NetAppRequestMemFree
515 #endif
516 
517 /* The netapp requests dispatcher which is
518 * initialized to the user handler if exists */
519 #ifdef slcb_SocketTriggerEventHandler
520 #define _SlDrvHandleSocketTriggerEvents slcb_SocketTriggerEventHandler
521 #endif
522 
523 
524 #endif
525 
526 #define SL_CONCAT(x,y) x ## y
527 #define SL_CONCAT2(x,y) SL_CONCAT(x,y)
528 
529 
530 #if (!defined(SL_RUNTIME_EVENT_REGISTERATION))
531 
532 /*
533  * The section below handles the external lib event registration
534  * according to the desired events it specified in its API header file.
535  * The external lib should be first installed by the user (see user.h)
536  */
537 #ifdef SL_EXT_LIB_1
538 
539  /* General Event Registration */
540  #if SL_CONCAT2(SL_EXT_LIB_1, _NOTIFY_GENERAL_EVENT)
541  extern _SlEventPropogationStatus_e SL_CONCAT2(SL_EXT_LIB_1, _GeneralEventHdl) (SlDeviceEvent_t *);
542  #define SlExtLib1GeneralEventHandler SL_CONCAT2(SL_EXT_LIB_1, _GeneralEventHdl)
543 
544  #undef EXT_LIB_REGISTERED_GENERAL_EVENTS
545  #define EXT_LIB_REGISTERED_GENERAL_EVENTS
546  #endif
547 
548  /* Wlan Event Registration */
549  #if SL_CONCAT2(SL_EXT_LIB_1, _NOTIFY_WLAN_EVENT)
550  extern _SlEventPropogationStatus_e SL_CONCAT2(SL_EXT_LIB_1, _WlanEventHdl) (SlWlanEvent_t *);
551  #define SlExtLib1WlanEventHandler SL_CONCAT2(SL_EXT_LIB_1, _WlanEventHdl)
552 
553  #undef EXT_LIB_REGISTERED_WLAN_EVENTS
554  #define EXT_LIB_REGISTERED_WLAN_EVENTS
555  #endif
556 
557  /* NetApp Event Registration */
558  #if SL_CONCAT2(SL_EXT_LIB_1, _NOTIFY_NETAPP_EVENT)
559  extern _SlEventPropogationStatus_e SL_CONCAT2(SL_EXT_LIB_1, _NetAppEventHdl) (SlNetAppEvent_t *);
560  #define SlExtLib1NetAppEventHandler SL_CONCAT2(SL_EXT_LIB_1, _NetAppEventHdl)
561 
562  #undef EXT_LIB_REGISTERED_NETAPP_EVENTS
563  #define EXT_LIB_REGISTERED_NETAPP_EVENTS
564  #endif
565 
566  /* Http Server Event Registration */
567  #if SL_CONCAT2(SL_EXT_LIB_1, _NOTIFY_HTTP_SERVER_EVENT)
568  extern _SlEventPropogationStatus_e SL_CONCAT2(SL_EXT_LIB_1, _HttpServerEventHdl) (SlNetAppHttpServerEvent_t* , SlNetAppHttpServerResponse_t*);
569  #define SlExtLib1HttpServerEventHandler SL_CONCAT2(SL_EXT_LIB_1, _HttpServerEventHdl)
570 
571  #undef EXT_LIB_REGISTERED_HTTP_SERVER_EVENTS
572  #define EXT_LIB_REGISTERED_HTTP_SERVER_EVENTS
573  #endif
574 
575  /* Socket Event Registration */
576  #if SL_CONCAT2(SL_EXT_LIB_1, _NOTIFY_SOCK_EVENT)
577  extern _SlEventPropogationStatus_e SL_CONCAT2(SL_EXT_LIB_1, _SockEventHdl) (SlSockEvent_t *);
578  #define SlExtLib1SockEventHandler SL_CONCAT2(SL_EXT_LIB_1, _SockEventHdl)
579 
580  #undef EXT_LIB_REGISTERED_SOCK_EVENTS
581  #define EXT_LIB_REGISTERED_SOCK_EVENTS
582  #endif
583 
584 
585  /* Fatal Error Event Registration */
586  #if SL_CONCAT2(SL_EXT_LIB_1, _NOTIFY_FATAL_ERROR_EVENT)
587  extern _SlEventPropogationStatus_e SL_CONCAT2(SL_EXT_LIB_1, _FatalErrorEventHdl) (SlDeviceEvent_t *);
588  #define SlExtLib1FatalErrorEventHandler SL_CONCAT2(SL_EXT_LIB_1, _FatalErrorEventHdl)
589 
590  #undef EXT_LIB_REGISTERED_FATAL_ERROR_EVENTS
591  #define EXT_LIB_REGISTERED_FATAL_ERROR_EVENTS
592  #endif
593 
594 
595  /* NetApp requests events registration */
596  #if SL_CONCAT2(SL_EXT_LIB_1, _NOTIFY_NETAPP_REQUEST_EVENT)
597  extern _SlEventPropogationStatus_e SL_CONCAT2(SL_EXT_LIB_1, _NetAppRequestEventHdl) (SlNetAppRequest_t*, SlNetAppResponse_t *);
598  #define SlExtLib1NetAppRequestEventHandler SL_CONCAT2(SL_EXT_LIB_1, _NetAppRequestEventHdl)
599 
600  #undef EXT_LIB_REGISTERED_NETAPP_REQUEST_EVENTS
601  #define EXT_LIB_REGISTERED_NETAPP_REQUEST_EVENTS
602  #endif
603 
604 
605 #endif
606 
607 
608 #ifdef SL_EXT_LIB_2
609 
610  /* General Event Registration */
611  #if SL_CONCAT2(SL_EXT_LIB_2, _NOTIFY_GENERAL_EVENT)
612  extern _SlEventPropogationStatus_e SL_CONCAT2(SL_EXT_LIB_2, _GeneralEventHdl) (SlDeviceEvent_t *);
613  #define SlExtLib2GeneralEventHandler SL_CONCAT2(SL_EXT_LIB_2, _GeneralEventHdl)
614 
615  #undef EXT_LIB_REGISTERED_GENERAL_EVENTS
616  #define EXT_LIB_REGISTERED_GENERAL_EVENTS
617  #endif
618 
619  /* Wlan Event Registration */
620  #if SL_CONCAT2(SL_EXT_LIB_2, _NOTIFY_WLAN_EVENT)
621  extern _SlEventPropogationStatus_e SL_CONCAT2(SL_EXT_LIB_2, _WlanEventHdl) (SlWlanEvent_t *);
622  #define SlExtLib2WlanEventHandler SL_CONCAT2(SL_EXT_LIB_2, _WlanEventHdl)
623 
624  #undef EXT_LIB_REGISTERED_WLAN_EVENTS
625  #define EXT_LIB_REGISTERED_WLAN_EVENTS
626  #endif
627 
628  /* NetApp Event Registration */
629  #if SL_CONCAT2(SL_EXT_LIB_2, _NOTIFY_NETAPP_EVENT)
630  extern _SlEventPropogationStatus_e SL_CONCAT2(SL_EXT_LIB_2, _NetAppEventHdl) (SlNetAppEvent_t *);
631  #define SlExtLib2NetAppEventHandler SL_CONCAT2(SL_EXT_LIB_2, _NetAppEventHdl)
632 
633  #undef EXT_LIB_REGISTERED_NETAPP_EVENTS
634  #define EXT_LIB_REGISTERED_NETAPP_EVENTS
635  #endif
636 
637  /* Http Server Event Registration */
638  #if SL_CONCAT2(SL_EXT_LIB_2, _NOTIFY_HTTP_SERVER_EVENT)
639  extern _SlEventPropogationStatus_e SL_CONCAT2(SL_EXT_LIB_2, _HttpServerEventHdl) (SlNetAppHttpServerEvent_t* , SlNetAppHttpServerResponse_t*);
640  #define SlExtLib2HttpServerEventHandler SL_CONCAT2(SL_EXT_LIB_2, _HttpServerEventHdl)
641 
642  #undef EXT_LIB_REGISTERED_HTTP_SERVER_EVENTS
643  #define EXT_LIB_REGISTERED_HTTP_SERVER_EVENTS
644  #endif
645 
646  /* Socket Event Registration */
647  #if SL_CONCAT2(SL_EXT_LIB_2, _NOTIFY_SOCK_EVENT)
648  extern _SlEventPropogationStatus_e SL_CONCAT2(SL_EXT_LIB_2, _SockEventHdl) (SlSockEvent_t *);
649  #define SlExtLib2SockEventHandler SL_CONCAT2(SL_EXT_LIB_2, _SockEventHdl)
650 
651  #undef EXT_LIB_REGISTERED_SOCK_EVENTS
652  #define EXT_LIB_REGISTERED_SOCK_EVENTS
653  #endif
654 
655  /* Fatal Error Event Registration */
656  #if SL_CONCAT2(SL_EXT_LIB_2, _NOTIFY_FATAL_ERROR_EVENT)
657  extern _SlEventPropogationStatus_e SL_CONCAT2(SL_EXT_LIB_2, _FatalErrorEventHdl) (SlDeviceEvent_t *);
658  #define SlExtLib2FatalErrorEventHandler SL_CONCAT2(SL_EXT_LIB_2, _FatalErrorEventHdl)
659 
660  #undef EXT_LIB_REGISTERED_FATAL_ERROR_EVENTS
661  #define EXT_LIB_REGISTERED_FATAL_ERROR_EVENTS
662  #endif
663 
664 
665  /* NetApp requests events registration */
666  #if SL_CONCAT2(SL_EXT_LIB_2, _NOTIFY_NETAPP_REQUEST_EVENT)
667  extern _SlEventPropogationStatus_e SL_CONCAT2(SL_EXT_LIB_2, _NetAppRequestEventHdl) (SlNetAppRequest_t*, SlNetAppResponse_t *);
668  #define SlExtLib1NetAppRequestEventHandler SL_CONCAT2(SL_EXT_LIB_2, _NetAppRequestEventHdl)
669 
670  #undef EXT_LIB_REGISTERED_NETAPP_REQUEST_EVENTS
671  #define EXT_LIB_REGISTERED_NETAPP_REQUEST_EVENTS
672  #endif
673 
674 
675 #endif
676 
677 
678 #ifdef SL_EXT_LIB_3
679 
680  /* General Event Registration */
681  #if SL_CONCAT2(SL_EXT_LIB_3, _NOTIFY_GENERAL_EVENT)
682  extern _SlEventPropogationStatus_e SL_CONCAT2(SL_EXT_LIB_3, _GeneralEventHdl) (SlDeviceEvent_t *);
683  #define SlExtLib3GeneralEventHandler SL_CONCAT2(SL_EXT_LIB_3, _GeneralEventHdl)
684 
685  #undef EXT_LIB_REGISTERED_GENERAL_EVENTS
686  #define EXT_LIB_REGISTERED_GENERAL_EVENTS
687  #endif
688 
689  /* Wlan Event Registration */
690  #if SL_CONCAT2(SL_EXT_LIB_3, _NOTIFY_WLAN_EVENT)
691  extern _SlEventPropogationStatus_e SL_CONCAT2(SL_EXT_LIB_3, _WlanEventHdl) (SlWlanEvent_t *);
692  #define SlExtLib3WlanEventHandler SL_CONCAT2(SL_EXT_LIB_3, _WlanEventHdl)
693 
694  #undef EXT_LIB_REGISTERED_WLAN_EVENTS
695  #define EXT_LIB_REGISTERED_WLAN_EVENTS
696  #endif
697 
698  /* NetApp Event Registration */
699  #if SL_CONCAT2(SL_EXT_LIB_3, _NOTIFY_NETAPP_EVENT)
700  extern _SlEventPropogationStatus_e SL_CONCAT2(SL_EXT_LIB_3, _NetAppEventHdl) (SlNetAppEvent_t *);
701  #define SlExtLib3NetAppEventHandler SL_CONCAT2(SL_EXT_LIB_3, _NetAppEventHdl)
702 
703  #undef EXT_LIB_REGISTERED_NETAPP_EVENTS
704  #define EXT_LIB_REGISTERED_NETAPP_EVENTS
705  #endif
706 
707  /* Http Server Event Registration */
708  #if SL_CONCAT2(SL_EXT_LIB_3, _NOTIFY_HTTP_SERVER_EVENT)
709  extern _SlEventPropogationStatus_e SL_CONCAT2(SL_EXT_LIB_3, _HttpServerEventHdl) (SlNetAppHttpServerEvent_t* , SlNetAppHttpServerResponse_t*);
710  #define SlExtLib3HttpServerEventHandler SL_CONCAT2(SL_EXT_LIB_3, _HttpServerEventHdl)
711 
712  #undef EXT_LIB_REGISTERED_HTTP_SERVER_EVENTS
713  #define EXT_LIB_REGISTERED_HTTP_SERVER_EVENTS
714  #endif
715 
716  /* Socket Event Registration */
717  #if SL_CONCAT2(SL_EXT_LIB_3, _NOTIFY_SOCK_EVENT)
718  extern _SlEventPropogationStatus_e SL_CONCAT2(SL_EXT_LIB_3, _SockEventHdl) (SlSockEvent_t *);
719  #define SlExtLib3SockEventHandler SL_CONCAT2(SL_EXT_LIB_3, _SockEventHdl)
720 
721  #undef EXT_LIB_REGISTERED_SOCK_EVENTS
722  #define EXT_LIB_REGISTERED_SOCK_EVENTS
723  #endif
724 
725 
726  /* Fatal Error Event Registration */
727  #if SL_CONCAT2(SL_EXT_LIB_3, _NOTIFY_FATAL_ERROR_EVENT)
728  extern _SlEventPropogationStatus_e SL_CONCAT2(SL_EXT_LIB_3, _FatalErrorEventHdl) (SlDeviceEvent_t *);
729  #define SlExtLib3FatalErrorEventHandler SL_CONCAT2(SL_EXT_LIB_3, _FatalErrorEventHdl)
730 
731  #undef EXT_LIB_REGISTERED_FATAL_ERROR_EVENTS
732  #define EXT_LIB_REGISTERED_FATAL_ERROR_EVENTS
733  #endif
734 
735  /* NetApp requests events registration */
736  #if SL_CONCAT2(SL_EXT_LIB_3, _NOTIFY_NETAPP_REQUEST_EVENT)
737  extern _SlEventPropogationStatus_e SL_CONCAT2(SL_EXT_LIB_3, _NetAppRequestEventHdl) (SlNetAppRequest_t*, SlNetAppResponse_t *);
738  #define SlExtLib1NetAppRequestEventHandler SL_CONCAT2(SL_EXT_LIB_3, _NetAppRequestEventHdl)
739 
740  #undef EXT_LIB_REGISTERED_NETAPP_REQUEST_EVENTS
741  #define EXT_LIB_REGISTERED_NETAPP_REQUEST_EVENTS
742  #endif
743 
744 
745 #endif
746 
747 
748 #ifdef SL_EXT_LIB_4
749 
750  /* General Event Registration */
751  #if SL_CONCAT2(SL_EXT_LIB_4, _NOTIFY_GENERAL_EVENT)
752  extern _SlEventPropogationStatus_e SL_CONCAT2(SL_EXT_LIB_4, _GeneralEventHdl) (SlDeviceEvent_t *);
753  #define SlExtLib4GeneralEventHandler SL_CONCAT2(SL_EXT_LIB_4, _GeneralEventHdl)
754 
755  #undef EXT_LIB_REGISTERED_GENERAL_EVENTS
756  #define EXT_LIB_REGISTERED_GENERAL_EVENTS
757  #endif
758 
759  /* Wlan Event Registration */
760  #if SL_CONCAT2(SL_EXT_LIB_4, _NOTIFY_WLAN_EVENT)
761  extern _SlEventPropogationStatus_e SL_CONCAT2(SL_EXT_LIB_4, _WlanEventHdl) (SlWlanEvent_t *);
762  #define SlExtLib4WlanEventHandler SL_CONCAT2(SL_EXT_LIB_4, _WlanEventHdl)
763 
764  #undef EXT_LIB_REGISTERED_WLAN_EVENTS
765  #define EXT_LIB_REGISTERED_WLAN_EVENTS
766  #endif
767 
768  /* NetApp Event Registration */
769  #if SL_CONCAT2(SL_EXT_LIB_4, _NOTIFY_NETAPP_EVENT)
770  extern _SlEventPropogationStatus_e SL_CONCAT2(SL_EXT_LIB_4, _NetAppEventHdl) (SlNetAppEvent_t *);
771  #define SlExtLib4NetAppEventHandler SL_CONCAT2(SL_EXT_LIB_4, _NetAppEventHdl)
772 
773  #undef EXT_LIB_REGISTERED_NETAPP_EVENTS
774  #define EXT_LIB_REGISTERED_NETAPP_EVENTS
775  #endif
776 
777  /* Http Server Event Registration */
778  #if SL_CONCAT2(SL_EXT_LIB_4, _NOTIFY_HTTP_SERVER_EVENT)
779  extern _SlEventPropogationStatus_e SL_CONCAT2(SL_EXT_LIB_4, _HttpServerEventHdl) (SlNetAppHttpServerEvent_t* , SlNetAppHttpServerResponse_t*);
780  #define SlExtLib4HttpServerEventHandler SL_CONCAT2(SL_EXT_LIB_4, _HttpServerEventHdl)
781 
782  #undef EXT_LIB_REGISTERED_HTTP_SERVER_EVENTS
783  #define EXT_LIB_REGISTERED_HTTP_SERVER_EVENTS
784  #endif
785 
786  /* Socket Event Registration */
787  #if SL_CONCAT2(SL_EXT_LIB_4, _NOTIFY_SOCK_EVENT)
788  extern _SlEventPropogationStatus_e SL_CONCAT2(SL_EXT_LIB_4, _SockEventHdl) (SlSockEvent_t *);
789  #define SlExtLib4SockEventHandler SL_CONCAT2(SL_EXT_LIB_4, _SockEventHdl)
790 
791  #undef EXT_LIB_REGISTERED_SOCK_EVENTS
792  #define EXT_LIB_REGISTERED_SOCK_EVENTS
793  #endif
794 
795 
796  /* Fatal Error Event Registration */
797  #if SL_CONCAT2(SL_EXT_LIB_4, _NOTIFY_FATAL_ERROR_EVENT)
798  extern _SlEventPropogationStatus_e SL_CONCAT2(SL_EXT_LIB_4, _FatalErrorEventHdl) (SlDeviceEvent_t *);
799  #define SlExtLib4FatalErrorEventHandler SL_CONCAT2(SL_EXT_LIB_4, _FatalErrorEventHdl)
800 
801  #undef EXT_LIB_REGISTERED_FATAL_ERROR_EVENTS
802  #define EXT_LIB_REGISTERED_FATAL_ERROR_EVENTS
803  #endif
804 
805 
806  /* NetApp requests events registration */
807  #if SL_CONCAT2(SL_EXT_LIB_4, _NOTIFY_NETAPP_REQUEST_EVENT)
808  extern _SlEventPropogationStatus_e SL_CONCAT2(SL_EXT_LIB_4, _NetAppRequestEventHdl) (SlNetAppRequest_t*, SlNetAppResponse_t *);
809  #define SlExtLib1NetAppRequestEventHandler SL_CONCAT2(SL_EXT_LIB_4, _NetAppRequestEventHdl)
810 
811  #undef EXT_LIB_REGISTERED_NETAPP_REQUEST_EVENTS
812  #define EXT_LIB_REGISTERED_NETAPP_REQUEST_EVENTS
813  #endif
814 
815 
816 
817 #endif
818 
819 
820 #ifdef SL_EXT_LIB_5
821 
822  /* General Event Registration */
823  #if SL_CONCAT2(SL_EXT_LIB_5, _NOTIFY_GENERAL_EVENT)
824  extern _SlEventPropogationStatus_e SL_CONCAT2(SL_EXT_LIB_5, _GeneralEventHdl) (SlDeviceEvent_t *);
825  #define SlExtLib5GeneralEventHandler SL_CONCAT2(SL_EXT_LIB_5, _GeneralEventHdl)
826 
827  #undef EXT_LIB_REGISTERED_GENERAL_EVENTS
828  #define EXT_LIB_REGISTERED_GENERAL_EVENTS
829  #endif
830 
831  /* Wlan Event Registration */
832  #if SL_CONCAT2(SL_EXT_LIB_5, _NOTIFY_WLAN_EVENT)
833  extern _SlEventPropogationStatus_e SL_CONCAT2(SL_EXT_LIB_5, _WlanEventHdl) (SlWlanEvent_t *);
834  #define SlExtLib5WlanEventHandler SL_CONCAT2(SL_EXT_LIB_5, _WlanEventHdl)
835 
836  #undef EXT_LIB_REGISTERED_WLAN_EVENTS
837  #define EXT_LIB_REGISTERED_WLAN_EVENTS
838  #endif
839 
840  /* NetApp Event Registration */
841  #if SL_CONCAT2(SL_EXT_LIB_5, _NOTIFY_NETAPP_EVENT)
842  extern _SlEventPropogationStatus_e SL_CONCAT2(SL_EXT_LIB_5, _NetAppEventHdl) (SlNetAppEvent_t *);
843  #define SlExtLib5NetAppEventHandler SL_CONCAT2(SL_EXT_LIB_5, _NetAppEventHdl)
844 
845  #undef EXT_LIB_REGISTERED_NETAPP_EVENTS
846  #define EXT_LIB_REGISTERED_NETAPP_EVENTS
847  #endif
848 
849  /* Http Server Event Registration */
850  #if SL_CONCAT2(SL_EXT_LIB_5, _NOTIFY_HTTP_SERVER_EVENT)
851  extern _SlEventPropogationStatus_e SL_CONCAT2(SL_EXT_LIB_5, _HttpServerEventHdl) (SlNetAppHttpServerEvent_t* , SlNetAppHttpServerResponse_t*);
852  #define SlExtLib5HttpServerEventHandler SL_CONCAT2(SL_EXT_LIB_5, _HttpServerEventHdl)
853 
854  #undef EXT_LIB_REGISTERED_HTTP_SERVER_EVENTS
855  #define EXT_LIB_REGISTERED_HTTP_SERVER_EVENTS
856  #endif
857 
858  /* Socket Event Registration */
859  #if SL_CONCAT2(SL_EXT_LIB_5, _NOTIFY_SOCK_EVENT)
860  extern _SlEventPropogationStatus_e SL_CONCAT2(SL_EXT_LIB_5, _SockEventHdl) (SlSockEvent_t *);
861  #define SlExtLib5SockEventHandler SL_CONCAT2(SL_EXT_LIB_5, _SockEventHdl)
862 
863  #undef EXT_LIB_REGISTERED_SOCK_EVENTS
864  #define EXT_LIB_REGISTERED_SOCK_EVENTS
865  #endif
866 
867 
868  /* Fatal Error Event Registration */
869  #if SL_CONCAT2(SL_EXT_LIB_5, _NOTIFY_FATAL_ERROR_EVENT)
870  extern _SlEventPropogationStatus_e SL_CONCAT2(SL_EXT_LIB_5, _FatalErrorEventHdl) (SlDeviceEvent_t *);
871  #define SlExtLib5FatalErrorEventHandler SL_CONCAT2(SL_EXT_LIB_5, _FatalErrorEventHdl)
872 
873  #undef EXT_LIB_REGISTERED_FATAL_ERROR_EVENTS
874  #define EXT_LIB_REGISTERED_FATAL_ERROR_EVENTS
875  #endif
876 
877 
878  /* NetApp requests events registration */
879  #if SL_CONCAT2(SL_EXT_LIB_5, _NOTIFY_NETAPP_REQUEST_EVENT)
880  extern _SlEventPropogationStatus_e SL_CONCAT2(SL_EXT_LIB_5, _NetAppRequestEventHdl) (SlNetAppRequest_t*, SlNetAppResponse_t *);
881  #define SlExtLib1NetAppRequestEventHandler SL_CONCAT2(SL_EXT_LIB_5, _NetAppRequestEventHdl)
882 
883  #undef EXT_LIB_REGISTERED_NETAPP_REQUEST_EVENTS
884  #define EXT_LIB_REGISTERED_NETAPP_REQUEST_EVENTS
885  #endif
886 
887 #endif
888 
889 #if defined(EXT_LIB_REGISTERED_FATAL_ERROR_EVENTS)
890 extern void _SlDrvHandleFatalErrorEvents(SlDeviceEvent_t *slFatalErrorEvent);
891 #endif
892 
893 
894 #if defined(EXT_LIB_REGISTERED_GENERAL_EVENTS)
895 extern void _SlDrvHandleGeneralEvents(SlDeviceEvent_t *slGeneralEvent);
896 #endif
897 
898 #if defined(EXT_LIB_REGISTERED_WLAN_EVENTS)
899 extern void _SlDrvHandleWlanEvents(SlWlanEvent_t *slWlanEvent);
900 #endif
901 
902 #if defined (EXT_LIB_REGISTERED_NETAPP_EVENTS)
903 extern void _SlDrvHandleNetAppEvents(SlNetAppEvent_t *slNetAppEvent);
904 #endif
905 
906 #if defined(EXT_LIB_REGISTERED_HTTP_SERVER_EVENTS)
907 extern void _SlDrvHandleHttpServerEvents(SlNetAppHttpServerEvent_t *slHttpServerEvent, SlNetAppHttpServerResponse_t *slHttpServerResponse);
908 #endif
909 
910 
911 #if defined(EXT_LIB_REGISTERED_SOCK_EVENTS)
912 extern void _SlDrvHandleSockEvents(SlSockEvent_t *slSockEvent);
913 #endif
914 
915 
916 #if defined(EXT_LIB_REGISTERED_NETAPP_REQUEST_EVENTS)
917 extern void _SlDrvHandleNetAppRequestEvents(SlNetAppRequest_t *pNetAppRequest, SlNetAppResponse_t *pNetAppResponse);
918 #endif
919 
920 #endif //#if (defined(SL_RUNTIME_EVENT_REGISTERATION))
921 
922 
923 typedef _SlReturnVal_t (*_SlSpawnEntryFunc_t)(void* pValue);
924 
925 #define SL_SPAWN_FLAG_FROM_SL_IRQ_HANDLER (0X1)
926 
927 #ifdef SL_PLATFORM_MULTI_THREADED
928  #include "source/spawn.h"
929 #else
930  #include "source/nonos.h"
931 #endif
932 
938 /* Async functions description*/
939 
940 
986 #if (defined(slcb_DeviceFatalErrorEvtHdlr))
987 extern void slcb_DeviceFatalErrorEvtHdlr(SlDeviceFatal_t *pSlFatalErrorEvent);
988 #endif
989 
990 
1019 #if (defined(slcb_DeviceGeneralEvtHdlr))
1020 extern void slcb_DeviceGeneralEvtHdlr(SlDeviceEvent_t *pSlDeviceEvent);
1021 #endif
1022 
1117 #if (defined(slcb_WlanEvtHdlr))
1118 extern void slcb_WlanEvtHdlr(SlWlanEvent_t* pSlWlanEvent);
1119 #endif
1120 
1121 
1152 #if (defined(slcb_NetAppEvtHdlr))
1153 extern void slcb_NetAppEvtHdlr(SlNetAppEvent_t* pSlNetAppEvent);
1154 #endif
1155 
1181 #if (defined(slcb_SockEvtHdlr))
1182 extern void slcb_SockEvtHdlr(SlSockEvent_t* pSlSockEvent);
1183 #endif
1184 
1216 #if (defined(slcb_NetAppHttpServerHdlr))
1217 extern void slcb_NetAppHttpServerHdlr(SlNetAppHttpServerEvent_t *pSlHttpServerEvent, SlNetAppHttpServerResponse_t *pSlHttpServerResponse);
1218 #endif
1219 
1235 #if (defined(slcb_NetAppRequestHdlr))
1236 extern void slcb_NetAppRequestHdlr(SlNetAppRequest_t *pNetAppRequest, SlNetAppResponse_t *pNetAppResponse);
1237 #endif
1238 
1253 #if (defined(slcb_NetAppRequestMemFree))
1254 extern void slcb_NetAppRequestMemFree (_u8 *buffer);
1255 #endif
1256 
1269 #if defined (slcb_GetTimestamp)
1270 extern _u32 slcb_GetTimestamp(void);
1271 #endif
1272 
1273 
1286 #if (defined(slcb_SocketTriggerEventHandler))
1287 extern void slcb_SocketTriggerEventHandler(SlSockTriggerEvent_t* pSlSockTriggerEvent);
1288 #endif
1289 
1290 
1297 #ifdef __cplusplus
1298 }
1299 #endif /* __cplusplus */
1300 
1301 #endif /* __SIMPLELINK_H__ */
1302 
void slcb_NetAppRequestMemFree(_u8 *buffer)
A handler for freeing the memory of the NetApp response.
void slcb_NetAppRequestHdlr(SlNetAppRequest_t *pNetAppRequest, SlNetAppResponse_t *pNetAppResponse)
General netapp async event.
void slcb_SocketTriggerEventHandler(SlSockTriggerEvent_t *pSlSockTriggerEvent)
Socket trigger routine. This routine will notify the application that a netwrok activity has been com...
void slcb_DeviceFatalErrorEvtHdlr(SlDeviceFatal_t *pSlFatalErrorEvent)
Fatal Error event for inspecting fatal error.
void slcb_SockEvtHdlr(SlSockEvent_t *pSlSockEvent)
Socket Async event handler.
_u32 slcb_GetTimestamp(void)
Get the timer counter value (timestamp). The timer must count from zero to its MAX value...
void slcb_WlanEvtHdlr(SlWlanEvent_t *pSlWlanEvent)
WLAN Async event handler.
void slcb_NetAppEvtHdlr(SlNetAppEvent_t *pSlNetAppEvent)
NETAPP Async event handler.
void slcb_NetAppHttpServerHdlr(SlNetAppHttpServerEvent_t *pSlHttpServerEvent, SlNetAppHttpServerResponse_t *pSlHttpServerResponse)
HTTP server async event.
void slcb_DeviceGeneralEvtHdlr(SlDeviceEvent_t *pSlDeviceEvent)
General async event for inspecting general events.