nRF Connect SDK API 2.8.99
Loading...
Searching...
No Matches
trace_backend.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2022-2023 Nordic Semiconductor ASA
3 *
4 * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
5 */
6
7#ifndef TRACE_BACKEND_H__
8#define TRACE_BACKEND_H__
9
10#ifdef __cplusplus
11extern "C" {
12#endif
13
24typedef int (*trace_backend_processed_cb)(size_t len);
25
39 int (*init)(trace_backend_processed_cb trace_processed_cb);
40
47 int (*deinit)(void);
48
67 int (*write)(const void *data, size_t len);
68
78 size_t (*data_size)(void);
79
93 int (*read)(void *buf, size_t len);
94
104 int (*clear)(void);
105
116 int (*suspend)(void);
117
127 int (*resume)(void);
128};
129
130 /* defgroup trace_backend */
131
132#ifdef __cplusplus
133}
134#endif
135
136#endif /* TRACE_BACKEND_H__ */
int(* trace_backend_processed_cb)(size_t len)
callback to signal the trace module that some amount of trace data has been processed.
Definition trace_backend.h:24
int(* suspend)(void)
Suspend trace backend.
Definition trace_backend.h:116
int(* init)(trace_backend_processed_cb trace_processed_cb)
Initialize the compile-time selected trace backend.
Definition trace_backend.h:39
int(* deinit)(void)
Deinitialize the compile-time selected trace backend.
Definition trace_backend.h:47
int(* read)(void *buf, size_t len)
Read trace data from the compile-time selected trace backend.
Definition trace_backend.h:93
int(* clear)(void)
Erase all captured trace data in the compile-time selected trace backend.
Definition trace_backend.h:104
size_t(* data_size)(void)
Get the number of bytes stored in the compile-time selected trace backend.
Definition trace_backend.h:78
int(* resume)(void)
Resume trace backend.
Definition trace_backend.h:127
int(* write)(const void *data, size_t len)
Write trace data to the compile-time selected trace backend.
Definition trace_backend.h:67
The trace backend interface, implemented by the trace backend.
Definition trace_backend.h:29