📄 drv_xbus.c
字号:
/************************************************************************/
/* */
/* Copyright (C) 2006 Oki Electric Industry Co., LTD. */
/* */
/* System Name : uPLAT7D series */
/* Module Name : uPLAT7D xbus drivers program */
/* File Name : drv_xbus.c */
/* Date : 2005/12/27 initial version */
/* */
/************************************************************************/
#include "common.h"
#if defined(__arm)
#include "ml675050.h"
#else
#include "ml675050sim.h"
#endif
#include "drv_common.h"
#include "hal_api.h"
#include "drv_xbus.h"
#include "intrinsics.h"
/************************************************************************/
/* */
/* Function Name : smpDrv_OpenXbus */
/* Input : init_xbus Initialized data. */
/* Output : DRV_OK(1) */
/* : DRV_PARAM_ERROR(-2) */
/* */
/* Note : Open the xbus of the xbus hal. */
/* */
/************************************************************************/
int16_t smpDrv_OpenXbus(uPLAT_XbusParam *init_xbus) {
int16_t rtnVal = DRV_OK;
/* Check for SRAM bus width. */
if (init_xbus->srambw != BWC_SRAMBW_16) {
return DRV_PARAM_ERROR;
}
/* Check for SDRAM bus width. */
if (init_xbus->sdrambw != DBWC_DBDRAM16) {
return DRV_PARAM_ERROR;
}
/* Check for standby mode. */
if ((init_xbus->standby != FALSE) && (init_xbus->standby != TRUE)) {
return DRV_PARAM_ERROR;
}
/* Initailize xbus HAL. */
rtnVal = uplat7dHAL_XbusInitMem(init_xbus);
return rtnVal;
}
/************************************************************************/
/* */
/* Function Name : smpDrv_CloseTimer */
/* Input : void */
/* Output : DRV_OK(1) */
/* */
/* Note : Close the driver of xbus. */
/* */
/************************************************************************/
int16_t smpDrv_CloseXbus(void)
{
int16_t rtnVal = DRV_OK;
return rtnVal;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -