MyComponent  Version 1.0.0
Example that demonstrates Software Component Views in the MDK Debugger
 All Data Structures Functions Variables Groups Pages
EvrMyComponent.h
1 /*------------------------------------------------------------------------------
2  * MyComponent - Component ::MDK Example:MyComponent
3  * Copyright (c) 2016 ARM Germany GmbH. All rights reserved.
4  *------------------------------------------------------------------------------
5  * Name: EvrMyComponent.h
6  * Purpose: Definition of debug events for MyComponent example
7  * Rev.: V1.0.0
8  *----------------------------------------------------------------------------*/
9 
10 
11 #include "EventRecorder.h" // Keil::Compiler:Event Recorder
12 
13 
14 #ifndef __STATIC_INLINE
15  #define __STATIC_INLINE static __inline
16 #endif
17 
18 
19 // Notation used in the MyComponent example:
20 // "MyComponent Example" is the long component name
21 // "MyCo" is the short component name
22 //
23 // The following prefix is used for identifiers:
24 // Evt local defines in this header file
25 // EvtMyCo event id values, whereby "MyCo" is the short name of "MyComponent"
26 // EvrMyCo event record functions, whereby "MyCo" is the short name of "MyComponent"
27 
28 
29 #define EvtMyCo_No 0x0A
30 
31 #ifdef MyComp_DEBUG // Define debug events
32 
33 // Event id list for "MyComponent"
34 #define EvtMyCo_InitEntry EventID (EventLevelAPI, EvtMyCo_No, 0x00)
35 #define EvtMyCo_InitStatus EventID (EventLevelAPI, EvtMyCo_No, 0x01)
36 #define EvtMyCo_SendNoData EventID (EventLevelError, EvtMyCo_No, 0x0A)
37 #define EvtMyCo_SendComplete EventID (EventLevelOp, EvtMyCo_No, 0x0B)
38 #define EvtMyCo_SendFailed EventID (EventLevelError, EvtMyCo_No, 0x0C)
39 #define EvtMyCo_ReceiveNoData EventID (EventLevelError, EvtMyCo_No, 0x15)
40 #define EvtMyCo_ReceiveComplete EventID (EventLevelAPI, EvtMyCo_No, 0x16)
41 #define EvtMyCo_ReceiveFailed EventID (EventLevelError, EvtMyCo_No, 0x17)
42 
43 #endif // MyComp_DEBUG
44 
45 
49 #ifdef EvtMyCo_InitEntry
50  __STATIC_INLINE void EvrMyCo_InitEntry(void) {
51  EventRecord2(EvtMyCo_InitEntry, 0, 0);
52  }
53 #else
54  #define EvrMyCo_InitEntry()
55 #endif
56 
57 
62 #ifdef EvtMyCo_InitStatus
63  __STATIC_INLINE void EvrMyCo_InitStatus(uint32_t status) {
64  EventRecord2(EvtMyCo_InitStatus, status, 0);
65  }
66 #else
67  #define EvrMyCo_InitStatus(status)
68 #endif
69 
73 #ifdef EvtMyCo_SendNoData
74  __STATIC_INLINE void EvrMyCo_SendNoData(void) {
75  EventRecord2(EvtMyCo_SendNoData, 0, 0);
76  }
77 #else
78  #define EvrMyCo_SendNoData()
79 #endif
80 
81 
86 #ifdef EvtMyCo_SendComplete
87  __STATIC_INLINE void EvrMyCo_SendComplete(uint32_t size) {
88  EventRecord2(EvtMyCo_SendComplete, size, 0);
89  }
90 #else
91  #define EvrMyCo_SendComplete(size)
92 #endif
93 
94 
98 #ifdef EvtMyCo_SendFailed
99  __STATIC_INLINE void EvrMyCo_SendFailed(void) {
100  EventRecord2(EvtMyCo_SendFailed, 0, 0);
101  }
102 #else
103  #define EvrMyCo_SendFailed()
104 #endif
105 
109 #ifdef EvtMyCo_ReceiveNoData
110  __STATIC_INLINE void EvrMyCo_ReceiveNoData(void) {
111  EventRecord2(EvtMyCo_ReceiveNoData, 0, 0);
112  }
113 #else
114  #define EvrMyCo_ReceiveNoData()
115 #endif
116 
121 #ifdef EvtMyCo_ReceiveComplete
122  __STATIC_INLINE void EvrMyCo_ReceiveComplete(uint32_t size) {
123  EventRecord2(EvtMyCo_ReceiveComplete, size, 0);
124  }
125 #else
126  #define EvrMyCo_ReceiveComplete(size)
127 #endif
128 
132 #ifdef EvtMyCo_ReceiveFailed
133  __STATIC_INLINE void EvrMyCo_ReceiveFailed(void) {
134  EventRecord2(EvtMyCo_ReceiveFailed, 0, 0);
135  }
136 #else
137  #define EvrMyCo_ReceiveFailed()
138 #endif
139 
void EvrMyCo_ReceiveComplete(uint32_t size)
Event on MyComp_receive - completed (API)
Definition: EvrMyComponent.h:122
void EvrMyCo_SendComplete(uint32_t size)
Event on MyComp_send - completed (Op)
Definition: EvrMyComponent.h:87
void EvrMyCo_InitEntry(void)
Event on MyComp_initialize start (API)
Definition: EvrMyComponent.h:50
void EvrMyCo_SendFailed(void)
Event on MyComp_send - send failed (Error)
Definition: EvrMyComponent.h:99
void EvrMyCo_InitStatus(uint32_t status)
Event on MyComp_initialize return (API)
Definition: EvrMyComponent.h:63
void EvrMyCo_SendNoData(void)
Event on MyComp_send no data passed (Error)
Definition: EvrMyComponent.h:74
void EvrMyCo_ReceiveFailed(void)
Event on MyComp_receive - receive failed (Error)
Definition: EvrMyComponent.h:133
void EvrMyCo_ReceiveNoData(void)
Event on MyComp_receive - no data received (Error)
Definition: EvrMyComponent.h:110