📄 main.asm
字号:
/*****************************************************************************
** **
** Name: BF537 ASM Talkthrough I2S **
** **
******************************************************************************
Analog Devices, Inc. All rights reserved.
File Name: Main.asm
Date Modified: 12/14/04 Rev 1.0
Hardware: ADSP-BF537 EZ-KIT Board
Purpose: This program sets up the ADSP-BF537 to reset the ADC and DAC.
The data to/from the DAC/ADC are transfered over SPORT0 in I2S mode.
Program Parameters:
******************************************************************************/
#include "Talkthrough.h"
/*****************************************************************************
Variables
Description: The variables ChannelxLeftIn and ChannelxRightIn contain
the data coming from the codec ADC (AD1871). The (processed)
playback data are written into the variables
ChannelxLeftOut and ChannelxRightOut respectively, which
are then sent back to the DAC (AD1854) in the SPORT0 ISR.
******************************************************************************/
.section L1_data_a;
// left input data from AD1871
.var Channel0LeftIn, Channel1LeftIn;
// right input data from AD1871
.var Channel0RightIn, Channel1RightIn;
// left ouput data for AD1854
.var Channel0LeftOut, Channel1LeftOut;
// right ouput data for AD1854
.var Channel0RightOut, Channel1RightOut;
// SPORT0 DMA transmit buffer
.align 4;
.byte4 tx_buf[4];
// SPORT0 DMA receive buffer
.align 4;
.byte4 rx_buf[4];
/*****************************************************************************
Function: _main
Description: After calling a few initalization routines, main just
waits in a loop forever. The code to process the incoming
data can be placed in the function Process_Data in the
file "Process_Data.asm".
******************************************************************************/
.global _main;
.section L1_code;
_main:
call Init_Flags;
call Audio_Reset;
call Init_Sport0;
call Init_DMA;
call Init_Interrupts;
call Enable_DMA_Sport0;
WAIT_FOREVER:
jump WAIT_FOREVER;
_main.END:
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -