| 1 | /****************************************************************************** |
|---|
| 2 | *_Copyright (c) 2009 Digital Stream Technology Inc. All Rights Reserved. |
|---|
| 3 | * |
|---|
| 4 | * Module: dstddsys.h |
|---|
| 5 | * |
|---|
| 6 | * Description |
|---|
| 7 | * |
|---|
| 8 | * @author |
|---|
| 9 | * @version $Revision: 1.1 $ |
|---|
| 10 | * |
|---|
| 11 | ******************************************************************************/ |
|---|
| 12 | |
|---|
| 13 | #ifndef __DSTDDSYS_H__ |
|---|
| 14 | #define __DSTDDSYS_H__ |
|---|
| 15 | |
|---|
| 16 | #if defined __cplusplus |
|---|
| 17 | extern "C" { |
|---|
| 18 | #endif |
|---|
| 19 | |
|---|
| 20 | DHL_RESULT DD_SYS_Initiate(void); |
|---|
| 21 | DHL_RESULT DD_SYS_IsUsbValid(void); |
|---|
| 22 | DHL_RESULT DD_SYS_Terminate(void); |
|---|
| 23 | DHL_RESULT DD_SYS_SetDbgLvl(DS_U32 uDbgLvl); |
|---|
| 24 | DHL_RESULT DD_SYS_Reset(void); |
|---|
| 25 | DHL_RESULT DD_SYS_SetPWM(int Period, int Duty); |
|---|
| 26 | DHL_RESULT DD_SYS_SetADIM(DS_U16 Period); |
|---|
| 27 | DHL_RESULT DD_SYS_CheckDevice(void); |
|---|
| 28 | DHL_RESULT DD_SYS_HDMI_TX_Init(void); |
|---|
| 29 | |
|---|
| 30 | DS_U32 DD_SYS_GetDrvDstVersion(void); |
|---|
| 31 | DS_U32 DD_SYS_GetDrvVenVersion(void); |
|---|
| 32 | DS_U32 DD_SYS_GetLoaderVer(void); |
|---|
| 33 | |
|---|
| 34 | // GPIO |
|---|
| 35 | DHL_RESULT DD_SYS_SetGPIO( int GpioNum, int Value ); |
|---|
| 36 | int DD_SYS_GetGPIO( int GpioNum ); |
|---|
| 37 | int DD_SYS_GetGPIOOut(int pin); |
|---|
| 38 | int DD_SYS_FindGPIONum( const char *gpioName ); |
|---|
| 39 | char *DD_SYS_GetGPIOName( int GpioNum ); |
|---|
| 40 | DHL_RESULT DD_SYS_SetGPIODefault( int GpioNum ); |
|---|
| 41 | |
|---|
| 42 | int DD_SYS_IsR0_5(void); |
|---|
| 43 | |
|---|
| 44 | int DD_SYS_InitGPIOExtInt(void); |
|---|
| 45 | int DD_SYS_IsGPIOExtInt(void); |
|---|
| 46 | int DD_SYS_IsGPIOExtIntLow(void); |
|---|
| 47 | int DD_SYS_IsGPIOExtIntHigh(void); |
|---|
| 48 | DHL_RESULT DD_SYS_InitGPIO_MSP(void); |
|---|
| 49 | |
|---|
| 50 | |
|---|
| 51 | // I2C |
|---|
| 52 | int DD_SYS_MI2cWrite(unsigned char addr, unsigned char *buf, int len); |
|---|
| 53 | int DD_SYS_I2cWrite(int i2cBus, unsigned char addr, int isSubAddress, int subAddress, unsigned char *buf, int len); |
|---|
| 54 | int DD_SYS_MI2cRead(unsigned char addr, unsigned char *buf, int len); |
|---|
| 55 | int DD_SYS_I2cRead(int i2cBus, unsigned char addr, int isSubAddress, int subAddress, unsigned char *buf, int len); |
|---|
| 56 | DHL_RESULT DD_SYS_SetI2CSpeed(unsigned char bus, unsigned int speed); |
|---|
| 57 | int DD_SYS_IsANX8775Exist(void); |
|---|
| 58 | |
|---|
| 59 | DHL_RESULT DD_SYS_IsSystemAlive(DS_U8 *pErrorCode); |
|---|
| 60 | char *DD_SYS_GetSystemErrorCode(DS_U8 ErrorCode); |
|---|
| 61 | |
|---|
| 62 | int DD_SYS_I2cWriteAndRead(int i2cBus, unsigned char addr, int isSubAddress, int subAddress, unsigned char *buf, int len); |
|---|
| 63 | |
|---|
| 64 | void *DD_SYS_PhyMemAlloc(int size); |
|---|
| 65 | void DD_SYS_PhyMemFree(void *addr); |
|---|
| 66 | |
|---|
| 67 | int DD_SYS_I2cRead2(int i2cBus, unsigned char addr, int isSubAddress, int subAddress, unsigned char *buf, int len); |
|---|
| 68 | int DD_SYS_I2cRead3(int i2cBus, unsigned char addr, int isSubAddress,unsigned char *subAddress, unsigned char *buf, int len); |
|---|
| 69 | int DD_SYS_I2cWrite2(int i2cBus, unsigned char addr, int isSubAddress, int subAddress, unsigned char *buf, int len); |
|---|
| 70 | int DD_SYS_I2cWrite3(int i2cBus, unsigned char addr, int isSubAddress, unsigned char *subAddress, unsigned char *buf, int len); |
|---|
| 71 | void DD_SYS_SetRegister8(DS_U32 Addr, DS_U8 Value); |
|---|
| 72 | void DD_SYS_SetRegister16(DS_U32 Addr, DS_U16 Value); |
|---|
| 73 | void DD_SYS_SetRegister32(DS_U32 Addr, DS_U32 value); |
|---|
| 74 | |
|---|
| 75 | DS_U8 DD_SYS_GetRegister8(DS_U32 Addr); |
|---|
| 76 | DS_U16 DD_SYS_GetRegister16(DS_U32 Addr); |
|---|
| 77 | DS_U32 DD_SYS_GetRegister32(DS_U32 Addr); |
|---|
| 78 | |
|---|
| 79 | void DD_DTV_SetDebugMode(int bOnOff);; |
|---|
| 80 | |
|---|
| 81 | #if defined __cplusplus |
|---|
| 82 | } |
|---|
| 83 | #endif |
|---|
| 84 | |
|---|
| 85 | #endif /* __DSTDDSYS_H__ */ |
|---|