📄 txc_hw_platform.h
字号:
/*--------------------------------------------------------------------------
******* ****
* ***** ** * * * * * * ***** **** * *
* * * * * ** * * * * * * * * * *
* * * * * * * * **** * * * * * ******
* ***** ****** * * * * * ** * * * * * *
* * * * * * ** * * ** ** * * * * * *
* * * * * * * **** * * * * **** * *
Proprietary and Confidential
This program is made available only to customers and prospective customers
of TranSwitch Corporation under license and may be used only with TranSwitch
semi-conductor products.
Copyright(c) 2004 TranSwitch Inc.
|--------------------------------------------------------------------|
| TranSwitch Header File |
|--------------------------------------------------------------------|
| |
| Workfile: txc_hw_platform.h |
| |
| Description: This file contains the hardware platform definition |
| |
| |
| |
----------------------------------------------------------------------
Revision History
----------------------------------------------------------------------
Rev # Date Author Description
----- ------ ------- -----------
1.0 01.Aug.2K J.Esposito Initial version.
1.1 05.Jun.02 R.Ruchandani Add 16 bit Hardware platform
1.2 26.Sep.02 J. Federici Add 32 bit Hardware platform
--------------------------------------------------------------------*/
/*
*
* $Id: txc_hw_platform.h,v 1.1 2003/04/09 18:45:16 lin Exp $
*
* $Log: txc_hw_platform.h,v $ * Revision 1.1 2003/04/09 18:45:16 lin * add to separate folder * * Revision 1.2 2003/02/21 15:54:41 lin * add CVS Keywords *
*
*/
#ifndef TXC_HW_PLATFORM_H
#define TXC_HW_PLATFORM_H
#define TXC_HW_PLATFORM_MAJOR 1
#define TXC_HW_PLATFORM_MINOR 1
#define TXC_HW_PLATFORM_PATCH 0
/* structures for 8 BIT hw platform access */
typedef struct _tagTXC_REG_ACCESS_STRUCT
{
TXC_REG * addr; /* address to read/write */
TXC_REG data; /* data read/write */
TXC_REG mask; /* only used on write, 1 = update bit position */
} TXC_REG_ACCESS_STRUCT;
typedef struct _tagTXC_BATCH_REG_ACCESS_STRUCT
{
TXC_REG_ACCESS_STRUCT * regDataPtr; /* pointer to an array of data structures */
TXC_S16BIT regCount; /* number of elements in the structure */
TXC_S16BIT writeVerifyFlag; /* read back after write */
TXC_SEM_ID semId; /* semaphore ID */
} TXC_BATCH_REG_ACCESS_STRUCT;
/* structures for 16 BIT hw platform access */
typedef struct _tagTXC_REG_ACCESS_16BIT_STRUCT
{
TXC_REG_16 * addr; /* address to read/write */
TXC_REG_16 data; /* data read/write */
TXC_REG_16 mask; /* only used on write, 1 = update bit position */
} TXC_REG_ACCESS_16BIT_STRUCT;
typedef struct _tagTXC_BATCH_REG_ACCESS_16BIT_STRUCT
{
TXC_REG_ACCESS_16BIT_STRUCT * regDataPtr; /* pointer to an array of data structures */
TXC_S16BIT regCount; /* number of elements in the structure */
TXC_S16BIT writeVerifyFlag; /* read back after write */
TXC_SEM_ID semId; /* semaphore ID */
} TXC_BATCH_REG_ACCESS_16BIT_STRUCT;
/* structures for 32 BIT hw platform access */
typedef struct _tagTXC_REG_ACCESS_32BIT_STRUCT
{
TXC_REG_32 *addr; /* address to read/write */
TXC_REG_32 data; /* data read/write */
TXC_REG_32 mask; /* only used on write, 1 = update bit position */
} TXC_REG_ACCESS_32BIT_STRUCT;
typedef struct _tagTXC_BATCH_REG_ACCESS_32BIT_STRUCT
{
TXC_REG_ACCESS_32BIT_STRUCT * regDataPtr; /* pointer to an array of data structures */
TXC_S16BIT regCount; /* number of elements in the structure */
TXC_S16BIT writeVerifyFlag; /* read back after write */
TXC_SEM_ID semId; /* semaphore ID */
} TXC_BATCH_REG_ACCESS_32BIT_STRUCT;
/* function prototypes for hw platform */
int TXC_BatchRegWrite(TXC_BATCH_REG_ACCESS_STRUCT * batchWriteDataPtr);
int TXC_BatchRegRead(TXC_BATCH_REG_ACCESS_STRUCT * batchReadDataPtr);
int TXC_BatchReg16BitWrite(TXC_BATCH_REG_ACCESS_16BIT_STRUCT * batch16BitWriteDataPtr);
int TXC_BatchReg16BitRead(TXC_BATCH_REG_ACCESS_16BIT_STRUCT * batch16BitReadDataPtr);
int TXC_BatchReg32BitWrite(TXC_BATCH_REG_ACCESS_32BIT_STRUCT * batch32BitWriteDataPtr);
int TXC_BatchReg32BitRead(TXC_BATCH_REG_ACCESS_32BIT_STRUCT * batch32BitReadDataPtr);
void writeReg (TXC_REG * addr, TXC_REG data);
TXC_REG readReg (TXC_REG * addr);
void write16BitReg (TXC_REG_16 * addr, TXC_REG_16 data);
TXC_REG_16 read16BitReg (TXC_REG_16 * addr);
void write32BitReg (TXC_REG_32 * addr, TXC_REG_32 data);
TXC_REG_32 read32BitReg (TXC_REG_32 * addr);
#endif /* TXC_HW_PLATFORM_H */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -