7#ifndef SHELL_LOG_BACKEND_H__ 
    8#define SHELL_LOG_BACKEND_H__ 
   52int z_shell_log_backend_output_func(
uint8_t *
data, 
size_t length, 
void *ctx);
 
   69#ifdef CONFIG_SHELL_LOG_BACKEND 
   70#define Z_SHELL_LOG_BACKEND_DEFINE(_name, _buf, _size, _queue_size, _timeout) \ 
   71        LOG_BACKEND_DEFINE(_name##_backend, log_backend_shell_api, false); \ 
   72        LOG_OUTPUT_DEFINE(_name##_log_output, z_shell_log_backend_output_func,\ 
   74        static struct shell_log_backend_control_block _name##_control_block; \ 
   75        static uint32_t __aligned(Z_LOG_MSG2_ALIGNMENT) \ 
   76                        _name##_buf[_queue_size / sizeof(uint32_t)]; \ 
   77        const struct mpsc_pbuf_buffer_config _name##_mpsc_buffer_config = { \ 
   79                .size = ARRAY_SIZE(_name##_buf), \ 
   80                .notify_drop = NULL, \ 
   81                .get_wlen = log_msg_generic_get_wlen, \ 
   82                .flags = MPSC_PBUF_MODE_OVERWRITE, \ 
   84        struct mpsc_pbuf_buffer _name##_mpsc_buffer; \ 
   85        static const struct shell_log_backend _name##_log_backend = { \ 
   86                .backend = &_name##_backend, \ 
   87                .log_output = &_name##_log_output, \ 
   88                .control_block = &_name##_control_block, \ 
   89                .timeout = _timeout, \ 
   90                .mpsc_buffer_config = &_name##_mpsc_buffer_config, \ 
   91                .mpsc_buffer = &_name##_mpsc_buffer, \ 
   94#define Z_SHELL_LOG_BACKEND_PTR(_name) (&_name##_log_backend) 
   96#define Z_SHELL_LOG_BACKEND_DEFINE(_name, _buf, _size, _queue_size, _timeout) 
   97#define Z_SHELL_LOG_BACKEND_PTR(_name) NULL 
  107                                void *ctx, 
uint32_t init_log_level);
 
long atomic_t
Definition: atomic.h:22
 
shell_log_backend_state
Shell log backend states.
Definition: shell_log_backend.h:22
 
@ SHELL_LOG_BACKEND_UNINIT
Definition: shell_log_backend.h:23
 
@ SHELL_LOG_BACKEND_PANIC
Definition: shell_log_backend.h:26
 
@ SHELL_LOG_BACKEND_DISABLED
Definition: shell_log_backend.h:25
 
@ SHELL_LOG_BACKEND_ENABLED
Definition: shell_log_backend.h:24
 
const struct log_backend_api log_backend_shell_api
 
__UINT32_TYPE__ uint32_t
Definition: stdint.h:90
 
__UINT8_TYPE__ uint8_t
Definition: stdint.h:88
 
Logger backend API.
Definition: log_backend.h:62
 
Logger backend structure.
Definition: log_backend.h:93
 
Log_output instance structure.
Definition: log_output.h:89
 
MPSC packet buffer configuration.
Definition: mpsc_pbuf.h:131
 
MPSC packet buffer structure.
Definition: mpsc_pbuf.h:90
 
Shell log backend control block (RW data).
Definition: shell_log_backend.h:30
 
enum shell_log_backend_state state
Definition: shell_log_backend.h:32
 
atomic_t dropped_cnt
Definition: shell_log_backend.h:31
 
Shell log backend message structure.
Definition: shell_log_backend.h:46
 
struct log_msg * msg
Definition: shell_log_backend.h:47
 
uint32_t timestamp
Definition: shell_log_backend.h:48
 
Shell log backend instance structure (RO data).
Definition: shell_log_backend.h:36
 
uint32_t timeout
Definition: shell_log_backend.h:40
 
struct mpsc_pbuf_buffer * mpsc_buffer
Definition: shell_log_backend.h:42
 
const struct log_backend * backend
Definition: shell_log_backend.h:37
 
const struct mpsc_pbuf_buffer_config * mpsc_buffer_config
Definition: shell_log_backend.h:41
 
const struct log_output * log_output
Definition: shell_log_backend.h:38
 
struct shell_log_backend_control_block * control_block
Definition: shell_log_backend.h:39
 
static fdata_t data[2]
Definition: test_fifo_contexts.c:15