exercise_1.c

来自「VisualDSP++4.0」· C语言 代码 · 共 29 行

C
29
字号

#include <ccblkfn.h>
#include "exercise_1.h"

//--------------------------------------------------------------------------//
// Function:	main														//
//																			//
// Description:	After calling a few initalization routines, main() just 	//
//				waits in a loop forever.  The code to process the incoming  //
//				data can be placed in the function Process_Data() in the 	//
//				file "Process_Data.c".										//
//--------------------------------------------------------------------------//
void main(void)
{
	// initialize AD1836
	start_AD1836();
	
	// loop forever
	while(1) {
		idle();				// go asleep and wake up when external interrupt and ISR have been
							// processed
		if (cNewSample) {	// check whether new sample has been read by SPORT0 ISR
			cNewSample=0;	// reset flag
			process_data();	// do the sample processing
		}
	}
		
}

⌨️ 快捷键说明

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