Home | History | Annotate | Download | only in inc
      1 /*
      2  * dspbridge/mpu_api/inc/_dbdebug.h
      3  *
      4  * DSP-BIOS Bridge driver support functions for TI OMAP processors.
      5  *
      6  * Copyright (C) 2007 Texas Instruments, Inc.
      7  *
      8  * This program is free software; you can redistribute it and/or modify it
      9  * under the terms of the GNU Lesser General Public License as published
     10  * by the Free Software Foundation version 2.1 of the License.
     11  *
     12  * This program is distributed .as is. WITHOUT ANY WARRANTY of any kind,
     13  * whether express or implied; without even the implied warranty of
     14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
     15  * Lesser General Public License for more details.
     16  */
     17 
     18 
     19 /*
     20  *  ======== _dbdebug.h ========
     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