evm5509_aic23_outgain.c
来自「dsp 5509a MMC 卡 ID号读取 12Mhzx16=192M」· C语言 代码 · 共 27 行
C
27 行
/*
* Copyright 2004 by Spectrum Digital Incorporated.
* All rights reserved. Property of Spectrum Digital Incorporated.
*/
/*
* ======== evm5509_aic23_setfreq.c ========
* EVM5509_AIC23_setFreq() implementation
*/
#include <evm5509.h>
#include <evm5509_aic23.h>
/*
* ======== EVM5509_AIC23_outGain ========
* Set the output gain on the codec
*/
void EVM5509_AIC23_outGain(EVM5509_AIC23_CodecHandle hCodec, Uint16 outGain)
{
/* Write to codec registers (left and right) */
EVM5509_AIC23_rset(hCodec, EVM5509_AIC23_LEFTHPVOL,
(EVM5509_AIC23_rget(hCodec, EVM5509_AIC23_LEFTHPVOL) & 0xff80) | (outGain & 0x7f));
EVM5509_AIC23_rset(hCodec, EVM5509_AIC23_RIGHTHPVOL,
(EVM5509_AIC23_rget(hCodec, EVM5509_AIC23_RIGHTHPVOL) & 0xff80) | (outGain & 0x7f));
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?