Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place. Commercial Alternative to JupyterHub.
Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place. Commercial Alternative to JupyterHub.
Path: blob/next/external/cache/sources/wl/include/msgtrace.h
Views: 3959
/*1* Trace messages sent over HBUS2*3* $Copyright Open Broadcom Corporation$4*5* $Id: msgtrace.h 370068 2012-11-20 21:40:05Z $6*/78#ifndef _MSGTRACE_H9#define _MSGTRACE_H1011#ifndef _TYPEDEFS_H_12#include <typedefs.h>13#endif141516/* This marks the start of a packed structure section. */17#include <packed_section_start.h>1819#define MSGTRACE_VERSION 12021/* Message trace header */22typedef BWL_PRE_PACKED_STRUCT struct msgtrace_hdr {23uint8 version;24uint8 trace_type;25#define MSGTRACE_HDR_TYPE_MSG 026#define MSGTRACE_HDR_TYPE_LOG 127uint16 len; /* Len of the trace */28uint32 seqnum; /* Sequence number of message. Useful if the messsage has been lost29* because of DMA error or a bus reset (ex: SDIO Func2)30*/31/* Msgtrace type only */32uint32 discarded_bytes; /* Number of discarded bytes because of trace overflow */33uint32 discarded_printf; /* Number of discarded printf because of trace overflow */34} BWL_POST_PACKED_STRUCT msgtrace_hdr_t;3536#define MSGTRACE_HDRLEN sizeof(msgtrace_hdr_t)3738/* The hbus driver generates traces when sending a trace message. This causes endless traces.39* This flag must be set to TRUE in any hbus traces. The flag is reset in the function msgtrace_put.40* This prevents endless traces but generates hasardous lost of traces only in bus device code.41* It is recommendat to set this flag in macro SD_TRACE but not in SD_ERROR for avoiding missing42* hbus error traces. hbus error trace should not generates endless traces.43*/44extern bool msgtrace_hbus_trace;4546typedef void (*msgtrace_func_send_t)(void *hdl1, void *hdl2, uint8 *hdr,47uint16 hdrlen, uint8 *buf, uint16 buflen);48extern void msgtrace_start(void);49extern void msgtrace_stop(void);50extern int msgtrace_sent(void);51extern void msgtrace_put(char *buf, int count);52extern void msgtrace_init(void *hdl1, void *hdl2, msgtrace_func_send_t func_send);53extern bool msgtrace_event_enabled(void);5455/* This marks the end of a packed structure section. */56#include <packed_section_end.h>5758#endif /* _MSGTRACE_H */596061