📄 aud_drv.c
字号:
/*C**************************************************************************
* $RCSfile: aud_drv.c,v $
*----------------------------------------------------------------------------
* Copyright (c) 2002 Atmel.
*----------------------------------------------------------------------------
* RELEASE: $Name: DEMO_FAT_1_9_9 $
* REVISION: $Revision: 1.3 $
* FILE_CVSID: $Id: aud_drv.c,v 1.3 2002/05/24 09:51:12 njourdan Exp $
*----------------------------------------------------------------------------
* PURPOSE:
* This file contains the audio interface driver routines
*
* NOTES:
* Driver Configuration:
* - None
* Global Variables:
* - None
*****************************************************************************/
/*_____ I N C L U D E S ____________________________________________________*/
#include "config.h" /* system configuration */
#include "aud_drv.h" /* audio driver definition */
/*_____ M A C R O S ________________________________________________________*/
/*_____ D E F I N I T I O N ________________________________________________*/
/*_____ D E C L A R A T I O N ______________________________________________*/
/*F**************************************************************************
* NAME: aud_set_prio
*----------------------------------------------------------------------------
* PARAMS:
*
* return:
*----------------------------------------------------------------------------
* PURPOSE:
* Set the audio interface priority interrupt
*----------------------------------------------------------------------------
* EXAMPLE:
*----------------------------------------------------------------------------
* NOTE:
*----------------------------------------------------------------------------
* REQUIREMENTS:
* ram/xram:
* cycle:
* stack:
* code:
*****************************************************************************/
void aud_set_prio (Byte priority)
{
if ((priority == 1) || (priority == 3)) /* set LSB priority bit */
{
IPL0 |= MSK_EAUD;
}
if ((priority == 2) || (priority == 3)) /* set MSB priority bit */
{
IPH0 |= MSK_EAUD;
}
}
/*F**************************************************************************
* NAME: aud_stop
*----------------------------------------------------------------------------
* PARAMS:
*
* return:
*----------------------------------------------------------------------------
* PURPOSE:
* Disable the audio interface
*----------------------------------------------------------------------------
* EXAMPLE:
*----------------------------------------------------------------------------
* NOTE:
*----------------------------------------------------------------------------
* REQUIREMENTS:
* ram/xram:
* cycle:
* stack:
* code:
*****************************************************************************/
void aud_stop (void)
{
Aud_disable();
Aud_disable_int();
}
/*L**************************************************************************
* NAME: aud_int
*----------------------------------------------------------------------------
* PARAMS:
*
* return:
*----------------------------------------------------------------------------
* PURPOSE:
* Audio interrupt function
*----------------------------------------------------------------------------
* EXAMPLE:
*----------------------------------------------------------------------------
* NOTE:
* ## Defined in an other c file ##
* IRQ_AUD defined in extxxxx.h
*----------------------------------------------------------------------------
* REQUIREMENTS:
* ram/xram:
* cycle:
* stack:
* code:
*****************************************************************************/
//Interrupt(aud_int (void), IRQ_AUD)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -