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

📄 macros4at303.dsp

📁 基于ADSP的G.729语音编解码程序
💻 DSP
字号:
/////////////////////////////////////////////////////////////////////////
//                                                                     //
// Wait for a specific cycle                                           //
//                                                                     //
/////////////////////////////////////////////////////////////////////////
#define wait(cycles)            \
		cntr = cycles - 2;      \
		do WAIT_LOOP? until ce; \
WAIT_LOOP?:		nop


/////////////////////////////////////////////////////////////////////////
//                                                                     //
// Wait for one seconds                                                //
//                                                                     //
/////////////////////////////////////////////////////////////////////////
#ifndef _SIMULATION
#define wait1s                   \
		cntr = 26666;            \
		do LABEL1? until ce;     \
			cntr = 60000;        \
			do LABEL2? until ce; \
LABEL2?:		nop;             \
LABEL1?:	nop
#else
#define wait1s                   \
		cntr = 10;               \
		do LABEL1? until ce;     \
LABEL1?:	nop                  
#endif


/////////////////////////////////////////////////////////////////////////
//                                                                     //
// IO register write                                                   //
//                                                                     //
/////////////////////////////////////////////////////////////////////////
#define RegWrite(dst, content, reg) \
		reg     = content;          \
		io(dst) = reg


/////////////////////////////////////////////////////////////////////////
//                                                                     //
// Show Text to 7-segment display                                      //
//                                                                     //
/////////////////////////////////////////////////////////////////////////
#define ShowText(content, reg)         \
		RegWrite(0x555, content, reg); \
		wait1s
		
		
/////////////////////////////////////////
//
//      AB_PLAY
//
////////////////////////////////////////
#define IO_REG_HILO(dst,vardef)\
        ar	= io(dst);	\
        sr=lshift ar by -8(hi);\
        ay1=sr0;\
        ar=sr1+ay1;\
        dm(vardef)=ar
        
#define REG_IO_HILO(dst,vardef)\
        ar	= dm(vardef);	\
        sr=lshift ar by -8(hi);\
        ay1=sr0;\
        ar=sr1+ay1;\
        io(dst)=ar        

⌨️ 快捷键说明

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