iomodule
Vitis Drivers API Documentation
 All Data Structures Files Functions Variables Typedefs Macros Groups Pages
xiomodule_intr_setup_example.c File Reference

Overview

This file contains a design example using the IO Module driver (XIOModule) and hardware device using interrupt mode.This example tests the internal interrupts in the IO Module.

This file can be used as a standalone example or by the TestAppGen utility to include a test of IOModule interrupts.

Note

None

MODIFICATION HISTORY:
Ver   Who  Date     Changes


2.19 ml 05/21/25 First release

#include "xparameters.h"
#include "xstatus.h"
#include "xiomodule.h"
#include "xil_exception.h"
#include "xil_printf.h"

Macros

#define IOMODULE_DEVICE_ID   XPAR_IOMODULE_0_BASEADDR
 Device base address for SDT build. More...
 

Functions

XStatus IOModuleInterruptSetup (XIOModule *IOModuleInstancePtr, u32 DeviceId)
 This function is used by the TestAppGen generated application to setup the IO Module interrupts. More...
 
int main (void)
 This is the main function for the IO Module example. More...
 

Macro Definition Documentation

#define IOMODULE_DEVICE_ID   XPAR_IOMODULE_0_BASEADDR

Device base address for SDT build.

Referenced by main().

Function Documentation

XStatus IOModuleInterruptSetup ( XIOModule *  IOModuleInstancePtr,
u32  DeviceId 
)

This function is used by the TestAppGen generated application to setup the IO Module interrupts.

Parameters
[in]IOModuleInstancePtris the reference to the IO Module instance.
[in]DeviceIdis device ID of the IO Module Device , typically XPAR_<IOMODULE_instance>_DEVICE_ID value from xparameters.h
Returns
XST_SUCCESS to indicate success, otherwise XST_FAILURE

References IOModuleSetupIntrSystem(), XIOModule_Initialize(), XIOModule_SelfTest(), and XIOModule_Start().

Referenced by main().

int main ( void  )

This is the main function for the IO Module example.

This function is not included if the example is generated from the TestAppGen test tool.

Returns
XST_SUCCESS to indicate success, otherwise XST_FAILURE.

References IOMODULE_DEVICE_ID, and IOModuleInterruptSetup().