Software Drivers
Main Page | Data Structures | File List | Data Fields | Globals

xmbox_hw.h File Reference


Detailed Description

This header file contains identifiers and low-level driver functions (or macros) that can be used to access the device. The user should refer to the hardware device specification for more details of the device operation. High-level driver functions are defined in xmbox.h.

 MODIFICATION HISTORY:

 Ver   Who  Date       Changes
 ----- ---- --------   -----------------------------------------------
 1.00a va              First release
 1.00a ecm  06/01/07   Cleanup, new coding standard, check into XCS
 


Register Offset Definitions

Register offsets within a mbox, there are multiple mboxes within a single device

#define XMB_WRITE_REG_OFFSET
#define XMB_READ_REG_OFFSET
#define XMB_STATUS_REG_OFFSET
#define XMB_ERROR_REG_OFFSET

Status register definitions

These status bits are used to poll the FIFOs

#define XMB_STATUS_FIFO_EMPTY
#define XMB_STATUS_FIFO_FULL

Defines

#define XMB_ERROR_FIFO_EMPTY
#define XMbox_mReadReg(BaseAddress, RegOffset)
#define XMbox_mWriteReg(BaseAddress, RegOffset, ValueToWrite)
#define XMbox_mWriteMBox(BaseAddress, ValueToWrite)
#define XMbox_mReadMBox(BaseAddress)
#define XMbox_mIsEmpty(BaseAddress)
#define XMbox_mIsFull(BaseAddress)


Define Documentation

#define XMB_ERROR_FIFO_EMPTY
 

Error bits definition.

#define XMB_ERROR_REG_OFFSET
 

Mbox Error reg

#define XMB_READ_REG_OFFSET
 

Mbox read register

#define XMB_STATUS_FIFO_EMPTY
 

Status bits definition.

#define XMB_STATUS_REG_OFFSET
 

Mbox status reg

#define XMB_WRITE_REG_OFFSET
 

Mbox write register

#define XMbox_mIsEmpty BaseAddress   ) 
 

Checks if the READ FIFO is Empty.

Parameters:
BaseAddress contains the base address of the mbox device.
Returns:
TRUE if empty, FALSE if not empty and has data to be read.
Note:
None.
u32 XMbox_mIsEmpty(u32 BaseAddress)

#define XMbox_mIsFull BaseAddress   ) 
 

Checks if there is room in the Write FIFO.

Parameters:
BaseAddress contains the base address of the mbox device.
Returns:
FALSE if there is room in FIFO, TRUE if no room for data
Note:
None.
u32 XMbox_mIsFull(u32 BaseAddress)

#define XMbox_mReadMBox BaseAddress   ) 
 

Read the mbox read FIFO.

Parameters:
BaseAddress contains the base address of the mbox device.
Returns:
The value read from the register, a 32 bit value.
Note:
None.
u32 XMbox_mReadMBox(u32 BaseAddress)

#define XMbox_mReadReg BaseAddress,
RegOffset   ) 
 

Read one of the mbox registers.

Parameters:
BaseAddress contains the base address of the mbox device.
RegOffset contains the offset from the 1st register of the mbox to select the specific register of the mbox.
Returns:
The value read from the register, a 32 bit value.
Note:
None.
u32 XMbox_mReadReg(u32 BaseAddress, unsigned RegOffset)

#define XMbox_mWriteMBox BaseAddress,
ValueToWrite   ) 
 

Write the mbox write register.

Parameters:
BaseAddress contains the base address of the mbox device.
ValueToWrite contains the value to be written.
Returns:
None.
Note:
None.
u32 XMbox_mWriteMBox(u32 BaseAddress, u32 ValueToWrite)

#define XMbox_mWriteReg BaseAddress,
RegOffset,
ValueToWrite   ) 
 

Write a specified value to a register of a mbox.

Parameters:
BaseAddress is the base address of the mbox device.
RegOffset contain the offset from the 1st register of the mbox to select the specific register of the mbox.
ValueToWrite is the 32 bit value to be written to the register.
Returns:
None
void XMbox_mWriteReg(u32 BaseAddress, unsigned RegOffset, u32 ValueToWrite)