Zephyr API Documentation 4.0.0-rc3
A Scalable Open Source RTOS
|
Data Structures | |
struct | log_frontend_stmesp_demux_log_header |
Logging message header. More... | |
union | log_frontend_stmesp_demux_header |
Union for writing raw data to the logging message header. More... | |
struct | log_frontend_stmesp_demux_packet_generic |
Generic STP demux packet. More... | |
struct | log_frontend_stmesp_demux_log |
Packet with logging message. More... | |
struct | log_frontend_stmesp_demux_trace_point |
Packet with trace point. More... | |
struct | log_frontend_stmesp_demux_hw_event |
Packet with HW event. More... | |
union | log_frontend_stmesp_demux_packet |
Union of all packet types. More... | |
struct | log_frontend_stmesp_demux_config |
Demultiplexer configuration. More... | |
Macros | |
#define | LOG_FRONTEND_STMESP_DEMUX_MAJOR_BITS 3 |
Bits used to store major index. | |
#define | LOG_FRONTEND_STMESP_DEMUX_LEVEL_BITS 3 |
Bits used to store severity level. | |
#define | LOG_FRONTEND_STMESP_DEMUX_TLENGTH_BITS 16 |
Bits used to store total length. | |
#define | LOG_FRONTEND_STMESP_DEMUX_PLENGTH_BITS 10 |
Bits used to store package length. | |
#define | LOG_FRONTEND_STMESP_DEMUX_MAJOR_MAX BIT(LOG_FRONTEND_STMESP_DEMUX_MAJOR_BITS) |
Maximum number of supported majors. | |
#define | LOG_FRONTEND_STMESP_DEMUX_TYPE_LOG 0 |
Log message type. | |
#define | LOG_FRONTEND_STMESP_DEMUX_TYPE_TRACE_POINT 1 |
Trace point message type. | |
#define | LOG_FRONTEND_STMESP_DEMUX_TYPE_HW_EVENT 2 |
HW event message type. | |
Functions | |
int | log_frontend_stmesp_demux_init (const struct log_frontend_stmesp_demux_config *config) |
Initialize the demultiplexer. | |
void | log_frontend_stmesp_demux_major (uint16_t id) |
Indicate major opcode in the STPv2 stream. | |
void | log_frontend_stmesp_demux_channel (uint16_t id) |
Indicate channel opcode in the STPv2 stream. | |
int | log_frontend_stmesp_demux_packet_start (uint32_t *data, uint64_t *ts) |
Indicate detected packet start (DMTS). | |
void | log_frontend_stmesp_demux_timestamp (uint64_t ts) |
Indicate timestamp. | |
void | log_frontend_stmesp_demux_data (uint8_t *data, size_t len) |
Indicate data. | |
void | log_frontend_stmesp_demux_packet_end (void) |
Indicate packet end (Flag). | |
uint32_t | log_frontend_stmesp_demux_get_dropped (void) |
Get number of dropped messages and reset the counter. | |
union log_frontend_stmesp_demux_packet | log_frontend_stmesp_demux_claim (void) |
Claim packet. | |
void | log_frontend_stmesp_demux_free (union log_frontend_stmesp_demux_packet packet) |
Free previously claimed packet. | |
bool | log_frontend_stmesp_demux_is_idle (void) |
Check if there are any started but not completed log messages. | |
void | log_frontend_stmesp_demux_reset (void) |
Close any opened messages and mark them as invalid. | |
int | log_frontend_stmesp_demux_max_utilization (void) |
Get maximum buffer utilization. | |
#define LOG_FRONTEND_STMESP_DEMUX_LEVEL_BITS 3 |
#include <zephyr/logging/log_frontend_stmesp_demux.h>
Bits used to store severity level.
#define LOG_FRONTEND_STMESP_DEMUX_MAJOR_BITS 3 |
#include <zephyr/logging/log_frontend_stmesp_demux.h>
Bits used to store major index.
#define LOG_FRONTEND_STMESP_DEMUX_MAJOR_MAX BIT(LOG_FRONTEND_STMESP_DEMUX_MAJOR_BITS) |
#include <zephyr/logging/log_frontend_stmesp_demux.h>
Maximum number of supported majors.
#define LOG_FRONTEND_STMESP_DEMUX_PLENGTH_BITS 10 |
#include <zephyr/logging/log_frontend_stmesp_demux.h>
Bits used to store package length.
#define LOG_FRONTEND_STMESP_DEMUX_TLENGTH_BITS 16 |
#include <zephyr/logging/log_frontend_stmesp_demux.h>
Bits used to store total length.
#define LOG_FRONTEND_STMESP_DEMUX_TYPE_HW_EVENT 2 |
#include <zephyr/logging/log_frontend_stmesp_demux.h>
HW event message type.
#define LOG_FRONTEND_STMESP_DEMUX_TYPE_LOG 0 |
#include <zephyr/logging/log_frontend_stmesp_demux.h>
Log message type.
#define LOG_FRONTEND_STMESP_DEMUX_TYPE_TRACE_POINT 1 |
#include <zephyr/logging/log_frontend_stmesp_demux.h>
Trace point message type.
void log_frontend_stmesp_demux_channel | ( | uint16_t | id | ) |
#include <zephyr/logging/log_frontend_stmesp_demux.h>
Indicate channel opcode in the STPv2 stream.
id | Channel ID. |
union log_frontend_stmesp_demux_packet log_frontend_stmesp_demux_claim | ( | void | ) |
#include <zephyr/logging/log_frontend_stmesp_demux.h>
Claim packet.
Get pointer to the pending packet with logging message. Packet must be freed using log_frontend_stmesp_demux_free.
#include <zephyr/logging/log_frontend_stmesp_demux.h>
Indicate data.
data | Data buffer. |
len | Length. |
void log_frontend_stmesp_demux_free | ( | union log_frontend_stmesp_demux_packet | packet | ) |
#include <zephyr/logging/log_frontend_stmesp_demux.h>
Free previously claimed packet.
See log_frontend_stmesp_demux_claim.
packet | Packet. |
uint32_t log_frontend_stmesp_demux_get_dropped | ( | void | ) |
#include <zephyr/logging/log_frontend_stmesp_demux.h>
Get number of dropped messages and reset the counter.
Message can be dropped if there is no room in the packet buffer.
int log_frontend_stmesp_demux_init | ( | const struct log_frontend_stmesp_demux_config * | config | ) |
#include <zephyr/logging/log_frontend_stmesp_demux.h>
Initialize the demultiplexer.
config | Configuration. |
0 | on success. |
-EINVAL | on invalid configuration. |
bool log_frontend_stmesp_demux_is_idle | ( | void | ) |
#include <zephyr/logging/log_frontend_stmesp_demux.h>
Check if there are any started but not completed log messages.
True | There is no pending started log message. |
False | There is pending message. |
void log_frontend_stmesp_demux_major | ( | uint16_t | id | ) |
#include <zephyr/logging/log_frontend_stmesp_demux.h>
Indicate major opcode in the STPv2 stream.
id | Master ID. |
int log_frontend_stmesp_demux_max_utilization | ( | void | ) |
#include <zephyr/logging/log_frontend_stmesp_demux.h>
Get maximum buffer utilization.
Non-negative | Maximum buffer utilization. |
-ENOTSUP | Feature not enabled. |
void log_frontend_stmesp_demux_packet_end | ( | void | ) |
#include <zephyr/logging/log_frontend_stmesp_demux.h>
Indicate packet end (Flag).
#include <zephyr/logging/log_frontend_stmesp_demux.h>
Indicate detected packet start (DMTS).
data | Data. Can be NULL which indicates trace point without data. |
ts | Timestamp. Can be NULL. |
void log_frontend_stmesp_demux_reset | ( | void | ) |
#include <zephyr/logging/log_frontend_stmesp_demux.h>
Close any opened messages and mark them as invalid.
void log_frontend_stmesp_demux_timestamp | ( | uint64_t | ts | ) |
#include <zephyr/logging/log_frontend_stmesp_demux.h>
Indicate timestamp.
Timestamp is separated from packet start because according to STM spec (3.2.2) it is possible that timestamp is assigned to a later packet.
ts | Timestamp. |