main.c

来自「analog device vdsp dynamic power control」· C语言 代码 · 共 43 行

C
43
字号
/********************************************************************************
 *												      							*
 *	(C) Copyright 2003 - Analog Devices, Inc.  All rights reserved.				*
 *												      							*
 *	Project Name:	BF561_Regulator								      				*
 *												      							*
 *	Date Modified:	11/24/03	JB	Ver 0.0		First draft of this example.	*
 *                                                                              *
 *	Software:	VisualDSP++ 3.5 	                                            *
 *                                                                              *
 *	Hardware:		                                                            *
 *                                                                              *
 *	Connections:	                                                            *
 *                                                                              *
 *	Purpose:		                                                            *
 *					                                                            *
 ********************************************************************************/

#include "..\BF561_Regulator.h"

main()
{
   volatile int delay=0x800000;
	
   *pSICA_SYSCR &= 0xFFDF; // clear bit 5 to unlock Core B

   Setup_Flags();			// setup EZKIT switches as interrupt-generating inputs
   Setup_Interrupts();		// assign and enable interrupts
   
   while(1)
   {
   		while (delay--);
			
		if (*pFIO2_FLAG_D & 0xF0)
			*pFIO2_FLAG_D &= 0xFF0F;	// if LED17-20 are lit, unlight
		else
			*pFIO2_FLAG_D |= 0x00F0;	// Otherwise, Light LED17-20
		
		delay = 0x800000;
   } // end while infinite
} // end main

⌨️ 快捷键说明

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