source: svn/trunk/newcon3bcm2_21bu/magnum/portinginterface/xvd/7552/bxvd_dbg.h

Last change on this file was 2, checked in by jglee, 11 years ago

first commit

  • Property svn:executable set to *
File size: 4.8 KB
Line 
1
2/***************************************************************************
3 *     Copyright (c) 2004-2011, Broadcom Corporation
4 *     All Rights Reserved
5 *     Confidential Property of Broadcom Corporation
6 *
7 *  THIS SOFTWARE MAY ONLY BE USED SUBJECT TO AN EXECUTED SOFTWARE LICENSE
8 *  AGREEMENT  BETWEEN THE USER AND BROADCOM.  YOU HAVE NO RIGHT TO USE OR
9 *  EXPLOIT THIS MATERIAL EXCEPT SUBJECT TO THE TERMS OF SUCH AN AGREEMENT.
10 *
11 * $brcm_Workfile: bxvd_dbg.h $
12 * $brcm_Revision: Hydra_Software_Devel/3 $
13 * $brcm_Date: 7/20/11 3:07p $
14 *
15 * Module Description:
16 *   TBA
17 *
18 * Revision History:
19 *
20 * $brcm_Log: /magnum/portinginterface/xvd/7401/bxvd_dbg.h $
21 *
22 * Hydra_Software_Devel/3   7/20/11 3:07p davidp
23 * SW7420-2001: Reorder header-file includes.
24 *
25 * Hydra_Software_Devel/2   4/11/08 4:52p davidp
26 * PR40234: Merge decoder debug logging from branch.
27 *
28 * Hydra_Software_Devel/PR40234/1   4/10/08 3:42p davidp
29 * PR40234: Add support for decoder debug logging.
30 *
31 * Hydra_Software_Devel/1   4/3/08 3:27p davidp
32 * PR40234: Stub out xvd routines to support decoder debug logging.
33 *
34 ***************************************************************************/
35
36#ifndef BXVD_DBG_H__
37#define BXVD_DBG_H__
38
39#include "bstd.h"                /* standard types */
40#include "bxvd.h"
41#include "bxvd_platform.h"
42#include "bxvd_priv.h"
43
44#ifdef __cplusplus
45extern "C" {
46#endif
47
48
49/***************************************************************************
50Summary:
51   Enum used to stop and start decoder debug logging
52
53Description:
54   This enum is used in calls to BXVD_ControlDecoderDebugLog.
55   The decoder debug log must be started for the Decoder to write
56   debug output to a buffer to be read by XVD.
57
58See Also:
59        BXVD_ControlDecoderDebugLog
60****************************************************************************/
61typedef enum BXVD_DBG_DebugLogging
62{
63   BXVD_DBG_DebugLogging_eStop = 0,
64   BXVD_DBG_DebugLogging_eStart
65} BXVD_DBG_DebugLogging;
66
67
68
69/***************************************************************************
70Summary:
71  Controls decoder debug logging
72
73Description:
74  This API controls the logging of decoders outer loop debug output. The debug
75  logging can be started or stopped.
76
77  Once the debug logging is enabled, the application must call
78  BXVD_DBG_ReadDecoderDebugLog to read the log. The
79
80  Decoder debug commands can be sent to the decoder using
81  BXVD_SendDecoderDebugCommand. The output of the command would then be
82  read using BXVD_DBG_ReadDecoderDebugLog.
83
84Returns:
85  BERR_SUCCESS
86  BERR_INVALID_PARAMETER
87  BXVD_ERR_DEBUG_LOG_NOBUFFER
88
89See Also: BXVD_DBG_ReadDecoderDebugLog, BXVD_DBG_SendDecoderDebugCommand
90****************************************************************************/
91BERR_Code BXVD_DBG_ControlDecoderDebugLog
92(
93   BXVD_Handle            hXvd,          /* [in] device handle */
94   BXVD_DBG_DebugLogging  eDebugLogging  /* [in] start/stop logging */
95);
96
97
98/***************************************************************************
99Summary:
100  Send decoder debug commands to the decoder.
101
102Description:
103  This API sends a command string to the decoder. The command format is the
104  same format as used when using the debug prompt via the decoders outer loop
105  UART. 
106
107  Decoder debug commands are sent to the decoder using
108  BXVD_DBG_SendDecoderDebugCommand. The output of the command would then be
109  read using BXVD_DBG_ReadDecoderDebugLog.
110
111Returns:
112  BERR_SUCCESS
113  BERR_INVALID_PARAMETER
114  BXVD_ERR_DEBUG_LOG_NOBUFFER
115
116See Also: BXVD_DBG_ControlDecoderDebugLog, BXVD_DBG_ReadDecoderDebugLog
117****************************************************************************/
118BERR_Code BXVD_DBG_SendDecoderDebugCommand
119(
120   BXVD_Handle hXvd,      /* [in] device handle */   
121   char        *pCommand  /* [in] pointer to a null terminated command string */
122);
123
124
125/***************************************************************************
126Summary:
127  Read decoder debug log
128
129Description:
130  This API copies a maxium uiBufferSize of data from the decoders debug log
131  buffer to pLogBuffer. The number of bytes copied to the supplied buffer is
132  returned in pBufferCount.
133
134  If there are no bytes to be read, pBufferCount will be 0.
135
136Returns:
137  BERR_SUCCESS
138  BERR_INVALID_PARAMETER
139  BXVD_ERR_DEBUG_LOG_OVERFLOW
140 
141See Also: BXVD_DBG_ControlDecoderDebugLog, BXVD_DBG_SendDecoderDebugCommand
142****************************************************************************/
143BERR_Code BXVD_DBG_ReadDecoderDebugLog
144(
145   BXVD_Handle hXvd,          /* [in] device handle */   
146   char        *pLogBuffer,   /* [in] pointer to buffer where log is copied to */
147   uint32_t    uiBufferSize,  /* [in] maximum number of bytes to copy to buffer */
148   uint32_t    *pBufferCount  /* [out] number of bytes copied from decoder log */
149);
150
151#ifdef __cplusplus
152}
153#endif
154
155#endif /* BXVD_DBG_H__ */
156/* End of file. */
Note: See TracBrowser for help on using the repository browser.