nRF Connect SDK API 0.1.0
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
64 int (*write)(const void *data, size_t len);
65
75 size_t (*data_size)(void);
76
90 int (*read)(void *buf, size_t len);
91
101 int (*clear)(void);
102
113 int (*suspend)(void);
114
124 int (*resume)(void);
125};
126 /* defgroup trace_backend */
128
129#ifdef __cplusplus
130}
131#endif
132
133#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:113
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:90
int(* clear)(void)
Erase all captured trace data in the compile-time selected trace backend.
Definition: trace_backend.h:101
size_t(* data_size)(void)
Get the number of bytes stored in the compile-time selected trace backend.
Definition: trace_backend.h:75
int(* resume)(void)
Resume trace backend.
Definition: trace_backend.h:124
int(* write)(const void *data, size_t len)
Write trace data to the compile-time selected trace backend.
Definition: trace_backend.h:64
The trace backend interface, implemented by the trace backend.
Definition: trace_backend.h:29