| hwicap Vitis Drivers API Documentation

- Overview
- Data Structures
- APIs
- File List
- Examples

Functions
xhwicap_testapp_example.c File Reference

## Overview

This file contains a design example using the HwIcap device driver and hardware device.

Note

This example can be run on a 7 series device, Zynq device, Ultrascale and ZynqMP Ultrascale FPGAs.

In a Zynq device the ICAP needs to be selected using the XDcfg_SelectIcapInterface API of the DevCfg driver (clear the PCAP_PR bit of Control register in the Device Config Interface) before it can be accessed using the HwIcap. In case of ZynqMP clear the PCAP_PR bit of pcap_ctrl register in Module Configuration Security Unit(CSU) using register write.

    MODIFICATION HISTORY:

    Ver   Who  Date     Changes

    2.00a sv   10/04/07 Initial release.
    11.0  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.
    11.6 Nava 06/28/23  Added support for system device-tree flow.
    11.7 Nava 02/06/25  Updated HWICAP_BASEADDR to use XPAR_HWICAP_0_BASEADDR
                        instead of XPAR_XHWICAP_0_BASEADDR to align with YAML
                        changes.

## Functions
int | HwIcapTestAppExample (u16 HwIcapDeviceId)
| The purpose of this function is to illustrate the usage of the HwIcap driver. More...
int | main (void)
| Main function to call the HwIcap example. More...

## Function Documentation

int HwIcapTestAppExample | ( | u16 | HwIcapDeviceId | ) |

The purpose of this function is to illustrate the usage of the HwIcap driver.

Parameters

  HwIcapDeviceId | is device ID of the XHwIcap Device, typically XPAR_<HWICAP_instance>_DEVICE_ID value from xparameters.h

Returns
  XST_SUCCESS to indicate success, otherwise XST_FAILURE.

Note
  None.

References XHwIcap_Config::BaseAddress, XHwIcap_CfgInitialize(), XHwIcap_GetConfigReg(), XHwIcap_LookupConfig(), and XHwIcap_SelfTest().

Referenced by main().

int main | ( | void |  | ) |

Main function to call the HwIcap example.

This function is not included if the example is generated from the TestAppGen test tool.

Parameters

  None. |

Returns
  XST_SUCCESS to indicate success, otherwise XST_FAILURE.

Note
  None.

References HwIcapTestAppExample().