ttcps: xttcps_tapp_example.c File Reference

| ttcps Xilinx SDK Drivers API Documentation

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

Functions
xttcps_tapp_example.c File Reference

## Overview

This file contains an example uses ttc to generate interrupt and update a flag which is checked in interrupt example to confirm whether the interrupt is generated or not.

Note

     MODIFICATION HISTORY:

     Ver  Who    Date     Changes

     3.00 pkp    01/12/15 First release
     3.01 pkp         01/30/16 Modified SetupTimer to remove XTtcps_Stop before TTC
                                               configuration as it is added in xttcps.c in
                                               XTtcPs_CfgInitialize
     3.01 pkp         03/04/16 Added status check after SetupTicker is called by
                                               TmrInterruptExample
     3.2  mus    10/28/16 Updated TmrCntrSetup as per prototype of
                          XTtcPs_CalcIntervalFromFreq
          ms     01/23/17 Modified 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.
     3.10 aru    05/30/19 Updated the example to use XTtcPs_InterruptHandler().

## Functions
int | TmrInterruptExample (XTtcPs *TtcPsInst, u16 DeviceID, u16 TtcTickIntrID, XScuGic *InterruptController)
| This is the main function of the interrupt example. More...
int | main (void)
| This is the main function that calls the TTC interrupt example. More...

## Function Documentation

int main | ( | void |  | ) |

This is the main function that calls the TTC interrupt example.

Parameters

  None |

Returns
  - XST_SUCCESS to indicate Success
  - XST_FAILURE to indicate a Failure.

Note
  None.

References TmrInterruptExample().

int TmrInterruptExample | ( | XTtcPs * | TtcPsInst,
|  | u16 | DeviceID,
|  | u16 | TtcTickIntrID,
|  | XScuGic * | InterruptController
| ) |  |

This is the main function of the interrupt example.

Parameters

  TtcPsInst | is a pointer to the ttc instance.
  DeviceID | is the unique ID for the device.
  TtcTickIntrID | is the unique interrupt ID for the timer.
  InterruptController | is a pointer to the interrupt controller instance..

Returns
  XST_SUCCESS to indicate success, else XST_FAILURE to indicate a Failure.

References XTtcPs_Stop.

Referenced by main().