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

📄 example_a.dsp

📁 提供了一些ADSP-217x或ADSP-218x DSP芯片的编程事例
💻 DSP
字号:
{*
*********************************************************************************************************
*                                                uC/OS-II
*                                          The Real-Time Kernel
*				   ADSP-21xx Specific Code version 1.0	
*
* File : EXAMPLE_A.DSP
* By   : Jaap de Jong (jdj@nedap.nl)
*	 Nedap Retail Support
*	 Parallelweg 2d
*	 Postbox 102
*	 7140 AC Groenlo
*	 Netherlands
* Based on 'ADSP-21065L SHARC Specific Code version 1.0' by Bertrand Hurst, Francois Veuve, Cedric Bornand
*********************************************************************************************************
*}
.module _example_a_;		{ extra assembly stuff... }


{  Functions defined hereunder  }
.global timer_irqon_;		{ enable timerinterrupts }
.global toggle1_;		{ toggle 1 }
.global toggle2_;		{ toggle 2 }


{*
*********************************************************************************************************
*                                           ENABLE TIMER INTERRUPTS
*
* Description : This function is used to turn on timerinterrupts
* Arguments   : none
* Note(s)     :	none
*********************************************************************************************************
*}
timer_irqon_:
	ay0 = imask; 
	ar = 1;
	ar = ar or ay0; 
	imask = ar;
	rts;


{*
*********************************************************************************************************
*                                           TOGGLE 1 & 2
*
* Description : These two functions are used to toggle two outputs
* Arguments   : none
* Note(s)     :	Use the outputs you like...
*********************************************************************************************************
*}
toggle1_:
	ay0 = 4;
	jump toggleX;
	
toggle2_:
	ay0 = 8;

toggleX:
	ar = 0x0c; 		{ direction pfdata }
	dm(0x3fe6) = ar;

	ax0 = imask;		{ store interrupts }
	imask = 0;		{ disable interrupts }
	ar = dm(0x3fe5); 	{ toggle.. }
	ar = ar xor ay0; 
	dm(0x3fe5) = ar; 
	imask = ax0;		{ restore interrupts }
	
	rts;


.endmod;
{********************************** End of file *********************************************************}

⌨️ 快捷键说明

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