Index: format/app_mouse.format
===================================================================
--- /1121s/branch/mouse/ZXS_Project/1m/mouse_public_switch_221-v10-new/format/app_mouse.format	(revision 5442)
+++ /1121s/branch/mouse/ZXS_Project/1m/mouse_public_switch_221-v10-new/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/output/memmap.format	(revision 5442)
+++ /1121s/branch/mouse/ZXS_Project/1m/mouse_public_switch_221-v10-new/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/output/otp.dat	(revision 5442)
+++ /1121s/branch/mouse/ZXS_Project/1m/mouse_public_switch_221-v10-new/output/otp.dat	(working copy)
@@ -27,7 +27,7 @@
 1e
 aa
 55
-90
+70
 15
 4e
 06
@@ -116,63 +116,63 @@
 f7
 dc
 c3
-bd
+bf
 ca
-93
-eb
-75
+92
+ea
+c6
 f6
-fd
-ff
-63
+82
+fe
+d0
 0d
-b9
-88
-1f
+bb
+0e
+c8
 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
-93
+d0
+97
+8f
 28
-2c
+23
 69
-7c
+14
 bc
-c3
-e2
-cf
+c2
+63
+16
 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
@@ -5161,394 +5161,362 @@
 a2
 16
 4e
-b5
-eb
-82
-35
-d0
-46
-d0
-ce
-5b
-e4
-fa
-34
-1f
-23
-f8
-e4
-65
-e9
-fb
-eb
 fa
-77
-23
-66
-f5
-39
+4b
 12
-50
-14
-d5
-15
-c5
+3a
+d0
+58
+0c
+97
+bb
+dc
+74
+bb
+b0
+ef
+3b
+7c
+85
+c9
+a7
+b3
+1a
+37
+ff
+8d
+5a
+d8
+df
+04
+bc
+b1
+5b
+ff
 88
 05
-49
-22
-80
-ba
-99
-55
-27
-03
-b9
-2a
-9d
-e3
-fb
-6a
+47
 23
-ca
-6f
-ef
-60
-2e
-c4
-c4
-d9
-55
-58
-81
-6b
-7c
-5d
-a8
-83
-70
-67
+98
+bb
+05
 69
-53
-32
-76
+dd
+43
+a4
 7f
-ce
-2f
-52
-87
-99
+d5
+8b
 69
-28
-b8
-39
-dd
-b3
-a5
-f5
-47
-a6
-82
-5d
-14
-df
-77
-02
-8f
+c7
+6c
+0a
+fc
+91
+81
+ee
+9d
+9c
+76
+ad
+94
+c3
+6b
+61
+01
+7a
+63
+7c
+67
+5e
+53
+52
+75
+40
 ce
-13
-38
-3e
-ae
-04
+2f
+5c
+84
+99
+7a
+a8
+ba
+71
+b5
+2c
+9c
+a5
+4e
+9f
+69
 a3
-6f
-b3
-8f
-bd
-b1
-53
 14
-b8
-29
-92
-3d
+14
+57
 7a
-f0
-4e
-8e
-ae
-e9
+cf
+97
+86
+38
+5e
+c2
+e2
+1b
+97
+96
+da
+c5
+91
+09
 3b
-ac
+a7
+9e
+a6
+7a
+02
+b0
+17
+78
+91
+0a
+73
+62
 a8
 90
-07
-28
-f2
-c4
-88
-b3
+6b
+c3
+8a
+84
+df
+7d
 43
 ce
-08
-f3
+37
+05
 a5
 f4
-1c
-e9
+1d
+b9
 d7
 27
-41
-f8
+12
+cd
 e7
-d9
+b9
 73
-d3
+c8
 e4
 e7
-15
-b8
-0a
-80
-0d
-a7
-73
-f6
+48
+d8
+45
+40
+92
+2c
+38
+2c
+6b
+62
+95
+59
+79
+4a
+72
+23
 fa
-55
-3b
-bc
-30
-c8
-76
-39
-fd
-6e
+16
 13
 1c
 61
-95
-d8
-71
-c3
-b2
-d0
-5e
-4f
-27
-55
-be
-fd
-10
-20
-d0
-45
-ec
-fa
-8f
-cc
-77
-65
+51
+97
+d1
+0f
+1a
+d4
+44
+40
+ea
+4a
+17
 4d
-96
-32
-15
+92
+74
+a3
+67
+b3
+aa
+86
+ef
+ff
+5a
+ef
+b7
+06
 5d
-8d
-3a
-7c
-16
-d5
-5f
-6e
-73
-13
-2b
-28
-d9
-0b
-77
-e2
-8e
-a8
-42
-ec
-3b
-55
-80
-28
-0b
-91
-e9
-28
-a5
-3a
-ed
-24
-64
-af
-68
-71
-00
-e7
-30
-f9
+35
+1c
+d3
+63
+bf
+6a
+18
 86
-3d
 7c
-8a
-75
-6c
-7e
-81
-ca
-30
+15
+2b
+78
+b2
 f5
 36
-e7
-22
+92
+8c
+4a
 0a
-22
-6b
+1c
+35
+ef
+c4
+67
+c9
+d2
+e9
+d8
+ab
+80
+a8
+6b
+a6
+ec
+69
+86
+a6
+5d
+78
+41
+e2
 c4
-9b
-ae
-57
-93
-37
-15
 2c
-88
+8a
+17
+be
+c9
+c9
+c2
+f3
+e5
+79
+27
+b3
+a8
+d2
+65
+7e
+de
+e1
 95
+d0
+2a
+ad
+2a
+a3
+6e
 43
-d9
-6d
-16
+bb
+bf
+9a
 1d
-db
+bb
 29
-34
-a3
-64
-58
-ac
-8b
-10
+3e
+eb
+0c
+9b
+b8
+8c
+b8
 d6
-d8
-f7
-ca
+d5
+00
 6c
-54
-fd
-65
-31
-a4
+d6
+13
+45
+01
+9a
+72
 35
-06
-0f
-d9
+64
+dd
+7b
 84
-e9
+89
 20
-b2
-b5
-5e
-41
-64
-0a
-3d
-ed
+b3
+fd
 36
-23
+82
+1e
 45
-86
-ec
+9d
+2e
+26
+9b
+43
+ff
+bf
 13
-65
-b0
-38
+67
+62
+8f
 89
 1b
 21
-b2
+bd
 5c
-a2
+c2
 c9
-96
+8b
 c1
-de
-5e
-7e
-f5
-71
-7c
-35
+be
+0c
+c7
+cf
+70
+07
+7f
 2b
 e5
 75
-2f
-5c
-96
-ff
-c1
-52
-8a
-56
-e9
+39
+66
 97
-49
-99
-50
-80
-a3
-b0
-a8
-eb
-9f
-13
-81
-64
-2e
-b2
-b4
-46
-05
-b6
-87
+84
+93
+52
+ea
+04
+41
+ad
+28
 b0
-1d
-b3
-ca
-5f
-ed
-72
-cf
-b6
-9a
-bc
-2b
-f4
-25
-9e
-bb
-c0
-a8
+a4
+ba
+c2
+99
+43
+d1
+fe
+3a
 60
-9d
-30
-70
-f9
-32
-da
-35
-85
-34
-69
-f9
-6f
-4a
+5e
+4f
+9b
+41
+48
+48
+e1
+71
 aa
 55
 40
@@ -5570,10 +5538,10 @@
 00
 d7
 18
-84
+a4
 f2
 7d
-69
+61
 00
 00
 00
@@ -6431,7 +6399,7 @@
 ff
 aa
 55
-11
+0c
 00
 68
 48
@@ -6447,6 +6415,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
@@ -6800,8 +6805,8 @@
 aa
 aa
 55
-9b
-50
-b7
-84
+c5
+58
+62
+52
 20
Index: output/program.lis
===================================================================
--- /1121s/branch/mouse/ZXS_Project/1m/mouse_public_switch_221-v10-new/output/program.lis	(revision 5442)
+++ /1121s/branch/mouse/ZXS_Project/1m/mouse_public_switch_221-v10-new/output/program.lis	(working copy)
@@ -21,21 +21,21 @@
 0012 c037d4b6 beq patch0d_7 ,mouse4_0_check_reconn_target 
 0013 c03984cd beq patch0e_3 ,p_mouse_setgpio_hibernate 
 0014 c03a023d beq patch0e_4 ,p_mouse_lpm_before_common 
-0015 c03d051e beq patch0f_2 ,p_mouse_motion 
-0016 c03f84b0 beq patch0f_7 ,p_mouse_3io6key_check 
-0017 c0408503 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 c0470498 beq patch11_6 ,p_mouse_idle 
-0022 c04804f0 beq patch12_0 ,p_mouse_check_select_device_by_switch 
-0023 c0498529 beq patch12_3 ,p_mouse_drawing_optima 
+0015 c03d051c beq patch0f_2 ,p_mouse_motion 
+0016 c03e8503 beq patch0f_5 ,p_mouse_setting_sensor_type 
+0017 c03f84b0 beq patch0f_7 ,p_mouse_3io6key_check 
+0018 c0408510 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 c0470498 beq patch11_6 ,p_mouse_idle 
+0023 c04804f0 beq patch12_0 ,p_mouse_check_select_device_by_switch 
 0024 c04a84c4 beq patch12_5 ,p_mouse_24g_hibernate_set 
 0025 c04b04d9 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 
 
@@ -1688,144 +1688,141 @@
 0501 6848c65a fetcht 1 ,mem_device_switch_gpio 
 0502 202055b1 branch mouse_gpio_config_input_pd 
 
+p_mouse_setting_sensor_type:
+0503 6fe0c957 fetch 1 ,mem_config_sensor_type 
+0504 c0068506 beq ys8299 ,p_mouse_seting_ys8299_dpi 
+0505 20205749 branch mouse_setting_sensor_type + 2 
+
+p_mouse_seting_ys8299_dpi:
+0506 6fe0c690 fetch 1 ,mem_mouse_dpi 
+0507 c000050a beq mouse_dpi_level1 ,p_mouse_set_ys8299_cpi0 
+0508 c000850c beq mouse_dpi_level2 ,p_mouse_set_ys8299_cpi1 
+0509 c001050e beq mouse_dpi_level3 ,p_mouse_set_ys8299_cpi2 
+
+p_mouse_set_ys8299_cpi0:
+050a 6848cb36 fetcht 1 ,mem_ys8299_dpi_0 
+050b 2020575e branch mouse_dpi_write 
+
+p_mouse_set_ys8299_cpi1:
+050c 6848cb37 fetcht 1 ,mem_ys8299_dpi_1 
+050d 2020575e branch mouse_dpi_write 
+
+p_mouse_set_ys8299_cpi2:
+050e 6848cb38 fetcht 1 ,mem_ys8299_dpi_2 
+050f 2020575e branch mouse_dpi_write 
+
 p_mouse_init_sensor:
-0503 20405958 call mouse_read_sensor_id 
-0504 c018595f beq p32xx_id1 ,mouse_init_p32xx_id2_judge 
-0505 c018d9c6 beq p3065_id1 ,mouse_init_p3065 
-0506 c02c0508 beq pka8g2_id1 ,p_mouse_ka8g2_id2_judge 
-0507 20205952 branch mouse_init_sensor + 5 
-
-p_mouse_ka8g2_id2_judge:
-0508 204059e7 call mouse_sensor_poweron 
-0509 6fe0c85a fetch 1 ,mem_sensor_id2 
-050a c02c850c beq pka8g2_id2 ,p_mouse_ka8g2_init_param 
-050b 2020595f branch mouse_init_p32xx_id2_judge 
-
-p_mouse_ka8g2_init_param:
-050c 7049570b jam ka8g2 ,mem_config_sensor_type 
-050d da604a0b arg mem_sensor_ka8g2_init_new ,regc 
-050e 20205995 branch mouse_sensor_wr_seq 
-
-p_mouse_check_sensor_data:
-050f 6fe0c420 fetch 1 ,mem_spi_write_flash_sm 
-0510 c1800000 rtnne flash_sm_no_buys 
-0511 6fe0c957 fetch 1 ,mem_config_sensor_type 
-0512 c0058514 beq ka8g2 ,p_mouse_pka8g2_sensor_motion 
-0513 202059f8 branch mouse_check_sensor_data + 2 
-
-p_mouse_pka8g2_sensor_motion:
-0514 20405a6d call mouse_clear_sensor_data 
-0515 6fe0c659 fetch 1 ,mem_sensor_motion_gpio 
-0516 c07f851a beq gpio_disable ,p_mouse_pka8g2_sensor_motion_1 
-0517 6848c659 fetcht 1 ,mem_sensor_motion_gpio 
-0518 20406ee6 call gpio_get_bit 
-0519 24608000 nrtn true 
-
-p_mouse_pka8g2_sensor_motion_1:
-051a 58000000 setarg pan_reg_pid_l 
-051b 204069e5 call twspi_read 
-051c c0ac5955 bne pka8g2_id1 ,mouse_twspi_reset 
-051d 20205a2f branch mouse_p3212_sensor_motion_2 
+0510 20405958 call mouse_read_sensor_id 
+0511 c0180515 beq p32xx_id1 ,p_mouse_init_p32xx_id2_judge 
+0512 c018d9c6 beq p3065_id1 ,mouse_init_p3065 
+0513 c02c59cf beq pka8g2_id1 ,mouse_ka8g2_id2_judge 
+0514 20205952 branch mouse_init_sensor + 5 
+
+p_mouse_init_p32xx_id2_judge:
+0515 6fe0c85a fetch 1 ,mem_sensor_id2 
+0516 c06c0518 beq p8009_id2 ,p_mouse_8299_init_param 
+0517 20205960 branch mouse_init_p32xx_id2_judge + 1 
+
+p_mouse_8299_init_param:
+0518 7049570d jam ys8299 ,mem_config_sensor_type 
+0519 da604b20 arg mem_sensor_ys8299_init ,regc 
+051a 20405995 call mouse_sensor_wr_seq 
+051b 20200503 branch p_mouse_setting_sensor_type 
 
 p_mouse_motion:
-051e 78547c00 disable user 
-051f 58000000 setarg 0 
-0520 67e34847 store 6 ,mem_mouse_x 
-0521 2040050f call p_mouse_check_sensor_data 
-0522 58000089 setarg 0x0089 
-0523 204069e4 call twspi_write 
-0524 20405747 call mouse_setting_sensor_type 
-0525 20405612 call mouse_zwheel 
-0526 20405617 call mouse_t_zwheel 
-0527 2040052c call p_mouse_key 
-0528 2020560c branch mouse_motion + 11 
-
-p_mouse_drawing_optima:
-0529 6fe0c957 fetch 1 ,mem_config_sensor_type 
-052a c1058000 rtneq ka8g2 
-052b 20205f27 branch mouse_drawing_optima + 1 
+051c 78547c00 disable user 
+051d 58000000 setarg 0 
+051e 67e34847 store 6 ,mem_mouse_x 
+051f 204059f6 call mouse_check_sensor_data 
+0520 58000089 setarg 0x0089 
+0521 204069e4 call twspi_write 
+0522 20405747 call mouse_setting_sensor_type 
+0523 20405612 call mouse_zwheel 
+0524 20405617 call mouse_t_zwheel 
+0525 20400527 call p_mouse_key 
+0526 2020560c branch mouse_motion + 11 
 
 p_mouse_key:
-052c 2040584c call mouse_check_firekey_gpio 
-052d 6fe0c987 fetch 1 ,mem_fire_key_flag 
-052e 243a5860 nbranch fire_key_press ,blank 
-052f 6fe0c982 fetch 1 ,mem_fire_key_status 
-0530 243a585f nbranch fire_key_process ,blank 
-0531 20405888 call mouse_check_key_gpio 
-0532 20400534 call p_mouse_ghost_key_check 
-0533 202057ad branch mouse_key + 7 
+0527 2040584c call mouse_check_firekey_gpio 
+0528 6fe0c987 fetch 1 ,mem_fire_key_flag 
+0529 243a5860 nbranch fire_key_press ,blank 
+052a 6fe0c982 fetch 1 ,mem_fire_key_status 
+052b 243a585f nbranch fire_key_process ,blank 
+052c 20405888 call mouse_check_key_gpio 
+052d 2040052f call p_mouse_ghost_key_check 
+052e 202057ad branch mouse_key + 7 
 
 p_mouse_ghost_key_check:
-0534 70497900 jam 0 ,mem_mouse_matrix_key_cow_count 
-0535 70497a00 jam 0 ,mem_mouse_matrix_key_row_count 
-0536 70497b00 jam 0 ,mem_mouse_ghost_flag 
-0537 1fe22400 copy pdata ,regb 
-0538 6848c644 fetcht 1 ,mem_lbutton_gpio 
-0539 6fe0c647 fetch 1 ,mem_bk_button_gpio 
-053a 98467c00 isub temp ,null 
-053b 20228546 branch p_mouse_matrix_ghost_key_l_bk ,zero 
-053c 6fe0c648 fetch 1 ,mem_fw_button_gpio 
-053d 98467c00 isub temp ,null 
-053e 2022854c branch p_mouse_matrix_ghost_key_l_fw ,zero 
-053f 6848c645 fetcht 1 ,mem_mbutton_gpio 
-0540 6fe0c647 fetch 1 ,mem_bk_button_gpio 
-0541 98467c00 isub temp ,null 
-0542 20228555 branch p_mouse_ghost_key_mbk_rfw ,zero 
+052f 70497900 jam 0 ,mem_mouse_matrix_key_cow_count 
+0530 70497a00 jam 0 ,mem_mouse_matrix_key_row_count 
+0531 70497b00 jam 0 ,mem_mouse_ghost_flag 
+0532 1fe22400 copy pdata ,regb 
+0533 6848c644 fetcht 1 ,mem_lbutton_gpio 
+0534 6fe0c647 fetch 1 ,mem_bk_button_gpio 
+0535 98467c00 isub temp ,null 
+0536 20228541 branch p_mouse_matrix_ghost_key_l_bk ,zero 
+0537 6fe0c648 fetch 1 ,mem_fw_button_gpio 
+0538 98467c00 isub temp ,null 
+0539 20228547 branch p_mouse_matrix_ghost_key_l_fw ,zero 
+053a 6848c645 fetcht 1 ,mem_mbutton_gpio 
+053b 6fe0c647 fetch 1 ,mem_bk_button_gpio 
+053c 98467c00 isub temp ,null 
+053d 20228550 branch p_mouse_ghost_key_mbk_rfw ,zero 
 
 p_mouse_ghost_key_mfw_rbk:
-0543 204057fb call mouse_ghost_key_check_m_fw 
+053e 204057fb call mouse_ghost_key_check_m_fw 
 
 p_mouse_ghost_key_rbk:
-0544 2040055a call p_mouse_ghost_key_check_r_bk 
-0545 202057e5 branch mouse_ghost_key_check_next 
+053f 20400555 call p_mouse_ghost_key_check_r_bk 
+0540 202057e5 branch mouse_ghost_key_check_next 
 
 p_mouse_matrix_ghost_key_l_bk:
-0546 6848c645 fetcht 1 ,mem_mbutton_gpio 
-0547 6fe0c648 fetch 1 ,mem_fw_button_gpio 
-0548 98467c00 isub temp ,null 
-0549 2022d7d6 branch mouse_ghost_key_lbk_mfw ,zero 
+0541 6848c645 fetcht 1 ,mem_mbutton_gpio 
+0542 6fe0c648 fetch 1 ,mem_fw_button_gpio 
+0543 98467c00 isub temp ,null 
+0544 2022d7d6 branch mouse_ghost_key_lbk_mfw ,zero 
 
 p_mouse_ghost_key_lbk_rfw:
-054a 204057ef call mouse_ghost_key_check_l_bk 
-054b 20200556 branch p_mouse_ghost_key_rfw 
+0545 204057ef call mouse_ghost_key_check_l_bk 
+0546 20200551 branch p_mouse_ghost_key_rfw 
 
 p_mouse_matrix_ghost_key_l_fw:
-054c 6848c645 fetcht 1 ,mem_mbutton_gpio 
-054d 6fe0c647 fetch 1 ,mem_bk_button_gpio 
-054e 98467c00 isub temp ,null 
-054f 20228552 branch p_mouse_ghost_key_lfw_mbk ,zero 
+0547 6848c645 fetcht 1 ,mem_mbutton_gpio 
+0548 6fe0c647 fetch 1 ,mem_bk_button_gpio 
+0549 98467c00 isub temp ,null 
+054a 2022854d branch p_mouse_ghost_key_lfw_mbk ,zero 
 
 p_mouse_ghost_key_lfw_rbk:
-0550 2040055c call p_mouse_ghost_key_check_l_fw 
-0551 20200544 branch p_mouse_ghost_key_rbk 
+054b 20400557 call p_mouse_ghost_key_check_l_fw 
+054c 2020053f branch p_mouse_ghost_key_rbk 
 
 p_mouse_ghost_key_lfw_mbk:
-0552 2040055c call p_mouse_ghost_key_check_l_fw 
-0553 20400558 call p_mouse_ghost_key_check_m_bk 
-0554 202057e5 branch mouse_ghost_key_check_next 
+054d 20400557 call p_mouse_ghost_key_check_l_fw 
+054e 20400553 call p_mouse_ghost_key_check_m_bk 
+054f 202057e5 branch mouse_ghost_key_check_next 
 
 p_mouse_ghost_key_mbk_rfw:
-0555 20400558 call p_mouse_ghost_key_check_m_bk 
+0550 20400553 call p_mouse_ghost_key_check_m_bk 
 
 p_mouse_ghost_key_rfw:
-0556 2040055e call p_mouse_ghost_key_check_r_fw 
-0557 202057e5 branch mouse_ghost_key_check_next 
+0551 20400559 call p_mouse_ghost_key_check_r_fw 
+0552 202057e5 branch mouse_ghost_key_check_next 
 
 p_mouse_ghost_key_check_m_bk:
-0558 1a417e12 and regb ,mouse_m_bk_button ,pdata 
-0559 202057f3 branch mouse_ghost_key_check_m_bk + 1 
+0553 1a417e12 and regb ,mouse_m_bk_button ,pdata 
+0554 202057f3 branch mouse_ghost_key_check_m_bk + 1 
 
 p_mouse_ghost_key_check_r_bk:
-055a 1a417e0a and regb ,mouse_r_bk_button ,pdata 
-055b 202057f6 branch mouse_ghost_key_check_r_bk + 1 
+0555 1a417e0a and regb ,mouse_r_bk_button ,pdata 
+0556 202057f6 branch mouse_ghost_key_check_r_bk + 1 
 
 p_mouse_ghost_key_check_l_fw:
-055c 1a417e11 and regb ,mouse_l_fw_button ,pdata 
-055d 202057f9 branch mouse_ghost_key_check_l_fw + 1 
+0557 1a417e11 and regb ,mouse_l_fw_button ,pdata 
+0558 202057f9 branch mouse_ghost_key_check_l_fw + 1 
 
 p_mouse_ghost_key_check_r_fw:
-055e 1a417e12 and regb ,mouse_r_fw_button ,pdata 
-055f 202057ff branch mouse_ghost_key_check_r_fw + 1 
+0559 1a417e12 and regb ,mouse_r_fw_button ,pdata 
+055a 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/program/patch.prog	(revision 5442)
+++ /1121s/branch/mouse/ZXS_Project/1m/mouse_public_switch_221-v10-new/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,6 @@
 	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_5,p_mouse_24g_hibernate_set
 	beq patch12_6,p_mouse_24g_package_data
 	beq patch18_5,p_otp_read_data
@@ -1922,48 +1922,49 @@
 	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
@@ -1972,11 +1973,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
 	fetch 1,mem_fire_key_flag
@@ -2303,52 +2299,12 @@
 	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
+	call 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/sched/mouse.dat	(revision 5442)
+++ /1121s/branch/mouse/ZXS_Project/1m/mouse_public_switch_221-v10-new/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
