NHS31xx SW API
app_demo_dp_tlogger/mods/app_sel.h
1 /*
2  * Copyright 2015-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 #define MSG_ENABLE_CHECKBATTERY 1
47 #define MSG_COMMAND_ACCEPT_CB CommandAcceptCb
48 
49 /* Diversities tweaking tmeas module for application-specific usage. */
50 #define TMEAS_CB App_TmeasCb
51 
52 /* Diversities tweaking ndeft2t module for application-specific usage. */
53 #define NDEFT2T_EEPROM_COPY_SUPPPORT 0
54 #define NDEFT2T_FIELD_STATUS_CB App_FieldStatusCb
55 #define NDEFT2T_MSG_AVAILABLE_CB App_MsgAvailableCb
56 #define NDEFT2T_MSG_READ_CB App_MsgReadCb
57 
58 /* Diversities tweaking storage module for application-specific usage. */
59 #define STORAGE_TYPE int16_t
60 #define STORAGE_BITSIZE 11
61 #define STORAGE_SIGNED 1
62 #define STORAGE_EEPROM_FIRST_ROW 21
63 #define STORAGE_EEPROM_LAST_ROW (EEPROM_NR_OF_RW_ROWS - 1)
64 #define STORAGE_COMPRESS_CB App_CompressCb
65 #define STORAGE_DECOMPRESS_CB App_DecompressCb
66 #ifdef DEBUG
67  #define STORAGE_FIRST_ALON_REGISTER 1
68  #define STORAGE_WRITE_RECOVERY_EVERY_X_SAMPLES STORAGE_SAMPLE_ALON_CACHE_COUNT
69  #define STORAGE_REDUCE_RECOVERY_WRITES 1
70 #else
71  #define STORAGE_FIRST_ALON_REGISTER 3
72  #define STORAGE_WRITE_RECOVERY_EVERY_X_SAMPLES STORAGE_SAMPLE_ALON_CACHE_COUNT
73  #define STORAGE_REDUCE_RECOVERY_WRITES 0
74 #endif
75 
76 /* Diversities tweaking event module for application-specific usage. */
77 #define EVENT_CB App_EventCb
78 #define EVENT_CB_OPENING_CALL 1
79 #define EVENT_CB_CLOSING_CALL 1
80 #define EVENT_EEPROM_FIRST_ROW 2
81 #define EVENT_EEPROM_LAST_ROW 20
82 #define EVENT_OVERHEAD_CHOICE EVENT_OVERHEAD_CHOICE_B
83 
84 #ifdef DEBUG
85  /* The diag module, if used, is compiled together with the chip library. It is also used at application level in
86  * the msg module.
87  * The define from lib_chip_nss: Project > Properties > C/C++ Build > Settings > Tool Settings > Preprocessor
88  * is copied here to match expectations from the msg module with the chip library.
89  */
90  #define ENABLE_DIAG_MODULE 1
91 #else
92  /* The release build configuration is linked with the Release_nodiag build configuration of the chip library. */
93  #define ENABLE_DIAG_MODULE 0
94 #endif
95 
109 #endif