⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ddx8001.h.txt

📁 ddx8001控制代码!用于ddx8001的程序编写!
💻 TXT
字号:
//=============================================================================
// File Name: ddx8001.h
//
// Copyright 2003 Cirrus Logic Corporation
//
// Description:
//	Definitions for the ddx8001 pwm (Apogee) chip
//
// Modification History:
//
// $Id: ddx8001.h,v 1.2 2005/04/29 10:22:00 michaell Exp $
// $Log: ddx8001.h,v $
// Revision 1.2  2005/04/29 10:22:00  michaell
// merge 2.6 into head
//
// Revision 1.1.1.1  2005/03/07 08:07:07  dchien
// Import Sonata2_2-6-3
//
// Revision 1.2  2004/08/25 22:33:45  jchou
// bug 24732: concerto merge
//
// Revision 1.1.6.1  2004/07/21 16:22:38  jminor
// Concerto merge to CONCERTO_20040720.  Driver directories.
//
// Revision 1.1.4.1  2004/05/18 22:10:44  jminor
// Bug 19031, merge of DRIVER directories.
//
// Revision 1.1.2.1  2004/03/26 02:34:08  pdsouza
// Initial check in of PWM driver
//
// Revision 1.2.10.1  2003/12/09 23:20:50  pdsouza
// Merged PWM driver and seven dot 1 features

//============================================================================
#ifndef ddx8001_H
#define ddx8001_H

#include "apitypes.h"
#include "chips.h"
#if (USE_PWM)
#define PWM_I2C_ADDR    0x40
#endif // #if (USE_PWM)

//----------------------------------------
//  DDX 8000 i2c register definitions
//--------------
//

#define DDX8001_REG_CONFA       0x00
#define DDX8001_REG_CONFB       0x01
#define DDX8001_REG_CONFC       0x02
#define DDX8001_REG_CONFD       0x03
#define DDX8001_REG_CONFE       0x04
#define DDX8001_REG_CONFF       0x05
#define DDX8001_REG_CONFG       0x06
#define DDX8001_REG_CONFH       0x07
#define DDX8001_REG_CONFI       0x08
#define DDX8001_REG_MMUTE       0x09
#define DDX8001_REG_MVOL        0x0a
#define DDX8001_REG_C1VOL       0x0b
#define DDX8001_REG_C2VOL       0x0c
#define DDX8001_REG_C3VOL       0x0d
#define DDX8001_REG_C4VOL       0x0e
#define DDX8001_REG_C5VOL       0x0f
#define DDX8001_REG_C6VOL       0x10
#define DDX8001_REG_C7VOL       0x11
#define DDX8001_REG_C8VOL       0x12
#define DDX8001_REG_C1VTMB      0x13
#define DDX8001_REG_C2VTMB      0x14
#define DDX8001_REG_C3VTMB      0x15
#define DDX8001_REG_C4VTMB      0x16
#define DDX8001_REG_C5VTMB      0x17
#define DDX8001_REG_C6VTMB      0x18
#define DDX8001_REG_C7VTMB      0x19
#define DDX8001_REG_C8VTMB      0x1a
#define DDX8001_REG_C12IM       0x1b
#define DDX8001_REG_C34IM       0x1c
#define DDX8001_REG_C56IM       0x1d
#define DDX8001_REG_C78IM       0x1e
#define DDX8001_REG_AUTO1       0x1f
#define DDX8001_REG_AUTO2       0x20
#define DDX8001_REG_AUTO3       0x21
#define DDX8001_REG_PREEQ       0x22
#define DDX8001_REG_AGEQ        0x23
#define DDX8001_REG_BGEQ        0x24
#define DDX8001_REG_CGEQ        0x25
#define DDX8001_REG_DGEQ        0x26
#define DDX8001_REG_FGEQ        0x27
#define DDX8001_REG_BQIP        0x28
#define DDX8001_REG_MXIP        0x29
#define DDX8001_REG_EQBP        0x2a
#define DDX8001_REG_TONEBP      0x2b
#define DDX8001_REG_TONE        0x2c
#define DDX8001_REG_C1234LS     0x2d
#define DDX8001_REG_C5678LS     0x2e
#define DDX8001_REG_L1AR        0x2f
#define DDX8001_REG_L1ATRT      0x30
#define DDX8001_REG_L2AR        0x31
#define DDX8001_REG_L2ATRT      0x32
#define DDX8001_REG_C12OT       0x33
#define DDX8001_REG_C34OT       0x34
#define DDX8001_REG_C56OT       0x35
#define DDX8001_REG_C78OT       0x36
#define DDX8001_REG_C12OM       0x37
#define DDX8001_REG_C34OM       0x38
#define DDX8001_REG_C56OM       0x39
#define DDX8001_REG_C78OM       0x3a
#define DDX8001_REG_CFADDR1     0x3b
#define DDX8001_REG_CFADDR2     0x3c
#define DDX8001_REG_B1CF1       0x3d
#define DDX8001_REG_B1CF2       0x3e
#define DDX8001_REG_B1CF3       0x3f
#define DDX8001_REG_B2CF1       0x40
#define DDX8001_REG_B2CF2       0x41
#define DDX8001_REG_B2CF3       0x42
#define DDX8001_REG_A1CF1       0x43
#define DDX8001_REG_A1CF2       0x44
#define DDX8001_REG_A1CF3       0x45
#define DDX8001_REG_A2CF1       0x46
#define DDX8001_REG_A2CF2       0x47
#define DDX8001_REG_A2CF3       0x48
#define DDX8001_REG_B0CF1       0x49
#define DDX8001_REG_B0CF2       0x4a
#define DDX8001_REG_B0CF3       0x4b
#define DDX8001_REG_CFUD        0x4c
#define DDX8001_REG_MPCC1       0x4d
#define DDX8001_REG_MPCC2       0x4e
#define DDX8001_REG_RES1        0x4f
#define DDX8001_REG_RES2        0x50
#define DDX8001_REG_PSC1        0x51
#define DDX8001_REG_PSC2        0x52
#define DDX8001_REG_PSC3        0x53


//-----------------------------------------------------------------------------
//  Function:
int PWM_Init(
        //
        //    Description:
        //          Initializes the ddx8001 PWM board
        //           
        //    Parameters:          
        void   
        );
//    Returns:  SUCCESS or FAIL
//-----------------------------------------------------------------------------


//-----------------------------------------------------------------------------
//  Function:
int PWM_SetVolume(
        //
        //    Description:
        //          Sets the volume on all channels
        //           
        //    Parameters:          
        Uint8   volume 
        );
//    Returns:  SUCCESS or FAIL
//-----------------------------------------------------------------------------


//-----------------------------------------------------------------------------
//  Function:
int PWM_VolumeUp(
        //
        //    Description:
        //          Increases the Volume by one tick
        //           
        //    Parameters:          
        void   
        );
//    Returns:  SUCCESS or FAIL
//-----------------------------------------------------------------------------


//-----------------------------------------------------------------------------
//  Function:
int PWM_VolumeDown(
        //
        //    Description:
        //          Decreases the Volume by one tick
        //           
        //    Parameters:          
        void   
        );
//    Returns:  SUCCESS or FAIL
//-----------------------------------------------------------------------------


//-----------------------------------------------------------------------------
//  Function:
int PWM_Mute(
        //
        //    Description:
        //          mutes the volume
        //           
        //    Parameters:          
        void
        );
//    Returns:  SUCCESS or FAIL
//-----------------------------------------------------------------------------


//-----------------------------------------------------------------------------
//  Function:
int PWM_UnMute(
        //
        //    Description:
        //          unmutes the volume
        //           
        //    Parameters:          
        void
        );
//    Returns:  SUCCESS or FAIL
//-----------------------------------------------------------------------------


//tms--------------------------------------------------------------------------
//  Function:
int PWM_EnableLimiter(
        //
        //    Description:
        //          Enables limiting at the 0dB level (i.e. no clipping 
        //          permitted).  Channels 1-5 are on limiter 2, and channel
        //			6 is on limiter 1.
        //           
        //    Parameters:          
        void
        );
//    Returns:  SUCCESS or FAIL
//-----------------------------------------------------------------------------

//tms--------------------------------------------------------------------------
//  Function:
int PWM_DisableLimiter(
        //
        //    Description:
        //          Disables limiting
        //           
        //    Parameters:          
        void
        );
//    Returns:  SUCCESS or FAIL
//-----------------------------------------------------------------------------


//-----------------------------------------------------------------------------
//  Function:
int PWM_AmpOn(
        //
        //    Description:
        //          Turns the external High power amp on
        //           
        //    Parameters:          
        void 
        );
//    Returns:  SUCCESS or FAIL
//-----------------------------------------------------------------------------

//-----------------------------------------------------------------------------
//  Function:
int PWM_AmpOff(
        //
        //    Description:
        //          Turns the external High power amp off
        //           
        //    Parameters:          
        void 
        );
//    Returns:  SUCCESS or FAIL
//-----------------------------------------------------------------------------

//-----------------------------------------------------------------------------
//  Function:
int PWM_SetI2S(
        //
        //    Description:
        //    		Sets the DDX-8000 up to use 24 bit I2S data with a 64Fs
        //          bit clock 
        //    Parameters:          
        void 
        );
//    Returns:  SUCCESS or FAIL
//-----------------------------------------------------------------------------

//-----------------------------------------------------------------------------
//  Function:
int PWM_Set16Bit(
        //
        //    Description:
        //    		Sets the DDX-8000 up to use 16 bit, MSB first, right or
        //          left justified data with a 32Fs bit clock 
        //    Parameters:          
        void 
        );
//    Returns:  SUCCESS or FAIL
//-----------------------------------------------------------------------------
#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -