Index: format/app_mouse.format
===================================================================
--- /1121s/branch/mouse/ZXS_Project/1m/mouse_public_switch_221-v10_new_by4006/format/app_mouse.format	(revision 5443)
+++ /1121s/branch/mouse/ZXS_Project/1m/mouse_public_switch_221-v10_new_by4006/format/app_mouse.format	(working copy)
@@ -433,6 +433,11 @@
 //commbination_dpi
 1 mem_commbination_dpi_timer
 1 mem_mouse_commbination_key_dpi
+22 mem_sensor_YS8299_init
+0 mem_sensor_YS8299_dpi
+1 mem_YS8299_dpi_0
+1 mem_YS8299_dpi_1
+1 mem_YS8299_dpi_2
 )
 
 (
@@ -744,6 +749,7 @@
 0X0a KA8_HD
 0X0b KA8G2
 0X0c S201X
+0X0d YS8299
 
 
 //SENSOR REG
Index: output/memmap.format
===================================================================
--- /1121s/branch/mouse/ZXS_Project/1m/mouse_public_switch_221-v10_new_by4006/output/memmap.format	(revision 5443)
+++ /1121s/branch/mouse/ZXS_Project/1m/mouse_public_switch_221-v10_new_by4006/output/memmap.format	(working copy)
@@ -1972,90 +1972,95 @@
 0x4b1d mem_mouse_qdec_set_flag
 0x4b1e mem_commbination_dpi_timer
 0x4b1f mem_mouse_commbination_key_dpi
-0x4b20 mem_24g_txpayload_buf
-0x4b30 mem_release_data_from_receiver_enable
-0x4b31 mem_release_data_from_transmiter_enable
-0x4b32 mem_flippen_key0_gpio
-0x4b33 mem_flippen_key1_gpio
-0x4b34 mem_flippen_key2_gpio
-0x4b35 mem_flippen_key3_gpio
-0x4b36 mem_flippen_key4_gpio
-0x4b37 mem_flippen_key5_gpio
-0x4b38 mem_flippen_key6_gpio
-0x4b39 mem_flippen_key7_gpio
-0x4b3a mem_flippen_key0_press_status
-0x4b3b mem_flippen_key1_press_status
-0x4b3c mem_flippen_key2_press_status
-0x4b3d mem_flippen_key3_press_status
-0x4b3e mem_flippen_key4_press_status
-0x4b3f mem_flippen_key5_press_status
-0x4b40 mem_flippen_key6_press_status
-0x4b41 mem_flippen_key7_press_status
-0x4b42 mem_key_press_data
-0x4b42 mem_key_pageup_data
-0x4b4b mem_key_pagedown_data
-0x4b54 mem_key_shift_f5_data
-0x4b5d mem_key_esc_data
-0x4b66 mem_key_b_data
-0x4b6f mem_key_tab
-0x4b78 mem_key_enter
-0x4b81 mem_key_alt_tab
-0x4b8a mem_key_alt_f4
-0x4b93 mem_key_play_pause
-0x4b9c mem_key_vol_up
-0x4ba5 mem_key_vol_down
-0x4bae mem_standard_key_release
-0x4bb7 mem_system_ctrl_key_release
-0x4bc0 mem_media_key_release
-0x4bc9 mem_key0_long_press_flag
-0x4bca mem_key1_long_press_flag
-0x4bcb mem_key2_long_press_flag
-0x4bcc mem_key3_long_press_flag
-0x4bcd mem_key4_long_press_flag
-0x4bce mem_key0_long_press_event
-0x4bcf mem_key1_long_press_event
-0x4bd0 mem_key2_long_press_event
-0x4bd1 mem_key3_long_press_event
-0x4bd2 mem_key4_long_press_event
-0x4bd3 mem_key0_short_press_flag
-0x4bd4 mem_key1_short_press_flag
-0x4bd5 mem_key2_short_press_flag
-0x4bd6 mem_key3_short_press_flag
-0x4bd7 mem_key4_short_press_flag
-0x4bd8 mem_key0_press_timer_count
-0x4bd9 mem_key1_press_timer_count
-0x4bda mem_key2_press_timer_count
-0x4bdb mem_key3_press_timer_count
-0x4bdc mem_key4_press_timer_count
-0x4bdd mem_combination_key_down_flag
-0x4bde mem_combination_key_longpress_flag
-0x4bdf mem_key_disable_timer
-0x4be0 mem_24g_calculate_package_id_disable
-0x4be1 mem_24g_package_id_abandon_flag
-0x4be2 mem_24g_package_id
-0x4be3 mem_key_state
-0x4be4 mem_key_press_state
-0x4be5 mem_poweron_first_blank_data_enable
-0x4be6 mem_flippen_no_data_timeout
-0x4be8 mem_flippen_start_pair_no_data_timeout
-0x4bea mem_key_longpress_timer_init
-0x4bec mem_key_longpress_timer
-0x4bee mem_low_voltage_led_blink_flag
-0x4bef mem_low_voltage_led_blink_start_timer
-0x4bf0 mem_poweron_led_blink_flag
-0x4bf1 mem_24g_pair_enable_flag
-0x4bf2 mem_24g_ch_work
-0x4bf3 mem_24g_pair_key_down_flag
-0x4bf4 mem_24g_pairing_stop_flag
-0x4bf5 mem_longpress_24g_enter_hibernate_flag
-0x4bf6 mem_g24_connected_state
-0x4bf7 mem_g24_pairing_stop_flag
-0x4bf8 mem_send_package_before_check
-0x4bf9 mem_le_conn_rcv_new
-0x4bfa mem_le_conn_first_rcv
-0x4bfb mem_le_check_retransmit_flag
-0x4bfc mem_le_retransmit_cnt
-0x4bfd mem_le_check_retransmit_discon_flag
+0x4b20 mem_sensor_YS8299_init
+0x4b36 mem_sensor_YS8299_dpi
+0x4b36 mem_YS8299_dpi_0
+0x4b37 mem_YS8299_dpi_1
+0x4b38 mem_YS8299_dpi_2
+0x4b39 mem_24g_txpayload_buf
+0x4b49 mem_release_data_from_receiver_enable
+0x4b4a mem_release_data_from_transmiter_enable
+0x4b4b mem_flippen_key0_gpio
+0x4b4c mem_flippen_key1_gpio
+0x4b4d mem_flippen_key2_gpio
+0x4b4e mem_flippen_key3_gpio
+0x4b4f mem_flippen_key4_gpio
+0x4b50 mem_flippen_key5_gpio
+0x4b51 mem_flippen_key6_gpio
+0x4b52 mem_flippen_key7_gpio
+0x4b53 mem_flippen_key0_press_status
+0x4b54 mem_flippen_key1_press_status
+0x4b55 mem_flippen_key2_press_status
+0x4b56 mem_flippen_key3_press_status
+0x4b57 mem_flippen_key4_press_status
+0x4b58 mem_flippen_key5_press_status
+0x4b59 mem_flippen_key6_press_status
+0x4b5a mem_flippen_key7_press_status
+0x4b5b mem_key_press_data
+0x4b5b mem_key_pageup_data
+0x4b64 mem_key_pagedown_data
+0x4b6d mem_key_shift_f5_data
+0x4b76 mem_key_esc_data
+0x4b7f mem_key_b_data
+0x4b88 mem_key_tab
+0x4b91 mem_key_enter
+0x4b9a mem_key_alt_tab
+0x4ba3 mem_key_alt_f4
+0x4bac mem_key_play_pause
+0x4bb5 mem_key_vol_up
+0x4bbe mem_key_vol_down
+0x4bc7 mem_standard_key_release
+0x4bd0 mem_system_ctrl_key_release
+0x4bd9 mem_media_key_release
+0x4be2 mem_key0_long_press_flag
+0x4be3 mem_key1_long_press_flag
+0x4be4 mem_key2_long_press_flag
+0x4be5 mem_key3_long_press_flag
+0x4be6 mem_key4_long_press_flag
+0x4be7 mem_key0_long_press_event
+0x4be8 mem_key1_long_press_event
+0x4be9 mem_key2_long_press_event
+0x4bea mem_key3_long_press_event
+0x4beb mem_key4_long_press_event
+0x4bec mem_key0_short_press_flag
+0x4bed mem_key1_short_press_flag
+0x4bee mem_key2_short_press_flag
+0x4bef mem_key3_short_press_flag
+0x4bf0 mem_key4_short_press_flag
+0x4bf1 mem_key0_press_timer_count
+0x4bf2 mem_key1_press_timer_count
+0x4bf3 mem_key2_press_timer_count
+0x4bf4 mem_key3_press_timer_count
+0x4bf5 mem_key4_press_timer_count
+0x4bf6 mem_combination_key_down_flag
+0x4bf7 mem_combination_key_longpress_flag
+0x4bf8 mem_key_disable_timer
+0x4bf9 mem_24g_calculate_package_id_disable
+0x4bfa mem_24g_package_id_abandon_flag
+0x4bfb mem_24g_package_id
+0x4bfc mem_key_state
+0x4bfd mem_key_press_state
+0x4bfe mem_poweron_first_blank_data_enable
+0x4bff mem_flippen_no_data_timeout
+0x4c01 mem_flippen_start_pair_no_data_timeout
+0x4c03 mem_key_longpress_timer_init
+0x4c05 mem_key_longpress_timer
+0x4c07 mem_low_voltage_led_blink_flag
+0x4c08 mem_low_voltage_led_blink_start_timer
+0x4c09 mem_poweron_led_blink_flag
+0x4c0a mem_24g_pair_enable_flag
+0x4c0b mem_24g_ch_work
+0x4c0c mem_24g_pair_key_down_flag
+0x4c0d mem_24g_pairing_stop_flag
+0x4c0e mem_longpress_24g_enter_hibernate_flag
+0x4c0f mem_g24_connected_state
+0x4c10 mem_g24_pairing_stop_flag
+0x4c11 mem_send_package_before_check
+0x4c12 mem_le_conn_rcv_new
+0x4c13 mem_le_conn_first_rcv
+0x4c14 mem_le_check_retransmit_flag
+0x4c15 mem_le_retransmit_cnt
+0x4c16 mem_le_check_retransmit_discon_flag
 0x462d mem_remote_car_hard_soft_switch
 0x462e mem_remote_car_queue_each_size
 0x462f mem_remote_car_queue_length
Index: output/otp.dat
===================================================================
--- /1121s/branch/mouse/ZXS_Project/1m/mouse_public_switch_221-v10_new_by4006/output/otp.dat	(revision 5443)
+++ /1121s/branch/mouse/ZXS_Project/1m/mouse_public_switch_221-v10_new_by4006/output/otp.dat	(working copy)
@@ -27,7 +27,7 @@
 1e
 aa
 55
-a0
+80
 15
 4e
 06
@@ -116,63 +116,63 @@
 f7
 dc
 c3
-81
+83
 ca
-93
-eb
-77
+92
+ea
+c2
 f6
-fd
-ff
-67
+82
+fe
+d2
 0d
-b9
-88
-1f
+bb
+0e
+cc
 50
 83
-9b
-a8
+1c
+7d
 6f
-31
-5b
+30
+dd
 1e
 f3
 0e
-9d
-92
+1c
+70
 2b
-50
-d6
-b5
+57
+51
+55
 9d
-89
-54
-28
+88
+53
+e2
 6a
 da
-4e
-cd
+cf
+ec
 8b
+0e
+0a
 0d
-8b
-e8
 9b
 d7
-9e
-b0
+1e
+2a
 79
-d1
-10
-91
+d0
+97
+8f
 28
-2c
+23
 69
-78
+16
 bc
-c3
-e2
-cb
+c2
+63
+12
 41
 15
 1e
@@ -1495,8 +1495,8 @@
 87
 72
 3d
-d4
-51
+d3
+ba
 d8
 9e
 b8
@@ -1519,28 +1519,28 @@
 dc
 09
 06
-c9
-63
+ce
+8a
 d0
 4f
 92
 17
 e4
 db
-95
-04
+92
+eb
 62
 ff
 f9
 f9
 44
 47
-07
-10
+00
+f9
 14
 0c
-06
-b3
+01
+58
 b2
 01
 73
@@ -1563,8 +1563,8 @@
 41
 77
 e4
-90
-40
+97
+a9
 e1
 6f
 4a
@@ -1574,16 +1574,16 @@
 e4
 ff
 de
-33
-5c
+34
+b3
 7e
 24
 eb
 13
 c3
 5f
-40
-f2
+47
+19
 10
 fa
 2a
@@ -1615,8 +1615,8 @@
 3f
 84
 94
-9f
-b6
+98
+5f
 1d
 ba
 f1
@@ -1627,8 +1627,8 @@
 e9
 1e
 54
-cf
-c3
+c8
+2a
 b4
 64
 5d
@@ -1651,16 +1651,16 @@
 12
 fe
 d1
-cd
-7a
+ca
+91
 1d
 4f
 2a
 ce
 7e
 34
-13
-05
+14
+ee
 7b
 c9
 11
@@ -2179,16 +2179,16 @@
 71
 42
 4a
-06
-df
+01
+30
 77
 ee
 1c
 e2
 90
 df
-a3
-08
+a4
+e3
 34
 8e
 83
@@ -4239,8 +4239,8 @@
 3e
 60
 0f
-3d
-de
+3a
+37
 9a
 63
 25
@@ -4271,12 +4271,12 @@
 68
 36
 55
-59
-23
+5e
+c8
 ec
 7f
-0c
-bd
+0b
+54
 4a
 50
 87
@@ -4407,8 +4407,8 @@
 2f
 32
 39
-8b
-20
+8c
+cb
 36
 da
 06
@@ -5177,394 +5177,362 @@
 2f
 a8
 5d
-65
-89
-fb
-e1
+2a
+29
+6b
+ee
 1a
-2f
-23
-de
-5a
-c1
-03
-cc
-14
+31
+ff
+8b
+ba
+f9
+8d
+43
+bb
+19
+56
+59
+68
+25
+15
+73
+30
+f3
+4b
+4e
+3d
+62
+f6
+33
 d5
+8b
+69
+c9
+6c
+0a
+fc
+91
+c9
+e6
+0f
+f3
+96
 95
-c5
+c6
 88
-05
-49
-2f
-d0
-b3
-97
-b9
-92
+c3
+31
+13
+84
 83
-3b
-7b
-7d
-ef
-27
-ef
-6c
-0a
-f2
-90
-d1
-e7
-93
+70
+69
 cf
-6c
-d5
-db
-dd
-8b
-59
-81
-29
-cc
-b0
-fa
-b1
-b2
-f2
-2c
-12
-ce
-2f
-5d
-89
+53
+32
+75
+4a
+61
+d7
+91
+c7
 99
-13
-28
-ba
-71
-b5
+0e
+74
+64
+91
+b9
 2c
-04
+33
 f5
-47
-92
-09
+27
+91
+36
 16
 94
-99
-2e
+97
+2d
 9a
-f0
-4b
-0d
-70
-36
-01
-b8
-43
-83
-84
-3c
-b9
+e3
+cb
+0f
+38
+5e
+9e
+81
+13
+8a
+bd
+d7
+47
 f1
-89
-3b
-98
-7d
-ee
+42
+1b
+e0
 3d
+b7
+a8
+02
+d0
+4b
+89
+b1
+5e
+0f
+eb
+d0
+d0
 02
-b0
 27
-6b
-09
-a6
-2a
-be
-a8
-f0
-58
-08
-d2
-90
-f4
-3a
-3b
-8e
-61
-17
-e2
-57
-03
-e9
+cd
+27
+c0
+7d
+43
+ce
+38
+e1
+dd
+b4
+4b
+27
 d7
 27
-12
-f9
-9f
-99
-25
-4d
+7e
+0e
+e7
+d9
+72
+83
 e4
 e7
-79
-70
+46
+86
 0a
 e0
-0c
-ec
+0d
+bc
 3c
 56
-65
-10
+36
+29
 da
-f9
+99
 e6
-df
+c4
 76
 59
-a7
-79
-13
-7c
-6f
-d5
-d8
-71
-c3
-62
-35
-61
-97
-47
-1a
-7e
-6b
-b5
+fa
+05
+5c
+bc
+f0
+5e
+93
+ab
+52
+55
+9b
+84
+de
+c5
+1e
+64
+6c
+cd
 24
 aa
 45
-ff
-b5
-2f
-5d
-78
-61
-37
-cb
-66
-5a
-9d
-13
-15
-28
-65
-f4
-00
-3e
-7a
-31
-a3
-78
-d0
-75
-4f
-dd
-4c
-db
-ef
-f4
-3a
-ea
-c4
-37
-a2
-2d
-ae
-c0
-aa
-3d
-ed
-1b
-a4
-0e
-2e
-76
-a8
-e7
-3c
-0e
-20
-87
 3b
-32
-11
-95
-32
-c9
-a0
-73
 fa
-36
-e7
-22
-05
-22
-6b
+8f
+91
+cc
+65
+2d
 c4
-9b
-ae
-57
-93
-32
-5d
+ab
+45
+34
+a3
+97
+7c
+16
+d6
+5f
+6e
+73
+12
+2b
+47
+72
+54
+77
+95
 24
-19
+4a
+06
+eb
+93
+55
+83
+df
+ad
 2b
-0c
-79
 ae
-0b
-a5
-bd
-02
-d1
-eb
-0e
-1b
-b0
-c4
-b0
-47
+90
+c1
+c3
+a8
 6b
-4f
-cc
+a6
+ec
+66
+86
+a6
+5d
+78
+41
+e2
+c4
+37
+c2
+1f
+2f
+77
+86
+62
+30
+f7
+c1
+41
+98
+4d
+9a
+0f
+3d
+cf
+ae
+35
+41
+99
 15
-0a
+2c
+da
+37
+43
+b9
+3f
+a9
+55
+b3
+b8
+94
+a4
+cc
+58
+a1
+7c
+b6
+6c
+90
+4f
+ae
+c7
+82
 fd
-67
+07
 b1
-97
-7d
-0e
-9e
-73
-cb
-29
+9d
+35
+66
+5d
+63
+cc
+81
 e3
-ac
-45
-50
-fb
-21
-45
-ff
-fc
-a7
+a1
+b2
+f6
+41
+66
+fd
 9b
-43
-ad
-03
+57
+71
+9b
+21
+7f
+bd
 13
-67
-30
+07
 30
+31
+89
+7b
+21
+ad
+5c
+c2
+c9
+89
 c1
-13
-e2
-ab
-13
-62
-0a
-95
-79
-d8
-27
-22
+de
+5e
+75
 f5
-13
-fc
-3b
+11
+2e
+88
 2b
 85
 27
-aa
+9d
 5c
-f6
+96
 ff
-d1
+c4
 52
-8a
-56
-d7
-97
-29
-cb
-e9
+ea
+04
+52
+ad
+28
+b0
+a7
 ba
 c2
 99
-5f
-eb
-ff
-41
-2e
+49
+d1
+fe
+3a
+78
 5e
-2f
-c9
-dc
-46
-05
-b6
-94
-b0
-1d
-b3
-c9
-5f
-ed
-72
-c5
-b6
+4f
+9b
+48
+7c
+64
+9f
+60
+8a
+7c
 9a
-bc
-33
-f4
-25
-9e
-b2
-16
-4d
-1e
+22
+65
+8c
+5b
+24
 8c
-10
-50
-ae
-cb
-c0
-74
 fb
-26
-49
-d9
-38
-b5
-db
-02
-48
-ca
-c0
-8f
-2d
-81
-ff
-7e
-c5
-1d
-4f
-e1
-d4
-b3
+95
+c6
+0f
+df
+c9
+44
 aa
 55
 40
@@ -5586,10 +5554,10 @@
 00
 d7
 18
-84
+a4
 f2
 7d
-69
+61
 00
 00
 00
@@ -6447,7 +6415,7 @@
 ff
 aa
 55
-11
+0c
 00
 68
 48
@@ -6463,6 +6431,43 @@
 1b
 11
 0e
+aa
+55
+19
+00
+20
+4b
+09
+69
+30
+07
+31
+0a
+32
+0d
+33
+10
+34
+14
+35
+1a
+36
+27
+37
+34
+09
+00
+ff
+ff
+03
+04
+01
+aa
+55
+05
+00
+74
+48
 8a
 8b
 83
@@ -6816,8 +6821,8 @@
 aa
 aa
 55
-71
-4f
-de
-4b
+9b
+57
+a5
+ad
 20
Index: output/program.lis
===================================================================
--- /1121s/branch/mouse/ZXS_Project/1m/mouse_public_switch_221-v10_new_by4006/output/program.lis	(revision 5443)
+++ /1121s/branch/mouse/ZXS_Project/1m/mouse_public_switch_221-v10_new_by4006/output/program.lis	(working copy)
@@ -21,21 +21,21 @@
 0012 c0378482 beq patch0d_7 ,p_mouse4_0_check_reconn_target 
 0013 c03984d1 beq patch0e_3 ,p_mouse_setgpio_hibernate 
 0014 c03a023d beq patch0e_4 ,p_mouse_lpm_before_common 
-0015 c03d0522 beq patch0f_2 ,p_mouse_motion 
-0016 c03f84b2 beq patch0f_7 ,p_mouse_3io6key_check 
-0017 c0408507 beq patch10_1 ,p_mouse_init_sensor 
-0018 c04203c7 beq patch10_4 ,p_mouse_buletooth_fast_conn_end 
-0019 c0428412 beq patch10_5 ,p_mouse_priority_bb_event 
-001a c0430212 beq patch10_6 ,p_mouse_le 
-001b c04383f0 beq patch10_7 ,p_mouse_bb_event_timer 
-001c c0440410 beq patch11_0 ,p_mouse_start_discovery 
-001d c04503da beq patch11_2 ,p_mouse_store_remote_bdaddr 
-001e c04582fb beq patch11_3 ,p_mouse_app_initflag_check 
-001f c046031e beq patch11_4 ,p_mouse_store_device_info 
-0020 c0468384 beq patch11_5 ,p_mouse_store_dpi_info_check 
-0021 c047049a beq patch11_6 ,p_mouse_idle 
-0022 c04804f4 beq patch12_0 ,p_mouse_check_select_device_by_switch 
-0023 c049852d beq patch12_3 ,p_mouse_drawing_optima 
+0015 c03d0520 beq patch0f_2 ,p_mouse_motion 
+0016 c03e8507 beq patch0f_5 ,p_mouse_setting_sensor_type 
+0017 c03f84b2 beq patch0f_7 ,p_mouse_3io6key_check 
+0018 c0408514 beq patch10_1 ,p_mouse_init_sensor 
+0019 c04203c7 beq patch10_4 ,p_mouse_buletooth_fast_conn_end 
+001a c0428412 beq patch10_5 ,p_mouse_priority_bb_event 
+001b c0430212 beq patch10_6 ,p_mouse_le 
+001c c04383f0 beq patch10_7 ,p_mouse_bb_event_timer 
+001d c0440410 beq patch11_0 ,p_mouse_start_discovery 
+001e c04503da beq patch11_2 ,p_mouse_store_remote_bdaddr 
+001f c04582fb beq patch11_3 ,p_mouse_app_initflag_check 
+0020 c046031e beq patch11_4 ,p_mouse_store_device_info 
+0021 c0468384 beq patch11_5 ,p_mouse_store_dpi_info_check 
+0022 c047049a beq patch11_6 ,p_mouse_idle 
+0023 c04804f4 beq patch12_0 ,p_mouse_check_select_device_by_switch 
 0024 c04a84c8 beq patch12_5 ,p_mouse_24g_hibernate_set 
 0025 c04b04dd beq patch12_6 ,p_mouse_24g_package_data 
 0026 c0628272 beq patch18_5 ,p_otp_read_data 
@@ -446,7 +446,7 @@
 016d 20200159 branch p_set_lemode_2m 
 
 p_le_check_retransmit_timesout:
-016e 6fe0cbf9 fetch 1 ,mem_le_conn_rcv_new 
+016e 6fe0cc12 fetch 1 ,mem_le_conn_rcv_new 
 016f da600100 arg 256 ,regc 
 0170 9a60fe00 iadd regc ,pdata 
 0171 20600000 rtn 
@@ -456,25 +456,25 @@
 0173 20202563 branch le_slave_match + 1 
 
 p_le_check_retransmit:
-0174 6fe0cbfa fetch 1 ,mem_le_conn_first_rcv 
+0174 6fe0cc13 fetch 1 ,mem_le_conn_first_rcv 
 0175 207a0000 rtn blank 
-0176 6fe0cbfb fetch 1 ,mem_le_check_retransmit_flag 
+0176 6fe0cc14 fetch 1 ,mem_le_check_retransmit_flag 
 0177 247a0000 nrtn blank 
-0178 6848cbfa fetcht 1 ,mem_le_conn_first_rcv 
-0179 6fe0cbf9 fetch 1 ,mem_le_conn_rcv_new 
+0178 6848cc13 fetcht 1 ,mem_le_conn_first_rcv 
+0179 6fe0cc12 fetch 1 ,mem_le_conn_rcv_new 
 017a 98467c00 isub temp ,null 
 017b 2441016e ncall p_le_check_retransmit_timesout ,positive 
 017c 98467e00 isub temp ,pdata 
 017d 1fe67c64 sub pdata ,100 ,null 
 017e 20210186 branch p_le_check_retransmit_count ,positive 
-017f 6fe0cbfc fetch 1 ,mem_le_retransmit_cnt 
+017f 6fe0cc15 fetch 1 ,mem_le_retransmit_cnt 
 0180 1fe67c14 sub pdata ,20 ,null 
 0181 24410184 ncall p_app_ble_disconnect ,positive 
-0182 704bfb01 jam 1 ,mem_le_check_retransmit_flag 
+0182 704c1401 jam 1 ,mem_le_check_retransmit_flag 
 0183 20600000 rtn 
 
 p_app_ble_disconnect:
-0184 704bfd01 jam 1 ,mem_le_check_retransmit_discon_flag 
+0184 704c1601 jam 1 ,mem_le_check_retransmit_discon_flag 
 0185 2020431f branch app_ble_disconnect 
 
 p_le_check_retransmit_count:
@@ -484,10 +484,10 @@
 0189 9842fe00 ixor temp ,pdata 
 018a 2feffe02 isolate1 nesn ,pdata 
 018b 58000000 setarg 0 
-018c 6848cbfc fetcht 1 ,mem_le_retransmit_cnt 
+018c 6848cc15 fetcht 1 ,mem_le_retransmit_cnt 
 018d 7920fe00 setflag true ,0 ,pdata 
 018e 98408400 iadd temp ,temp 
-018f 6048cbfc storet 1 ,mem_le_retransmit_cnt 
+018f 6048cc15 storet 1 ,mem_le_retransmit_cnt 
 0190 20600000 rtn 
 
 p_le_got_first_packet_new:
@@ -495,9 +495,9 @@
 0192 1fe0fe01 increase 1 ,pdata 
 0193 67e08005 store 1 ,mem_le_conn_rcv 
 0194 24368198 nbranch p_le_got_first_packet_new + 7 ,match 
-0195 6fe0cbf9 fetch 1 ,mem_le_conn_rcv_new 
+0195 6fe0cc12 fetch 1 ,mem_le_conn_rcv_new 
 0196 1fe0fe01 increase 1 ,pdata 
-0197 67e0cbf9 store 1 ,mem_le_conn_rcv_new 
+0197 67e0cc12 store 1 ,mem_le_conn_rcv_new 
 0198 2020259b branch le_got_first_packet + 4 
 
 p_le_rx_dec:
@@ -661,9 +661,9 @@
 0216 6fe0c843 fetch 1 ,mem_le_connect_status_flag 
 0217 1fe17e03 and pdata ,0x03 ,pdata 
 0218 c1818000 rtnne 0x03 
-0219 6fe0cbfb fetch 1 ,mem_le_check_retransmit_flag 
+0219 6fe0cc14 fetch 1 ,mem_le_check_retransmit_flag 
 021a 207a0000 rtn blank 
-021b 6fe0cbfd fetch 1 ,mem_le_check_retransmit_discon_flag 
+021b 6fe0cc16 fetch 1 ,mem_le_check_retransmit_discon_flag 
 021c 247a0000 nrtn blank 
 
 p_mouse_le_next:
@@ -1370,7 +1370,7 @@
 
 p_mouse_le_bb_event_connected:
 041b 58000000 setarg 0 
-041c 67e24bfa store 4 ,mem_le_conn_first_rcv 
+041c 67e24c13 store 4 ,mem_le_conn_first_rcv 
 041d 20205ad0 branch mouse_le_bb_event_connected 
 
 p_mouse_le_ll_start_encryt:
@@ -1384,8 +1384,8 @@
 0423 70484405 jam 5 ,mem_le_start_encrypt_timer 
 
 p_mouse_le_ll_reconn_start_encryt_new:
-0424 6fe0cbf9 fetch 1 ,mem_le_conn_rcv_new 
-0425 67e0cbfa store 1 ,mem_le_conn_first_rcv 
+0424 6fe0cc12 fetch 1 ,mem_le_conn_rcv_new 
+0425 67e0cc13 store 1 ,mem_le_conn_first_rcv 
 0426 20205af6 branch mouse_le_ll_enable_start_enc_flag 
 
 p_mouse_le_conn_param_update_rsp_recieved:
@@ -1428,7 +1428,7 @@
 0443 1fe17e03 and pdata ,0x03 ,pdata 
 0444 20405b21 call mouse_le_clean_connect_flag 
 0445 c081d4a9 bne 0x03 ,mouse_start_reconnect 
-0446 6fe0cbfd fetch 1 ,mem_le_check_retransmit_discon_flag 
+0446 6fe0cc16 fetch 1 ,mem_le_check_retransmit_discon_flag 
 0447 243a54a9 nbranch mouse_start_reconnect ,blank 
 0448 202054cd branch mouse_app_enter_hibernate 
 
@@ -1694,144 +1694,141 @@
 0505 6848c65a fetcht 1 ,mem_device_switch_gpio 
 0506 202055b1 branch mouse_gpio_config_input_pd 
 
+p_mouse_setting_sensor_type:
+0507 6fe0c957 fetch 1 ,mem_config_sensor_type 
+0508 c006850a beq ys8299 ,p_mouse_seting_ys8299_dpi 
+0509 20205749 branch mouse_setting_sensor_type + 2 
+
+p_mouse_seting_ys8299_dpi:
+050a 6fe0c690 fetch 1 ,mem_mouse_dpi 
+050b c000050e beq mouse_dpi_level1 ,p_mouse_set_ys8299_cpi0 
+050c c0008510 beq mouse_dpi_level2 ,p_mouse_set_ys8299_cpi1 
+050d c0010512 beq mouse_dpi_level3 ,p_mouse_set_ys8299_cpi2 
+
+p_mouse_set_ys8299_cpi0:
+050e 6848cb36 fetcht 1 ,mem_ys8299_dpi_0 
+050f 2020575e branch mouse_dpi_write 
+
+p_mouse_set_ys8299_cpi1:
+0510 6848cb37 fetcht 1 ,mem_ys8299_dpi_1 
+0511 2020575e branch mouse_dpi_write 
+
+p_mouse_set_ys8299_cpi2:
+0512 6848cb38 fetcht 1 ,mem_ys8299_dpi_2 
+0513 2020575e branch mouse_dpi_write 
+
 p_mouse_init_sensor:
-0507 20405958 call mouse_read_sensor_id 
-0508 c018595f beq p32xx_id1 ,mouse_init_p32xx_id2_judge 
-0509 c018d9c6 beq p3065_id1 ,mouse_init_p3065 
-050a c02c050c beq pka8g2_id1 ,p_mouse_ka8g2_id2_judge 
-050b 20205952 branch mouse_init_sensor + 5 
-
-p_mouse_ka8g2_id2_judge:
-050c 204059e7 call mouse_sensor_poweron 
-050d 6fe0c85a fetch 1 ,mem_sensor_id2 
-050e c02c8510 beq pka8g2_id2 ,p_mouse_ka8g2_init_param 
-050f 2020595f branch mouse_init_p32xx_id2_judge 
-
-p_mouse_ka8g2_init_param:
-0510 7049570b jam ka8g2 ,mem_config_sensor_type 
-0511 da604a0b arg mem_sensor_ka8g2_init_new ,regc 
-0512 20205995 branch mouse_sensor_wr_seq 
-
-p_mouse_check_sensor_data:
-0513 6fe0c420 fetch 1 ,mem_spi_write_flash_sm 
-0514 c1800000 rtnne flash_sm_no_buys 
-0515 6fe0c957 fetch 1 ,mem_config_sensor_type 
-0516 c0058518 beq ka8g2 ,p_mouse_pka8g2_sensor_motion 
-0517 202059f8 branch mouse_check_sensor_data + 2 
-
-p_mouse_pka8g2_sensor_motion:
-0518 20405a6d call mouse_clear_sensor_data 
-0519 6fe0c659 fetch 1 ,mem_sensor_motion_gpio 
-051a c07f851e beq gpio_disable ,p_mouse_pka8g2_sensor_motion_1 
-051b 6848c659 fetcht 1 ,mem_sensor_motion_gpio 
-051c 20406ee6 call gpio_get_bit 
-051d 24608000 nrtn true 
-
-p_mouse_pka8g2_sensor_motion_1:
-051e 58000000 setarg pan_reg_pid_l 
-051f 204069e5 call twspi_read 
-0520 c0ac5955 bne pka8g2_id1 ,mouse_twspi_reset 
-0521 20205a2f branch mouse_p3212_sensor_motion_2 
+0514 20405958 call mouse_read_sensor_id 
+0515 c0180519 beq p32xx_id1 ,p_mouse_init_p32xx_id2_judge 
+0516 c018d9c6 beq p3065_id1 ,mouse_init_p3065 
+0517 c02c59cf beq pka8g2_id1 ,mouse_ka8g2_id2_judge 
+0518 20205952 branch mouse_init_sensor + 5 
+
+p_mouse_init_p32xx_id2_judge:
+0519 6fe0c85a fetch 1 ,mem_sensor_id2 
+051a c06c051c beq p8009_id2 ,p_mouse_8299_init_param 
+051b 20205960 branch mouse_init_p32xx_id2_judge + 1 
+
+p_mouse_8299_init_param:
+051c 7049570d jam ys8299 ,mem_config_sensor_type 
+051d da604b20 arg mem_sensor_ys8299_init ,regc 
+051e 20405995 call mouse_sensor_wr_seq 
+051f 20200507 branch p_mouse_setting_sensor_type 
 
 p_mouse_motion:
-0522 78547c00 disable user 
-0523 58000000 setarg 0 
-0524 67e34847 store 6 ,mem_mouse_x 
-0525 20400513 call p_mouse_check_sensor_data 
-0526 58000089 setarg 0x0089 
-0527 204069e4 call twspi_write 
-0528 20405747 call mouse_setting_sensor_type 
-0529 20405612 call mouse_zwheel 
-052a 20405617 call mouse_t_zwheel 
-052b 20400530 call p_mouse_key 
-052c 2020560c branch mouse_motion + 11 
-
-p_mouse_drawing_optima:
-052d 6fe0c957 fetch 1 ,mem_config_sensor_type 
-052e c1058000 rtneq ka8g2 
-052f 20205f27 branch mouse_drawing_optima + 1 
+0520 78547c00 disable user 
+0521 58000000 setarg 0 
+0522 67e34847 store 6 ,mem_mouse_x 
+0523 204059f6 call mouse_check_sensor_data 
+0524 58000089 setarg 0x0089 
+0525 204069e4 call twspi_write 
+0526 20405747 call mouse_setting_sensor_type 
+0527 20405612 call mouse_zwheel 
+0528 20405617 call mouse_t_zwheel 
+0529 2040052b call p_mouse_key 
+052a 2020560c branch mouse_motion + 11 
 
 p_mouse_key:
-0530 2040584c call mouse_check_firekey_gpio 
-0531 6fe0c987 fetch 1 ,mem_fire_key_flag 
-0532 243a5860 nbranch fire_key_press ,blank 
-0533 6fe0c982 fetch 1 ,mem_fire_key_status 
-0534 243a585f nbranch fire_key_process ,blank 
-0535 20405888 call mouse_check_key_gpio 
-0536 20400538 call p_mouse_ghost_key_check 
-0537 202057ad branch mouse_key + 7 
+052b 2040584c call mouse_check_firekey_gpio 
+052c 6fe0c987 fetch 1 ,mem_fire_key_flag 
+052d 243a5860 nbranch fire_key_press ,blank 
+052e 6fe0c982 fetch 1 ,mem_fire_key_status 
+052f 243a585f nbranch fire_key_process ,blank 
+0530 20405888 call mouse_check_key_gpio 
+0531 20400533 call p_mouse_ghost_key_check 
+0532 202057ad branch mouse_key + 7 
 
 p_mouse_ghost_key_check:
-0538 70497900 jam 0 ,mem_mouse_matrix_key_cow_count 
-0539 70497a00 jam 0 ,mem_mouse_matrix_key_row_count 
-053a 70497b00 jam 0 ,mem_mouse_ghost_flag 
-053b 1fe22400 copy pdata ,regb 
-053c 6848c644 fetcht 1 ,mem_lbutton_gpio 
-053d 6fe0c647 fetch 1 ,mem_bk_button_gpio 
-053e 98467c00 isub temp ,null 
-053f 2022854a branch p_mouse_matrix_ghost_key_l_bk ,zero 
-0540 6fe0c648 fetch 1 ,mem_fw_button_gpio 
-0541 98467c00 isub temp ,null 
-0542 20228550 branch p_mouse_matrix_ghost_key_l_fw ,zero 
-0543 6848c645 fetcht 1 ,mem_mbutton_gpio 
-0544 6fe0c647 fetch 1 ,mem_bk_button_gpio 
-0545 98467c00 isub temp ,null 
-0546 20228559 branch p_mouse_ghost_key_mbk_rfw ,zero 
+0533 70497900 jam 0 ,mem_mouse_matrix_key_cow_count 
+0534 70497a00 jam 0 ,mem_mouse_matrix_key_row_count 
+0535 70497b00 jam 0 ,mem_mouse_ghost_flag 
+0536 1fe22400 copy pdata ,regb 
+0537 6848c644 fetcht 1 ,mem_lbutton_gpio 
+0538 6fe0c647 fetch 1 ,mem_bk_button_gpio 
+0539 98467c00 isub temp ,null 
+053a 20228545 branch p_mouse_matrix_ghost_key_l_bk ,zero 
+053b 6fe0c648 fetch 1 ,mem_fw_button_gpio 
+053c 98467c00 isub temp ,null 
+053d 2022854b branch p_mouse_matrix_ghost_key_l_fw ,zero 
+053e 6848c645 fetcht 1 ,mem_mbutton_gpio 
+053f 6fe0c647 fetch 1 ,mem_bk_button_gpio 
+0540 98467c00 isub temp ,null 
+0541 20228554 branch p_mouse_ghost_key_mbk_rfw ,zero 
 
 p_mouse_ghost_key_mfw_rbk:
-0547 204057fb call mouse_ghost_key_check_m_fw 
+0542 204057fb call mouse_ghost_key_check_m_fw 
 
 p_mouse_ghost_key_rbk:
-0548 2040055e call p_mouse_ghost_key_check_r_bk 
-0549 202057e5 branch mouse_ghost_key_check_next 
+0543 20400559 call p_mouse_ghost_key_check_r_bk 
+0544 202057e5 branch mouse_ghost_key_check_next 
 
 p_mouse_matrix_ghost_key_l_bk:
-054a 6848c645 fetcht 1 ,mem_mbutton_gpio 
-054b 6fe0c648 fetch 1 ,mem_fw_button_gpio 
-054c 98467c00 isub temp ,null 
-054d 2022d7d6 branch mouse_ghost_key_lbk_mfw ,zero 
+0545 6848c645 fetcht 1 ,mem_mbutton_gpio 
+0546 6fe0c648 fetch 1 ,mem_fw_button_gpio 
+0547 98467c00 isub temp ,null 
+0548 2022d7d6 branch mouse_ghost_key_lbk_mfw ,zero 
 
 p_mouse_ghost_key_lbk_rfw:
-054e 204057ef call mouse_ghost_key_check_l_bk 
-054f 2020055a branch p_mouse_ghost_key_rfw 
+0549 204057ef call mouse_ghost_key_check_l_bk 
+054a 20200555 branch p_mouse_ghost_key_rfw 
 
 p_mouse_matrix_ghost_key_l_fw:
-0550 6848c645 fetcht 1 ,mem_mbutton_gpio 
-0551 6fe0c647 fetch 1 ,mem_bk_button_gpio 
-0552 98467c00 isub temp ,null 
-0553 20228556 branch p_mouse_ghost_key_lfw_mbk ,zero 
+054b 6848c645 fetcht 1 ,mem_mbutton_gpio 
+054c 6fe0c647 fetch 1 ,mem_bk_button_gpio 
+054d 98467c00 isub temp ,null 
+054e 20228551 branch p_mouse_ghost_key_lfw_mbk ,zero 
 
 p_mouse_ghost_key_lfw_rbk:
-0554 20400560 call p_mouse_ghost_key_check_l_fw 
-0555 20200548 branch p_mouse_ghost_key_rbk 
+054f 2040055b call p_mouse_ghost_key_check_l_fw 
+0550 20200543 branch p_mouse_ghost_key_rbk 
 
 p_mouse_ghost_key_lfw_mbk:
-0556 20400560 call p_mouse_ghost_key_check_l_fw 
-0557 2040055c call p_mouse_ghost_key_check_m_bk 
-0558 202057e5 branch mouse_ghost_key_check_next 
+0551 2040055b call p_mouse_ghost_key_check_l_fw 
+0552 20400557 call p_mouse_ghost_key_check_m_bk 
+0553 202057e5 branch mouse_ghost_key_check_next 
 
 p_mouse_ghost_key_mbk_rfw:
-0559 2040055c call p_mouse_ghost_key_check_m_bk 
+0554 20400557 call p_mouse_ghost_key_check_m_bk 
 
 p_mouse_ghost_key_rfw:
-055a 20400562 call p_mouse_ghost_key_check_r_fw 
-055b 202057e5 branch mouse_ghost_key_check_next 
+0555 2040055d call p_mouse_ghost_key_check_r_fw 
+0556 202057e5 branch mouse_ghost_key_check_next 
 
 p_mouse_ghost_key_check_m_bk:
-055c 1a417e12 and regb ,mouse_m_bk_button ,pdata 
-055d 202057f3 branch mouse_ghost_key_check_m_bk + 1 
+0557 1a417e12 and regb ,mouse_m_bk_button ,pdata 
+0558 202057f3 branch mouse_ghost_key_check_m_bk + 1 
 
 p_mouse_ghost_key_check_r_bk:
-055e 1a417e0a and regb ,mouse_r_bk_button ,pdata 
-055f 202057f6 branch mouse_ghost_key_check_r_bk + 1 
+0559 1a417e0a and regb ,mouse_r_bk_button ,pdata 
+055a 202057f6 branch mouse_ghost_key_check_r_bk + 1 
 
 p_mouse_ghost_key_check_l_fw:
-0560 1a417e11 and regb ,mouse_l_fw_button ,pdata 
-0561 202057f9 branch mouse_ghost_key_check_l_fw + 1 
+055b 1a417e11 and regb ,mouse_l_fw_button ,pdata 
+055c 202057f9 branch mouse_ghost_key_check_l_fw + 1 
 
 p_mouse_ghost_key_check_r_fw:
-0562 1a417e12 and regb ,mouse_r_fw_button ,pdata 
-0563 202057ff branch mouse_ghost_key_check_r_fw + 1 
+055d 1a417e12 and regb ,mouse_r_fw_button ,pdata 
+055e 202057ff branch mouse_ghost_key_check_r_fw + 1 
               org 0x2000
 
 start:
Index: program/patch.prog
===================================================================
--- /1121s/branch/mouse/ZXS_Project/1m/mouse_public_switch_221-v10_new_by4006/program/patch.prog	(revision 5443)
+++ /1121s/branch/mouse/ZXS_Project/1m/mouse_public_switch_221-v10_new_by4006/program/patch.prog	(working copy)
@@ -40,6 +40,7 @@
 	beq patch0e_7,p_mouse_adc_read_start
 endif
 	beq patch0f_2,p_mouse_motion
+	beq patch0f_5,p_mouse_setting_sensor_type
 	beq patch0f_7,p_mouse_3io6key_check
 	beq patch10_1,p_mouse_init_sensor
 	beq patch10_4,p_mouse_buletooth_fast_conn_end
@@ -53,7 +54,7 @@
 	beq patch11_5,p_mouse_store_dpi_info_check
 	beq patch11_6,p_mouse_idle
 	beq patch12_0,p_mouse_check_select_device_by_switch
-	beq patch12_3,p_mouse_drawing_optima
+	// beq patch12_3,p_mouse_drawing_optima
 	beq patch12_5,p_mouse_24g_hibernate_set
 	beq patch12_6,p_mouse_24g_package_data
 	beq patch18_5,p_otp_read_data
@@ -1925,48 +1926,48 @@
 	fetcht 1,mem_device_switch_gpio
 	branch mouse_gpio_config_input_pd
 	
+p_mouse_setting_sensor_type:
+	fetch 1,mem_config_sensor_type
+	beq YS8299,p_mouse_seting_YS8299_dpi
+	branch mouse_setting_sensor_type+2
+
+p_mouse_seting_YS8299_dpi:
+	fetch 1,mem_mouse_dpi
+	beq MOUSE_DPI_LEVEL1,p_mouse_set_YS8299_cpi0		//1250
+	beq MOUSE_DPI_LEVEL2,p_mouse_set_YS8299_cpi1		//1600
+	beq MOUSE_DPI_LEVEL3,p_mouse_set_YS8299_cpi2		//750
+p_mouse_set_YS8299_cpi0:
+	fetcht 1,mem_YS8299_dpi_0
+	branch mouse_dpi_write
+p_mouse_set_YS8299_cpi1:
+	fetcht 1,mem_YS8299_dpi_1
+	branch mouse_dpi_write
+p_mouse_set_YS8299_cpi2:
+	fetcht 1,mem_YS8299_dpi_2
+	branch mouse_dpi_write
+
 p_mouse_init_sensor:
 	call mouse_read_sensor_id
-	beq P32XX_ID1,mouse_init_p32xx_id2_judge
+	beq P32XX_ID1,p_mouse_init_p32xx_id2_judge
 	beq P3065_ID1,mouse_init_p3065
-	beq PKA8G2_ID1,p_mouse_ka8g2_id2_judge
+	beq PKA8G2_ID1,mouse_ka8g2_id2_judge
 	branch mouse_init_sensor+5
 
-p_mouse_ka8g2_id2_judge:
-	call mouse_sensor_poweron
+p_mouse_init_p32xx_id2_judge:
 	fetch 1,mem_sensor_id2
-	beq PKA8G2_ID2,p_mouse_ka8g2_init_param
-	branch mouse_init_p32xx_id2_judge
-p_mouse_ka8g2_init_param:
-	jam KA8G2,mem_config_sensor_type
-	arg mem_sensor_ka8g2_init_new,regc
-	branch mouse_sensor_wr_seq
-
-p_mouse_check_sensor_data:
-	fetch 1,mem_spi_write_flash_sm
-	rtnne FLASH_SM_NO_BUYS
-	fetch 1,mem_config_sensor_type
-	beq KA8G2,p_mouse_pka8g2_sensor_motion
-	branch mouse_check_sensor_data+2
-
-p_mouse_pka8g2_sensor_motion:
-	call mouse_clear_sensor_data
-	fetch 1,mem_sensor_motion_gpio
-	beq GPIO_DISABLE,p_mouse_pka8g2_sensor_motion_1
-	fetcht 1,mem_sensor_motion_gpio
-	call gpio_get_bit
-	nrtn true
-p_mouse_pka8g2_sensor_motion_1:
-	setarg PAN_REG_PID_L
-	call twspi_read
-	bne PKA8G2_ID1,mouse_twspi_reset
-	branch mouse_p3212_sensor_motion_2
+	beq P8009_ID2,p_mouse_8299_init_param
+	branch mouse_init_p32xx_id2_judge+1
+p_mouse_8299_init_param:
+	jam YS8299,mem_config_sensor_type
+	arg mem_sensor_YS8299_init,regc
+	call mouse_sensor_wr_seq
+	branch p_mouse_setting_sensor_type
 
 p_mouse_motion:
 	disable user
 	setarg 0
 	store 6,mem_mouse_x
-	call p_mouse_check_sensor_data
+	call mouse_check_sensor_data
 	setarg 0x0089
 	call twspi_write	
 	call mouse_setting_sensor_type
@@ -1975,10 +1976,6 @@
 	call p_mouse_key
 	branch mouse_motion+11
 
-p_mouse_drawing_optima:
-	fetch 1,mem_config_sensor_type
-	rtneq KA8G2
-	branch mouse_drawing_optima+1
 
 p_mouse_key:
 	call mouse_check_firekey_gpio
@@ -2306,52 +2303,3 @@
 	branch pwm_out_set+2
 endif
 
-p_mouse_init_sensor:
-	call mouse_read_sensor_id
-	beq P32XX_ID1,mouse_init_p32xx_id2_judge
-	beq P3065_ID1,mouse_init_p3065
-	beq PKA8G2_ID1,p_mouse_ka8g2_id2_judge
-	branch mouse_init_sensor+5
-
-p_mouse_ka8g2_id2_judge:
-	call mouse_sensor_poweron
-	fetch 1,mem_sensor_id2
-	beq PKA8G2_ID2,p_mouse_ka8g2_init_param
-	branch mouse_init_p32xx_id2_judge
-p_mouse_ka8g2_init_param:
-	jam KA8G2,mem_config_sensor_type
-	arg mem_sensor_ka8g2_init_new,regc
-	branch mouse_sensor_wr_seq
-
-
-
-p_mouse_check_sensor_data:
-	fetch 1,mem_spi_write_flash_sm
-	rtnne FLASH_SM_NO_BUYS
-	fetch 1,mem_config_sensor_type
-	beq KA8G2,p_mouse_pka8g2_sensor_motion
-	branch mouse_check_sensor_data+2
-
-p_mouse_pka8g2_sensor_motion:
-	call mouse_clear_sensor_data
-	fetch 1,mem_sensor_motion_gpio
-	beq GPIO_DISABLE,p_mouse_pka8g2_sensor_motion_1
-	fetcht 1,mem_sensor_motion_gpio
-	call gpio_get_bit
-	nrtn true
-p_mouse_pka8g2_sensor_motion_1:
-	setarg PAN_REG_PID_L
-	call twspi_read
-	bne PKA8G2_ID1,mouse_twspi_reset
-	branch mouse_p3212_sensor_motion_2
-
-	
-
-p_mouse_motion:
-	disable user
-	setarg 0
-	store 6,mem_mouse_x
-	call p_mouse_check_sensor_data
-	branch mouse_motion+5
-endif
-	
Index: sched/mouse.dat
===================================================================
--- /1121s/branch/mouse/ZXS_Project/1m/mouse_public_switch_221-v10_new_by4006/sched/mouse.dat	(revision 5443)
+++ /1121s/branch/mouse/ZXS_Project/1m/mouse_public_switch_221-v10_new_by4006/sched/mouse.dat	(working copy)
@@ -325,6 +325,24 @@
 11	#mem_ka8g2_dpi_2
 0e	#mem_ka8g2_dpi_3
 
+mem_sensor_YS8299_init:
+09 69
+30 07
+31 0a
+32 0d
+33 10
+34 14
+35 1a
+36 27
+37 34
+09 00
+ff ff
+
+mem_sensor_YS8299_dpi:
+03 #mem_YS8299_dpi_0 1250
+04 #mem_YS8299_dpi_1 1600
+01 #mem_YS8299_dpi_2 750
+
 mem_sensor_s201_dpi:
 8a  #mem_sensor_s201_dpi_0	1200
 8b  #mem_sensor_s201_dpi_1	1600
