Changed the file format from PC to UNIX
This commit is contained in:
parent
bacc86609f
commit
7a7303eaaf
33 changed files with 6185 additions and 6185 deletions
|
@ -1,43 +1,43 @@
|
|||
##############################################################################
|
||||
#
|
||||
# Copyright (C) 2001 - 2014 Xilinx, Inc. All rights reserved.
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"),to deal
|
||||
# in the Software without restriction, including without limitation the rights
|
||||
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
# copies of the Software, and to permit persons to whom the Software is
|
||||
# furnished to do so, subject to the following conditions:
|
||||
#
|
||||
# The above copyright notice and this permission notice shall be included in
|
||||
# all copies or substantial portions of the Software.
|
||||
#
|
||||
# Use of the Software is limited solely to applications:
|
||||
# (a) running on a Xilinx device, or
|
||||
# (b) that interact with a Xilinx device through a bus or interconnect.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
# XILINX BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
|
||||
# OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
# SOFTWARE.
|
||||
#
|
||||
# Except as contained in this notice, the name of the Xilinx shall not be used
|
||||
# in advertising or otherwise to promote the sale, use or other dealings in
|
||||
# this Software without prior written authorization from Xilinx.
|
||||
###############################################################################
|
||||
OPTION psf_version = 2.1;
|
||||
|
||||
BEGIN driver cfa
|
||||
|
||||
OPTION supported_peripherals = (v_cfa);
|
||||
OPTION driver_state = ACTIVE;
|
||||
OPTION copyfiles = all;
|
||||
OPTION VERSION = 7.0;
|
||||
OPTION NAME = cfa;
|
||||
|
||||
END driver
|
||||
|
||||
|
||||
##############################################################################
|
||||
#
|
||||
# Copyright (C) 2001 - 2014 Xilinx, Inc. All rights reserved.
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"),to deal
|
||||
# in the Software without restriction, including without limitation the rights
|
||||
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
# copies of the Software, and to permit persons to whom the Software is
|
||||
# furnished to do so, subject to the following conditions:
|
||||
#
|
||||
# The above copyright notice and this permission notice shall be included in
|
||||
# all copies or substantial portions of the Software.
|
||||
#
|
||||
# Use of the Software is limited solely to applications:
|
||||
# (a) running on a Xilinx device, or
|
||||
# (b) that interact with a Xilinx device through a bus or interconnect.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
# XILINX BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
|
||||
# OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
# SOFTWARE.
|
||||
#
|
||||
# Except as contained in this notice, the name of the Xilinx shall not be used
|
||||
# in advertising or otherwise to promote the sale, use or other dealings in
|
||||
# this Software without prior written authorization from Xilinx.
|
||||
###############################################################################
|
||||
OPTION psf_version = 2.1;
|
||||
|
||||
BEGIN driver cfa
|
||||
|
||||
OPTION supported_peripherals = (v_cfa);
|
||||
OPTION driver_state = ACTIVE;
|
||||
OPTION copyfiles = all;
|
||||
OPTION VERSION = 7.0;
|
||||
OPTION NAME = cfa;
|
||||
|
||||
END driver
|
||||
|
||||
|
||||
|
|
|
@ -1,33 +1,33 @@
|
|||
##############################################################################
|
||||
#
|
||||
# Copyright (C) 2001 - 2014 Xilinx, Inc. All rights reserved.
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"),to deal
|
||||
# in the Software without restriction, including without limitation the rights
|
||||
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
# copies of the Software, and to permit persons to whom the Software is
|
||||
# furnished to do so, subject to the following conditions:
|
||||
#
|
||||
# The above copyright notice and this permission notice shall be included in
|
||||
# all copies or substantial portions of the Software.
|
||||
#
|
||||
# Use of the Software is limited solely to applications:
|
||||
# (a) running on a Xilinx device, or
|
||||
# (b) that interact with a Xilinx device through a bus or interconnect.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
# XILINX BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
|
||||
# OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
# SOFTWARE.
|
||||
#
|
||||
# Except as contained in this notice, the name of the Xilinx shall not be used
|
||||
# in advertising or otherwise to promote the sale, use or other dealings in
|
||||
# this Software without prior written authorization from Xilinx.
|
||||
#
|
||||
##############################################################################
|
||||
#
|
||||
# Copyright (C) 2001 - 2014 Xilinx, Inc. All rights reserved.
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"),to deal
|
||||
# in the Software without restriction, including without limitation the rights
|
||||
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
# copies of the Software, and to permit persons to whom the Software is
|
||||
# furnished to do so, subject to the following conditions:
|
||||
#
|
||||
# The above copyright notice and this permission notice shall be included in
|
||||
# all copies or substantial portions of the Software.
|
||||
#
|
||||
# Use of the Software is limited solely to applications:
|
||||
# (a) running on a Xilinx device, or
|
||||
# (b) that interact with a Xilinx device through a bus or interconnect.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
# XILINX BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
|
||||
# OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
# SOFTWARE.
|
||||
#
|
||||
# Except as contained in this notice, the name of the Xilinx shall not be used
|
||||
# in advertising or otherwise to promote the sale, use or other dealings in
|
||||
# this Software without prior written authorization from Xilinx.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
proc generate {drv_handle} {
|
||||
|
|
|
@ -1,18 +1,18 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Language" content="en-us">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>Driver example applications</title>
|
||||
<link rel="stylesheet" type="text/css" href="../help.css">
|
||||
</head>
|
||||
<body bgcolor="#FFFFFF">
|
||||
<h1> Example Applications for the driver cfa_v7_0 </h1>
|
||||
<HR>
|
||||
<ul>
|
||||
<li>cfa_selftest_example.c <a href="cfa_selftest_example.c">(source)</a> </li>
|
||||
</ul>
|
||||
<p><font face="Times New Roman" color="#800000">Copyright ? 1995-2014 Xilinx, Inc. All rights reserved.</font></p>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Language" content="en-us">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>Driver example applications</title>
|
||||
<link rel="stylesheet" type="text/css" href="../help.css">
|
||||
</head>
|
||||
<body bgcolor="#FFFFFF">
|
||||
<h1> Example Applications for the driver cfa_v7_0 </h1>
|
||||
<HR>
|
||||
<ul>
|
||||
<li>cfa_selftest_example.c <a href="cfa_selftest_example.c">(source)</a> </li>
|
||||
</ul>
|
||||
<p><font face="Times New Roman" color="#800000">Copyright ? 1995-2014 Xilinx, Inc. All rights reserved.</font></p>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
|
|
@ -63,8 +63,8 @@
|
|||
* Ver Who Date Changes
|
||||
* ----- ---- -------- -------------------------------------------------------
|
||||
* 1.00a wsy 01/10/10 First release
|
||||
* 2.1 srt 07/15/14 Add support for Ronaldo GEM specification and 64-bit
|
||||
* changes.
|
||||
* 2.1 srt 07/15/14 Add support for Zynq Ultrascale MP GEM specification
|
||||
* and 64-bit changes.
|
||||
* 3.0 kvn 02/13/15 Modified code for MISRA-C:2012 compliance.
|
||||
* 3.0 hk 02/20/15 Added support for jumbo frames.
|
||||
* Disable extended mode. Perform all 64 bit changes under
|
||||
|
|
|
@ -1,43 +1,43 @@
|
|||
##############################################################################
|
||||
#
|
||||
# Copyright (C) 2009 - 2014 Xilinx, Inc. All rights reserved.
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"),to deal
|
||||
# in the Software without restriction, including without limitation the rights
|
||||
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
# copies of the Software, and to permit persons to whom the Software is
|
||||
# furnished to do so, subject to the following conditions:
|
||||
#
|
||||
# The above copyright notice and this permission notice shall be included in
|
||||
# all copies or substantial portions of the Software.
|
||||
#
|
||||
# Use of the Software is limited solely to applications:
|
||||
# (a) running on a Xilinx device, or
|
||||
# (b) that interact with a Xilinx device through a bus or interconnect.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
# XILINX BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
|
||||
# OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
# SOFTWARE.
|
||||
#
|
||||
# Except as contained in this notice, the name of the Xilinx shall not be used
|
||||
# in advertising or otherwise to promote the sale, use or other dealings in
|
||||
# this Software without prior written authorization from Xilinx.
|
||||
###############################################################################
|
||||
OPTION psf_version = 2.1;
|
||||
|
||||
BEGIN driver enhance
|
||||
|
||||
OPTION supported_peripherals = (v_enhance_v[8]_[0-9]);
|
||||
OPTION driver_state = ACTIVE;
|
||||
OPTION copyfiles = all;
|
||||
OPTION VERSION = 7.0;
|
||||
OPTION NAME = enhance;
|
||||
|
||||
END driver
|
||||
|
||||
|
||||
##############################################################################
|
||||
#
|
||||
# Copyright (C) 2009 - 2014 Xilinx, Inc. All rights reserved.
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"),to deal
|
||||
# in the Software without restriction, including without limitation the rights
|
||||
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
# copies of the Software, and to permit persons to whom the Software is
|
||||
# furnished to do so, subject to the following conditions:
|
||||
#
|
||||
# The above copyright notice and this permission notice shall be included in
|
||||
# all copies or substantial portions of the Software.
|
||||
#
|
||||
# Use of the Software is limited solely to applications:
|
||||
# (a) running on a Xilinx device, or
|
||||
# (b) that interact with a Xilinx device through a bus or interconnect.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
# XILINX BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
|
||||
# OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
# SOFTWARE.
|
||||
#
|
||||
# Except as contained in this notice, the name of the Xilinx shall not be used
|
||||
# in advertising or otherwise to promote the sale, use or other dealings in
|
||||
# this Software without prior written authorization from Xilinx.
|
||||
###############################################################################
|
||||
OPTION psf_version = 2.1;
|
||||
|
||||
BEGIN driver enhance
|
||||
|
||||
OPTION supported_peripherals = (v_enhance_v[8]_[0-9]);
|
||||
OPTION driver_state = ACTIVE;
|
||||
OPTION copyfiles = all;
|
||||
OPTION VERSION = 7.0;
|
||||
OPTION NAME = enhance;
|
||||
|
||||
END driver
|
||||
|
||||
|
||||
|
|
|
@ -1,32 +1,32 @@
|
|||
##############################################################################
|
||||
#
|
||||
# Copyright (C) 2009 - 2014 Xilinx, Inc. All rights reserved.
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"),to deal
|
||||
# in the Software without restriction, including without limitation the rights
|
||||
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
# copies of the Software, and to permit persons to whom the Software is
|
||||
# furnished to do so, subject to the following conditions:
|
||||
#
|
||||
# The above copyright notice and this permission notice shall be included in
|
||||
# all copies or substantial portions of the Software.
|
||||
#
|
||||
# Use of the Software is limited solely to applications:
|
||||
# (a) running on a Xilinx device, or
|
||||
# (b) that interact with a Xilinx device through a bus or interconnect.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
# XILINX BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
|
||||
# OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
# SOFTWARE.
|
||||
#
|
||||
# Except as contained in this notice, the name of the Xilinx shall not be used
|
||||
# in advertising or otherwise to promote the sale, use or other dealings in
|
||||
# this Software without prior written authorization from Xilinx.
|
||||
##############################################################################
|
||||
#
|
||||
# Copyright (C) 2009 - 2014 Xilinx, Inc. All rights reserved.
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"),to deal
|
||||
# in the Software without restriction, including without limitation the rights
|
||||
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
# copies of the Software, and to permit persons to whom the Software is
|
||||
# furnished to do so, subject to the following conditions:
|
||||
#
|
||||
# The above copyright notice and this permission notice shall be included in
|
||||
# all copies or substantial portions of the Software.
|
||||
#
|
||||
# Use of the Software is limited solely to applications:
|
||||
# (a) running on a Xilinx device, or
|
||||
# (b) that interact with a Xilinx device through a bus or interconnect.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
# XILINX BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
|
||||
# OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
# SOFTWARE.
|
||||
#
|
||||
# Except as contained in this notice, the name of the Xilinx shall not be used
|
||||
# in advertising or otherwise to promote the sale, use or other dealings in
|
||||
# this Software without prior written authorization from Xilinx.
|
||||
###############################################################################
|
||||
|
||||
proc generate {drv_handle} {
|
||||
|
|
|
@ -1,161 +1,161 @@
|
|||
/******************************************************************************
|
||||
*
|
||||
* (c) Copyright 2010-14 Xilinx, Inc. All rights reserved.
|
||||
*
|
||||
* This file contains confidential and proprietary information of Xilinx, Inc.
|
||||
* and is protected under U.S. and international copyright and other
|
||||
* intellectual property laws.
|
||||
*
|
||||
* DISCLAIMER
|
||||
* This disclaimer is not a license and does not grant any rights to the
|
||||
* materials distributed herewith. Except as otherwise provided in a valid
|
||||
* license issued to you by Xilinx, and to the maximum extent permitted by
|
||||
* applicable law: (1) THESE MATERIALS ARE MADE AVAILABLE "AS IS" AND WITH ALL
|
||||
* FAULTS, AND XILINX HEREBY DISCLAIMS ALL WARRANTIES AND CONDITIONS, EXPRESS,
|
||||
* IMPLIED, OR STATUTORY, INCLUDING BUT NOT LIMITED TO WARRANTIES OF
|
||||
* MERCHANTABILITY, NON-INFRINGEMENT, OR FITNESS FOR ANY PARTICULAR PURPOSE
|
||||
* and (2) Xilinx shall not be liable (whether in contract or tort, including
|
||||
* negligence, or under any other theory of liability) for any loss or damage
|
||||
* of any kind or nature related to, arising under or in connection with these
|
||||
* materials, including for any direct, or any indirect, special, incidental,
|
||||
* or consequential loss or damage (including loss of data, profits, goodwill,
|
||||
* or any type of loss or damage suffered as a result of any action brought by
|
||||
* a third party) even if such damage or loss was reasonably foreseeable or
|
||||
* Xilinx had been advised of the possibility of the same.
|
||||
*
|
||||
* CRITICAL APPLICATIONS
|
||||
* Xilinx products are not designed or intended to be fail-safe, or for use in
|
||||
* any application requiring fail-safe performance, such as life-support or
|
||||
* safety devices or systems, Class III medical devices, nuclear facilities,
|
||||
* applications related to the deployment of airbags, or any other applications
|
||||
* that could lead to death, personal injury, or severe property or
|
||||
* environmental damage (individually and collectively, "Critical
|
||||
* Applications"). Customer assumes the sole risk and liability of any use of
|
||||
* Xilinx products in Critical Applications, subject only to applicable laws
|
||||
* and regulations governing limitations on product liability.
|
||||
*
|
||||
* THIS COPYRIGHT NOTICE AND DISCLAIMER MUST BE RETAINED AS PART OF THIS FILE
|
||||
* AT ALL TIMES.
|
||||
*
|
||||
******************************************************************************/
|
||||
/*****************************************************************************/
|
||||
/**
|
||||
*
|
||||
* @file enhance_selftest_example.c
|
||||
*
|
||||
* This file contains an example using the XEnhance driver to do self test
|
||||
* on the device.
|
||||
*
|
||||
* <pre>
|
||||
* MODIFICATION HISTORY:
|
||||
*
|
||||
* Ver Who Date Changes
|
||||
* ----- ------ -------- -----------------------------------------------
|
||||
* 1.00a drg/jz 01/13/10 First Release
|
||||
* 1.03a sg 08/14/12 Updated the example for CR 666306. Modified
|
||||
* the device ID to use the first Device Id
|
||||
* Removed the printf at the start of the main
|
||||
* 7.0 adk 02/19/14 Modified function names as per guidelines
|
||||
* </pre>
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
/***************************** Include Files *********************************/
|
||||
|
||||
#include "xenhance.h"
|
||||
#include "xparameters.h"
|
||||
#include "xil_printf.h"
|
||||
|
||||
/************************** Constant Definitions *****************************/
|
||||
/*
|
||||
* The following constants map to the XPAR parameters created in the
|
||||
* xparameters.h file. They are defined here such that a user can easily
|
||||
* change all the needed parameters in one place.
|
||||
*/
|
||||
/**************************** Type Definitions *******************************/
|
||||
|
||||
|
||||
/***************** Macros (Inline Functions) Definitions *********************/
|
||||
|
||||
|
||||
/************************** Function Prototypes ******************************/
|
||||
|
||||
u32 XEnhanceSelfTestExample(u16 DeviceId);
|
||||
|
||||
/************************** Variable Definitions *****************************/
|
||||
|
||||
XEnhance InstancePtr; /**< Instance of the Enhance Device */
|
||||
|
||||
/*****************************************************************************/
|
||||
/**
|
||||
*
|
||||
* Main function to call the example.
|
||||
*
|
||||
* @return XST_SUCCESS if successful, otherwise XST_FAILURE.
|
||||
*
|
||||
* @note None.
|
||||
*
|
||||
******************************************************************************/
|
||||
int main(void)
|
||||
{
|
||||
u32 Status;
|
||||
|
||||
/*
|
||||
* Run the selftest example
|
||||
*/
|
||||
Status = XEnhanceSelfTestExample((u16)XPAR_ENHANCE_0_DEVICE_ID);
|
||||
if (Status != XST_SUCCESS) {
|
||||
xil_printf("ENHANCE Selftest Example Failed\r\n");
|
||||
return XST_FAILURE;
|
||||
}
|
||||
|
||||
xil_printf("Successfully ran ENHANCE Selftest Example\r\n");
|
||||
|
||||
return XST_SUCCESS;
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/**
|
||||
*
|
||||
* This function does a minimal test on the XEnhance driver.
|
||||
*
|
||||
*
|
||||
* @param DeviceId is the XPAR_<ENHANCE_instance>_DEVICE_ID value from
|
||||
* xparameters.h.
|
||||
*
|
||||
* @return XST_SUCCESS if successful, otherwise XST_FAILURE.
|
||||
*
|
||||
* @note None.
|
||||
*
|
||||
******************************************************************************/
|
||||
u32 XEnhanceSelfTestExample(u16 DeviceId)
|
||||
{
|
||||
u32 Status;
|
||||
XEnhance_Config *Config;
|
||||
|
||||
/*
|
||||
* Initialize the ENHANCE driver so that it's ready to use
|
||||
* Look up the configuration in the config table,
|
||||
* then initialize it.
|
||||
*/
|
||||
Config = XEnhance_LookupConfig(DeviceId);
|
||||
if (NULL == Config) {
|
||||
return XST_FAILURE;
|
||||
}
|
||||
|
||||
Status = XEnhance_CfgInitialize(&InstancePtr, Config,
|
||||
Config->BaseAddress);
|
||||
if (Status != (u32)XST_SUCCESS) {
|
||||
return (u32)XST_FAILURE;
|
||||
}
|
||||
|
||||
/*
|
||||
* Perform a self-test to check hardware build.
|
||||
*/
|
||||
Status = XEnhance_SelfTest(&InstancePtr);
|
||||
if (Status != (u32)XST_SUCCESS) {
|
||||
return (u32)XST_FAILURE;
|
||||
}
|
||||
|
||||
return XST_SUCCESS;
|
||||
}
|
||||
/******************************************************************************
|
||||
*
|
||||
* (c) Copyright 2010-14 Xilinx, Inc. All rights reserved.
|
||||
*
|
||||
* This file contains confidential and proprietary information of Xilinx, Inc.
|
||||
* and is protected under U.S. and international copyright and other
|
||||
* intellectual property laws.
|
||||
*
|
||||
* DISCLAIMER
|
||||
* This disclaimer is not a license and does not grant any rights to the
|
||||
* materials distributed herewith. Except as otherwise provided in a valid
|
||||
* license issued to you by Xilinx, and to the maximum extent permitted by
|
||||
* applicable law: (1) THESE MATERIALS ARE MADE AVAILABLE "AS IS" AND WITH ALL
|
||||
* FAULTS, AND XILINX HEREBY DISCLAIMS ALL WARRANTIES AND CONDITIONS, EXPRESS,
|
||||
* IMPLIED, OR STATUTORY, INCLUDING BUT NOT LIMITED TO WARRANTIES OF
|
||||
* MERCHANTABILITY, NON-INFRINGEMENT, OR FITNESS FOR ANY PARTICULAR PURPOSE
|
||||
* and (2) Xilinx shall not be liable (whether in contract or tort, including
|
||||
* negligence, or under any other theory of liability) for any loss or damage
|
||||
* of any kind or nature related to, arising under or in connection with these
|
||||
* materials, including for any direct, or any indirect, special, incidental,
|
||||
* or consequential loss or damage (including loss of data, profits, goodwill,
|
||||
* or any type of loss or damage suffered as a result of any action brought by
|
||||
* a third party) even if such damage or loss was reasonably foreseeable or
|
||||
* Xilinx had been advised of the possibility of the same.
|
||||
*
|
||||
* CRITICAL APPLICATIONS
|
||||
* Xilinx products are not designed or intended to be fail-safe, or for use in
|
||||
* any application requiring fail-safe performance, such as life-support or
|
||||
* safety devices or systems, Class III medical devices, nuclear facilities,
|
||||
* applications related to the deployment of airbags, or any other applications
|
||||
* that could lead to death, personal injury, or severe property or
|
||||
* environmental damage (individually and collectively, "Critical
|
||||
* Applications"). Customer assumes the sole risk and liability of any use of
|
||||
* Xilinx products in Critical Applications, subject only to applicable laws
|
||||
* and regulations governing limitations on product liability.
|
||||
*
|
||||
* THIS COPYRIGHT NOTICE AND DISCLAIMER MUST BE RETAINED AS PART OF THIS FILE
|
||||
* AT ALL TIMES.
|
||||
*
|
||||
******************************************************************************/
|
||||
/*****************************************************************************/
|
||||
/**
|
||||
*
|
||||
* @file enhance_selftest_example.c
|
||||
*
|
||||
* This file contains an example using the XEnhance driver to do self test
|
||||
* on the device.
|
||||
*
|
||||
* <pre>
|
||||
* MODIFICATION HISTORY:
|
||||
*
|
||||
* Ver Who Date Changes
|
||||
* ----- ------ -------- -----------------------------------------------
|
||||
* 1.00a drg/jz 01/13/10 First Release
|
||||
* 1.03a sg 08/14/12 Updated the example for CR 666306. Modified
|
||||
* the device ID to use the first Device Id
|
||||
* Removed the printf at the start of the main
|
||||
* 7.0 adk 02/19/14 Modified function names as per guidelines
|
||||
* </pre>
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
/***************************** Include Files *********************************/
|
||||
|
||||
#include "xenhance.h"
|
||||
#include "xparameters.h"
|
||||
#include "xil_printf.h"
|
||||
|
||||
/************************** Constant Definitions *****************************/
|
||||
/*
|
||||
* The following constants map to the XPAR parameters created in the
|
||||
* xparameters.h file. They are defined here such that a user can easily
|
||||
* change all the needed parameters in one place.
|
||||
*/
|
||||
/**************************** Type Definitions *******************************/
|
||||
|
||||
|
||||
/***************** Macros (Inline Functions) Definitions *********************/
|
||||
|
||||
|
||||
/************************** Function Prototypes ******************************/
|
||||
|
||||
u32 XEnhanceSelfTestExample(u16 DeviceId);
|
||||
|
||||
/************************** Variable Definitions *****************************/
|
||||
|
||||
XEnhance InstancePtr; /**< Instance of the Enhance Device */
|
||||
|
||||
/*****************************************************************************/
|
||||
/**
|
||||
*
|
||||
* Main function to call the example.
|
||||
*
|
||||
* @return XST_SUCCESS if successful, otherwise XST_FAILURE.
|
||||
*
|
||||
* @note None.
|
||||
*
|
||||
******************************************************************************/
|
||||
int main(void)
|
||||
{
|
||||
u32 Status;
|
||||
|
||||
/*
|
||||
* Run the selftest example
|
||||
*/
|
||||
Status = XEnhanceSelfTestExample((u16)XPAR_ENHANCE_0_DEVICE_ID);
|
||||
if (Status != XST_SUCCESS) {
|
||||
xil_printf("ENHANCE Selftest Example Failed\r\n");
|
||||
return XST_FAILURE;
|
||||
}
|
||||
|
||||
xil_printf("Successfully ran ENHANCE Selftest Example\r\n");
|
||||
|
||||
return XST_SUCCESS;
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/**
|
||||
*
|
||||
* This function does a minimal test on the XEnhance driver.
|
||||
*
|
||||
*
|
||||
* @param DeviceId is the XPAR_<ENHANCE_instance>_DEVICE_ID value from
|
||||
* xparameters.h.
|
||||
*
|
||||
* @return XST_SUCCESS if successful, otherwise XST_FAILURE.
|
||||
*
|
||||
* @note None.
|
||||
*
|
||||
******************************************************************************/
|
||||
u32 XEnhanceSelfTestExample(u16 DeviceId)
|
||||
{
|
||||
u32 Status;
|
||||
XEnhance_Config *Config;
|
||||
|
||||
/*
|
||||
* Initialize the ENHANCE driver so that it's ready to use
|
||||
* Look up the configuration in the config table,
|
||||
* then initialize it.
|
||||
*/
|
||||
Config = XEnhance_LookupConfig(DeviceId);
|
||||
if (NULL == Config) {
|
||||
return XST_FAILURE;
|
||||
}
|
||||
|
||||
Status = XEnhance_CfgInitialize(&InstancePtr, Config,
|
||||
Config->BaseAddress);
|
||||
if (Status != (u32)XST_SUCCESS) {
|
||||
return (u32)XST_FAILURE;
|
||||
}
|
||||
|
||||
/*
|
||||
* Perform a self-test to check hardware build.
|
||||
*/
|
||||
Status = XEnhance_SelfTest(&InstancePtr);
|
||||
if (Status != (u32)XST_SUCCESS) {
|
||||
return (u32)XST_FAILURE;
|
||||
}
|
||||
|
||||
return XST_SUCCESS;
|
||||
}
|
||||
|
|
|
@ -1,18 +1,18 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Language" content="en-us">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>Driver example applications</title>
|
||||
<link rel="stylesheet" type="text/css" href="../help.css">
|
||||
</head>
|
||||
<body bgcolor="#FFFFFF">
|
||||
<h1> Example Applications for the driver enhance_v7_0 </h1>
|
||||
<HR>
|
||||
<ul>
|
||||
<li>enhance_selftest_example.c <a href="enhance_selftest_example.c">(source)</a> </li>
|
||||
</ul>
|
||||
<p><font face="Times New Roman" color="#800000">Copyright ? 1995-2014 Xilinx, Inc. All rights reserved.</font></p>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Language" content="en-us">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>Driver example applications</title>
|
||||
<link rel="stylesheet" type="text/css" href="../help.css">
|
||||
</head>
|
||||
<body bgcolor="#FFFFFF">
|
||||
<h1> Example Applications for the driver enhance_v7_0 </h1>
|
||||
<HR>
|
||||
<ul>
|
||||
<li>enhance_selftest_example.c <a href="enhance_selftest_example.c">(source)</a> </li>
|
||||
</ul>
|
||||
<p><font face="Times New Roman" color="#800000">Copyright ? 1995-2014 Xilinx, Inc. All rights reserved.</font></p>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
|
|
@ -1,29 +1,29 @@
|
|||
COMPILER=
|
||||
ARCHIVER=
|
||||
CP=cp
|
||||
COMPILER_FLAGS=
|
||||
EXTRA_COMPILER_FLAGS=
|
||||
LIB=libxil.a
|
||||
LEVEL=0
|
||||
|
||||
RELEASEDIR=../../../lib
|
||||
INCLUDEDIR=../../../include
|
||||
INCLUDES=-I./. -I${INCLUDEDIR}
|
||||
|
||||
INCLUDEFILES=*.h
|
||||
LIBSOURCES=*.c
|
||||
|
||||
OUTS = *.o
|
||||
|
||||
libs:
|
||||
echo "Compiling enhance"
|
||||
$(COMPILER) $(COMPILER_FLAGS) $(EXTRA_COMPILER_FLAGS) $(INCLUDES) $(LIBSOURCES)
|
||||
$(ARCHIVER) -r ${RELEASEDIR}/${LIB} ${OUTS}
|
||||
make clean
|
||||
|
||||
include:
|
||||
${CP} $(INCLUDEFILES) $(INCLUDEDIR)
|
||||
|
||||
clean:
|
||||
rm -rf ${OUTS}
|
||||
|
||||
COMPILER=
|
||||
ARCHIVER=
|
||||
CP=cp
|
||||
COMPILER_FLAGS=
|
||||
EXTRA_COMPILER_FLAGS=
|
||||
LIB=libxil.a
|
||||
LEVEL=0
|
||||
|
||||
RELEASEDIR=../../../lib
|
||||
INCLUDEDIR=../../../include
|
||||
INCLUDES=-I./. -I${INCLUDEDIR}
|
||||
|
||||
INCLUDEFILES=*.h
|
||||
LIBSOURCES=*.c
|
||||
|
||||
OUTS = *.o
|
||||
|
||||
libs:
|
||||
echo "Compiling enhance"
|
||||
$(COMPILER) $(COMPILER_FLAGS) $(EXTRA_COMPILER_FLAGS) $(INCLUDES) $(LIBSOURCES)
|
||||
$(ARCHIVER) -r ${RELEASEDIR}/${LIB} ${OUTS}
|
||||
make clean
|
||||
|
||||
include:
|
||||
${CP} $(INCLUDEFILES) $(INCLUDEDIR)
|
||||
|
||||
clean:
|
||||
rm -rf ${OUTS}
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
@ -1,68 +1,68 @@
|
|||
/******************************************************************************
|
||||
*
|
||||
* Copyright (C) 2010 - 2014 Xilinx, Inc. All rights reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* Use of the Software is limited solely to applications:
|
||||
* (a) running on a Xilinx device, or
|
||||
* (b) that interact with a Xilinx device through a bus or interconnect.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* XILINX BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
|
||||
* OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*
|
||||
* Except as contained in this notice, the name of the Xilinx shall not be used
|
||||
* in advertising or otherwise to promote the sale, use or other dealings in
|
||||
* this Software without prior written authorization from Xilinx.
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
#include "xparameters.h"
|
||||
#include "xenhance.h"
|
||||
|
||||
/*
|
||||
* The configuration table for devices
|
||||
*/
|
||||
|
||||
XEnhance_Config XEnhance_ConfigTable[] =
|
||||
{
|
||||
{
|
||||
XPAR_FMC_SENSOR_INPUT_V_ENHANCE_1_DEVICE_ID,
|
||||
XPAR_FMC_SENSOR_INPUT_V_ENHANCE_1_BASEADDR,
|
||||
XPAR_FMC_SENSOR_INPUT_V_ENHANCE_1_S_AXIS_VIDEO_DATA_WIDTH,
|
||||
XPAR_FMC_SENSOR_INPUT_V_ENHANCE_1_M_AXIS_VIDEO_DATA_WIDTH,
|
||||
XPAR_FMC_SENSOR_INPUT_V_ENHANCE_1_S_AXIS_VIDEO_FORMAT,
|
||||
XPAR_FMC_SENSOR_INPUT_V_ENHANCE_1_M_AXIS_VIDEO_FORMAT,
|
||||
XPAR_FMC_SENSOR_INPUT_V_ENHANCE_1_S_AXIS_VIDEO_TDATA_WIDTH,
|
||||
XPAR_FMC_SENSOR_INPUT_V_ENHANCE_1_M_AXIS_VIDEO_TDATA_WIDTH,
|
||||
XPAR_FMC_SENSOR_INPUT_V_ENHANCE_1_HAS_AXI4_LITE,
|
||||
XPAR_FMC_SENSOR_INPUT_V_ENHANCE_1_HAS_INTC_IF,
|
||||
XPAR_FMC_SENSOR_INPUT_V_ENHANCE_1_HAS_DEBUG,
|
||||
XPAR_FMC_SENSOR_INPUT_V_ENHANCE_1_MAX_COLS,
|
||||
XPAR_FMC_SENSOR_INPUT_V_ENHANCE_1_ACTIVE_COLS,
|
||||
XPAR_FMC_SENSOR_INPUT_V_ENHANCE_1_ACTIVE_ROWS,
|
||||
XPAR_FMC_SENSOR_INPUT_V_ENHANCE_1_HAS_NOISE,
|
||||
XPAR_FMC_SENSOR_INPUT_V_ENHANCE_1_HAS_ENHANCE,
|
||||
XPAR_FMC_SENSOR_INPUT_V_ENHANCE_1_HAS_HALO,
|
||||
XPAR_FMC_SENSOR_INPUT_V_ENHANCE_1_HAS_ALIAS,
|
||||
XPAR_FMC_SENSOR_INPUT_V_ENHANCE_1_OPT_SIZE,
|
||||
XPAR_FMC_SENSOR_INPUT_V_ENHANCE_1_NOISE_THRESHOLD,
|
||||
XPAR_FMC_SENSOR_INPUT_V_ENHANCE_1_ENHANCE_STRENGTH,
|
||||
XPAR_FMC_SENSOR_INPUT_V_ENHANCE_1_HALO_SUPPRESS
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
/******************************************************************************
|
||||
*
|
||||
* Copyright (C) 2010 - 2014 Xilinx, Inc. All rights reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* Use of the Software is limited solely to applications:
|
||||
* (a) running on a Xilinx device, or
|
||||
* (b) that interact with a Xilinx device through a bus or interconnect.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* XILINX BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
|
||||
* OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*
|
||||
* Except as contained in this notice, the name of the Xilinx shall not be used
|
||||
* in advertising or otherwise to promote the sale, use or other dealings in
|
||||
* this Software without prior written authorization from Xilinx.
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
#include "xparameters.h"
|
||||
#include "xenhance.h"
|
||||
|
||||
/*
|
||||
* The configuration table for devices
|
||||
*/
|
||||
|
||||
XEnhance_Config XEnhance_ConfigTable[] =
|
||||
{
|
||||
{
|
||||
XPAR_FMC_SENSOR_INPUT_V_ENHANCE_1_DEVICE_ID,
|
||||
XPAR_FMC_SENSOR_INPUT_V_ENHANCE_1_BASEADDR,
|
||||
XPAR_FMC_SENSOR_INPUT_V_ENHANCE_1_S_AXIS_VIDEO_DATA_WIDTH,
|
||||
XPAR_FMC_SENSOR_INPUT_V_ENHANCE_1_M_AXIS_VIDEO_DATA_WIDTH,
|
||||
XPAR_FMC_SENSOR_INPUT_V_ENHANCE_1_S_AXIS_VIDEO_FORMAT,
|
||||
XPAR_FMC_SENSOR_INPUT_V_ENHANCE_1_M_AXIS_VIDEO_FORMAT,
|
||||
XPAR_FMC_SENSOR_INPUT_V_ENHANCE_1_S_AXIS_VIDEO_TDATA_WIDTH,
|
||||
XPAR_FMC_SENSOR_INPUT_V_ENHANCE_1_M_AXIS_VIDEO_TDATA_WIDTH,
|
||||
XPAR_FMC_SENSOR_INPUT_V_ENHANCE_1_HAS_AXI4_LITE,
|
||||
XPAR_FMC_SENSOR_INPUT_V_ENHANCE_1_HAS_INTC_IF,
|
||||
XPAR_FMC_SENSOR_INPUT_V_ENHANCE_1_HAS_DEBUG,
|
||||
XPAR_FMC_SENSOR_INPUT_V_ENHANCE_1_MAX_COLS,
|
||||
XPAR_FMC_SENSOR_INPUT_V_ENHANCE_1_ACTIVE_COLS,
|
||||
XPAR_FMC_SENSOR_INPUT_V_ENHANCE_1_ACTIVE_ROWS,
|
||||
XPAR_FMC_SENSOR_INPUT_V_ENHANCE_1_HAS_NOISE,
|
||||
XPAR_FMC_SENSOR_INPUT_V_ENHANCE_1_HAS_ENHANCE,
|
||||
XPAR_FMC_SENSOR_INPUT_V_ENHANCE_1_HAS_HALO,
|
||||
XPAR_FMC_SENSOR_INPUT_V_ENHANCE_1_HAS_ALIAS,
|
||||
XPAR_FMC_SENSOR_INPUT_V_ENHANCE_1_OPT_SIZE,
|
||||
XPAR_FMC_SENSOR_INPUT_V_ENHANCE_1_NOISE_THRESHOLD,
|
||||
XPAR_FMC_SENSOR_INPUT_V_ENHANCE_1_ENHANCE_STRENGTH,
|
||||
XPAR_FMC_SENSOR_INPUT_V_ENHANCE_1_HALO_SUPPRESS
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -1,35 +1,35 @@
|
|||
/******************************************************************************
|
||||
*
|
||||
* Copyright (C) 2014 Xilinx, Inc. All rights reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* Use of the Software is limited solely to applications:
|
||||
* (a) running on a Xilinx device, or
|
||||
* (b) that interact with a Xilinx device through a bus or interconnect.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* XILINX BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
|
||||
* OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*
|
||||
* Except as contained in this notice, the name of the Xilinx shall not be used
|
||||
* in advertising or otherwise to promote the sale, use or other dealings in
|
||||
* this Software without prior written authorization from Xilinx.
|
||||
*
|
||||
/******************************************************************************
|
||||
*
|
||||
* Copyright (C) 2014 Xilinx, Inc. All rights reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* Use of the Software is limited solely to applications:
|
||||
* (a) running on a Xilinx device, or
|
||||
* (b) that interact with a Xilinx device through a bus or interconnect.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* XILINX BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
|
||||
* OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*
|
||||
* Except as contained in this notice, the name of the Xilinx shall not be used
|
||||
* in advertising or otherwise to promote the sale, use or other dealings in
|
||||
* this Software without prior written authorization from Xilinx.
|
||||
*
|
||||
******************************************************************************/
|
||||
/*****************************************************************************/
|
||||
/*****************************************************************************/
|
||||
/**
|
||||
*
|
||||
* @file xenhance_hw.h
|
||||
|
@ -39,252 +39,252 @@
|
|||
*
|
||||
* This header file contains identifiers and register-level driver functions (or
|
||||
* macros) that can be used to access the Xilinx Video Image Enhancement
|
||||
* core.
|
||||
*
|
||||
* For more information about the operation of this core, see the hardware
|
||||
* specification and documentation in the higher level driver xenhance.h source
|
||||
* code file.
|
||||
*
|
||||
* <pre>
|
||||
* MODIFICATION HISTORY:
|
||||
*
|
||||
* Ver Who Date Changes
|
||||
* ----- --- -------- -------------------------------------------------------
|
||||
* 7.0 adk 01/07/14 First release.
|
||||
* Added the register offsets and bit masks for the
|
||||
* registers and added backward compatibility for macros.
|
||||
* </pre>
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
#ifndef XENHANCE_HW_H_
|
||||
#define XENHANCE_HW_H_ /**< Prevent circular inclusions by using
|
||||
* protection macros */
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/***************************** Include Files *********************************/
|
||||
|
||||
#include "xil_io.h"
|
||||
|
||||
/************************** Constant Definitions *****************************/
|
||||
|
||||
/** @name Control Registers
|
||||
* @{
|
||||
*/
|
||||
#define XENH_CONTROL_OFFSET 0x0000 /**< Control Offset */
|
||||
#define XENH_STATUS_OFFSET 0x0004 /**< Status Offset */
|
||||
#define XENH_ERROR_OFFSET 0x0008 /**< Error Offset */
|
||||
#define XENH_IRQ_EN_OFFSET 0x000C /**< IRQ Enable Offset */
|
||||
#define XENH_VERSION_OFFSET 0x0010 /**< Version Offset */
|
||||
#define XENH_SYSDEBUG0_OFFSET 0x0014 /**< System Debug 0
|
||||
* Offset */
|
||||
#define XENH_SYSDEBUG1_OFFSET 0x0018 /**< System Debug 1
|
||||
* Offset */
|
||||
#define XENH_SYSDEBUG2_OFFSET 0x001C /**< System Debug 2
|
||||
* Offset */
|
||||
/*@}*/
|
||||
|
||||
/** @name Timing Control Registers
|
||||
* @{
|
||||
*/
|
||||
#define XENH_ACTIVE_SIZE_OFFSET 0x0020 /**< Horizontal and Vertical
|
||||
* Active Frame Size Offset */
|
||||
/*@}*/
|
||||
|
||||
/** @name Core Specific Registers
|
||||
* @{
|
||||
*/
|
||||
#define XENH_NOISE_THRESHOLD_OFFSET 0x0100 /**< Noise Reduction
|
||||
* Control Active */
|
||||
#define XENH_ENHANCE_STRENGTH_OFFSET 0x0104 /**< Edge Enhancement
|
||||
* Control Active */
|
||||
#define XENH_HALO_SUPPRESS_OFFSET 0x0108 /**< Halo Suppression
|
||||
* Control Active */
|
||||
/*@}*/
|
||||
|
||||
/** @name Enhance Control Register Bit Masks
|
||||
* @{
|
||||
*/
|
||||
#define XENH_CTL_SW_EN_MASK 0x00000001 /**< Enable Mask */
|
||||
#define XENH_CTL_RUE_MASK 0x00000002 /**< Register
|
||||
* Update Enable Mask */
|
||||
#define XENH_CTL_BPE_MASK 0x00000010 /**< Bypass Mask */
|
||||
#define XENH_CTL_TPE_MASK 0x00000020 /**< Test Pattern Mask */
|
||||
#define XENH_CTL_AUTORESET_MASK 0x40000000 /**< Software Reset -
|
||||
* Auto-synchronize to
|
||||
* SOF Mask */
|
||||
#define XENH_CTL_RESET_MASK 0x80000000 /**< Software Reset -
|
||||
* Instantaneous
|
||||
* Mask */
|
||||
/*@}*/
|
||||
|
||||
/** @name Interrupt Register Bit Masks. It is applicable for
|
||||
* Status and Irq_Enable Registers
|
||||
* @{
|
||||
*/
|
||||
#define XENH_IXR_PROCS_STARTED_MASK 0x00000001 /**< Process started
|
||||
* Mask */
|
||||
#define XENH_IXR_EOF_MASK 0x00000002 /**< End-Of-Frame Mask */
|
||||
#define XENH_IXR_SE_MASK 0x00010000 /**< Slave Error Mask */
|
||||
#define XENH_IXR_ALLINTR_MASK 0x00010003 /**< OR'ing of all Mask */
|
||||
/*@}*/
|
||||
|
||||
/** @name Enhance Error Register Bit Masks
|
||||
* @{
|
||||
*/
|
||||
#define XENH_ERR_EOL_EARLY_MASK 0x00000001 /**< Frame EOL early Mask */
|
||||
#define XENH_ERR_EOL_LATE_MASK 0x00000002 /**< Frame EOL late Mask */
|
||||
#define XENH_ERR_SOF_EARLY_MASK 0x00000004 /**< Frame SOF early Mask */
|
||||
#define XENH_ERR_SOF_LATE_MASK 0x00000008 /**< Frame SOF late Mask */
|
||||
/*@}*/
|
||||
|
||||
/** @name Enhance Version Register bit definition
|
||||
* @{
|
||||
*/
|
||||
#define XENH_VER_REV_NUM_MASK 0x000000FF /**< Revision Number Mask */
|
||||
#define XENH_VER_PID_MASK 0x00000F00 /**< Patch ID Mask */
|
||||
#define XENH_VER_MINOR_MASK 0x00FF0000 /**< Version Minor Mask */
|
||||
#define XENH_VER_MAJOR_MASK 0xFF000000 /**< Version Major Mask */
|
||||
#define XENH_VER_REV_MASK 0x0000F000 /**< VersionRevision Mask */
|
||||
#define XENH_VER_INTERNAL_SHIFT 8 /**< Version Internal Shift */
|
||||
#define XENH_VER_REV_SHIFT 12 /**< Version Revision Shift */
|
||||
#define XENH_VER_MINOR_SHIFT 16 /**< Version Minor Shift */
|
||||
#define XENH_VER_MAJOR_SHIFT 24 /**< Version Major Shift */
|
||||
/*@}*/
|
||||
|
||||
/** @name Enhance ActiveSize register Masks and Shifts
|
||||
* @{
|
||||
*/
|
||||
#define XENH_ACTSIZE_NUM_PIXEL_MASK 0x00001FFF /**< Active size
|
||||
* Mask */
|
||||
#define XENH_ACTSIZE_NUM_LINE_MASK 0x1FFF0000 /**< Number of Active
|
||||
* lines per Frame
|
||||
* (Vertical) Mask */
|
||||
#define XENH_ACTSIZE_NUM_LINE_SHIFT 16 /**< Active size
|
||||
* Shift */
|
||||
/*@}*/
|
||||
|
||||
/** @name Enhance Noise Threshold Register Bit Masks
|
||||
* @{
|
||||
*/
|
||||
#define XENH_NOISE_THRESHOLD_MASK 0x0000FFFF /**< Noise Threshold
|
||||
* Mask */
|
||||
/*@}*/
|
||||
|
||||
/** @name Enhance Strength Register Bit Masks
|
||||
* @{
|
||||
*/
|
||||
#define XENH_STRENGTH_MASK 0x0000FFFF /**< Enhance Strength
|
||||
* Mask */
|
||||
/*@}*/
|
||||
|
||||
/** @name Enhance Halo Suppress Register Bit Masks
|
||||
* @{
|
||||
*/
|
||||
#define XENH_HALO_SUPPRESS_MASK 0x0000FFFF /**< Halo Suppress
|
||||
* Mask */
|
||||
/*@}*/
|
||||
|
||||
/**@name Backward compatibility macros
|
||||
* @{
|
||||
*/
|
||||
#define ENHANCE_CONTROL XENH_CONTROL_OFFSET
|
||||
#define ENHANCE_STATUS XENH_STATUS_OFFSET
|
||||
#define ENHANCE_ERROR XENH_ERROR_OFFSET
|
||||
#define ENHANCE_IRQ_ENABLE XENH_IRQ_EN_OFFSET
|
||||
#define ENHANCE_VERSION XENH_VERSION_OFFSET
|
||||
#define ENHANCE_SYSDEBUG0 XENH_SYSDEBUG0_OFFSET
|
||||
#define ENHANCE_SYSDEBUG1 XENH_SYSDEBUG1_OFFSET
|
||||
#define ENHANCE_SYSDEBUG2 XENH_SYSDEBUG2_OFFSET
|
||||
#define ENHANCE_ACTIVE_SIZE XENH_ACTIVE_SIZE_OFFSET
|
||||
#define ENHANCE_NOISE_THRESHOLD XENH_NOISE_THRESHOLD_OFFSET
|
||||
#define ENHANCE_ENHANCE_STRENGTH XENH_ENHANCE_STRENGTH_OFFSET
|
||||
#define ENHANCE_HALO_SUPPRESS XENH_HALO_SUPPRESS_OFFSET
|
||||
|
||||
#define ENHANCE_CTL_EN_MASK XENH_CTL_SW_EN_MASK
|
||||
#define ENHANCE_CTL_RU_MASK XENH_CTL_RUE_MASK
|
||||
#define ENHANCE_CTL_RESET XENH_CTL_RESET_MASK
|
||||
#define ENHANCE_CTL_AUTORESET XENH_CTL_AUTORESET_MASK
|
||||
|
||||
#define ENHANCE_In32 XEnhance_In32
|
||||
#define ENHANCE_Out32 XEnhance_Out32
|
||||
#define ENHANCE_ReadReg XEnhance_ReadReg
|
||||
#define ENHANCE_WriteReg XEnhance_WriteReg
|
||||
/*@}*/
|
||||
|
||||
/** @name Interrupt Registers
|
||||
* @{
|
||||
*/
|
||||
/**
|
||||
* Interrupt status register generates a interrupt if the corresponding bits of
|
||||
* interrupt enable register bits are set.
|
||||
*/
|
||||
|
||||
#define XENH_ISR_OFFSET XENH_STATUS_OFFSET /**< Interrupt Status
|
||||
* Register */
|
||||
#define XENH_IER_OFFSET XENH_IRQ_EN_OFFSET /**< Interrupt Enable
|
||||
* Register corresponds
|
||||
* to Status bits */
|
||||
/*@}*/
|
||||
|
||||
/***************** Macros (Inline Functions) Definitions *********************/
|
||||
|
||||
#define XEnhance_In32 Xil_In32 /**< Enhance Input Operation. */
|
||||
#define XEnhance_Out32 Xil_Out32 /**< Enhance Output Operation. */
|
||||
|
||||
/*****************************************************************************/
|
||||
/**
|
||||
*
|
||||
* This function macro reads the given register.
|
||||
*
|
||||
* @param BaseAddress is the base address of the Image Enhancement core.
|
||||
* @param RegOffset is the register offset of the core (defined at.
|
||||
* top of this file).
|
||||
*
|
||||
* @return The 32-bit value of the register.
|
||||
*
|
||||
* @note C-style signature:2
|
||||
* u32 XEnhance_ReadReg(u32 BaseAddress, u32 RegOffset).
|
||||
*
|
||||
******************************************************************************/
|
||||
#define XEnhance_ReadReg(BaseAddress, RegOffset) \
|
||||
XEnhance_In32((BaseAddress) + (u32)(RegOffset))
|
||||
|
||||
/*****************************************************************************/
|
||||
/**
|
||||
*
|
||||
* This function macro writes the given register.
|
||||
*
|
||||
* @param BaseAddress is the base address of the Image Enhancement core.
|
||||
* @param RegOffset is the register offset of the core (defined
|
||||
* at top of this file).
|
||||
* @param Data is the 32-bit value to write to the register.
|
||||
*
|
||||
* @return None.
|
||||
*
|
||||
* @note C-style signature:
|
||||
* void XEnhance_WriteReg(u32 BaseAddress, u32 RegOffset,
|
||||
* u32 Data).
|
||||
*
|
||||
******************************************************************************/
|
||||
#define XEnhance_WriteReg(BaseAddress, RegOffset, Data) \
|
||||
XEnhance_Out32((BaseAddress) + (u32)(RegOffset), (Data))
|
||||
|
||||
/**************************** Type Definitions *******************************/
|
||||
|
||||
|
||||
/************************** Function Prototypes ******************************/
|
||||
|
||||
|
||||
/************************** Variable Declarations ****************************/
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
* core.
|
||||
*
|
||||
* For more information about the operation of this core, see the hardware
|
||||
* specification and documentation in the higher level driver xenhance.h source
|
||||
* code file.
|
||||
*
|
||||
* <pre>
|
||||
* MODIFICATION HISTORY:
|
||||
*
|
||||
* Ver Who Date Changes
|
||||
* ----- --- -------- -------------------------------------------------------
|
||||
* 7.0 adk 01/07/14 First release.
|
||||
* Added the register offsets and bit masks for the
|
||||
* registers and added backward compatibility for macros.
|
||||
* </pre>
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
#ifndef XENHANCE_HW_H_
|
||||
#define XENHANCE_HW_H_ /**< Prevent circular inclusions by using
|
||||
* protection macros */
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/***************************** Include Files *********************************/
|
||||
|
||||
#include "xil_io.h"
|
||||
|
||||
/************************** Constant Definitions *****************************/
|
||||
|
||||
/** @name Control Registers
|
||||
* @{
|
||||
*/
|
||||
#define XENH_CONTROL_OFFSET 0x0000 /**< Control Offset */
|
||||
#define XENH_STATUS_OFFSET 0x0004 /**< Status Offset */
|
||||
#define XENH_ERROR_OFFSET 0x0008 /**< Error Offset */
|
||||
#define XENH_IRQ_EN_OFFSET 0x000C /**< IRQ Enable Offset */
|
||||
#define XENH_VERSION_OFFSET 0x0010 /**< Version Offset */
|
||||
#define XENH_SYSDEBUG0_OFFSET 0x0014 /**< System Debug 0
|
||||
* Offset */
|
||||
#define XENH_SYSDEBUG1_OFFSET 0x0018 /**< System Debug 1
|
||||
* Offset */
|
||||
#define XENH_SYSDEBUG2_OFFSET 0x001C /**< System Debug 2
|
||||
* Offset */
|
||||
/*@}*/
|
||||
|
||||
/** @name Timing Control Registers
|
||||
* @{
|
||||
*/
|
||||
#define XENH_ACTIVE_SIZE_OFFSET 0x0020 /**< Horizontal and Vertical
|
||||
* Active Frame Size Offset */
|
||||
/*@}*/
|
||||
|
||||
/** @name Core Specific Registers
|
||||
* @{
|
||||
*/
|
||||
#define XENH_NOISE_THRESHOLD_OFFSET 0x0100 /**< Noise Reduction
|
||||
* Control Active */
|
||||
#define XENH_ENHANCE_STRENGTH_OFFSET 0x0104 /**< Edge Enhancement
|
||||
* Control Active */
|
||||
#define XENH_HALO_SUPPRESS_OFFSET 0x0108 /**< Halo Suppression
|
||||
* Control Active */
|
||||
/*@}*/
|
||||
|
||||
/** @name Enhance Control Register Bit Masks
|
||||
* @{
|
||||
*/
|
||||
#define XENH_CTL_SW_EN_MASK 0x00000001 /**< Enable Mask */
|
||||
#define XENH_CTL_RUE_MASK 0x00000002 /**< Register
|
||||
* Update Enable Mask */
|
||||
#define XENH_CTL_BPE_MASK 0x00000010 /**< Bypass Mask */
|
||||
#define XENH_CTL_TPE_MASK 0x00000020 /**< Test Pattern Mask */
|
||||
#define XENH_CTL_AUTORESET_MASK 0x40000000 /**< Software Reset -
|
||||
* Auto-synchronize to
|
||||
* SOF Mask */
|
||||
#define XENH_CTL_RESET_MASK 0x80000000 /**< Software Reset -
|
||||
* Instantaneous
|
||||
* Mask */
|
||||
/*@}*/
|
||||
|
||||
/** @name Interrupt Register Bit Masks. It is applicable for
|
||||
* Status and Irq_Enable Registers
|
||||
* @{
|
||||
*/
|
||||
#define XENH_IXR_PROCS_STARTED_MASK 0x00000001 /**< Process started
|
||||
* Mask */
|
||||
#define XENH_IXR_EOF_MASK 0x00000002 /**< End-Of-Frame Mask */
|
||||
#define XENH_IXR_SE_MASK 0x00010000 /**< Slave Error Mask */
|
||||
#define XENH_IXR_ALLINTR_MASK 0x00010003 /**< OR'ing of all Mask */
|
||||
/*@}*/
|
||||
|
||||
/** @name Enhance Error Register Bit Masks
|
||||
* @{
|
||||
*/
|
||||
#define XENH_ERR_EOL_EARLY_MASK 0x00000001 /**< Frame EOL early Mask */
|
||||
#define XENH_ERR_EOL_LATE_MASK 0x00000002 /**< Frame EOL late Mask */
|
||||
#define XENH_ERR_SOF_EARLY_MASK 0x00000004 /**< Frame SOF early Mask */
|
||||
#define XENH_ERR_SOF_LATE_MASK 0x00000008 /**< Frame SOF late Mask */
|
||||
/*@}*/
|
||||
|
||||
/** @name Enhance Version Register bit definition
|
||||
* @{
|
||||
*/
|
||||
#define XENH_VER_REV_NUM_MASK 0x000000FF /**< Revision Number Mask */
|
||||
#define XENH_VER_PID_MASK 0x00000F00 /**< Patch ID Mask */
|
||||
#define XENH_VER_MINOR_MASK 0x00FF0000 /**< Version Minor Mask */
|
||||
#define XENH_VER_MAJOR_MASK 0xFF000000 /**< Version Major Mask */
|
||||
#define XENH_VER_REV_MASK 0x0000F000 /**< VersionRevision Mask */
|
||||
#define XENH_VER_INTERNAL_SHIFT 8 /**< Version Internal Shift */
|
||||
#define XENH_VER_REV_SHIFT 12 /**< Version Revision Shift */
|
||||
#define XENH_VER_MINOR_SHIFT 16 /**< Version Minor Shift */
|
||||
#define XENH_VER_MAJOR_SHIFT 24 /**< Version Major Shift */
|
||||
/*@}*/
|
||||
|
||||
/** @name Enhance ActiveSize register Masks and Shifts
|
||||
* @{
|
||||
*/
|
||||
#define XENH_ACTSIZE_NUM_PIXEL_MASK 0x00001FFF /**< Active size
|
||||
* Mask */
|
||||
#define XENH_ACTSIZE_NUM_LINE_MASK 0x1FFF0000 /**< Number of Active
|
||||
* lines per Frame
|
||||
* (Vertical) Mask */
|
||||
#define XENH_ACTSIZE_NUM_LINE_SHIFT 16 /**< Active size
|
||||
* Shift */
|
||||
/*@}*/
|
||||
|
||||
/** @name Enhance Noise Threshold Register Bit Masks
|
||||
* @{
|
||||
*/
|
||||
#define XENH_NOISE_THRESHOLD_MASK 0x0000FFFF /**< Noise Threshold
|
||||
* Mask */
|
||||
/*@}*/
|
||||
|
||||
/** @name Enhance Strength Register Bit Masks
|
||||
* @{
|
||||
*/
|
||||
#define XENH_STRENGTH_MASK 0x0000FFFF /**< Enhance Strength
|
||||
* Mask */
|
||||
/*@}*/
|
||||
|
||||
/** @name Enhance Halo Suppress Register Bit Masks
|
||||
* @{
|
||||
*/
|
||||
#define XENH_HALO_SUPPRESS_MASK 0x0000FFFF /**< Halo Suppress
|
||||
* Mask */
|
||||
/*@}*/
|
||||
|
||||
/**@name Backward compatibility macros
|
||||
* @{
|
||||
*/
|
||||
#define ENHANCE_CONTROL XENH_CONTROL_OFFSET
|
||||
#define ENHANCE_STATUS XENH_STATUS_OFFSET
|
||||
#define ENHANCE_ERROR XENH_ERROR_OFFSET
|
||||
#define ENHANCE_IRQ_ENABLE XENH_IRQ_EN_OFFSET
|
||||
#define ENHANCE_VERSION XENH_VERSION_OFFSET
|
||||
#define ENHANCE_SYSDEBUG0 XENH_SYSDEBUG0_OFFSET
|
||||
#define ENHANCE_SYSDEBUG1 XENH_SYSDEBUG1_OFFSET
|
||||
#define ENHANCE_SYSDEBUG2 XENH_SYSDEBUG2_OFFSET
|
||||
#define ENHANCE_ACTIVE_SIZE XENH_ACTIVE_SIZE_OFFSET
|
||||
#define ENHANCE_NOISE_THRESHOLD XENH_NOISE_THRESHOLD_OFFSET
|
||||
#define ENHANCE_ENHANCE_STRENGTH XENH_ENHANCE_STRENGTH_OFFSET
|
||||
#define ENHANCE_HALO_SUPPRESS XENH_HALO_SUPPRESS_OFFSET
|
||||
|
||||
#define ENHANCE_CTL_EN_MASK XENH_CTL_SW_EN_MASK
|
||||
#define ENHANCE_CTL_RU_MASK XENH_CTL_RUE_MASK
|
||||
#define ENHANCE_CTL_RESET XENH_CTL_RESET_MASK
|
||||
#define ENHANCE_CTL_AUTORESET XENH_CTL_AUTORESET_MASK
|
||||
|
||||
#define ENHANCE_In32 XEnhance_In32
|
||||
#define ENHANCE_Out32 XEnhance_Out32
|
||||
#define ENHANCE_ReadReg XEnhance_ReadReg
|
||||
#define ENHANCE_WriteReg XEnhance_WriteReg
|
||||
/*@}*/
|
||||
|
||||
/** @name Interrupt Registers
|
||||
* @{
|
||||
*/
|
||||
/**
|
||||
* Interrupt status register generates a interrupt if the corresponding bits of
|
||||
* interrupt enable register bits are set.
|
||||
*/
|
||||
|
||||
#define XENH_ISR_OFFSET XENH_STATUS_OFFSET /**< Interrupt Status
|
||||
* Register */
|
||||
#define XENH_IER_OFFSET XENH_IRQ_EN_OFFSET /**< Interrupt Enable
|
||||
* Register corresponds
|
||||
* to Status bits */
|
||||
/*@}*/
|
||||
|
||||
/***************** Macros (Inline Functions) Definitions *********************/
|
||||
|
||||
#define XEnhance_In32 Xil_In32 /**< Enhance Input Operation. */
|
||||
#define XEnhance_Out32 Xil_Out32 /**< Enhance Output Operation. */
|
||||
|
||||
/*****************************************************************************/
|
||||
/**
|
||||
*
|
||||
* This function macro reads the given register.
|
||||
*
|
||||
* @param BaseAddress is the base address of the Image Enhancement core.
|
||||
* @param RegOffset is the register offset of the core (defined at.
|
||||
* top of this file).
|
||||
*
|
||||
* @return The 32-bit value of the register.
|
||||
*
|
||||
* @note C-style signature:2
|
||||
* u32 XEnhance_ReadReg(u32 BaseAddress, u32 RegOffset).
|
||||
*
|
||||
******************************************************************************/
|
||||
#define XEnhance_ReadReg(BaseAddress, RegOffset) \
|
||||
XEnhance_In32((BaseAddress) + (u32)(RegOffset))
|
||||
|
||||
/*****************************************************************************/
|
||||
/**
|
||||
*
|
||||
* This function macro writes the given register.
|
||||
*
|
||||
* @param BaseAddress is the base address of the Image Enhancement core.
|
||||
* @param RegOffset is the register offset of the core (defined
|
||||
* at top of this file).
|
||||
* @param Data is the 32-bit value to write to the register.
|
||||
*
|
||||
* @return None.
|
||||
*
|
||||
* @note C-style signature:
|
||||
* void XEnhance_WriteReg(u32 BaseAddress, u32 RegOffset,
|
||||
* u32 Data).
|
||||
*
|
||||
******************************************************************************/
|
||||
#define XEnhance_WriteReg(BaseAddress, RegOffset, Data) \
|
||||
XEnhance_Out32((BaseAddress) + (u32)(RegOffset), (Data))
|
||||
|
||||
/**************************** Type Definitions *******************************/
|
||||
|
||||
|
||||
/************************** Function Prototypes ******************************/
|
||||
|
||||
|
||||
/************************** Variable Declarations ****************************/
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#endif /* End of protection macro */
|
||||
|
|
|
@ -1,35 +1,35 @@
|
|||
/******************************************************************************
|
||||
*
|
||||
* Copyright (C) 2014 Xilinx, Inc. All rights reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* Use of the Software is limited solely to applications:
|
||||
* (a) running on a Xilinx device, or
|
||||
* (b) that interact with a Xilinx device through a bus or interconnect.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* XILINX BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
|
||||
* OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*
|
||||
* Except as contained in this notice, the name of the Xilinx shall not be used
|
||||
* in advertising or otherwise to promote the sale, use or other dealings in
|
||||
* this Software without prior written authorization from Xilinx.
|
||||
*
|
||||
/******************************************************************************
|
||||
*
|
||||
* Copyright (C) 2014 Xilinx, Inc. All rights reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* Use of the Software is limited solely to applications:
|
||||
* (a) running on a Xilinx device, or
|
||||
* (b) that interact with a Xilinx device through a bus or interconnect.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* XILINX BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
|
||||
* OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*
|
||||
* Except as contained in this notice, the name of the Xilinx shall not be used
|
||||
* in advertising or otherwise to promote the sale, use or other dealings in
|
||||
* this Software without prior written authorization from Xilinx.
|
||||
*
|
||||
******************************************************************************/
|
||||
/*****************************************************************************/
|
||||
/*****************************************************************************/
|
||||
/**
|
||||
*
|
||||
* @file xenhance_intr.c
|
||||
|
@ -39,173 +39,173 @@
|
|||
*
|
||||
* This code contains interrupt related functions of Xilinx Enhance core.
|
||||
* Please see xenhance.h for more details of the core.
|
||||
*
|
||||
* <pre>
|
||||
* MODIFICATION HISTORY:
|
||||
*
|
||||
* Ver Who Date Changes
|
||||
* ----- --- -------- -----------------------------------------------
|
||||
* 7.0 adk 02/19/14 First release.
|
||||
* Implemented the following functions
|
||||
* XEnhance_IntrHandler
|
||||
* XEnhance_SetCallBack
|
||||
* </pre>
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
/***************************** Include Files *********************************/
|
||||
|
||||
#include "xenhance.h"
|
||||
|
||||
/************************** Constant Definitions *****************************/
|
||||
|
||||
|
||||
/***************** Macros (Inline Functions) Definitions *********************/
|
||||
|
||||
|
||||
/**************************** Type Definitions *******************************/
|
||||
|
||||
|
||||
/************************** Function Prototypes ******************************/
|
||||
|
||||
|
||||
/************************** Variable Definitions *****************************/
|
||||
|
||||
|
||||
/************************** Function Definitions *****************************/
|
||||
|
||||
/*****************************************************************************/
|
||||
/**
|
||||
*
|
||||
* This function is the interrupt handler for the Enhance driver.
|
||||
*
|
||||
* This handler reads the pending interrupt from the IER/ISR, determines the
|
||||
* source of the interrupts, calls according callbacks, and finally clears the
|
||||
* interrupts.
|
||||
*
|
||||
* The application is responsible for connecting this function to the interrupt
|
||||
* system. Application beyond this driver is also responsible for providing
|
||||
* callbacks to handle interrupts and installing the callbacks using
|
||||
* XEnhance_SetCallBack() during initialization phase.
|
||||
*
|
||||
* @param InstancePtr is a pointer to the XEnhance instance that just
|
||||
* interrupted.
|
||||
*
|
||||
* @return None.
|
||||
*
|
||||
* @note Interrupt interface should be enabled.
|
||||
*
|
||||
******************************************************************************/
|
||||
void XEnhance_IntrHandler(void *InstancePtr)
|
||||
{
|
||||
u32 PendingIntr;
|
||||
u32 ErrorStatus;
|
||||
XEnhance *XEnhancePtr = (XEnhance *)((void *)InstancePtr);
|
||||
|
||||
/* Verify arguments. */
|
||||
Xil_AssertVoid(XEnhancePtr != NULL);
|
||||
Xil_AssertVoid(XEnhancePtr->IsReady == (u32)(XIL_COMPONENT_IS_READY));
|
||||
Xil_AssertVoid(XEnhancePtr->Config.HasIntcIf != (u16)0x0);
|
||||
|
||||
/* Get pending interrupts. */
|
||||
PendingIntr = (u32)(XEnhance_IntrGetPending(XEnhancePtr));
|
||||
|
||||
/* A Slave Error interrupt has happened. */
|
||||
if (((PendingIntr) & (XENH_IXR_SE_MASK)) ==
|
||||
((XENH_IXR_SE_MASK))) {
|
||||
ErrorStatus = (PendingIntr) & (XENH_IXR_SE_MASK);
|
||||
XEnhancePtr->ErrCallBack(XEnhancePtr->ErrRef, ErrorStatus);
|
||||
}
|
||||
|
||||
/* A Processing Start has happened. */
|
||||
if (((PendingIntr) & (XENH_IXR_PROCS_STARTED_MASK)) ==
|
||||
(XENH_IXR_PROCS_STARTED_MASK)) {
|
||||
XEnhancePtr->ProcStartCallBack
|
||||
(XEnhancePtr->ProcStartRef);
|
||||
}
|
||||
|
||||
/* A Frame Done interrupt has happened */
|
||||
if (((PendingIntr) & (XENH_IXR_EOF_MASK)) ==
|
||||
(XENH_IXR_EOF_MASK)) {
|
||||
XEnhancePtr->FrameDoneCallBack
|
||||
(XEnhancePtr->FrameDoneRef);
|
||||
}
|
||||
|
||||
/* Clear pending interrupt(s). */
|
||||
XEnhance_IntrClear(XEnhancePtr, PendingIntr);
|
||||
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/**
|
||||
*
|
||||
* This routine installs an asynchronous callback function for the given
|
||||
* HandlerType:
|
||||
*
|
||||
* <pre>
|
||||
* HandlerType Callback Function Type
|
||||
* ----------------------- --------------------------------
|
||||
* XENH_HANDLER_PROCSTART ProcStartCallBack
|
||||
* XENH_HANDLER_FRAMEDONE FrameDoneCallBack
|
||||
* XENH_HANDLER_ERROR ErrCallBack
|
||||
* </pre>
|
||||
*
|
||||
* @param InstancePtr is a pointer to the XEnhance instance to be worked
|
||||
* on.
|
||||
* @param HandlerType specifies which callback is to be attached.
|
||||
* @param CallBackFunc is the address of the callback function.
|
||||
* @param CallBackRef is a user data item that will be passed to the
|
||||
* callback function when it is invoked.
|
||||
*
|
||||
* @return
|
||||
* - XST_SUCCESS when handler is installed.
|
||||
* - XST_INVALID_PARAM when HandlerType is invalid.
|
||||
*
|
||||
* @note Invoking this function for a handler that already has been
|
||||
* installed replaces it with the new handler.
|
||||
*
|
||||
******************************************************************************/
|
||||
int XEnhance_SetCallBack(XEnhance *InstancePtr, u32 HandlerType,
|
||||
void *CallBackFunc, void *CallBackRef)
|
||||
{
|
||||
int Status;
|
||||
|
||||
/* Verify arguments. */
|
||||
Xil_AssertNonvoid(InstancePtr != NULL);
|
||||
Xil_AssertNonvoid(InstancePtr->IsReady ==
|
||||
(u32)(XIL_COMPONENT_IS_READY));
|
||||
Xil_AssertNonvoid(CallBackFunc != NULL);
|
||||
Xil_AssertNonvoid(CallBackRef != NULL);
|
||||
Xil_AssertNonvoid((HandlerType >= (u32)(XENH_HANDLER_PROCSTART)) &&
|
||||
(HandlerType <= (u32)(XENH_HANDLER_ERROR)));
|
||||
|
||||
/* Calls the respective callbacks according to handler type. */
|
||||
switch (HandlerType) {
|
||||
case XENH_HANDLER_PROCSTART:
|
||||
InstancePtr->ProcStartCallBack =
|
||||
(XEnhance_CallBack)((void *)CallBackFunc);
|
||||
InstancePtr->ProcStartRef = CallBackRef;
|
||||
Status = (XST_SUCCESS);
|
||||
break;
|
||||
|
||||
case XENH_HANDLER_FRAMEDONE:
|
||||
InstancePtr->FrameDoneCallBack =
|
||||
(XEnhance_CallBack)((void *)CallBackFunc);
|
||||
InstancePtr->FrameDoneRef = CallBackRef;
|
||||
Status = (XST_SUCCESS);
|
||||
break;
|
||||
|
||||
case XENH_HANDLER_ERROR:
|
||||
InstancePtr->ErrCallBack =
|
||||
(XEnhance_ErrorCallBack)((void *)CallBackFunc);
|
||||
InstancePtr->ErrRef = CallBackRef;
|
||||
Status = (XST_SUCCESS);
|
||||
break;
|
||||
|
||||
default:
|
||||
Status = (XST_INVALID_PARAM);
|
||||
break;
|
||||
}
|
||||
*
|
||||
* <pre>
|
||||
* MODIFICATION HISTORY:
|
||||
*
|
||||
* Ver Who Date Changes
|
||||
* ----- --- -------- -----------------------------------------------
|
||||
* 7.0 adk 02/19/14 First release.
|
||||
* Implemented the following functions
|
||||
* XEnhance_IntrHandler
|
||||
* XEnhance_SetCallBack
|
||||
* </pre>
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
/***************************** Include Files *********************************/
|
||||
|
||||
#include "xenhance.h"
|
||||
|
||||
/************************** Constant Definitions *****************************/
|
||||
|
||||
|
||||
/***************** Macros (Inline Functions) Definitions *********************/
|
||||
|
||||
|
||||
/**************************** Type Definitions *******************************/
|
||||
|
||||
|
||||
/************************** Function Prototypes ******************************/
|
||||
|
||||
|
||||
/************************** Variable Definitions *****************************/
|
||||
|
||||
|
||||
/************************** Function Definitions *****************************/
|
||||
|
||||
/*****************************************************************************/
|
||||
/**
|
||||
*
|
||||
* This function is the interrupt handler for the Enhance driver.
|
||||
*
|
||||
* This handler reads the pending interrupt from the IER/ISR, determines the
|
||||
* source of the interrupts, calls according callbacks, and finally clears the
|
||||
* interrupts.
|
||||
*
|
||||
* The application is responsible for connecting this function to the interrupt
|
||||
* system. Application beyond this driver is also responsible for providing
|
||||
* callbacks to handle interrupts and installing the callbacks using
|
||||
* XEnhance_SetCallBack() during initialization phase.
|
||||
*
|
||||
* @param InstancePtr is a pointer to the XEnhance instance that just
|
||||
* interrupted.
|
||||
*
|
||||
* @return None.
|
||||
*
|
||||
* @note Interrupt interface should be enabled.
|
||||
*
|
||||
******************************************************************************/
|
||||
void XEnhance_IntrHandler(void *InstancePtr)
|
||||
{
|
||||
u32 PendingIntr;
|
||||
u32 ErrorStatus;
|
||||
XEnhance *XEnhancePtr = (XEnhance *)((void *)InstancePtr);
|
||||
|
||||
/* Verify arguments. */
|
||||
Xil_AssertVoid(XEnhancePtr != NULL);
|
||||
Xil_AssertVoid(XEnhancePtr->IsReady == (u32)(XIL_COMPONENT_IS_READY));
|
||||
Xil_AssertVoid(XEnhancePtr->Config.HasIntcIf != (u16)0x0);
|
||||
|
||||
/* Get pending interrupts. */
|
||||
PendingIntr = (u32)(XEnhance_IntrGetPending(XEnhancePtr));
|
||||
|
||||
/* A Slave Error interrupt has happened. */
|
||||
if (((PendingIntr) & (XENH_IXR_SE_MASK)) ==
|
||||
((XENH_IXR_SE_MASK))) {
|
||||
ErrorStatus = (PendingIntr) & (XENH_IXR_SE_MASK);
|
||||
XEnhancePtr->ErrCallBack(XEnhancePtr->ErrRef, ErrorStatus);
|
||||
}
|
||||
|
||||
/* A Processing Start has happened. */
|
||||
if (((PendingIntr) & (XENH_IXR_PROCS_STARTED_MASK)) ==
|
||||
(XENH_IXR_PROCS_STARTED_MASK)) {
|
||||
XEnhancePtr->ProcStartCallBack
|
||||
(XEnhancePtr->ProcStartRef);
|
||||
}
|
||||
|
||||
/* A Frame Done interrupt has happened */
|
||||
if (((PendingIntr) & (XENH_IXR_EOF_MASK)) ==
|
||||
(XENH_IXR_EOF_MASK)) {
|
||||
XEnhancePtr->FrameDoneCallBack
|
||||
(XEnhancePtr->FrameDoneRef);
|
||||
}
|
||||
|
||||
/* Clear pending interrupt(s). */
|
||||
XEnhance_IntrClear(XEnhancePtr, PendingIntr);
|
||||
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/**
|
||||
*
|
||||
* This routine installs an asynchronous callback function for the given
|
||||
* HandlerType:
|
||||
*
|
||||
* <pre>
|
||||
* HandlerType Callback Function Type
|
||||
* ----------------------- --------------------------------
|
||||
* XENH_HANDLER_PROCSTART ProcStartCallBack
|
||||
* XENH_HANDLER_FRAMEDONE FrameDoneCallBack
|
||||
* XENH_HANDLER_ERROR ErrCallBack
|
||||
* </pre>
|
||||
*
|
||||
* @param InstancePtr is a pointer to the XEnhance instance to be worked
|
||||
* on.
|
||||
* @param HandlerType specifies which callback is to be attached.
|
||||
* @param CallBackFunc is the address of the callback function.
|
||||
* @param CallBackRef is a user data item that will be passed to the
|
||||
* callback function when it is invoked.
|
||||
*
|
||||
* @return
|
||||
* - XST_SUCCESS when handler is installed.
|
||||
* - XST_INVALID_PARAM when HandlerType is invalid.
|
||||
*
|
||||
* @note Invoking this function for a handler that already has been
|
||||
* installed replaces it with the new handler.
|
||||
*
|
||||
******************************************************************************/
|
||||
int XEnhance_SetCallBack(XEnhance *InstancePtr, u32 HandlerType,
|
||||
void *CallBackFunc, void *CallBackRef)
|
||||
{
|
||||
int Status;
|
||||
|
||||
/* Verify arguments. */
|
||||
Xil_AssertNonvoid(InstancePtr != NULL);
|
||||
Xil_AssertNonvoid(InstancePtr->IsReady ==
|
||||
(u32)(XIL_COMPONENT_IS_READY));
|
||||
Xil_AssertNonvoid(CallBackFunc != NULL);
|
||||
Xil_AssertNonvoid(CallBackRef != NULL);
|
||||
Xil_AssertNonvoid((HandlerType >= (u32)(XENH_HANDLER_PROCSTART)) &&
|
||||
(HandlerType <= (u32)(XENH_HANDLER_ERROR)));
|
||||
|
||||
/* Calls the respective callbacks according to handler type. */
|
||||
switch (HandlerType) {
|
||||
case XENH_HANDLER_PROCSTART:
|
||||
InstancePtr->ProcStartCallBack =
|
||||
(XEnhance_CallBack)((void *)CallBackFunc);
|
||||
InstancePtr->ProcStartRef = CallBackRef;
|
||||
Status = (XST_SUCCESS);
|
||||
break;
|
||||
|
||||
case XENH_HANDLER_FRAMEDONE:
|
||||
InstancePtr->FrameDoneCallBack =
|
||||
(XEnhance_CallBack)((void *)CallBackFunc);
|
||||
InstancePtr->FrameDoneRef = CallBackRef;
|
||||
Status = (XST_SUCCESS);
|
||||
break;
|
||||
|
||||
case XENH_HANDLER_ERROR:
|
||||
InstancePtr->ErrCallBack =
|
||||
(XEnhance_ErrorCallBack)((void *)CallBackFunc);
|
||||
InstancePtr->ErrRef = CallBackRef;
|
||||
Status = (XST_SUCCESS);
|
||||
break;
|
||||
|
||||
default:
|
||||
Status = (XST_INVALID_PARAM);
|
||||
break;
|
||||
}
|
||||
|
||||
return Status;
|
||||
}
|
||||
|
|
|
@ -1,35 +1,35 @@
|
|||
/******************************************************************************
|
||||
*
|
||||
* Copyright (C) 2014 Xilinx, Inc. All rights reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* Use of the Software is limited solely to applications:
|
||||
* (a) running on a Xilinx device, or
|
||||
* (b) that interact with a Xilinx device through a bus or interconnect.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* XILINX BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
|
||||
* OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*
|
||||
* Except as contained in this notice, the name of the Xilinx shall not be used
|
||||
* in advertising or otherwise to promote the sale, use or other dealings in
|
||||
* this Software without prior written authorization from Xilinx.
|
||||
*
|
||||
/******************************************************************************
|
||||
*
|
||||
* Copyright (C) 2014 Xilinx, Inc. All rights reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* Use of the Software is limited solely to applications:
|
||||
* (a) running on a Xilinx device, or
|
||||
* (b) that interact with a Xilinx device through a bus or interconnect.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* XILINX BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
|
||||
* OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*
|
||||
* Except as contained in this notice, the name of the Xilinx shall not be used
|
||||
* in advertising or otherwise to promote the sale, use or other dealings in
|
||||
* this Software without prior written authorization from Xilinx.
|
||||
*
|
||||
******************************************************************************/
|
||||
/*****************************************************************************/
|
||||
/*****************************************************************************/
|
||||
/**
|
||||
*
|
||||
* @file xenhance_selftest.c
|
||||
|
@ -39,76 +39,76 @@
|
|||
*
|
||||
* This file contains the self-test functions for the Enhance driver.
|
||||
* The self test function reads the Version register.
|
||||
*
|
||||
* <pre>
|
||||
* MODIFICATION HISTORY:
|
||||
*
|
||||
* Ver Who Date Changes
|
||||
* ----- ---- -------- -----------------------------------------------
|
||||
* 7.0 adk 19/02/14 First Release.
|
||||
* Implemented the following function
|
||||
* XEnhance_SelfTest
|
||||
* </pre>
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
/***************************** Include Files *********************************/
|
||||
|
||||
#include "xenhance.h"
|
||||
#include "xstatus.h"
|
||||
|
||||
/************************** Constant Definitions *****************************/
|
||||
|
||||
|
||||
/***************** Macros (Inline Functions) Definitions *********************/
|
||||
|
||||
|
||||
/**************************** Type Definitions *******************************/
|
||||
|
||||
|
||||
/************************** Function Prototypes ******************************/
|
||||
|
||||
|
||||
/************************** Variable Definitions *****************************/
|
||||
|
||||
|
||||
/************************** Function Definitions *****************************/
|
||||
|
||||
/*****************************************************************************/
|
||||
/**
|
||||
*
|
||||
* This function reads complete Version register of Enhance core and compares
|
||||
* with zero values as part of self test.
|
||||
*
|
||||
* @param InstancePtr is a pointer to the XEnhance instance to be worked
|
||||
* on.
|
||||
*
|
||||
* @return
|
||||
* - XST_SUCCESS if the test was successful.
|
||||
* - XST_FAILURE if the test failed.
|
||||
*
|
||||
* @note None.
|
||||
*
|
||||
******************************************************************************/
|
||||
int XEnhance_SelfTest(XEnhance *InstancePtr)
|
||||
{
|
||||
u32 Version;
|
||||
int Status;
|
||||
|
||||
/* Verify arguments. */
|
||||
Xil_AssertNonvoid(InstancePtr != NULL);
|
||||
|
||||
/* Read Enhance core version register. */
|
||||
Version = XEnhance_ReadReg((InstancePtr)->Config.BaseAddress,
|
||||
(XENH_VERSION_OFFSET));
|
||||
|
||||
/* Compare Version with non-zero */
|
||||
if(Version != (u32)0x00) {
|
||||
Status = (XST_SUCCESS);
|
||||
}
|
||||
else {
|
||||
Status = (XST_FAILURE);
|
||||
}
|
||||
*
|
||||
* <pre>
|
||||
* MODIFICATION HISTORY:
|
||||
*
|
||||
* Ver Who Date Changes
|
||||
* ----- ---- -------- -----------------------------------------------
|
||||
* 7.0 adk 19/02/14 First Release.
|
||||
* Implemented the following function
|
||||
* XEnhance_SelfTest
|
||||
* </pre>
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
/***************************** Include Files *********************************/
|
||||
|
||||
#include "xenhance.h"
|
||||
#include "xstatus.h"
|
||||
|
||||
/************************** Constant Definitions *****************************/
|
||||
|
||||
|
||||
/***************** Macros (Inline Functions) Definitions *********************/
|
||||
|
||||
|
||||
/**************************** Type Definitions *******************************/
|
||||
|
||||
|
||||
/************************** Function Prototypes ******************************/
|
||||
|
||||
|
||||
/************************** Variable Definitions *****************************/
|
||||
|
||||
|
||||
/************************** Function Definitions *****************************/
|
||||
|
||||
/*****************************************************************************/
|
||||
/**
|
||||
*
|
||||
* This function reads complete Version register of Enhance core and compares
|
||||
* with zero values as part of self test.
|
||||
*
|
||||
* @param InstancePtr is a pointer to the XEnhance instance to be worked
|
||||
* on.
|
||||
*
|
||||
* @return
|
||||
* - XST_SUCCESS if the test was successful.
|
||||
* - XST_FAILURE if the test failed.
|
||||
*
|
||||
* @note None.
|
||||
*
|
||||
******************************************************************************/
|
||||
int XEnhance_SelfTest(XEnhance *InstancePtr)
|
||||
{
|
||||
u32 Version;
|
||||
int Status;
|
||||
|
||||
/* Verify arguments. */
|
||||
Xil_AssertNonvoid(InstancePtr != NULL);
|
||||
|
||||
/* Read Enhance core version register. */
|
||||
Version = XEnhance_ReadReg((InstancePtr)->Config.BaseAddress,
|
||||
(XENH_VERSION_OFFSET));
|
||||
|
||||
/* Compare Version with non-zero */
|
||||
if(Version != (u32)0x00) {
|
||||
Status = (XST_SUCCESS);
|
||||
}
|
||||
else {
|
||||
Status = (XST_FAILURE);
|
||||
}
|
||||
|
||||
return Status;
|
||||
}
|
||||
|
|
|
@ -1,35 +1,35 @@
|
|||
/******************************************************************************
|
||||
*
|
||||
* Copyright (C) 2014 Xilinx, Inc. All rights reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* Use of the Software is limited solely to applications:
|
||||
* (a) running on a Xilinx device, or
|
||||
* (b) that interact with a Xilinx device through a bus or interconnect.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* XILINX BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
|
||||
* OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*
|
||||
* Except as contained in this notice, the name of the Xilinx shall not be used
|
||||
* in advertising or otherwise to promote the sale, use or other dealings in
|
||||
* this Software without prior written authorization from Xilinx.
|
||||
*
|
||||
/******************************************************************************
|
||||
*
|
||||
* Copyright (C) 2014 Xilinx, Inc. All rights reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* Use of the Software is limited solely to applications:
|
||||
* (a) running on a Xilinx device, or
|
||||
* (b) that interact with a Xilinx device through a bus or interconnect.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* XILINX BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
|
||||
* OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*
|
||||
* Except as contained in this notice, the name of the Xilinx shall not be used
|
||||
* in advertising or otherwise to promote the sale, use or other dealings in
|
||||
* this Software without prior written authorization from Xilinx.
|
||||
*
|
||||
******************************************************************************/
|
||||
/*****************************************************************************/
|
||||
/*****************************************************************************/
|
||||
/**
|
||||
*
|
||||
* @file xenhance_sinit.c
|
||||
|
@ -39,75 +39,75 @@
|
|||
*
|
||||
* This file contains static initialization methods for Xilinx Enhance core.
|
||||
*
|
||||
* <pre>
|
||||
* MODIFICATION HISTORY:
|
||||
*
|
||||
* Ver Who Date Changes
|
||||
* ----- ---- -------- ------------------------------------------------------
|
||||
* 7.0 adk 02/19/14 First release.
|
||||
* Implemented the following function
|
||||
* XEnhance_LookupConfig
|
||||
* </pre>
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
/***************************** Include Files *********************************/
|
||||
|
||||
#include "xenhance.h"
|
||||
#include "xparameters.h"
|
||||
|
||||
/************************** Constant Definitions *****************************/
|
||||
|
||||
|
||||
/**************************** Type Definitions *******************************/
|
||||
|
||||
|
||||
/***************** Macros (Inline Functions) Definitions *********************/
|
||||
|
||||
|
||||
/************************** Function Prototypes ******************************/
|
||||
|
||||
|
||||
/************************** Variable Declaration *****************************/
|
||||
|
||||
|
||||
/************************** Function Definitions *****************************/
|
||||
|
||||
/*****************************************************************************/
|
||||
/**
|
||||
*
|
||||
* This function returns a reference to an XEnhance_Config structure
|
||||
* based on the unique device id, <i>DeviceId</i>. The return value will refer
|
||||
* to an entry in the device configuration table defined in the xenhance_g.c.
|
||||
* file.
|
||||
*
|
||||
* @param DeviceId is the unique device ID of the device for the lookup
|
||||
* operation.
|
||||
*
|
||||
* @return XEnhance_LookupConfig returns a reference to a config record in
|
||||
* the configuration table (in xenhance_g.c) corresponding to
|
||||
* <i>DeviceId</i>, or NULL if no match is found.
|
||||
*
|
||||
* @note None.
|
||||
*
|
||||
******************************************************************************/
|
||||
XEnhance_Config *XEnhance_LookupConfig(u16 DeviceId)
|
||||
{
|
||||
extern XEnhance_Config
|
||||
XEnhance_ConfigTable[XPAR_ENHANCE_NUM_INSTANCES];
|
||||
XEnhance_Config *CfgPtr = NULL;
|
||||
u32 Index;
|
||||
|
||||
/* To get the reference pointer to XEnhance_Config structure */
|
||||
for (Index = (u32)0x0; Index < (u32)(XPAR_ENHANCE_NUM_INSTANCES);
|
||||
Index++) {
|
||||
|
||||
/* Compare device Id with configTable's device Id */
|
||||
if (XEnhance_ConfigTable[Index].DeviceId == DeviceId) {
|
||||
CfgPtr = &XEnhance_ConfigTable[Index];
|
||||
break;
|
||||
}
|
||||
}
|
||||
* <pre>
|
||||
* MODIFICATION HISTORY:
|
||||
*
|
||||
* Ver Who Date Changes
|
||||
* ----- ---- -------- ------------------------------------------------------
|
||||
* 7.0 adk 02/19/14 First release.
|
||||
* Implemented the following function
|
||||
* XEnhance_LookupConfig
|
||||
* </pre>
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
/***************************** Include Files *********************************/
|
||||
|
||||
#include "xenhance.h"
|
||||
#include "xparameters.h"
|
||||
|
||||
/************************** Constant Definitions *****************************/
|
||||
|
||||
|
||||
/**************************** Type Definitions *******************************/
|
||||
|
||||
|
||||
/***************** Macros (Inline Functions) Definitions *********************/
|
||||
|
||||
|
||||
/************************** Function Prototypes ******************************/
|
||||
|
||||
|
||||
/************************** Variable Declaration *****************************/
|
||||
|
||||
|
||||
/************************** Function Definitions *****************************/
|
||||
|
||||
/*****************************************************************************/
|
||||
/**
|
||||
*
|
||||
* This function returns a reference to an XEnhance_Config structure
|
||||
* based on the unique device id, <i>DeviceId</i>. The return value will refer
|
||||
* to an entry in the device configuration table defined in the xenhance_g.c.
|
||||
* file.
|
||||
*
|
||||
* @param DeviceId is the unique device ID of the device for the lookup
|
||||
* operation.
|
||||
*
|
||||
* @return XEnhance_LookupConfig returns a reference to a config record in
|
||||
* the configuration table (in xenhance_g.c) corresponding to
|
||||
* <i>DeviceId</i>, or NULL if no match is found.
|
||||
*
|
||||
* @note None.
|
||||
*
|
||||
******************************************************************************/
|
||||
XEnhance_Config *XEnhance_LookupConfig(u16 DeviceId)
|
||||
{
|
||||
extern XEnhance_Config
|
||||
XEnhance_ConfigTable[XPAR_ENHANCE_NUM_INSTANCES];
|
||||
XEnhance_Config *CfgPtr = NULL;
|
||||
u32 Index;
|
||||
|
||||
/* To get the reference pointer to XEnhance_Config structure */
|
||||
for (Index = (u32)0x0; Index < (u32)(XPAR_ENHANCE_NUM_INSTANCES);
|
||||
Index++) {
|
||||
|
||||
/* Compare device Id with configTable's device Id */
|
||||
if (XEnhance_ConfigTable[Index].DeviceId == DeviceId) {
|
||||
CfgPtr = &XEnhance_ConfigTable[Index];
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return (XEnhance_Config *)CfgPtr;
|
||||
}
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
|
|
|
@ -1,51 +1,51 @@
|
|||
##############################################################################
|
||||
#
|
||||
# Copyright (C) 2008 - 2014 Xilinx, Inc. All rights reserved.
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"),to deal
|
||||
# in the Software without restriction, including without limitation the rights
|
||||
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
# copies of the Software, and to permit persons to whom the Software is
|
||||
# furnished to do so, subject to the following conditions:
|
||||
#
|
||||
# The above copyright notice and this permission notice shall be included in
|
||||
# all copies or substantial portions of the Software.
|
||||
#
|
||||
# Use of the Software is limited solely to applications:
|
||||
# (a) running on a Xilinx device, or
|
||||
# (b) that interact with a Xilinx device through a bus or interconnect.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
# XILINX BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
|
||||
# OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
# SOFTWARE.
|
||||
#
|
||||
# Except as contained in this notice, the name of the Xilinx shall not be used
|
||||
# in advertising or otherwise to promote the sale, use or other dealings in
|
||||
# this Software without prior written authorization from Xilinx.
|
||||
#
|
||||
# MODIFICATION HISTORY:
|
||||
#
|
||||
# Ver Who Date Changes
|
||||
# ----- ------ -------- ------------------------------------------------------
|
||||
# 1.00a adk 02/18/14 Removed the implementation of interrupt_handler array.
|
||||
#
|
||||
##############################################################################
|
||||
#
|
||||
# Copyright (C) 2008 - 2014 Xilinx, Inc. All rights reserved.
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"),to deal
|
||||
# in the Software without restriction, including without limitation the rights
|
||||
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
# copies of the Software, and to permit persons to whom the Software is
|
||||
# furnished to do so, subject to the following conditions:
|
||||
#
|
||||
# The above copyright notice and this permission notice shall be included in
|
||||
# all copies or substantial portions of the Software.
|
||||
#
|
||||
# Use of the Software is limited solely to applications:
|
||||
# (a) running on a Xilinx device, or
|
||||
# (b) that interact with a Xilinx device through a bus or interconnect.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
# XILINX BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
|
||||
# OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
# SOFTWARE.
|
||||
#
|
||||
# Except as contained in this notice, the name of the Xilinx shall not be used
|
||||
# in advertising or otherwise to promote the sale, use or other dealings in
|
||||
# this Software without prior written authorization from Xilinx.
|
||||
#
|
||||
# MODIFICATION HISTORY:
|
||||
#
|
||||
# Ver Who Date Changes
|
||||
# ----- ------ -------- ------------------------------------------------------
|
||||
# 1.00a adk 02/18/14 Removed the implementation of interrupt_handler array.
|
||||
#
|
||||
###############################################################################
|
||||
|
||||
OPTION psf_version = 2.1;
|
||||
|
||||
BEGIN driver osd
|
||||
|
||||
OPTION supported_peripherals = (v_osd_v[6-9]_[0-9]);
|
||||
OPTION driver_state = ACTIVE;
|
||||
OPTION copyfiles = all;
|
||||
OPTION VERSION = 4.0;
|
||||
OPTION NAME = osd;
|
||||
|
||||
END driver
|
||||
|
||||
|
||||
|
||||
OPTION psf_version = 2.1;
|
||||
|
||||
BEGIN driver osd
|
||||
|
||||
OPTION supported_peripherals = (v_osd_v[6-9]_[0-9]);
|
||||
OPTION driver_state = ACTIVE;
|
||||
OPTION copyfiles = all;
|
||||
OPTION VERSION = 4.0;
|
||||
OPTION NAME = osd;
|
||||
|
||||
END driver
|
||||
|
||||
|
||||
|
|
|
@ -1,32 +1,32 @@
|
|||
##############################################################################
|
||||
#
|
||||
# Copyright (C) 2008 - 2014 Xilinx, Inc. All rights reserved.
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"),to deal
|
||||
# in the Software without restriction, including without limitation the rights
|
||||
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
# copies of the Software, and to permit persons to whom the Software is
|
||||
# furnished to do so, subject to the following conditions:
|
||||
#
|
||||
# The above copyright notice and this permission notice shall be included in
|
||||
# all copies or substantial portions of the Software.
|
||||
#
|
||||
# Use of the Software is limited solely to applications:
|
||||
# (a) running on a Xilinx device, or
|
||||
# (b) that interact with a Xilinx device through a bus or interconnect.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
# XILINX BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
|
||||
# OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
# SOFTWARE.
|
||||
#
|
||||
# Except as contained in this notice, the name of the Xilinx shall not be used
|
||||
# in advertising or otherwise to promote the sale, use or other dealings in
|
||||
# this Software without prior written authorization from Xilinx.
|
||||
##############################################################################
|
||||
#
|
||||
# Copyright (C) 2008 - 2014 Xilinx, Inc. All rights reserved.
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"),to deal
|
||||
# in the Software without restriction, including without limitation the rights
|
||||
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
# copies of the Software, and to permit persons to whom the Software is
|
||||
# furnished to do so, subject to the following conditions:
|
||||
#
|
||||
# The above copyright notice and this permission notice shall be included in
|
||||
# all copies or substantial portions of the Software.
|
||||
#
|
||||
# Use of the Software is limited solely to applications:
|
||||
# (a) running on a Xilinx device, or
|
||||
# (b) that interact with a Xilinx device through a bus or interconnect.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
# XILINX BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
|
||||
# OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
# SOFTWARE.
|
||||
#
|
||||
# Except as contained in this notice, the name of the Xilinx shall not be used
|
||||
# in advertising or otherwise to promote the sale, use or other dealings in
|
||||
# this Software without prior written authorization from Xilinx.
|
||||
###############################################################################
|
||||
#uses "xillib.tcl"
|
||||
|
||||
|
|
|
@ -1,17 +1,17 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Language" content="en-us">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>Driver example applications</title>
|
||||
<link rel="stylesheet" type="text/css" href="../help.css">
|
||||
</head>
|
||||
<body bgcolor="#FFFFFF">
|
||||
<h1> Example Applications for the driver osd_v3_1 </h1>
|
||||
<HR>
|
||||
<ul>
|
||||
<li>osd_selftest_example.c <a href="osd_selftest_example.c">(source)</a> </li>
|
||||
</ul>
|
||||
<p><font face="Times New Roman" color="#800000">Copyright ? 1995-2014 Xilinx, Inc. All rights reserved.</font></p>
|
||||
</body>
|
||||
</html>
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Language" content="en-us">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>Driver example applications</title>
|
||||
<link rel="stylesheet" type="text/css" href="../help.css">
|
||||
</head>
|
||||
<body bgcolor="#FFFFFF">
|
||||
<h1> Example Applications for the driver osd_v3_1 </h1>
|
||||
<HR>
|
||||
<ul>
|
||||
<li>osd_selftest_example.c <a href="osd_selftest_example.c">(source)</a> </li>
|
||||
</ul>
|
||||
<p><font face="Times New Roman" color="#800000">Copyright ? 1995-2014 Xilinx, Inc. All rights reserved.</font></p>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -1,150 +1,150 @@
|
|||
/******************************************************************************
|
||||
*
|
||||
* Copyright (C) 2014 Xilinx, Inc. All rights reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* Use of the Software is limited solely to applications:
|
||||
* (a) running on a Xilinx device, or
|
||||
* (b) that interact with a Xilinx device through a bus or interconnect.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* XILINX BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
|
||||
* OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*
|
||||
* Except as contained in this notice, the name of the Xilinx shall not be used
|
||||
* in advertising or otherwise to promote the sale, use or other dealings in
|
||||
* this Software without prior written authorization from Xilinx.
|
||||
*
|
||||
******************************************************************************/
|
||||
/*****************************************************************************/
|
||||
/**
|
||||
*
|
||||
* @file osd_selftest_example.c
|
||||
*
|
||||
* This file contains an example using the OSD driver to do self test
|
||||
* on the core.
|
||||
*
|
||||
* @note None.
|
||||
*
|
||||
* MODIFICATION HISTORY:
|
||||
* <pre>
|
||||
* Ver Who Date Changes
|
||||
* ----- ------ -------- ------------------------------------------------------
|
||||
* 4.0 adk 02/18/14 First Release
|
||||
* </pre>
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
/***************************** Include Files *********************************/
|
||||
|
||||
#include "xparameters.h"
|
||||
#include "xosd.h"
|
||||
#include "xil_printf.h"
|
||||
|
||||
/************************** Constant Definitions *****************************/
|
||||
|
||||
/**
|
||||
* The following constants map to the XPAR parameters created in the
|
||||
* xparameters.h file. They are defined here such that a user can easily
|
||||
* change all the needed parameters in one place.
|
||||
*/
|
||||
#define XOSD_DEVICE_ID XPAR_OSD_0_DEVICE_ID
|
||||
|
||||
/**************************** Type Definitions *******************************/
|
||||
|
||||
|
||||
/***************** Macros (Inline Functions) Definitions *********************/
|
||||
|
||||
|
||||
/************************** Function Prototypes ******************************/
|
||||
|
||||
int XOsdSelfTestExample(u16 DeviceId);
|
||||
|
||||
/************************** Variable Definitions *****************************/
|
||||
|
||||
XOsd OsdInst; /**< Instance of the OSD Device */
|
||||
|
||||
/*****************************************************************************/
|
||||
/**
|
||||
*
|
||||
* Main/Entry function for self test example.
|
||||
*
|
||||
* @return
|
||||
* - XST_SUCCESS if successful.
|
||||
* - XST_FAILURE if unsuccessful.
|
||||
*
|
||||
* @note None
|
||||
*
|
||||
******************************************************************************/
|
||||
int main(void)
|
||||
{
|
||||
int Status;
|
||||
|
||||
/* Run selftest example */
|
||||
Status = XOsdSelfTestExample(XOSD_DEVICE_ID);
|
||||
|
||||
if (Status != XST_SUCCESS) {
|
||||
xil_printf("OSD driver Selftest Example Failed\r\n");
|
||||
return XST_FAILURE;
|
||||
}
|
||||
|
||||
xil_printf("Successfully ran OSD driver Selftest Example\r\n");
|
||||
|
||||
return XST_SUCCESS;
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/**
|
||||
*
|
||||
* This function does a minimal test on the OSD driver.
|
||||
*
|
||||
* @param DeviceId is an ID of OSD core or device.
|
||||
*
|
||||
* @return
|
||||
* - XST_SUCCESS if successful.
|
||||
* - XST_FAILURE if unsuccessful.
|
||||
*
|
||||
* @note None.
|
||||
*
|
||||
******************************************************************************/
|
||||
int XOsdSelfTestExample(u16 DeviceId)
|
||||
{
|
||||
int Status;
|
||||
XOsd_Config *Config;
|
||||
|
||||
/* Initialize the OSD driver so that it's ready to use look up the
|
||||
* configuration in the config table, then initialize it.
|
||||
*/
|
||||
Config = XOsd_LookupConfig(DeviceId);
|
||||
|
||||
if (NULL == Config) {
|
||||
return XST_FAILURE;
|
||||
}
|
||||
|
||||
Status = XOsd_CfgInitialize(&OsdInst, Config, Config->BaseAddress);
|
||||
|
||||
if (Status != XST_SUCCESS) {
|
||||
return XST_FAILURE;
|
||||
}
|
||||
/* Perform a self-test to check hardware build. */
|
||||
Status = XOsd_SelfTest(&OsdInst);
|
||||
|
||||
if (Status != XST_SUCCESS) {
|
||||
return XST_FAILURE;
|
||||
}
|
||||
|
||||
return XST_SUCCESS;
|
||||
}
|
||||
/******************************************************************************
|
||||
*
|
||||
* Copyright (C) 2014 Xilinx, Inc. All rights reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* Use of the Software is limited solely to applications:
|
||||
* (a) running on a Xilinx device, or
|
||||
* (b) that interact with a Xilinx device through a bus or interconnect.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* XILINX BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
|
||||
* OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*
|
||||
* Except as contained in this notice, the name of the Xilinx shall not be used
|
||||
* in advertising or otherwise to promote the sale, use or other dealings in
|
||||
* this Software without prior written authorization from Xilinx.
|
||||
*
|
||||
******************************************************************************/
|
||||
/*****************************************************************************/
|
||||
/**
|
||||
*
|
||||
* @file osd_selftest_example.c
|
||||
*
|
||||
* This file contains an example using the OSD driver to do self test
|
||||
* on the core.
|
||||
*
|
||||
* @note None.
|
||||
*
|
||||
* MODIFICATION HISTORY:
|
||||
* <pre>
|
||||
* Ver Who Date Changes
|
||||
* ----- ------ -------- ------------------------------------------------------
|
||||
* 4.0 adk 02/18/14 First Release
|
||||
* </pre>
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
/***************************** Include Files *********************************/
|
||||
|
||||
#include "xparameters.h"
|
||||
#include "xosd.h"
|
||||
#include "xil_printf.h"
|
||||
|
||||
/************************** Constant Definitions *****************************/
|
||||
|
||||
/**
|
||||
* The following constants map to the XPAR parameters created in the
|
||||
* xparameters.h file. They are defined here such that a user can easily
|
||||
* change all the needed parameters in one place.
|
||||
*/
|
||||
#define XOSD_DEVICE_ID XPAR_OSD_0_DEVICE_ID
|
||||
|
||||
/**************************** Type Definitions *******************************/
|
||||
|
||||
|
||||
/***************** Macros (Inline Functions) Definitions *********************/
|
||||
|
||||
|
||||
/************************** Function Prototypes ******************************/
|
||||
|
||||
int XOsdSelfTestExample(u16 DeviceId);
|
||||
|
||||
/************************** Variable Definitions *****************************/
|
||||
|
||||
XOsd OsdInst; /**< Instance of the OSD Device */
|
||||
|
||||
/*****************************************************************************/
|
||||
/**
|
||||
*
|
||||
* Main/Entry function for self test example.
|
||||
*
|
||||
* @return
|
||||
* - XST_SUCCESS if successful.
|
||||
* - XST_FAILURE if unsuccessful.
|
||||
*
|
||||
* @note None
|
||||
*
|
||||
******************************************************************************/
|
||||
int main(void)
|
||||
{
|
||||
int Status;
|
||||
|
||||
/* Run selftest example */
|
||||
Status = XOsdSelfTestExample(XOSD_DEVICE_ID);
|
||||
|
||||
if (Status != XST_SUCCESS) {
|
||||
xil_printf("OSD driver Selftest Example Failed\r\n");
|
||||
return XST_FAILURE;
|
||||
}
|
||||
|
||||
xil_printf("Successfully ran OSD driver Selftest Example\r\n");
|
||||
|
||||
return XST_SUCCESS;
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/**
|
||||
*
|
||||
* This function does a minimal test on the OSD driver.
|
||||
*
|
||||
* @param DeviceId is an ID of OSD core or device.
|
||||
*
|
||||
* @return
|
||||
* - XST_SUCCESS if successful.
|
||||
* - XST_FAILURE if unsuccessful.
|
||||
*
|
||||
* @note None.
|
||||
*
|
||||
******************************************************************************/
|
||||
int XOsdSelfTestExample(u16 DeviceId)
|
||||
{
|
||||
int Status;
|
||||
XOsd_Config *Config;
|
||||
|
||||
/* Initialize the OSD driver so that it's ready to use look up the
|
||||
* configuration in the config table, then initialize it.
|
||||
*/
|
||||
Config = XOsd_LookupConfig(DeviceId);
|
||||
|
||||
if (NULL == Config) {
|
||||
return XST_FAILURE;
|
||||
}
|
||||
|
||||
Status = XOsd_CfgInitialize(&OsdInst, Config, Config->BaseAddress);
|
||||
|
||||
if (Status != XST_SUCCESS) {
|
||||
return XST_FAILURE;
|
||||
}
|
||||
/* Perform a self-test to check hardware build. */
|
||||
Status = XOsd_SelfTest(&OsdInst);
|
||||
|
||||
if (Status != XST_SUCCESS) {
|
||||
return XST_FAILURE;
|
||||
}
|
||||
|
||||
return XST_SUCCESS;
|
||||
}
|
||||
|
|
|
@ -1,29 +1,29 @@
|
|||
COMPILER=
|
||||
ARCHIVER=
|
||||
CP=cp
|
||||
COMPILER_FLAGS=
|
||||
EXTRA_COMPILER_FLAGS=
|
||||
LIB=libxil.a
|
||||
LEVEL=0
|
||||
|
||||
RELEASEDIR=../../../lib
|
||||
INCLUDEDIR=../../../include
|
||||
INCLUDES=-I./. -I${INCLUDEDIR}
|
||||
|
||||
INCLUDEFILES=*.h
|
||||
LIBSOURCES=*.c
|
||||
|
||||
OUTS = *.o
|
||||
|
||||
libs:
|
||||
echo "Compiling osd"
|
||||
$(COMPILER) $(COMPILER_FLAGS) $(EXTRA_COMPILER_FLAGS) $(INCLUDES) $(LIBSOURCES)
|
||||
$(ARCHIVER) -r ${RELEASEDIR}/${LIB} ${OUTS}
|
||||
make clean
|
||||
|
||||
include:
|
||||
${CP} $(INCLUDEFILES) $(INCLUDEDIR)
|
||||
|
||||
clean:
|
||||
rm -rf ${OUTS}
|
||||
|
||||
COMPILER=
|
||||
ARCHIVER=
|
||||
CP=cp
|
||||
COMPILER_FLAGS=
|
||||
EXTRA_COMPILER_FLAGS=
|
||||
LIB=libxil.a
|
||||
LEVEL=0
|
||||
|
||||
RELEASEDIR=../../../lib
|
||||
INCLUDEDIR=../../../include
|
||||
INCLUDES=-I./. -I${INCLUDEDIR}
|
||||
|
||||
INCLUDEFILES=*.h
|
||||
LIBSOURCES=*.c
|
||||
|
||||
OUTS = *.o
|
||||
|
||||
libs:
|
||||
echo "Compiling osd"
|
||||
$(COMPILER) $(COMPILER_FLAGS) $(EXTRA_COMPILER_FLAGS) $(INCLUDES) $(LIBSOURCES)
|
||||
$(ARCHIVER) -r ${RELEASEDIR}/${LIB} ${OUTS}
|
||||
make clean
|
||||
|
||||
include:
|
||||
${CP} $(INCLUDEFILES) $(INCLUDEDIR)
|
||||
|
||||
clean:
|
||||
rm -rf ${OUTS}
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
@ -12,134 +12,134 @@ Copyright 1986-2014 Xilinx, Inc. All Rights reserved.
|
|||
* Description: Driver configuration
|
||||
*
|
||||
*******************************************************************/
|
||||
|
||||
#include "xparameters.h"
|
||||
#include "xosd.h"
|
||||
|
||||
/*
|
||||
* The configuration table for devices
|
||||
*/
|
||||
|
||||
XOsd_Config XOsd_ConfigTable[] =
|
||||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R_HDMI_OUTPUT_V_OSD_1_LAYER7_INS_TEXT_EN,
|
||||
XPAR_HDMI_OUTPUT_V_OSD_1_LAYER7_CLUT_SIZE,
|
||||
XPAR_HDMI_OUTPUT_V_OSD_1_LAYER7_CLUT_MEMTYPE,
|
||||
XPAR_HDMI_OUTPUT_V_OSD_1_LAYER7_FONT_NUM_CHARS,
|
||||
XPAR_HDMI_OUTPUT_V_OSD_1_LAYER7_FONT_WIDTH,
|
||||
XPAR_HDMI_OUTPUT_V_OSD_1_LAYER7_FONT_HEIGHT,
|
||||
XPAR_HDMI_OUTPUT_V_OSD_1_LAYER7_FONT_BPP,
|
||||
XPAR_HDMI_OUTPUT_V_OSD_1_LAYER7_FONT_ASCII_OFFSET,
|
||||
XPAR_HDMI_OUTPUT_V_OSD_1_LAYER7_TEXT_NUM_STRINGS,
|
||||
XPAR_HDMI_OUTPUT_V_OSD_1_LAYER7_TEXT_MAX_STRING_LENGTH
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
#include "xparameters.h"
|
||||
#include "xosd.h"
|
||||
|
||||
/*
|
||||
* The configuration table for devices
|
||||
*/
|
||||
|
||||
XOsd_Config XOsd_ConfigTable[] =
|
||||
{
|
||||
{
|
||||
XPAR_HDMI_OUTPUT_V_OSD_1_DEVICE_ID,
|
||||
XPAR_HDMI_OUTPUT_V_OSD_1_BASEADDR,
|
||||
XPAR_HDMI_OUTPUT_V_OSD_1_NUM_LAYERS,
|
||||
XPAR_HDMI_OUTPUT_V_OSD_1_S_AXIS_VIDEO_DATA_WIDTH,
|
||||
XPAR_HDMI_OUTPUT_V_OSD_1_LAYER0_TYPE,
|
||||
XPAR_HDMI_OUTPUT_V_OSD_1_LAYER1_TYPE,
|
||||
XPAR_HDMI_OUTPUT_V_OSD_1_LAYER2_TYPE,
|
||||
XPAR_HDMI_OUTPUT_V_OSD_1_LAYER3_TYPE,
|
||||
XPAR_HDMI_OUTPUT_V_OSD_1_LAYER4_TYPE,
|
||||
XPAR_HDM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_1_LAYER7_TEXT_NUM_STRINGS,
|
||||
XPAR_HDMI_OUTPUT_V_OSD_1_LAYER7_TEXT_MAX_STRING_LENGTH
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -1,35 +1,35 @@
|
|||
/******************************************************************************
|
||||
*
|
||||
* Copyright (C) 2009 - 2014 Xilinx, Inc. All rights reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* Use of the Software is limited solely to applications:
|
||||
* (a) running on a Xilinx device, or
|
||||
* (b) that interact with a Xilinx device through a bus or interconnect.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* XILINX BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
|
||||
* OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*
|
||||
* Except as contained in this notice, the name of the Xilinx shall not be used
|
||||
* in advertising or otherwise to promote the sale, use or other dealings in
|
||||
* this Software without prior written authorization from Xilinx.
|
||||
*
|
||||
******************************************************************************/
|
||||
/*****************************************************************************/
|
||||
/******************************************************************************
|
||||
*
|
||||
* Copyright (C) 2009 - 2014 Xilinx, Inc. All rights reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* Use of the Software is limited solely to applications:
|
||||
* (a) running on a Xilinx device, or
|
||||
* (b) that interact with a Xilinx device through a bus or interconnect.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* XILINX BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
|
||||
* OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*
|
||||
* Except as contained in this notice, the name of the Xilinx shall not be used
|
||||
* in advertising or otherwise to promote the sale, use or other dealings in
|
||||
* this Software without prior written authorization from Xilinx.
|
||||
*
|
||||
******************************************************************************/
|
||||
/*****************************************************************************/
|
||||
/**
|
||||
*
|
||||
* @file xosd_intr.c
|
||||
|
@ -39,80 +39,80 @@
|
|||
*
|
||||
* This code contains interrupt related functions of Xilinx Video
|
||||
* On-Screen-Display core. Please see xosd.h for more details of
|
||||
* the driver.
|
||||
*
|
||||
* <pre>
|
||||
* MODIFICATION HISTORY:
|
||||
*
|
||||
* Ver Who Date Changes
|
||||
* ----- ------ -------- -------------------------------------------------------
|
||||
* 1.00a xd 08/18/08 First release.
|
||||
* 2.00a cjm 12/18/12 Converted from xio.h to xil_io.h, translating basic
|
||||
* types, MB cache functions, exceptions and assertions
|
||||
* to xil_io format.
|
||||
* 4.0 adk 02/18/14 Renamed the following functions:
|
||||
* XOSD_IntrHandler - > XOsd_IntrHandler.
|
||||
* XOSD_SetCallBack -> XOsd_SetCallBack.
|
||||
* Removed the following handlers:
|
||||
* XOSD_HANDLER_VBISTART, XOSD_HANDLER_VBIEND.
|
||||
* Added new handler XOSD_HANDLER_PROCSTART.
|
||||
* </pre>
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
/***************************** Include Files *********************************/
|
||||
|
||||
#include "xosd.h"
|
||||
|
||||
/***************** Macros (Inline Functions) Definitions *********************/
|
||||
|
||||
|
||||
/**************************** Type Definitions *******************************/
|
||||
|
||||
|
||||
/************************** Function Prototypes ******************************/
|
||||
|
||||
|
||||
/************************** Variable Definitions *****************************/
|
||||
|
||||
|
||||
/************************** Function Definitions *****************************/
|
||||
|
||||
/*****************************************************************************/
|
||||
/**
|
||||
*
|
||||
* This function is the interrupt handler for the On-Screen-Display driver.
|
||||
*
|
||||
* This handler reads the pending interrupt from the IER/ISR, determines the
|
||||
* source of the interrupts, calls according callbacks, and finally clears the
|
||||
* interrupts.
|
||||
*
|
||||
* The application is responsible for connecting this function to the interrupt
|
||||
* system. Application beyond this driver is also responsible for providing
|
||||
* callbacks to handle interrupts and installing the callbacks using
|
||||
* XOsd_SetCallBack() during initialization phase.
|
||||
*
|
||||
* @param InstancePtr is a pointer to the XOsd instance that just
|
||||
* interrupted.
|
||||
*
|
||||
* @return None.
|
||||
*
|
||||
* @note None.
|
||||
*
|
||||
******************************************************************************/
|
||||
void XOsd_IntrHandler(void *InstancePtr)
|
||||
{
|
||||
u32 PendingIntr;
|
||||
u32 ErrorStatus;
|
||||
XOsd *XOsdPtr = NULL;
|
||||
|
||||
XOsdPtr = (XOsd *)((void *)InstancePtr);
|
||||
|
||||
/* Validate arguments. */
|
||||
Xil_AssertVoid(XOsdPtr != NULL);
|
||||
Xil_AssertVoid(XOsdPtr->IsReady == (u32)(XIL_COMPONENT_IS_READY));
|
||||
|
||||
/* Get pending interrupts. */
|
||||
* the driver.
|
||||
*
|
||||
* <pre>
|
||||
* MODIFICATION HISTORY:
|
||||
*
|
||||
* Ver Who Date Changes
|
||||
* ----- ------ -------- -------------------------------------------------------
|
||||
* 1.00a xd 08/18/08 First release.
|
||||
* 2.00a cjm 12/18/12 Converted from xio.h to xil_io.h, translating basic
|
||||
* types, MB cache functions, exceptions and assertions
|
||||
* to xil_io format.
|
||||
* 4.0 adk 02/18/14 Renamed the following functions:
|
||||
* XOSD_IntrHandler - > XOsd_IntrHandler.
|
||||
* XOSD_SetCallBack -> XOsd_SetCallBack.
|
||||
* Removed the following handlers:
|
||||
* XOSD_HANDLER_VBISTART, XOSD_HANDLER_VBIEND.
|
||||
* Added new handler XOSD_HANDLER_PROCSTART.
|
||||
* </pre>
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
/***************************** Include Files *********************************/
|
||||
|
||||
#include "xosd.h"
|
||||
|
||||
/***************** Macros (Inline Functions) Definitions *********************/
|
||||
|
||||
|
||||
/**************************** Type Definitions *******************************/
|
||||
|
||||
|
||||
/************************** Function Prototypes ******************************/
|
||||
|
||||
|
||||
/************************** Variable Definitions *****************************/
|
||||
|
||||
|
||||
/************************** Function Definitions *****************************/
|
||||
|
||||
/*****************************************************************************/
|
||||
/**
|
||||
*
|
||||
* This function is the interrupt handler for the On-Screen-Display driver.
|
||||
*
|
||||
* This handler reads the pending interrupt from the IER/ISR, determines the
|
||||
* source of the interrupts, calls according callbacks, and finally clears the
|
||||
* interrupts.
|
||||
*
|
||||
* The application is responsible for connecting this function to the interrupt
|
||||
* system. Application beyond this driver is also responsible for providing
|
||||
* callbacks to handle interrupts and installing the callbacks using
|
||||
* XOsd_SetCallBack() during initialization phase.
|
||||
*
|
||||
* @param InstancePtr is a pointer to the XOsd instance that just
|
||||
* interrupted.
|
||||
*
|
||||
* @return None.
|
||||
*
|
||||
* @note None.
|
||||
*
|
||||
******************************************************************************/
|
||||
void XOsd_IntrHandler(void *InstancePtr)
|
||||
{
|
||||
u32 PendingIntr;
|
||||
u32 ErrorStatus;
|
||||
XOsd *XOsdPtr = NULL;
|
||||
|
||||
XOsdPtr = (XOsd *)((void *)InstancePtr);
|
||||
|
||||
/* Validate arguments. */
|
||||
Xil_AssertVoid(XOsdPtr != NULL);
|
||||
Xil_AssertVoid(XOsdPtr->IsReady == (u32)(XIL_COMPONENT_IS_READY));
|
||||
|
||||
/* Get pending interrupts. */
|
||||
PendingIntr = (u32)(XOsd_IntrGetPending(XOsdPtr));
|
||||
|
||||
/* Error interrupt is occurring or spurious interrupt. */
|
||||
|
@ -120,93 +120,93 @@ void XOsd_IntrHandler(void *InstancePtr)
|
|||
ErrorStatus = (PendingIntr) & (XOSD_IXR_ALLERR_MASK);
|
||||
XOsdPtr->ErrCallBack(XOsdPtr->ErrRef, ErrorStatus);
|
||||
}
|
||||
|
||||
/* A Processing start interrupt has occurred. */
|
||||
if (((PendingIntr) & (XOSD_IXR_PROC_STARTED_MASK)) ==
|
||||
(XOSD_IXR_PROC_STARTED_MASK)) {
|
||||
XOsdPtr->ProcStartCallBack(XOsdPtr->ProcStartRef);
|
||||
}
|
||||
|
||||
/* A frame done interrupt has occurred. */
|
||||
if (((PendingIntr) & (XOSD_IXR_EOF_MASK)) ==
|
||||
(XOSD_IXR_EOF_MASK)) {
|
||||
XOsdPtr->FrameDoneCallBack(XOsdPtr->FrameDoneRef);
|
||||
}
|
||||
|
||||
/* Clear pending interrupts. */
|
||||
XOsd_IntrClear(XOsdPtr, PendingIntr);
|
||||
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/**
|
||||
*
|
||||
* This routine installs an asynchronous callback function for the given
|
||||
* HandlerType:
|
||||
*
|
||||
* <pre>
|
||||
* HandlerType Callback Function Type
|
||||
* ----------------------- -------------------------------
|
||||
* XOSD_HANDLER_PROCSTART StubCallBack
|
||||
* XOSD_HANDLER_FRAMEDONE StubCallBack
|
||||
* XOSD_HANDLER_ERROR StubErrCallBack
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @param InstancePtr is a pointer to the XOsd instance to be worked on.
|
||||
* @param HandlerType specifies which callback is to be attached.
|
||||
* @param CallBackFunc is the address of the callback function.
|
||||
* @param CallBackRef is a user data item that will be passed to the
|
||||
* callback function when it is invoked.
|
||||
*
|
||||
* @return - XST_SUCCESS when handler is installed.
|
||||
* - XST_INVALID_PARAM when HandlerType is invalid.
|
||||
*
|
||||
* @note Invoking this function for a handler that already has been
|
||||
* installed replaces it with the new handler.
|
||||
*
|
||||
******************************************************************************/
|
||||
int XOsd_SetCallBack(XOsd *InstancePtr, u32 HandlerType,
|
||||
void *CallBackFunc, void *CallBackRef)
|
||||
{
|
||||
int Status;
|
||||
|
||||
/* Verify arguments. */
|
||||
Xil_AssertNonvoid(InstancePtr != NULL);
|
||||
Xil_AssertNonvoid(InstancePtr->IsReady ==
|
||||
(u32)(XIL_COMPONENT_IS_READY));
|
||||
Xil_AssertNonvoid(CallBackFunc != NULL);
|
||||
Xil_AssertNonvoid(CallBackRef != NULL);
|
||||
Xil_AssertNonvoid((HandlerType >= (u32)(XOSD_HANDLER_PROCSTART)) &&
|
||||
(HandlerType <= (u32)(XOSD_HANDLER_ERROR)));
|
||||
|
||||
/* Setting the HandlerType. */
|
||||
switch (HandlerType) {
|
||||
case XOSD_HANDLER_PROCSTART:
|
||||
InstancePtr->ProcStartCallBack =
|
||||
(XOsd_CallBack)((void *)CallBackFunc);
|
||||
InstancePtr->ProcStartRef = CallBackRef;
|
||||
Status = (XST_SUCCESS);
|
||||
break;
|
||||
|
||||
case XOSD_HANDLER_FRAMEDONE:
|
||||
InstancePtr->FrameDoneCallBack =
|
||||
(XOsd_CallBack)((void *)CallBackFunc);
|
||||
InstancePtr->FrameDoneRef = CallBackRef;
|
||||
Status = (XST_SUCCESS);
|
||||
break;
|
||||
|
||||
case XOSD_HANDLER_ERROR:
|
||||
InstancePtr->ErrCallBack =
|
||||
(XOsd_ErrorCallBack)((void *)CallBackFunc);
|
||||
InstancePtr->ErrRef = CallBackRef;
|
||||
Status = (XST_SUCCESS);
|
||||
break;
|
||||
|
||||
default:
|
||||
Status = (XST_INVALID_PARAM);
|
||||
break;
|
||||
}
|
||||
|
||||
/* A Processing start interrupt has occurred. */
|
||||
if (((PendingIntr) & (XOSD_IXR_PROC_STARTED_MASK)) ==
|
||||
(XOSD_IXR_PROC_STARTED_MASK)) {
|
||||
XOsdPtr->ProcStartCallBack(XOsdPtr->ProcStartRef);
|
||||
}
|
||||
|
||||
/* A frame done interrupt has occurred. */
|
||||
if (((PendingIntr) & (XOSD_IXR_EOF_MASK)) ==
|
||||
(XOSD_IXR_EOF_MASK)) {
|
||||
XOsdPtr->FrameDoneCallBack(XOsdPtr->FrameDoneRef);
|
||||
}
|
||||
|
||||
/* Clear pending interrupts. */
|
||||
XOsd_IntrClear(XOsdPtr, PendingIntr);
|
||||
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/**
|
||||
*
|
||||
* This routine installs an asynchronous callback function for the given
|
||||
* HandlerType:
|
||||
*
|
||||
* <pre>
|
||||
* HandlerType Callback Function Type
|
||||
* ----------------------- -------------------------------
|
||||
* XOSD_HANDLER_PROCSTART StubCallBack
|
||||
* XOSD_HANDLER_FRAMEDONE StubCallBack
|
||||
* XOSD_HANDLER_ERROR StubErrCallBack
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @param InstancePtr is a pointer to the XOsd instance to be worked on.
|
||||
* @param HandlerType specifies which callback is to be attached.
|
||||
* @param CallBackFunc is the address of the callback function.
|
||||
* @param CallBackRef is a user data item that will be passed to the
|
||||
* callback function when it is invoked.
|
||||
*
|
||||
* @return - XST_SUCCESS when handler is installed.
|
||||
* - XST_INVALID_PARAM when HandlerType is invalid.
|
||||
*
|
||||
* @note Invoking this function for a handler that already has been
|
||||
* installed replaces it with the new handler.
|
||||
*
|
||||
******************************************************************************/
|
||||
int XOsd_SetCallBack(XOsd *InstancePtr, u32 HandlerType,
|
||||
void *CallBackFunc, void *CallBackRef)
|
||||
{
|
||||
int Status;
|
||||
|
||||
/* Verify arguments. */
|
||||
Xil_AssertNonvoid(InstancePtr != NULL);
|
||||
Xil_AssertNonvoid(InstancePtr->IsReady ==
|
||||
(u32)(XIL_COMPONENT_IS_READY));
|
||||
Xil_AssertNonvoid(CallBackFunc != NULL);
|
||||
Xil_AssertNonvoid(CallBackRef != NULL);
|
||||
Xil_AssertNonvoid((HandlerType >= (u32)(XOSD_HANDLER_PROCSTART)) &&
|
||||
(HandlerType <= (u32)(XOSD_HANDLER_ERROR)));
|
||||
|
||||
/* Setting the HandlerType. */
|
||||
switch (HandlerType) {
|
||||
case XOSD_HANDLER_PROCSTART:
|
||||
InstancePtr->ProcStartCallBack =
|
||||
(XOsd_CallBack)((void *)CallBackFunc);
|
||||
InstancePtr->ProcStartRef = CallBackRef;
|
||||
Status = (XST_SUCCESS);
|
||||
break;
|
||||
|
||||
case XOSD_HANDLER_FRAMEDONE:
|
||||
InstancePtr->FrameDoneCallBack =
|
||||
(XOsd_CallBack)((void *)CallBackFunc);
|
||||
InstancePtr->FrameDoneRef = CallBackRef;
|
||||
Status = (XST_SUCCESS);
|
||||
break;
|
||||
|
||||
case XOSD_HANDLER_ERROR:
|
||||
InstancePtr->ErrCallBack =
|
||||
(XOsd_ErrorCallBack)((void *)CallBackFunc);
|
||||
InstancePtr->ErrRef = CallBackRef;
|
||||
Status = (XST_SUCCESS);
|
||||
break;
|
||||
|
||||
default:
|
||||
Status = (XST_INVALID_PARAM);
|
||||
break;
|
||||
}
|
||||
|
||||
return Status;
|
||||
}
|
||||
|
|
|
@ -1,35 +1,35 @@
|
|||
/******************************************************************************
|
||||
*
|
||||
* Copyright (C) 2014 Xilinx, Inc. All rights reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* Use of the Software is limited solely to applications:
|
||||
* (a) running on a Xilinx device, or
|
||||
* (b) that interact with a Xilinx device through a bus or interconnect.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* XILINX BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
|
||||
* OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*
|
||||
* Except as contained in this notice, the name of the Xilinx shall not be used
|
||||
* in advertising or otherwise to promote the sale, use or other dealings in
|
||||
* this Software without prior written authorization from Xilinx.
|
||||
*
|
||||
/******************************************************************************
|
||||
*
|
||||
* Copyright (C) 2014 Xilinx, Inc. All rights reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* Use of the Software is limited solely to applications:
|
||||
* (a) running on a Xilinx device, or
|
||||
* (b) that interact with a Xilinx device through a bus or interconnect.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* XILINX BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
|
||||
* OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*
|
||||
* Except as contained in this notice, the name of the Xilinx shall not be used
|
||||
* in advertising or otherwise to promote the sale, use or other dealings in
|
||||
* this Software without prior written authorization from Xilinx.
|
||||
*
|
||||
******************************************************************************/
|
||||
/*****************************************************************************/
|
||||
/*****************************************************************************/
|
||||
/**
|
||||
*
|
||||
* @file xosd_selftest.c
|
||||
|
@ -39,72 +39,72 @@
|
|||
*
|
||||
* This file contains the self-test function for the OSD core.
|
||||
*
|
||||
* <pre>
|
||||
* MODIFICATION HISTORY:
|
||||
*
|
||||
* Ver Who Date Changes
|
||||
* ----- ------ -------- --------------------------------------------------
|
||||
* 4.0 adk 02/18/14 First Release.
|
||||
* Implemented the following functions:
|
||||
* XOsd_SelfTest.
|
||||
* </pre>
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
/***************************** Include Files *********************************/
|
||||
|
||||
#include "xosd.h"
|
||||
|
||||
/************************** Constant Definitions *****************************/
|
||||
|
||||
|
||||
/***************** Macros (Inline Functions) Definitions *********************/
|
||||
|
||||
|
||||
/**************************** Type Definitions *******************************/
|
||||
|
||||
|
||||
/************************** Function Prototypes ******************************/
|
||||
|
||||
|
||||
/************************** Variable Definitions *****************************/
|
||||
|
||||
|
||||
/************************** Function Definitions *****************************/
|
||||
|
||||
/*****************************************************************************/
|
||||
/**
|
||||
*
|
||||
* This function reads Version register of OSD core and compares with zero
|
||||
* as part of self test.
|
||||
*
|
||||
* @param InstancePtr is a pointer to the XOsd instance.
|
||||
*
|
||||
* @return - XST_SUCCESS if the Version register read test was successful.
|
||||
* - XST_FAILURE if the Version register read test failed.
|
||||
*
|
||||
* @note None.
|
||||
*
|
||||
******************************************************************************/
|
||||
int XOsd_SelfTest(XOsd *InstancePtr)
|
||||
{
|
||||
u32 Version;
|
||||
int Status;
|
||||
|
||||
/* Verify argument. */
|
||||
Xil_AssertNonvoid(InstancePtr != NULL);
|
||||
|
||||
/* Read OSD core Version register. */
|
||||
Version = XOsd_ReadReg(InstancePtr->Config.BaseAddress,
|
||||
(XOSD_VER_OFFSET));
|
||||
|
||||
/* Compare Version with zero. */
|
||||
if (Version != (u32)0x0) {
|
||||
Status = (XST_SUCCESS);
|
||||
}
|
||||
else {
|
||||
Status = (XST_FAILURE);
|
||||
}
|
||||
* <pre>
|
||||
* MODIFICATION HISTORY:
|
||||
*
|
||||
* Ver Who Date Changes
|
||||
* ----- ------ -------- --------------------------------------------------
|
||||
* 4.0 adk 02/18/14 First Release.
|
||||
* Implemented the following functions:
|
||||
* XOsd_SelfTest.
|
||||
* </pre>
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
/***************************** Include Files *********************************/
|
||||
|
||||
#include "xosd.h"
|
||||
|
||||
/************************** Constant Definitions *****************************/
|
||||
|
||||
|
||||
/***************** Macros (Inline Functions) Definitions *********************/
|
||||
|
||||
|
||||
/**************************** Type Definitions *******************************/
|
||||
|
||||
|
||||
/************************** Function Prototypes ******************************/
|
||||
|
||||
|
||||
/************************** Variable Definitions *****************************/
|
||||
|
||||
|
||||
/************************** Function Definitions *****************************/
|
||||
|
||||
/*****************************************************************************/
|
||||
/**
|
||||
*
|
||||
* This function reads Version register of OSD core and compares with zero
|
||||
* as part of self test.
|
||||
*
|
||||
* @param InstancePtr is a pointer to the XOsd instance.
|
||||
*
|
||||
* @return - XST_SUCCESS if the Version register read test was successful.
|
||||
* - XST_FAILURE if the Version register read test failed.
|
||||
*
|
||||
* @note None.
|
||||
*
|
||||
******************************************************************************/
|
||||
int XOsd_SelfTest(XOsd *InstancePtr)
|
||||
{
|
||||
u32 Version;
|
||||
int Status;
|
||||
|
||||
/* Verify argument. */
|
||||
Xil_AssertNonvoid(InstancePtr != NULL);
|
||||
|
||||
/* Read OSD core Version register. */
|
||||
Version = XOsd_ReadReg(InstancePtr->Config.BaseAddress,
|
||||
(XOSD_VER_OFFSET));
|
||||
|
||||
/* Compare Version with zero. */
|
||||
if (Version != (u32)0x0) {
|
||||
Status = (XST_SUCCESS);
|
||||
}
|
||||
else {
|
||||
Status = (XST_FAILURE);
|
||||
}
|
||||
|
||||
return Status;
|
||||
}
|
||||
|
|
|
@ -1,35 +1,35 @@
|
|||
/******************************************************************************
|
||||
*
|
||||
* Copyright (C) 2009 - 2014 Xilinx, Inc. All rights reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* Use of the Software is limited solely to applications:
|
||||
* (a) running on a Xilinx device, or
|
||||
* (b) that interact with a Xilinx device through a bus or interconnect.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* XILINX BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
|
||||
* OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*
|
||||
* Except as contained in this notice, the name of the Xilinx shall not be used
|
||||
* in advertising or otherwise to promote the sale, use or other dealings in
|
||||
* this Software without prior written authorization from Xilinx.
|
||||
*
|
||||
/******************************************************************************
|
||||
*
|
||||
* Copyright (C) 2009 - 2014 Xilinx, Inc. All rights reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* Use of the Software is limited solely to applications:
|
||||
* (a) running on a Xilinx device, or
|
||||
* (b) that interact with a Xilinx device through a bus or interconnect.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* XILINX BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
|
||||
* OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*
|
||||
* Except as contained in this notice, the name of the Xilinx shall not be used
|
||||
* in advertising or otherwise to promote the sale, use or other dealings in
|
||||
* this Software without prior written authorization from Xilinx.
|
||||
*
|
||||
******************************************************************************/
|
||||
/*****************************************************************************/
|
||||
/*****************************************************************************/
|
||||
/**
|
||||
*
|
||||
* @file xosd_sinit.c
|
||||
|
@ -39,74 +39,74 @@
|
|||
*
|
||||
* This file contains the static initialization method for Xilinx Video
|
||||
* On-Screen-Display (OSD) core.
|
||||
*
|
||||
* <pre>
|
||||
* MODIFICATION HISTORY:
|
||||
*
|
||||
* Ver Who Date Changes
|
||||
* ----- ------ -------- ------------------------------------------------------
|
||||
* 1.00a xd 08/18/08 First release
|
||||
* 2.00a cjm 12/18/12 Converted from xio.h to xil_io.h, translating
|
||||
* basic types, MB cache functions, exceptions and
|
||||
* assertions to xil_io format.
|
||||
* 4.0 adk 02/18/14 Renamed the following functions:
|
||||
* XOSD_LookupConfig - > XOsd_LookupConfig
|
||||
* </pre>
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
/***************************** Include Files *********************************/
|
||||
|
||||
#include "xosd.h"
|
||||
#include "xparameters.h"
|
||||
|
||||
/************************** Constant Definitions *****************************/
|
||||
|
||||
|
||||
/***************** Macros (Inline Functions) Definitions *********************/
|
||||
|
||||
|
||||
/**************************** Type Definitions *******************************/
|
||||
|
||||
|
||||
/************************** Function Prototypes ******************************/
|
||||
|
||||
|
||||
/************************** Variable Definitions *****************************/
|
||||
|
||||
|
||||
/************************** Function Definitions *****************************/
|
||||
|
||||
/*****************************************************************************/
|
||||
/**
|
||||
*
|
||||
* This function gets a reference to an XOsd_Config structure based on the
|
||||
* unique device id, <i>DeviceId</i>. The return value will refer to an entry
|
||||
* in the core configuration table defined in the xosd_g.c file.
|
||||
*
|
||||
* @param DeviceId is the unique core ID of the OSD core for the lookup
|
||||
* operation.
|
||||
*
|
||||
* @return XOsd_Config is a reference to a config record in the
|
||||
* configuration table (in xosd_g.c) corresponding to
|
||||
* <i>DeviceId</i> or NULL if no match is found.
|
||||
*
|
||||
* @note None.
|
||||
*
|
||||
******************************************************************************/
|
||||
XOsd_Config *XOsd_LookupConfig(u16 DeviceId)
|
||||
{
|
||||
extern XOsd_Config XOsd_ConfigTable[XPAR_XOSD_NUM_INSTANCES];
|
||||
XOsd_Config *CfgPtr = NULL;
|
||||
u32 Index;
|
||||
|
||||
for (Index = (u32)0x0; Index < (u32)(XPAR_XOSD_NUM_INSTANCES);
|
||||
Index++) {
|
||||
if (XOsd_ConfigTable[Index].DeviceId == DeviceId) {
|
||||
CfgPtr = &XOsd_ConfigTable[Index];
|
||||
break;
|
||||
}
|
||||
}
|
||||
*
|
||||
* <pre>
|
||||
* MODIFICATION HISTORY:
|
||||
*
|
||||
* Ver Who Date Changes
|
||||
* ----- ------ -------- ------------------------------------------------------
|
||||
* 1.00a xd 08/18/08 First release
|
||||
* 2.00a cjm 12/18/12 Converted from xio.h to xil_io.h, translating
|
||||
* basic types, MB cache functions, exceptions and
|
||||
* assertions to xil_io format.
|
||||
* 4.0 adk 02/18/14 Renamed the following functions:
|
||||
* XOSD_LookupConfig - > XOsd_LookupConfig
|
||||
* </pre>
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
/***************************** Include Files *********************************/
|
||||
|
||||
#include "xosd.h"
|
||||
#include "xparameters.h"
|
||||
|
||||
/************************** Constant Definitions *****************************/
|
||||
|
||||
|
||||
/***************** Macros (Inline Functions) Definitions *********************/
|
||||
|
||||
|
||||
/**************************** Type Definitions *******************************/
|
||||
|
||||
|
||||
/************************** Function Prototypes ******************************/
|
||||
|
||||
|
||||
/************************** Variable Definitions *****************************/
|
||||
|
||||
|
||||
/************************** Function Definitions *****************************/
|
||||
|
||||
/*****************************************************************************/
|
||||
/**
|
||||
*
|
||||
* This function gets a reference to an XOsd_Config structure based on the
|
||||
* unique device id, <i>DeviceId</i>. The return value will refer to an entry
|
||||
* in the core configuration table defined in the xosd_g.c file.
|
||||
*
|
||||
* @param DeviceId is the unique core ID of the OSD core for the lookup
|
||||
* operation.
|
||||
*
|
||||
* @return XOsd_Config is a reference to a config record in the
|
||||
* configuration table (in xosd_g.c) corresponding to
|
||||
* <i>DeviceId</i> or NULL if no match is found.
|
||||
*
|
||||
* @note None.
|
||||
*
|
||||
******************************************************************************/
|
||||
XOsd_Config *XOsd_LookupConfig(u16 DeviceId)
|
||||
{
|
||||
extern XOsd_Config XOsd_ConfigTable[XPAR_XOSD_NUM_INSTANCES];
|
||||
XOsd_Config *CfgPtr = NULL;
|
||||
u32 Index;
|
||||
|
||||
for (Index = (u32)0x0; Index < (u32)(XPAR_XOSD_NUM_INSTANCES);
|
||||
Index++) {
|
||||
if (XOsd_ConfigTable[Index].DeviceId == DeviceId) {
|
||||
CfgPtr = &XOsd_ConfigTable[Index];
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return (XOsd_Config *)CfgPtr;
|
||||
}
|
||||
|
|
|
@ -1,21 +1,21 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Language" content="en-us">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>Driver example applications</title>
|
||||
<link rel="stylesheet" type="text/css" href="../help.css">
|
||||
</head>
|
||||
<body bgcolor="#FFFFFF">
|
||||
<h1> Example Applications for the driver rgb2ycrcb_v7_0 </h1>
|
||||
<HR>
|
||||
<ul>
|
||||
<li>rgb2ycrcb_selftest_example.c <a href="rgb2ycrcb_selftest_example.c">(source)</a> </li>
|
||||
</ul>
|
||||
<ul>
|
||||
<li>rgb2ycrcb_example.c <a href="rgb2ycrcb_example.c">(source)</a> </li>
|
||||
</ul>
|
||||
<p><font face="Times New Roman" color="#800000">Copyright ? 1995-2014 Xilinx, Inc. All rights reserved.</font></p>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Language" content="en-us">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>Driver example applications</title>
|
||||
<link rel="stylesheet" type="text/css" href="../help.css">
|
||||
</head>
|
||||
<body bgcolor="#FFFFFF">
|
||||
<h1> Example Applications for the driver rgb2ycrcb_v7_0 </h1>
|
||||
<HR>
|
||||
<ul>
|
||||
<li>rgb2ycrcb_selftest_example.c <a href="rgb2ycrcb_selftest_example.c">(source)</a> </li>
|
||||
</ul>
|
||||
<ul>
|
||||
<li>rgb2ycrcb_example.c <a href="rgb2ycrcb_example.c">(source)</a> </li>
|
||||
</ul>
|
||||
<p><font face="Times New Roman" color="#800000">Copyright ? 1995-2014 Xilinx, Inc. All rights reserved.</font></p>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
|
|
@ -387,7 +387,7 @@ static void XUsbPs_IntrHandleReset(XUsbPs *InstancePtr, u32 IrqSts)
|
|||
XUSBPS_EPCOMPL_OFFSET));
|
||||
|
||||
/* Cancel all endpoint prime status by waiting until all bits
|
||||
* in XUSBPS_EPPRIME_OFFSET are 0 and then writing 0xFFFFFFFF
|
||||
* in XUSBPS_EPPRIME_OFFSET are 0 and then writing 0xFFFFFFFF
|
||||
* to XUSBPS_EPFLUSH_OFFSET.
|
||||
*
|
||||
* Avoid hanging here by using a Timeout counter...
|
||||
|
|
|
@ -1,22 +1,22 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Language" content="en-us">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>Driver example applications</title>
|
||||
<link rel="stylesheet" type="text/css" href="../help.css">
|
||||
</head>
|
||||
<body bgcolor="#FFFFFF">
|
||||
<h1> Example Applications for the driver ycrcb2rgb_v7_0 </h1>
|
||||
<HR>
|
||||
<ul>
|
||||
<li>ycrcb2rgb_selftest_example.c <a href="ycrcb2rgb_selftest_example.c">(source)</a> </li>
|
||||
</ul>
|
||||
<ul>
|
||||
<li>ycrcb2rgb_example.c <a href="ycrcb2rgb_example.c">(source)</a> </li>
|
||||
</ul>
|
||||
<p><font face="Times New Roman" color="#800000">Copyright ? 1995-2014 Xilinx, Inc. All rights reserved.</font></p>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Language" content="en-us">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>Driver example applications</title>
|
||||
<link rel="stylesheet" type="text/css" href="../help.css">
|
||||
</head>
|
||||
<body bgcolor="#FFFFFF">
|
||||
<h1> Example Applications for the driver ycrcb2rgb_v7_0 </h1>
|
||||
<HR>
|
||||
<ul>
|
||||
<li>ycrcb2rgb_selftest_example.c <a href="ycrcb2rgb_selftest_example.c">(source)</a> </li>
|
||||
</ul>
|
||||
<ul>
|
||||
<li>ycrcb2rgb_example.c <a href="ycrcb2rgb_example.c">(source)</a> </li>
|
||||
</ul>
|
||||
<p><font face="Times New Roman" color="#800000">Copyright ? 1995-2014 Xilinx, Inc. All rights reserved.</font></p>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
||||
|
|
|
@ -1,29 +1,29 @@
|
|||
COMPILER=
|
||||
ARCHIVER=
|
||||
CP=cp
|
||||
COMPILER_FLAGS=
|
||||
EXTRA_COMPILER_FLAGS=
|
||||
LIB=libxil.a
|
||||
LEVEL=0
|
||||
|
||||
RELEASEDIR=../../../lib
|
||||
INCLUDEDIR=../../../include
|
||||
INCLUDES=-I./. -I${INCLUDEDIR}
|
||||
|
||||
INCLUDEFILES=*.h
|
||||
LIBSOURCES=*.c
|
||||
|
||||
OUTS = *.o
|
||||
|
||||
libs:
|
||||
echo "Compiling ycrcb2rgb"
|
||||
$(COMPILER) $(COMPILER_FLAGS) $(EXTRA_COMPILER_FLAGS) $(INCLUDES) $(LIBSOURCES)
|
||||
$(ARCHIVER) -r ${RELEASEDIR}/${LIB} ${OUTS}
|
||||
make clean
|
||||
|
||||
include:
|
||||
${CP} $(INCLUDEFILES) $(INCLUDEDIR)
|
||||
|
||||
clean:
|
||||
rm -rf ${OUTS}
|
||||
|
||||
COMPILER=
|
||||
ARCHIVER=
|
||||
CP=cp
|
||||
COMPILER_FLAGS=
|
||||
EXTRA_COMPILER_FLAGS=
|
||||
LIB=libxil.a
|
||||
LEVEL=0
|
||||
|
||||
RELEASEDIR=../../../lib
|
||||
INCLUDEDIR=../../../include
|
||||
INCLUDES=-I./. -I${INCLUDEDIR}
|
||||
|
||||
INCLUDEFILES=*.h
|
||||
LIBSOURCES=*.c
|
||||
|
||||
OUTS = *.o
|
||||
|
||||
libs:
|
||||
echo "Compiling ycrcb2rgb"
|
||||
$(COMPILER) $(COMPILER_FLAGS) $(EXTRA_COMPILER_FLAGS) $(INCLUDES) $(LIBSOURCES)
|
||||
$(ARCHIVER) -r ${RELEASEDIR}/${LIB} ${OUTS}
|
||||
make clean
|
||||
|
||||
include:
|
||||
${CP} $(INCLUDEFILES) $(INCLUDEDIR)
|
||||
|
||||
clean:
|
||||
rm -rf ${OUTS}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue