evmdm642_aic23_outgain.c
来自「dm642 最重要的片上库evmdm642bsl.lib的编译源码 在ccs环境」· C语言 代码 · 共 27 行
C
27 行
/*
* Copyright 2003 by Spectrum Digital Incorporated.
* All rights reserved. Property of Spectrum Digital Incorporated.
*/
/*
* ======== evmdm642_aic23_setfreq.c ========
* EVMDM642_AIC23_setFreq() implementation
*/
#include <evmdm642.h>
#include <evmdm642_aic23.h>
/*
* ======== EVMDM642_AIC23_outGain ========
* Set the output gain on the codec
*/
void EVMDM642_AIC23_outGain(EVMDM642_AIC23_CodecHandle hCodec, Uint16 outGain)
{
/* Write to codec registers (left and right) */
EVMDM642_AIC23_rset(hCodec, EVMDM642_AIC23_LEFTHPVOL,
(EVMDM642_AIC23_rget(hCodec, EVMDM642_AIC23_LEFTHPVOL) & 0xff80) | (outGain & 0x7f));
EVMDM642_AIC23_rset(hCodec, EVMDM642_AIC23_RIGHTHPVOL,
(EVMDM642_AIC23_rget(hCodec, EVMDM642_AIC23_RIGHTHPVOL) & 0xff80) | (outGain & 0x7f));
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?