testmain.c

来自「dsp在音频处理中的运用」· C语言 代码 · 共 53 行

C
53
字号
/*#include <csl.h>
#include <cslr.h>
//#include <soc.h>

#include <csl_clkrst.h>
#include <cslr.h>
#include <csl_types.h>
#include <tistdtypes.h>*
#include <csl_ledpg.h>*/
//#include <soc.h>//#include <csl_clkrst.h>

//#include <csl_i2c.h>
//#include <stdio.h>
//void osk5912_init();
//#define  OSK5912_POWER_I2C_ADDR  0x48
//CSL_I2cHandle   hI2c;
//void    I2C_init();
//Uint16  OSK5912_I2C_write(Uint16 slave_addr,Uint8* data,Uint16 length);
//Uint16  OSK5912_I2C_read(Uint16 slave_addr,Uint8* data,Uint16 length);
//Int16   OSK5912_LED(Uint8 regnum,Uint8 regval);
//void    OSK5912_LED_toggle();
#include <tistdtypes.h>
#include <aic23.h>
extern void    osk5912_init(); 
extern void    I2C_test();
extern void    OSK5912_AIC23_openCodec( Uint32 id, OSK5912_AIC23_Config *Config );
OSK5912_AIC23_Config aic23config = {
    0x0017,  /* 0 OSK5912_AIC23_LEFTINVOL  Left line input channel volume   */ \
    0x0017,  /* 1 OSK5912_AIC23_RIGHTINVOL Right line input channel volume  */ \
    0x00d8,  /* 2 OSK5912_AIC23_LEFTHPVOL  Left channel headphone volume    */ \
    0x00d8,  /* 3 OSK5912_AIC23_RIGHTHPVOL Right channel headphone volume   */ \
    0x0011,  /* 4 OSK5912_AIC23_ANAPATH    Analog audio path control        */ \
    0x0000,  /* 5 OSK5912_AIC23_DIGPATH    Digital audio path control       */ \
    0x0000,  /* 6 OSK5912_AIC23_POWERDOWN  Power down control               */ \
    0x0043,  /* 7 OSK5912_AIC23_DIGIF      Digital audio interface format   */ \
    0x0081,  /* 8 OSK5912_AIC23_SAMPLERATE Sample rate control              */ \
    0x0001   /* 9 OSK5912_AIC23_DIGACT     Digital interface activation     */ \
};
void main()
{
    
    /* Initialize the board, must be first BSL call */
    osk5912_init();
    //I2C_test(); 
	OSK5912_AIC23_openCodec(0,&aic23config);
	return;
}




⌨️ 快捷键说明

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