📄 ml2011usersfunc.c
字号:
/******************************************************************************
*
* Oki Sound Library for ML2011
* ML2011 Driver (ML2011usersfunc.c)
*
* Oki Electric Industry Co.,Ltd.
* Software Development Department
*
* 2006, 6, 30
* ----------------------------------------------
* System Dependent Function for ML2011.
******************************************************************************/
#include "ML2011usersfunc.h"
/******************************************************************************
* 1. EXTERNAL AMPLIFIER CONTROL (CUSTOMIZE!)
* ----------------------------------------
* -usrExtHpAmpOpen()
* -usrExtHpAmpClose()
******************************************************************************/
/******************************************************************************
* usrExtAmpOpen()
* ----------------------------------------
* REMARKS:
* Wake up external headphone amplifier.
******************************************************************************/
#define GPPOE 0xB7A00080
#define HPAMP_ENABLE 0x0008 //bit3
void usrExtHpAmpOpen(void)
{
*(volatile unsigned int *)(GPPOE) =
((*(volatile unsigned int *)(GPPOE)) | HPAMP_ENABLE);
}
/******************************************************************************
* usrExtHpAmpClose()
* ----------------------------------------
* REMARKS:
* make external amplifier sleep.
******************************************************************************/
void usrExtHpAmpClose(void)
{
*(volatile unsigned int *)(GPPOE) =
((*(volatile unsigned int *)(GPPOE)) & ~HPAMP_ENABLE);
}
/******************************************************************************
* 2. TIMER DELAY (CUSTOMIZE!)
* ----------------------------------------
* -usrTimerDelay()
******************************************************************************/
/******************************************************************************
* usrTimerDelay()
* ------------------------------------------------------------------------------
* REMARKS:
* delay task. Use operating system's funtion.
* INPUT:
* delay time (milli-second)
******************************************************************************/
void usrTimerDelay(int msec)
{
unsigned char i,j,k;
for(k=0;k<msec;k++){
for(i=0;i<127;i++){
for(j=0;j<127;){
j++;
}
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -