📄 hw_1120.c
字号:
/*------------------------------------------------------------------------------
$File: //tdi_sw/tdi/source/hardware/custom/hw_1120.c $
$DateTime: 2004/12/20 19:06:16 $
$Revision: #4 $
Purpose: This file holds the hardware access functions for the TD1120.
CONFIDENTIAL AND PROPRIETARY INFORMATION OF TRANSDIMENSION, INC.
AND/OR ITS WHOLLY OWNED SUBSIDIARY SOFTCONNEX TECHNOLOGIES, INC.
THIS NOTICE IS NOT TO BE DELETED, MODIFIED, MOVED OR CHANGED IN ANY WAY.
(TransDimension, Inc. and SoftConnex Technologies, Inc. are referred to
collectively below as TransDimension, Inc.)
Copyright (c) 1999 - 2004 by TransDimension, Inc.
This software is protected by copyright laws and international copyright
treaties, as well as other intellectual property laws and treaties. This
software is a CONFIDENTIAL, unpublished work of authorship, and with portions
constituting TRADE SECRETS of TransDimension, Inc.. Any unauthorized use,
disclosure, and/or reproduction of this software, or any part of this software;
or distribution of this software in any form or by any means; or storage
of this software in any database or retrieval system, without the express
written consent of, and license from, TransDimension, Inc. is strictly prohibited.
This software is protected under the copyright and/or trade secret laws in other
countries in addition to USA. All Rights Reserved. Failure to abide by the use,
disclosure and/or reproduction restrictions may result in civil and /or criminal
penalties, and will be prosecuted to the maximum extent of the law.
------------------------------------------------------------------------------*/
/******************************************************************************
Include Files
******************************************************************************/
#include "hw_1120.h"
#include "platform.h"
/******************************************************************************
Private Data Types
******************************************************************************/
/******************************************************************************
Module Variables
******************************************************************************/
/******************************************************************************
Private Functions
******************************************************************************/
/******************************************************************************
Public Functions
******************************************************************************/
#ifndef PLATFORM_HW_PLATF
#error "PLATFORM_HW_PLATF not defined"
#endif
/*------------------------------------------------------------------------------
Name : HW_Write1120Reg
Purpose : Write a value to a register.
Arguments : I: baseAddress - Base address of register address space.
I: offset - Register offset.
I: value - The value to write into the register.
Returns : None.
Notes : None.
------------------------------------------------------------------------------*/
void HW_Write1120Reg(void *baseAddress, U16 offset, U32 value)
{
#if (PLATFORM_HW_PLATF == 0)
#error "Customer did not implement HW_Write1120Reg"
#endif
/*
volatile U16 *address = (U16 *) ((U32)baseAddress + offset);
*address++ = (U16) (value & 0xFFFF);
*address = (U16) ((value >> 16) & 0xFFFF);
*/
}
/*------------------------------------------------------------------------------
Name : HW_Read1120Reg
Purpose : Read a value from a register.
Arguments : I: baseAddress - Base address of register address space.
I: offset - Register offset.
Returns : The value read from the register.
Notes : None.
------------------------------------------------------------------------------*/
U32 HW_Read1120Reg(void *baseAddress, U16 offset)
{
#if (PLATFORM_HW_PLATF == 0)
#error "Customer did not implement HW_Read1120Reg"
#endif
/*
U32 regValue;
volatile U16 *address = (U16 *) ((U32)baseAddress + offset);
regValue = (U32) (*address++);
regValue += (U32) (*address) << 16;
return(regValue);
*/
}
/*------------------------------------------------------------------------------
Name : HW_Write1120Reg16
Purpose : Write a 16 bits value to a register.
Arguments : I: baseAddress - Base address of register address space.
I: offset - Register offset.
I: value - The value to write into the register.
Returns : None.
Notes : None.
------------------------------------------------------------------------------*/
void HW_Write1120Reg16(void *baseAddress, U16 offset, U16 value)
{
#if (PLATFORM_HW_PLATF == 0)
#error "Customer did not implement HW_Write1120Reg16"
#endif
/*
volatile U16 *address = (U16 *) ((U32)baseAddress + offset);
*address = value;
*/
}
/*------------------------------------------------------------------------------
Name : HW_Read1120Reg16
Purpose : Read a 16 bits value from a register.
Arguments : I: baseAddress - Base address of register address space.
I: offset - Register offset.
Returns : The value read from the register.
Notes : None.
------------------------------------------------------------------------------*/
U16 HW_Read1120Reg16(void *baseAddress, U16 offset)
{
#if (PLATFORM_HW_PLATF == 0)
#error "Customer did not implement HW_Read1120Reg16"
#endif
/*
U16 regValue;
volatile U16 *address = (U16 *) ((U32)baseAddress + offset);
regValue = *address;
return(regValue);
*/
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -