TT Zephyr Platforms 18.11.99
Tenstorrent Firmware
|
Ring buffer log backend. More...
#include <zephyr/logging/log_backend.h>
#include <zephyr/logging/log_core.h>
#include <zephyr/logging/log_output.h>
#include <zephyr/logging/log_backend_std.h>
Functions | |
RING_BUF_DECLARE (ringbuf_output_buf, CONFIG_LOG_BACKEND_RINGBUF_BUFFER_SIZE) | |
int | log_backend_ringbuf_get_claim (uint8_t **data, size_t length) |
int | log_backend_ringbuf_finish_claim (size_t length) |
void | log_backend_ringbuf_clear (void) |
size_t | log_backend_ringbuf_get_used (void) |
static int | char_out (uint8_t *data, size_t length, void *ctx) |
LOG_OUTPUT_DEFINE (log_output_ringbuf, char_out, buf, sizeof(buf)) | |
static void | log_backend_ringbuf_process (const struct log_backend *const backend, union log_msg_generic *msg) |
static int | format_set (const struct log_backend *const backend, uint32_t log_type) |
static void | log_backend_ringbuf_panic (struct log_backend const *const backend) |
static void | dropped (const struct log_backend *const backend, uint32_t cnt) |
LOG_BACKEND_DEFINE (log_backend_ringbuf, log_backend_ringbuf_api, true) |
Variables | |
static uint8_t | buf [1] |
static uint32_t | log_format_current = CONFIG_LOG_BACKEND_RINGBUF_OUTPUT_DEFAULT |
const struct log_backend_api | log_backend_ringbuf_api |
Ring buffer log backend.
This backend logs into a ring buffer, which can be read via the log_backend_ringbuf_get_data() API. Applications can call this API to stream log data to an external consumer.
|
static |
|
static |
LOG_BACKEND_DEFINE | ( | log_backend_ringbuf | , |
log_backend_ringbuf_api | , | ||
true | ) |
void log_backend_ringbuf_clear | ( | void | ) |
Clear the ring buffer log backend. Resets the ring buffer to empty, so new log messages will be written
int log_backend_ringbuf_finish_claim | ( | size_t | length | ) |
Finish claiming data from the ring buffer log backend. internally calls ring_buf_get_finish() on the logging ring buffer.
length | Number of bytes read from the buffer. |
Get address of ring buffer log backend buffer. internally calls ring_buf_get_claim() on the logging ring buffer.
data | Pointer to address. Will be set to location within ring buffer |
length | Requested length of data to claim |
size_t log_backend_ringbuf_get_used | ( | void | ) |
Get the number of bytes currently stored in the ring buffer log backend.
|
static |
|
static |
RING_BUF_DECLARE | ( | ringbuf_output_buf | , |
CONFIG_LOG_BACKEND_RINGBUF_BUFFER_SIZE | ) |
|
static |
const struct log_backend_api log_backend_ringbuf_api |
|
static |