gpio
Vitis Drivers API Documentation
xgpio_low_level_example.c File Reference

Overview

This file contains a design example using the General Purpose I/O (GPIO) low level driver and hardware device.

It only uses a channel 1 of a GPIO device.

MODIFICATION HISTORY:
Ver   Who  Date  Changes


1.00b jhl 04/29/02 First release 2.00a jhl 12/30/02 Addition of dual channel capability 2.00a sv 04/18/05 Minor changes to comply to Doxygen and coding guidelines 3.00a ktn 11/21/09 Removed the macros XGpio_mSetDataDirection, XGpio_mGetDataReg and XGpio_mSetDataReg. Users should use XGpio_WriteReg/XGpio_ReadReg to achieve the same functionality. 4.1 lks 11/18/15 Updated to use canonical xparameters and clean up of the comments and code for CR 900381 4.3 ms 01/23/17 Added xil_printf statement in main function to ensure that "Successfully ran" and "Failed" strings are available in all examples. This is a fix for CR-965028. 4.5 sne 06/12/19 Fixed IAR compiler warning. 4.10 gm 07/11/23 Added SDT support.

 

Functions

int main (void)
 The purpose of this function is to illustrate how to use the GPIO low level driver to turn on and off an LED. More...
 

Function Documentation

int main ( void  )

The purpose of this function is to illustrate how to use the GPIO low level driver to turn on and off an LED.

Returns
Always 0
Note
The main function is returning an integer to prevent compiler warnings.

References XGPIO_CHAN_OFFSET, XGPIO_DATA_OFFSET, XGpio_ReadReg, XGPIO_TRI_OFFSET, and XGpio_WriteReg.