4 //#include "Validation.h"
9 #include <linux/kernel.h> //printk
10 #include <linux/string.h> //memset
11 extern void device_I2C_read(unsigned char add
, unsigned char *value
, unsigned short len
);
12 extern void device_I2C_write(unsigned char add
, unsigned char *value
, unsigned short len
);
13 extern void InitPage(void);
14 extern void SetPage(unsigned char page
);
15 extern void readRMI(unsigned short add
, unsigned char *value
, unsigned short len
);
16 extern void longReadRMI(unsigned short add
, unsigned char *value
, unsigned short len
);
17 extern void writeRMI(unsigned short add
, unsigned char *value
, unsigned short len
);
18 extern void delayMS(int val
);
19 extern void cleanExit(int code
);
20 extern int waitATTN(int code
, int time
);
21 extern void write_log(char *data
);
22 extern int get_limit( unsigned char Tx
, unsigned char Rx
);
23 extern int LimitFile
[30][46*2];
29 //#define _BUTTON_DELTA_IMAGE_TEST_
30 //#define _DS4_3_0_ // TM2000, TM2145, TM2195
31 #define _DS4_3_2_ // TM2371, TM2370, PLG137, PLG122
33 //(important) should be defined the value(=register address) according to register map
34 //'Multi Metric Noise Mitigation Control'
35 //#define NoiseMitigation 0x1A1 // TM2000 (~E025), TM2195
36 //#define NoiseMitigation 0x1B1 // TM2000 (E027~)
37 //#define NoiseMitigation 0x0196 // TM2145
38 //#define NoiseMitigation 0x15E // TM2370, TM2371, PLG137, PLG122
39 #define NoiseMitigation 0x138 // PLG124 E008
41 //#define F54_CBCPolarity 0x1B6 // TM2000 (E027~)
42 //#define F54_CBCPolarity 0x163 // TM2370, TM2371, PLG137, PLG122
43 #define F54_CBCPolarity 0x16E // PLG124 E008
46 #define F55_PhysicalRx_Addr 0x301 // TM2371, TM2370, PLG137, PLG122
50 unsigned char F54_FullRawCap(int);
51 unsigned char F54_RxToRxReport(void);
52 unsigned char F54_TxToGndReport(void);
53 unsigned char F54_TxToTxReport(void);
54 unsigned char F54_TxOpenReport(void);
55 unsigned char F54_RxOpenReport(void);
56 unsigned char F54_HighResistance(void);
58 int F54_GetFullRawCap(int, char *);
59 int F54_GetRxToRxReport(char *);
60 int F54_GetTxToGndReport(char *);
61 int F54_GetTxToTxReport(char *);
62 int F54_GetTxOpenReport(char *);
63 int F54_GetRxOpenReport(char *);
64 int F54_GetHighResistance(char *);
67 #ifdef _BUTTON_DELTA_IMAGE_TEST_
68 unsigned char F54_ButtonDeltaImage();
72 void HostImplementationTesting( void );
76 void CompleteReflash_OmitLockdown();
77 void CompleteReflash();
78 void CompleteReflash_Lockdown();
79 void ConfigBlockReflash();
82 void FirmwareCheck( void );
83 void AttentionTest( void );
84 void FirmwareCheck_temp( void );