?? init_ram.c
字號:
/**************************************************************************************
*
* (c) 2004 ASIC,all rights reserved
*
*
* This source code and any compilation or derivative thereof
* is proprietary information and is confidential in nature.
* Under no circumstance is this software to be exposed or placed
* under an open source License of any type without expressed
* written permission of ASIC.
*
* filename: init_ram.c
* derciption:
* this file contains the function init_ram_size to initilization the size of
* ramdisk.
* history:
*
* Version Date Author Comments
*------------------------------------------------------------------------------------
* 1.1 2004.5.20 xl Initial Creation
*
**************************************************************************************/
#include "HA_TypeDef.h"
#include "debug.h"
#include "gfd_lib.a"
extern UINT32 NUM_RAMDISK_BLOCK;
extern void ENT_INT_GPT( void );
/************************************************************************
*
* FUNCTION
*
* init_ram_size
*
* DESCRIPTION
*
* 實現ramdisk大小設置
*
* INPUTS
* UINT16 num ramdisk頁數目,ramdisk的容量大小為num*4k byte
*
* OUTPUTS
*
* none
*
************************************************************************/
void init_ram_size(UINT16 num)
{
if((num>2048)||(num<0))
{
printf("please input the correct ramdisk page number!\n");
printf("MUST BE Less Than 2048!\n");
}
else
{
num = num -num%8;
NUM_RAMDISK_BLOCK = (UINT32)num*RAMDISK_PAGE_SIZE;
}
return;
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -