| 1 | /* |
|---|
| 2 | |
|---|
| 3 | User defined Data Types and API Functions for MxL201RF Tuner |
|---|
| 4 | |
|---|
| 5 | Copyright, Maxlinear, Inc. |
|---|
| 6 | All Rights Reserved |
|---|
| 7 | |
|---|
| 8 | File Name: MxL201RF_API.c |
|---|
| 9 | Date Created: Jan. 20, 2009 |
|---|
| 10 | Version: 5.1.6 |
|---|
| 11 | */ |
|---|
| 12 | |
|---|
| 13 | |
|---|
| 14 | #ifndef __MxL_USER_DEFINE_H |
|---|
| 15 | #define __MxL_USER_DEFINE_H |
|---|
| 16 | |
|---|
| 17 | #if defined( __cplusplus ) |
|---|
| 18 | extern "C" /* Use "C" external linkage */ |
|---|
| 19 | { |
|---|
| 20 | #endif |
|---|
| 21 | |
|---|
| 22 | |
|---|
| 23 | /****************************************************************************** |
|---|
| 24 | User-Defined Types (Typedefs) |
|---|
| 25 | ******************************************************************************/ |
|---|
| 26 | #ifndef __DHL_TYPES_H__ |
|---|
| 27 | typedef unsigned char UINT8; |
|---|
| 28 | typedef unsigned short UINT16; |
|---|
| 29 | typedef unsigned int UINT32; |
|---|
| 30 | typedef char SINT8; |
|---|
| 31 | typedef short SINT16; |
|---|
| 32 | typedef int SINT32; |
|---|
| 33 | #endif |
|---|
| 34 | typedef float REAL32; |
|---|
| 35 | |
|---|
| 36 | #ifndef __DHL_TYPES_H__ |
|---|
| 37 | typedef enum |
|---|
| 38 | { |
|---|
| 39 | TRUE = 1, |
|---|
| 40 | FALSE = 0 |
|---|
| 41 | } BOOL; |
|---|
| 42 | #endif |
|---|
| 43 | |
|---|
| 44 | /****************************************************************************** |
|---|
| 45 | ** |
|---|
| 46 | ** Name: MxL_I2C_Write |
|---|
| 47 | ** |
|---|
| 48 | ** Description: I2C write operations |
|---|
| 49 | ** |
|---|
| 50 | ** Parameters: |
|---|
| 51 | ** DeviceAddr - MxL201RF Device address |
|---|
| 52 | ** pArray - Write data array pointer |
|---|
| 53 | ** count - total number of array |
|---|
| 54 | ** |
|---|
| 55 | ** Returns: 0 if success |
|---|
| 56 | ** |
|---|
| 57 | ** Revision History: |
|---|
| 58 | ** |
|---|
| 59 | ** SCR Date Author Description |
|---|
| 60 | ** ------------------------------------------------------------------------- |
|---|
| 61 | ** N/A 12-16-2007 khuang initial release. |
|---|
| 62 | ** |
|---|
| 63 | ******************************************************************************/ |
|---|
| 64 | UINT32 MxL_I2C_Write(UINT8 DeviceAddr, UINT8* pArray, UINT32 count); |
|---|
| 65 | |
|---|
| 66 | /****************************************************************************** |
|---|
| 67 | ** |
|---|
| 68 | ** Name: MxL_I2C_Read |
|---|
| 69 | ** |
|---|
| 70 | ** Description: I2C read operations |
|---|
| 71 | ** |
|---|
| 72 | ** Parameters: |
|---|
| 73 | ** DeviceAddr - MxL201RF Device address |
|---|
| 74 | ** Addr - register address for read |
|---|
| 75 | ** *Data - data return |
|---|
| 76 | ** |
|---|
| 77 | ** Returns: 0 if success |
|---|
| 78 | ** |
|---|
| 79 | ** Revision History: |
|---|
| 80 | ** |
|---|
| 81 | ** SCR Date Author Description |
|---|
| 82 | ** ------------------------------------------------------------------------- |
|---|
| 83 | ** N/A 12-16-2007 khuang initial release. |
|---|
| 84 | ** |
|---|
| 85 | ******************************************************************************/ |
|---|
| 86 | UINT32 MxL_I2C_Read(UINT8 DeviceAddr, UINT8 Addr, UINT8* mData); |
|---|
| 87 | |
|---|
| 88 | /****************************************************************************** |
|---|
| 89 | ** |
|---|
| 90 | ** Name: MxL_Delay |
|---|
| 91 | ** |
|---|
| 92 | ** Description: Delay function in milli-second |
|---|
| 93 | ** |
|---|
| 94 | ** Parameters: |
|---|
| 95 | ** mSec - milli-second to delay |
|---|
| 96 | ** |
|---|
| 97 | ** Returns: 0 |
|---|
| 98 | ** |
|---|
| 99 | ** Revision History: |
|---|
| 100 | ** |
|---|
| 101 | ** SCR Date Author Description |
|---|
| 102 | ** ------------------------------------------------------------------------- |
|---|
| 103 | ** N/A 12-16-2007 khuang initial release. |
|---|
| 104 | ** |
|---|
| 105 | ******************************************************************************/ |
|---|
| 106 | void MxL_Delay(UINT32 mSec); |
|---|
| 107 | |
|---|
| 108 | #if defined( __cplusplus ) |
|---|
| 109 | } |
|---|
| 110 | #endif |
|---|
| 111 | |
|---|
| 112 | #endif //__MxL_USER_DEFINE_H |
|---|