source: svn/trunk/zas_dstar/hal/include/dsthalsys.h

Last change on this file was 2, checked in by phkim, 11 years ago

1.phkim

  1. revision copy newcon3sk r27
File size: 4.8 KB
Line 
1/****************************************************************************
2 * Copyright (c) 2004 DST Technologies Inc.  All Rights Reserved.
3 *
4 * Module:      dsthhalav.h
5 *
6 * Description: DST HAL AUDIO/VIDEO Interface function definition
7 *                             
8 *           
9 *
10 * notes: jfet0525
11 *
12 ***************************************************************************/
13
14
15#if !defined (_DSTHAL_SYS_H_)
16#define _DSTHAL_SYS_H_
17
18#include "dsthallocal.h"
19#include "dsthalcommon.h"
20#include "dstddgpio.h"
21#include "dstversion.h"
22#include "dstoslayer.h"
23
24
25/*Debug level Type*/
26typedef enum {
27        DHL_SYSDBG_DHLSYS,      //DHL_SYS
28        DHL_SYSDBG_DDSYS,       //DD_SYS       
29        DHL_SYSDBG_END
30}DHL_SYS_DBGTYPE; 
31
32typedef enum {
33        BOARD_DIV_DDM40 = 0x8001,
34        BOARD_DIV_DDM42
35} BOARD_DIVERSITY;
36
37typedef enum {
38        BOARD_R0_1 = 0x1,
39        BOARD_R0_2 = 0x2,
40        BOARD_R0_3 = 0x3,
41        BOARD_R0_4 = 0x4,
42        BOARD_R1_0 = 0x8,
43} BOARD_REV_TYPE;
44
45#if defined __cplusplus
46extern "C" {
47#endif
48
49DHL_RESULT DHL_SYS_Initiate(void);
50DHL_RESULT DHL_SYS_Terminate(void);
51void DHL_SYS_SetDbgLvl(DS_U32 uDbgLvl, DHL_SYS_DBGTYPE DbgType);
52DHL_RESULT DHL_SYS_IsDCRBoard( DS_BOOL *flag );
53DHL_RESULT DHL_SYS_IsSTBYPowerMode( DS_BOOL *flag );
54DHL_RESULT DHL_SYS_GetBoardVersion(DS_U32 *ver);
55DHL_RESULT DHL_SYS_uPD64012_CheckAlive(void);
56DHL_RESULT DHL_SYS_1394_CheckAlive(void);
57DHL_RESULT DHL_SYS_ADV7400_CheckAlive(void);
58int DHL_SYS_IsR0_5(void);
59
60void DHL_SYS_DumpVersionInfo(void);
61//      JFET_20041030
62//      added atidriver_version by jfet.
63//      this version managed by DST not ATI.(Dx.xx)
64typedef struct
65{
66        char    kernel_version[64];
67        DS_U32  dsthal_version;                         // it managed by DST (Hyy_y)
68        DS_U32  driver_dst_version;                     // it managed by DST (Dxx_x)
69        DS_U32  board_version;                          // be careful. it is char value. not string. 
70        DS_U32  driver_ven_version;                     // it managed by Vendor (Mxx_x)
71        DS_U32  fe_version;
72        //DS_U32        mce_microversion;                       //mpeg2.mce Micro version
73        //DS_U32        mce_fileversion;                        //mpeg2.mce File version       
74        DS_U32  loader_version;
75} DHL_SYS_Info, *pDHL_SYS_Info;
76
77typedef struct tag_DHL_SYS_CONFIG
78{
79        OS_MUTEX_ID     SYSMutex;
80
81} DHL_SYS_CONFIG, *P_DHL_SYS_CONFIG;
82
83void DHL_SYS_GetInfo( pDHL_SYS_Info );
84void DHL_SYS_DumpVersion(void);
85
86DHL_RESULT DHL_SYS_SetSelfPwr( int selfPwr );
87DHL_RESULT DHL_SYS_CIMaxCheckAlive(void);
88DHL_RESULT DHL_SYS_Reset(void);
89
90DHL_RESULT DHL_SYS_SetBoardRev(DS_U32 BrdDiv, DS_U32 BrdRev);
91DS_U32 DHL_SYS_GetBoardRev(void);
92DS_U32 DHL_SYS_GetBoardDiv(void);
93
94#if 0
95void DD_SYS_WaitForDone( char *pidName );
96#endif
97
98DS_U32 DHL_SYS_GetChipID(void);
99
100///////////////////////////////
101// GPIO
102///////////////////////////////
103DHL_RESULT DHL_SYS_SetGPIO( int GpioNum, int Value );
104int DHL_SYS_GetGPIO( int GpioNum );
105char *DHL_SYS_GetGPIOName( int GpioNum );
106int DHL_SYS_FindGPIONum( const char *gpioName );
107
108///////////////////////////////
109// I2C
110///////////////////////////////
111int DHL_SYS_MSPRead(unsigned char subAddr, unsigned int addr,unsigned short length,unsigned char *rbuf);
112int DHL_SYS_MSPWrite(unsigned char WriteAddr,unsigned int addr,unsigned short length,unsigned short data);
113int DHL_SYS_I2cWrite(unsigned char addr, int nSubAddress, int subAddress, unsigned char *buf, int len);
114int DHL_SYS_I2cRead(unsigned char addr, int nSubAddress, int subAddress, unsigned char *buf, int len);
115int DHL_SYS_ANXWrite(unsigned char port, unsigned char regAddr, unsigned char val);
116int DHL_SYS_ANXRead(unsigned char port, unsigned char regAddr, unsigned char *buf);
117int DHL_SYS_GetHDMISwMux(void);
118int DHL_SYS_SetHDMISwMux(int mux);
119int DHL_SYS_SetHDMI_EDID_WREn(int onoff);
120int DHL_SYS_GenHDMI_HPD(void);
121DHL_RESULT DHL_SYS_SetI2CSpeed(unsigned char bus, unsigned int speed);
122int DHL_SYS_GetCECSwitchStatus(void);
123int DHL_SYS_I2cWriteEx(int i2cBus, unsigned char addr, int isSubAddress, int subAddress, unsigned char *buf, int len);
124int DHL_SYS_I2cReadEx(int i2cBus, unsigned char addr, int isSubAddress, int subAddress, unsigned char *buf, int len);
125int DHL_SYS_I2cWriteAndReadEx(int i2cBus, unsigned char addr, int isSubAddress, int subAddress, unsigned char *buf, int len);
126DS_U32 DHL_SYS_PrintFreeMem(const char *pfunc, int line);
127
128
129///////////////////////////////
130// Register
131///////////////////////////////
132DS_U32 DHL_SYS_ReadRegister( DS_U32 Address );
133DS_U32 DHL_SYS_WriteRegister( DS_U32 Address, DS_U32 Value );
134
135///////////////////////////////
136// USB
137///////////////////////////////
138DHL_RESULT DHL_SYS_IsUsbValid(void);
139
140
141DHL_RESULT DHL_SYS_IsSystemAlive(DS_U8 *pErrorCode);
142char *DHL_SYS_GetSystemErrorCode(DS_U8 ErrorCode);
143
144DHL_RESULT DHL_SYS_GetSysinfo(DS_U32 *pTotalMem, DS_U32 *pUsedMem, DS_U32 *pFreeMem, DS_U32 *pBuffer, DS_U32 *pCached);
145DS_U32 freeMemory(void);
146int DHL_SYS_I2cWriteAndRead(unsigned char addr, int isSubAddress, int subAddress, unsigned char *buf, int len);
147void DHL_SYS_DumpRegister(DS_U32 Address, DS_U32 cnt);
148void DHL_SYS_DumpMemory(DS_U32 Address, DS_U32 cnt);
149int DHL_SYS_IsANX8775Exist(void);
150
151#if defined __cplusplus
152}
153#endif
154
155#endif /* _DSTHAL_SYS_H_ */
156
157
Note: See TracBrowser for help on using the repository browser.