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

📄 configdai.asm

📁 ADI公司SHARC与BlackFin通过SPI协议相互通信的源代码
💻 ASM
字号:
#include <sru.h>
#include <def21369.h>

// This function will setup the SRU Registers
.section /pm seg_pmco ; 
.global InitSRU ;
.global InitSRU1 ;
InitSRU :

	// Enable pull-up resistors on unused DAI pins
	r0 = 0xfffff;
	dm(DAI_PIN_PULLUP) = r0;

	// Enable pull-up resistors on unused DPI pins
	r0 = 0xf9f;
	dm(DPI_PIN_PULLUP) = r0;

	//Generating Code for connecting : DPI_PIN6 to SPI_CLK
	SRU (LOW, DPI_PBEN06_I); 
	SRU (DPI_PB06_O, SPI_CLK_I); 

	//Generating Code for connecting : DPI_PIN7 to SPI_MOSI
	SRU (LOW, DPI_PBEN07_I); 
	SRU (DPI_PB07_O, SPI_MOSI_I); 

	//Generating Code for connecting : DPI_PIN14 to SPI_DS
	SRU (LOW, DPI_PBEN14_I); 
	SRU (DPI_PB14_O, SPI_DS_I); 

	//Generating Code for connecting : SPI_MISO to DPI_PIN13
	SRU (HIGH, DPI_PBEN13_I); 
	SRU (SPI_MISO_O, DPI_PB13_I); 

	// Return back from the subroutine
InitSRU.end:	rts;


InitSRU1 :

	// Enable pull-up resistors on unused DAI pins
	r0 = 0xf3fff;
	dm(DAI_PIN_PULLUP) = r0;

	//Generating Code for connecting : LOW to DAI_PIN15
	SRU (HIGH, PBEN15_I); 
	SRU (LOW, DAI_PB15_I); 

	//Generating Code for connecting : LOW to DAI_PIN16
	SRU (HIGH, PBEN16_I); 
	SRU (LOW, DAI_PB16_I); 
	
	// Return back from the subroutine
	rts;
	
InitSRU1.end:

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -