📄 db_dram.h
字号:
#ifndef __DVB_DRAM_H
#define __DVB_DRAM_H
/*! \file
* This module provides the DRAM access API.
*/
#include "dvb_type.h"
void DVB_DramPhaseAdjustment(u8 u8Data);
/*! \fn void DVB_DramPhaseAdjustment(u8 u8Data)
\brief Adjustment dram phase, must before DVB_SystemInit_First();
\param u8Data (Input) 0x00~0x0f, [1:0] output , [3:2] input
*/
bool8 DVB_DramWrite(u32 u32Address, u8* pu8Buffer, u16 u16BufferSize);
/*! \fn bool8 DVB_DramWrite(u32 u32Address, u8* pu8Buffer, u16 u16BufferSize)
\brief Write data to Dram, address and buffer size must be double word alignment
\param u32Address (Input) the Dram address (Byte Unit)
\param pu8Buffer (Input) data pointer
\param u16BufferSize (Input) bytes of writing data
\return TRUE - success
\return FALSE - write fail
*/
bool8 DVB_DramRead(u32 u32Address, u8* pu8Buffer, u16 u16BufferSize);
/*! \fn bool8 DVB_DramRead(u32 u32Address, u8* pu8Buffer, u16 u16BufferSize)
\brief Read data from Dram, address and buffer size must be double word alignment
\param u32Address (Input) the Dram address (Byte Unit)
\param pu8Buffer (Output) data pointer
\param u16BufferSize (Output) bytes of reading data
\return TRUE - success
\return FALSE - read fail
*/
u16 DVB_DramSearch(u32 u32Address, u16 u16ItemSize, u16 u16ItemNum, u32 u32Mask, u32 u32Mach, bool8 b8Increase);
/*! \fn u16 DVB_DramSearchU32(u32 u32Address, u16 u16ItemSize, u16 u16ItemNum, u32 u32Mask, u32 u32Mach)
\brief Search specific u32 in Dram, address and item size must be word alignment
\param u32Address (Input) the start address for Dram search (Byte Unit)
\param u16ItemSize (Input) search interval (Byte Unit)
\param u16ItemNum (Input) number of search item
\param u32Mask (Input) mask of interesting bit, 1 for interesting, 0 for don't care
\param u32Mach (Input) search target
\param b8Increase (Input) search from low address to high address or not
\return 0~(u16ItemNum-1) is found target
\return u16ItemNum is not found
*/
u16 DVB_DramCount(u32 u32Address, u16 u16ItemSize, u16 u16ItemNum, u32 u32Mask, u32 u32Mach);
/*! \fn u16 DVB_DramCountU32(u32 u32Address, u16 u16ItemSize, u16 u16ItemNum, u32 u32Mask, u32 u32Mach)
\brief Count specific u32 in Dram, address and item size must be word alignment
\param u32Address (Input) the start address for Dram count (Byte Unit)
\param u16ItemSize (Input) count interval (Byte Unit)
\param u16ItemNum (Input) number of count item
\param u32Mask (Input) mask of interesting bit, 1 for interesting, 0 for don't care
\param u32Mach (Input) count target
\return number of target
*/
bool8 DVB_DramCopy(u32 u32Destination, u32 u32Source, u32 u32Length);
/*! \fn bool8 DVB_DramCopy(u32 u32Destination, u32 u32Source, u32 u32Length)
\brief copy data between Dram, u32Destination, u32Source and u32Length must be double word alignment
\param u32Destination (Input) the Dram address of destination (Byte Unit)
\param u32Source (Input) the Dram address of source (Byte Unit)
\param u32Length (Input) bytes of copy data
\return TRUE - success
\return FALSE - copy fail
*/
bool8 DVB_DramSet( u32 u32Address, u8 u8SetValue, u32 u32Length);
/*! \fn bool8 DVB_DramSet( u32 u32Destination, u8 u8SetValue, u32 u32Length)
\brief fill Dram with specific value, u32Destination and u32Length must be double word alignment
\param u32Address (Input) the Dram start address (Byte Unit)
\param u8SetValue (Input) fill Dram with this value
\param u32Length (Input) fill length (Byte Unit)
\return TRUE - success
\return FALSE - set fail
*/
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -