NHS31xx SW API
app_demo_dp_tlogger/inc/memory.h
1 /*
2  * Copyright 2016-2018 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 36
58 
65 typedef struct MEMORY_CONFIG_S {
67  int16_t attainedMinimum;
68  int16_t attainedMaximum;
69  /* count - number of stored samples - is maintained by storage module. */
70  uint32_t status;
71  /* startTime - time of first measurement is maintained by event module. */
72  /* currentTime is is maintained by the RTC HW block. */
73  uint32_t validation;
75 
76 /* ------------------------------------------------------------------------- */
77 
87 bool Memory_Init(void);
88 
95 void Memory_DeInit(void);
96 
97 /* ------------------------------------------------------------------------- */
98 
104 const MEMORY_CONFIG_T * Memory_GetConfig(void);
105 
110 bool Memory_IsMonitoring(void);
111 
117 bool Memory_IsFull(void);
118 
123 bool Memory_BodOccurred(void);
124 
129 bool Memory_IsReadyToStart(void);
130 
140 
148 void Memory_SetAttainedValue(int16_t value);
149 
161 void Memory_AddToState(uint32_t events, bool ignoreWhenSet);
162 
169 void Memory_RemoveFromState(uint32_t events);
170 
172 #endif
void Memory_RemoveFromState(uint32_t events)
void Memory_DeInit(void)
const MEMORY_CONFIG_T * Memory_GetConfig(void)
bool Memory_IsFull(void)
int16_t attainedMinimum
Definition: app_demo_dp_tlogger/inc/memory.h:67
void Memory_SetAttainedValue(int16_t value)
bool Memory_IsReadyToStart(void)
void Memory_AddToState(uint32_t events, bool ignoreWhenSet)
bool Memory_Init(void)
APP_MSG_CMD_SETCONFIG_T cmd
Definition: app_demo_dp_tlogger/inc/memory.h:66
bool Memory_BodOccurred(void)
bool Memory_IsMonitoring(void)
void Memory_ResetConfig(const APP_MSG_CMD_SETCONFIG_T *pCmd)
uint32_t validation
Definition: app_demo_dp_tlogger/inc/memory.h:73
int16_t attainedMaximum
Definition: app_demo_dp_tlogger/inc/memory.h:68
uint32_t status
Definition: app_demo_dp_tlogger/inc/memory.h:70
Definition: app_demo_dp_tlogger/inc/msghandler_protocol.h:439
Definition: app_demo_dp_tlogger/inc/memory.h:65