NHS31xx SW API
app_demo_dpu_tloggerucode/mods/app_sel.h
1 /*
2  * Copyright 2016-2020 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 
12 #ifndef __APP_SEL_H_
13 #define __APP_SEL_H_
14 
15 #include <stdint.h>
16 
17 #if !defined(SW_MAJOR_VERSION)
18  #error SW_MAJOR_VERSION not defined. Define SW_MAJOR_VERSION in your Project settings.
19  #error Under LPCXPresso: Project > Properties > C/C++ Build > Settings > Tool Settings > MCU C Compiler > Symbols
20  #error Add a define similar to "SW_MAJOR_VERSION=1" (without surrounding quotes)
21  #error Add this define to all build configurations.
22 #endif
23 // "SW_MAJOR_VERSION=$(shell date +%y%V)" to have it contain year and weeknumber: YYWW
24 // "SW_MAJOR_VERSION=$(shell date --utc +%s) to have it contain unix epoch time in seconds.
25 
26 #if !defined(SW_MINOR_VERSION)
27  #error SW_MINOR_VERSION not defined. Define SW_MINOR_VERSION in your Project settings.
28  #error Under LPCXPresso: Project > Properties > C/C++ Build > Settings > Tool Settings > MCU C Compiler > Symbols
29  #error Add a define similar to "SW_MINOR_VERSION=1" (without surrounding quotes)
30  #error Add this define to all build configurations.
31 #endif
32 
33 /* Diversities tweaking msg module for application-specific usage. */
34 #define MSG_APP_HANDLERS App_CmdHandler
35 #define MSG_APP_HANDLERS_COUNT 7U
36 #define MSG_RESPONSE_BUFFER_SIZE 20
37 #define MSG_RESPONSE_BUFFER App_ResponseBuffer
38 #ifdef DEBUG
39  #define MSG_ENABLE_RESET 1
40  #define MSG_ENABLE_READREGISTER 1
41  #define MSG_ENABLE_WRITEREGISTER 1
42  #define MSG_ENABLE_READMEMORY 1
43  #define MSG_ENABLE_WRITEMEMORY 1
44  #define MSG_ENABLE_PREPAREDEBUG 1
45 #endif
46 
47 /* Diversities tweaking tmeas module for application-specific usage. */
48 #define TMEAS_CB App_TmeasCb
49 
50 /* Diversities tweaking ndeft2t module for application-specific usage. */
51 #define NDEFT2T_EEPROM_COPY_SUPPPORT 0
52 #define NDEFT2T_FIELD_STATUS_CB App_FieldStatusCb
53 #define NDEFT2T_MSG_AVAILABLE_CB App_MsgAvailableCb
54 #define NDEFT2T_MSG_READ_CB App_MsgReadCb
55 
56 /* Diversities tweaking storage module for application-specific usage. */
57 #define STORAGE_TYPE int16_t
58 #define STORAGE_BITSIZE 11
59 #define STORAGE_SIGNED 1
60 #define STORAGE_EEPROM_FIRST_ROW 21
61 #define STORAGE_EEPROM_LAST_ROW (EEPROM_NR_OF_RW_ROWS - 1)
62 #define STORAGE_COMPRESS_CB App_CompressCb
63 #define STORAGE_DECOMPRESS_CB App_DecompressCb
64 #ifdef DEBUG
65  #define STORAGE_FIRST_ALON_REGISTER 1
66  #define STORAGE_WRITE_RECOVERY_EVERY_X_SAMPLES STORAGE_SAMPLE_ALON_CACHE_COUNT
67  #define STORAGE_REDUCE_RECOVERY_WRITES 1
68 #else
69  #define STORAGE_FIRST_ALON_REGISTER 3
70  #define STORAGE_WRITE_RECOVERY_EVERY_X_SAMPLES STORAGE_SAMPLE_ALON_CACHE_COUNT
71  #define STORAGE_REDUCE_RECOVERY_WRITES 0
72 #endif
73 
74 /* Diversities tweaking event module for application-specific usage. */
75 #define EVENT_CB App_EventCb
76 #define EVENT_CB_OPENING_CALL 1
77 #define EVENT_CB_CLOSING_CALL 1
78 #define EVENT_EEPROM_FIRST_ROW 2
79 #define EVENT_EEPROM_LAST_ROW 20
80 #define EVENT_OVERHEAD_CHOICE EVENT_OVERHEAD_CHOICE_B
81 
82 #ifdef DEBUG
83  /* The diag module, if used, is compiled together with the chip library. It is also used at application level in
84  * the msg module.
85  * The define from lib_chip_nss: Project > Properties > C/C++ Build > Settings > Tool Settings > Preprocessor
86  * is copied here to match expectations from the msg module with the chip library.
87  */
88  #define ENABLE_DIAG_MODULE 1
89 #else
90  /* The release build configuration is linked with the Release_nodiag build configuration of the chip library. */
91  #define ENABLE_DIAG_MODULE 0
92 #endif
93 
107 #endif