NHS31xx SW API
app_demo_dpahu_sensormonitor/mods/app_sel.h
1 /*
2  * Copyright 2018-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 11U
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. */
60 typedef struct APP_STORAGE_TYPE_S {
61  uint32_t temperature : 11;
62  uint32_t humidity : 10;
63  uint32_t zero : 11;
65 #define STORAGE_TYPE APP_STORAGE_TYPE_T
66 #define STORAGE_BITSIZE (11 + 10)
67 #define STORAGE_EEPROM_FIRST_ROW 21
68 #define STORAGE_EEPROM_LAST_ROW (EEPROM_NR_OF_RW_ROWS - 1)
69 #ifdef DEBUG
70  #define STORAGE_FIRST_ALON_REGISTER 1
71  #define STORAGE_WRITE_RECOVERY_EVERY_X_SAMPLES STORAGE_SAMPLE_ALON_CACHE_COUNT
72  #define STORAGE_REDUCE_RECOVERY_WRITES 1
73 #else
74  #define STORAGE_FIRST_ALON_REGISTER 2
75  #define STORAGE_WRITE_RECOVERY_EVERY_X_SAMPLES STORAGE_SAMPLE_ALON_CACHE_COUNT
76  #define STORAGE_REDUCE_RECOVERY_WRITES 0
77 #endif
78 
79 /* Diversities tweaking event module for application-specific usage. */
80 #define EVENT_CB App_EventCb
81 #define EVENT_CB_OPENING_CALL 1
82 #define EVENT_CB_CLOSING_CALL 1
83 #define EVENT_EEPROM_FIRST_ROW 2
84 #define EVENT_EEPROM_LAST_ROW 20
85 #define EVENT_OVERHEAD_CHOICE EVENT_OVERHEAD_CHOICE_B
86 
87 #ifdef DEBUG
88  /* The diag module, if used, is compiled together with the chip library. It is also used at application level in
89  * the msg module.
90  * The define from lib_chip_nss: Project > Properties > C/C++ Build > Settings > Tool Settings > Preprocessor
91  * is copied here to match expectations from the msg module with the chip library.
92  */
93  #define ENABLE_DIAG_MODULE 1
94 #else
95  /* The release build configuration is linked with the Release_nodiag build configuration of the chip library. */
96  #define ENABLE_DIAG_MODULE 0
97 #endif
98 
104 #define APP_ACCEL_FIRSTWORKSPACEOFFSET MEMORY_FIRSTUNUSEDEEPROMOFFSET
105 
111 #define APP_ACCEL_LASTWORKSPACEOFFSET (APP_ACCEL_FIRSTWORKSPACEOFFSET + ACCEL_WORKSPACE_SIZE - 1)
112 
127 #endif
uint32_t temperature
Definition: app_demo_dpahu_sensormonitor/mods/app_sel.h:61
uint32_t zero
Definition: app_demo_dpahu_sensormonitor/mods/app_sel.h:63
Definition: app_demo_dpahu_sensormonitor/mods/app_sel.h:60
uint32_t humidity
Definition: app_demo_dpahu_sensormonitor/mods/app_sel.h:62