Debian Codegraph @

thirdparty/analogdevicesinc/no-OS/adv7511/library/microblaze/inc/atv_platform.h

raw symbols SCIP
1 /***************************************************************************//**
2 * @file atv_platform.h
3 ********************************************************************************
4 * Copyright 2013(c) Analog Devices, Inc.
5 *
6 * All rights reserved.
7 *
8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions are met:
10 * - Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer.
12 * - Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in
14 * the documentation and/or other materials provided with the
15 * distribution.
16 * - Neither the name of Analog Devices, Inc. nor the names of its
17 * contributors may be used to endorse or promote products derived
18 * from this software without specific prior written permission.
19 * - The use of this software may or may not infringe the patent rights
20 * of one or more patent holders. This license does not release you
21 * from the requirement that you obtain separate licenses from these
22 * patent holders to use this software.
23 * - Use of the software either in source or binary form, must be run
24 * on or directly connected to an Analog Devices Inc. component.
25 *
26 * THIS SOFTWARE IS PROVIDED BY ANALOG DEVICES "AS IS" AND ANY EXPRESS OR
27 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, NON-INFRINGEMENT,
28 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
29 * IN NO EVENT SHALL ANALOG DEVICES BE LIABLE FOR ANY DIRECT, INDIRECT,
30 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
31 * LIMITED TO, INTELLECTUAL PROPERTY RIGHTS, PROCUREMENT OF SUBSTITUTE GOODS OR
32 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
33 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
34 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
35 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
36 *
37 ********************************************************************************
38 * SVN Revision: $WCREV$
39 *******************************************************************************/
40
41 #ifndef _PLATFORM_H_
42 #define _PLATFORM_H_
43
44 /******************************************************************************/
45 /***************************** Include Files **********************************/
46 /******************************************************************************/
47 #include "atv_types.h"
48
49 /*****************************************************************************/
50 /******************* Macros and Constants Definitions ************************/
51 /*****************************************************************************/
52 #define HAL_PORT_IDX_ALL 0xFE
53 #define TX_BOARD_DEV_ID 0xEA
54 #define HAL_EnableHDMIPath(a)
55 #define HAL_AssertHPD(a)
56 #define HAL_EnableTxHPD(a)
57 #define HAL_IsHPDOn(a) FALSE
58 #define HAL_5VDetected(a) FALSE
59
60 enum
61 {
62 OUTPUT_CHAN_AUTO=0,
63 OUTPUT_CHAN_AVO1,
64 OUTPUT_CHAN_AVO2,
65 OUTPUT_CHAN_DAC,
66 OUTPUT_CHAN_ENC
67 };
68
69 enum
70 {
71 STATUS_LED1=1,
72 STATUS_LED2,
73 STATUS_LED3,
74 STATUS_LED4,
75 STATUS_LED5,
76 STATUS_LED6
77 };
78
79 enum
80 {
81 INT1_RX=0,
82 INT2_RX,
83 INT3_RX,
84 INT1_TX,
85 INT2_TX,
86 INT1_MUX,
87 INT2_MUX,
88 INT3_MUX
89 };
90
91 /******************************************************************************/
92 /************************ Functions Declarations ******************************/
93 /******************************************************************************/
94 UCHAR HAL_I2CReadByte (UCHAR Dev, UCHAR Reg, UCHAR *Data);
95 UCHAR HAL_I2CWriteByte (UCHAR Dev, UCHAR Reg, UCHAR Data);
96 UINT16 HAL_I2CReadBlock (UCHAR Dev, UCHAR Reg, UCHAR *Data, UINT16 NumberBytes);
97 UINT16 HAL_I2CWriteBlock (UCHAR Dev, UCHAR Reg, UCHAR *Data, UINT16 NumberBytes);
98 UINT16 HAL_I2C16ReadBlock8 (UCHAR Dev, UINT16 Reg, UCHAR* Data, UINT16 NumberBytes);
99 UINT16 HAL_I2C16WriteBlock8 (UCHAR Dev, UINT16 Reg, UCHAR* Data, UINT16 NumberBytes);
100 UINT16 HAL_I2C16ReadBlock16 (UCHAR Dev, UINT16 Reg, UINT16* Data, UINT16 NumberWords);
101 UINT16 HAL_I2C16WriteBlock16 (UCHAR Dev, UINT16 Reg, UINT16* Data, UINT16 NumberWords);
102 UINT16 HAL_I2CGenericAccess (UCHAR Addr, UINT16 WriteCount, UCHAR *WriteBuf,
103 UINT16 ReadCount, UCHAR *ReadBuf);
104 void HAL_I2C_LogInit(void);
105 void HAL_I2C_LogStop(void);
106 void HAL_I2C_GetLogInfo(UINT32*, UINT16*);
107 UINT16 HAL_SpiWriteBlock (UCHAR *Data, UINT16 NumberBytes);
108 void HAL_SpiSetSlave(UCHAR SlaveId);
109 void HAL_DelayMs (UINT16 Counter);
110 UINT32 HAL_GetCurrentMsCount(void);
111 BOOL HAL_GetUartByte (UCHAR *UartCh);
112 BOOL HAL_SendUartByte (UCHAR UartCh);
113 BOOL HAL_GetIrCode (UINT16 *Ir_code);
114 BOOL HAL_GetMBSwitchState (void);
115 UCHAR HAL_GetMBButtonsState (void);
116 void HAL_SetGPIO_State (UCHAR, UCHAR);
117 BOOL HAL_RxInt1Pending (void);
118 BOOL HAL_RxInt2Pending (void);
119 BOOL HAL_TxIntPending (void);
120 void HAL_PlatformInit(UINT32 i2cBaseAddr,
121 UINT32 timerDevId,
122 UINT32 timerIntCtrlDevId,
123 UINT32 timerIntId);;
124 UINT16 HAL_GetHwRevision (void);
125 char *HAL_GetPlatformName (void);
126 UCHAR HAL_GetRxBoardRevision (void);
127 UCHAR HAL_GetTxBoardRevision (void);
128 void HAL_MainReset (void);
129 void HAL_MpuReset (void);
130 void HAL_SwitchContext (BOOL RepContext, void (*EntryPoint) (void));
131 void HAL_ContextCheck (void);
132 BOOL HAL_IntPendingN (UCHAR IntId);
133 void HAL_PlatformRXInit (void);
134 void HAL_PlatformTXInit (void);
135 void HAL_SetLedState (UCHAR LedId, BOOL value);
136 void HAL_SetGPIOState (UCHAR GpioId, BOOL value);
137 void HAL_AudioCodec(void);
138 void HAL_SetAudioChannelMux(UCHAR);
139 UCHAR HAL_AudioCodecWr(UCHAR, UCHAR);
140 UCHAR HAL_AudioCodecRead(UCHAR);
141
142 #endif