wdtps: xwdtps_selftest_example.c File Reference

| wdtps Xilinx SDK Drivers API Documentation

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

Functions
xwdtps_selftest_example.c File Reference

## Overview

This file contains a design example using the System Watchdog Timer driver (XWdtPs) and hardware device.

Note

None.

MODIFICATION HISTORY:

      Ver   Who    Date     Changes

      1.00a sdm    05/27/11 First release
    *

## Functions
int | WdtPsSelfTestExample (u16 DeviceId)
| This function does a minimal test on the watchdog timer device and driver as a design example. More...
int | main (void)
| Main function to call the self test example. More...

## Function Documentation

int main | ( | void |  | ) |

Main function to call the self test example.

Parameters

  None |

Returns
  XST_SUCCESS if successful, XST_FAILURE if unsuccessful

Note
  None

References WdtPsSelfTestExample().

int WdtPsSelfTestExample | ( | u16 | DeviceId | ) |

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

The purpose of this function is to illustrate how to use the XWdtPs driver.

This function may require some time (seconds or even minutes) to execute because it waits for the watchdog timer to expire.

Parameters

  DeviceId | is the unique device id of the device.

Returns
  XST_SUCCESS if successful, otherwise XST_FAILURE.

Note
  None.

References XWdtPs_Config::BaseAddress, XWdtPs_CfgInitialize(), XWdtPs_LookupConfig(), and XWdtPs_SelfTest().

Referenced by main().