| dmaps Vitis Drivers API Documentation

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

Functions
xdmaps_example_w_intr.c File Reference

## Overview

    MODIFICATION HISTORY:

    Ver   Who       Date     Changes

    1.00    hbm    08/19/2010 First Release
    1.01a nm     03/05/2012 Initializing DmaCmd structure compatible to armcc.
                            Modified base address to secure register base
                            address.
    1.02a sg     05/16/2012 Some code cleanup and reorganisation of the
                      functions within the example.
    1.06a kpc    04/24/2012 Modified the APIs to make this file compatible with
                            peripheral test suite.
    2.1   kpc    08/23/2014 Fixed IAR compiler reported error.
    2.3   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.
    2.4   aj     11/07/2023 Add support for system system device tree flow

## Functions
int | XDmaPs_Example_W_Intr (XScuGic *GicPtr, u16 DeviceId)
| Interrupt Example to test the DMA. More...
int | SetupInterruptSystem (XScuGic *GicPtr, XDmaPs *DmaPtr)
| This function connects the interrupt handler of the interrupt controller to the processor. More...
void | DmaDoneHandler (unsigned int Channel, XDmaPs_Cmd *DmaCmd, void *CallbackRef)
| DmaDoneHandler. More...
int | main (void)
| This is the main function for the DmaPs interrupt example. More...

## Function Documentation

void DmaDoneHandler | ( | unsigned int | Channel,
|  | XDmaPs_Cmd * | DmaCmd,
|  | void * | CallbackRef
| ) |  |

DmaDoneHandler.

Parameters

  Channel | is the Channel number.
  DmaCmd | is the Dma Command.
  CallbackRef | is the callback reference data.

Returns
  None.

Note
  None.

References XDmaPs_Cmd::BD, XDmaPs_BD::DstAddr, and XDmaPs_BD::SrcAddr.

Referenced by XDmaPs_Example_W_Intr().

int main | ( | void |  | ) |

This is the main function for the DmaPs interrupt example.

Parameters

  None. |

Returns
  XST_SUCCESS to indicate success, otherwise XST_FAILURE.

Note
  None.

References XDmaPs_Example_W_Intr().

int SetupInterruptSystem | ( | XScuGic * | GicPtr,
|  | XDmaPs * | DmaPtr
| ) |  |

This function connects the interrupt handler of the interrupt controller to the processor.

This function is seperate to allow it to be customized for each application. Each processor or RTOS may require unique processing to connect the interrupt handler.

Parameters

  GicPtr | is the GIC instance pointer.
  DmaPtr | is the DMA instance pointer.

Returns
  None.

Note
  None.

References XDmaPs_DoneISR_0(), XDmaPs_DoneISR_1(), XDmaPs_DoneISR_2(), XDmaPs_DoneISR_3(), XDmaPs_DoneISR_4(), XDmaPs_DoneISR_5(), XDmaPs_DoneISR_6(), XDmaPs_DoneISR_7(), and XDmaPs_FaultISR().

Referenced by XDmaPs_Example_W_Intr().

int XDmaPs_Example_W_Intr | ( | XScuGic * | GicPtr,
|  | u16 | DeviceId
| ) |  |

Interrupt Example to test the DMA.

Parameters

  DeviceId | is the Device ID of the DMA controller.

Returns
  XST_SUCCESS to indicate success, otherwise XST_FAILURE.

Note
  None.

References XDmaPs_Cmd::BD, XDmaPs_Cmd::ChanCtrl, XDmaPs::Config, DmaDoneHandler(), XDmaPs_BD::DstAddr, XDmaPs_ChanCtrl::DstBurstLen, XDmaPs_ChanCtrl::DstBurstSize, XDmaPs_ChanCtrl::DstInc, XDmaPs_BD::Length, SetupInterruptSystem(), XDmaPs_BD::SrcAddr, XDmaPs_ChanCtrl::SrcBurstLen, XDmaPs_ChanCtrl::SrcBurstSize, XDmaPs_ChanCtrl::SrcInc, XDmaPs_CfgInitialize(), XDmaPs_DoneISR_0(), XDmaPs_DoneISR_1(), XDmaPs_DoneISR_2(), XDmaPs_DoneISR_3(), XDmaPs_DoneISR_4(), XDmaPs_DoneISR_5(), XDmaPs_DoneISR_6(), XDmaPs_DoneISR_7(), XDmaPs_FaultISR(), XDmaPs_LookupConfig(), XDmaPs_SetDoneHandler(), and XDmaPs_Start().

Referenced by main().