The following figure shows example code to show how an HDMI 2.1 TX Subsystem can be used in your application.
To integrate and use the HDMI 2.1 TX Subsystem driver in your application, the following steps must be followed:
- Include the subsystem header file xv_hdmitxss1.h that defines the subsystem object.
- Declare and allocate space for the subsystem instance in your application code.
- In the subsystem driver instance, there is a metadata structure to store the subsystem hardware configuration.
- For each subsystem instance, the data structures declared in the
previous two steps need to be initialized based on its hardware configuration, which
is passed through metadata structure from xparameters.h uniquely identified by device ID.
To initialize the subsystem, call the following two API functions:
XV_HdmiTxSs1_Config* XV_HdmiTxSs1_LookupConfig(u32 DeviceId); int XV_HdmiTxSs1_CfgInitialize(XV_HdmiTxSs1 *InstancePtr, XV_HdmiTxSs1_Config *CfgPtr, u32 EffectiveAddr);
The Device ID can be found in xparameters.h:
XPAR_[HDMI 2.1 TX Subsystem Instance Name in IPI]_DEVICE_ID
- Each interrupt source has an associated ISR defined in the subsystem. Register the ISR with the system interrupt controller and enable the interrupt.