v_mix
Vitis Drivers API Documentation
xv_mix_example.c File Reference

Macros

#define XVMonitor_IsVideoLocked(GpioPtr)   (XGpio_DiscreteRead(GpioPtr, 1))
 This macro reads GPIO to check video lock status. More...
 

Functions

void resetIp (void)
 Resets the HLS IP and optionally stops all Frame Buffer Read instances. More...
 
int main (void)
 Main entry point for the Mixer Example Design Test. More...
 

Macro Definition Documentation

#define XVMonitor_IsVideoLocked (   GpioPtr)    (XGpio_DiscreteRead(GpioPtr, 1))

This macro reads GPIO to check video lock status.

Parameters
GpioPtris pointer to the gpio Instance
Returns
T/F

Referenced by main().

Function Documentation

int main ( void  )

Main entry point for the Mixer Example Design Test.

This function initializes the platform, configures the video mixer and its associated components, and runs a series of tests for different video modes. It performs the following:

  • Initializes hardware and drivers.
  • Sets up interrupts and exception handling.
  • Iterates through a set of predefined video modes, configuring the video stream, video timing, and frame buffers for each mode.
  • Configures the mixer, test pattern generator, and video timing controller.
  • Waits for video output lock and runs feature tests for each mode.
  • Reports the number of failed tests and returns the appropriate status.
Returns
XST_SUCCESS on success, or 1 if initialization or test setup fails.

References XV_mix::Config, init_platform(), XV_Mix_l2::Mix, XV_mix_Config::NumLayers, resetIp(), XVMix_GetLayerColorFormat(), XVMix_IsLayerInterfaceStream, and XVMonitor_IsVideoLocked.

void resetIp ( void  )

Resets the HLS IP and optionally stops all Frame Buffer Read instances.

This function performs the following actions:

  • If the XVFrmbufRd driver is present (determined by XPAR_XV_FRMBUFRD_NUM_INSTANCES), it stops all Frame Buffer Read instances and waits for them to become idle.
  • Prints a message indicating that the HLS IP is being reset.
  • Asserts the reset signal to the HLS IP via the gpio_hlsIpReset pointer, holds the reset for a short period, and then releases it.
  • Waits briefly after releasing the reset to ensure proper initialization.

This function is typically used to ensure that the HLS IP and associated frame buffer readers are properly reset before starting or reconfiguring video processing operations.

Referenced by main().