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

📄 mw_c67xx_bsl.h

📁 These files are made on MATLAB in which we have got embedded target for C in DSP.
💻 H
字号:

#include "simstruc.h" 



#define CODEC_VOICE_MUTE    0x30
#define CODEC_ADC_GAIN      25

#define CODEC_MIC_GAIN_ON   0x40
#define CODEC_MIC_GAIN_OFF  0x00

#define CODEC_SPK_ON        0x02	
#define CODEC_SPK_MUTE      0x00
#define CODEC_DAC_ATTN      100

#define LED_REG *(volatile unsigned int *)(0x90080000)  /* I/O port Address,top byte valid data */

           
/*****************************************************************************/
/* CPLD header                                                               */
/* see TMS320C6201/6701 Evaluation Module Technical Reference (SPRU305)      */
/* for technical details                                                     */

#define CPLD_ADDR      0x01780000       /* map 1 */
#define CPLD_CNTL      *(volatile unsigned int *)(CPLD_ADDR)
#define CPLD_STAT      *(volatile unsigned int *)(CPLD_ADDR + 0x04)
#define CPLD_DIPOPT    *(volatile unsigned int *)(CPLD_ADDR + 0x08)
#define CPLD_DIPBOOT   *(volatile unsigned int *)(CPLD_ADDR + 0x0C)
#define CPLD_DSPOPT    *(volatile unsigned int *)(CPLD_ADDR + 0x10)
#define CPLD_DSPBOOT   *(volatile unsigned int *)(CPLD_ADDR + 0x14)
#define CPLD_FIFOSTAT  *(volatile unsigned int *)(CPLD_ADDR + 0x18)
#define CPLD_SDCNTL    *(volatile unsigned int *)(CPLD_ADDR + 0x1C)
#define CPLD_OSCB      *(volatile unsigned int *)(CPLD_ADDR + 0x20)
#define CPLD_RSEM1     *(volatile unsigned int *)(CPLD_ADDR + 0x24)
#define CPLD_RSEM2     *(volatile unsigned int *)(CPLD_ADDR + 0x28)

/* CNTL register */
#define LED0             0
#define LED1             1
#define SP0SEL           2
#define NMISEL           3
#define NMIEN            4
#define XRESET           5
#define XCNTL0           6
#define XCNTL1           7

/* STAT register */
#define PCIDET           0
#define PCIINT           1
#define CODECIRQ         2          /* EVM only */
#define CODECPD          3          /* EVM only */
#define DSPNMI           4
#define DBINT            5
#define XSTAT0           6
#define XSTAT1           7

/* DIPOPT register */
#define S_USER0          0
#define S_USER1          1
#define S_USER2          2
#define S_USER_SZ        3
#define S_JTAGSEL        3
#define S_ENDIAN         4
#define S_CLKSEL         5
#define S_CLKMODE        6

/* DIPBOOT register */
#define S_BMODE0         0
#define S_BMODE1         1
#define S_BMODE2         2
#define S_BMODE3         3
#define S_BMODE4         4

/* DSPOPT register */
#define USER0            0
#define USER1            1
#define USER2            2
#define JTAGSEL          3
#define LENDIAN          4
#define CLKSEL           5
#define CLKMODE          6

/* DSPBOOT register */
#define BMODE0           0
#define BMODE1           1
#define BMODE2           2
#define BMODE3           3
#define BMODE4           4
#define SWSEL            7

/* FIFOSTAT register */
#define PCIMWEN          0
#define PCIMREN          1
#define WRFULL           2
#define RDEMPTY          3
#define PCIMWINT         4
#define PCIMRINT         5

/* SDCNTL register */
#define CE2SDEN          0
#define CE3SDEN          1

        void config_codec(void);
        void wait_for_codec_ready(int debounce);
		    
#define CODEC_VOICE_MUTE    0x30
#define CODEC_ADC_GAIN      25

#define CODEC_MIC_GAIN_ON   0x40
#define CODEC_MIC_GAIN_OFF  0x00

#define CODEC_SPK_ON        0x02	
#define CODEC_SPK_MUTE      0x00
#define CODEC_DAC_ATTN      100

#define LED_REG *(volatile unsigned int *)(0x90080000)  /* I/O port Address,top byte valid data */


        void config_codec_input(void);
        void config_codec_output(void);

⌨️ 快捷键说明

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