/**************************************************************************** * Copyright (c) 2004 DST Technologies Inc. All Rights Reserved. * * Module: dsthhalav.h * * Description: DST HAL AUDIO/VIDEO Interface function definition * * * * notes: jfet0525 * ***************************************************************************/ #if !defined (_DSTHAL_SYS_H_) #define _DSTHAL_SYS_H_ #include "dsthallocal.h" #include "dsthalcommon.h" #include "dstddgpio.h" #include "dstversion.h" #include "dstoslayer.h" /*Debug level Type*/ typedef enum { DHL_SYSDBG_DHLSYS, //DHL_SYS DHL_SYSDBG_DDSYS, //DD_SYS DHL_SYSDBG_END }DHL_SYS_DBGTYPE; typedef enum { BOARD_DIV_DDM40 = 0x8001, BOARD_DIV_DDM42 } BOARD_DIVERSITY; typedef enum { BOARD_R0_1 = 0x1, BOARD_R0_2 = 0x2, BOARD_R0_3 = 0x3, BOARD_R0_4 = 0x4, BOARD_R1_0 = 0x8, } BOARD_REV_TYPE; #if defined __cplusplus extern "C" { #endif DHL_RESULT DHL_SYS_Initiate(void); DHL_RESULT DHL_SYS_Terminate(void); void DHL_SYS_SetDbgLvl(DS_U32 uDbgLvl, DHL_SYS_DBGTYPE DbgType); DHL_RESULT DHL_SYS_IsDCRBoard( DS_BOOL *flag ); DHL_RESULT DHL_SYS_IsSTBYPowerMode( DS_BOOL *flag ); DHL_RESULT DHL_SYS_GetBoardVersion(DS_U32 *ver); DHL_RESULT DHL_SYS_uPD64012_CheckAlive(void); DHL_RESULT DHL_SYS_1394_CheckAlive(void); DHL_RESULT DHL_SYS_ADV7400_CheckAlive(void); int DHL_SYS_IsR0_5(void); void DHL_SYS_DumpVersionInfo(void); // JFET_20041030 // added atidriver_version by jfet. // this version managed by DST not ATI.(Dx.xx) typedef struct { char kernel_version[64]; DS_U32 dsthal_version; // it managed by DST (Hyy_y) DS_U32 driver_dst_version; // it managed by DST (Dxx_x) DS_U32 board_version; // be careful. it is char value. not string. DS_U32 driver_ven_version; // it managed by Vendor (Mxx_x) DS_U32 fe_version; //DS_U32 mce_microversion; //mpeg2.mce Micro version //DS_U32 mce_fileversion; //mpeg2.mce File version DS_U32 loader_version; } DHL_SYS_Info, *pDHL_SYS_Info; typedef struct tag_DHL_SYS_CONFIG { OS_MUTEX_ID SYSMutex; } DHL_SYS_CONFIG, *P_DHL_SYS_CONFIG; void DHL_SYS_GetInfo( pDHL_SYS_Info ); void DHL_SYS_DumpVersion(void); DHL_RESULT DHL_SYS_SetSelfPwr( int selfPwr ); DHL_RESULT DHL_SYS_CIMaxCheckAlive(void); DHL_RESULT DHL_SYS_Reset(void); DHL_RESULT DHL_SYS_SetBoardRev(DS_U32 BrdDiv, DS_U32 BrdRev); DS_U32 DHL_SYS_GetBoardRev(void); DS_U32 DHL_SYS_GetBoardDiv(void); #if 0 void DD_SYS_WaitForDone( char *pidName ); #endif DS_U32 DHL_SYS_GetChipID(void); /////////////////////////////// // GPIO /////////////////////////////// DHL_RESULT DHL_SYS_SetGPIO( int GpioNum, int Value ); int DHL_SYS_GetGPIO( int GpioNum ); char *DHL_SYS_GetGPIOName( int GpioNum ); int DHL_SYS_FindGPIONum( const char *gpioName ); /////////////////////////////// // I2C /////////////////////////////// int DHL_SYS_MSPRead(unsigned char subAddr, unsigned int addr,unsigned short length,unsigned char *rbuf); int DHL_SYS_MSPWrite(unsigned char WriteAddr,unsigned int addr,unsigned short length,unsigned short data); int DHL_SYS_I2cWrite(unsigned char addr, int nSubAddress, int subAddress, unsigned char *buf, int len); int DHL_SYS_I2cRead(unsigned char addr, int nSubAddress, int subAddress, unsigned char *buf, int len); int DHL_SYS_ANXWrite(unsigned char port, unsigned char regAddr, unsigned char val); int DHL_SYS_ANXRead(unsigned char port, unsigned char regAddr, unsigned char *buf); int DHL_SYS_GetHDMISwMux(void); int DHL_SYS_SetHDMISwMux(int mux); int DHL_SYS_SetHDMI_EDID_WREn(int onoff); int DHL_SYS_GenHDMI_HPD(void); DHL_RESULT DHL_SYS_SetI2CSpeed(unsigned char bus, unsigned int speed); int DHL_SYS_GetCECSwitchStatus(void); int DHL_SYS_I2cWriteEx(int i2cBus, unsigned char addr, int isSubAddress, int subAddress, unsigned char *buf, int len); int DHL_SYS_I2cReadEx(int i2cBus, unsigned char addr, int isSubAddress, int subAddress, unsigned char *buf, int len); int DHL_SYS_I2cWriteAndReadEx(int i2cBus, unsigned char addr, int isSubAddress, int subAddress, unsigned char *buf, int len); DS_U32 DHL_SYS_PrintFreeMem(const char *pfunc, int line); /////////////////////////////// // Register /////////////////////////////// DS_U32 DHL_SYS_ReadRegister( DS_U32 Address ); DS_U32 DHL_SYS_WriteRegister( DS_U32 Address, DS_U32 Value ); /////////////////////////////// // USB /////////////////////////////// DHL_RESULT DHL_SYS_IsUsbValid(void); DHL_RESULT DHL_SYS_IsSystemAlive(DS_U8 *pErrorCode); char *DHL_SYS_GetSystemErrorCode(DS_U8 ErrorCode); DHL_RESULT DHL_SYS_GetSysinfo(DS_U32 *pTotalMem, DS_U32 *pUsedMem, DS_U32 *pFreeMem, DS_U32 *pBuffer, DS_U32 *pCached); DS_U32 freeMemory(void); int DHL_SYS_I2cWriteAndRead(unsigned char addr, int isSubAddress, int subAddress, unsigned char *buf, int len); void DHL_SYS_DumpRegister(DS_U32 Address, DS_U32 cnt); void DHL_SYS_DumpMemory(DS_U32 Address, DS_U32 cnt); int DHL_SYS_IsANX8775Exist(void); #if defined __cplusplus } #endif #endif /* _DSTHAL_SYS_H_ */