![]() |
gpiops
Vitis Drivers API Documentation
|
This file contains an example for using GPIO hardware and driver.
This example provides the usage of APIs for reading/writing to the individual pins. Please see xgpiops.h file for description of the pin numbering.
MODIFICATION HISTORY:
Ver Who Date Changes
1.00a sv 01/18/10 First Release 1.01a sv 04/15/12 Removed the calling of some unnecessary APIs. Updated the examples for a ZC702 board . Updated the example to use only pin APIs. 3.3 ms 04/17/17 Added notes about input and output pin description for zcu102 and zc702 boards. 3.7 sne 12/04/19 Reverted versal example support. 3.8 sne 09/17/20 Added description for Versal PS and PMC GPIO pins. 3.9 sne 11/19/20 Added versal PmcGpio example support. 3.12 gm 07/11/23 Added SDT support. 3.15 vlt 12/12/25 Update Doxygen comments to include SDT flow details.
#include "xparameters.h"#include "xgpiops.h"#include "xstatus.h"#include "xplatform_info.h"#include <xil_printf.h>Functions | |
| int | GpioPolledExample (UINTPTR BaseAddress, u32 *DataRead) |
| The purpose of this function is to illustrate how to use the GPIO driver to turn on/off an LED and read the inputs using the pin APIs. More... | |
| int | main (void) |
| Main function to call the example. More... | |
| int GpioPolledExample | ( | UINTPTR | BaseAddress, |
| u32 * | DataRead | ||
| ) |
The purpose of this function is to illustrate how to use the GPIO driver to turn on/off an LED and read the inputs using the pin APIs.
| BaseAddress | contains the base address of the device |
| DataRead | is the pointer where the data read from GPIO Input is returned. |
References XGpioPs_Config::BaseAddr, XGpioPs::PmcGpio, XGpioPs_CfgInitialize(), and XGpioPs_LookupConfig().
Referenced by main().
| int main | ( | void | ) |
Main function to call the example.
References GpioPolledExample().