📄 init_framebufptr.asm
字号:
/*****************************************************************************
** **
** Project Name: LCD **
** **
******************************************************************************
(C) Copyright 2005 - Analog Devices, Inc. All rights reserved.
File Name: Init_FrameBufPtr.asm
Date Modified: 5/1/05 CL Rev 1.0
Software: VisualDSP++3.5
Hardware: ADSP-BF561 EZ-KIT Lite
Special Connections: None
Purpose: This file sets up the DMA starting addresses for the receive
frames.
******************************************************************************/
#include <defBF561.h>
#define DMA1_TCPER 0xFFC01B0C // Traffic control periods
.global _InitFrameBufPtr;
.section program;
_InitFrameBufPtr:
[--sp] = rets;
[--sp] = r7;
[--sp] = r6;
[--sp] = r5;
[--sp] = r4;
[--sp] = r3;
[--sp] = astat;
[--sp] = I0;
[--sp] = L0;
[--sp] = B0;
[--sp] = M0;
//Initialize buffer with frame addresses.
//R0 holds first parameter passed into function -- frame_buffer_addr.
//R1 holds second parameter passed into function -- sizeof(int)
//R2 holds third parameter passed into function -- NUM_BUFFERS
I0 = R0;
M0 = R1;
R2 *= R1;
L0 = R2;
B0 = I0;
P0.L = lo(DMA1_TCPER);
P0.H = hi(DMA1_TCPER);
//Write the addresses of each of your defined frame buffers into
//the frame_buffer_addr buffer.
//These addresses should be the same as you defined in the
//RESOLVE() statements in your ldf file.
R6.L = 0x0000;
R6.H = 0x0120; //Start of sFrame0
R7.L = 0x0000;
R7.H = 0x012e; //Start of sFrame1
R3.L = 0x0770;
[I0++] = R6;
[I0++] = R7;
W[P0] = R3.L;
M0 = [sp++];
B0 = [sp++];
L0 = [sp++];
I0 = [sp++];
astat = [sp++];
r3 = [sp++];
r4 = [sp++];
r5 = [sp++];
r6 = [sp++];
r7 = [sp++];
rets = [sp++];
SSYNC;
_InitFrameBufPtr.END: RTS;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -