video_common: edid: example: Formatted to coding guidelines.
Signed-off-by: Andrei-Liviu Simion <andrei.simion@xilinx.com>
This commit is contained in:
parent
5f8da8a650
commit
b1c3f35b17
2 changed files with 113 additions and 12 deletions
|
@ -1,19 +1,68 @@
|
||||||
/*
|
/*******************************************************************************
|
||||||
* Edid_Print.c
|
|
||||||
*
|
*
|
||||||
* Created on: Nov 9, 2014
|
* Copyright (C) 2015 Xilinx, Inc. All rights reserved.
|
||||||
* Author: andreis
|
*
|
||||||
*/
|
* 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 THE
|
||||||
|
* XILINX CONSORTIUM 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 xvidc_edid_print.c
|
||||||
|
*
|
||||||
|
* Contains an example that, given a supplied base Extended Display
|
||||||
|
* Identification Data (EDID) structure, will parse, decode, and print its
|
||||||
|
* contents.
|
||||||
|
*
|
||||||
|
* @note None.
|
||||||
|
*
|
||||||
|
* <pre>
|
||||||
|
* MODIFICATION HISTORY:
|
||||||
|
*
|
||||||
|
* Ver Who Date Changes
|
||||||
|
* ----- ---- -------- -----------------------------------------------
|
||||||
|
* 1.0 als 11/09/14 Initial release.
|
||||||
|
* </pre>
|
||||||
|
*
|
||||||
|
*******************************************************************************/
|
||||||
|
|
||||||
|
/******************************* Include Files ********************************/
|
||||||
|
|
||||||
#include "string.h"
|
#include "string.h"
|
||||||
#include "xvidc_edid_print_example.h"
|
|
||||||
#include "xil_printf.h"
|
#include "xil_printf.h"
|
||||||
#include "xstatus.h"
|
#include "xstatus.h"
|
||||||
|
#include "xvidc_edid_print_example.h"
|
||||||
|
|
||||||
|
/******************* Macros (Inline Functions) Definitions ********************/
|
||||||
|
|
||||||
#define FLOAT_FRAC_TO_U32(V, D) ((u32)(V * D) - (((u32)V) * D))
|
#define FLOAT_FRAC_TO_U32(V, D) ((u32)(V * D) - (((u32)V) * D))
|
||||||
|
|
||||||
|
/**************************** Function Prototypes *****************************/
|
||||||
|
|
||||||
static void Edid_PrintBaseVPId(u8 *EdidRaw);
|
static void Edid_PrintBaseVPId(u8 *EdidRaw);
|
||||||
static void Edid_PrintBaseVerRev(u8 *EdidRaw);
|
static void Edid_PrintBaseVerRev(u8 *EdidRaw);
|
||||||
static void Edid_PrintBaseBasicDisp(u8 *EdidRaw);
|
static void Edid_PrintBaseBasicDisp(u8 *EdidRaw);
|
||||||
|
@ -23,6 +72,8 @@ static void Edid_PrintStdTimings(u8 *EdidRaw);
|
||||||
static void Edid_PrintPtm(u8 *EdidRaw);
|
static void Edid_PrintPtm(u8 *EdidRaw);
|
||||||
static u8 Edid_CalculateChecksum(u8 *Data, u8 Size);
|
static u8 Edid_CalculateChecksum(u8 *Data, u8 Size);
|
||||||
|
|
||||||
|
/*************************** Function Definitions *****************************/
|
||||||
|
|
||||||
u32 Edid_PrintDecodeBase(u8 *EdidRaw)
|
u32 Edid_PrintDecodeBase(u8 *EdidRaw)
|
||||||
{
|
{
|
||||||
/* Check valid header. */
|
/* Check valid header. */
|
||||||
|
|
|
@ -1,16 +1,66 @@
|
||||||
/*
|
/*******************************************************************************
|
||||||
* xedid_print.h
|
|
||||||
*
|
*
|
||||||
* Created on: Nov 9, 2014
|
* Copyright (C) 2015 Xilinx, Inc. All rights reserved.
|
||||||
* Author: andreis
|
*
|
||||||
*/
|
* 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 THE
|
||||||
|
* XILINX CONSORTIUM 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 xvidc_edid_print.h
|
||||||
|
*
|
||||||
|
* Contains an example that, given a supplied base Extended Display
|
||||||
|
* Identification Data (EDID) structure, will parse, decode, and print its
|
||||||
|
* contents.
|
||||||
|
*
|
||||||
|
* @note None.
|
||||||
|
*
|
||||||
|
* <pre>
|
||||||
|
* MODIFICATION HISTORY:
|
||||||
|
*
|
||||||
|
* Ver Who Date Changes
|
||||||
|
* ----- ---- -------- -----------------------------------------------
|
||||||
|
* 1.0 als 11/09/14 Initial release.
|
||||||
|
* </pre>
|
||||||
|
*
|
||||||
|
*******************************************************************************/
|
||||||
|
|
||||||
#ifndef XVIDC_EDID_PRINT_H_
|
#ifndef XVIDC_EDID_PRINT_H_
|
||||||
|
/* Prevent circular inclusions by using protection macros. */
|
||||||
#define XVIDC_EDID_PRINT_H_
|
#define XVIDC_EDID_PRINT_H_
|
||||||
|
|
||||||
|
/******************************* Include Files ********************************/
|
||||||
|
|
||||||
#include "xdp.h"
|
#include "xdp.h"
|
||||||
#include "xvidc_edid.h"
|
#include "xvidc_edid.h"
|
||||||
|
|
||||||
|
/**************************** Function Prototypes *****************************/
|
||||||
|
|
||||||
u32 Edid_PrintDecodeBase(u8 *EdidRaw);
|
u32 Edid_PrintDecodeBase(u8 *EdidRaw);
|
||||||
void Edid_PrintSuppVmTable(u8 *EdidRaw);
|
void Edid_PrintSuppVmTable(u8 *EdidRaw);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue