NHS31xx SW API
event.h
1 /*
2  * Copyright 2017-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 __EVENT_H_
13 #define __EVENT_H_
14 
79 #include "board.h"
80 #include "event_dft.h"
81 
82 /* ------------------------------------------------------------------------- */
83 
107 typedef bool (*pEvent_Cb_t)(uint8_t tag, int offset, uint8_t len, unsigned int index, uint32_t timestamp, uint32_t context);
108 
109 /* ------------------------------------------------------------------------- */
110 
123 void Event_Init(bool reset);
124 
132 void Event_DeInit(void);
133 
142 
159 bool Event_Set(uint8_t tag, void * data, uint8_t len);
160 
183 unsigned int Event_GetByIndex(unsigned int first, unsigned int last, uint32_t context);
184 
207 unsigned int Event_GetByTime(unsigned int begin, unsigned int end, uint32_t context);
208 
224 unsigned int Event_GetByTag(uint8_t tag, uint32_t context);
225 
236 bool Event_GetFirstByTag(uint8_t tag, int * pOffset, uint8_t * pLen, unsigned int * pIndex, uint32_t * pTimestamp);
237 
248 bool Event_GetLastByTag(uint8_t tag, int * pOffset, uint8_t * pLen, unsigned int * pIndex, uint32_t * pTimestamp);
249 
250 #endif
void Event_Init(bool reset)
unsigned int Event_GetByTime(unsigned int begin, unsigned int end, uint32_t context)
bool Event_Set(uint8_t tag, void *data, uint8_t len)
unsigned int Event_GetByTag(uint8_t tag, uint32_t context)
bool Event_GetFirstByTag(uint8_t tag, int *pOffset, uint8_t *pLen, unsigned int *pIndex, uint32_t *pTimestamp)
bool(* pEvent_Cb_t)(uint8_t tag, int offset, uint8_t len, unsigned int index, uint32_t timestamp, uint32_t context)
Definition: event.h:107
pEvent_Cb_t Event_SetCb(pEvent_Cb_t cb)
void Event_DeInit(void)
unsigned int Event_GetByIndex(unsigned int first, unsigned int last, uint32_t context)
bool Event_GetLastByTag(uint8_t tag, int *pOffset, uint8_t *pLen, unsigned int *pIndex, uint32_t *pTimestamp)