BLE-Stack APIs  3.00.00
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
comdef.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2015-2016, Texas Instruments Incorporated
3  * All rights reserved.
4  *
5  * Redistribution and use in source and binary forms, with or without
6  * modification, are permitted provided that the following conditions
7  * are met:
8  *
9  * * Redistributions of source code must retain the above copyright
10  * notice, this list of conditions and the following disclaimer.
11  *
12  * * Redistributions in binary form must reproduce the above copyright
13  * notice, this list of conditions and the following disclaimer in the
14  * documentation and/or other materials provided with the distribution.
15  *
16  * * Neither the name of Texas Instruments Incorporated nor the names of
17  * its contributors may be used to endorse or promote products derived
18  * from this software without specific prior written permission.
19  *
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31  */
32 /*!*****************************************************************************
33  * @file comdef.h
34  * @brief Common Defines
35  */
36 
37 #ifndef COMDEF_H
38 #define COMDEF_H
39 
40 #ifdef __cplusplus
41 extern "C"
42 {
43 #endif
44 
45 
46 /*********************************************************************
47  * INCLUDES
48  */
49 
50 /* HAL */
51 #include "hal_types.h"
52 #include "hal_defs.h"
53 
54 /*********************************************************************
55  * Lint Keywords
56  */
57 #define VOID (void)
58 
59 #define NULL_OK
60 #define INP
61 #define OUTP
62 #define UNUSED
63 #define ONLY
64 #define READONLY
65 #define SHARED
66 #define KEEP
67 #define RELAX
68 
69 /*********************************************************************
70  * CONSTANTS
71  */
72 
73 #ifndef false
74  #define false 0
75 #endif
76 
77 #ifndef true
78  #define true 1
79 #endif
80 
81 #ifndef CONST
82  #define CONST const
83 #endif
84 
85 #ifndef GENERIC
86  #define GENERIC
87 #endif
88 
89 /*** Generic Status Return Values ***/
90 #define SUCCESS 0x00
91 #define FAILURE 0x01
92 #define INVALIDPARAMETER 0x02
93 #define INVALID_TASK 0x03
94 #define MSG_BUFFER_NOT_AVAIL 0x04
95 #define INVALID_MSG_POINTER 0x05
96 #define INVALID_EVENT_ID 0x06
97 #define INVALID_INTERRUPT_ID 0x07
98 #define NO_TIMER_AVAIL 0x08
99 #define NV_ITEM_UNINIT 0x09
100 #define NV_OPER_FAILED 0x0A
101 #define INVALID_MEM_SIZE 0x0B
102 #define NV_BAD_ITEM_LEN 0x0C
103 
104 /*********************************************************************
105  * TYPEDEFS
106  */
107 
108 // Generic Status return
109 typedef uint8 Status_t;
110 
111 // Data types
112 typedef int32 int24;
113 typedef uint32 uint24;
114 
115 /*********************************************************************
116  * Global System Events
117  */
118 
119 #define SYS_EVENT_MSG 0x8000 // A message is waiting event
120 
121 /*********************************************************************
122  * Global Generic System Messages
123  */
124 
125 #define KEY_CHANGE 0xC0 // Key Events
126 
127 // OSAL System Message IDs/Events Reserved for applications (user applications)
128 // 0xE0 - 0xFC
129 
130 /*********************************************************************
131  * MACROS
132  */
133 
134 /*********************************************************************
135  * GLOBAL VARIABLES
136  */
137 
138 /*********************************************************************
139  * FUNCTIONS
140  */
141 
142 /*********************************************************************
143 *********************************************************************/
144 
145 #ifdef __cplusplus
146 }
147 #endif
148 
149 #endif /* COMDEF_H */
Copyright 2016, Texas Instruments Incorporated