www.pudn.com > MP3+JPEG.rar > BuddyVar.h


//========================================================================= 
//  The information contained herein is the exclusive property of Sunplus  
//  Technology Co. And shall not be distributed, reproduced, or disclosed  
//  in whole in part without prior written permission. 
//  (C) Copyright 2003 Sunplus Technology Co. All rights reserved. 
//  The entire notice above must be reproduced on all authorized copies 
//========================================================================= 
 
//========================================================================= 
//  project  name:  	u'nSP Buddy System  
//  Project Description:u'nSP Buddy System on MiniOS 
//  Environment: 	SPL16256 with 47.9232MHz 
//					SUNPLUS u'nSPTM  IDE 1.8.1£¨or later£© 
//  Library Dependency: OS-Lib: SpOSA153.lib 
//                       
//  Author: 	wang quan   
//  Date:		2003.12.10 
//  E-mail:     unsp@sunnorth.com.cn 
//  Revision history: 
//  ------------------------------------------------------------------------ 
//  YYYY-MM-DD        Modified By               Description                   
//  ------------------------------------------------------------------------ 
//========================================================================== 
 
#ifndef	__BUDDYVAR_h__ 
#define	__BUDDYVAR_h__ 
//	write your header here 
 
/*************************************************/ 
 
#include 	"BuddyConfigue.h" 
#include 	"BuddyStruct.h" 
 
#ifdef	CREATBUDDYVAR 
/*************************************************/ 
const unsigned int	_BS_Num = BS_NUM;	 
const unsigned int	_BS_MinBlock = BS_MIN_BLOCK; 
const unsigned int	_BS_MaxBlock = BS_MAX_BLOCK; 
const unsigned int	_BS_StackSize = BS_STACK_SIZE; 
const unsigned int	_BS_ListBlock = BS_LIST_BLOCK; 
 
/*************************************************/ 
const unsigned int	_BS_ExtNum = BS_EXT_NUM;	 
const unsigned int	_BS_ExtMinBlock = BS_EXT_MIN_BLOCK; 
const unsigned int	_BS_ExtMaxBlock = BS_EXT_MAX_BLOCK; 
const unsigned int	_BS_ExtListBlock = BS_EXT_LIST_BLOCK; 
 
const unsigned int	_BS_ExtRAMSection = BS_EXT_RAM_SECTION; 
 
const ExtRAM_list 	_BS_RAMSection[BS_EXT_RAM_SECTION] = { {0x50000, 0x14ffff}, //};//, 
													 	   {0x150000, 0x24ffff},		//0 
															{0x250000, 0x34ffff},		//0 
													     	{0x350000, 0x3fffff} }; 
/*************************************************/ 
#if  BS_MIN_BLOCK == 2 
	const unsigned int	_BS_BlockExp = 2; 
#endif 
 
#if  BS_MIN_BLOCK == 4 
	const unsigned int	_BS_BlockExp = 3; 
#endif 
 
#if  BS_MIN_BLOCK == 8 
	const unsigned int	_BS_BlockExp = 4; 
#endif 
 
#if  BS_MIN_BLOCK == 16 
	const unsigned int	_BS_BlockExp = 5; 
#endif 
 
#if  BS_MIN_BLOCK == 32 
	const unsigned int	_BS_BlockExp = 6; 
#endif 
 
#if  BS_MIN_BLOCK == 64 
	const unsigned int	_BS_BlockExp = 7; 
#endif 
 
#if  BS_MIN_BLOCK == 128 
	const unsigned int	_BS_BlockExp = 8; 
#endif 
 
#if  BS_MIN_BLOCK == 256 
	const unsigned int	_BS_BlockExp = 9; 
#endif 
 
#if  BS_MIN_BLOCK == 512 
	const unsigned int	_BS_BlockExp = 10; 
#endif 
 
#if  BS_MIN_BLOCK == 1024 
	const unsigned int	_BS_BlockExp = 11; 
#endif 
 
#if  BS_MIN_BLOCK == 2048 
	const unsigned int	_BS_BlockExp = 12; 
#endif 
 
#if  BS_MIN_BLOCK == 4096 
	const unsigned int	_BS_BlockExp = 13; 
#endif 
 
/*************************************************/ 
#if  BS_EXT_MIN_BLOCK == 2 
	const unsigned int	_BS_ExtBlockExp = 2; 
#endif 
 
#if  BS_EXT_MIN_BLOCK == 4 
	const unsigned int	_BS_ExtBlockExp = 3; 
#endif 
 
#if  BS_EXT_MIN_BLOCK == 8 
	const unsigned int	_BS_ExtBlockExp = 4; 
#endif 
 
#if  BS_EXT_MIN_BLOCK == 16 
	const unsigned int	_BS_ExtBlockExp = 5; 
#endif 
 
#if  BS_EXT_MIN_BLOCK == 32 
	const unsigned int	_BS_ExtBlockExp = 6; 
#endif 
 
#if  BS_EXT_MIN_BLOCK == 64 
	const unsigned int	_BS_ExtBlockExp = 7; 
#endif 
 
#if  BS_EXT_MIN_BLOCK == 128 
	const unsigned int	_BS_ExtBlockExp = 8; 
#endif 
 
#if  BS_EXT_MIN_BLOCK == 256 
	const unsigned int	_BS_ExtBlockExp = 9; 
#endif 
 
#if  BS_EXT_MIN_BLOCK == 512 
	const unsigned int	_BS_ExtBlockExp = 10; 
#endif 
 
#if  BS_EXT_MIN_BLOCK == 1024 
	const unsigned int	_BS_ExtBlockExp = 11; 
#endif 
 
#if  BS_EXT_MIN_BLOCK == 2048 
	const unsigned int	_BS_ExtBlockExp = 12; 
#endif 
 
#if  BS_EXT_MIN_BLOCK == 4096 
	const unsigned int	_BS_ExtBlockExp = 13; 
#endif 
 
/*************************************************/	 
free_list_head 		_BS_HeadList[BS_NUM + 1]; 
Extfree_list_head 	_BS_ExtHeadList[BS_EXT_NUM + 1]; 
 
int 	_BS_RAMMask; 
int 	_BS_TotalSize; 
 
unsigned long 	_BS_ExtRAMMask; 
unsigned int 	_BS_ExtTotalSize; 
 
//#ifdef	Buddy_Debug 
//int 	Stat_Num; 
//#endif		 
/*************************************************/ 
#endif		// end #ifdef	CREATBUDDYVAR 
 
/*************************************************/ 
 
#endif