no-OS
Macros | Enumerations | Functions
cf_hdmi.h File Reference
#include "xparameters.h"
#include "app_config.h"
#include "clk_axi_clkgen.h"
Include dependency graph for cf_hdmi.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define CFV_BASEADDR   XPAR_AXI_HDMI_CORE_BASEADDR
 
#define CFA_BASEADDR   XPAR_AXI_SPDIF_TX_CORE_BASEADDR
 
#define VDMA_BASEADDR   XPAR_AXI_HDMI_DMA_BASEADDR
 
#define VIDEO_BASEADDR   DDR_BASEADDR + 0x2000000
 
#define AUDIO_BASEADDR   DDR_BASEADDR + 0x1000000
 
#define A_SAMPLE_FREQ   48000
 
#define A_FREQ   1400
 
#define AUDIO_LENGTH   (A_SAMPLE_FREQ/A_FREQ)
 
#define AXI_HDMI_REG_RESET   0x040
 
#define AXI_HDMI_REG_CTRL   0x044
 
#define AXI_HDMI_REG_SOURCE_SEL   0x048
 
#define AXI_HDMI_REG_COLORPATTERN   0x04c
 
#define AXI_HDMI_REG_STATUS   0x05c
 
#define AXI_HDMI_REG_VDMA_STATUS   0x060
 
#define AXI_HDMI_REG_TPM_STATUS   0x064
 
#define AXI_HDMI_REG_HTIMING1   0x400
 
#define AXI_HDMI_REG_HTIMING2   0x404
 
#define AXI_HDMI_REG_HTIMING3   0x408
 
#define AXI_HDMI_REG_VTIMING1   0x440
 
#define AXI_HDMI_REG_VTIMING2   0x444
 
#define AXI_HDMI_REG_VTIMING3   0x448
 
#define AXI_VDMA_REG_DMA_CTRL   0x00
 
#define AXI_VDMA_REG_V_SIZE   0x50
 
#define AXI_VDMA_REG_H_SIZE   0x54
 
#define AXI_VDMA_REG_FRMDLY_STRIDE   0x58
 
#define AXI_VDMA_REG_START_1   0x5C
 
#define AXI_VDMA_REG_START_2   0x60
 
#define AXI_VDMA_REG_START_3   0x64
 
#define AXI_CLKGEN_V2_REG_RESET   0x40
 
#define AXI_CLKGEN_V2_REG_DRP_CNTRL   0x70
 
#define AXI_CLKGEN_V2_REG_DRP_STATUS   0x74
 
#define AXI_CLKGEN_V2_RESET_MMCM_ENABLE   (1 << 1)
 
#define AXI_CLKGEN_V2_RESET_ENABLE   (1 << 0)
 
#define AXI_CLKGEN_V2_DRP_CNTRL_SEL   (1 << 29)
 
#define AXI_CLKGEN_V2_DRP_CNTRL_READ   (1 << 28)
 
#define AXI_CLKGEN_V2_DRP_STATUS_BUSY   (1 << 16)
 
#define MMCM_REG_CLKOUT0_1   0x08
 
#define MMCM_REG_CLKOUT0_2   0x09
 
#define MMCM_REG_CLK_FB1   0x14
 
#define MMCM_REG_CLK_FB2   0x15
 
#define MMCM_REG_CLK_DIV   0x16
 
#define MMCM_REG_LOCK1   0x18
 
#define MMCM_REG_LOCK2   0x19
 
#define MMCM_REG_LOCK3   0x1a
 
#define MMCM_REG_FILTER1   0x4e
 
#define MMCM_REG_FILTER2   0x4f
 

Enumerations

enum  videoResolution {
  RESOLUTION_640x480,
  RESOLUTION_800x600,
  RESOLUTION_1024x768,
  RESOLUTION_1280x720,
  RESOLUTION_1360x768,
  RESOLUTION_1600x900,
  RESOLUTION_1920x1080
}
 

Functions

void InitHdmiVideoPcore (unsigned short horizontalActiveTime, unsigned short horizontalBlankingTime, unsigned short horizontalSyncOffset, unsigned short horizontalSyncPulseWidth, unsigned short verticalActiveTime, unsigned short verticalBlankingTime, unsigned short verticalSyncOffset, unsigned short verticalSyncPulseWidth)
 InitHdmiVideoPcore. More...
 
void SetVideoResolution (struct axi_clkgen *clkgen, unsigned char resolution)
 SetVideoResolution. More...
 
void InitHdmiAudioPcore (void)
 InitHdmiAudioPcore. More...
 
void AudioClick (void)
 AudioClick. More...
 

Detailed Description

Copyright 2013(c) Analog Devices, Inc.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
  3. Neither the name of Analog Devices, Inc. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY ANALOG DEVICES, INC. “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ANALOG DEVICES, INC. BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

SVN Revision: $WCREV$

Macro Definition Documentation

◆ A_FREQ

#define A_FREQ   1400

◆ A_SAMPLE_FREQ

#define A_SAMPLE_FREQ   48000

◆ AUDIO_BASEADDR

#define AUDIO_BASEADDR   DDR_BASEADDR + 0x1000000

◆ AUDIO_LENGTH

#define AUDIO_LENGTH   (A_SAMPLE_FREQ/A_FREQ)

◆ AXI_CLKGEN_V2_DRP_CNTRL_READ

#define AXI_CLKGEN_V2_DRP_CNTRL_READ   (1 << 28)

◆ AXI_CLKGEN_V2_DRP_CNTRL_SEL

#define AXI_CLKGEN_V2_DRP_CNTRL_SEL   (1 << 29)

◆ AXI_CLKGEN_V2_DRP_STATUS_BUSY

#define AXI_CLKGEN_V2_DRP_STATUS_BUSY   (1 << 16)

◆ AXI_CLKGEN_V2_REG_DRP_CNTRL

#define AXI_CLKGEN_V2_REG_DRP_CNTRL   0x70

◆ AXI_CLKGEN_V2_REG_DRP_STATUS

#define AXI_CLKGEN_V2_REG_DRP_STATUS   0x74

◆ AXI_CLKGEN_V2_REG_RESET

#define AXI_CLKGEN_V2_REG_RESET   0x40

◆ AXI_CLKGEN_V2_RESET_ENABLE

#define AXI_CLKGEN_V2_RESET_ENABLE   (1 << 0)

◆ AXI_CLKGEN_V2_RESET_MMCM_ENABLE

#define AXI_CLKGEN_V2_RESET_MMCM_ENABLE   (1 << 1)

◆ AXI_HDMI_REG_COLORPATTERN

#define AXI_HDMI_REG_COLORPATTERN   0x04c

◆ AXI_HDMI_REG_CTRL

#define AXI_HDMI_REG_CTRL   0x044

◆ AXI_HDMI_REG_HTIMING1

#define AXI_HDMI_REG_HTIMING1   0x400

◆ AXI_HDMI_REG_HTIMING2

#define AXI_HDMI_REG_HTIMING2   0x404

◆ AXI_HDMI_REG_HTIMING3

#define AXI_HDMI_REG_HTIMING3   0x408

◆ AXI_HDMI_REG_RESET

#define AXI_HDMI_REG_RESET   0x040

◆ AXI_HDMI_REG_SOURCE_SEL

#define AXI_HDMI_REG_SOURCE_SEL   0x048

◆ AXI_HDMI_REG_STATUS

#define AXI_HDMI_REG_STATUS   0x05c

◆ AXI_HDMI_REG_TPM_STATUS

#define AXI_HDMI_REG_TPM_STATUS   0x064

◆ AXI_HDMI_REG_VDMA_STATUS

#define AXI_HDMI_REG_VDMA_STATUS   0x060

◆ AXI_HDMI_REG_VTIMING1

#define AXI_HDMI_REG_VTIMING1   0x440

◆ AXI_HDMI_REG_VTIMING2

#define AXI_HDMI_REG_VTIMING2   0x444

◆ AXI_HDMI_REG_VTIMING3

#define AXI_HDMI_REG_VTIMING3   0x448

◆ AXI_VDMA_REG_DMA_CTRL

#define AXI_VDMA_REG_DMA_CTRL   0x00

◆ AXI_VDMA_REG_FRMDLY_STRIDE

#define AXI_VDMA_REG_FRMDLY_STRIDE   0x58

◆ AXI_VDMA_REG_H_SIZE

#define AXI_VDMA_REG_H_SIZE   0x54

◆ AXI_VDMA_REG_START_1

#define AXI_VDMA_REG_START_1   0x5C

◆ AXI_VDMA_REG_START_2

#define AXI_VDMA_REG_START_2   0x60

◆ AXI_VDMA_REG_START_3

#define AXI_VDMA_REG_START_3   0x64

◆ AXI_VDMA_REG_V_SIZE

#define AXI_VDMA_REG_V_SIZE   0x50

◆ CFA_BASEADDR

#define CFA_BASEADDR   XPAR_AXI_SPDIF_TX_CORE_BASEADDR

◆ CFV_BASEADDR

#define CFV_BASEADDR   XPAR_AXI_HDMI_CORE_BASEADDR

◆ MMCM_REG_CLK_DIV

#define MMCM_REG_CLK_DIV   0x16

◆ MMCM_REG_CLK_FB1

#define MMCM_REG_CLK_FB1   0x14

◆ MMCM_REG_CLK_FB2

#define MMCM_REG_CLK_FB2   0x15

◆ MMCM_REG_CLKOUT0_1

#define MMCM_REG_CLKOUT0_1   0x08

◆ MMCM_REG_CLKOUT0_2

#define MMCM_REG_CLKOUT0_2   0x09

◆ MMCM_REG_FILTER1

#define MMCM_REG_FILTER1   0x4e

◆ MMCM_REG_FILTER2

#define MMCM_REG_FILTER2   0x4f

◆ MMCM_REG_LOCK1

#define MMCM_REG_LOCK1   0x18

◆ MMCM_REG_LOCK2

#define MMCM_REG_LOCK2   0x19

◆ MMCM_REG_LOCK3

#define MMCM_REG_LOCK3   0x1a

◆ VDMA_BASEADDR

#define VDMA_BASEADDR   XPAR_AXI_HDMI_DMA_BASEADDR

◆ VIDEO_BASEADDR

#define VIDEO_BASEADDR   DDR_BASEADDR + 0x2000000

Enumeration Type Documentation

◆ videoResolution

Enumerator
RESOLUTION_640x480 
RESOLUTION_800x600 
RESOLUTION_1024x768 
RESOLUTION_1280x720 
RESOLUTION_1360x768 
RESOLUTION_1600x900 
RESOLUTION_1920x1080 

Function Documentation

◆ AudioClick()

void AudioClick ( void  )

AudioClick.

◆ InitHdmiAudioPcore()

void InitHdmiAudioPcore ( void  )

InitHdmiAudioPcore.

◆ InitHdmiVideoPcore()

void InitHdmiVideoPcore ( unsigned short  horizontalActiveTime,
unsigned short  horizontalBlankingTime,
unsigned short  horizontalSyncOffset,
unsigned short  horizontalSyncPulseWidth,
unsigned short  verticalActiveTime,
unsigned short  verticalBlankingTime,
unsigned short  verticalSyncOffset,
unsigned short  verticalSyncPulseWidth 
)

InitHdmiVideoPcore.

◆ SetVideoResolution()

void SetVideoResolution ( struct axi_clkgen clkgen,
unsigned char  resolution 
)

SetVideoResolution.