### Xilinx Processor IP Library

<hl>Software Drivers</hl>

Main Page | File List | Globals

# xio.c File Reference

## Detailed Description

Contains I/O functions for memory-mapped or non-memory-mapped I/O architectures. These functions encapsulate generic CPU I/O requirements.

     MODIFICATION HISTORY:

     Ver   Who  Date	 Changes
     ----- ---- -------- -------------------------------------------------------
     1.00a rpm  11/07/03 Added InSwap/OutSwap routines for endian conversion
     1.01a ecm  02/24/06 CR225908 corrected the extra curly braces in macros
                         and bumped version to 1.01.a.
     2.11a mta  03/21/07 Updated to new coding style.

Note:

This file may contain architecture-dependent code.

## 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)

## 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.

Copyright © 1995-2009 Xilinx, Inc. All rights reserved.