Index: format/app_dongle.format
===================================================================
--- /branch/keyboard/customer_FW/RY_project/RY_Dongle/format/app_dongle.format	(revision 1984)
+++ /branch/keyboard/customer_FW/RY_project/RY_Dongle/format/app_dongle.format	(working copy)
@@ -197,6 +197,7 @@
 )
 
 (
+0xF3 CMD_GET_DPI
 0xF4 CMD_SET_REPORT
 0xF5 CMD_SET_DPI
 0xF6 CMD_SET
Index: output/eeprom.dat
===================================================================
--- /branch/keyboard/customer_FW/RY_project/RY_Dongle/output/eeprom.dat	(revision 1984)
+++ /branch/keyboard/customer_FW/RY_project/RY_Dongle/output/eeprom.dat	(working copy)
@@ -2,7 +2,7 @@
 02
 aa
 55
-da
+e6
 10
 c2
 84
@@ -2375,7 +2375,7 @@
 58
 00
 03
-d9
+dc
 67
 e1
 45
@@ -2383,7 +2383,7 @@
 58
 00
 04
-1f
+22
 67
 e1
 45
@@ -3575,39 +3575,43 @@
 c0
 7b
 83
-9e
+a1
 c0
 7b
 03
-ac
+af
 c0
 7a
 83
-8e
+8f
+c0
+79
+83
+9f
 c0
 7a
 03
-98
+99
 c0
 7e
 03
-af
+b2
 c0
 7f
 03
-b5
+b8
 c0
 3d
 03
-b8
+bb
 c0
 50
 03
-c0
+c3
 c0
 50
 83
-ce
+d1
 20
 20
 48
@@ -3655,7 +3659,7 @@
 20
 40
 03
-86
+87
 6f
 e0
 88
@@ -3683,7 +3687,7 @@
 20
 20
 03
-89
+8a
 6f
 e0
 88
@@ -3695,7 +3699,7 @@
 20
 40
 03
-86
+87
 6f
 e0
 88
@@ -3707,7 +3711,15 @@
 20
 20
 03
-95
+96
+70
+49
+52
+01
+20
+20
+04
+0a
 58
 00
 00
@@ -3763,7 +3775,7 @@
 20
 20
 04
-16
+19
 6f
 e0
 88
@@ -3955,15 +3967,15 @@
 c2
 83
 04
-01
+04
 c2
 83
 84
-0e
+11
 c2
 82
 84
-11
+14
 6f
 e0
 c5
@@ -3975,11 +3987,11 @@
 20
 22
 83
-ee
+f1
 20
 40
 03
-ee
+f1
 6f
 e0
 c5
@@ -4015,15 +4027,15 @@
 c2
 83
 04
-01
+04
 c2
 83
 84
-0e
+11
 c2
 82
 84
-11
+14
 20
 60
 00
@@ -4086,8 +4098,8 @@
 00
 24
 22
-83
-ff
+84
+02
 6f
 e3
 49
@@ -4103,7 +4115,7 @@
 20
 20
 04
-16
+19
 6f
 e0
 c7
@@ -4126,6 +4138,10 @@
 00
 70
 49
+52
+00
+70
+49
 4e
 40
 70
@@ -4145,17 +4161,13 @@
 c9
 51
 70
-49
-52
-00
-70
 09
 0c
 23
 20
 20
 04
-16
+19
 6f
 e0
 c7
@@ -4231,15 +4243,15 @@
 c0
 00
 04
-24
+27
 c0
 01
 04
-2a
+2d
 c0
 01
 84
-2d
+30
 20
 20
 33
@@ -4307,7 +4319,7 @@
 c2
 00
 04
-31
+34
 1a
 21
 22
@@ -4316,8 +4328,8 @@
 60
 00
 00
-f7
-1f
+66
+7c
 aa
 55
 40
@@ -4930,20 +4942,8 @@
 55
 56
 80
-10
-b3
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
+9d
+37
 ff
 ff
 ff
@@ -8188,5 +8188,5 @@
 ff
 ff
 ff
-a2
-7a
+21
+3c
Index: output/flash.dat
===================================================================
--- /branch/keyboard/customer_FW/RY_project/RY_Dongle/output/flash.dat	(revision 1984)
+++ /branch/keyboard/customer_FW/RY_project/RY_Dongle/output/flash.dat	(working copy)
@@ -2,7 +2,7 @@
 02
 aa
 55
-da
+e6
 10
 c2
 84
@@ -2375,7 +2375,7 @@
 58
 00
 03
-d9
+dc
 67
 e1
 45
@@ -2383,7 +2383,7 @@
 58
 00
 04
-1f
+22
 67
 e1
 45
@@ -3575,39 +3575,43 @@
 c0
 7b
 83
-9e
+a1
 c0
 7b
 03
-ac
+af
 c0
 7a
 83
-8e
+8f
+c0
+79
+83
+9f
 c0
 7a
 03
-98
+99
 c0
 7e
 03
-af
+b2
 c0
 7f
 03
-b5
+b8
 c0
 3d
 03
-b8
+bb
 c0
 50
 03
-c0
+c3
 c0
 50
 83
-ce
+d1
 20
 20
 48
@@ -3655,7 +3659,7 @@
 20
 40
 03
-86
+87
 6f
 e0
 88
@@ -3683,7 +3687,7 @@
 20
 20
 03
-89
+8a
 6f
 e0
 88
@@ -3695,7 +3699,7 @@
 20
 40
 03
-86
+87
 6f
 e0
 88
@@ -3707,7 +3711,15 @@
 20
 20
 03
-95
+96
+70
+49
+52
+01
+20
+20
+04
+0a
 58
 00
 00
@@ -3763,7 +3775,7 @@
 20
 20
 04
-16
+19
 6f
 e0
 88
@@ -3955,15 +3967,15 @@
 c2
 83
 04
-01
+04
 c2
 83
 84
-0e
+11
 c2
 82
 84
-11
+14
 6f
 e0
 c5
@@ -3975,11 +3987,11 @@
 20
 22
 83
-ee
+f1
 20
 40
 03
-ee
+f1
 6f
 e0
 c5
@@ -4015,15 +4027,15 @@
 c2
 83
 04
-01
+04
 c2
 83
 84
-0e
+11
 c2
 82
 84
-11
+14
 20
 60
 00
@@ -4086,8 +4098,8 @@
 00
 24
 22
-83
-ff
+84
+02
 6f
 e3
 49
@@ -4103,7 +4115,7 @@
 20
 20
 04
-16
+19
 6f
 e0
 c7
@@ -4126,6 +4138,10 @@
 00
 70
 49
+52
+00
+70
+49
 4e
 40
 70
@@ -4145,17 +4161,13 @@
 c9
 51
 70
-49
-52
-00
-70
 09
 0c
 23
 20
 20
 04
-16
+19
 6f
 e0
 c7
@@ -4231,15 +4243,15 @@
 c0
 00
 04
-24
+27
 c0
 01
 04
-2a
+2d
 c0
 01
 84
-2d
+30
 20
 20
 33
@@ -4307,7 +4319,7 @@
 c2
 00
 04
-31
+34
 1a
 21
 22
@@ -4316,8 +4328,8 @@
 60
 00
 00
-f7
-1f
+66
+7c
 aa
 55
 40
@@ -4930,20 +4942,8 @@
 55
 56
 80
-10
-b3
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
+9d
+37
 ff
 ff
 ff
@@ -8188,5 +8188,5 @@
 ff
 ff
 ff
-a2
-7a
+21
+3c
Index: output/otp.dat
===================================================================
--- /branch/keyboard/customer_FW/RY_project/RY_Dongle/output/otp.dat	(revision 1984)
+++ /branch/keyboard/customer_FW/RY_project/RY_Dongle/output/otp.dat	(working copy)
@@ -11,7 +11,7 @@
 00
 aa
 55
-da
+e6
 10
 c2
 84
@@ -2384,7 +2384,7 @@
 58
 00
 03
-d9
+dc
 67
 e1
 45
@@ -2392,7 +2392,7 @@
 58
 00
 04
-1f
+22
 67
 e1
 45
@@ -3584,39 +3584,43 @@
 c0
 7b
 83
-9e
+a1
 c0
 7b
 03
-ac
+af
 c0
 7a
 83
-8e
+8f
+c0
+79
+83
+9f
 c0
 7a
 03
-98
+99
 c0
 7e
 03
-af
+b2
 c0
 7f
 03
-b5
+b8
 c0
 3d
 03
-b8
+bb
 c0
 50
 03
-c0
+c3
 c0
 50
 83
-ce
+d1
 20
 20
 48
@@ -3664,7 +3668,7 @@
 20
 40
 03
-86
+87
 6f
 e0
 88
@@ -3692,7 +3696,7 @@
 20
 20
 03
-89
+8a
 6f
 e0
 88
@@ -3704,7 +3708,7 @@
 20
 40
 03
-86
+87
 6f
 e0
 88
@@ -3716,7 +3720,15 @@
 20
 20
 03
-95
+96
+70
+49
+52
+01
+20
+20
+04
+0a
 58
 00
 00
@@ -3772,7 +3784,7 @@
 20
 20
 04
-16
+19
 6f
 e0
 88
@@ -3964,15 +3976,15 @@
 c2
 83
 04
-01
+04
 c2
 83
 84
-0e
+11
 c2
 82
 84
-11
+14
 6f
 e0
 c5
@@ -3984,11 +3996,11 @@
 20
 22
 83
-ee
+f1
 20
 40
 03
-ee
+f1
 6f
 e0
 c5
@@ -4024,15 +4036,15 @@
 c2
 83
 04
-01
+04
 c2
 83
 84
-0e
+11
 c2
 82
 84
-11
+14
 20
 60
 00
@@ -4095,8 +4107,8 @@
 00
 24
 22
-83
-ff
+84
+02
 6f
 e3
 49
@@ -4112,7 +4124,7 @@
 20
 20
 04
-16
+19
 6f
 e0
 c7
@@ -4135,6 +4147,10 @@
 00
 70
 49
+52
+00
+70
+49
 4e
 40
 70
@@ -4154,17 +4170,13 @@
 c9
 51
 70
-49
-52
-00
-70
 09
 0c
 23
 20
 20
 04
-16
+19
 6f
 e0
 c7
@@ -4240,15 +4252,15 @@
 c0
 00
 04
-24
+27
 c0
 01
 04
-2a
+2d
 c0
 01
 84
-2d
+30
 20
 20
 33
@@ -4316,7 +4328,7 @@
 c2
 00
 04
-31
+34
 1a
 21
 22
@@ -4325,8 +4337,8 @@
 60
 00
 00
-f7
-1f
+66
+7c
 aa
 55
 40
@@ -4939,6 +4951,6 @@
 55
 56
 80
-10
-b3
+9d
+37
 21
Index: output/program.lis
===================================================================
--- /branch/keyboard/customer_FW/RY_project/RY_Dongle/output/program.lis	(revision 1984)
+++ /branch/keyboard/customer_FW/RY_project/RY_Dongle/output/program.lis	(working copy)
@@ -750,9 +750,9 @@
 p_app_init:
 024e 58000353 setarg p_dongle_dispatch 
 024f 67e145e0 store 2 ,mem_cb_24g_receive_process 
-0250 580003d9 setarg p_dongle_g24_mouse 
+0250 580003dc setarg p_dongle_g24_mouse 
 0251 67e145e4 store 2 ,mem_cb_24g_data_device1 
-0252 5800041f setarg p_dongle_g24_kb 
+0252 58000422 setarg p_dongle_g24_kb 
 0253 67e145e6 store 2 ,mem_cb_24g_data_device2 
 0254 58000259 setarg p_dongle_ackpayload_prep 
 0255 67e145e2 store 2 ,mem_cb_24g_ackpayload 
@@ -1146,250 +1146,255 @@
 0379 207a0000 rtn blank 
 037a 7008f700 jam 0 ,mem_usb0_get_set_report 
 037b 6fe08875 fetch 1 ,mem_usb0_set_report_data 
-037c c07b839e beq cmd_check_status ,p_dongle_dispose_cmd_check_status 
-037d c07b03ac beq cmd_set ,p_dongle_dispose_cmd_set 
-037e c07a838e beq cmd_set_dpi ,p_dongle_dispose_ms_cmd_set_dpi 
-037f c07a0398 beq cmd_set_report ,p_dongle_dispose_ms_cmd_set_report 
-0380 c07e03af beq cmd_get_in_data ,p_dongle_dispose_cmd_get_in_data 
-0381 c07f03b5 beq cmd_get_translen ,p_dongle_dispose_cmd_get_translen 
-0382 c03d03b8 beq cmd_set_test ,p_dongle_dispose_cmd_set_test 
-0383 c05003c0 beq cmd_set_key_matrix ,p_dongle_dispose_cmd_set_key_matrix 
-0384 c05083ce beq cmd_get_key_matrix ,p_dongle_dispose_cmd_get_key_matrix 
-0385 20204875 branch dongle_usb_dispatch_next 
+037c c07b83a1 beq cmd_check_status ,p_dongle_dispose_cmd_check_status 
+037d c07b03af beq cmd_set ,p_dongle_dispose_cmd_set 
+037e c07a838f beq cmd_set_dpi ,p_dongle_dispose_ms_cmd_set_dpi 
+037f c079839f beq cmd_get_dpi ,p_dongle_dispose_cmd_get_dpi 
+0380 c07a0399 beq cmd_set_report ,p_dongle_dispose_ms_cmd_set_report 
+0381 c07e03b2 beq cmd_get_in_data ,p_dongle_dispose_cmd_get_in_data 
+0382 c07f03b8 beq cmd_get_translen ,p_dongle_dispose_cmd_get_translen 
+0383 c03d03bb beq cmd_set_test ,p_dongle_dispose_cmd_set_test 
+0384 c05003c3 beq cmd_set_key_matrix ,p_dongle_dispose_cmd_set_key_matrix 
+0385 c05083d1 beq cmd_get_key_matrix ,p_dongle_dispose_cmd_get_key_matrix 
+0386 20204875 branch dongle_usb_dispatch_next 
 
 p_dongle_ms_ep2_ack_data_clr:
-0386 df200041 arg 65 ,loopcnt 
-0387 d8a04a4e arg mem_dongle_ms_ep2_ack_data ,contw 
-0388 20207ca1 branch clear_mem 
+0387 df200041 arg 65 ,loopcnt 
+0388 d8a04a4e arg mem_dongle_ms_ep2_ack_data ,contw 
+0389 20207ca1 branch clear_mem 
 
 p_dongle_ms_ep2_ack_data_copy:
-0389 704a4d01 jam 1 ,mem_dongle_ms_ep2_ack_data_flag 
-038a 70461108 jam protocol_ackpayload ,mem_24g_ackpayload_enable 
-038b d8c00875 arg mem_usb0_set_report_data ,contr 
-038c d8a04a4f arg mem_dongle_ms_ep2_ack_data + 1 ,contw 
-038d 20207cda branch memcpy 
+038a 704a4d01 jam 1 ,mem_dongle_ms_ep2_ack_data_flag 
+038b 70461108 jam protocol_ackpayload ,mem_24g_ackpayload_enable 
+038c d8c00875 arg mem_usb0_set_report_data ,contr 
+038d d8a04a4f arg mem_dongle_ms_ep2_ack_data + 1 ,contw 
+038e 20207cda branch memcpy 
 
 p_dongle_dispose_ms_cmd_set_dpi:
-038e 6fe08876 fetch 1 ,mem_usb0_set_report_data + 1 
-038f c1828000 rtnne ms_type 
-0390 20400386 call p_dongle_ms_ep2_ack_data_clr 
-0391 6fe08876 fetch 1 ,mem_usb0_set_report_data + 1 
-0392 67e0ca4c store 1 ,mem_24g_device_type 
-0393 6fe08877 fetch 1 ,mem_usb0_set_report_data + 2 
-0394 67e0c94d store 1 ,mem_dg_mouse_dpi_level 
+038f 6fe08876 fetch 1 ,mem_usb0_set_report_data + 1 
+0390 c1828000 rtnne ms_type 
+0391 20400387 call p_dongle_ms_ep2_ack_data_clr 
+0392 6fe08876 fetch 1 ,mem_usb0_set_report_data + 1 
+0393 67e0ca4c store 1 ,mem_24g_device_type 
+0394 6fe08877 fetch 1 ,mem_usb0_set_report_data + 2 
+0395 67e0c94d store 1 ,mem_dg_mouse_dpi_level 
 
 p_dongle_ms_ack_data_copy:
-0395 704a4e04 jam 4 ,mem_dongle_ms_ep2_ack_data 
-0396 df200004 arg 4 ,loopcnt 
-0397 20200389 branch p_dongle_ms_ep2_ack_data_copy 
+0396 704a4e04 jam 4 ,mem_dongle_ms_ep2_ack_data 
+0397 df200004 arg 4 ,loopcnt 
+0398 2020038a branch p_dongle_ms_ep2_ack_data_copy 
 
 p_dongle_dispose_ms_cmd_set_report:
-0398 6fe08876 fetch 1 ,mem_usb0_set_report_data + 1 
-0399 c1828000 rtnne ms_type 
-039a 20400386 call p_dongle_ms_ep2_ack_data_clr 
-039b 6fe08876 fetch 1 ,mem_usb0_set_report_data + 1 
-039c 67e0ca4c store 1 ,mem_24g_device_type 
-039d 20200395 branch p_dongle_ms_ack_data_copy 
+0399 6fe08876 fetch 1 ,mem_usb0_set_report_data + 1 
+039a c1828000 rtnne ms_type 
+039b 20400387 call p_dongle_ms_ep2_ack_data_clr 
+039c 6fe08876 fetch 1 ,mem_usb0_set_report_data + 1 
+039d 67e0ca4c store 1 ,mem_24g_device_type 
+039e 20200396 branch p_dongle_ms_ack_data_copy 
+
+p_dongle_dispose_cmd_get_dpi:
+039f 70495201 jam 1 ,mem_usb_dpi_info_data + 4 
+03a0 2020040a branch p_dongle_usb_tx_dpi_level_enable 
 
 p_dongle_dispose_cmd_check_status:
-039e 58000064 setarg 0x64 
-039f 67e0ca0b store 1 ,mem_dg_protocol_usb_in_data_buff 
-03a0 58000064 setarg 0x64 
-03a1 67e0ca0c store 1 ,mem_dg_protocol_usb_in_data_buff + 1 
-03a2 58000000 setarg 0x00 
-03a3 67e0ca0d store 1 ,mem_dg_protocol_usb_in_data_buff + 2 
-03a4 58000000 setarg 0x00 
-03a5 67e0ca0e store 1 ,mem_dg_protocol_usb_in_data_buff + 3 
-03a6 58000001 setarg 0x01 
-03a7 67e0ca0f store 1 ,mem_dg_protocol_usb_in_data_buff + 4 
-03a8 6fe2458f fetch 4 ,mem_24g_addr 
-03a9 67e24a12 store 4 ,mem_dg_protocol_usb_in_data_buff + 7 
-03aa 70090c24 jam usb_ep2_protocol ,mem_usb_ep2_data 
-03ab 20200416 branch p_dongle_usb_tx_enable_ep2 
+03a1 58000064 setarg 0x64 
+03a2 67e0ca0b store 1 ,mem_dg_protocol_usb_in_data_buff 
+03a3 58000064 setarg 0x64 
+03a4 67e0ca0c store 1 ,mem_dg_protocol_usb_in_data_buff + 1 
+03a5 58000000 setarg 0x00 
+03a6 67e0ca0d store 1 ,mem_dg_protocol_usb_in_data_buff + 2 
+03a7 58000000 setarg 0x00 
+03a8 67e0ca0e store 1 ,mem_dg_protocol_usb_in_data_buff + 3 
+03a9 58000001 setarg 0x01 
+03aa 67e0ca0f store 1 ,mem_dg_protocol_usb_in_data_buff + 4 
+03ab 6fe2458f fetch 4 ,mem_24g_addr 
+03ac 67e24a12 store 4 ,mem_dg_protocol_usb_in_data_buff + 7 
+03ad 70090c24 jam usb_ep2_protocol ,mem_usb_ep2_data 
+03ae 20200419 branch p_dongle_usb_tx_enable_ep2 
 
 p_dongle_dispose_cmd_set:
-03ac 6fe08877 fetch 1 ,mem_usb0_set_report_data + 2 
-03ad 67e0c7ff store 1 ,mem_dg_data_type 
-03ae 20600000 rtn 
+03af 6fe08877 fetch 1 ,mem_usb0_set_report_data + 2 
+03b0 67e0c7ff store 1 ,mem_dg_data_type 
+03b1 20600000 rtn 
 
 p_dongle_dispose_cmd_get_in_data:
-03af 70087500 jam 0 ,mem_usb0_set_report_data 
-03b0 d8c04803 arg mem_dg_usb_get_buff ,contr 
-03b1 d8a008b5 arg mem_usb0_get_report_data ,contw 
-03b2 df200040 arg 64 ,loopcnt 
-03b3 20407ccc call memcpy_fast 
-03b4 2020487a branch dongle_usb0_data_ready_report_set0 
+03b2 70087500 jam 0 ,mem_usb0_set_report_data 
+03b3 d8c04803 arg mem_dg_usb_get_buff ,contr 
+03b4 d8a008b5 arg mem_usb0_get_report_data ,contw 
+03b5 df200040 arg 64 ,loopcnt 
+03b6 20407ccc call memcpy_fast 
+03b7 2020487a branch dongle_usb0_data_ready_report_set0 
 
 p_dongle_dispose_cmd_get_translen:
-03b5 6fe08877 fetch 1 ,mem_usb0_set_report_data + 2 
-03b6 67e0c800 store 1 ,mem_dg_data_len 
-03b7 2020487a branch dongle_usb0_data_ready_report_set0 
+03b8 6fe08877 fetch 1 ,mem_usb0_set_report_data + 2 
+03b9 67e0c800 store 1 ,mem_dg_data_len 
+03ba 2020487a branch dongle_usb0_data_ready_report_set0 
 
 p_dongle_dispose_cmd_set_test:
-03b8 70461602 jam dongle_test ,mem_24g_work_mode 
-03b9 70461500 jam clear_init ,mem_24g_mode_init 
-03ba 6fe08877 fetch 1 ,mem_usb0_set_report_data + 2 
-03bb 67e0c801 store 1 ,mem_dg_test_mode 
-03bc 6fe08878 fetch 1 ,mem_usb0_set_report_data + 3 
-03bd 67e0c802 store 1 ,mem_dg_test_ch 
-03be 7008b601 jam 0x01 ,mem_usb0_get_report_data + 1 
-03bf 20204880 branch dongle_usb0_data_ready_report_set1 
+03bb 70461602 jam dongle_test ,mem_24g_work_mode 
+03bc 70461500 jam clear_init ,mem_24g_mode_init 
+03bd 6fe08877 fetch 1 ,mem_usb0_set_report_data + 2 
+03be 67e0c801 store 1 ,mem_dg_test_mode 
+03bf 6fe08878 fetch 1 ,mem_usb0_set_report_data + 3 
+03c0 67e0c802 store 1 ,mem_dg_test_ch 
+03c1 7008b601 jam 0x01 ,mem_usb0_get_report_data + 1 
+03c2 20204880 branch dongle_usb0_data_ready_report_set1 
 
 p_dongle_dispose_cmd_set_key_matrix:
-03c0 6fe08877 fetch 1 ,mem_usb0_set_report_data + 2 
-03c1 67e0c98f store 1 ,mem_dg_keyboard_keymatrix_profile 
-03c2 6fe08878 fetch 1 ,mem_usb0_set_report_data + 3 
-03c3 67e0c990 store 1 ,mem_dg_keyboard_keymatrix_type 
-03c4 6fe08879 fetch 1 ,mem_usb0_set_report_data + 4 
-03c5 67e0c991 store 1 ,mem_dg_keyboard_keymatrix_page 
-03c6 6fe0887a fetch 1 ,mem_usb0_set_report_data + 5 
-03c7 67e0c992 store 1 ,mem_dg_keyboard_keymatrix_len 
-03c8 1fe27200 copy pdata ,loopcnt 
-03c9 d8c0087e arg mem_usb0_set_report_data + 9 ,contr 
-03ca d8a04993 arg mem_dg_keyboard_keymatrix_setup_keyvalue ,contw 
-03cb 20407ccc call memcpy_fast 
-03cc 7008b601 jam 0x01 ,mem_usb0_get_report_data + 1 
-03cd 20204880 branch dongle_usb0_data_ready_report_set1 
+03c3 6fe08877 fetch 1 ,mem_usb0_set_report_data + 2 
+03c4 67e0c98f store 1 ,mem_dg_keyboard_keymatrix_profile 
+03c5 6fe08878 fetch 1 ,mem_usb0_set_report_data + 3 
+03c6 67e0c990 store 1 ,mem_dg_keyboard_keymatrix_type 
+03c7 6fe08879 fetch 1 ,mem_usb0_set_report_data + 4 
+03c8 67e0c991 store 1 ,mem_dg_keyboard_keymatrix_page 
+03c9 6fe0887a fetch 1 ,mem_usb0_set_report_data + 5 
+03ca 67e0c992 store 1 ,mem_dg_keyboard_keymatrix_len 
+03cb 1fe27200 copy pdata ,loopcnt 
+03cc d8c0087e arg mem_usb0_set_report_data + 9 ,contr 
+03cd d8a04993 arg mem_dg_keyboard_keymatrix_setup_keyvalue ,contw 
+03ce 20407ccc call memcpy_fast 
+03cf 7008b601 jam 0x01 ,mem_usb0_get_report_data + 1 
+03d0 20204880 branch dongle_usb0_data_ready_report_set1 
 
 p_dongle_dispose_cmd_get_key_matrix:
-03ce 6fe08877 fetch 1 ,mem_usb0_set_report_data + 2 
-03cf 67e0c98f store 1 ,mem_dg_keyboard_keymatrix_profile 
-03d0 6fe08878 fetch 1 ,mem_usb0_set_report_data + 3 
-03d1 67e0c990 store 1 ,mem_dg_keyboard_keymatrix_type 
-03d2 6fe08879 fetch 1 ,mem_usb0_set_report_data + 4 
-03d3 67e0c991 store 1 ,mem_dg_keyboard_keymatrix_page 
-03d4 df200040 arg 64 ,loopcnt 
-03d5 d8a049cb arg mem_dg_keyboard_keymatrix_getup_keyvalue ,contw 
-03d6 d8a008b6 arg mem_usb0_get_report_data + 1 ,contw 
-03d7 20407ccc call memcpy_fast 
-03d8 20204880 branch dongle_usb0_data_ready_report_set1 
+03d1 6fe08877 fetch 1 ,mem_usb0_set_report_data + 2 
+03d2 67e0c98f store 1 ,mem_dg_keyboard_keymatrix_profile 
+03d3 6fe08878 fetch 1 ,mem_usb0_set_report_data + 3 
+03d4 67e0c990 store 1 ,mem_dg_keyboard_keymatrix_type 
+03d5 6fe08879 fetch 1 ,mem_usb0_set_report_data + 4 
+03d6 67e0c991 store 1 ,mem_dg_keyboard_keymatrix_page 
+03d7 df200040 arg 64 ,loopcnt 
+03d8 d8a049cb arg mem_dg_keyboard_keymatrix_getup_keyvalue ,contw 
+03d9 d8a008b6 arg mem_usb0_get_report_data + 1 ,contw 
+03da 20407ccc call memcpy_fast 
+03db 20204880 branch dongle_usb0_data_ready_report_set1 
 
 p_dongle_g24_mouse:
-03d9 70461100 jam 0 ,mem_24g_ackpayload_enable 
-03da 6fe0c7b1 fetch 1 ,mem_24g_rxdata_temp_new + 2 
-03db c2830401 bbit1 data_dpi ,p_dongle_receive_ms_dpi_info 
-03dc c283840e bbit1 data_battery ,p_dongle_receive_ms_battery_info 
-03dd c2828411 bbit1 data_heart ,p_dongle_receive_ms_heart_info 
+03dc 70461100 jam 0 ,mem_24g_ackpayload_enable 
+03dd 6fe0c7b1 fetch 1 ,mem_24g_rxdata_temp_new + 2 
+03de c2830404 bbit1 data_dpi ,p_dongle_receive_ms_dpi_info 
+03df c2838411 bbit1 data_battery ,p_dongle_receive_ms_battery_info 
+03e0 c2828414 bbit1 data_heart ,p_dongle_receive_ms_heart_info 
 
 p_dongle_g24_mouse_next:
-03de 6fe0c57d fetch 1 ,mem_24g_rxdata_length 
-03df 1fe67c09 sub pdata ,0x09 ,null 
-03e0 202283ee branch p_dongle_g24_mouse_data ,zero 
-03e1 204003ee call p_dongle_g24_mouse_data 
-03e2 6fe0c57d fetch 1 ,mem_24g_rxdata_length 
-03e3 1fe0fff8 add pdata ,-8 ,pdata 
-03e4 67e0c57d store 1 ,mem_24g_rxdata_length 
-03e5 1fe27200 copy pdata ,loopcnt 
-03e6 d8a047b1 arg mem_24g_rxdata_temp_new + 2 ,contw 
-03e7 d8c047b9 arg mem_24g_rxdata_temp_new + 10 ,contr 
-03e8 20407cda call memcpy 
-03e9 6fe0c7b1 fetch 1 ,mem_24g_rxdata_temp_new + 2 
-03ea c2830401 bbit1 data_dpi ,p_dongle_receive_ms_dpi_info 
-03eb c283840e bbit1 data_battery ,p_dongle_receive_ms_battery_info 
-03ec c2828411 bbit1 data_heart ,p_dongle_receive_ms_heart_info 
-03ed 20600000 rtn 
+03e1 6fe0c57d fetch 1 ,mem_24g_rxdata_length 
+03e2 1fe67c09 sub pdata ,0x09 ,null 
+03e3 202283f1 branch p_dongle_g24_mouse_data ,zero 
+03e4 204003f1 call p_dongle_g24_mouse_data 
+03e5 6fe0c57d fetch 1 ,mem_24g_rxdata_length 
+03e6 1fe0fff8 add pdata ,-8 ,pdata 
+03e7 67e0c57d store 1 ,mem_24g_rxdata_length 
+03e8 1fe27200 copy pdata ,loopcnt 
+03e9 d8a047b1 arg mem_24g_rxdata_temp_new + 2 ,contw 
+03ea d8c047b9 arg mem_24g_rxdata_temp_new + 10 ,contr 
+03eb 20407cda call memcpy 
+03ec 6fe0c7b1 fetch 1 ,mem_24g_rxdata_temp_new + 2 
+03ed c2830404 bbit1 data_dpi ,p_dongle_receive_ms_dpi_info 
+03ee c2838411 bbit1 data_battery ,p_dongle_receive_ms_battery_info 
+03ef c2828414 bbit1 data_heart ,p_dongle_receive_ms_heart_info 
+03f0 20600000 rtn 
 
 p_dongle_g24_mouse_data:
-03ee 58000001 setarg ms_report_id 
-03ef 67e08913 store 1 ,mem_usb_mouse_data 
-03f0 6fe3c7b2 fetch 7 ,mem_24g_rxdata_temp_new + 3 
-03f1 e7e38005 istore 7 ,contw 
-03f2 6fe0c7b2 fetch 1 ,mem_24g_rxdata_temp_new + 3 
-03f3 245a48dd ncall dongle_g24_ms_enable_blank_data_forcibly ,blank 
-03f4 6fe0c7b2 fetch 1 ,mem_24g_rxdata_temp_new + 3 
-03f5 205a48e1 call dongle_g24_ms_disable_blank_data_forcibly ,blank 
-03f6 6fe38914 fetch 7 ,mem_usb_mouse_data + 1 
-03f7 67e3c945 store 7 ,mem_dg_mouse_data 
-03f8 6fe0c945 fetch 1 ,mem_dg_mouse_data 
-03f9 6848c94c fetcht 1 ,mem_dg_mouse_key_data_last 
-03fa 67e0c94c store 1 ,mem_dg_mouse_key_data_last 
-03fb 98467c00 isub temp ,null 
-03fc 242283ff nbranch p_dongle_mouse_data_tx_enable ,zero 
+03f1 58000001 setarg ms_report_id 
+03f2 67e08913 store 1 ,mem_usb_mouse_data 
+03f3 6fe3c7b2 fetch 7 ,mem_24g_rxdata_temp_new + 3 
+03f4 e7e38005 istore 7 ,contw 
+03f5 6fe0c7b2 fetch 1 ,mem_24g_rxdata_temp_new + 3 
+03f6 245a48dd ncall dongle_g24_ms_enable_blank_data_forcibly ,blank 
+03f7 6fe0c7b2 fetch 1 ,mem_24g_rxdata_temp_new + 3 
+03f8 205a48e1 call dongle_g24_ms_disable_blank_data_forcibly ,blank 
+03f9 6fe38914 fetch 7 ,mem_usb_mouse_data + 1 
+03fa 67e3c945 store 7 ,mem_dg_mouse_data 
+03fb 6fe0c945 fetch 1 ,mem_dg_mouse_data 
+03fc 6848c94c fetcht 1 ,mem_dg_mouse_key_data_last 
+03fd 67e0c94c store 1 ,mem_dg_mouse_key_data_last 
+03fe 98467c00 isub temp ,null 
+03ff 24228402 nbranch p_dongle_mouse_data_tx_enable ,zero 
 
 p_dongle_receive_mouse_data_check:
-03fd 6fe34946 fetch 6 ,mem_dg_mouse_data + 1 
-03fe 207a0000 rtn blank 
+0400 6fe34946 fetch 6 ,mem_dg_mouse_data + 1 
+0401 207a0000 rtn blank 
 
 p_dongle_mouse_data_tx_enable:
-03ff 70090c20 jam usb_ep2_ms ,mem_usb_ep2_data 
-0400 20200416 branch p_dongle_usb_tx_enable_ep2 
+0402 70090c20 jam usb_ep2_ms ,mem_usb_ep2_data 
+0403 20200419 branch p_dongle_usb_tx_enable_ep2 
 
 p_dongle_receive_ms_dpi_info:
-0401 6fe0c7b2 fetch 1 ,mem_24g_rxdata_temp_new + 3 
-0402 6848c94d fetcht 1 ,mem_dg_mouse_dpi_level 
-0403 67e0c94d store 1 ,mem_dg_mouse_dpi_level 
-0404 98467c00 isub temp ,null 
-0405 20628000 rtn zero 
+0404 6fe0c7b2 fetch 1 ,mem_24g_rxdata_temp_new + 3 
+0405 6848c94d fetcht 1 ,mem_dg_mouse_dpi_level 
+0406 67e0c94d store 1 ,mem_dg_mouse_dpi_level 
+0407 98467c00 isub temp ,null 
+0408 20628000 rtn zero 
+0409 70495200 jam 0 ,mem_usb_dpi_info_data + 4 
 
 p_dongle_usb_tx_dpi_level_enable:
-0406 70494e40 jam 0x40 ,mem_usb_dpi_info_data 
-0407 70494fa1 jam report_id_data_in ,mem_usb_dpi_info_data + 1 
-0408 70495005 jam ms_type ,mem_usb_dpi_info_data + 2 
-0409 6fe0c94d fetch 1 ,mem_dg_mouse_dpi_level 
-040a 67e0c951 store 1 ,mem_usb_dpi_info_data + 3 
-040b 70495200 jam 0 ,mem_usb_dpi_info_data + 4 
-040c 70090c23 jam usb_ep2_dpi ,mem_usb_ep2_data 
-040d 20200416 branch p_dongle_usb_tx_enable_ep2 
+040a 70494e40 jam 0x40 ,mem_usb_dpi_info_data 
+040b 70494fa1 jam report_id_data_in ,mem_usb_dpi_info_data + 1 
+040c 70495005 jam ms_type ,mem_usb_dpi_info_data + 2 
+040d 6fe0c94d fetch 1 ,mem_dg_mouse_dpi_level 
+040e 67e0c951 store 1 ,mem_usb_dpi_info_data + 3 
+040f 70090c23 jam usb_ep2_dpi ,mem_usb_ep2_data 
+0410 20200419 branch p_dongle_usb_tx_enable_ep2 
 
 p_dongle_receive_ms_battery_info:
-040e 6fe0c7b2 fetch 1 ,mem_24g_rxdata_temp_new + 3 
-040f 67e0c7f7 store 1 ,mem_dg_mouse_battery_level 
-0410 20600000 rtn 
+0411 6fe0c7b2 fetch 1 ,mem_24g_rxdata_temp_new + 3 
+0412 67e0c7f7 store 1 ,mem_dg_mouse_battery_level 
+0413 20600000 rtn 
 
 p_dongle_receive_ms_heart_info:
-0411 6fe0ca4d fetch 1 ,mem_dongle_ms_ep2_ack_data_flag 
-0412 207a0000 rtn blank 
-0413 704a4d00 jam 0 ,mem_dongle_ms_ep2_ack_data_flag 
+0414 6fe0ca4d fetch 1 ,mem_dongle_ms_ep2_ack_data_flag 
+0415 207a0000 rtn blank 
+0416 704a4d00 jam 0 ,mem_dongle_ms_ep2_ack_data_flag 
 
 p_24g_ackpayload_enable_set:
-0414 70461108 jam protocol_ackpayload ,mem_24g_ackpayload_enable 
-0415 20600000 rtn 
+0417 70461108 jam protocol_ackpayload ,mem_24g_ackpayload_enable 
+0418 20600000 rtn 
 
 p_dongle_usb_tx_enable_ep2:
-0416 6fe0890e fetch 1 ,mem_usb_device_enumeration_endflag 
-0417 207a0000 rtn blank 
-0418 da20493d arg mem_usb_ep2_fifo ,rega 
-0419 20407da5 call fifo_is_full 
-041a 247a0000 nrtn blank 
-041b 6fe0890c fetch 1 ,mem_usb_ep2_data 
-041c 67e0866f store 1 ,mem_fifo_temp 
-041d da20493d arg mem_usb_ep2_fifo ,rega 
-041e 20207d8b branch fifo_in 
+0419 6fe0890e fetch 1 ,mem_usb_device_enumeration_endflag 
+041a 207a0000 rtn blank 
+041b da20493d arg mem_usb_ep2_fifo ,rega 
+041c 20407da5 call fifo_is_full 
+041d 247a0000 nrtn blank 
+041e 6fe0890c fetch 1 ,mem_usb_ep2_data 
+041f 67e0866f store 1 ,mem_fifo_temp 
+0420 da20493d arg mem_usb_ep2_fifo ,rega 
+0421 20207d8b branch fifo_in 
 
 p_dongle_g24_kb:
-041f 6fe0c7b2 fetch 1 ,mem_24g_rxdata_temp_new + 3 
-0420 c0000424 beq 0 ,p_dongle_g24_kb_type0 
-0421 c001042a beq 2 ,p_dongle_g24_kb_type2 
-0422 c001842d beq 3 ,p_dongle_g24_kb_type3 
-0423 202033be branch g24_rx_interrupt_clear 
+0422 6fe0c7b2 fetch 1 ,mem_24g_rxdata_temp_new + 3 
+0423 c0000427 beq 0 ,p_dongle_g24_kb_type0 
+0424 c001042d beq 2 ,p_dongle_g24_kb_type2 
+0425 c0018430 beq 3 ,p_dongle_g24_kb_type3 
+0426 202033be branch g24_rx_interrupt_clear 
 
 p_dongle_g24_kb_type0:
-0424 6fe0c7b4 fetch 1 ,mem_24g_rxdata_temp_new + 5 
-0425 67e0c611 store 1 ,mem_24g_ackpayload_enable 
-0426 7047b400 jam 0 ,mem_24g_rxdata_temp_new + 5 
-0427 d8a00923 arg mem_usb_kb_data ,contw 
-0428 d8c047b3 arg mem_24g_rxdata_temp_new + 4 ,contr 
-0429 202048ef branch dongle_g24_kb_type0 + 5 
+0427 6fe0c7b4 fetch 1 ,mem_24g_rxdata_temp_new + 5 
+0428 67e0c611 store 1 ,mem_24g_ackpayload_enable 
+0429 7047b400 jam 0 ,mem_24g_rxdata_temp_new + 5 
+042a d8a00923 arg mem_usb_kb_data ,contw 
+042b d8c047b3 arg mem_24g_rxdata_temp_new + 4 ,contr 
+042c 202048ef branch dongle_g24_kb_type0 + 5 
 
 p_dongle_g24_kb_type2:
-042a d8a00943 arg mem_usb_kb_system ,contw 
-042b d8c047b2 arg mem_24g_rxdata_temp_new + 3 ,contr 
-042c 2020491f branch dongle_g24_kb_type2 + 2 
+042d d8a00943 arg mem_usb_kb_system ,contw 
+042e d8c047b2 arg mem_24g_rxdata_temp_new + 3 ,contr 
+042f 2020491f branch dongle_g24_kb_type2 + 2 
 
 p_dongle_g24_kb_type3:
-042d d8a00933 arg mem_usb_kb_multikey ,contw 
-042e d8c047b2 arg mem_24g_rxdata_temp_new + 3 ,contr 
-042f 20204907 branch dongle_g24_kb_type3 + 2 
+0430 d8a00933 arg mem_usb_kb_multikey ,contw 
+0431 d8c047b2 arg mem_24g_rxdata_temp_new + 3 ,contr 
+0432 20204907 branch dongle_g24_kb_type3 + 2 
 
 p_checksum_calcu:
-0430 da200000 arg 0 ,rega 
+0433 da200000 arg 0 ,rega 
 
 p_dongle_data_checksum:
-0431 efe08006 ifetch 1 ,contr 
-0432 9a20a200 iadd rega ,rega 
-0433 c2000431 loop p_dongle_data_checksum 
-0434 1a2122ff and_into 0xff ,rega 
-0435 20600000 rtn 
+0434 efe08006 ifetch 1 ,contr 
+0435 9a20a200 iadd rega ,rega 
+0436 c2000434 loop p_dongle_data_checksum 
+0437 1a2122ff and_into 0xff ,rega 
+0438 20600000 rtn 
               org 0x2000
 
 start:
Index: program/patch.prog
===================================================================
--- /branch/keyboard/customer_FW/RY_project/RY_Dongle/program/patch.prog	(revision 1984)
+++ /branch/keyboard/customer_FW/RY_project/RY_Dongle/program/patch.prog	(working copy)
@@ -1180,6 +1180,7 @@
 	beq CMD_CHECK_STATUS,p_dongle_dispose_cmd_check_status
 	beq CMD_SET,p_dongle_dispose_cmd_set
 	beq CMD_SET_DPI,p_dongle_dispose_ms_cmd_set_dpi
+	beq CMD_GET_DPI,p_dongle_dispose_cmd_get_dpi
 	beq CMD_SET_REPORT,p_dongle_dispose_ms_cmd_set_report
 	beq CMD_GET_IN_DATA,p_dongle_dispose_cmd_get_in_data
 	beq CMD_GET_TRANSLEN,p_dongle_dispose_cmd_get_translen
@@ -1227,6 +1228,10 @@
 	store 1,mem_24g_device_type
 	branch p_dongle_ms_ack_data_copy
 
+p_dongle_dispose_cmd_get_dpi:
+	jam 1,mem_usb_dpi_info_data+4
+	branch p_dongle_usb_tx_dpi_level_enable
+
 p_dongle_dispose_cmd_check_status:
 	//fetch 1,mem_dg_keyboard_battery_level
 	setarg 0x64
@@ -1377,13 +1382,13 @@
 	store 1,mem_dg_mouse_dpi_level
 	isub temp,null
 	rtn zero
+	jam 0,mem_usb_dpi_info_data+4
 p_dongle_usb_tx_dpi_level_enable:
 	jam 0x40,mem_usb_dpi_info_data
 	jam REPORT_ID_DATA_IN,mem_usb_dpi_info_data+1
 	jam MS_TYPE,mem_usb_dpi_info_data+2
 	fetch 1,mem_dg_mouse_dpi_level
 	store 1,mem_usb_dpi_info_data+3
-	jam 0,mem_usb_dpi_info_data+4
 	jam USB_EP2_DPI,mem_usb_ep2_data
 	branch p_dongle_usb_tx_enable_ep2
 
