Stepper-Motor-Control  v3.0.0
System on a Chip 2014 - Group 04
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros
events.h
Go to the documentation of this file.
1 /**
2  *****************************************************************************
3  * @file events.h
4  * @author Michael Riedel
5  * @author Marc Kossmann
6  * @version v2.0.0
7  * @date 18.11.2014
8  * @brief definitions for used events
9  *****************************************************************************
10  * @par History:
11  * @details v0.1.0 27.10.2014 Riedel
12  * - first draft for milestone 1b
13  * @details v0.1.1 30.10.2014 Riedel
14  * - Moved DEBUG_ON_EVENT from heartbeatTask.h to this header
15  * @details v1.0.0 07.11.2014 Kossmann
16  * - added DEBUG_OFF_EVENT
17  * @details v2.0.0 18.11.2014 Riedel & Kossmann
18  * - introduced userOutputTaskFlagsGrp and GLOB_VAR_UPDATE event for
19  * signaling changed data in global IPC variable
20  * - verified functionality -> release MS2
21  *****************************************************************************
22  */
23 
24 #ifndef __EVENTS_H__
25 #define __EVENTS_H__
26 
27 /**
28  * @brief The flags group used in the user-input-task.
29  * @details This group contains all possibly events, which can be triggered
30  * by the user.
31  */
32 OS_FLAG_GRP *userInputTaskFlagsGrp;
33 #define KEY0_RS_EVENT (0b00001) //!< runs or stops the motor via `key_0`
34 #define KEY2_MINUS_EVENT (0b00010) //!< decreases the steps to turn via `key_2`
35 #define KEY3_PLUS_EVENT (0b00100) //!< increases the steps to turn via `key_3`
36 #define MOTOR_STOP_EVENT (0b01000) //!< the interrupt is sent via VHDL-Component, when the motor reached its end-position
37 #define SW_UPDATE_EVENT (0b10000) //!< signalizes that switches changed
38 /**
39  * @brief The flags group used in the heartbeat-task and user-input-task.
40  * @details This group contains the debug-event that can be triggered via `sw_9`.
41  */
42 OS_FLAG_GRP *heartbeatTaskFlagsGrp;
43 #define DEBUG_ON_EVENT (0x1) //!< activates the debug-mode via `sw_9`
44 #define DEBUG_OFF_EVENT (0x2) //!< deactivates the debug-mode via `sw_9`
45 #endif // __EVENTS_H__
46 
47 /**
48  * @brief The flags group used in the user-output-task.
49  * @details This group contains all possibly events.
50  */
52 #define MOTOR_STOP_EVENT (0b01000) //!< the interrupt is sent via VHDL-Component, when the motor reached its end-position
53 #define GLOB_VAR_UPDATE (0b00001) //!< signals that data changed
OS_FLAG_GRP * heartbeatTaskFlagsGrp
The flags group used in the heartbeat-task and user-input-task.
Definition: events.h:42
OS_FLAG_GRP * userInputTaskFlagsGrp
The flags group used in the user-input-task.
Definition: events.h:32
OS_FLAG_GRP * userOutputTaskFlagsGrp
The flags group used in the user-output-task.
Definition: events.h:51