| * Copyright (c) 2021 IoT.bzh |
| * SPDX-License-Identifier: Apache-2.0 |
| #include <zephyr/kernel.h> |
| #include <tracing_core.h> |
| #include <tracing_buffer.h> |
| #include <tracing_backend.h> |
| uint8_t ram_tracing[CONFIG_RAM_TRACING_BUFFER_SIZE]; |
| static void tracing_backend_ram_output( |
| const struct tracing_backend *backend, |
| uint8_t *data, uint32_t length) |
| if ((pos + length) > CONFIG_RAM_TRACING_BUFFER_SIZE) { |
| memcpy(ram_tracing + pos, data, length); |
| static void tracing_backend_ram_init(void) |
| memset(ram_tracing, 0, CONFIG_RAM_TRACING_BUFFER_SIZE); |
| const struct tracing_backend_api tracing_backend_ram_api = { |
| .init = tracing_backend_ram_init, |
| .output = tracing_backend_ram_output |
| TRACING_BACKEND_DEFINE(tracing_backend_ram, tracing_backend_ram_api); |