1 /*********************************************************************
2 *                    SEGGER Microcontroller GmbH                     *
3 *                        The Embedded Experts                        *
4 **********************************************************************
5 *                                                                    *
6 *            (c) 1995 - 2024 SEGGER Microcontroller GmbH             *
7 *                                                                    *
8 *       www.segger.com     Support: support@segger.com               *
9 *                                                                    *
10 **********************************************************************
11 *                                                                    *
12 *       SEGGER SystemView * Real-time application analysis           *
13 *                                                                    *
14 **********************************************************************
15 *                                                                    *
16 * All rights reserved.                                               *
17 *                                                                    *
18 * SEGGER strongly recommends to not make any changes                 *
19 * to or modify the source code of this software in order to stay     *
20 * compatible with the SystemView and RTT protocol, and J-Link.       *
21 *                                                                    *
22 * Redistribution and use in source and binary forms, with or         *
23 * without modification, are permitted provided that the following    *
24 * condition is met:                                                  *
25 *                                                                    *
26 * o Redistributions of source code must retain the above copyright   *
27 *   notice, this condition and the following disclaimer.             *
28 *                                                                    *
29 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND             *
30 * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,        *
31 * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF           *
32 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE           *
33 * DISCLAIMED. IN NO EVENT SHALL SEGGER Microcontroller BE LIABLE FOR *
34 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR           *
35 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT  *
36 * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;    *
37 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF      *
38 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT          *
39 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE  *
40 * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH   *
41 * DAMAGE.                                                            *
42 *                                                                    *
43 **********************************************************************
44 *                                                                    *
45 *       SystemView version: 3.58                                    *
46 *                                                                    *
47 **********************************************************************
48 -------------------------- END-OF-HEADER -----------------------------
49 File    : SEGGER_SYSVIEW.h
50 Purpose : System visualization API.
51 Revision: $Rev: 28768 $
52 */
53 
54 #ifndef SEGGER_SYSVIEW_H
55 #define SEGGER_SYSVIEW_H
56 
57 /*********************************************************************
58 *
59 *       #include Section
60 *
61 **********************************************************************
62 */
63 
64 #include "SEGGER.h"
65 #include "SEGGER_SYSVIEW_ConfDefaults.h"
66 
67 #ifdef __cplusplus
68 extern "C" {
69 #endif
70 
71 
72 /*********************************************************************
73 *
74 *       Defines, fixed
75 *
76 **********************************************************************
77 */
78 
79 #define SEGGER_SYSVIEW_MAJOR          3
80 #define SEGGER_SYSVIEW_MINOR          32
81 #define SEGGER_SYSVIEW_REV            0
82 #define SEGGER_SYSVIEW_VERSION        ((SEGGER_SYSVIEW_MAJOR * 10000) + (SEGGER_SYSVIEW_MINOR * 100) + SEGGER_SYSVIEW_REV)
83 
84 #define SEGGER_SYSVIEW_INFO_SIZE      9   // Minimum size, which has to be reserved for a packet. 1-2 byte of message type, 0-2  byte of payload length, 1-5 bytes of timestamp.
85 #define SEGGER_SYSVIEW_QUANTA_U32     5   // Maximum number of bytes to encode a U32, should be reserved for each 32-bit value in a packet.
86 
87 #define SEGGER_SYSVIEW_LOG            (0u)
88 #define SEGGER_SYSVIEW_WARNING        (1u)
89 #define SEGGER_SYSVIEW_ERROR          (2u)
90 #define SEGGER_SYSVIEW_FLAG_APPEND    (1u << 6)
91 
92 #define SEGGER_SYSVIEW_PREPARE_PACKET(p)  (p) + 4
93 //
94 // SystemView events. First 32 IDs from 0 .. 31 are reserved for these
95 //
96 #define   SYSVIEW_EVTID_NOP                0  // Dummy packet.
97 #define   SYSVIEW_EVTID_OVERFLOW           1
98 #define   SYSVIEW_EVTID_ISR_ENTER          2
99 #define   SYSVIEW_EVTID_ISR_EXIT           3
100 #define   SYSVIEW_EVTID_TASK_START_EXEC    4
101 #define   SYSVIEW_EVTID_TASK_STOP_EXEC     5
102 #define   SYSVIEW_EVTID_TASK_START_READY   6
103 #define   SYSVIEW_EVTID_TASK_STOP_READY    7
104 #define   SYSVIEW_EVTID_TASK_CREATE        8
105 #define   SYSVIEW_EVTID_TASK_INFO          9
106 #define   SYSVIEW_EVTID_TRACE_START       10
107 #define   SYSVIEW_EVTID_TRACE_STOP        11
108 #define   SYSVIEW_EVTID_SYSTIME_CYCLES    12
109 #define   SYSVIEW_EVTID_SYSTIME_US        13
110 #define   SYSVIEW_EVTID_SYSDESC           14
111 #define   SYSVIEW_EVTID_MARK_START        15
112 #define   SYSVIEW_EVTID_MARK_STOP         16
113 #define   SYSVIEW_EVTID_IDLE              17
114 #define   SYSVIEW_EVTID_ISR_TO_SCHEDULER  18
115 #define   SYSVIEW_EVTID_TIMER_ENTER       19
116 #define   SYSVIEW_EVTID_TIMER_EXIT        20
117 #define   SYSVIEW_EVTID_STACK_INFO        21
118 #define   SYSVIEW_EVTID_MODULEDESC        22
119 #define   SYSVIEW_EVTID_DATA_SAMPLE       23
120 #define   SYSVIEW_EVTID_INIT              24
121 #define   SYSVIEW_EVTID_NAME_RESOURCE     25
122 #define   SYSVIEW_EVTID_PRINT_FORMATTED   26
123 #define   SYSVIEW_EVTID_NUMMODULES        27
124 #define   SYSVIEW_EVTID_END_CALL          28
125 #define   SYSVIEW_EVTID_TASK_TERMINATE    29
126 
127 #define   SYSVIEW_EVTID_EX                31
128 //
129 // SystemView extended events. Sent with ID 31.
130 //
131 #define   SYSVIEW_EVTID_EX_MARK           0
132 #define   SYSVIEW_EVTID_EX_NAME_MARKER    1
133 #define   SYSVIEW_EVTID_EX_HEAP_DEFINE    2
134 #define   SYSVIEW_EVTID_EX_HEAP_ALLOC     3
135 #define   SYSVIEW_EVTID_EX_HEAP_ALLOC_EX  4
136 #define   SYSVIEW_EVTID_EX_HEAP_FREE      5
137 #define   SYSVIEW_EVTID_EX_REGISTER_DATA  6
138 //
139 // Event masks to disable/enable events
140 //
141 #define   SYSVIEW_EVTMASK_NOP               (1 << SYSVIEW_EVTID_NOP)
142 #define   SYSVIEW_EVTMASK_OVERFLOW          (1 << SYSVIEW_EVTID_OVERFLOW)
143 #define   SYSVIEW_EVTMASK_ISR_ENTER         (1 << SYSVIEW_EVTID_ISR_ENTER)
144 #define   SYSVIEW_EVTMASK_ISR_EXIT          (1 << SYSVIEW_EVTID_ISR_EXIT)
145 #define   SYSVIEW_EVTMASK_TASK_START_EXEC   (1 << SYSVIEW_EVTID_TASK_START_EXEC)
146 #define   SYSVIEW_EVTMASK_TASK_STOP_EXEC    (1 << SYSVIEW_EVTID_TASK_STOP_EXEC)
147 #define   SYSVIEW_EVTMASK_TASK_START_READY  (1 << SYSVIEW_EVTID_TASK_START_READY)
148 #define   SYSVIEW_EVTMASK_TASK_STOP_READY   (1 << SYSVIEW_EVTID_TASK_STOP_READY)
149 #define   SYSVIEW_EVTMASK_TASK_CREATE       (1 << SYSVIEW_EVTID_TASK_CREATE)
150 #define   SYSVIEW_EVTMASK_TASK_INFO         (1 << SYSVIEW_EVTID_TASK_INFO)
151 #define   SYSVIEW_EVTMASK_TRACE_START       (1 << SYSVIEW_EVTID_TRACE_START)
152 #define   SYSVIEW_EVTMASK_TRACE_STOP        (1 << SYSVIEW_EVTID_TRACE_STOP)
153 #define   SYSVIEW_EVTMASK_SYSTIME_CYCLES    (1 << SYSVIEW_EVTID_SYSTIME_CYCLES)
154 #define   SYSVIEW_EVTMASK_SYSTIME_US        (1 << SYSVIEW_EVTID_SYSTIME_US)
155 #define   SYSVIEW_EVTMASK_SYSDESC           (1 << SYSVIEW_EVTID_SYSDESC)
156 #define   SYSVIEW_EVTMASK_USER_START        (1 << SYSVIEW_EVTID_USER_START)
157 #define   SYSVIEW_EVTMASK_USER_STOP         (1 << SYSVIEW_EVTID_USER_STOP)
158 #define   SYSVIEW_EVTMASK_IDLE              (1 << SYSVIEW_EVTID_IDLE)
159 #define   SYSVIEW_EVTMASK_ISR_TO_SCHEDULER  (1 << SYSVIEW_EVTID_ISR_TO_SCHEDULER)
160 #define   SYSVIEW_EVTMASK_TIMER_ENTER       (1 << SYSVIEW_EVTID_TIMER_ENTER)
161 #define   SYSVIEW_EVTMASK_TIMER_EXIT        (1 << SYSVIEW_EVTID_TIMER_EXIT)
162 #define   SYSVIEW_EVTMASK_STACK_INFO        (1 << SYSVIEW_EVTID_STACK_INFO)
163 #define   SYSVIEW_EVTMASK_MODULEDESC        (1 << SYSVIEW_EVTID_MODULEDESC)
164 #define   SYSVIEW_EVTMASK_DATA_SAMPLE       (1 << SYSVIEW_EVTID_DATA_SAMPLE)
165 #define   SYSVIEW_EVTMASK_INIT              (1 << SYSVIEW_EVTID_INIT)
166 #define   SYSVIEW_EVTMASK_NAME_RESOURCE     (1 << SYSVIEW_EVTID_NAME_RESOURCE)
167 #define   SYSVIEW_EVTMASK_PRINT_FORMATTED   (1 << SYSVIEW_EVTID_PRINT_FORMATTED)
168 #define   SYSVIEW_EVTMASK_NUMMODULES        (1 << SYSVIEW_EVTID_NUMMODULES)
169 #define   SYSVIEW_EVTMASK_END_CALL          (1 << SYSVIEW_EVTID_END_CALL)
170 #define   SYSVIEW_EVTMASK_TASK_TERMINATE    (1 << SYSVIEW_EVTID_TASK_TERMINATE)
171 
172 #define   SYSVIEW_EVTMASK_EX                (1 << SYSVIEW_EVTID_EX)
173 
174 #define   SYSVIEW_EVTMASK_ALL_INTERRUPTS    ( SYSVIEW_EVTMASK_ISR_ENTER           \
175                                             | SYSVIEW_EVTMASK_ISR_EXIT            \
176                                             | SYSVIEW_EVTMASK_ISR_TO_SCHEDULER)
177 #define   SYSVIEW_EVTMASK_ALL_TASKS         ( SYSVIEW_EVTMASK_TASK_START_EXEC     \
178                                             | SYSVIEW_EVTMASK_TASK_STOP_EXEC      \
179                                             | SYSVIEW_EVTMASK_TASK_START_READY    \
180                                             | SYSVIEW_EVTMASK_TASK_STOP_READY     \
181                                             | SYSVIEW_EVTMASK_TASK_CREATE         \
182                                             | SYSVIEW_EVTMASK_TASK_INFO           \
183                                             | SYSVIEW_EVTMASK_STACK_INFO          \
184                                             | SYSVIEW_EVTMASK_TASK_TERMINATE)
185 
186 /*********************************************************************
187 *
188 *       Structures
189 *
190 **********************************************************************
191 */
192 
193 typedef struct {
194   U32          TaskID;
195   const char*  sName;
196   U32          Prio;
197   U32          StackBase;
198   U32          StackSize;
199   U32          StackUsage;
200 } SEGGER_SYSVIEW_TASKINFO;
201 
202 typedef struct {
203   U32          TaskID;
204   U32          StackBase;
205   U32          StackSize;
206   U32          StackUsage;
207 } SEGGER_SYSVIEW_STACKINFO;
208 
209 typedef struct {
210   U32          ID;
211   union {
212     U32*   pU32;
213     I32*   pI32;
214     float* pFloat;
215   } pValue;
216 } SEGGER_SYSVIEW_DATA_SAMPLE;
217 
218 typedef enum {
219   SEGGER_SYSVIEW_TYPE_U32   = 0,
220   SEGGER_SYSVIEW_TYPE_I32   = 1,
221   SEGGER_SYSVIEW_TYPE_FLOAT = 2
222 } SEGGER_SYSVIEW_DATA_TYPE;
223 
224 typedef struct {
225   U32                           ID;
226   SEGGER_SYSVIEW_DATA_TYPE      DataType;
227   I32                           Offset;
228   I32                           RangeMin;
229   I32                           RangeMax;
230   float                         ScalingFactor;
231   const char*                   sName;
232   const char*                   sUnit;
233 }  SEGGER_SYSVIEW_DATA_REGISTER;
234 
235 typedef struct SEGGER_SYSVIEW_MODULE_STRUCT SEGGER_SYSVIEW_MODULE;
236 
237 struct SEGGER_SYSVIEW_MODULE_STRUCT {
238   const char*                   sModule;
239         U32                     NumEvents;
240         U32                     EventOffset;
241         void                    (*pfSendModuleDesc)(void);
242         SEGGER_SYSVIEW_MODULE*  pNext;
243 };
244 
245 typedef void (SEGGER_SYSVIEW_SEND_SYS_DESC_FUNC)(void);
246 
247 
248 /*********************************************************************
249 *
250 *       Global data
251 *
252 **********************************************************************
253 */
254 
255 #ifdef   EXTERN
256   #undef EXTERN
257 #endif
258 
259 #ifndef SEGGER_SYSVIEW_C       // Defined in SEGGER_SYSVIEW.c which includes this header beside other C-files
260   #define EXTERN extern
261 #else
262   #define EXTERN
263 #endif
264 
265 EXTERN unsigned int SEGGER_SYSVIEW_TickCnt;
266 EXTERN unsigned int SEGGER_SYSVIEW_InterruptId;
267 
268 #undef EXTERN
269 
270 /*********************************************************************
271 *
272 *       API functions
273 *
274 **********************************************************************
275 */
276 
277 typedef struct {
278   U64  (*pfGetTime)               (void);
279   void (*pfSendTaskList)          (void);
280 } SEGGER_SYSVIEW_OS_API;
281 
282 /*********************************************************************
283 *
284 *       Control and initialization functions
285 */
286 void SEGGER_SYSVIEW_Init                          (U32 SysFreq, U32 CPUFreq, const SEGGER_SYSVIEW_OS_API *pOSAPI, SEGGER_SYSVIEW_SEND_SYS_DESC_FUNC pfSendSysDesc);
287 void SEGGER_SYSVIEW_SetRAMBase                    (U32 RAMBaseAddress);
288 void SEGGER_SYSVIEW_Start                         (void);
289 void SEGGER_SYSVIEW_Stop                          (void);
290 void SEGGER_SYSVIEW_GetSysDesc                    (void);
291 void SEGGER_SYSVIEW_SendTaskList                  (void);
292 void SEGGER_SYSVIEW_SendTaskInfo                  (const SEGGER_SYSVIEW_TASKINFO* pInfo);
293 void SEGGER_SYSVIEW_SendStackInfo                 (const SEGGER_SYSVIEW_STACKINFO* pInfo);
294 void SEGGER_SYSVIEW_SendSysDesc                   (const char* sSysDesc);
295 int  SEGGER_SYSVIEW_IsStarted                     (void);
296 int  SEGGER_SYSVIEW_GetChannelID                  (void);
297 
298 void  SEGGER_SYSVIEW_SampleData                   (const SEGGER_SYSVIEW_DATA_SAMPLE *pInfo);
299 
300 /*********************************************************************
301 *
302 *       Event recording functions
303 */
304 void SEGGER_SYSVIEW_RecordVoid                    (unsigned int EventId);
305 void SEGGER_SYSVIEW_RecordU32                     (unsigned int EventId, U32 Para0);
306 void SEGGER_SYSVIEW_RecordU32x2                   (unsigned int EventId, U32 Para0, U32 Para1);
307 void SEGGER_SYSVIEW_RecordU32x3                   (unsigned int EventId, U32 Para0, U32 Para1, U32 Para2);
308 void SEGGER_SYSVIEW_RecordU32x4                   (unsigned int EventId, U32 Para0, U32 Para1, U32 Para2, U32 Para3);
309 void SEGGER_SYSVIEW_RecordU32x5                   (unsigned int EventId, U32 Para0, U32 Para1, U32 Para2, U32 Para3, U32 Para4);
310 void SEGGER_SYSVIEW_RecordU32x6                   (unsigned int EventId, U32 Para0, U32 Para1, U32 Para2, U32 Para3, U32 Para4, U32 Para5);
311 void SEGGER_SYSVIEW_RecordU32x7                   (unsigned int EventId, U32 Para0, U32 Para1, U32 Para2, U32 Para3, U32 Para4, U32 Para5, U32 Para6);
312 void SEGGER_SYSVIEW_RecordU32x8                   (unsigned int EventId, U32 Para0, U32 Para1, U32 Para2, U32 Para3, U32 Para4, U32 Para5, U32 Para6, U32 Para7);
313 void SEGGER_SYSVIEW_RecordU32x9                   (unsigned int EventId, U32 Para0, U32 Para1, U32 Para2, U32 Para3, U32 Para4, U32 Para5, U32 Para6, U32 Para7, U32 Para8);
314 void SEGGER_SYSVIEW_RecordU32x10                  (unsigned int EventId, U32 Para0, U32 Para1, U32 Para2, U32 Para3, U32 Para4, U32 Para5, U32 Para6, U32 Para7, U32 Para8, U32 Para9);
315 void SEGGER_SYSVIEW_RecordString                  (unsigned int EventId, const char* pString);
316 void SEGGER_SYSVIEW_RecordSystime                 (void);
317 void SEGGER_SYSVIEW_RecordEnterISR                (void);
318 void SEGGER_SYSVIEW_RecordExitISR                 (void);
319 void SEGGER_SYSVIEW_RecordExitISRToScheduler      (void);
320 void SEGGER_SYSVIEW_RecordEnterTimer              (U32 TimerId);
321 void SEGGER_SYSVIEW_RecordExitTimer               (void);
322 void SEGGER_SYSVIEW_RecordEndCall                 (unsigned int EventID);
323 void SEGGER_SYSVIEW_RecordEndCallU32              (unsigned int EventID, U32 Para0);
324 
325 void SEGGER_SYSVIEW_OnIdle                        (void);
326 void SEGGER_SYSVIEW_OnTaskCreate                  (U32 TaskId);
327 void SEGGER_SYSVIEW_OnTaskTerminate               (U32 TaskId);
328 void SEGGER_SYSVIEW_OnTaskStartExec               (U32 TaskId);
329 void SEGGER_SYSVIEW_OnTaskStopExec                (void);
330 void SEGGER_SYSVIEW_OnTaskStartReady              (U32 TaskId);
331 void SEGGER_SYSVIEW_OnTaskStopReady               (U32 TaskId, unsigned int Cause);
332 void SEGGER_SYSVIEW_MarkStart                     (unsigned int MarkerId);
333 void SEGGER_SYSVIEW_MarkStop                      (unsigned int MarkerId);
334 void SEGGER_SYSVIEW_Mark                          (unsigned int MarkerId);
335 void SEGGER_SYSVIEW_NameMarker                    (unsigned int MarkerId, const char* sName);
336 
337 void SEGGER_SYSVIEW_HeapDefine                    (void* pHeap, void* pBase, unsigned int HeapSize, unsigned int MetadataSize);
338 void SEGGER_SYSVIEW_HeapAlloc                     (void* pHeap, void* pUserData, unsigned int UserDataLen);
339 void SEGGER_SYSVIEW_HeapAllocEx                   (void* pHeap, void* pUserData, unsigned int UserDataLen, unsigned int Tag);
340 void SEGGER_SYSVIEW_HeapFree                      (void* pHeap, void* pUserData);
341 
342 void SEGGER_SYSVIEW_NameResource                  (U32 ResourceId, const char* sName);
343 void SEGGER_SYSVIEW_RegisterData                  ( SEGGER_SYSVIEW_DATA_REGISTER* pInfo);
344 
345 int  SEGGER_SYSVIEW_SendPacket                    (U8* pPacket, U8* pPayloadEnd, unsigned int EventId);
346 
347 /*********************************************************************
348 *
349 *       Event parameter encoding functions
350 */
351 U8*  SEGGER_SYSVIEW_EncodeU32                     (U8* pPayload, U32 Value);
352 U8*  SEGGER_SYSVIEW_EncodeData                    (U8* pPayload, const char* pSrc, unsigned int Len);
353 U8*  SEGGER_SYSVIEW_EncodeString                  (U8* pPayload, const char* s, unsigned int MaxLen);
354 U8*  SEGGER_SYSVIEW_EncodeId                      (U8* pPayload, U32 Id);
355 U32  SEGGER_SYSVIEW_ShrinkId                      (U32 Id);
356 
357 
358 /*********************************************************************
359 *
360 *       Middleware module registration
361 */
362 void SEGGER_SYSVIEW_RegisterModule                (SEGGER_SYSVIEW_MODULE* pModule);
363 void SEGGER_SYSVIEW_RecordModuleDescription       (const SEGGER_SYSVIEW_MODULE* pModule, const char* sDescription);
364 void SEGGER_SYSVIEW_SendModule                    (U8 ModuleId);
365 void SEGGER_SYSVIEW_SendModuleDescription         (void);
366 void SEGGER_SYSVIEW_SendNumModules                (void);
367 
368 /*********************************************************************
369 *
370 *       printf-Style functions
371 */
372 #ifndef SEGGER_SYSVIEW_EXCLUDE_PRINTF // Define in project to avoid warnings about variable parameter list
373 void SEGGER_SYSVIEW_PrintfHostEx                  (const char* s, U32 Options, ...);
374 void SEGGER_SYSVIEW_VPrintfHostEx                 (const char* s, U32 Options, va_list* pParamList);
375 void SEGGER_SYSVIEW_PrintfTargetEx                (const char* s, U32 Options, ...);
376 void SEGGER_SYSVIEW_VPrintfTargetEx               (const char* s, U32 Options, va_list* pParamList);
377 void SEGGER_SYSVIEW_PrintfHost                    (const char* s, ...);
378 void SEGGER_SYSVIEW_VPrintfHost                   (const char* s, va_list* pParamList);
379 void SEGGER_SYSVIEW_PrintfTarget                  (const char* s, ...);
380 void SEGGER_SYSVIEW_VPrintfTarget                 (const char* s, va_list* pParamList);
381 void SEGGER_SYSVIEW_WarnfHost                     (const char* s, ...);
382 void SEGGER_SYSVIEW_VWarnfHost                    (const char* s, va_list* pParamList);
383 void SEGGER_SYSVIEW_WarnfTarget                   (const char* s, ...);
384 void SEGGER_SYSVIEW_VWarnfTarget                  (const char* s, va_list* pParamList);
385 void SEGGER_SYSVIEW_ErrorfHost                    (const char* s, ...);
386 void SEGGER_SYSVIEW_VErrorfHost                   (const char* s, va_list* pParamList);
387 void SEGGER_SYSVIEW_ErrorfTarget                  (const char* s, ...);
388 void SEGGER_SYSVIEW_VErrorfTarget                 (const char* s, va_list* pParamList);
389 #endif
390 
391 void SEGGER_SYSVIEW_Print                         (const char* s);
392 void SEGGER_SYSVIEW_Warn                          (const char* s);
393 void SEGGER_SYSVIEW_Error                         (const char* s);
394 
395 /*********************************************************************
396 *
397 *       Run-time configuration functions
398 */
399 void SEGGER_SYSVIEW_EnableEvents                  (U32 EnableMask);
400 void SEGGER_SYSVIEW_DisableEvents                 (U32 DisableMask);
401 
402 /*********************************************************************
403 *
404 *       Application-provided functions
405 */
406 void SEGGER_SYSVIEW_Conf                          (void);
407 U32  SEGGER_SYSVIEW_X_GetTimestamp                (void);
408 U32  SEGGER_SYSVIEW_X_GetInterruptId              (void);
409 
410 void SEGGER_SYSVIEW_X_StartComm                   (void);
411 void SEGGER_SYSVIEW_X_OnEventRecorded             (unsigned NumBytes);
412 
413 #ifdef __cplusplus
414 }
415 #endif
416 
417 /*********************************************************************
418 *
419 *       Compatibility API defines
420 */
421 #define SEGGER_SYSVIEW_OnUserStart      SEGGER_SYSVIEW_MarkStart
422 #define SEGGER_SYSVIEW_OnUserStop       SEGGER_SYSVIEW_MarkStop
423 
424 #endif
425 
426 /*************************** End of file ****************************/
427