| prc Vitis Drivers API Documentation

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

Macros | Functions
xprc_selftest_example.c File Reference

## Overview

This file contains a design example using the PRC driver (XPrc) to do self test on the device.

Note
  None

MODIFICATION HISTORY:

    Ver   Who     Date          Changes

    1.0   ms   07/18/2016   First release
          ms   04/05/2017   Modified comment lines notation in functions to
                            avoid unnecessary description displayed
                            while generating doxygen.
    2.2  Nava  07/04/2023   Added support for system device-tree flow.

## Macros
#define | XPRC_DEVICE_ID XPAR_PRC_DEVICE_ID
| The following constants map to the XPAR parameters created in the xparameters.h file. More...

## Functions
u32 | XPrc_SelfTestExample (u16 DeviceId)
| This function does a minimal test on the PRC device and driver as a design example. More...
u32 | XPrc_GetRegisterAddress (XPrc *InstancePtr, u32 VsmId, u8 RegisterType, u16 TableRow)
| The register offsets for the PRC are dynamic. More...
int | main (void)
| This is the main function to call the example. More...

## Macro Definition Documentation

#define XPRC_DEVICE_ID XPAR_PRC_DEVICE_ID

The following constants map to the XPAR parameters created in the xparameters.h file.

They are defined here such that a user can easily change all the needed parameters in one place.

Referenced by main().

## Function Documentation

int main | ( | void |  | ) |

This is the main function to call the example.

Parameters

  None. |

Returns
  - XST_SUCCESS if successful.
  - XST_FAILURE if failed.

Note
  None.

References XPRC_DEVICE_ID, and XPrc_SelfTestExample().

u32 XPrc_SelfTestExample | ( | u16 | DeviceId | ) |

This function does a minimal test on the PRC device and driver as a design example.

The purpose of this function is to illustrate how to use the XPrc component.

Parameters

  DeviceId | is the XPAR_<prc_instance>_DEVICE_ID value from xparameters.h.

Returns
  - XST_SUCCESS if successful.
  - XST_FAILURE if failed.

Note
  None.

References XPrc_CfgInitialize(), XPrc_LookupConfig(), and XPrc_SelfTest().

Referenced by main().