scugic: xscugic_low_level_example.c File Reference

| scugic Xilinx SDK Drivers API Documentation

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

Functions
xscugic_low_level_example.c File Reference

## Overview

This file contains a design example using the low level driver, interface of the Interrupt Controller driver.

This example shows the use of the Interrupt Controller with the ARM processor.

Note

none

    MODIFICATION HISTORY:

    Ver   Who  Date     Changes

    1.00a drg  01/30/10 First release
    3.10  mus  09/19/18 Update prototype of LowInterruptHandler to fix the GCC
                        warning
    4.0   mus  01/28/19  Updated to support Cortexa72 GIC (GIC500).

## Functions
void | SetupInterruptSystem (void)
| This function connects the interrupt handler of the interrupt controller to the processor. More...
void | LowInterruptHandler (u32 CallbackRef)
| This function is designed to look like an interrupt handler in a device driver. More...
int | main (void)
| This is the main function for the Interrupt Controller Low Level example. More...

## Function Documentation

void LowInterruptHandler | ( | u32 | CallbackRef | ) |

This function is designed to look like an interrupt handler in a device driver.

This is typically a 2nd level handler that is called from the interrupt controller interrupt handler. This handler would typically perform device specific processing such as reading and writing the registers of the device to clear the interrupt condition and pass any data to an application using the device driver.

Parameters

  CallbackRef | is passed back to the device driver's interrupt handler by the XScuGic driver. It was given to the XScuGic driver in the XScuGic_Connect() function call. It is typically a pointer to the device driver instance variable if using the Xilinx Level 1 device drivers. In this example, we are passing it as scugic cpu interface base address to access ack and EOI registers.

Returns
  None.

Note
  None.

References XSCUGIC_ACK_INTID_MASK, XSCUGIC_EOI_OFFSET, XSCUGIC_INT_ACK_OFFSET, XScuGic_ReadReg, and XScuGic_WriteReg.

Referenced by SetupInterruptSystem().

int main | ( | void |  | ) |

This is the main function for the Interrupt Controller Low Level example.

Parameters

  None. |

Returns
  XST_SUCCESS to indicate success, otherwise XST_FAILURE.

Note
  None.

void SetupInterruptSystem | ( | void |  | ) |

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

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

Parameters

  None. |

Returns
  None.

Note
  None.

References LowInterruptHandler().