1 /* 2 * Percepio Trace Recorder for Tracealyzer v4.8.1 3 * Copyright 2023 Percepio AB 4 * www.percepio.com 5 * 6 * SPDX-License-Identifier: Apache-2.0 7 * 8 * The common types. 9 */ 10 11 #ifndef TRC_TYPES_H 12 #define TRC_TYPES_H 13 14 #include <stdint.h> 15 #include <trcConfig.h> 16 #include <trcHardwarePort.h> 17 18 #ifdef __cplusplus 19 extern "C" { 20 #endif 21 22 #ifndef TRC_BASE_TYPE 23 #define TRC_BASE_TYPE int32_t 24 #endif 25 26 #ifndef TRC_UNSIGNED_BASE_TYPE 27 #define TRC_UNSIGNED_BASE_TYPE uint32_t 28 #endif 29 30 typedef TRC_UNSIGNED_BASE_TYPE TraceUnsignedBaseType_t; 31 32 typedef TRC_BASE_TYPE TraceBaseType_t; 33 34 #if (TRC_CFG_RECORDER_MODE == TRC_RECORDER_MODE_STREAMING) 35 typedef void* TraceHandleBaseType_t; 36 #else 37 typedef TraceUnsignedBaseType_t TraceHandleBaseType_t; 38 #endif 39 40 typedef TraceUnsignedBaseType_t traceResult; 41 42 typedef TraceHandleBaseType_t TraceEventHandle_t; 43 44 typedef TraceHandleBaseType_t TraceISRHandle_t; 45 46 typedef TraceHandleBaseType_t TraceEntryHandle_t; 47 48 typedef TraceHandleBaseType_t TraceTaskHandle_t; 49 50 typedef TraceHandleBaseType_t TraceObjectHandle_t; 51 52 typedef TraceHandleBaseType_t TraceExtensionHandle_t; 53 54 typedef TraceHandleBaseType_t TraceHeapHandle_t; 55 56 typedef TraceHandleBaseType_t TraceIntervalChannelSetHandle_t; 57 58 typedef TraceHandleBaseType_t TraceIntervalChannelHandle_t; 59 60 typedef TraceHandleBaseType_t TraceIntervalInstanceHandle_t; 61 62 typedef TraceHandleBaseType_t TraceStateMachineHandle_t; 63 64 typedef TraceHandleBaseType_t TraceStateMachineStateHandle_t; 65 66 typedef TraceHandleBaseType_t TraceStringHandle_t; 67 68 typedef TraceHandleBaseType_t TraceCounterHandle_t; 69 70 typedef TraceHandleBaseType_t TraceRunnableHandle_t; 71 72 typedef TraceHandleBaseType_t TraceRunnableStaticSetHandle_t; 73 74 typedef void (*TraceCounterCallback_t)(TraceCounterHandle_t xCounterHandle); 75 76 /* DEPRECATED. Backwards compatibility */ 77 typedef TraceStringHandle_t traceString; 78 79 #ifdef __cplusplus 80 } 81 #endif 82 83 #endif /* TRC_TYPES_H */ 84