NHS31xx SW API
app_demo_dpahu_sensormonitor/inc/memory.h
1 /*
2  * Copyright 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 
12 #ifndef __MEMORY_H_
13 #define __MEMORY_H_
14 
46 #include <stdint.h>
47 #include <stdbool.h>
48 #include "msghandler_protocol.h"
49 
50 /* ------------------------------------------------------------------------- */
51 
57 #define MEMORY_FIRSTUNUSEDEEPROMOFFSET 44
58 
65 typedef struct MEMORY_CONFIG_S {
68  int16_t attainedMinimum;
69  int16_t attainedMaximum;
72  /* count - number of stored samples - is maintained by storage module. */
73  uint32_t status;
74  /* startTime - time of first measurement is maintained by event module. */
75  /* currentTime is is maintained by the RTC HW block. */
76  uint32_t validation;
78 
79 /* ------------------------------------------------------------------------- */
80 
90 bool Memory_Init(void);
91 
98 void Memory_DeInit(void);
99 
100 /* ------------------------------------------------------------------------- */
101 
107 const MEMORY_CONFIG_T * Memory_GetConfig(void);
108 
113 bool Memory_IsMonitoring(void);
114 
120 bool Memory_IsFull(void);
121 
126 bool Memory_BodOccurred(void);
127 
132 bool Memory_IsReadyToStart(void);
133 
143 
153 
161 void Memory_SetAttainedValue(int16_t value);
162 
170 void Memory_SetAttainedHumidityValue(uint16_t value);
171 
183 void Memory_AddToState(uint32_t events, bool ignoreWhenSet);
184 
191 void Memory_RemoveFromState(uint32_t events);
192 
194 #endif
void Memory_RemoveFromState(uint32_t events)
uint16_t attainedMaximumHumidity
Definition: app_demo_dpahu_sensormonitor/inc/memory.h:71
uint16_t attainedMinimumHumidity
Definition: app_demo_dpahu_sensormonitor/inc/memory.h:70
const MEMORY_CONFIG_T * Memory_GetConfig(void)
bool Memory_IsFull(void)
void Memory_SetAttainedValue(int16_t value)
bool Memory_IsReadyToStart(void)
Definition: app_demo_dpahu_sensormonitor/inc/msghandler_protocol.h:680
void Memory_AddToState(uint32_t events, bool ignoreWhenSet)
void Memory_Init(void)
void Memory_DeInit(void)
void Memory_SetAttainedHumidityValue(uint16_t value)
APP_MSG_CMD_SETHUMIDITYCONFIG_T humidityConfig
Definition: app_demo_dpahu_sensormonitor/inc/memory.h:67
void Memory_SetHumidityConfig(const APP_MSG_CMD_SETHUMIDITYCONFIG_T *pCmd)
bool Memory_BodOccurred(void)
bool Memory_IsMonitoring(void)
void Memory_ResetConfig(const APP_MSG_CMD_SETCONFIG_T *pCmd)
Definition: app_demo_dp_tlogger/inc/msghandler_protocol.h:439
Definition: app_demo_dp_tlogger/inc/memory.h:65