embeddedsw/XilinxProcessorIPLib/drivers/v_letterbox/src/xv_letterbox_sinit.c
Rohit Consul 6eb74b2a31 v_letterbox: Updated driver to align with hip flow
This patch supports HIP based video processing subsystem by reorganizing
the HLS generated code to align with xilinx driver guidelines.

Signed-off-by: Rohit Consul <rohit.consul@xilinx.com>
Reviewed-by: Andrei Simion <andreis@xilinx.com>
2015-07-23 11:01:00 +05:30

51 lines
1.4 KiB
C

// ==============================================================
// File generated by Vivado(TM) HLS - High-Level Synthesis from C, C++ and SystemC
// Version: 2015.1
// Copyright (C) 2015 Xilinx Inc. All rights reserved.
//
// ==============================================================
#ifndef __linux__
#include "xstatus.h"
#include "xparameters.h"
#include "xv_letterbox.h"
#ifndef XPAR_XV_LETTERBOX_NUM_INSTANCES
#define XPAR_XV_LETTERBOX_NUM_INSTANCES 0
#endif
extern XV_letterbox_Config XV_letterbox_ConfigTable[];
XV_letterbox_Config *XV_letterbox_LookupConfig(u16 DeviceId) {
XV_letterbox_Config *ConfigPtr = NULL;
int Index;
for (Index = 0; Index < XPAR_XV_LETTERBOX_NUM_INSTANCES; Index++) {
if (XV_letterbox_ConfigTable[Index].DeviceId == DeviceId) {
ConfigPtr = &XV_letterbox_ConfigTable[Index];
break;
}
}
return ConfigPtr;
}
int XV_letterbox_Initialize(XV_letterbox *InstancePtr, u16 DeviceId) {
XV_letterbox_Config *ConfigPtr;
Xil_AssertNonvoid(InstancePtr != NULL);
ConfigPtr = XV_letterbox_LookupConfig(DeviceId);
if (ConfigPtr == NULL) {
InstancePtr->IsReady = 0;
return (XST_DEVICE_NOT_FOUND);
}
return XV_letterbox_CfgInitialize(InstancePtr,
ConfigPtr,
ConfigPtr->BaseAddress);
}
#endif