📄 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 + -