Percepio Trace Recorder v4.11.0
Loading...
Searching...
No Matches
trcStreamPort.h
1/*
2 * Trace Recorder for Tracealyzer v4.11.0
3 * Copyright 2025 Percepio AB
4 * www.percepio.com
5 *
6 * SPDX-License-Identifier: Apache-2.0
7 *
8 * The interface definitions for trace streaming ("stream ports").
9 * This "stream port" sets up the recorder to use XMOS xScope as a streaming channel.
10 */
11
12#ifndef TRC_STREAMING_PORT_H
13#define TRC_STREAMING_PORT_H
14
15#if (TRC_USE_TRACEALYZER_RECORDER == 1)
16
17#ifdef __cplusplus
18extern "C" {
19#endif
20
21#include <trcTypes.h>
22#include <trcStreamPortConfig.h>
23
27typedef struct TraceStreamPortBuffer /* Aligned */
28{
29 uint8_t uiBuffer[8];
30} TraceStreamPortBuffer_t;
31
41traceResult xTraceStreamPortInitialize(TraceStreamPortBuffer_t* pxBuffer);
42
51traceResult xTraceStreamPortOnBegin(void);
52
61traceResult xTraceStreamPortOnEnd(void);
62
74traceResult xTraceStreamPortWriteData(void* pvData, uint32_t uiSize, uint32_t uiChannel, int32_t* piBytesWritten);
75
86traceResult xTraceStreamPortReadData(void* pvData, uint32_t uiSize, int32_t* piBytesRead);
87
88#define xTraceStreamPortOnEnable(uiStartOption) TRC_COMMA_EXPR_TO_STATEMENT_EXPR_2((void)(uiStartOption), TRC_SUCCESS)
89
90#define xTraceStreamPortOnDisable() TRC_COMMA_EXPR_TO_STATEMENT_EXPR_1(TRC_SUCCESS)
91
92#define xTraceStreamPortOnTraceBegin() TRC_COMMA_EXPR_TO_STATEMENT_EXPR_1(TRC_SUCCESS)
93
94#define xTraceStreamPortOnTraceEnd() TRC_COMMA_EXPR_TO_STATEMENT_EXPR_1(TRC_SUCCESS)
95
96#ifdef __cplusplus
97}
98#endif
99
100#endif /*(TRC_USE_TRACEALYZER_RECORDER == 1)*/
101
102#endif /* TRC_STREAMING_PORT_H */
A structure representing the trace stream port buffer.
Definition trcStreamPort.h:71