LCOV - code coverage report
Current view: top level - zephyr/logging - log_backend_adsp_mtrace.h Coverage Total Hit
Test: new.info Lines: 75.0 % 4 3
Test Date: 2025-09-05 20:47:19

            Line data    Source code
       1            1 : /*
       2              :  * Copyright (c) 2022 Intel Corporation
       3              :  *
       4              :  * SPDX-License-Identifier: Apache-2.0
       5              :  */
       6              : 
       7              : /**
       8              :  * @file
       9              :  * @brief Header file for the Intel ADSP mtrace log backend API
      10              :  * @ingroup log_backend_adsp_mtrace
      11              :  */
      12              : 
      13              : #ifndef ZEPHYR_LOG_BACKEND_ADSP_MTRACE_H_
      14              : #define ZEPHYR_LOG_BACKEND_ADSP_MTRACE_H_
      15              : 
      16              : /**
      17              :  * @brief Intel ADSP mtrace log backend API
      18              :  * @defgroup log_backend_adsp_mtrace Intel ADSP mtrace log backend API
      19              :  * @ingroup log_backend
      20              :  * @{
      21              :  */
      22              : 
      23              : #include <stdint.h>
      24              : #include <stddef.h>
      25              : 
      26              : /**
      27              :  *@brief mtracelogger requires a hook for IPC messages
      28              :  *
      29              :  * When new log data is added to the SRAM buffer, a IPC message
      30              :  * should be sent to the host. This hook function pointer allows
      31              :  * for that.
      32              :  */
      33            1 : typedef void(*adsp_mtrace_log_hook_t)(size_t written, size_t space_left);
      34              : 
      35              : /**
      36              :  * @brief Initialize the Intel ADSP mtrace logger
      37              :  *
      38              :  * @param hook Function is called after each write to the SRAM buffer
      39              :  *             It is up to the author of the hook to serialize if needed.
      40              :  */
      41            1 : void adsp_mtrace_log_init(adsp_mtrace_log_hook_t hook);
      42              : 
      43            0 : const struct log_backend *log_backend_adsp_mtrace_get(void);
      44              : 
      45              : /** @} */
      46              : 
      47              : #endif /* ZEPHYR_LOG_BACKEND_ADSP_MTRACE_H_ */
        

Generated by: LCOV version 2.0-1