### Xilinx Processor IP Library

<hl>Software Drivers</hl>

Main Page | Data Structures | File List | Globals

# xgpio_extra.c File Reference

## Detailed Description

The implementation of the XGpio component's advanced discrete functions. See xgpio.h for more information about the component.

Note:

None

     MODIFICATION HISTORY:

     Ver   Who  Date     Changes
     ----- ---- -------- -----------------------------------------------
     1.00a rmm  02/04/02 First release
     2.00a jhl  12/16/02 Update for dual channel and interrupt support
     2.11a mta  03/21/07 Updated to new coding style

## Functions

void | XGpio_DiscreteSet (XGpio *InstancePtr, unsigned Channel, u32 Mask)
void | XGpio_DiscreteClear (XGpio *InstancePtr, unsigned Channel, u32 Mask)

## Function Documentation

void XGpio_DiscreteClear | ( | XGpio * | InstancePtr,
|  | unsigned | Channel,
|  | u32 | Mask
| ) |

Set output discrete(s) to logic 0 for the specified GPIO channel.

Parameters:

  | InstancePtr | is a pointer to an XGpio instance to be worked on.
  | Channel | contains the channel of the GPIO (1 or 2) to operate on.
  | Mask | is the set of bits that will be set to 0 in the discrete data register. All other bits in the data register are unaffected.

Returns:
  None.

Note:

The hardware must be built for dual channels if this function is used with any channel other than 1. If it is not, this function will assert.

void XGpio_DiscreteSet | ( | XGpio * | InstancePtr,
|  | unsigned | Channel,
|  | u32 | Mask
| ) |

Set output discrete(s) to logic 1 for the specified GPIO channel.

Parameters:

  | InstancePtr | is a pointer to an XGpio instance to be worked on.
  | Channel | contains the channel of the GPIO (1 or 2) to operate on.
  | Mask | is the set of bits that will be set to 1 in the discrete data register. All other bits in the data register are unaffected.

Returns:
  None.

Note:

The hardware must be built for dual channels if this function is used with any channel other than 1. If it is not, this function will assert.

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