Index: output/eeprom.dat
===================================================================
--- /YC1308AC/branch/mouse_project/XZR/Standard_2.4G_First/output/eeprom.dat	(revision 512)
+++ /YC1308AC/branch/mouse_project/XZR/Standard_2.4G_First/output/eeprom.dat	(working copy)
@@ -2,52 +2,56 @@
 02
 aa
 55
-7a
+c2
 03
 c2
 84
 00
-0c
+0d
 c0
 00
 00
-0f
+10
 c0
 45
 80
-2d
+2b
 c0
 4f
 80
-38
+36
 c0
 57
 00
-13
+14
 c0
 62
 00
-18
+16
 c0
 64
 80
-3a
+38
 c0
 65
 00
-45
+43
 c0
 68
 00
-67
+65
 c0
 6b
 00
-4e
+4c
 c0
 6c
 80
-78
+76
+c0
+74
+00
+be
 20
 20
 13
@@ -55,11 +59,11 @@
 c0
 50
 80
-c0
+d2
 c0
 60
 00
-ca
+dc
 20
 20
 13
@@ -85,18 +89,6 @@
 6d
 f3
 20
-40
-00
-29
-d8
-40
-00
-13
-20
-40
-60
-7f
-20
 20
 3b
 c1
@@ -131,7 +123,7 @@
 c0
 19
 80
-22
+20
 c0
 1a
 3d
@@ -323,19 +315,19 @@
 c0
 1e
 00
-62
+60
 c0
 02
 00
-5b
+59
 c0
 09
 80
-5b
+59
 c0
 19
 00
-54
+52
 20
 20
 43
@@ -347,7 +339,7 @@
 c0
 00
 80
-58
+56
 70
 4b
 76
@@ -423,7 +415,7 @@
 20
 40
 00
-6a
+68
 20
 20
 40
@@ -475,7 +467,7 @@
 20
 3a
 00
-86
+84
 67
 e0
 cb
@@ -511,11 +503,11 @@
 20
 40
 00
-83
+81
 20
 40
 00
-9b
+99
 20
 40
 44
@@ -523,7 +515,7 @@
 20
 40
 00
-a6
+a4
 20
 20
 44
@@ -535,7 +527,7 @@
 da
 40
 00
-86
+84
 20
 20
 31
@@ -591,11 +583,11 @@
 20
 41
 00
-95
+93
 24
 41
 00
-99
+97
 20
 20
 48
@@ -635,7 +627,7 @@
 c2
 9b
 00
-9f
+9d
 20
 60
 00
@@ -655,7 +647,7 @@
 da
 40
 00
-a4
+a2
 20
 20
 31
@@ -667,7 +659,7 @@
 20
 20
 00
-b8
+b6
 6f
 e4
 4b
@@ -703,7 +695,7 @@
 20
 22
 80
-b0
+ae
 20
 20
 44
@@ -711,7 +703,7 @@
 20
 40
 00
-b2
+b0
 20
 20
 44
@@ -723,7 +715,7 @@
 da
 40
 00
-b8
+b6
 20
 40
 31
@@ -773,6 +765,86 @@
 44
 d4
 6f
+e1
+03
+15
+1f
+e2
+0c
+00
+ef
+e0
+80
+06
+67
+e0
+c5
+f5
+1f
+e1
+04
+0f
+1f
+f1
+fe
+00
+c0
+04
+80
+c6
+20
+20
+4d
+92
+da
+20
+00
+01
+20
+40
+4d
+c0
+6f
+e1
+44
+dc
+e7
+e1
+00
+05
+58
+00
+00
+00
+e7
+e0
+80
+05
+70
+09
+50
+01
+6f
+e0
+c4
+e2
+79
+20
+7e
+06
+67
+e0
+c4
+e2
+70
+09
+5b
+12
+20
+20
+78
+71
+6f
 e0
 c3
 dd
@@ -819,7 +891,7 @@
 c0
 02
 00
-cd
+df
 20
 20
 19
@@ -835,7 +907,7 @@
 c0
 05
 00
-d1
+e3
 20
 20
 1c
@@ -855,7 +927,7 @@
 c2
 81
 80
-d9
+eb
 6f
 e1
 44
@@ -883,17 +955,17 @@
 24
 22
 80
-d5
+e7
 24
 34
 00
-d5
+e7
 20
 20
 1e
 10
-19
-fd
+fe
+d1
 aa
 55
 40
@@ -929,7 +1001,7 @@
 41
 02
 00
-00
+01
 00
 00
 00
@@ -1343,7 +1415,7 @@
 00
 a8
 40
-15
+36
 a4
 c8
 12
@@ -2058,82 +2130,10 @@
 aa
 aa
 55
-51
+73
 58
-b3
-1e
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
+05
+fb
 ff
 ff
 ff
@@ -8188,5 +8188,5 @@
 ff
 ff
 ff
-e2
-36
+0f
+03
Index: output/program.lis
===================================================================
--- /YC1308AC/branch/mouse_project/XZR/Standard_2.4G_First/output/program.lis	(revision 512)
+++ /YC1308AC/branch/mouse_project/XZR/Standard_2.4G_First/output/program.lis	(working copy)
@@ -1,299 +1,321 @@
               include "bt_format "
               org 0x0000
-0000 c284000c bbit1 8 ,pf_patch_ext 
-0001 c000000f beq patch00_0 ,p_soft_reset 
-0002 c045802d beq patch11_3 ,p_initialize_radio_cont 
-0003 c04f8038 beq patch13_7 ,p_init_param 
-0004 c0570013 beq patch15_6 ,p_app_init 
-0005 c0620018 beq patch18_4 ,p_mouse_start_reconnect_device 
-0006 c064803a beq patch19_1 ,p_mouse_setgpio_hibernate 
-0007 c0650045 beq patch19_2 ,p_mouse_lpm_before_common 
-0008 c0680067 beq patch1a_0 ,p_mouse_seting_dpi 
-0009 c06b004e beq patch1a_6 ,p_mouse_priority_bb_event 
-000a c06c8078 beq patch1b_1 ,p_mouse_bb_event_timer 
-000b 2020137c branch loop 
+0000 c284000d bbit1 8 ,pf_patch_ext 
+0001 c0000010 beq patch00_0 ,p_soft_reset 
+0002 c045802b beq patch11_3 ,p_initialize_radio_cont 
+0003 c04f8036 beq patch13_7 ,p_init_param 
+0004 c0570014 beq patch15_6 ,p_app_init 
+0005 c0620016 beq patch18_4 ,p_mouse_start_reconnect_device 
+0006 c0648038 beq patch19_1 ,p_mouse_setgpio_hibernate 
+0007 c0650043 beq patch19_2 ,p_mouse_lpm_before_common 
+0008 c0680065 beq patch1a_0 ,p_mouse_seting_dpi 
+0009 c06b004c beq patch1a_6 ,p_mouse_priority_bb_event 
+000a c06c8076 beq patch1b_1 ,p_mouse_bb_event_timer 
+000b c07400be beq patch1d_0 ,p_hid_rx_process 
+000c 2020137c branch loop 
 
 pf_patch_ext:
-000c c05080c0 beq patch34_1 ,p_le_slave_match 
-000d c06000ca beq patch38_0 ,p_le_parse_l2cap 
-000e 2020137c branch loop 
+000d c05080d2 beq patch34_1 ,p_le_slave_match 
+000e c06000dc beq patch38_0 ,p_le_parse_l2cap 
+000f 2020137c branch loop 
 
 p_soft_reset:
-000f 20800000 clear_stack 
-0010 204030f3 call app_param_init 
-0011 20403bfd call mouse_xtal_init 
-0012 20200804 branch soft_reset + 3 
+0010 20800000 clear_stack 
+0011 204030f3 call app_param_init 
+0012 20403bfd call mouse_xtal_init 
+0013 20200804 branch soft_reset + 3 
 
 p_app_init:
 
 p_mouse_init:
-0013 20406df3 call enable_authrom 
-0014 20400029 call p_lpm_write_ice_disable 
-0015 d8400013 arg 19 ,temp 
-0016 2040607f call gpio_set_high_impedance 
-0017 20203bc1 branch mouse_init 
+0014 20406df3 call enable_authrom 
+0015 20203bc1 branch mouse_init 
 
 p_mouse_start_reconnect_device:
-0018 da204939 arg mem_device1_type ,rega 
-0019 6fe0c938 fetch 1 ,mem_device_flag 
-001a 1fe0ffff increase -1 ,pdata 
-001b 1feffe1d mul32 pdata ,29 ,pdata 
-001c 9a20a200 iadd rega ,rega 
-001d efe08011 ifetch 1 ,rega 
-001e 67e0c482 store 1 ,mem_xrecord_mode 
-001f c0198022 beq rec_3_mode ,p_mouse3_0_check_reconn_target 
-0020 c01a3d7b beq rec_4_mode ,mouse4_0_check_reconn_target 
-0021 20204553 branch mouse_start_discovery 
+0016 da204939 arg mem_device1_type ,rega 
+0017 6fe0c938 fetch 1 ,mem_device_flag 
+0018 1fe0ffff increase -1 ,pdata 
+0019 1feffe1d mul32 pdata ,29 ,pdata 
+001a 9a20a200 iadd rega ,rega 
+001b efe08011 ifetch 1 ,rega 
+001c 67e0c482 store 1 ,mem_xrecord_mode 
+001d c0198020 beq rec_3_mode ,p_mouse3_0_check_reconn_target 
+001e c01a3d7b beq rec_4_mode ,mouse4_0_check_reconn_target 
+001f 20204553 branch mouse_start_discovery 
 
 p_mouse3_0_check_reconn_target:
-0022 68494bb8 fetcht 2 ,mem_mouse_fast_page_to 
-0023 6fe0cac1 fetch 1 ,mem_mouse_bluetooth_fast_conn_flag 
-0024 c07fbd73 beq 0xff ,mouse3_0_check_reconn_target_next 
-0025 6848c902 fetcht 1 ,mem_mouse_direct_timeout 
-0026 6048cb77 storet 1 ,mem_mouse_direct_timer 
-0027 68494bb5 fetcht 2 ,mem_mouse_page_to 
-0028 20203d73 branch mouse3_0_check_reconn_target_next 
+0020 68494bb8 fetcht 2 ,mem_mouse_fast_page_to 
+0021 6fe0cac1 fetch 1 ,mem_mouse_bluetooth_fast_conn_flag 
+0022 c07fbd73 beq 0xff ,mouse3_0_check_reconn_target_next 
+0023 6848c902 fetcht 1 ,mem_mouse_direct_timeout 
+0024 6048cb77 storet 1 ,mem_mouse_direct_timer 
+0025 68494bb5 fetcht 2 ,mem_mouse_page_to 
+0026 20203d73 branch mouse3_0_check_reconn_target_next 
 
 p_lpm_write_ice_disable:
-0029 6ff10120 fetch 2 ,core_ucode_flag 
-002a 793ffe0e set0 lpmreg_ice_mode_bit ,pdata 
-002b 67f2004c store 4 ,core_lpm_reg 
-002c 20205caf branch lpm_write2_ctrl_option 
+0027 6ff10120 fetch 2 ,core_ucode_flag 
+0028 793ffe0e set0 lpmreg_ice_mode_bit ,pdata 
+0029 67f2004c store 4 ,core_lpm_reg 
+002a 20205caf branch lpm_write2_ctrl_option 
 
 p_initialize_radio_cont:
-002d 708a8be6 jam 0xe6 ,core_syn_aac_cfg1 
-002e 2040126a call initialize_syn_afc_cfg1 
-002f 20401271 call initialize_rf_ldo_cfg1 
-0030 20401277 call initialize_rc_cal 
-0031 708a6d09 jam 0x09 ,core_rx_bq_cfg0 
-0032 708a0305 jam 5 ,core_clkpll_cfg0 
-0033 708a7a94 jam 0x94 ,core_rx_iqadc_cfg 
-0034 708a0e0b jam 0x0b ,core_rf_ldo_cfg2 
-0035 708a0f05 jam 0x05 ,core_rf_ldo_cfg3 
-0036 708a8390 jam 0x90 ,core_syn_pfd_lkd_cfg 
-0037 2020125d branch initialize_radio_cont + 8 
+002b 708a8be6 jam 0xe6 ,core_syn_aac_cfg1 
+002c 2040126a call initialize_syn_afc_cfg1 
+002d 20401271 call initialize_rf_ldo_cfg1 
+002e 20401277 call initialize_rc_cal 
+002f 708a6d09 jam 0x09 ,core_rx_bq_cfg0 
+0030 708a0305 jam 5 ,core_clkpll_cfg0 
+0031 708a7a94 jam 0x94 ,core_rx_iqadc_cfg 
+0032 708a0e0b jam 0x0b ,core_rf_ldo_cfg2 
+0033 708a0f05 jam 0x05 ,core_rf_ldo_cfg3 
+0034 708a8390 jam 0x90 ,core_syn_pfd_lkd_cfg 
+0035 2020125d branch initialize_radio_cont + 8 
 
 p_init_param:
-0038 70008000 jam 0 ,mem_lmo_tid2 
-0039 202013b7 branch init_param_next + 1 
+0036 70008000 jam 0 ,mem_lmo_tid2 
+0037 202013b7 branch init_param_next + 1 
 
 p_mouse_setgpio_hibernate:
-003a 204042e9 call mouse_set_sdio_high 
-003b 20407fdc call clear_wake 
-003c 20404015 call mouse_before_hibernate_wheel_gpio_set 
+0038 204042e9 call mouse_set_sdio_high 
+0039 20407fdc call clear_wake 
+003a 20404015 call mouse_before_hibernate_wheel_gpio_set 
+003b 6848c910 fetcht 1 ,mem_matrix_public_gpio 
+003c 20406069 call gpio_out_active 
 003d 6848c910 fetcht 1 ,mem_matrix_public_gpio 
-003e 20406069 call gpio_out_active 
-003f 6848c910 fetcht 1 ,mem_matrix_public_gpio 
-0040 20406042 call gpio_clr_wake 
-0041 6fe0c920 fetch 1 ,mem_mouse_sensor_sdio_gpio 
-0042 d840003f arg gpcfg_output_high ,temp 
-0043 20406093 call gpio_config_function_int 
-0044 20203e36 branch mouse_setgpio_hibernate + 3 
+003e 20406042 call gpio_clr_wake 
+003f 6fe0c920 fetch 1 ,mem_mouse_sensor_sdio_gpio 
+0040 d840003f arg gpcfg_output_high ,temp 
+0041 20406093 call gpio_config_function_int 
+0042 20203e36 branch mouse_setgpio_hibernate + 3 
 
 p_mouse_lpm_before_common:
-0045 6848c913 fetcht 1 ,mem_whee_a_data_gpio 
+0043 6848c913 fetcht 1 ,mem_whee_a_data_gpio 
+0044 20406050 call gpio_config_input 
+0045 6848c914 fetcht 1 ,mem_whee_b_data_gpio 
 0046 20406050 call gpio_config_input 
-0047 6848c914 fetcht 1 ,mem_whee_b_data_gpio 
-0048 20406050 call gpio_config_input 
-0049 20403f88 call mouse_wheel_check 
-004a 6fe0c91f fetch 1 ,mem_mouse_sensor_sclk_gpio 
-004b d840003f arg gpcfg_output_high ,temp 
-004c 20406093 call gpio_config_function_int 
-004d 20203e44 branch mouse_lpm_before_common_next 
+0047 20403f88 call mouse_wheel_check 
+0048 6fe0c91f fetch 1 ,mem_mouse_sensor_sclk_gpio 
+0049 d840003f arg gpcfg_output_high ,temp 
+004a 20406093 call gpio_config_function_int 
+004b 20203e44 branch mouse_lpm_before_common_next 
 
 p_mouse_priority_bb_event:
-004e 1a627e00 copy regc ,pdata 
-004f c01e0062 beq bt_evt_24g_attempt_success ,p_mouse_24g_attempt_success 
-0050 c002005b beq bt_evt_reconn_failed ,p_mouse_bb_event_reconn_failed 
-0051 c009805b beq bt_evt_reconn_page_timeout ,p_mouse_bb_event_reconn_failed 
-0052 c0190054 beq bt_evt_le_start_enc ,p_mouse_le_ll_start_encryt 
-0053 20204336 branch mouse_priority_bb_event + 2 
+004c 1a627e00 copy regc ,pdata 
+004d c01e0060 beq bt_evt_24g_attempt_success ,p_mouse_24g_attempt_success 
+004e c0020059 beq bt_evt_reconn_failed ,p_mouse_bb_event_reconn_failed 
+004f c0098059 beq bt_evt_reconn_page_timeout ,p_mouse_bb_event_reconn_failed 
+0050 c0190052 beq bt_evt_le_start_enc ,p_mouse_le_ll_start_encryt 
+0051 20204336 branch mouse_priority_bb_event + 2 
 
 p_mouse_le_ll_start_encryt:
-0054 6fe0cac7 fetch 1 ,mem_mouse_le_reconnect_flag 
-0055 c0008058 beq 1 ,p_mouse_le_ll_reconn_start_encryt 
-0056 704b7614 jam 20 ,mem_le_start_encrypt_timer 
-0057 20204373 branch mouse_le_ll_enable_start_enc_flag 
+0052 6fe0cac7 fetch 1 ,mem_mouse_le_reconnect_flag 
+0053 c0008056 beq 1 ,p_mouse_le_ll_reconn_start_encryt 
+0054 704b7614 jam 20 ,mem_le_start_encrypt_timer 
+0055 20204373 branch mouse_le_ll_enable_start_enc_flag 
 
 p_mouse_le_ll_reconn_start_encryt:
-0058 2040436c call mouse_updata_le_param 
-0059 704b7605 jam 5 ,mem_le_start_encrypt_timer 
-005a 20204373 branch mouse_le_ll_enable_start_enc_flag 
+0056 2040436c call mouse_updata_le_param 
+0057 704b7605 jam 5 ,mem_le_start_encrypt_timer 
+0058 20204373 branch mouse_le_ll_enable_start_enc_flag 
 
 p_mouse_bb_event_reconn_failed:
-005b 6fe0cac1 fetch 1 ,mem_mouse_bluetooth_fast_conn_flag 
-005c c07fc2f8 beq 0xff ,mouse_buletooth_fast_conn_end 
-005d 6fe1478c fetch 2 ,mem_ui_state_map 
-005e c3860000 rtnbit1 ui_state_btn_down 
-005f c3830000 rtnbit1 ui_state_bt_discovery 
-0060 c3858000 rtnbit1 ui_state_ble_adv 
-0061 20203e20 branch mouse_app_enter_hibernate 
+0059 6fe0cac1 fetch 1 ,mem_mouse_bluetooth_fast_conn_flag 
+005a c07fc2f8 beq 0xff ,mouse_buletooth_fast_conn_end 
+005b 6fe1478c fetch 2 ,mem_ui_state_map 
+005c c3860000 rtnbit1 ui_state_btn_down 
+005d c3830000 rtnbit1 ui_state_bt_discovery 
+005e c3858000 rtnbit1 ui_state_ble_adv 
+005f 20203e20 branch mouse_app_enter_hibernate 
 
 p_mouse_24g_attempt_success:
-0062 6fe2483c fetch 4 ,mem_24g_addr 
-0063 67e24891 store 4 ,mem_24g_receiver_addr 
-0064 67e24993 store 4 ,mem_mouse_24g_addr 
-0065 204048c6 call mouse_device_poweron_timer_init 
-0066 2020484e branch mouse_24g_attempt_success 
+0060 6fe2483c fetch 4 ,mem_24g_addr 
+0061 67e24891 store 4 ,mem_24g_receiver_addr 
+0062 67e24993 store 4 ,mem_mouse_24g_addr 
+0063 204048c6 call mouse_device_poweron_timer_init 
+0064 2020484e branch mouse_24g_attempt_success 
 
 p_mouse_seting_dpi:
-0067 2040408f call mouse_setting_dpi_4_level 
-0068 2040006a call p_mouse_dpi_led_blink_delay 
-0069 20204098 branch mouse_seting_sensor_type 
+0065 2040408f call mouse_setting_dpi_4_level 
+0066 20400068 call p_mouse_dpi_led_blink_delay 
+0067 20204098 branch mouse_seting_sensor_type 
 
 p_mouse_dpi_led_blink_delay:
-006a 6fe0c923 fetch 1 ,mem_dpi_led_gpio 
-006b c17f8000 rtneq gpio_disable 
-006c 6fe14ac2 fetch 2 ,mem_mouse_discovery_timer 
+0068 6fe0c923 fetch 1 ,mem_dpi_led_gpio 
+0069 c17f8000 rtneq gpio_disable 
+006a 6fe14ac2 fetch 2 ,mem_mouse_discovery_timer 
+006b 247a0000 nrtn blank 
+006c 6fe14883 fetch 2 ,mem_24g_pair_timeout 
 006d 247a0000 nrtn blank 
-006e 6fe14883 fetch 2 ,mem_24g_pair_timeout 
+006e 6fe14887 fetch 2 ,mem_24g_reconn_timeout 
 006f 247a0000 nrtn blank 
-0070 6fe14887 fetch 2 ,mem_24g_reconn_timeout 
+0070 6fe0cba7 fetch 1 ,mem_mouse_device_poweron_timer_count 
 0071 247a0000 nrtn blank 
-0072 6fe0cba7 fetch 1 ,mem_mouse_device_poweron_timer_count 
-0073 247a0000 nrtn blank 
-0074 6fe0cbc1 fetch 1 ,mem_mouse_dpi_led_delay_count_init 
-0075 203a0086 branch p_mouse_dpi_led_blink_init ,blank 
-0076 67e0cba8 store 1 ,mem_mouse_dpi_led_delay_count 
-0077 20600000 rtn 
+0072 6fe0cbc1 fetch 1 ,mem_mouse_dpi_led_delay_count_init 
+0073 203a0084 branch p_mouse_dpi_led_blink_init ,blank 
+0074 67e0cba8 store 1 ,mem_mouse_dpi_led_delay_count 
+0075 20600000 rtn 
 
 p_mouse_bb_event_timer:
-0078 20403e9b call mouse_adc_read 
-0079 20404956 call mouse_low_voltage_led_timer 
-007a 2040232b call g24_pair_timeout_timer 
-007b 20402556 call g24_reconn_timeout_timer 
-007c 204047cd call mouse_24g_long_sleep_param_update_timer 
-007d 204048be call mouse_device_poweron_timer 
-007e 20400083 call p_mouse_dpi_led_blink_delay_timer 
-007f 2040009b call p_mouse_dpi_key_check_long_press 
-0080 204044cc call mouse_bt_discovery_check 
-0081 204000a6 call p_mouse_commbination_key_process 
-0082 202044c0 branch mouse_bb_event_timer + 11 
+0076 20403e9b call mouse_adc_read 
+0077 20404956 call mouse_low_voltage_led_timer 
+0078 2040232b call g24_pair_timeout_timer 
+0079 20402556 call g24_reconn_timeout_timer 
+007a 204047cd call mouse_24g_long_sleep_param_update_timer 
+007b 204048be call mouse_device_poweron_timer 
+007c 20400081 call p_mouse_dpi_led_blink_delay_timer 
+007d 20400099 call p_mouse_dpi_key_check_long_press 
+007e 204044cc call mouse_bt_discovery_check 
+007f 204000a4 call p_mouse_commbination_key_process 
+0080 202044c0 branch mouse_bb_event_timer + 11 
 
 p_mouse_dpi_led_blink_delay_timer:
-0083 da604ba8 arg mem_mouse_dpi_led_delay_count ,regc 
-0084 da400086 arg p_mouse_dpi_led_blink_init ,regb 
-0085 2020318a branch timer_single_step 
+0081 da604ba8 arg mem_mouse_dpi_led_delay_count ,regc 
+0082 da400084 arg p_mouse_dpi_led_blink_init ,regb 
+0083 2020318a branch timer_single_step 
 
 p_mouse_dpi_led_blink_init:
-0086 6fe0c927 fetch 1 ,mem_config_sensor_type 
-0087 c001c8f2 beq p3212 ,mouse_dpi_led_blink_init 
-0088 c005c8f2 beq ka8g2 ,mouse_dpi_led_blink_init 
-0089 6fe0c923 fetch 1 ,mem_dpi_led_gpio 
-008a 67e0c92f store 1 ,mem_mouse_struct_led_gpio 
-008b 6fe14bc2 fetch 2 ,mem_mouse_dpi_led_blink_time 
-008c 67e14930 store 2 ,mem_mouse_on_time 
-008d 67e14932 store 2 ,mem_mouse_off_time 
-008e da200000 arg 0 ,rega 
-008f 6848c992 fetcht 1 ,mem_mouse_dpi 
-0090 18408402 increase 2 ,temp 
-0091 18467c03 sub temp ,3 ,null 
-0092 20410095 call p_mouse_dpi_led_blink_init_level_4 ,positive 
-0093 24410099 ncall p_mouse_dpi_led_blink_count_clean ,positive 
-0094 202048ff branch mouse_dpi_led_blink_init_end 
+0084 6fe0c927 fetch 1 ,mem_config_sensor_type 
+0085 c001c8f2 beq p3212 ,mouse_dpi_led_blink_init 
+0086 c005c8f2 beq ka8g2 ,mouse_dpi_led_blink_init 
+0087 6fe0c923 fetch 1 ,mem_dpi_led_gpio 
+0088 67e0c92f store 1 ,mem_mouse_struct_led_gpio 
+0089 6fe14bc2 fetch 2 ,mem_mouse_dpi_led_blink_time 
+008a 67e14930 store 2 ,mem_mouse_on_time 
+008b 67e14932 store 2 ,mem_mouse_off_time 
+008c da200000 arg 0 ,rega 
+008d 6848c992 fetcht 1 ,mem_mouse_dpi 
+008e 18408402 increase 2 ,temp 
+008f 18467c03 sub temp ,3 ,null 
+0090 20410093 call p_mouse_dpi_led_blink_init_level_4 ,positive 
+0091 24410097 ncall p_mouse_dpi_led_blink_count_clean ,positive 
+0092 202048ff branch mouse_dpi_led_blink_init_end 
 
 p_mouse_dpi_led_blink_init_level_4:
-0095 6fe44bab fetch mouse_flag_len ,mem_mouse_flag 
-0096 c40e0000 rtnbit0 mouse_enable_dpi_level_4 
-0097 18408401 increase 1 ,temp 
-0098 20600000 rtn 
+0093 6fe44bab fetch mouse_flag_len ,mem_mouse_flag 
+0094 c40e0000 rtnbit0 mouse_enable_dpi_level_4 
+0095 18408401 increase 1 ,temp 
+0096 20600000 rtn 
 
 p_mouse_dpi_led_blink_count_clean:
-0099 184085fd increase -3 ,temp 
-009a 20600000 rtn 
+0097 184085fd increase -3 ,temp 
+0098 20600000 rtn 
 
 p_mouse_dpi_key_check_long_press:
-009b 6fe44bab fetch mouse_flag_len ,mem_mouse_flag 
-009c c2944080 bbit1 mouse_enable_select_device_by_dpi_button ,mouse_select_device_by_dpi_button 
-009d c29b009f bbit1 mouse_enable_dpi_key_long_press_disconvery ,p_mouse_discovery_by_dpi_button 
-009e 20600000 rtn 
+0099 6fe44bab fetch mouse_flag_len ,mem_mouse_flag 
+009a c2944080 bbit1 mouse_enable_select_device_by_dpi_button ,mouse_select_device_by_dpi_button 
+009b c29b009d bbit1 mouse_enable_dpi_key_long_press_disconvery ,p_mouse_discovery_by_dpi_button 
+009c 20600000 rtn 
 
 p_mouse_discovery_by_dpi_button:
-009f 6fe0c9dd fetch 1 ,mem_mouse_dpi_button_state 
-00a0 c1808000 rtnne dpi_button_state_down 
-00a1 da604b9b arg mem_bt_discovery_count ,regc 
-00a2 da4000a4 arg p_mouse_long_dpi_button_bt_discovery ,regb 
-00a3 2020318a branch timer_single_step 
+009d 6fe0c9dd fetch 1 ,mem_mouse_dpi_button_state 
+009e c1808000 rtnne dpi_button_state_down 
+009f da604b9b arg mem_bt_discovery_count ,regc 
+00a0 da4000a2 arg p_mouse_long_dpi_button_bt_discovery ,regb 
+00a1 2020318a branch timer_single_step 
 
 p_mouse_long_dpi_button_bt_discovery:
-00a4 7049de01 jam 1 ,mem_mouse_dpi_long_press_flag 
-00a5 202000b8 branch p_mouse_long_button_bt_discovery 
+00a2 7049de01 jam 1 ,mem_mouse_dpi_long_press_flag 
+00a3 202000b6 branch p_mouse_long_button_bt_discovery 
 
 p_mouse_commbination_key_process:
-00a6 6fe44bab fetch mouse_flag_len ,mem_mouse_flag 
-00a7 c41a8000 rtnbit0 mouse_enable_commbination_key_by_bt_discovery 
-00a8 6848cbca fetcht 1 ,mem_mouse_commbination_key_bt 
-00a9 6048cb9d storet 1 ,mem_mouse_commbination_key 
-00aa 20404115 call mouse_check_key_gpio 
-00ab 1fe17e07 and pdata ,0x07 ,pdata 
-00ac 6848cb9d fetcht 1 ,mem_mouse_commbination_key 
-00ad 98467c00 isub temp ,null 
-00ae 202280b0 branch p_mouse_commbination_key_down ,zero 
-00af 202044eb branch mouse_commbination_key_up 
+00a4 6fe44bab fetch mouse_flag_len ,mem_mouse_flag 
+00a5 c41a8000 rtnbit0 mouse_enable_commbination_key_by_bt_discovery 
+00a6 6848cbca fetcht 1 ,mem_mouse_commbination_key_bt 
+00a7 6048cb9d storet 1 ,mem_mouse_commbination_key 
+00a8 20404115 call mouse_check_key_gpio 
+00a9 1fe17e07 and pdata ,0x07 ,pdata 
+00aa 6848cb9d fetcht 1 ,mem_mouse_commbination_key 
+00ab 98467c00 isub temp ,null 
+00ac 202280ae branch p_mouse_commbination_key_down ,zero 
+00ad 202044eb branch mouse_commbination_key_up 
 
 p_mouse_commbination_key_down:
-00b0 204000b2 call p_mouse_combination_ui_timer 
-00b1 202044f2 branch mouse_commbination_key_down + 1 
+00ae 204000b0 call p_mouse_combination_ui_timer 
+00af 202044f2 branch mouse_commbination_key_down + 1 
 
 p_mouse_combination_ui_timer:
-00b2 da604ba0 arg mem_combination_ui_button_count ,regc 
-00b3 da4000b8 arg p_mouse_long_button_bt_discovery ,regb 
-00b4 2040318a call timer_single_step 
-00b5 6fe0cba0 fetch 1 ,mem_combination_ui_button_count 
-00b6 c000c6e2 beq 1 ,mouse_bt_discovery_button_down_enable 
-00b7 20600000 rtn 
+00b0 da604ba0 arg mem_combination_ui_button_count ,regc 
+00b1 da4000b6 arg p_mouse_long_button_bt_discovery ,regb 
+00b2 2040318a call timer_single_step 
+00b3 6fe0cba0 fetch 1 ,mem_combination_ui_button_count 
+00b4 c000c6e2 beq 1 ,mouse_bt_discovery_button_down_enable 
+00b5 20600000 rtn 
 
 p_mouse_long_button_bt_discovery:
-00b8 70493801 jam mode_bt_device1 ,mem_device_flag 
-00b9 704b7700 jam 0 ,mem_mouse_direct_timer 
-00ba 2040423c call mouse_sensor_powerdown 
-00bb 204078f4 call check_51cmd_stop_adv 
-00bc 7041ca00 jam 0 ,mem_link_key_exists 
-00bd 20404316 call mouse_stop_bluetooth_mode 
-00be 204045ee call mouse_store_device_info_delay 
-00bf 202044d4 branch mouse_long_button_bt_discovery 
+00b6 70493801 jam mode_bt_device1 ,mem_device_flag 
+00b7 704b7700 jam 0 ,mem_mouse_direct_timer 
+00b8 2040423c call mouse_sensor_powerdown 
+00b9 204078f4 call check_51cmd_stop_adv 
+00ba 7041ca00 jam 0 ,mem_link_key_exists 
+00bb 20404316 call mouse_stop_bluetooth_mode 
+00bc 204045ee call mouse_store_device_info_delay 
+00bd 202044d4 branch mouse_long_button_bt_discovery 
+
+p_hid_rx_process:
+00be 6fe10315 fetch 2 ,mem_l2cap_payload_ptr 
+00bf 1fe20c00 copy pdata ,contr 
+00c0 efe08006 ifetch 1 ,contr 
+00c1 67e0c5f5 store 1 ,mem_l2cap_rcv_hidtype 
+00c2 1fe1040f and pdata ,0x0f ,temp 
+00c3 1ff1fe00 rshift4 pdata ,pdata 
+00c4 c00480c6 beq hid_type_set_idle ,p_hid_rx_process_handshake 
+00c5 20204d92 branch hid_rx_process + 6 
+
+p_hid_rx_process_handshake:
+00c6 da200001 arg 1 ,rega 
+00c7 20404dc0 call hid_malloc_tx_buff 
+00c8 6fe144dc fetch 2 ,mem_hid_ctrl_remote_cid 
+00c9 e7e10005 istore 2 ,contw 
+00ca 58000000 setarg 0 
+00cb e7e08005 istore 1 ,contw 
+00cc 70095001 jam 1 ,mem_ui_data_txbuff_length 
+00cd 6fe0c4e2 fetch 1 ,mem_hid_control_state 
+00ce 79207e06 set1 l2cap_channel_hid_handshake_done ,pdata 
+00cf 67e0c4e2 store 1 ,mem_hid_control_state 
+00d0 70095b12 jam bt_evt_hid_handshake ,mem_fifo_temp 
+00d1 20207871 branch ui_ipc_send_event 
 
 p_le_slave_match:
-00c0 6fe0c3dd fetch 1 ,mem_le_md_count 
-00c1 1fe0fe01 pincrease 1 
-00c2 67e0c3dd store 1 ,mem_le_md_count 
-00c3 c006165a beq le_md_max_count ,le_slave_cont 
-00c4 2040191b call le_acknowledge 
-00c5 2040196a call le_prepare_tx 
-00c6 6fe082bd fetch 1 ,mem_le_tx_phy 
-00c7 2040168b call le_enable_phy_by_pdata 
-00c8 20401838 call le_transmit 
-00c9 20201655 branch le_slave_match + 10 
+00d2 6fe0c3dd fetch 1 ,mem_le_md_count 
+00d3 1fe0fe01 pincrease 1 
+00d4 67e0c3dd store 1 ,mem_le_md_count 
+00d5 c006165a beq le_md_max_count ,le_slave_cont 
+00d6 2040191b call le_acknowledge 
+00d7 2040196a call le_prepare_tx 
+00d8 6fe082bd fetch 1 ,mem_le_tx_phy 
+00d9 2040168b call le_enable_phy_by_pdata 
+00da 20401838 call le_transmit 
+00db 20201655 branch le_slave_match + 10 
 
 p_le_parse_l2cap:
-00ca efe10006 ifetch 2 ,contr 
-00cb c00200cd beq le_l2cap_cid_att ,p_le_parse_att 
-00cc 202019e4 branch le_parse_l2cap2 + 3 
+00dc efe10006 ifetch 2 ,contr 
+00dd c00200df beq le_l2cap_cid_att ,p_le_parse_att 
+00de 202019e4 branch le_parse_l2cap2 + 3 
 
 p_le_parse_att:
-00cd efe18006 ifetch 3 ,contr 
-00ce 67e1c436 store 3 ,mem_le_att_opcode 
-00cf c00500d1 beq attop_read_request ,p_le_parse_att_read_request 
-00d0 20201cd3 branch le_parse_att + 2 
+00df efe18006 ifetch 3 ,contr 
+00e0 67e1c436 store 3 ,mem_le_att_opcode 
+00e1 c00500e3 beq attop_read_request ,p_le_parse_att_read_request 
+00e2 20201cd3 branch le_parse_att + 2 
 
 p_le_parse_att_read_request:
-00d1 20401e8d call le_check_encrypt_state 
-00d2 68494437 fetcht 2 ,mem_le_att_handle 
-00d3 6fe0c3c0 fetch 1 ,mem_le_configuration 
-00d4 c28180d9 bbit1 bit_ble_read_auth ,p_le_send_att_read_response_check_auth 
+00e3 20401e8d call le_check_encrypt_state 
+00e4 68494437 fetcht 2 ,mem_le_att_handle 
+00e5 6fe0c3c0 fetch 1 ,mem_le_configuration 
+00e6 c28180eb bbit1 bit_ble_read_auth ,p_le_send_att_read_response_check_auth 
 
 p_le_send_att_read_response:
-00d5 6fe14437 fetch 2 ,mem_le_att_handle 
-00d6 c0181ec8 beq 0x30 ,le_send_att_error_response_notfound 
-00d7 68494437 fetcht 2 ,mem_le_att_handle 
-00d8 20201deb branch le_send_att_read_response 
+00e7 6fe14437 fetch 2 ,mem_le_att_handle 
+00e8 c0181ec8 beq 0x30 ,le_send_att_error_response_notfound 
+00e9 68494437 fetcht 2 ,mem_le_att_handle 
+00ea 20201deb branch le_send_att_read_response 
 
 p_le_send_att_read_response_check_auth:
-00d9 6fe143d1 fetch 2 ,mem_le_pairing_handle 
-00da 98467c00 isub temp ,null 
-00db 242280d5 nbranch p_le_send_att_read_response ,zero 
-00dc 243400d5 nbranch p_le_send_att_read_response ,user 
-00dd 20201e10 branch le_send_att_read_response_error_insufficient_auth 
+00eb 6fe143d1 fetch 2 ,mem_le_pairing_handle 
+00ec 98467c00 isub temp ,null 
+00ed 242280e7 nbranch p_le_send_att_read_response ,zero 
+00ee 243400e7 nbranch p_le_send_att_read_response ,user 
+00ef 20201e10 branch le_send_att_read_response_error_insufficient_auth 
               org 0x800
 
 start:
Index: program/patch.prog
===================================================================
--- /YC1308AC/branch/mouse_project/XZR/Standard_2.4G_First/program/patch.prog	(revision 512)
+++ /YC1308AC/branch/mouse_project/XZR/Standard_2.4G_First/program/patch.prog	(working copy)
@@ -10,6 +10,7 @@
 	beq patch1a_0,p_mouse_seting_dpi
 	beq patch1a_6,p_mouse_priority_bb_event
 	beq patch1b_1,p_mouse_bb_event_timer
+	beq patch1d_0,p_hid_rx_process
 	branch loop
 
 pf_patch_ext:
@@ -28,9 +29,6 @@
 p_app_init:
 p_mouse_init:
 	call enable_authrom
-	call p_lpm_write_ice_disable
-	arg 19,temp
-	call gpio_set_high_impedance
 	branch mouse_init
 	
 p_mouse_start_reconnect_device:
@@ -267,6 +265,31 @@
 	call mouse_stop_bluetooth_mode
 	call mouse_store_device_info_delay
 	branch mouse_long_button_bt_discovery
+
+p_hid_rx_process:
+	fetch 2,mem_l2cap_payload_ptr
+	copy pdata,contr
+	ifetch 1,contr
+	store 1,mem_l2cap_rcv_hidtype
+	and pdata,0x0f,temp
+	rshift4 pdata,pdata //hidtype
+	beq hid_type_set_idle,p_hid_rx_process_handshake
+	branch hid_rx_process+6
+
+p_hid_rx_process_handshake:
+	arg 1,rega//payload length
+	call hid_malloc_tx_buff
+	fetch 2,mem_hid_ctrl_remote_cid
+	istore 2,contw
+	setarg 0
+	istore 1,contw
+	jam 1,mem_ui_data_txbuff_length
+	fetch 1,mem_hid_control_state
+	set1 l2cap_channel_hid_handshake_done,pdata
+	store 1,mem_hid_control_state
+	jam BT_EVT_HID_HANDSHAKE,mem_fifo_temp
+	branch ui_ipc_send_event
+
 	
 /////////////////////////////////////////////////////////////////////////////////////////////////
 p_le_slave_match:
Index: sched/mouse.dat
===================================================================
--- /YC1308AC/branch/mouse_project/XZR/Standard_2.4G_First/sched/mouse.dat	(revision 512)
+++ /YC1308AC/branch/mouse_project/XZR/Standard_2.4G_First/sched/mouse.dat	(working copy)
@@ -210,7 +210,7 @@
 mem_lpm_mult_init:20
 
 mem_app_connection_options:06
-mem_lap:15 a4 c8 12 23 51
+mem_lap:36 a4 c8 12 23 51
 mem_local_name_length:
 'BT3.0 Mouse
 mem_sniff_param_interval:
