neptune_frame_buffer.c
来自「OMAP1030 处理器的ARM 侧硬件测试代码 OMAP1030 是TI」· C语言 代码 · 共 67 行
C
67 行
/*
* ============================================================================
*
* TEXAS INSTRUMENTS INCORPORATED PROPRIETARY INFORMATION
*
* Property of Texas Instruments
* For Unrestricted Internal Use Only
* Unauthorized reproduction and/or distribution is strictly prohibited.
* This product is protected under copyright law and trade secret law as an unpublished work.
* Created 2003, (C) Copyright 2003 Texas Instruments. All rights reserved.
*
* Filename: neptune_frame_buffer.c
*
* project: Neptune
*
* Description: library for neptune internal sdram
*
* author : a-dumitrascu@ti.com
*
* =============================================================================
*/
#include "neptune_frame_buffer.h"
#include "testaccess.h"
BOOL FB_CurrentlyResetting(void) {
return (BOOL)(FB_PU_STATUS_REG & FB_PU_STATUS_RESET_MASK);
}
void FB_EnableProtection(void) {
FB_PU_CONTROL_REG |= FB_PU_CONTROL_MEM_PROT_MASK;
}
void FB_DisableProtection(void) {
FB_PU_CONTROL_REG &= ~FB_PU_CONTROL_MEM_PROT_MASK;
}
void FB_EnableMemoryReset(void) {
FB_PU_CONTROL_REG |= FB_PU_CONTROL_MEM_RESET_MASK;
}
void FB_DisableMemoryReset(void) {
FB_PU_CONTROL_REG &= ~FB_PU_CONTROL_MEM_RESET_MASK;
}
void FB_StartMemoryReset(void) {
FB_PU_CONTROL_REG |= FB_PU_CONTROL_START_RESET_MASK;
}
void FB_LockFBPUregisters(void) {
FB_PU_CONTROL_REG |= FB_PU_CONTROL_FBPU_SEC_MASK;
}
UWORD16 FB_TestResetValues(void) {
if ((FB_PU_CONTROL_REG != FB_PU_CONTROL_REG_RESET_VALUE) || (FB_PU_STATUS_REG != FB_PU_STATUS_REG_RESET_VALUE)) return TEST_BAD;
else return TEST_OK;
}
BOOL FB_ViolationReported(void) {
return (BOOL)(FB_PU_STATUS_REG & FB_PU_STATUS_IA_MEM_MASK);
}
void FB_ClearIllegalAccessFlag(void) {
FB_PU_STATUS_REG = 0x00000000; //value is don't care
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?