📄 audio.h
字号:
/*************************************************************************
Audio.h
This include file declares routines to control the audio on the CobraNet
Eval board and defines constants associated with the control of audio.
--Copyright (C) 2001-2004 by Cirrus Logic Inc. All Rights Reserved
*************************************************************************/
#ifndef Audio_h
#define Audio_h
#define cDAC_REG_ptr 0x8008 //DAC audio routing address
#define cDAC_MUTE_ptr 0x8009 //DAC Mute address
#define cDAC_MODE_ptr 0x800A //DAC Mode address
#define cDAC_RESET_ptr 0x800B //DAC reset address
#define cADC_SLAVE_ptr 0x8011 //ADC slave/master address
#define cAES_REG_ptr 0x8018 //AES audio routing address
#define cAES_MUTE_ptr 0x8019 //AES mute address
#define cSSI_REG0_ptr 0x8020 //SSI 0 audio routing address
#define cSSI_MUTE0_ptr 0x8021 //SSI 0 mute address
#define cSSI_REG1_ptr 0x8028 //SSI 1 audio routing address
#define cSSI_MUTE1_ptr 0x8029 //SSI 1 mute address
#define cSSI_REG2_ptr 0x8030 //SSI 2 audio routing address
#define cSSI_MUTE2_ptr 0x8031 //SSI 2 mute address
#define cSSI_REG3_ptr 0x8038 //SSI 3 audio routing address
#define cSSI_MUTE3_ptr 0x8039 //SSI 3 mute address
#define cGAIN_ptr 0x8070 //sinewave gain address
#define cFREQ_ptr 0x8078 //sinewave frequency address
#define cAD_CAL_ADDR_ptr 0x8010 //A/D calibration address
#define cADCAL_OFF 0
#define cADCAL_ON 1
#define cADCAL_CHECK 2
#define cAUDIO_SSI0 0
#define cAUDIO_SSI1 1
#define cAUDIO_SSI2 2
#define cAUDIO_SSI3 3
#define cAUDIO_ADC1 4
#define cAUDIO_DAC 4
#define cAUDIO_ADC2 6
#define cAUDIO_AES 5
#define cAUDIO_SINE 7
#define cAUDIO_MUTE 8
#define cMUTE_ON 0
#define cMUTE_OFF 1
#define cDAC_RESET_ON 0
#define cDAC_RESET_OFF 1
#define cDAC_SINGLE_DEEM 0
#define cDAC_SINGLE_SPEED 1
#define cDAC_DOUBLE_SPEED 3
#define cDAC_QUAD_SPEED 2
#define cMASTER 0
#define cSLAVE 1
//sinewave gain parameters
#define cGAIN_0DB 0
#define cGAIN_MINUS6 1
#define cGAIN_MINUS12 2
#define cGAIN_MINUS18 3
//audio line command selections
#define cAUDIO_SAMPLERATE 0
#define cAUDIO_CALIBRATE 1
#define cAUDIO_GAIN 2
#define cAUDIO_FREQUENCY 3
//audio samplerate line command choices
#define cAUDIO_48K 0
#define cAUDIO_96K 1
#define cAUDIO_48KD 2
#define cAUDIO_192K 3
#define cFREQ_FUNDAMENTAL 1
extern code struct command_item_t route_command;
extern code struct command_item_t audio_command;
extern void audio_put_route( unsigned char source, char * target );
extern char audio_get_route( char * target );
extern void audio_mute( char * target );
extern void audio_unmute( char * target );
extern void audio_DACMode( unsigned char the_mode );
extern void audio_DACreset( unsigned char unresetit );
extern void audio_ADCCaste( unsigned char the_caste );
extern char ad_cal( unsigned char the_op );
extern void sine_gain( unsigned char the_gain );
extern void sine_freq( unsigned char the_frequency );
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -