📄 dvr_ref1.h
字号:
/*
* Copyright (c) 1995,1996,1997 by TriMedia Technologies.
*
* +------------------------------------------------------------------+
* | This software is furnished under a license and may only be used |
* | and copied in accordance with the terms and conditions of such |
* | a license and with the inclusion of this copyright notice. This |
* | software or any other copies of this software may not be provided|
* | or otherwise made available to any other person. The ownership |
* | and title of this software is not transferred. |
* | |
* | The information in this software is subject to change without |
* | any prior notice and should not be construed as a commitment by |
* | TriMedia Technologies. |
* | |
* | this code and information is provided "as is" without any |
* | warranty of any kind, either expressed or implied, including but |
* | not limited to the implied warranties of merchantability and/or |
* | fitness for any particular purpose. |
* +------------------------------------------------------------------+
*
* Module name : dvr_ref1.h 1.3
*
* Last update : 19:09:28 - 00/11/09
*
* Description :
*
* Board Support Package for Trimedia peripherals.
* This particular file supports the dvr_ref1 board.
* That's the first video recorder refernce board, also called TMSM.
* The purpose of this file is to define dvr_ref1_config.
* This board config structure will be included in a table
* in boardcfg.c
*
*
*
*/
#ifndef _DVR_REV1_H_
#define _DVR_REV1_H_
#include "xioReg.h"
#define DVR_REV1_INPUT_AUDIO_ADAPTERS (aaaNone | aaaLineInput)
#define DVR_REV1_OUTPUT_AUDIO_ADAPTERS (aaaNone | aaaLineOutput1)
#define DVR_REV1_SUPPORTED_DATA_TYPES (atfNone | atfLinearPCM)
#define DVR_REV1_SUPPORTED_DATA_SUBTYPES (apfNone | apfStereo16)
#if defined(__cplusplus)
extern "C" {
#endif
/* XIO base address */
#define DVR_REV1_XIO_BASE_ADDRESS 0x04000000
/* XIO control addresses decoded in FPGA */
/* todo: copy in descriptions from programmers ref doc */
#define DVR_REV1_FPGA_CTL (DVR_REV1_XIO_BASE_ADDRESS + 0x00A00000)
#define DVR_REV1_VID_AUD_CTL (DVR_REV1_XIO_BASE_ADDRESS + 0x00A00004)
#define DVR_REV1_UART_DATA (DVR_REV1_XIO_BASE_ADDRESS + 0x00A00008)
#define DVR_REV1_UART_CTL_STATUS (DVR_REV1_XIO_BASE_ADDRESS + 0x00A0000C)
#define DVR_REV1_PCI_BANK_ADDR (DVR_REV1_XIO_BASE_ADDRESS + 0x00A00010)
#define DVR_REV1_IRQ_CTL_STATUS (DVR_REV1_XIO_BASE_ADDRESS + 0x00A00020)
#define DVR_REV1_KAR_DATA (DVR_REV1_XIO_BASE_ADDRESS + 0x00A00028)
#define DVR_REV1_KAR_ADDR (DVR_REV1_XIO_BASE_ADDRESS + 0x00A00030)
#define DVR_REV1_KAR_CTRL (DVR_REV1_XIO_BASE_ADDRESS + 0x00A00034)
#define DVR_REV1_VID_DMA_CTL_STATUS (DVR_REV1_XIO_BASE_ADDRESS + 0x00A00040)
#define DVR_REV1_VID_DMA_CNT0 (DVR_REV1_XIO_BASE_ADDRESS + 0x00A00044)
#define DVR_REV1_VID_DMA_CNT1 (DVR_REV1_XIO_BASE_ADDRESS + 0x00A00048)
#define DVR_REV1_VID_DMA_ADDR0 (DVR_REV1_XIO_BASE_ADDRESS + 0x00A00050)
#define DVR_REV1_VID_DMA_ADDR1 (DVR_REV1_XIO_BASE_ADDRESS + 0x00A00054)
#define DVR_REV1_VID_DMA_ADDR2 (DVR_REV1_XIO_BASE_ADDRESS + 0x00A00058)
#define DVR_REV1_IDE_DMA_CTL_STATUS (DVR_REV1_XIO_BASE_ADDRESS + 0x00A00060)
#define DVR_REV1_IDE_DMA_CNT0 (DVR_REV1_XIO_BASE_ADDRESS + 0x00A00064)
#define DVR_REV1_IDE_DMA_CNT1 (DVR_REV1_XIO_BASE_ADDRESS + 0x00A00068)
#define DVR_REV1_IDE_DMA_ADDR0 (DVR_REV1_XIO_BASE_ADDRESS + 0x00A00070)
#define DVR_REV1_IDE_DMA_ADDR1 (DVR_REV1_XIO_BASE_ADDRESS + 0x00A00074)
#define DVR_REV1_IDE_DMA_ADDR2 (DVR_REV1_XIO_BASE_ADDRESS + 0x00A00078)
/* sizes are in number of 32-bit words */
#define DVR_REV1_FLASH_SIZE 0x00080000 /* size is in words */
#define DVR_REV1_FLASH_SECTOR_SIZE 0x00004000 /* size is in words */
#define DVR_REV1_FLASH_SECTOR_NR (DVR_REV1_FLASH_SIZE / DVR_REV1_FLASH_SECTOR_SIZE)
#define DVR_REV1_FLASH_BANK_SIZE 0x00200000 /* size is in bytes */
#define DVR_REV1_FLASH_BASE DVR_REV1_XIO_BASE_ADDRESS
/* Macros to access DVR_REV1_VID_AUD_CTL */
#define dvr_ref1ResetVideo() xioSimpleWrite(DVR_REV1_VID_AUD_CTL, xioSimpleRead(DVR_REV1_VID_AUD_CTL) & 0xFE )
#define dvr_ref1EnableVideo() xioSimpleWrite(DVR_REV1_VID_AUD_CTL, xioSimpleRead(DVR_REV1_VID_AUD_CTL) | 0x01 )
#define dvr_ref1ResetAudio() xioSimpleWrite(DVR_REV1_VID_AUD_CTL, xioSimpleRead(DVR_REV1_VID_AUD_CTL) & 0xFD )
#define dvr_ref1EnableAudio() xioSimpleWrite(DVR_REV1_VID_AUD_CTL, xioSimpleRead(DVR_REV1_VID_AUD_CTL) | 0x02 )
#define dvr_ref1EnableADC_HPF_BP() xioSimpleWrite(DVR_REV1_VID_AUD_CTL, xioSimpleRead(DVR_REV1_VID_AUD_CTL) & 0xFB )
#define dvr_ref1DisableADC_HPF_BP() xioSimpleWrite(DVR_REV1_VID_AUD_CTL, xioSimpleRead(DVR_REV1_VID_AUD_CTL) | 0x04 )
#define dvr_ref1SelectVideoClockVdec() xioSimpleWrite(DVR_REV1_VID_AUD_CTL, xioSimpleRead(DVR_REV1_VID_AUD_CTL) & 0xF7 )
#define dvr_ref1SelectVideoClockTM() xioSimpleWrite(DVR_REV1_VID_AUD_CTL, xioSimpleRead(DVR_REV1_VID_AUD_CTL) | 0x08 )
#define dvr_ref1SelectVideoDataTMVo() xioSimpleWrite(DVR_REV1_VID_AUD_CTL, xioSimpleRead(DVR_REV1_VID_AUD_CTL) & 0xEF )
#define dvr_ref1SelectVideoDataVdec() xioSimpleWrite(DVR_REV1_VID_AUD_CTL, xioSimpleRead(DVR_REV1_VID_AUD_CTL) | 0x10 )
#define dvr_ref1EnableVPXOut() xioSimpleWrite(DVR_REV1_VID_AUD_CTL, xioSimpleRead(DVR_REV1_VID_AUD_CTL) & 0xDF )
#define dvr_ref1DisableVPXOut() xioSimpleWrite(DVR_REV1_VID_AUD_CTL, xioSimpleRead(DVR_REV1_VID_AUD_CTL) | 0x20 )
#define dvr_ref1DisableTechwellData() xioSimpleWrite(DVR_REV1_VID_AUD_CTL, xioSimpleRead(DVR_REV1_VID_AUD_CTL) & 0xBF )
#define dvr_ref1EnableTechwellData() xioSimpleWrite(DVR_REV1_VID_AUD_CTL, xioSimpleRead(DVR_REV1_VID_AUD_CTL) | 0x40 )
/* Macros to access DVR_REV1_IRQ_CTL_STATUS */
#define dvr_ref1EnableFP() xioSimpleWrite(DVR_REV1_IRQ_CTL_STATUS, xioSimpleRead(DVR_REV1_IRQ_CTL_STATUS) | 0x80 )
#define dvr_ref1Read_IRQ_CTL_STA() (xioSimpleRead(DVR_REV1_IRQ_CTL_STATUS) & 0x08)
#if defined(__cplusplus)
}
#endif
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -