1 /* 2 * Copyright (c) 2019 Nordic Semiconductor ASA 3 * 4 * SPDX-License-Identifier: Apache-2.0 5 */ 6 #ifndef LOG_FRONTEND_H_ 7 #define LOG_FRONTEND_H_ 8 9 #include <zephyr/logging/log_core.h> 10 11 /** @brief Initialize frontend. 12 */ 13 void log_frontend_init(void); 14 15 /** @brief Log message. 16 * 17 * Message details does not contain timestamp. Since function is called in the 18 * context of log message call, implementation can use its own timestamping scheme. 19 * 20 * @param source Pointer to a structure associated with given source. It points to 21 * static structure or dynamic structure if runtime filtering is enabled. 22 * @ref log_const_source_id or @ref log_dynamic_source_id can be used to determine 23 * source id. 24 * 25 * @param desc Message descriptor. 26 * 27 * @param package Cbprintf package containing logging formatted string. Length s in @p desc. 28 * 29 * @param data Hexdump data. Length is in @p desc. 30 */ 31 void log_frontend_msg(const void *source, 32 const struct log_msg_desc desc, 33 uint8_t *package, const void *data); 34 35 /** @brief Panic state notification. */ 36 void log_frontend_panic(void); 37 38 #endif /* LOG_FRONTEND_H_ */ 39