Index: output/otp.dat
===================================================================
--- /1121s/branch/mouse/YDN_Project/2m_otp/mouse_public_only_24g/output/otp.dat	(revision 3745)
+++ /1121s/branch/mouse/YDN_Project/2m_otp/mouse_public_only_24g/output/otp.dat	(working copy)
@@ -27,7 +27,7 @@
 1e
 aa
 55
-c0
+e0
 0f
 4e
 06
@@ -104,7 +104,7 @@
 fb
 fe
 73
-85
+83
 61
 64
 ff
@@ -112,27 +112,27 @@
 9a
 2d
 64
-fd
+e3
 f7
 dc
 45
-39
+03
 ca
 92
 6c
-6d
+6b
 f6
 83
 f9
-ca
+d0
 0d
 c4
 08
-8f
+85
 50
 81
 9c
-31
+2b
 6f
 30
 db
@@ -160,11 +160,11 @@
 9b
 d8
 9e
-8c
+8a
 79
 dd
 17
-7f
+71
 28
 3c
 ec
@@ -1576,7 +1576,7 @@
 8e
 38
 a4
-1b
+15
 74
 c0
 0e
@@ -2260,7 +2260,7 @@
 38
 07
 ee
-11
+1f
 03
 96
 11
@@ -2751,8 +2751,8 @@
 a1
 3c
 df
-38
-f5
+59
+7f
 11
 9e
 be
@@ -3372,610 +3372,610 @@
 21
 d2
 00
-f2
-bf
-c0
-ea
-d8
-87
-5e
-f0
-e8
-fb
-04
-65
-08
-13
-fc
-ff
-d0
-79
-84
-6b
-dd
-be
-2a
-04
-09
 f8
-89
-5d
-e0
-0a
-9f
-7f
-4f
-a9
-ba
-9f
-d0
-4d
-7c
-eb
+ef
+cb
+ac
+d7
+87
 3e
-5a
-ae
-74
-b4
-05
-24
-fb
-b9
-c2
-72
-9d
-3a
-fb
-30
-67
-aa
+f0
+ef
+e4
+af
 bd
-67
-d0
+40
+f2
+c3
+21
+66
+83
+e4
+35
+3a
+ee
+23
 13
-25
-cf
 08
-26
-d5
-5b
-b8
-28
-12
-87
-39
-13
-5b
-da
 b0
-5c
-22
+81
+cd
+b5
+0a
+ff
+7d
+8c
+e6
+7a
+0f
+58
+e3
+e7
+2c
+2d
+42
+1b
+a2
+6a
 1a
-4d
+8d
+45
+c8
+b5
+d8
+7d
+73
+b4
+90
+a2
+ad
+5d
+38
+05
+86
+6a
+0b
+19
+fb
+78
+2e
+a8
+bf
+5d
 27
-25
-8b
-d0
-9f
-01
-77
-1e
-80
-b3
-30
-d3
-d7
-68
-3c
-67
-69
-5f
-23
-b1
-e6
+a9
+21
+2c
+70
+50
+15
+57
+98
+f5
+73
+82
+14
+9a
+bd
+3e
+b4
+b6
+4e
+c3
+32
+31
+9e
+50
+3e
+18
+2f
+17
+2b
+19
+58
 fe
 f2
-dd
+a7
 79
-0b
-15
-c5
-3b
-63
-7f
-c8
+4c
+b5
+59
+f2
+66
+fe
+32
 2b
-81
-88
-3a
-28
-28
-39
-76
+be
+2a
+70
+ce
+4d
+5b
+f4
 91
 b7
 f1
-2d
-83
-fa
-e1
-c1
-d1
-60
-39
-98
-cc
-d2
-cf
+1a
+49
+c0
+a3
+9c
+f8
+18
+79
+cd
+7d
 af
-78
-44
-5b
-eb
-ed
-00
-91
-63
+49
+ab
+6e
+03
+f9
+85
+15
+5d
+d1
+c7
 f8
 83
 ac
-a5
-cb
+a6
+64
 24
-f4
-2a
-cd
-bd
-c9
-87
+94
+70
+80
+c5
+89
+d1
+79
+69
+fe
+4e
+0a
 d0
-61
-fa
-88
-51
-97
-91
-ef
-30
-b4
-77
-0e
-67
+33
+b6
+6d
+fc
+5f
+c8
+3d
 71
 28
-3e
-b7
-c3
+31
+8e
+3b
 f7
-16
-9c
+15
+ff
 ff
 29
-7d
-84
-34
-2a
+7e
+98
+7b
+8a
+53
 f4
-a3
 44
 75
-80
-7e
-01
-a4
-20
-cc
-8d
-8a
-ac
-71
-8e
-e1
-49
-e1
-88
-10
-04
-7b
-fc
+d8
 bf
-aa
-d6
-c1
-31
-88
-72
-07
-0e
-18
-5e
-b8
-03
-21
-13
-ec
-f1
-7d
-a9
-98
-1c
-67
-93
-60
-2d
-e4
 49
-c2
-cd
-b6
-2a
-08
-22
-bf
-f8
-fe
-89
+cc
+b2
+74
+6b
+59
+f9
+da
+76
+e1
+1f
+e9
+8c
+24
+51
 ce
-bc
-75
-2d
-fb
-12
-16
-50
-ef
-4b
+b3
+1f
+0c
 b0
-da
-a6
-33
-5c
-ab
-80
-41
-40
-4a
-e5
-07
 91
-3b
-3a
-fa
+36
+f5
+f0
+03
+74
+4f
+35
+11
+74
+66
+00
+0f
+ba
+28
+d6
 d3
-4d
-f1
-9d
+88
+ae
+ff
+2b
+f7
+43
+83
 92
-7c
+ca
+c9
+aa
+0c
+58
+dc
+d5
+fe
+8d
+4f
+f6
+77
+d9
+78
+96
+16
+50
+e1
 5a
-17
-35
-15
-9e
 b4
-76
-41
-cb
-75
-1d
-5f
-bb
-3f
-45
-e0
-ab
+9a
+c6
 85
-6d
-c7
-7d
+63
+0b
+7c
+38
+07
 8a
-bc
-4e
-b5
-f5
+42
+d8
+a6
+db
+fc
+a3
+75
+50
+39
+da
+dd
+bc
+c7
+19
+35
+2f
+9d
+d0
+49
+81
+35
+22
+5a
+ff
+25
+1a
+dd
+f8
+f2
+da
+ca
+3d
+ec
+0b
+5c
+42
+ec
+14
 ab
 73
-b4
-ad
+ee
+92
 84
-76
-88
-7d
+56
+93
+21
 89
-14
-1b
-d8
-28
-2d
+74
+41
+0b
+c8
+75
 5c
-0e
-19
-08
-95
-5e
+b6
+b6
+f0
+84
+c2
 7a
-be
-77
+b9
+f7
+72
+c7
+e5
+c6
+7c
+f3
+eb
+6f
+4f
+32
+83
+e8
+fa
+fc
+06
+70
+f3
+7a
+82
+36
 7d
+53
+8e
+c3
+96
+b3
+a5
+be
+c5
+3e
+0a
+c6
+72
+a4
+67
+f1
+c1
+ae
+3c
+84
+8a
+65
+0d
+40
+b5
+59
 27
-89
-46
+99
+98
+1c
+c0
 fa
+3e
+44
 f3
-cb
-2c
-e4
-62
-ea
-bc
-66
-06
-26
-62
+93
+f3
+97
+b4
+73
+59
+95
 eb
-35
-42
 a7
-b2
-b3
-e5
-17
-23
-53
-fd
-67
-16
-71
-ca
-56
 7a
-14
-28
-25
-53
-54
-7c
-99
-8f
-2a
-cd
-df
-b0
-66
-87
-30
-b1
-23
-52
-86
-3a
-0f
-52
-27
-6e
 77
-92
-a7
-fd
-da
+5f
+c4
+c9
 2b
-38
-d7
-d9
-be
-82
-59
-f5
-04
-76
-e3
-40
-65
+e2
+08
+e2
+7f
+a3
+e1
+a8
+31
+d5
 ca
-92
-35
-d4
-b4
-d4
+ba
 2c
-b2
-e8
-26
+d2
+de
+1d
 30
 dd
 a9
 c8
-1e
-7c
-b7
-4e
-6c
-57
-36
-5e
-a7
-94
-59
-24
-8e
-19
-10
-d5
-95
-c8
-69
-80
-76
-e6
-2e
-4d
-1d
-73
-9f
-67
-c5
-74
 1f
-8e
-69
-cc
-1c
-70
-f9
-69
-d5
-98
-e5
-38
-19
+7b
+e0
+cb
+8d
+71
+e1
+17
 ff
+e0
+72
+1a
+f6
+59
+13
+7f
+d2
+6b
+40
+fd
+39
+46
+be
+ec
+85
+75
+48
+6b
+c5
+14
+21
+23
+31
+d8
+37
+37
+81
+29
+83
+8a
+a2
+9b
+07
+af
 03
 b7
+4a
 10
-5d
-c1
-38
-b4
-46
-39
-6c
-71
-0f
-5b
-91
-59
-55
+b9
+18
+e2
+c3
+76
+cc
+d1
+bc
+ba
+d4
+8e
+12
 70
-72
-9c
-82
+12
+95
+b7
 7b
 45
-51
-ca
-ab
-53
-d9
-c6
-a9
-26
-27
-f4
+5f
+91
+e4
+f3
+13
+80
+ad
+3c
+29
+98
 fe
 e7
 5f
-c4
-25
-22
-90
-41
+11
+c0
+1d
+48
+1e
 9e
-d5
-e1
-2c
+b5
+e6
+83
 ea
 5b
-10
-21
-d4
-b7
-e8
-b4
-c8
-e1
-73
-ab
-1a
-d6
-aa
-41
-64
-c8
-1c
-af
-45
-af
-58
-8c
-5c
-af
-9b
-b9
-db
+4b
 ae
-4e
-0a
-fb
+9b
+77
+76
+9e
+9c
+92
+52
+cb
+05
+7f
+19
+c3
+30
+bb
+3f
+f0
+7a
+0d
+24
+04
+14
+a7
+5e
+34
 94
-b0
+6e
+df
+e0
+13
+9b
+b5
 a1
-8d
-07
-1a
+dd
+6c
+e3
+75
+5b
+51
+24
+e2
 a0
-44
-f8
-99
-aa
-27
-0a
-69
+ae
+31
 e9
-9f
-09
-91
-1e
+d7
+63
+d4
 81
-0d
+86
+a5
 3b
-64
-e1
-b4
-ee
-73
-b9
-bf
-6b
-0f
-b1
-a7
-10
-a8
-29
-33
-10
-a1
+66
+16
+12
+54
+34
+01
+db
+94
+d4
+fe
+65
+55
+04
+91
+35
+3b
+5a
 71
-6f
-75
-ca
-2a
-3c
-cf
+0d
+f5
+c2
+62
 54
-a6
-d0
+5e
+f4
+a1
+78
 6a
-c7
-0e
-49
-ea
-1f
-90
-a8
-d0
-a5
+c5
+f9
+ef
+50
+57
+28
+cc
+2f
+4f
 63
-67
-af
-fa
+05
+2f
+d7
 cb
 89
-76
+22
 50
 03
 18
-b9
+ed
 6f
 cb
 ee
@@ -3984,71 +3984,71 @@
 db
 3f
 be
-62
+6d
 20
 76
 79
 a0
 c6
 7f
-3f
-fa
+6b
+cd
 2f
 5c
-9e
-ad
+ca
+a9
 60
 1d
 a6
-e7
-ab
-88
-88
-15
-c1
-79
-ea
-64
-46
-5a
-03
-10
+df
+e3
+80
+4d
+bb
+8e
+d9
+2f
+c4
+fe
+3c
+28
+f5
 24
-a3
-e6
+c1
+66
 55
 12
 bf
 cf
-a7
+bb
 8e
 d2
-10
-c3
-e2
-2c
-d5
-8e
+44
+ff
+d8
+2d
+a8
+6d
 0f
+70
+61
+b9
+3b
+1d
 10
-35
-a7
-01
-7c
-39
-39
+d6
 71
-c5
-59
-64
-5b
-ad
-c2
-b1
+a5
+0d
+7f
+61
+ac
+bf
+53
 70
 67
 d5
-27
+3b
 a9
 1c
 b9
@@ -4056,11 +4056,43 @@
 a6
 bb
 f4
-de
-54
-9b
-fa
+d2
+5f
+42
 84
+8e
+a6
+72
+63
+fb
+c9
+ce
+db
+47
+01
+4d
+70
+58
+64
+6d
+65
+ad
+1b
+69
+35
+57
+81
+78
+5b
+87
+b9
+21
+11
+ef
+46
+34
+ff
+91
 aa
 55
 40
@@ -5290,6 +5322,6 @@
 55
 b3
 49
-6e
-e1
+2e
+17
 21
Index: output/program.lis
===================================================================
--- /1121s/branch/mouse/YDN_Project/2m_otp/mouse_public_only_24g/output/program.lis	(revision 3745)
+++ /1121s/branch/mouse/YDN_Project/2m_otp/mouse_public_only_24g/output/program.lis	(working copy)
@@ -18,22 +18,22 @@
 000f c03502a9 beq patch0d_2 ,p_mouse_default_init 
 0010 c03601d9 beq patch0d_4 ,p_mouse_param_init 
 0011 c0370325 beq patch0d_6 ,p_mouse_start_work 
-0012 c0398368 beq patch0e_3 ,p_mouse_setgpio_hibernate 
+0012 c039836e beq patch0e_3 ,p_mouse_setgpio_hibernate 
 0013 c03a0182 beq patch0e_4 ,p_mouse_lpm_before_common 
-0014 c03d03ad beq patch0f_2 ,p_mouse_motion 
-0015 c03d839a beq patch0f_3 ,p_mouse_dpi_process 
-0016 c03e03a8 beq patch0f_4 ,p_mouse_setting_dpi 
-0017 c03e83aa beq patch0f_5 ,p_mouse_setting_sensor_type 
-0018 c03f8357 beq patch0f_7 ,p_mouse_3io6key_check 
-0019 c040838b beq patch10_1 ,p_mouse_init_sensor 
+0014 c03d03b3 beq patch0f_2 ,p_mouse_motion 
+0015 c03d83a0 beq patch0f_3 ,p_mouse_dpi_process 
+0016 c03e03ae beq patch0f_4 ,p_mouse_setting_dpi 
+0017 c03e83b0 beq patch0f_5 ,p_mouse_setting_sensor_type 
+0018 c03f835d beq patch0f_7 ,p_mouse_3io6key_check 
+0019 c0408391 beq patch10_1 ,p_mouse_init_sensor 
 001a c04282ed beq patch10_5 ,p_mouse_priority_bb_event 
 001b c04382ec beq patch10_7 ,p_mouse_bb_event_timer 
 001c c04582b7 beq patch11_3 ,p_mouse_app_initflag_check 
 001d c04602be beq patch11_4 ,p_mouse_store_device_info 
 001e c04682c7 beq patch11_5 ,p_mouse_store_dpi_info_check 
 001f c0470341 beq patch11_6 ,p_mouse_idle 
-0020 c04983b8 beq patch12_3 ,p_mouse_drawing_optima 
-0021 c04b0374 beq patch12_6 ,p_mouse_24g_package_data 
+0020 c04983be beq patch12_3 ,p_mouse_drawing_optima 
+0021 c04b037a beq patch12_6 ,p_mouse_24g_package_data 
 0022 c05881ec beq patch16_1 ,p_app_init 
 0023 c06281b7 beq patch18_5 ,p_otp_read_data 
 0024 c06a8176 beq patch1a_5 ,p_gpio_set_wake_by_current_state 
@@ -484,7 +484,7 @@
 0181 202023e2 branch lpm_write_wait 
 
 p_mouse_lpm_before_common:
-0182 20400364 call p_clear_wake 
+0182 2040036a call p_clear_wake 
 0183 704b1d00 jam 0 ,mem_mouse_qdec_set_flag 
 0184 6848c654 fetcht 1 ,mem_matrix_public_gpio 
 0185 20406ef7 call gpio_out_active 
@@ -721,7 +721,7 @@
 022a 203a3616 branch g24_short_sleep ,blank 
 022b 204036b4 call g24_lpm_wait 
 022c 24740000 nrtn user 
-022d 20400364 call p_clear_wake 
+022d 2040036a call p_clear_wake 
 022e 6fe0c772 fetch 1 ,mem_mouse_24g_sleep_miss 
 022f 70477200 jam 0 ,mem_mouse_24g_sleep_miss 
 0230 1fe67c00 sub pdata ,0 ,null 
@@ -882,7 +882,7 @@
 p_mouse_wheel_init_set:
 02a6 2040017f call p_mouse_puchk_disable 
 02a7 204058df call mouse_matrix_public_gpio_reset 
-02a8 20206004 branch mouse_wheel_gpio_init 
+02a8 2020018e branch p_mouse_wheel_set_impedance 
 
 p_mouse_default_init:
 02a9 704b1e00 jam 0 ,mem_mouse_switch_flag 
@@ -1099,248 +1099,254 @@
 p_mouse_idle:
 0341 2040620e call mouse_low_voltage_led_no_enter_lpm 
 0342 204078aa call ui_check_paring_button 
-0343 20400346 call p_mouse_dpi_check 
-0344 704b1e01 jam 1 ,mem_mouse_switch_flag 
-0345 20205e61 branch mouse_idle + 4 
+0343 2040034c call p_mouse_dpi_check 
+0344 2040580e call mouse_dpi_another_gpio_check 
+0345 20405e66 call mouse_select_device_check 
+0346 704b1e01 jam 1 ,mem_mouse_switch_flag 
+0347 20405eb6 call mouse_check_select_device_by_switch 
+0348 20405ee7 call mouse_bt_button_check 
+0349 20406004 call mouse_wheel_gpio_init 
+034a 2040561c call mouse_wheel_check 
+034b 2020018e branch p_mouse_wheel_set_impedance 
 
 p_mouse_dpi_check:
-0346 6fe0c649 fetch 1 ,mem_dpi_button_gpio 
-0347 c17f8000 rtneq gpio_disable 
-0348 da200000 arg 0 ,rega 
-0349 70497705 jam mouse_dpi_key ,mem_mouse_key_temp 
-034a 6848c649 fetcht 1 ,mem_dpi_button_gpio 
-034b 2040034d call p_mouse_dpi_key_check 
-034c 202056c1 branch mouse_dpi_check_next 
+034c 6fe0c649 fetch 1 ,mem_dpi_button_gpio 
+034d c17f8000 rtneq gpio_disable 
+034e da200000 arg 0 ,rega 
+034f 70497705 jam mouse_dpi_key ,mem_mouse_key_temp 
+0350 6848c649 fetcht 1 ,mem_dpi_button_gpio 
+0351 20400353 call p_mouse_dpi_key_check 
+0352 202056c1 branch mouse_dpi_check_next 
 
 p_mouse_dpi_key_check:
-034d 6fe44713 fetch mouse_flag_len ,mem_mouse_flag 
-034e c295d6de bbit1 mouse_enable_dpi_key_connect_gnd ,mouse_dpi_key_connect_gnd 
-034f 6fe0c974 fetch 1 ,mem_mouse_dpikey_press_status 
-0350 1fe22600 copy pdata ,regc 
-0351 6fe0c654 fetch 1 ,mem_matrix_public_gpio 
-0352 c07f8354 beq gpio_disable ,p_mouse_3io6key_dpi_check 
-0353 202056ce branch mouse_dpi_key_check_next 
+0353 6fe44713 fetch mouse_flag_len ,mem_mouse_flag 
+0354 c295d6de bbit1 mouse_enable_dpi_key_connect_gnd ,mouse_dpi_key_connect_gnd 
+0355 6fe0c974 fetch 1 ,mem_mouse_dpikey_press_status 
+0356 1fe22600 copy pdata ,regc 
+0357 6fe0c654 fetch 1 ,mem_matrix_public_gpio 
+0358 c07f835a beq gpio_disable ,p_mouse_3io6key_dpi_check 
+0359 202056ce branch mouse_dpi_key_check_next 
 
 p_mouse_3io6key_dpi_check:
-0354 6fe0c649 fetch 1 ,mem_dpi_button_gpio 
-0355 20405946 call mouse_gpio_config_output_low 
-0356 6848c649 fetcht 1 ,mem_dpi_button_gpio 
+035a 6fe0c649 fetch 1 ,mem_dpi_button_gpio 
+035b 20405946 call mouse_gpio_config_output_low 
+035c 6848c649 fetcht 1 ,mem_dpi_button_gpio 
 
 p_mouse_3io6key_check:
-0357 1a627e00 copy regc ,pdata 
-0358 67e0c978 store 1 ,mem_mouse_key_status 
-0359 1fe3fe00 lshift pdata ,pdata 
-035a 1fe22400 copy pdata ,regb 
-035b 18422600 copy temp ,regc 
-035c 20406ef7 call gpio_out_active 
-035d 1a620400 copy regc ,temp 
-035e 204055b1 call mouse_gpio_config_input_pd 
-035f 1a620400 copy regc ,temp 
-0360 20406ee6 call gpio_get_bit 
-0361 7d20a400 nsetflag true ,0 ,regb 
-0362 2040593d call mouse_check_press 
-0363 20205929 branch mouse_check_key_connect_gnd_1 
+035d 1a627e00 copy regc ,pdata 
+035e 67e0c978 store 1 ,mem_mouse_key_status 
+035f 1fe3fe00 lshift pdata ,pdata 
+0360 1fe22400 copy pdata ,regb 
+0361 18422600 copy temp ,regc 
+0362 20406ef7 call gpio_out_active 
+0363 1a620400 copy regc ,temp 
+0364 204055b1 call mouse_gpio_config_input_pd 
+0365 1a620400 copy regc ,temp 
+0366 20406ee6 call gpio_get_bit 
+0367 7d20a400 nsetflag true ,0 ,regb 
+0368 2040593d call mouse_check_press 
+0369 20205929 branch mouse_check_key_connect_gnd_1 
 
 p_clear_wake:
-0364 58000000 setarg 0 
-0365 67e40016 store 8 ,mem_gpio_wakeup_cfg 
-0366 67e2001e store 4 ,mem_gpio_wakeup_cfg + 8 
-0367 20600000 rtn 
+036a 58000000 setarg 0 
+036b 67e40016 store 8 ,mem_gpio_wakeup_cfg 
+036c 67e2001e store 4 ,mem_gpio_wakeup_cfg + 8 
+036d 20600000 rtn 
 
 p_mouse_setgpio_hibernate:
-0368 20405a92 call mouse_set_sdio_high 
-0369 20400364 call p_clear_wake 
-036a 204056a9 call mouse_before_hibernate_wheel_gpio_set 
-036b 6fe0c64d fetch 1 ,mem_mouse_sensor_sdio_gpio 
-036c 20405943 call mouse_gpio_config_output_high 
-036d 6848c65a fetcht 1 ,mem_device_switch_gpio 
-036e 204055ab call mouse_gpio_set_pupd_by_input 
-036f d8400009 arg 9 ,temp 
-0370 204055b5 call mouse_gpio_config_input_pu 
-0371 2040611a call mouse_logo_led_off 
-0372 20400182 call p_mouse_lpm_before_common 
-0373 202054e2 branch mouse_setgpio_hibernate_next 
+036e 20405a92 call mouse_set_sdio_high 
+036f 2040036a call p_clear_wake 
+0370 204056a9 call mouse_before_hibernate_wheel_gpio_set 
+0371 6fe0c64d fetch 1 ,mem_mouse_sensor_sdio_gpio 
+0372 20405943 call mouse_gpio_config_output_high 
+0373 6848c65a fetcht 1 ,mem_device_switch_gpio 
+0374 204055ab call mouse_gpio_set_pupd_by_input 
+0375 d8400009 arg 9 ,temp 
+0376 204055b5 call mouse_gpio_config_input_pu 
+0377 2040611a call mouse_logo_led_off 
+0378 20400182 call p_mouse_lpm_before_common 
+0379 202054e2 branch mouse_setgpio_hibernate_next 
 
 p_mouse_24g_package_data:
-0374 c6930000 rtnmark0 mark_24g 
-0375 20405601 call mouse_motion 
-0376 24740000 nrtn user 
-0377 6fe0c77c fetch 1 ,mem_mouse_24g_long_sleep_flag 
-0378 70477c00 jam 0 ,mem_mouse_24g_long_sleep_flag 
-0379 245a0389 ncall p_mouse_24g_short_sleep_clear_wake ,blank 
-037a 6fe44713 fetch mouse_flag_len ,mem_mouse_flag 
-037b c30b037e bbit0 mouse_enable_keyboard ,p_mouse_24g_mouse_package_data 
-037c 6fe0c96c fetch 1 ,mem_customer_key 
-037d 243a60b6 nbranch mouse_24g_keyboard_package_data ,blank 
+037a c6930000 rtnmark0 mark_24g 
+037b 20405601 call mouse_motion 
+037c 24740000 nrtn user 
+037d 6fe0c77c fetch 1 ,mem_mouse_24g_long_sleep_flag 
+037e 70477c00 jam 0 ,mem_mouse_24g_long_sleep_flag 
+037f 245a038f ncall p_mouse_24g_short_sleep_clear_wake ,blank 
+0380 6fe44713 fetch mouse_flag_len ,mem_mouse_flag 
+0381 c30b0384 bbit0 mouse_enable_keyboard ,p_mouse_24g_mouse_package_data 
+0382 6fe0c96c fetch 1 ,mem_customer_key 
+0383 243a60b6 nbranch mouse_24g_keyboard_package_data ,blank 
 
 p_mouse_24g_mouse_package_data:
-037e 20400380 call p_mouse_data_xy_release 
-037f 202060a2 branch mouse_24g_mouse_package_data + 1 
+0384 20400386 call p_mouse_data_xy_release 
+0385 202060a2 branch mouse_24g_mouse_package_data + 1 
 
 p_mouse_data_xy_release:
-0380 6fe0c659 fetch 1 ,mem_sensor_motion_gpio 
-0381 c1ff8000 rtnne gpio_disable 
-0382 6fe0c77d fetch 1 ,mem_mouse_long_mult_flag 
-0383 207a0000 rtn blank 
-0384 1fe0ffff increase -1 ,pdata 
-0385 67e0c77d store 1 ,mem_mouse_long_mult_flag 
-0386 58000000 setarg 0 
-0387 67e24847 store 4 ,mem_mouse_x 
-0388 20205a73 branch mouse_init_sensor_reset 
+0386 6fe0c659 fetch 1 ,mem_sensor_motion_gpio 
+0387 c1ff8000 rtnne gpio_disable 
+0388 6fe0c77d fetch 1 ,mem_mouse_long_mult_flag 
+0389 207a0000 rtn blank 
+038a 1fe0ffff increase -1 ,pdata 
+038b 67e0c77d store 1 ,mem_mouse_long_mult_flag 
+038c 58000000 setarg 0 
+038d 67e24847 store 4 ,mem_mouse_x 
+038e 20205a73 branch mouse_init_sensor_reset 
 
 p_mouse_24g_short_sleep_clear_wake:
-0389 20400364 call p_clear_wake 
-038a 202001a8 branch p_lpm_write_gpio_wakeup 
+038f 2040036a call p_clear_wake 
+0390 202001a8 branch p_lpm_write_gpio_wakeup 
 
 p_mouse_init_sensor:
-038b 20405958 call mouse_read_sensor_id 
-038c c018595f beq p32xx_id1 ,mouse_init_p32xx_id2_judge 
-038d c018d9c6 beq p3065_id1 ,mouse_init_p3065 
-038e c02c0392 beq pka8g2_id1 ,p_mouse_ka8g2_id2_judge 
-038f 20405955 call mouse_twspi_reset 
-0390 20001af4 nop 6900 
-0391 2020038b branch p_mouse_init_sensor 
+0391 20405958 call mouse_read_sensor_id 
+0392 c018595f beq p32xx_id1 ,mouse_init_p32xx_id2_judge 
+0393 c018d9c6 beq p3065_id1 ,mouse_init_p3065 
+0394 c02c0398 beq pka8g2_id1 ,p_mouse_ka8g2_id2_judge 
+0395 20405955 call mouse_twspi_reset 
+0396 20001af4 nop 6900 
+0397 20200391 branch p_mouse_init_sensor 
 
 p_mouse_ka8g2_id2_judge:
-0392 204059e7 call mouse_sensor_poweron 
-0393 6fe0c85a fetch 1 ,mem_sensor_id2 
-0394 c02b8397 beq ka5857_id2 ,p_mouse_ka5857_init_param 
-0395 c02cd9d3 beq pka8g2_id2 ,mouse_ka8g2_init_param 
-0396 2020595f branch mouse_init_p32xx_id2_judge 
+0398 204059e7 call mouse_sensor_poweron 
+0399 6fe0c85a fetch 1 ,mem_sensor_id2 
+039a c02b839d beq ka5857_id2 ,p_mouse_ka5857_init_param 
+039b c02cd9d3 beq pka8g2_id2 ,mouse_ka8g2_init_param 
+039c 2020595f branch mouse_init_p32xx_id2_judge 
 
 p_mouse_ka5857_init_param:
-0397 7049570d jam ka5857 ,mem_config_sensor_type 
-0398 da604bff arg mem_sensor_ka5857_init ,regc 
-0399 20205995 branch mouse_sensor_wr_seq 
+039d 7049570d jam ka5857 ,mem_config_sensor_type 
+039e da604bff arg mem_sensor_ka5857_init ,regc 
+039f 20205995 branch mouse_sensor_wr_seq 
 
 p_mouse_dpi_process:
-039a 20405728 call mouse_dpi_ghost_check 
-039b 20740000 rtn user 
-039c 6fe0c957 fetch 1 ,mem_config_sensor_type 
-039d c006839f beq ka5857 ,p_mouse_dpi_process_5_level 
-039e 202056fa branch mouse_dpi_process + 3 
+03a0 20405728 call mouse_dpi_ghost_check 
+03a1 20740000 rtn user 
+03a2 6fe0c957 fetch 1 ,mem_config_sensor_type 
+03a3 c00683a5 beq ka5857 ,p_mouse_dpi_process_5_level 
+03a4 202056fa branch mouse_dpi_process + 3 
 
 p_mouse_dpi_process_5_level:
-039f 6fe0c690 fetch 1 ,mem_mouse_dpi 
-03a0 1fe0fe01 increase 1 ,pdata 
-03a1 1fe67c04 sub pdata ,4 ,null 
-03a2 24417dca ncall set_pdata_0 ,positive 
-03a3 20205701 branch mouse_dpi_level_store 
+03a5 6fe0c690 fetch 1 ,mem_mouse_dpi 
+03a6 1fe0fe01 increase 1 ,pdata 
+03a7 1fe67c04 sub pdata ,4 ,null 
+03a8 24417dca ncall set_pdata_0 ,positive 
+03a9 20205701 branch mouse_dpi_level_store 
 
 p_mouse_setting_dpi_4_level:
-03a4 6fe0c957 fetch 1 ,mem_config_sensor_type 
-03a5 c1018000 rtneq p3212 
-03a6 c1068000 rtneq ka5857 
-03a7 2020573e branch mouse_setting_dpi_4_level 
+03aa 6fe0c957 fetch 1 ,mem_config_sensor_type 
+03ab c1018000 rtneq p3212 
+03ac c1068000 rtneq ka5857 
+03ad 2020573e branch mouse_setting_dpi_4_level 
 
 p_mouse_setting_dpi:
-03a8 204003a4 call p_mouse_setting_dpi_4_level 
-03a9 2040613a call mouse_dpi_led_blink_delay 
+03ae 204003aa call p_mouse_setting_dpi_4_level 
+03af 2040613a call mouse_dpi_led_blink_delay 
 
 p_mouse_setting_sensor_type:
-03aa 6fe0c957 fetch 1 ,mem_config_sensor_type 
-03ab c006d785 beq ka5857 ,mouse_seting_3212_dpi 
-03ac 20205749 branch mouse_setting_sensor_type + 2 
+03b0 6fe0c957 fetch 1 ,mem_config_sensor_type 
+03b1 c006d785 beq ka5857 ,mouse_seting_3212_dpi 
+03b2 20205749 branch mouse_setting_sensor_type + 2 
 
 p_mouse_motion:
-03ad 78547c00 disable user 
-03ae 58000000 setarg 0 
-03af 67e34847 store 6 ,mem_mouse_x 
-03b0 204059f6 call mouse_check_sensor_data 
-03b1 58000089 setarg 0x0089 
-03b2 204069e4 call twspi_write 
-03b3 20405747 call mouse_setting_sensor_type 
-03b4 20405612 call mouse_zwheel 
-03b5 20405617 call mouse_t_zwheel 
-03b6 204003bb call p_mouse_key 
-03b7 2020560c branch mouse_motion + 11 
+03b3 78547c00 disable user 
+03b4 58000000 setarg 0 
+03b5 67e34847 store 6 ,mem_mouse_x 
+03b6 204059f6 call mouse_check_sensor_data 
+03b7 58000089 setarg 0x0089 
+03b8 204069e4 call twspi_write 
+03b9 20405747 call mouse_setting_sensor_type 
+03ba 20405612 call mouse_zwheel 
+03bb 20405617 call mouse_t_zwheel 
+03bc 204003c1 call p_mouse_key 
+03bd 2020560c branch mouse_motion + 11 
 
 p_mouse_drawing_optima:
-03b8 6fe0c957 fetch 1 ,mem_config_sensor_type 
-03b9 c1058000 rtneq ka8g2 
-03ba 20205f27 branch mouse_drawing_optima + 1 
+03be 6fe0c957 fetch 1 ,mem_config_sensor_type 
+03bf c1058000 rtneq ka8g2 
+03c0 20205f27 branch mouse_drawing_optima + 1 
 
 p_mouse_key:
-03bb 2040584c call mouse_check_firekey_gpio 
-03bc 6fe0c987 fetch 1 ,mem_fire_key_flag 
-03bd 243a5860 nbranch fire_key_press ,blank 
-03be 6fe0c982 fetch 1 ,mem_fire_key_status 
-03bf 243a585f nbranch fire_key_process ,blank 
-03c0 20405888 call mouse_check_key_gpio 
-03c1 204003c3 call p_mouse_ghost_key_check 
-03c2 202057ad branch mouse_key + 7 
+03c1 2040584c call mouse_check_firekey_gpio 
+03c2 6fe0c987 fetch 1 ,mem_fire_key_flag 
+03c3 243a5860 nbranch fire_key_press ,blank 
+03c4 6fe0c982 fetch 1 ,mem_fire_key_status 
+03c5 243a585f nbranch fire_key_process ,blank 
+03c6 20405888 call mouse_check_key_gpio 
+03c7 204003c9 call p_mouse_ghost_key_check 
+03c8 202057ad branch mouse_key + 7 
 
 p_mouse_ghost_key_check:
-03c3 70497900 jam 0 ,mem_mouse_matrix_key_cow_count 
-03c4 70497a00 jam 0 ,mem_mouse_matrix_key_row_count 
-03c5 70497b00 jam 0 ,mem_mouse_ghost_flag 
-03c6 1fe22400 copy pdata ,regb 
-03c7 6848c644 fetcht 1 ,mem_lbutton_gpio 
-03c8 6fe0c647 fetch 1 ,mem_bk_button_gpio 
-03c9 98467c00 isub temp ,null 
-03ca 202283d5 branch p_mouse_matrix_ghost_key_l_bk ,zero 
-03cb 6fe0c648 fetch 1 ,mem_fw_button_gpio 
-03cc 98467c00 isub temp ,null 
-03cd 202283db branch p_mouse_matrix_ghost_key_l_fw ,zero 
-03ce 6848c645 fetcht 1 ,mem_mbutton_gpio 
-03cf 6fe0c647 fetch 1 ,mem_bk_button_gpio 
-03d0 98467c00 isub temp ,null 
-03d1 202283e4 branch p_mouse_ghost_key_mbk_rfw ,zero 
+03c9 70497900 jam 0 ,mem_mouse_matrix_key_cow_count 
+03ca 70497a00 jam 0 ,mem_mouse_matrix_key_row_count 
+03cb 70497b00 jam 0 ,mem_mouse_ghost_flag 
+03cc 1fe22400 copy pdata ,regb 
+03cd 6848c644 fetcht 1 ,mem_lbutton_gpio 
+03ce 6fe0c647 fetch 1 ,mem_bk_button_gpio 
+03cf 98467c00 isub temp ,null 
+03d0 202283db branch p_mouse_matrix_ghost_key_l_bk ,zero 
+03d1 6fe0c648 fetch 1 ,mem_fw_button_gpio 
+03d2 98467c00 isub temp ,null 
+03d3 202283e1 branch p_mouse_matrix_ghost_key_l_fw ,zero 
+03d4 6848c645 fetcht 1 ,mem_mbutton_gpio 
+03d5 6fe0c647 fetch 1 ,mem_bk_button_gpio 
+03d6 98467c00 isub temp ,null 
+03d7 202283ea branch p_mouse_ghost_key_mbk_rfw ,zero 
 
 p_mouse_ghost_key_mfw_rbk:
-03d2 204057fb call mouse_ghost_key_check_m_fw 
+03d8 204057fb call mouse_ghost_key_check_m_fw 
 
 p_mouse_ghost_key_rbk:
-03d3 204003e9 call p_mouse_ghost_key_check_r_bk 
-03d4 202057e5 branch mouse_ghost_key_check_next 
+03d9 204003ef call p_mouse_ghost_key_check_r_bk 
+03da 202057e5 branch mouse_ghost_key_check_next 
 
 p_mouse_matrix_ghost_key_l_bk:
-03d5 6848c645 fetcht 1 ,mem_mbutton_gpio 
-03d6 6fe0c648 fetch 1 ,mem_fw_button_gpio 
-03d7 98467c00 isub temp ,null 
-03d8 2022d7d6 branch mouse_ghost_key_lbk_mfw ,zero 
+03db 6848c645 fetcht 1 ,mem_mbutton_gpio 
+03dc 6fe0c648 fetch 1 ,mem_fw_button_gpio 
+03dd 98467c00 isub temp ,null 
+03de 2022d7d6 branch mouse_ghost_key_lbk_mfw ,zero 
 
 p_mouse_ghost_key_lbk_rfw:
-03d9 204057ef call mouse_ghost_key_check_l_bk 
-03da 202003e5 branch p_mouse_ghost_key_rfw 
+03df 204057ef call mouse_ghost_key_check_l_bk 
+03e0 202003eb branch p_mouse_ghost_key_rfw 
 
 p_mouse_matrix_ghost_key_l_fw:
-03db 6848c645 fetcht 1 ,mem_mbutton_gpio 
-03dc 6fe0c647 fetch 1 ,mem_bk_button_gpio 
-03dd 98467c00 isub temp ,null 
-03de 202283e1 branch p_mouse_ghost_key_lfw_mbk ,zero 
+03e1 6848c645 fetcht 1 ,mem_mbutton_gpio 
+03e2 6fe0c647 fetch 1 ,mem_bk_button_gpio 
+03e3 98467c00 isub temp ,null 
+03e4 202283e7 branch p_mouse_ghost_key_lfw_mbk ,zero 
 
 p_mouse_ghost_key_lfw_rbk:
-03df 204003eb call p_mouse_ghost_key_check_l_fw 
-03e0 202003d3 branch p_mouse_ghost_key_rbk 
+03e5 204003f1 call p_mouse_ghost_key_check_l_fw 
+03e6 202003d9 branch p_mouse_ghost_key_rbk 
 
 p_mouse_ghost_key_lfw_mbk:
-03e1 204003eb call p_mouse_ghost_key_check_l_fw 
-03e2 204003e7 call p_mouse_ghost_key_check_m_bk 
-03e3 202057e5 branch mouse_ghost_key_check_next 
+03e7 204003f1 call p_mouse_ghost_key_check_l_fw 
+03e8 204003ed call p_mouse_ghost_key_check_m_bk 
+03e9 202057e5 branch mouse_ghost_key_check_next 
 
 p_mouse_ghost_key_mbk_rfw:
-03e4 204003e7 call p_mouse_ghost_key_check_m_bk 
+03ea 204003ed call p_mouse_ghost_key_check_m_bk 
 
 p_mouse_ghost_key_rfw:
-03e5 204003ed call p_mouse_ghost_key_check_r_fw 
-03e6 202057e5 branch mouse_ghost_key_check_next 
+03eb 204003f3 call p_mouse_ghost_key_check_r_fw 
+03ec 202057e5 branch mouse_ghost_key_check_next 
 
 p_mouse_ghost_key_check_m_bk:
-03e7 1a417e12 and regb ,mouse_m_bk_button ,pdata 
-03e8 202057f3 branch mouse_ghost_key_check_m_bk + 1 
+03ed 1a417e12 and regb ,mouse_m_bk_button ,pdata 
+03ee 202057f3 branch mouse_ghost_key_check_m_bk + 1 
 
 p_mouse_ghost_key_check_r_bk:
-03e9 1a417e0a and regb ,mouse_r_bk_button ,pdata 
-03ea 202057f6 branch mouse_ghost_key_check_r_bk + 1 
+03ef 1a417e0a and regb ,mouse_r_bk_button ,pdata 
+03f0 202057f6 branch mouse_ghost_key_check_r_bk + 1 
 
 p_mouse_ghost_key_check_l_fw:
-03eb 1a417e11 and regb ,mouse_l_fw_button ,pdata 
-03ec 202057f9 branch mouse_ghost_key_check_l_fw + 1 
+03f1 1a417e11 and regb ,mouse_l_fw_button ,pdata 
+03f2 202057f9 branch mouse_ghost_key_check_l_fw + 1 
 
 p_mouse_ghost_key_check_r_fw:
-03ed 1a417e12 and regb ,mouse_r_fw_button ,pdata 
-03ee 202057ff branch mouse_ghost_key_check_r_fw + 1 
+03f3 1a417e12 and regb ,mouse_r_fw_button ,pdata 
+03f4 202057ff branch mouse_ghost_key_check_r_fw + 1 
               org 0x2000
 
 start:
Index: program/patch.prog
===================================================================
--- /1121s/branch/mouse/YDN_Project/2m_otp/mouse_public_only_24g/program/patch.prog	(revision 3745)
+++ /1121s/branch/mouse/YDN_Project/2m_otp/mouse_public_only_24g/program/patch.prog	(working copy)
@@ -1048,7 +1048,7 @@
 p_mouse_wheel_init_set:
 	call p_mouse_puchk_disable
 	call mouse_matrix_public_gpio_reset
-	branch mouse_wheel_gpio_init
+	branch p_mouse_wheel_set_impedance
 
 p_mouse_default_init:
 	jam 0,mem_mouse_switch_flag
@@ -1276,8 +1276,15 @@
 	call mouse_low_voltage_led_no_enter_lpm
 	call ui_check_paring_button
 	call p_mouse_dpi_check
+	call mouse_dpi_another_gpio_check
+	call mouse_select_device_check
 	jam 1,mem_mouse_switch_flag
-	branch mouse_idle+4
+	call mouse_check_select_device_by_switch
+	call mouse_bt_button_check
+	call mouse_wheel_gpio_init
+	call mouse_wheel_check
+	branch p_mouse_wheel_set_impedance
+	
 
 p_mouse_dpi_check:
 	fetch 1,mem_dpi_button_gpio
