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

📄 driv_bf533_ezlite_c.c

📁 ucos在blackfin533上的移植。用ADI的visual dsp++ 编译。如果编译不能通过
💻 C
字号:
/*
*********************************************************************************************************
*                                                uC/OS-II
*                                          The Real-Time Kernel
*
*										  Board specific functions for
*										CROSSCORE ADSP-BF533 EZ-KIT Lite
*										       evaluation board.
*
* File : Driv_BF533_EZLite_c.c
* By   : Ron Territo   ron@territocomputerservices.com
*********************************************************************************************************

Copyright...

This code is placed in the public domain, and can be distributed freely with no restrictions provided that the heading
of each source module file is not modified to remove the credit to the original author.
  
Disclaimer...

This program code is provided "as is". There is no warranty, either expressed or implied as to its fitness for use in
any application. It is provided only as an example of porting the MicroC/OS operating system to the Blackfin processor.
Its use is strictly at the risk of the user. The author will not be liable for any damages direct or consequential related
to the use of this software including, but not limited to loss of profit.

*/



#include <cdefBF533.h>
#include <cdefBF53x.h>
#include <BF533_EZLite.h>

/*
*****************************************************************************
*
*	Global variables
*
*****************************************************************************
*/


/*
*****************************************************************************
*
*               	LED control functions
*
*  	These functions are used to initialize the 6 LEDs on the eval board, and
*	to set or clear them individually
*
*
*
*****************************************************************************
*/

/*
*****************************************************************************
*
*	Initialize LED
*
* 	Arguments  : Initial on/off state of LEDs ( 00 - 0x3F )
*
*****************************************************************************
*/

void EZLite_Init_LED( char state)
{
	*pEBIU_AMBCTL0	= 0x7bb07bb0;	// set EBIU to access Flash I/O 
	*pEBIU_AMBCTL1	= 0x7bb07bb0;
	*pEBIU_AMGCTL	= 0x000f;
	*pFlashA_PortB_Dir = 0x3f;		// set LEDs as output
	*pFlashA_PortB_Data = state;	// turn them to initial state
}


/*
*****************************************************************************
*
*	Set LED  ( on )
*
* 	Arguments  : LED number 0 to 5  ( LED4 - LED9 on board )
*
*****************************************************************************
*/

void EZLite_Set_LED(char lite)
{
	*pFlashA_PortB_Data |= ( 1 <<lite );
}


/*
*****************************************************************************
*
*	Clear LED  ( off )
*
* 	Arguments  : LED number 0 to 5  ( LED4 - LED9 on board )
*
*****************************************************************************
*/

void EZLite_Clr_LED(char lite)
{
	*pFlashA_PortB_Data &= ~( 1 <<lite );
}


⌨️ 快捷键说明

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