swsram.h
来自「source code of armboot for s3c4510」· C头文件 代码 · 共 95 行
H
95 行
/*
* Copyright (c) 1996, 2003 VIA Networking Technologies, Inc.
* All rights reserved.
*
* This software is copyrighted by and is the sole property of
* VIA Networking Technologies, Inc. This software may only be used
* in accordance with the corresponding license agreement. Any unauthorized
* use, duplication, transmission, distribution, or disclosure of this
* software is expressly forbidden.
*
* This software is provided by VIA Networking Technologies, Inc. "as is"
* and any express or implied warranties, including, but not limited to, the
* implied warranties of merchantability and fitness for a particular purpose
* are disclaimed. In no event shall VIA Networking Technologies, Inc.
* be liable for any direct, indirect, incidental, special, exemplary, or
* consequential damages.
*
*
* File: swsram.h
*
* Purpose: ASIC embedded SRAM hardware accessing functions
*
* Author: Tevin Chen
*
* Date: Nov 18, 2005
*
*/
#ifndef __SWSRAM_H__
#define __SWSRAM_H__
#if !defined(__TTYPE_H__)
#include "ttype.h"
#endif
/*--------------------- Export Definitions ------------------------*/
/*--------------------- Export Types ------------------------------*/
/*--------------------- Export Macros -----------------------------*/
#define SWSRAM_vExtractBitsByByte(abyData, byStartBit, byEndBit, abyResult) SWSRAM_vExtractBitsLtl(abyData, byStartBit, byEndBit, abyResult)
#define SWSRAM_vModifyBitsByByte(abyDataBuf, byStartBit, byEndBit, abyModiPtn) SWSRAM_vModifyBitsLtl(abyDataBuf, byStartBit, byEndBit, abyModiPtn)
/*--------------------- Export Classes ----------------------------*/
/*--------------------- Export Variables --------------------------*/
/*--------------------- Export Functions --------------------------*/
//BOOL SWSRAM_bReadEntry(UINT32 u32Addr, PUINT8 au8Data) ;
BOOL SWSRAM_bWriteEntry(UINT32 u32Addr, PUINT8 au8Data) ;
#if 0
void SWSRAM_vReadBlock(UINT32 u32Addr, UINT8 u8BlockNumPerSlot, UINT8 u8BlockId, PUINT8 au8BlockBuf) ;
#ifndef __FLASH_NO_SPACE
void SWSRAM_vWriteBlock(UINT32 u32Addr, UINT8 u8BlockNumPerSlot, UINT8 u8BlockId, PUINT8 au8ValueBuf) ;
void SWSRAM_vSetBlockEmpty(UINT32 u32Addr, UINT8 u8BlockNumPerSlot, UINT8 u8BlockId) ;
BOOL SWSRAM_bIsBlockEmpty(UINT32 u32Addr, UINT8 u8BlockNumPerSlot, UINT8 u8BlockId) ;
void SWSRAM_vSetMemEntryEmpty(UINT32 u32Addr) ;
BOOL SWSRAM_bIsMemEntryEmpty(UINT32 u32Addr) ;
#endif //__FLASH_NO_SPACE
//
// Function for extract/modify bits in a byte-array
//
// Note that "au8Data"/"au8DataBuf" MUST be LITTLE-endian,
// while "au8Result"/"au8ModiPtn"/"pbResult"/"pbModiPtn" will be AUTO CONVERT to be big/little endian.
//
void SWSRAM_vExtractBits(PUINT8 au8Data, UINT8 u8StartBit, UINT8 u8EndBit, PUINT8 au8Result) ;
void SWSRAM_vModifyBits(PUINT8 au8DataBuf, UINT8 u8StartBit, UINT8 u8EndBit, PUINT8 au8ModiPtn) ;
void SWSRAM_vExtractBitsByBool(PUINT8 au8Data, UINT8 u8StartBit, UINT8 u8EndBit, PBOOL pbResult) ;
void SWSRAM_vModifyBitsByBool(PUINT8 au8DataBuf, UINT8 u8StartBit, UINT8 u8EndBit, PBOOL pbModiPtn) ;
//
// Function for extract/modify bits in a byte-array, all in LITTLE-endian
//
void SWSRAM_vExtractBitsLtl(PUINT8 au8Data, UINT8 u8StartBit, UINT8 u8EndBit, PUINT8 au8Result) ;
void SWSRAM_vModifyBitsLtl(PUINT8 au8DataBuf, UINT8 u8StartBit, UINT8 u8EndBit, PUINT8 au8ModiPtn) ;
#endif
// Function for endian convertion
void SWSRAM_vEndianConvert(PUINT8 pu8DataBuf, UINT8 u8BufSize) ;
#endif /* __SWSRAM_H__ */
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?