⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ctkav_biu.h

📁 ct952 source code use for Digital Frame Photo
💻 H
📖 第 1 页 / 共 2 页
字号:
typedef struct  _tagTEST_BIU_CPPM_STRU{    DWORD       dwBitsDRAMAddr;         // bitstream input buffer address    LONG        lBitsLen;               // in 8 bytes (64-bit) unit    DWORD       dwWriteDRAMAddr;        // output stream buffer address    DWORD       dwPatternDRAMAddr;      // pattern buffer address    LONG        lSecterLen;             // sector length in byte unit    DWORD       dwMediaKeyL;            // 31:0 of Media key    DWORD       dwMediaKeyU;            // 55:32 of Media key    DWORD       dwAlbumIDL;             // 31:0 of Album ID    DWORD       dwAlbumIDU;             // 63:32 of Album ID    union BIU_CLIP_UNION    BIUClip;    // the sum of prefix and suffix should be modulated by 8} TEST_BIU_CPPM_STRU, *PTEST_BIU_CPPM_STRU;// define MACROs//#define MACRO_BIU_SW_RESET      {REG_PLAT_RESET_CONTROL &= 0xfffffffb;}#define MACRO_BIU_READ_32BIT(dwBit)     \    {dwBit = REG_BIU_BIURRD;}#define MACRO_BIU_WRITE_32BIT(dwBit)    \    {REG_BIU_BIUWRD = dwBit;}#define MACRO_BIU_INPUT_ENABLE      (REG_BIU_BIUCTL |= BIU_CTL_BIFF_EN)#define MACRO_BIU_OUTPUT_ENABLE     (REG_BIU_BIUCTL |= BIU_CTL_BOFF_EN)#define MACRO_BIU_INPUT_READY       (REG_BIU_BIUCTL & BIU_STATUS_BIURDDRDY)#define MACRO_BIU_OUTPUT_READY      (REG_BIU_BIUCTL & BIU_STATUS_MBOWRRDY)#define MACRO_BIU_INPUT_DISABLE     (REG_BIU_BIUCTL &= (~(BIU_CTL_BIFF_EN)))#define MACRO_BIU_OUTPUT_DISABLE    (REG_BIU_BIUCTL &= (~(BIU_CTL_BOFF_EN)))#define MACRO_BIU_REMAINDER(dwBit)      \    {REG_BIU_BIUBPREM |= dwBit;}#define MACRO_BIU_GET_REMAINDER (REG_BIU_BIUBPREM & BIU_REMAINDER_MASK)#define MACRO_BIU_GET_COUNTER   (REG_BIU_BIUFNPEC) // can be used only in find next pattern#define MACRO_BIU_INIT_READ(dwSectorLen, dwClipUnion)       \    {   \        REG_BIU_SECTORLEN = dwSectorLen;    \        REG_BIU_BIUCLIPLEN = dwClipUnion;   \        REG_BIU_BIUCTL |= BIU_CTL_BIFF_EN;  \    }#define MACRO_BIU_INIT(dwSectorLen, dwClipUnion, dwState)   \    {   \        REG_BIU_SECTORLEN = dwSectorLen;    \        REG_BIU_BIUCLIPLEN = dwClipUnion;   \        REG_BIU_BIUCTL |= (dwState);    \    }//====================================================================// iRemainder is 3-bit value// iSize is total number of bytes needed to be by-pass. If this size is not divided by 64-bit,//  padding mechanism will be turn on automatically.// iSectorLen is a number of bytes for a sector/block// iClipUnion stores the suffix and prefix needed to be clipped// iPadding is a byte indicates what value to be padded at padding mode//---------------------------------------// By-pass mode INT bit will be turn on//====================================================================#define MACRO_BIU_BYPASS(dwRemainder, dwSize, dwSectorLen, dwClipUnion)  \    {   \        REG_BIU_BIUBPREM = dwRemainder;     \        REG_BIU_SECTORLEN = dwSectorLen;    \        REG_BIU_BIUCLIPLEN = dwClipUnion;   \        REG_BIU_BIUBPCNT = dwSize;          \        REG_BIU_BIUCTL &= (~BIU_CTL_PADDING);   \        REG_BIU_BIUCTL |= (BIU_INT_BPINT_EN|BIU_OP_BIUBP_GO|BIU_CTL_BOFF_EN);   \    }#define MACRO_BIU_BYPASS_PADDING(dwRemainder, dwSize, dwSectorLen, dwClipUnion, dwPadding)  \    {   \        REG_BIU_BIUBPREM = (dwPadding << 8) | dwRemainder;      \        REG_BIU_SECTORLEN = dwSectorLen;    \        REG_BIU_BIUCLIPLEN = dwClipUnion;   \        REG_BIU_BIUBPCNT = dwSize;      \        REG_BIU_BIUCTL |= (BIU_CTL_PADDING|BIU_INT_BPINT_EN|BIU_OP_BIUBP_GO|BIU_CTL_BOFF_EN);   \    }//====================================================================// iRemainder is 3-bit value// iSize is total number of bytes needed to be skipped.// iSectorLen is a number of bytes for a sector/block// iClipUnion stores the suffix and prefix needed to be clipped//---------------------------------------// By-pass mode INT bit will be turn on//====================================================================#define MACRO_BIU_SKIP(dwRemainder, dwSize, dwSectorLen, dwClipUnion)       \    {   \        REG_BIU_BIUBPREM = dwRemainder;     \        REG_BIU_SECTORLEN = dwSectorLen;    \        REG_BIU_BIUCLIPLEN = dwClipUnion;   \        REG_BIU_BIUBPCNT = dwSize;      \        REG_BIU_BIUCTL |= (BIU_CTL_BIUSKIP_EN|BIU_INT_BPINT_EN|BIU_OP_BIUBP_GO|BIU_CTL_BIFF_EN|BIU_CTL_BOFF_EN);    \    }//====================================================================// iRemainder is 3-bit value// iSize is total number of bytes needed to be skipped.// iSectorLen is a number of bytes for a sector/block// iClipUnion stores the suffix and prefix needed to be clipped//---------------------------------------// By-pass mode INT bit will be turn on//====================================================================#define MACRO_BIU_FIND_PATTERN(dwSectorLen, dwClipUnion, dwPattern0, dwPattern1, dwPatternMask)  \    {   \        REG_BIU_SECTORLEN = dwSectorLen;    \        REG_BIU_BIUCLIPLEN = dwClipUnion;   \        REG_BIU_BIUTGTPAT0 = dwPattern0;    \        REG_BIU_BIUTGTPAT1 = dwPattern1;    \        REG_BIU_BIUPATMASK = dwPatternMask; \        REG_BIU_BIUCTL |= (BIU_INT_FNPINT_EN|BIU_OP_FNP_GO|BIU_CTL_BIFF_EN|BIU_CTL_BOFF_EN);    \    }#define MACRO_BIU_FIND_NEXT_PATTERN     (REG_BIU_BIUCTL |= BIU_OP_FNP_GO)#define MACRO_BIU_FNP_STATUS            (REG_BIU_BIUCTL >> 31)// Select BIU input/output format (Big or little endian)#define MACRO_BIU_FMT_OUTPUT_BIG_ENDIAN	\	{	\		REG_BIU_BIUCTL &= (~(0x0c000000));	\	}	\#define MACRO_BIU_FMT_OUTPUT_BYTE_SWAP	\	{	\		REG_BIU_BIUCTL &= (~(0x0c000000));	\		REG_BIU_BIUCTL |= (0x04000000);	\	}	\#define MACRO_BIU_FMT_OUTPUT_LITTLE_ENDIAN_2BYTE	\	{	\		REG_BIU_BIUCTL &= (~(0x0c000000));	\		REG_BIU_BIUCTL |= (0x08000000);	\	}	\#define MACRO_BIU_FMT_OUTPUT_LITTLE_ENDIAN	\	{	\		REG_BIU_BIUCTL |= (0x0c000000);	\	}	\#define MACRO_BIU_FMT_INPUT_BIG_ENDIAN	\	{	\		REG_BIU_BIUCTL &= (~(0x03000000));	\	}	\#define MACRO_BIU_FMT_INPUT_BYTE_SWAP	\	{	\		REG_BIU_BIUCTL &= (~(0x03000000));	\		REG_BIU_BIUCTL |= (0x01000000);	\	}	\#define MACRO_BIU_FMT_INPUT_LITTLE_ENDIAN_2BYTE	\	{	\		REG_BIU_BIUCTL &= (~(0x03000000));	\		REG_BIU_BIUCTL |= (0x02000000);	\	}	\#define MACRO_BIU_FMT_INPUT_LITTLE_ENDIAN	\	{	\		REG_BIU_BIUCTL |= (0x03000000);	\	}	\#ifdef __cplusplus}#endif //__cplusplus#endif  // __CTKAV_BIU_H__

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -