• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  *  Copyright 2001-2008 Texas Instruments - http://www.ti.com/
3  *
4  *  Licensed under the Apache License, Version 2.0 (the "License");
5  *  you may not use this file except in compliance with the License.
6  *  You may obtain a copy of the License at
7  *
8  *     http://www.apache.org/licenses/LICENSE-2.0
9  *
10  *  Unless required by applicable law or agreed to in writing, software
11  *  distributed under the License is distributed on an "AS IS" BASIS,
12  *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  *  See the License for the specific language governing permissions and
14  *  limitations under the License.
15  */
16 
17 
18 /*
19  *  ======== _dbdebug.h ========
20  *  DSP-BIOS Bridge driver support functions for TI OMAP processors.
21  *  Description:
22  *      This is private header file to define the debug zones. This is
23  *      WinCE Specific.
24  *
25  *  Notes:
26  *
27  *! Revision History:
28  *! ================
29  *! 29-Nov-2000 rr: Name changed to _ddspdebug.h and this header changed to
30  *!                 TISB Coding standard.
31  */
32 
33 #ifndef _DBDEBUG_
34 #define _DBDEBUG_
35 
36 #ifdef __cplusplus
37 extern "C" {
38 #endif
39 
40 #ifdef LINUX
41 
42 /* Enable/Disable user API print messages in Linux */
43 #define DSPAPI_ZONE_INIT         0x0
44 #define DSPAPI_ZONE_MGR          0x1
45 #define DSPAPI_ZONE_PROC         0x2
46 #define DSPAPI_ZONE_NODE         0x3
47 #define DSPAPI_ZONE_STREAM       0x4
48 #define DSPAPI_ZONE_TEST         0x5
49 #define DSPAPI_ZONE_FUNCTION     0xd
50 #define DSPAPI_ZONE_WARNING      0xe
51 #define DSPAPI_ZONE_ERROR        0xf
52 #define DSPAPI_DEBUG_NONE        0xff
53 
54 /* statically configure debug level */
55 #ifdef DDSP_DEBUG_PRODUCT
56 #define DSPAPI_DEBUG_LEVEL DSPAPI_ZONE_WARNING
57 #else				/* default debug level */
58 #define DSPAPI_DEBUG_LEVEL DSPAPI_ZONE_WARNING
59 #endif
60 
61 #define DEBUGMSG(x,y) if(x >= DSPAPI_DEBUG_LEVEL) printf(y)
62 
63 #else				/* ifdef LINUX */
64 
65 /*
66  * DEBUG macro support.
67  */
68 #ifdef DEBUG
69 
70 #define DSPAPI_ZONE_ID_INIT         0x0
71 #define DSPAPI_ZONE_ID_MGR          0x1
72 #define DSPAPI_ZONE_ID_PROC         0x2
73 #define DSPAPI_ZONE_ID_NODE         0x3
74 #define DSPAPI_ZONE_ID_STREAM       0x4
75 #define DSPAPI_ZONE_ID_TEST         0x5
76 #define DSPAPI_ZONE_ID_FUNCTION     0xd
77 #define DSPAPI_ZONE_ID_WARNING      0xe
78 #define DSPAPI_ZONE_ID_ERROR        0xf
79 
80 #define DSPAPI_ZONE_MASK_INIT       ( 0x1 << DSPAPI_ZONE_ID_INIT )
81 #define DSPAPI_ZONE_MASK_MGR        ( 0x1 << DSPAPI_ZONE_ID_MGR )
82 #define DSPAPI_ZONE_MASK_PROC       ( 0x1 << DSPAPI_ZONE_ID_PROC )
83 #define DSPAPI_ZONE_MASK_NODE       ( 0x1 << DSPAPI_ZONE_ID_NODE )
84 #define DSPAPI_ZONE_MASK_STREAM     ( 0x1 << DSPAPI_ZONE_ID_STREAM )
85 #define DSPAPI_ZONE_MASK_TEST       ( 0x1 << DSPAPI_ZONE_ID_TEST )
86 #define DSPAPI_ZONE_MASK_FUNCTION   ( 0x1 << DSPAPI_ZONE_ID_FUNCTION )
87 #define DSPAPI_ZONE_MASK_WARNING    ( 0x1 << DSPAPI_ZONE_ID_WARNING )
88 #define DSPAPI_ZONE_MASK_ERROR      ( 0x1 << DSPAPI_ZONE_ID_ERROR )
89 
90 #define DSPAPI_ZONE_INIT            DEBUGZONE( DSPAPI_ZONE_ID_INIT )
91 #define DSPAPI_ZONE_MGR             DEBUGZONE( DSPAPI_ZONE_ID_MGR )
92 #define DSPAPI_ZONE_PROC            DEBUGZONE( DSPAPI_ZONE_ID_PROC )
93 #define DSPAPI_ZONE_NODE            DEBUGZONE( DSPAPI_ZONE_ID_NODE )
94 #define DSPAPI_ZONE_STREAM          DEBUGZONE( DSPAPI_ZONE_ID_STREAM )
95 #define DSPAPI_ZONE_TEST            DEBUGZONE( DSPAPI_ZONE_ID_TEST )
96 #define DSPAPI_ZONE_FUNCTION        DEBUGZONE( DSPAPI_ZONE_ID_FUNCTION )
97 #define DSPAPI_ZONE_WARNING         DEBUGZONE( DSPAPI_ZONE_ID_WARNING )
98 #define DSPAPI_ZONE_ERROR           DEBUGZONE( DSPAPI_ZONE_ID_ERROR )
99 
100 #endif
101 
102 #endif				/* ifdef LINUX */
103 
104 #ifdef __cplusplus
105 }
106 #endif
107 #endif				/* _DBDEBUG_ */
108