synaptics ic firmware upgrade automatically

1.  Reading and writing bootloader id is not the same register(one is query region, the other is data region).


2. block size(how many sizes of every block) and block number(what is block's number) should be distinguished.


3. The register address is not the same on bootloader mode and on UI mode.


4. disappoint = let down

You  said  you would  come to  our  party do not  disappoint  us .

You can believe in this girl,she'll never let you down.


5.  Use with weak typed variables to cast them as another type.

        char fm[8] = {0, 0, 1, 0, 5, 0, 1, 0};
        int test1 = *(int *)(fm+4);
        int test2 = (int)*(fm+4);
        printf("test1=0x%x, test2=0x%x\n", test1, test2);

The result is : test1=0x10005, test2=0x5

Why test1's value is 0x10005. Actually, the reason is fm[4] = 0x05, fm[3] =0x0, fm[2] =0x01


6. make phone as slave device, such as com, modem and so on.

setprop persist.sys.usb.config ptp,diag,serial_smd,serial_tty,serial_smd,adb

7. Position in sys

root@android:/sys/devices/sensor00 # ll
ll
lrwxrwxrwx root     root              2013-08-22 11:05 attn -> ../platform/msmgpio/gpio/gpio11
lrwxrwxrwx root     root              2013-08-22 11:05 driver -> ../../bus/rmi/drivers/rmi_controller
-rw-rw-r-- root     root         4096 2013-08-22 11:05 enabled
drwxr-xr-x root     root              1970-01-09 09:02 fn01 // Device Control: Common functionality for all Synaptics devices
drwxr-xr-x root     root              1970-01-09 09:02 fn11 // 2-D sensing  Finger reporting
drwxr-xr-x root     root              1970-01-09 09:02 fn1a // 0-D buttons  Capacitive button reporting
drwxr-xr-x root     root              1970-01-09 09:02 fn34 // Reflash  In-system firmware upgrade
drwxr-xr-x root     root              1970-01-09 09:02 fn54 // Diagnostics  Capacitance data, sensing control and test
-r--r--r-- root     root         4096 2013-08-22 11:05 hasbsr
drwxr-xr-x root     root              1970-01-09 09:02 input
drwxr-xr-x root     root              1970-01-09 09:02 power
lrwxrwxrwx root     root              2013-08-22 11:05 subsystem -> ../../bus/rmi
-rw-r--r-- root     root         4096 1970-01-09 09:02 uevent

8. When touch ic detects events, it will transmit pulse signal from TX pin, then it will recieve data from RX pin. Actually, the data is a voltage, which should be converted to digital signal via ADC. The digital signal will be handled as a capacitance value. After finishing scan, all of capacitance values of touch panel will be generated. In normal case, all of capacitance values should be swinged between a specific range, e.g. -25% ~ + 25%. If the capacitance value is out of range, it will be supposed to be abnormal.


你可能感兴趣的:(synaptics ic firmware upgrade automatically)