| ISF 2.2 rev 5 Intelligent Sensing Framework for Kinetis with Processor Expert

- Main Page
- Modules
- Data Structures
- Files

- File List
- Globals

isf_eventhandler.h
Go to the documentation of this file.
1 /*
2 *
3 * Copyright (c) 2015, Freescale Semiconductor, Inc.
4 *
5 */
6 /* ###################################################################
7 ** Filename : isf_eventhandler.h
8 ** Abstract :
9 ** This is the ISF Event Handler services.
10 **
11 ** ###################################################################*/
12 /*!
13 ** @file isf_eventhandler.h
14 ** @version 01.00
15 ** @brief
16 */
17 /*!
18 ** @addtogroup isf_eventhandler_module isf_eventhandler module documentation
19 ** @{
20 */
21
22 #ifndef __ISF_EVENTHANDLER_H
23 #define __ISF_EVENTHANDLER_H
24
25 #include "fsl_os_abstraction.h"
26
27
28
29 #ifdef __cplusplus
30 extern "C" {
31 #endif
32
33 #define MAX_EVENTS 32 // Maximum number of events allowed
34 #define ALL_EVENTS 0x00FFFFFF
35
36 // Event Handler type definitions
37 typedef void (eventCallback_t)(void *); // Event Callback Prototypes
38
39 typedef struct
40 {
41 uint32 Signal;
42 event_t *pEvent;
43 eventCallback_t *pCallback;
44 void *pUserData;
45 } isf_eh_event_t;
46
47 /*
48 ** ===================================================================
49 ** Event : isf_eventHandler_Init
50 **
51 ** Description :
52 ** This function initializes the ISF Event Handler services.
53 ** Parameters :
54 ** None
55 ** Returns : Nothing
56 ** ===================================================================
57 */
58 void isf_EventHandler_Init(void);
59 /*
60 ** ===================================================================
61 ** Event : isf_eventHandler_RegisterEvent
62 **
63 ** Description :
64 ** This function registers an Event Callback routine with
65 ** the Event Handler services.
66 ** Parameters :
67 ** pCallback - pointer to the Event Callback routine
68 ** pSensorHandle - pointer to the User Data to pass to the Callback
69 ** Returns :
70 ** int32 - token (index of handler in Event Callback structure),
71 ** if < 0: ERROR.
72 ** ===================================================================
73 */
74 int32 isf_EventHandler_RegisterEvent(eventCallback_t *pCallback, void *pUserData);
75 /*
76 ** ===================================================================
77 ** Event : isf_EventHandler_UnregisterEvent
78 **
79 ** Description :
80 ** This function registers an Event Callback routine with
81 ** the Event Handler services.
82 ** Parameters :
83 ** token - token associated with the event handler callback.
84 ** Returns :
85 ** int32 - status: 0 OK; if < 0: ERROR.
86 ** ===================================================================
87 */
88 int32 isf_EventHandler_UnregisterEvent(uint32 token);
89 /*
90 ** ===================================================================
91 ** Event : isf_EventHandler_GetSignal
92 **
93 ** Description :
94 ** This function returns the event signal associated with the
95 ** event handler token.
96 ** Parameters :
97 ** token - token associated with the event handler callback.
98 ** Returns :
99 ** int32 - event signal. < 0: ERROR.
100 ** ===================================================================
101 */
102 int32 isf_EventHandler_GetSignal(uint32 token);
103 /*
104 ** ===================================================================
105 ** Event : EventHandler_task (module mqx_tasks)
106 **
107 ** Component : Task2 [MQXLite_task]
108 ** Description :
109 ** MQX task routine. The routine is generated into mqx_tasks.c
110 ** file.
111 ** Parameters :
112 ** NAME - DESCRIPTION
113 ** task_init_data -
114 ** Returns : Nothing
115 ** ===================================================================
116 */
117 void EventHandler_task(void);
118
119 #ifdef __cplusplus
120 } /* extern "C" */
121 #endif
122
123 #endif /* ifndef __ISF_EVENTHANDLER_H*/
124
125 /*!
126 ** @}
127 */
128 /*
129 ** ###################################################################
130 **
131 ** This file was created by Processor Expert 10.3 [05.09]
132 ** for the Freescale Kinetis series of microcontrollers.
133 **
134 ** ###################################################################
135 */
EventHandler_task
void EventHandler_task(void)
Definition: isf_eventhandler.c:146
isf_EventHandler_RegisterEvent
int32 isf_EventHandler_RegisterEvent(eventCallback_t *pCallback, void *pUserData)
Definition: isf_eventhandler.c:66
isf_eh_event_t::pEvent
event_t * pEvent
Definition: isf_eventhandler.h:42
eventCallback_t
void( eventCallback_t)(void *)
Definition: isf_eventhandler.h:37
isf_eh_event_t::pUserData
void * pUserData
Definition: isf_eventhandler.h:44
isf_EventHandler_GetSignal
int32 isf_EventHandler_GetSignal(uint32 token)
Definition: isf_eventhandler.c:123
isf_EventHandler_Init
void isf_EventHandler_Init(void)
Definition: isf_eventhandler.c:42
isf_eh_event_t
Definition: isf_eventhandler.h:39
isf_eh_event_t::pCallback
eventCallback_t * pCallback
Definition: isf_eventhandler.h:43
int32
signed long int int32
Definition: isf_types.h:74
isf_EventHandler_UnregisterEvent
int32 isf_EventHandler_UnregisterEvent(uint32 token)
Definition: isf_eventhandler.c:98
uint32
unsigned long int uint32
Definition: isf_types.h:78
isf_eh_event_t::Signal
uint32 Signal
Definition: isf_eventhandler.h:41
- © Freescale Semiconductor, Inc. 2016. All Rights Reserved.