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

📄 init_framebufptr.asm

📁 Using the ADSP-BF561 Blackfin Processor as a TFT-LCD Controller
💻 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 
			transmit frames.
				
******************************************************************************/



#include <defBF561.h>

.global _InitFrameBufPtr;

.section program;

_InitFrameBufPtr:

	[--sp] = rets;
	[--sp] = r7;
	[--sp] = r6;
	[--sp] = r5;
	[--sp] = r4;
	[--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;
	B0 = I0;
	M0 = R1;
	R2 *= R1;
	L0 = R2;
	
	//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.
	
	
	R7.L = 0xb500;	//0xc400 - 8lines*240pixels*2bytes (start of result_b minus dummy start lines)
	R7.H = 0x0000;		
	R6.L = 0xb500;	//0x3c400 - 0xf00 (start of result_a minus dummy start lines)
	R6.H = 0x0003;
	
	[I0++] = R7;
	[I0++] = R6;
			
	M0 = [sp++];
	B0 = [sp++];
	L0 = [sp++];
	I0 = [sp++];	
	astat = [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 + -