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

📄 evmdm642_aic23_write.c

📁 DM642串口调试模块
💻 C
字号:
/*
 *  Copyright 2003 by Spectrum Digital Incorporated.
 *  All rights reserved. Property of Spectrum Digital Incorporated.
 */

/*
 *  ======== evmdm642_aic23_write.c ========
 *  EVMDM642_AIC23_write() implementation
 */
 
#include <evmdm642.h>
#include <evmdm642_aic23.h>


/*
 *  ======== EVMDM642_AIC23_write ========
 *  Write a 32-bit value to the codec
 */
Int16 EVMDM642_AIC23_write(EVMDM642_AIC23_CodecHandle hCodec, Uint32 val)
{
    /* If McBSP not ready for new data, return false */
    if ((MCASP_RGETH(EVMDM642_AIC23_hMcASP, SRCTL0) & 0x10) == 0) {
        return (FALSE);
    }

    /* Write data value */
    MCASP_RSETH(EVMDM642_AIC23_hMcASP, XBUF0, val);
    
    asm(" nop");
    asm(" nop");
    asm(" nop");
    asm(" nop");
    asm(" nop");
    asm(" nop");
    
    return(TRUE);  
}

⌨️ 快捷键说明

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