NHS31xx SW API
msg_dft.h
1 /*
2  * Copyright 2015-2019 NXP
3  * This software is owned or controlled by NXP and may only be used strictly
4  * in accordance with the applicable license terms. By expressly accepting
5  * such terms or by downloading, installing, activating and/or otherwise using
6  * the software, you are agreeing that you have read, and that you agree to
7  * comply with and are bound by, such license terms. If you do not agree to
8  * be bound by the applicable license terms, then you may not retain, install,
9  * activate or otherwise use the software.
10  */
11 
95 #ifndef __MSG_DFT_H_
96 #define __MSG_DFT_H_
97 
98 #ifndef MSG_APP_HANDLERS_COUNT
99 
104  #define MSG_APP_HANDLERS_COUNT 0
105 #endif
106 #if !MSG_APP_HANDLERS_COUNT
107  #undef MSG_APP_HANDLERS
108 #endif
109 #if MSG_APP_HANDLERS_COUNT && !defined(MSG_APP_HANDLERS)
110  #error MSG_APP_HANDLERS and MSG_APP_HANDLERS_COUNT must be defined jointly.
111 #endif
112 
113 /* ------------------------------------------------------------------------- */
114 
119 #define MSG_ENABLE_GETVERSION 1
120 
125 #if !SW_MAJOR_VERSION
126  #define SW_MAJOR_VERSION 0
127 #endif
128 
133 #if !SW_MINOR_VERSION
134  #define SW_MINOR_VERSION 0
135 #endif
136 
137 /* ------------------------------------------------------------------------- */
138 
139 #ifndef MSG_RESPONSE_BUFFER_SIZE
140 
156  #define MSG_RESPONSE_BUFFER_SIZE 0
157 #endif
158 #if !MSG_RESPONSE_BUFFER_SIZE
159  #undef MSG_RESPONSE_BUFFER
160 #endif
161 #if MSG_RESPONSE_BUFFER_SIZE && !defined(MSG_RESPONSE_BUFFER)
162  #error MSG_RESPONSE_BUFFER and MSG_RESPONSE_BUFFER_SIZE must be defined jointly.
163 #endif
164 
170 #define MSG_ENABLE_GETRESPONSE (MSG_RESPONSE_BUFFER_SIZE > 0)
171 
172 /* ------------------------------------------------------------------------- */
173 
177 #if !MSG_ENABLE_RESET
178  #define MSG_ENABLE_RESET 0
179 #endif
180 
185 #if !MSG_ENABLE_READREGISTER
186  #define MSG_ENABLE_READREGISTER 0
187 #endif
188 
193 #if !MSG_ENABLE_WRITEREGISTER
194  #define MSG_ENABLE_WRITEREGISTER 0
195 #endif
196 
201 #if !MSG_ENABLE_READMEMORY
202  #define MSG_ENABLE_READMEMORY 0
203 #endif
204 
209 #if !MSG_ENABLE_WRITEMEMORY
210  #define MSG_ENABLE_WRITEMEMORY 0
211 #endif
212 
217 #ifndef MSG_ENABLE_PREPAREDEBUG
218  #ifdef DEBUG
219  #define MSG_ENABLE_PREPAREDEBUG 1
220  #else
221  #define MSG_ENABLE_PREPAREDEBUG 0
222  #endif
223 #endif
224 
228 #ifndef MSG_ENABLE_GETNFCUID
229  #define MSG_ENABLE_GETNFCUID 1
230 #endif
231 
235 #ifndef MSG_ENABLE_GETUID
236  #define MSG_ENABLE_GETUID 1
237 #endif
238 
243 #ifndef MSG_ENABLE_CHECKBATTERY
244  #define MSG_ENABLE_CHECKBATTERY 0
245 #endif
246 
250 #ifndef MSG_ENABLE_GETCALIBRATIONTIMESTAMP
251  #define MSG_ENABLE_GETCALIBRATIONTIMESTAMP 1
252 #endif
253 
254 
255 /* Diversity flags below are undefined by default. They are wrapped in a DOXYGEN precompilation flag to enable
256  * documenting them properly. To define them and use the corresponding functionality of the module, make the correct
257  * defines in app_sel.h or board_sel.h.
258  */
259 #ifdef __DOXYGEN__
260 #error This block of code may not be parsed using gcc.
261 
267 #define MSG_APP_HANDLERS application defined array with MSG_APP_HANDLERS_COUNT elements of type #MSG_CMD_HANDLER_T
268 
277 #define MSG_RESPONSE_BUFFER application defined array with MSG_RESPONSE_BUFFER_SIZE elements of type uint8_t
278 
283 #define MSG_COMMAND_ACCEPT_CB application function of type pMsg_AcceptCommandCb_t
284 
292 #define MSG_CATCHALL_HANDLER application function of type pMsg_CmdHandler_t
293 
303 #define MSG_RESPONSE_DISCARDED_CB application function of type pMsg_ResponseCb_t
304 #endif
305 
306 #endif