drv_remap.c
来自「最新版IAR FOR ARM(EWARM)5.11中的代码例子」· C语言 代码 · 共 94 行
C
94 行
/**********************************************************************************/
/* */
/* Copyright (C) 2006 Oki Electric Industry Co., LTD. */
/* */
/* System Name : uPLAT7D series */
/* Module Name : uPLAT7D system Remap drives program */
/* File Name : drv_remap.c */
/* Revision : 01.00 */
/* Date : 2006/1/25 initial version */
/* */
/**********************************************************************************/
#include "common.h"
#include "drv_common.h"
#include "drv_remap.h"
#include "hal_interrupt.h"
#include "hal_api.h"
/*****************************************************************************/
/* */
/* Function Name : int16_t smpDrv_OpenRemap( uint8_t expand_area ) */
/* Input : Expand memory area */
/* : USB2.0 LCD */
/* : 0: Enable Enable */
/* : 1: Disable Enable */
/* : 2: Enable Disable */
/* : 3: Disable Disable */
/* Output : DRV_OK(1) */
/* : DRV_PARAM_ERROR(-2) */
/* */
/* Note : Initialize Remap. */
/* */
/*****************************************************************************/
int16_t smpDrv_OpenRemap( uint8_t expand_area )
{
int16_t rtnVal = DRV_OK;
if(expand_area != EXPAHBRAM_SELECT_NON){
rtnVal = DRV_PARAM_ERROR;
}
if(rtnVal == DRV_OK){
rtnVal = uplat7dHAL_RemapSetRam( expand_area );
}
return rtnVal;
}
/*****************************************************************************/
/* */
/* Function Name : int16_t smpDrv_CloseRemap( void ) */
/* Input : Notiong */
/* Output : DRV_OK(1) */
/* */
/* Note : Close Remap. */
/* */
/*****************************************************************************/
int16_t smpDrv_CloseRemap( void )
{
int16_t rtnVal = DRV_OK;
/* Nothing */
return rtnVal;
}
/*****************************************************************************/
/* */
/* Function Name : int16_t smpDrv_IoctlRemap( uint16_t cmd, uint32_t arg )*/
/* Input : Memory area */
/* : 0: Non Remap(External ROM remap) */
/* : 1: External SRAM Remap */
/* : 2: External DRAM Remap */
/* : 3: AHBRAM Remap */
/* Output : DRV_OK(1) */
/* : DRV_PARAM_ERROR(-2) */
/* */
/* Note : Setting of Rimap. */
/* */
/*****************************************************************************/
int16_t smpDrv_IoctlRemap( uint16_t cmd, uint32_t arg )
{
int16_t rtnVal = DRV_OK;
uint8_t mem_area;
mem_area = (uint8_t)arg;
if(mem_area != REMAP_EXTSRAM_REMAP){
rtnVal = DRV_PARAM_ERROR;
}
if(rtnVal == DRV_OK){
rtnVal = uplat7dHAL_RemapSetFunction( (uint8_t)arg );
}
return rtnVal;
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?