Software Drivers
Main Page | File List | Globals

xio.h File Reference


Detailed Description

This file contains the interface for the XIo component, which encapsulates the Input/Output functions for processors that do not require any special I/O handling.

 MODIFICATION HISTORY:

 Ver   Who  Date     Changes
 ----- ---- -------- -------------------------------------------------------
 1.00a rpm  11/07/03 Added InSwap/OutSwap routines for endian conversion
 1.00a xd   11/04/04 Improved support for doxygen
 1.01a ecm  02/24/06 CR225908 corrected the extra curly braces in macros
                     and bumped version to 1.01.a.
 1.11a mta  03/21/07 Updated to new coding style.
 1.11b va   04/17/08 Updated Tcl for better CORE_CLOCK_FREQ_HZ definition
 1.11a sdm  03/12/09 Updated Tcl to define correct value for CORE_CLOCK_FREQ_HZ
                     (CR  #502010)

 

Note:
This file may contain architecture-dependent items (memory-mapped or non-memory-mapped I/O).


Defines

#define XIo_In8(InputPtr)
#define XIo_In16(InputPtr)
#define XIo_In32(InputPtr)
#define XIo_Out8(OutputPtr, Value)
#define XIo_Out16(OutputPtr, Value)
#define XIo_Out32(OutputPtr, Value)

Typedefs

typedef u32 XIo_Address

Functions

void XIo_EndianSwap16 (u16 Source, u16 *DestPtr)
void XIo_EndianSwap32 (u32 Source, u32 *DestPtr)
u16 XIo_InSwap16 (XIo_Address InAddress)
u32 XIo_InSwap32 (XIo_Address InAddress)
void XIo_OutSwap16 (XIo_Address OutAddress, u16 Value)
void XIo_OutSwap32 (XIo_Address OutAddress, u32 Value)


Define Documentation

#define XIo_In16 InputPtr   ) 
 

Performs an input operation for a 16-bit memory location by reading from the specified address and returning the value read from that address.

Parameters:
InputPtr contains the address to perform the input operation at.
Returns:
The value read from the specified input address.
Note:
None.

#define XIo_In32 InputPtr   ) 
 

Performs an input operation for a 32-bit memory location by reading from the specified address and returning the value read from that address.

Parameters:
InputPtr contains the address to perform the input operation at.
Returns:
The value read from the specified input address.
Note:
None.

#define XIo_In8 InputPtr   ) 
 

Performs an input operation for an 8-bit memory location by reading from the specified address and returning the value read from that address.

Parameters:
InputPtr contains the address to perform the input operation at.
Returns:
The value read from the specified input address.
Note:
None.

#define XIo_Out16 OutputPtr,
Value   ) 
 

Performs an output operation for a 16-bit memory location by writing the specified value to the the specified address.

Parameters:
OutputPtr contains the address to perform the output operation at.
Value contains the value to be output at the specified address.
Returns:
None
Note:
None.

#define XIo_Out32 OutputPtr,
Value   ) 
 

Performs an output operation for a 32-bit memory location by writing the specified value to the the specified address.

Parameters:
OutputPtr contains the address to perform the output operation at.
Value contains the value to be output at the specified address.
Returns:
None
Note:
None.

#define XIo_Out8 OutputPtr,
Value   ) 
 

Performs an output operation for an 8-bit memory location by writing the specified value to the the specified address.

Parameters:
OutputPtr contains the address to perform the output operation at.
Value contains the value to be output at the specified address.
Returns:
None
Note:
None.


Typedef Documentation

typedef u32 XIo_Address
 

Typedef for an I/O address. Typically correlates to the width of the address bus.


Function Documentation

void XIo_EndianSwap16 u16  Source,
u16 *  DestPtr
 

Performs a 16-bit endian converion.

Parameters:
Source contains the value to be converted.
DestPtr contains a pointer to the location to put the converted value.
Returns:
None.
Note:
None.

void XIo_EndianSwap32 u32  Source,
u32 *  DestPtr
 

Performs a 32-bit endian converion.

Parameters:
Source contains the value to be converted.
DestPtr contains a pointer to the location to put the converted value.
Returns:
None.
Note:
None.

u16 XIo_InSwap16 XIo_Address  InAddress  ) 
 

Performs an input operation for a 16-bit memory location by reading from the specified address and returning the byte-swapped value read from that address.

Parameters:
InAddress contains the address to perform the input operation at.
Returns:
The byte-swapped value read from the specified input address.
Note:
None.

u32 XIo_InSwap32 XIo_Address  InAddress  ) 
 

Performs an input operation for a 32-bit memory location by reading from the specified address and returning the byte-swapped value read from that address.

Parameters:
InAddress contains the address to perform the input operation at.
Returns:
The byte-swapped value read from the specified input address.
Note:
None.

void XIo_OutSwap16 XIo_Address  OutAddress,
u16  Value
 

Performs an output operation for a 16-bit memory location by writing the specified value to the the specified address. The value is byte-swapped before being written.

Parameters:
OutAddress contains the address to perform the output operation at.
Value contains the value to be output at the specified address.
Returns:
None.
Note:
None.

void XIo_OutSwap32 XIo_Address  OutAddress,
u32  Value
 

Performs an output operation for a 32-bit memory location by writing the specified value to the the specified address. The value is byte-swapped before being written.

Parameters:
OutAddress contains the address at which the output operation has to be done.
Value contains the value to be output at the specified address.
Returns:
None.
Note:
None.