Select one of the symbols to view example projects that use it.
 
Outline
#define SEGGER_H
#include <stdarg.h>
#include "Global.h"
#define INLINE
#define INLINE
#define INLINE
#define INLINE
#define INLINE
#define SEGGER_COUNTOF
#define SEGGER_MIN
#define SEGGER_MAX
#define SEGGER_USE_PARA
#define SEGGER_ADDR2PTR
#define SEGGER_PTR2ADDR
#define SEGGER_PTR2PTR
#define SEGGER_PTR_DISTANCE
#define SEGGER_PRINTF_FLAG_ADJLEFT
#define SEGGER_PRINTF_FLAG_SIGNFORCE
#define SEGGER_PRINTF_FLAG_SIGNSPACE
#define SEGGER_PRINTF_FLAG_PRECEED
#define SEGGER_PRINTF_FLAG_ZEROPAD
#define SEGGER_PRINTF_FLAG_NEGATIVE
SEGGER_BUFFER_DESC
SEGGER_CACHE_CONFIG
SEGGER_SNPRINTF_CONTEXT_struct
SEGGER_SNPRINTF_CONTEXT_struct
SEGGER_PRINTF_API
SEGGER_pFormatter
SEGGER_PRINTF_FORMATTER
SEGGER_BSP_API
SEGGER_ARM_memcpy(void *, const void *, int);
SEGGER_memcpy(void *, const void *, unsigned int);
SEGGER_memxor(void *, const void *, unsigned int);
SEGGER_atoi(const char *);
SEGGER_isalnum(int);
SEGGER_isalpha(int);
SEGGER_strlen(const char *);
SEGGER_tolower(int);
SEGGER_strcasecmp(const char *, const char *);
SEGGER_strncasecmp(const char *, const char *, unsigned int);
SEGGER_StoreChar(SEGGER_BUFFER_DESC *, char);
SEGGER_PrintUnsigned(SEGGER_BUFFER_DESC *, unsigned long, unsigned int, int);
SEGGER_PrintInt(SEGGER_BUFFER_DESC *, long, unsigned int, int);
SEGGER_snprintf(char *, int, const char *, ...);
SEGGER_vsnprintf(char *, int, const char *, va_list);
SEGGER_vsnprintfEx(SEGGER_SNPRINTF_CONTEXT *, const char *, va_list);
SEGGER_PRINTF_AddFormatter(SEGGER_PRINTF_FORMATTER *, SEGGER_pFormatter, char);
SEGGER_PRINTF_AddDoubleFormatter();
SEGGER_PRINTF_AddIPFormatter();
SEGGER_PRINTF_AddBLUEFormatter();
SEGGER_PRINTF_AddCONNECTFormatter();
SEGGER_PRINTF_AddSSLFormatter();
SEGGER_PRINTF_AddSSHFormatter();
SEGGER_PRINTF_AddHTMLFormatter();
SEGGER_BSP_GetUID(unsigned char *);
SEGGER_BSP_GetUID32(unsigned long *);
SEGGER_BSP_SetAPI(const SEGGER_BSP_API *);
SEGGER_BSP_SeedUID();
SEGGER_VERSION_GetString(char *, unsigned int);
Files
loading...
SourceVuESP-IDF Framework and ExamplesESP-IDFcomponents/app_trace/sys_view/SEGGER/SEGGER.h
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
/* * SPDX-FileCopyrightText: 1995-2021 SEGGER Microcontroller GmbH * * SPDX-License-Identifier: BSD-1-Clause * * SPDX-FileContributor: 2023 Espressif Systems (Shanghai) CO LTD *//* ... */ /********************************************************************* * SEGGER Microcontroller GmbH * * The Embedded Experts * ********************************************************************** * * * (c) 1995 - 2021 SEGGER Microcontroller GmbH * * * * www.segger.com Support: support@segger.com * * * ********************************************************************** * * * SEGGER SystemView * Real-time application analysis * * * ********************************************************************** * * * All rights reserved. * * * * SEGGER strongly recommends to not make any changes * * to or modify the source code of this software in order to stay * * compatible with the SystemView and RTT protocol, and J-Link. * * * * Redistribution and use in source and binary forms, with or * * without modification, are permitted provided that the following * * condition is met: * * * * o Redistributions of source code must retain the above copyright * * notice, this condition and the following disclaimer. * * * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND * * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, * * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF * * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * * DISCLAIMED. IN NO EVENT SHALL SEGGER Microcontroller BE LIABLE FOR * * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT * * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; * * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE * * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH * * DAMAGE. * * * ********************************************************************** * * * SystemView version: 3.42 * * * ********************************************************************** ---------------------------------------------------------------------- File : SEGGER.h Purpose : Global types etc & general purpose utility functions Revision: $Rev: 18102 $ ---------------------------END-OF-HEADER------------------------------ *//* ... */ #ifndef SEGGER_H // Guard against multiple inclusion #define SEGGER_H #include <stdarg.h> // For va_list. #include "Global.h" // Type definitions: U8, U16, U32, I8, I16, I32 #if defined(__cplusplus) extern "C" { /* Make sure we have C-declarations in C++ programs */ #endif /********************************************************************* * * Keywords/specifiers * ********************************************************************** *//* ... */ #ifndef INLINE #if (defined(__ICCARM__) || defined(__RX) || defined(__ICCRX__)) // // Other known compilers. // #define INLINE inline/* ... */ #else #if (defined(_WIN32) && !defined(__clang__)) // // Microsoft VC6 and newer. // Force inlining without cost checking. // #define INLINE __forceinline/* ... */ #elif defined(__GNUC__) || defined(__clang__) // // Force inlining with GCC + clang // #define INLINE inline __attribute__((always_inline))/* ... */ #elif (defined(__CC_ARM)) // // Force inlining with ARMCC (Keil) // #define INLINE __inline/* ... */ #else // // Unknown compilers. // #define INLINE/* ... */ #endif/* ... */ #endif/* ... */ #endif /********************************************************************* * * Function-like macros * ********************************************************************** *//* ... */ #define SEGGER_COUNTOF(a) (sizeof((a))/sizeof((a)[0])) #define SEGGER_MIN(a,b) (((a) < (b)) ? (a) : (b)) #define SEGGER_MAX(a,b) (((a) > (b)) ? (a) : (b)) #ifndef SEGGER_USE_PARA // Some compiler complain about unused parameters. #define SEGGER_USE_PARA(Para) (void)Para // This works for most compilers. #endif #define SEGGER_ADDR2PTR(Type, Addr) (/*lint -e(923) -e(9078)*/((Type*)((PTR_ADDR)(Addr)))) // Allow cast from address to pointer. #define SEGGER_PTR2ADDR(p) (/*lint -e(923) -e(9078)*/((PTR_ADDR)(p))) // Allow cast from pointer to address. #define SEGGER_PTR2PTR(Type, p) (/*lint -e(740) -e(826) -e(9079) -e(9087)*/((Type*)(p))) // Allow cast from one pointer type to another (ignore different size). #define SEGGER_PTR_DISTANCE(p0, p1) (SEGGER_PTR2ADDR(p0) - SEGGER_PTR2ADDR(p1)) /********************************************************************* * * Defines * ********************************************************************** *//* ... */ #define SEGGER_PRINTF_FLAG_ADJLEFT (1 << 0) #define SEGGER_PRINTF_FLAG_SIGNFORCE (1 << 1) #define SEGGER_PRINTF_FLAG_SIGNSPACE (1 << 2) #define SEGGER_PRINTF_FLAG_PRECEED (1 << 3) #define SEGGER_PRINTF_FLAG_ZEROPAD (1 << 4) #define SEGGER_PRINTF_FLAG_NEGATIVE (1 << 5)10 defines /********************************************************************* * * Types * ********************************************************************** *//* ... */ typedef struct { char* pBuffer; int BufferSize; int Cnt; }{ ... } SEGGER_BUFFER_DESC; typedef struct { unsigned int CacheLineSize; // 0: No Cache. Most Systems such as ARM9 use a 32 bytes cache line size. void (*pfDMB) (void); // Optional DMB function for Data Memory Barrier to make sure all memory operations are completed. void (*pfClean) (void *p, unsigned long NumBytes); // Optional clean function for cached memory. void (*pfInvalidate)(void *p, unsigned long NumBytes); // Optional invalidate function for cached memory. }{ ... } SEGGER_CACHE_CONFIG; typedef struct SEGGER_SNPRINTF_CONTEXT_struct SEGGER_SNPRINTF_CONTEXT; struct SEGGER_SNPRINTF_CONTEXT_struct { void* pContext; // Application specific context. SEGGER_BUFFER_DESC* pBufferDesc; // Buffer descriptor to use for output. void (*pfFlush)(SEGGER_SNPRINTF_CONTEXT* pContext); // Callback executed once the buffer is full. Callback decides if the buffer gets cleared to store more or not. }{ ... }; typedef struct { void (*pfStoreChar) (SEGGER_BUFFER_DESC* pBufferDesc, SEGGER_SNPRINTF_CONTEXT* pContext, char c); int (*pfPrintUnsigned) (SEGGER_BUFFER_DESC* pBufferDesc, SEGGER_SNPRINTF_CONTEXT* pContext, U32 v, unsigned Base, char Flags, int Width, int Precision); int (*pfPrintInt) (SEGGER_BUFFER_DESC* pBufferDesc, SEGGER_SNPRINTF_CONTEXT* pContext, I32 v, unsigned Base, char Flags, int Width, int Precision); }{ ... } SEGGER_PRINTF_API; typedef void (*SEGGER_pFormatter)(SEGGER_BUFFER_DESC* pBufferDesc, SEGGER_SNPRINTF_CONTEXT* pContext, const SEGGER_PRINTF_API* pApi, va_list* pParamList, char Lead, int Width, int Precision); typedef struct SEGGER_PRINTF_FORMATTER { struct SEGGER_PRINTF_FORMATTER* pNext; // Pointer to next formatter. SEGGER_pFormatter pfFormatter; // Formatter function. char Specifier; // Format specifier. }{ ... } SEGGER_PRINTF_FORMATTER; typedef struct { U32 (*pfGetHPTimestamp)(void); // Mandatory, pfGetHPTimestamp int (*pfGetUID) (U8 abUID[16]); // Optional, pfGetUID }{ ... } SEGGER_BSP_API; /********************************************************************* * * Utility functions * ********************************************************************** *//* ... */ // // Memory operations. // void SEGGER_ARM_memcpy(void* pDest, const void* pSrc, int NumBytes); void SEGGER_memcpy (void* pDest, const void* pSrc, unsigned NumBytes); void SEGGER_memxor (void* pDest, const void* pSrc, unsigned NumBytes); // // String functions. // int SEGGER_atoi (const char* s); int SEGGER_isalnum (int c); int SEGGER_isalpha (int c); unsigned SEGGER_strlen (const char* s); int SEGGER_tolower (int c); int SEGGER_strcasecmp (const char* sText1, const char* sText2); int SEGGER_strncasecmp(const char *sText1, const char *sText2, unsigned Count); // // Buffer/printf related. // void SEGGER_StoreChar (SEGGER_BUFFER_DESC* pBufferDesc, char c); void SEGGER_PrintUnsigned(SEGGER_BUFFER_DESC* pBufferDesc, U32 v, unsigned Base, int Precision); void SEGGER_PrintInt (SEGGER_BUFFER_DESC* pBufferDesc, I32 v, unsigned Base, int Precision); int SEGGER_snprintf (char* pBuffer, int BufferSize, const char* sFormat, ...); int SEGGER_vsnprintf (char* pBuffer, int BufferSize, const char* sFormat, va_list ParamList); int SEGGER_vsnprintfEx (SEGGER_SNPRINTF_CONTEXT* pContext, const char* sFormat, va_list ParamList); int SEGGER_PRINTF_AddFormatter (SEGGER_PRINTF_FORMATTER* pFormatter, SEGGER_pFormatter pfFormatter, char c); void SEGGER_PRINTF_AddDoubleFormatter (void); void SEGGER_PRINTF_AddIPFormatter (void); void SEGGER_PRINTF_AddBLUEFormatter (void); void SEGGER_PRINTF_AddCONNECTFormatter(void); void SEGGER_PRINTF_AddSSLFormatter (void); void SEGGER_PRINTF_AddSSHFormatter (void); void SEGGER_PRINTF_AddHTMLFormatter (void); // // BSP abstraction API. // int SEGGER_BSP_GetUID (U8 abUID[16]); int SEGGER_BSP_GetUID32(U32* pUID); void SEGGER_BSP_SetAPI (const SEGGER_BSP_API* pAPI); void SEGGER_BSP_SeedUID (void); // // Other API. // void SEGGER_VERSION_GetString(char acText[8], unsigned Version); #if defined(__cplusplus) }{...} /* Make sure we have C-declarations in C++ programs */ #endif /* ... */ #endif // Avoid multiple inclusion /*************************** End of file ****************************/
Details
Show:
from
Types: Columns:
This file uses the notable symbols shown below. Click anywhere in the file to view more details.