Index: format/app_dongle.format
===================================================================
--- /branch/keyboard/customer_FW/RY_project/RY_Dongle/format/app_dongle.format	(revision 1998)
+++ /branch/keyboard/customer_FW/RY_project/RY_Dongle/format/app_dongle.format	(working copy)
@@ -203,6 +203,11 @@
 )
 
 (
+0xED CMD_SET_MS_DPI_FUCTION
+0xEE CMD_SET_MS_B5_FUCTION
+0xEF CMD_SET_MS_B4_FUCTION
+0xF0 CMD_SET_MS_RKEY_FUCTION
+0xF1 CMD_SET_MS_MKEY_FUCTION
 0xF2 CMD_SET_SLEEP_TIMER
 0xF3 CMD_GET_DPI
 0xF4 CMD_SET_REPORT
Index: output/eeprom.dat
===================================================================
--- /branch/keyboard/customer_FW/RY_project/RY_Dongle/output/eeprom.dat	(revision 1998)
+++ /branch/keyboard/customer_FW/RY_project/RY_Dongle/output/eeprom.dat	(working copy)
@@ -2,8 +2,8 @@
 02
 aa
 55
-da
-11
+06
+12
 c2
 84
 00
@@ -2403,7 +2403,7 @@
 58
 00
 04
-01
+0c
 67
 e1
 45
@@ -2411,7 +2411,7 @@
 58
 00
 04
-47
+52
 67
 e1
 45
@@ -3631,47 +3631,67 @@
 c0
 7b
 83
-b9
+c4
 c0
 7b
 03
-c7
+d2
 c0
 7a
 83
-9e
+a3
 c0
 79
 83
-b7
+c2
 c0
 7a
 03
-a8
+ac
+c0
+76
+83
+bb
+c0
+77
+03
+bb
+c0
+77
+83
+bb
+c0
+78
+03
+bb
+c0
+78
+83
+bb
 c0
 79
 03
-ae
+b2
 c0
 7e
 03
-ca
+d5
 c0
 7f
 03
-d2
+dd
 c0
 3d
 03
-d8
+e3
 c0
 50
 03
-df
+ea
 c0
 50
-83
-f5
+84
+00
 20
 20
 48
@@ -3719,15 +3739,11 @@
 20
 40
 03
-96
-6f
-e0
-88
-76
-67
-e0
-ca
+9b
+70
+4a
 53
+05
 6f
 e0
 88
@@ -3747,7 +3763,7 @@
 20
 20
 03
-99
+9e
 6f
 e0
 88
@@ -3759,7 +3775,7 @@
 20
 40
 03
-96
+9b
 6f
 e0
 88
@@ -3771,7 +3787,7 @@
 20
 20
 03
-a5
+a9
 6f
 e0
 88
@@ -3779,11 +3795,11 @@
 c0
 02
 83
-b2
+b6
 c0
 05
 03
-b5
+b9
 20
 60
 00
@@ -3791,7 +3807,7 @@
 20
 40
 03
-96
+9b
 70
 4a
 53
@@ -3799,7 +3815,7 @@
 20
 20
 03
-a5
+a9
 70
 4a
 53
@@ -3808,6 +3824,34 @@
 60
 00
 00
+6f
+e0
+88
+76
+c1
+82
+80
+00
+20
+40
+03
+9b
+70
+4a
+53
+05
+6f
+e0
+88
+fa
+67
+e0
+88
+78
+20
+20
+03
+a9
 70
 49
 50
@@ -3815,7 +3859,7 @@
 20
 20
 04
-2f
+3a
 58
 00
 00
@@ -3871,7 +3915,7 @@
 20
 20
 04
-3e
+49
 6f
 e0
 88
@@ -3915,7 +3959,7 @@
 20
 20
 04
-3e
+49
 6f
 e0
 88
@@ -4103,7 +4147,7 @@
 20
 20
 04
-3e
+49
 70
 46
 11
@@ -4115,15 +4159,15 @@
 c2
 83
 04
-29
+34
 c2
 83
 84
-36
+41
 c2
 82
 84
-39
+44
 6f
 e0
 c5
@@ -4135,11 +4179,11 @@
 20
 22
 84
-16
+21
 20
 40
 04
-16
+21
 6f
 e0
 c5
@@ -4175,15 +4219,15 @@
 c2
 83
 04
-29
+34
 c2
 83
 84
-36
+41
 c2
 82
 84
-39
+44
 20
 60
 00
@@ -4247,7 +4291,7 @@
 24
 22
 84
-27
+32
 6f
 e3
 49
@@ -4263,7 +4307,7 @@
 20
 20
 04
-3e
+49
 6f
 e0
 c7
@@ -4315,7 +4359,7 @@
 20
 20
 04
-3e
+49
 6f
 e0
 c7
@@ -4391,11 +4435,11 @@
 c2
 83
 04
-60
+6b
 c2
 82
 84
-5b
+66
 6f
 e0
 c7
@@ -4403,15 +4447,15 @@
 c0
 00
 04
-4f
+5a
 c0
 01
 04
-55
+60
 c0
 01
 84
-58
+63
 20
 20
 33
@@ -4503,11 +4547,11 @@
 20
 5a
 04
-6b
+76
 24
 5a
 04
-6d
+78
 d8
 c0
 47
@@ -4563,7 +4607,7 @@
 c2
 00
 04
-71
+7c
 1a
 21
 22
@@ -4572,8 +4616,8 @@
 60
 00
 00
-5a
-bf
+3e
+2a
 aa
 55
 40
@@ -5186,52 +5230,8 @@
 55
 52
 80
-af
-12
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
+64
+21
 ff
 ff
 ff
@@ -8188,5 +8188,5 @@
 ff
 ff
 ff
-aa
-05
+f5
+8b
Index: output/flash.dat
===================================================================
--- /branch/keyboard/customer_FW/RY_project/RY_Dongle/output/flash.dat	(revision 1998)
+++ /branch/keyboard/customer_FW/RY_project/RY_Dongle/output/flash.dat	(working copy)
@@ -2,8 +2,8 @@
 02
 aa
 55
-da
-11
+06
+12
 c2
 84
 00
@@ -2403,7 +2403,7 @@
 58
 00
 04
-01
+0c
 67
 e1
 45
@@ -2411,7 +2411,7 @@
 58
 00
 04
-47
+52
 67
 e1
 45
@@ -3631,47 +3631,67 @@
 c0
 7b
 83
-b9
+c4
 c0
 7b
 03
-c7
+d2
 c0
 7a
 83
-9e
+a3
 c0
 79
 83
-b7
+c2
 c0
 7a
 03
-a8
+ac
+c0
+76
+83
+bb
+c0
+77
+03
+bb
+c0
+77
+83
+bb
+c0
+78
+03
+bb
+c0
+78
+83
+bb
 c0
 79
 03
-ae
+b2
 c0
 7e
 03
-ca
+d5
 c0
 7f
 03
-d2
+dd
 c0
 3d
 03
-d8
+e3
 c0
 50
 03
-df
+ea
 c0
 50
-83
-f5
+84
+00
 20
 20
 48
@@ -3719,15 +3739,11 @@
 20
 40
 03
-96
-6f
-e0
-88
-76
-67
-e0
-ca
+9b
+70
+4a
 53
+05
 6f
 e0
 88
@@ -3747,7 +3763,7 @@
 20
 20
 03
-99
+9e
 6f
 e0
 88
@@ -3759,7 +3775,7 @@
 20
 40
 03
-96
+9b
 6f
 e0
 88
@@ -3771,7 +3787,7 @@
 20
 20
 03
-a5
+a9
 6f
 e0
 88
@@ -3779,11 +3795,11 @@
 c0
 02
 83
-b2
+b6
 c0
 05
 03
-b5
+b9
 20
 60
 00
@@ -3791,7 +3807,7 @@
 20
 40
 03
-96
+9b
 70
 4a
 53
@@ -3799,7 +3815,7 @@
 20
 20
 03
-a5
+a9
 70
 4a
 53
@@ -3808,6 +3824,34 @@
 60
 00
 00
+6f
+e0
+88
+76
+c1
+82
+80
+00
+20
+40
+03
+9b
+70
+4a
+53
+05
+6f
+e0
+88
+fa
+67
+e0
+88
+78
+20
+20
+03
+a9
 70
 49
 50
@@ -3815,7 +3859,7 @@
 20
 20
 04
-2f
+3a
 58
 00
 00
@@ -3871,7 +3915,7 @@
 20
 20
 04
-3e
+49
 6f
 e0
 88
@@ -3915,7 +3959,7 @@
 20
 20
 04
-3e
+49
 6f
 e0
 88
@@ -4103,7 +4147,7 @@
 20
 20
 04
-3e
+49
 70
 46
 11
@@ -4115,15 +4159,15 @@
 c2
 83
 04
-29
+34
 c2
 83
 84
-36
+41
 c2
 82
 84
-39
+44
 6f
 e0
 c5
@@ -4135,11 +4179,11 @@
 20
 22
 84
-16
+21
 20
 40
 04
-16
+21
 6f
 e0
 c5
@@ -4175,15 +4219,15 @@
 c2
 83
 04
-29
+34
 c2
 83
 84
-36
+41
 c2
 82
 84
-39
+44
 20
 60
 00
@@ -4247,7 +4291,7 @@
 24
 22
 84
-27
+32
 6f
 e3
 49
@@ -4263,7 +4307,7 @@
 20
 20
 04
-3e
+49
 6f
 e0
 c7
@@ -4315,7 +4359,7 @@
 20
 20
 04
-3e
+49
 6f
 e0
 c7
@@ -4391,11 +4435,11 @@
 c2
 83
 04
-60
+6b
 c2
 82
 84
-5b
+66
 6f
 e0
 c7
@@ -4403,15 +4447,15 @@
 c0
 00
 04
-4f
+5a
 c0
 01
 04
-55
+60
 c0
 01
 84
-58
+63
 20
 20
 33
@@ -4503,11 +4547,11 @@
 20
 5a
 04
-6b
+76
 24
 5a
 04
-6d
+78
 d8
 c0
 47
@@ -4563,7 +4607,7 @@
 c2
 00
 04
-71
+7c
 1a
 21
 22
@@ -4572,8 +4616,8 @@
 60
 00
 00
-5a
-bf
+3e
+2a
 aa
 55
 40
@@ -5186,52 +5230,8 @@
 55
 52
 80
-af
-12
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
+64
+21
 ff
 ff
 ff
@@ -8188,5 +8188,5 @@
 ff
 ff
 ff
-aa
-05
+f5
+8b
Index: output/otp.dat
===================================================================
--- /branch/keyboard/customer_FW/RY_project/RY_Dongle/output/otp.dat	(revision 1998)
+++ /branch/keyboard/customer_FW/RY_project/RY_Dongle/output/otp.dat	(working copy)
@@ -11,8 +11,8 @@
 00
 aa
 55
-da
-11
+06
+12
 c2
 84
 00
@@ -2412,7 +2412,7 @@
 58
 00
 04
-01
+0c
 67
 e1
 45
@@ -2420,7 +2420,7 @@
 58
 00
 04
-47
+52
 67
 e1
 45
@@ -3640,47 +3640,67 @@
 c0
 7b
 83
-b9
+c4
 c0
 7b
 03
-c7
+d2
 c0
 7a
 83
-9e
+a3
 c0
 79
 83
-b7
+c2
 c0
 7a
 03
-a8
+ac
+c0
+76
+83
+bb
+c0
+77
+03
+bb
+c0
+77
+83
+bb
+c0
+78
+03
+bb
+c0
+78
+83
+bb
 c0
 79
 03
-ae
+b2
 c0
 7e
 03
-ca
+d5
 c0
 7f
 03
-d2
+dd
 c0
 3d
 03
-d8
+e3
 c0
 50
 03
-df
+ea
 c0
 50
-83
-f5
+84
+00
 20
 20
 48
@@ -3728,15 +3748,11 @@
 20
 40
 03
-96
-6f
-e0
-88
-76
-67
-e0
-ca
+9b
+70
+4a
 53
+05
 6f
 e0
 88
@@ -3756,7 +3772,7 @@
 20
 20
 03
-99
+9e
 6f
 e0
 88
@@ -3768,7 +3784,7 @@
 20
 40
 03
-96
+9b
 6f
 e0
 88
@@ -3780,7 +3796,7 @@
 20
 20
 03
-a5
+a9
 6f
 e0
 88
@@ -3788,11 +3804,11 @@
 c0
 02
 83
-b2
+b6
 c0
 05
 03
-b5
+b9
 20
 60
 00
@@ -3800,7 +3816,7 @@
 20
 40
 03
-96
+9b
 70
 4a
 53
@@ -3808,7 +3824,7 @@
 20
 20
 03
-a5
+a9
 70
 4a
 53
@@ -3817,6 +3833,34 @@
 60
 00
 00
+6f
+e0
+88
+76
+c1
+82
+80
+00
+20
+40
+03
+9b
+70
+4a
+53
+05
+6f
+e0
+88
+fa
+67
+e0
+88
+78
+20
+20
+03
+a9
 70
 49
 50
@@ -3824,7 +3868,7 @@
 20
 20
 04
-2f
+3a
 58
 00
 00
@@ -3880,7 +3924,7 @@
 20
 20
 04
-3e
+49
 6f
 e0
 88
@@ -3924,7 +3968,7 @@
 20
 20
 04
-3e
+49
 6f
 e0
 88
@@ -4112,7 +4156,7 @@
 20
 20
 04
-3e
+49
 70
 46
 11
@@ -4124,15 +4168,15 @@
 c2
 83
 04
-29
+34
 c2
 83
 84
-36
+41
 c2
 82
 84
-39
+44
 6f
 e0
 c5
@@ -4144,11 +4188,11 @@
 20
 22
 84
-16
+21
 20
 40
 04
-16
+21
 6f
 e0
 c5
@@ -4184,15 +4228,15 @@
 c2
 83
 04
-29
+34
 c2
 83
 84
-36
+41
 c2
 82
 84
-39
+44
 20
 60
 00
@@ -4256,7 +4300,7 @@
 24
 22
 84
-27
+32
 6f
 e3
 49
@@ -4272,7 +4316,7 @@
 20
 20
 04
-3e
+49
 6f
 e0
 c7
@@ -4324,7 +4368,7 @@
 20
 20
 04
-3e
+49
 6f
 e0
 c7
@@ -4400,11 +4444,11 @@
 c2
 83
 04
-60
+6b
 c2
 82
 84
-5b
+66
 6f
 e0
 c7
@@ -4412,15 +4456,15 @@
 c0
 00
 04
-4f
+5a
 c0
 01
 04
-55
+60
 c0
 01
 84
-58
+63
 20
 20
 33
@@ -4512,11 +4556,11 @@
 20
 5a
 04
-6b
+76
 24
 5a
 04
-6d
+78
 d8
 c0
 47
@@ -4572,7 +4616,7 @@
 c2
 00
 04
-71
+7c
 1a
 21
 22
@@ -4581,8 +4625,8 @@
 60
 00
 00
-5a
-bf
+3e
+2a
 aa
 55
 40
@@ -5195,6 +5239,6 @@
 55
 52
 80
-af
-12
+64
+21
 21
Index: output/program.lis
===================================================================
--- /branch/keyboard/customer_FW/RY_project/RY_Dongle/output/program.lis	(revision 1998)
+++ /branch/keyboard/customer_FW/RY_project/RY_Dongle/output/program.lis	(working copy)
@@ -759,9 +759,9 @@
 p_app_init:
 0255 58000361 setarg p_dongle_dispatch 
 0256 67e145e0 store 2 ,mem_cb_24g_receive_process 
-0257 58000401 setarg p_dongle_g24_mouse 
+0257 5800040c setarg p_dongle_g24_mouse 
 0258 67e145e4 store 2 ,mem_cb_24g_data_device1 
-0259 58000447 setarg p_dongle_g24_kb 
+0259 58000452 setarg p_dongle_g24_kb 
 025a 67e145e6 store 2 ,mem_cb_24g_data_device2 
 025b 58000260 setarg p_dongle_ackpayload_prep 
 025c 67e145e2 store 2 ,mem_cb_24g_ackpayload 
@@ -1162,318 +1162,331 @@
 0387 207a0000 rtn blank 
 0388 7008f700 jam 0 ,mem_usb0_get_set_report 
 0389 6fe08875 fetch 1 ,mem_usb0_set_report_data 
-038a c07b83b9 beq cmd_check_status ,p_dongle_dispose_cmd_check_status 
-038b c07b03c7 beq cmd_set ,p_dongle_dispose_cmd_set 
-038c c07a839e beq cmd_set_dpi ,p_dongle_dispose_ms_cmd_set_dpi 
-038d c07983b7 beq cmd_get_dpi ,p_dongle_dispose_cmd_get_dpi 
-038e c07a03a8 beq cmd_set_report ,p_dongle_dispose_ms_cmd_set_report 
-038f c07903ae beq cmd_set_sleep_timer ,p_dongle_dispose_set_sleep_timer 
-0390 c07e03ca beq cmd_get_in_data ,p_dongle_dispose_cmd_get_in_data 
-0391 c07f03d2 beq cmd_get_translen ,p_dongle_dispose_cmd_get_translen 
-0392 c03d03d8 beq cmd_set_test ,p_dongle_dispose_cmd_set_test 
-0393 c05003df beq cmd_set_key_matrix ,p_dongle_dispose_cmd_set_key_matrix 
-0394 c05083f5 beq cmd_get_key_matrix ,p_dongle_dispose_cmd_get_key_matrix 
-0395 20204875 branch dongle_usb_dispatch_next 
+038a c07b83c4 beq cmd_check_status ,p_dongle_dispose_cmd_check_status 
+038b c07b03d2 beq cmd_set ,p_dongle_dispose_cmd_set 
+038c c07a83a3 beq cmd_set_dpi ,p_dongle_dispose_ms_cmd_set_dpi 
+038d c07983c2 beq cmd_get_dpi ,p_dongle_dispose_cmd_get_dpi 
+038e c07a03ac beq cmd_set_report ,p_dongle_dispose_ms_cmd_set_report 
+038f c07683bb beq cmd_set_ms_dpi_fuction ,p_dongle_dispose_ms_cmd_set_key_fuction 
+0390 c07703bb beq cmd_set_ms_b5_fuction ,p_dongle_dispose_ms_cmd_set_key_fuction 
+0391 c07783bb beq cmd_set_ms_b4_fuction ,p_dongle_dispose_ms_cmd_set_key_fuction 
+0392 c07803bb beq cmd_set_ms_rkey_fuction ,p_dongle_dispose_ms_cmd_set_key_fuction 
+0393 c07883bb beq cmd_set_ms_mkey_fuction ,p_dongle_dispose_ms_cmd_set_key_fuction 
+0394 c07903b2 beq cmd_set_sleep_timer ,p_dongle_dispose_set_sleep_timer 
+0395 c07e03d5 beq cmd_get_in_data ,p_dongle_dispose_cmd_get_in_data 
+0396 c07f03dd beq cmd_get_translen ,p_dongle_dispose_cmd_get_translen 
+0397 c03d03e3 beq cmd_set_test ,p_dongle_dispose_cmd_set_test 
+0398 c05003ea beq cmd_set_key_matrix ,p_dongle_dispose_cmd_set_key_matrix 
+0399 c0508400 beq cmd_get_key_matrix ,p_dongle_dispose_cmd_get_key_matrix 
+039a 20204875 branch dongle_usb_dispatch_next 
 
 p_dongle_ms_ep2_ack_data_clr:
-0396 df200041 arg 65 ,loopcnt 
-0397 d8a04a55 arg mem_dg_ms_ep2_ack_data ,contw 
-0398 20207ca1 branch clear_mem 
+039b df200041 arg 65 ,loopcnt 
+039c d8a04a55 arg mem_dg_ms_ep2_ack_data ,contw 
+039d 20207ca1 branch clear_mem 
 
 p_dongle_ms_ep2_ack_data_copy:
-0399 704a5401 jam 1 ,mem_dg_ms_ep2_ack_data_flag 
-039a 70461108 jam protocol_ackpayload ,mem_24g_ackpayload_enable 
-039b d8c00875 arg mem_usb0_set_report_data ,contr 
-039c d8a04a56 arg mem_dg_ms_ep2_ack_data + 1 ,contw 
-039d 20207cda branch memcpy 
+039e 704a5401 jam 1 ,mem_dg_ms_ep2_ack_data_flag 
+039f 70461108 jam protocol_ackpayload ,mem_24g_ackpayload_enable 
+03a0 d8c00875 arg mem_usb0_set_report_data ,contr 
+03a1 d8a04a56 arg mem_dg_ms_ep2_ack_data + 1 ,contw 
+03a2 20207cda branch memcpy 
 
 p_dongle_dispose_ms_cmd_set_dpi:
-039e 6fe08876 fetch 1 ,mem_usb0_set_report_data + 1 
-039f c1828000 rtnne ms_type 
-03a0 20400396 call p_dongle_ms_ep2_ack_data_clr 
-03a1 6fe08876 fetch 1 ,mem_usb0_set_report_data + 1 
-03a2 67e0ca53 store 1 ,mem_24g_device_type 
-03a3 6fe08877 fetch 1 ,mem_usb0_set_report_data + 2 
-03a4 67e0c94b store 1 ,mem_dg_mouse_dpi_level 
+03a3 6fe08876 fetch 1 ,mem_usb0_set_report_data + 1 
+03a4 c1828000 rtnne ms_type 
+03a5 2040039b call p_dongle_ms_ep2_ack_data_clr 
+03a6 704a5305 jam ms_type ,mem_24g_device_type 
+03a7 6fe08877 fetch 1 ,mem_usb0_set_report_data + 2 
+03a8 67e0c94b store 1 ,mem_dg_mouse_dpi_level 
 
 p_dongle_ms_ack_data_copy:
-03a5 704a5504 jam 4 ,mem_dg_ms_ep2_ack_data 
-03a6 df200004 arg 4 ,loopcnt 
-03a7 20200399 branch p_dongle_ms_ep2_ack_data_copy 
+03a9 704a5504 jam 4 ,mem_dg_ms_ep2_ack_data 
+03aa df200004 arg 4 ,loopcnt 
+03ab 2020039e branch p_dongle_ms_ep2_ack_data_copy 
 
 p_dongle_dispose_ms_cmd_set_report:
-03a8 6fe08876 fetch 1 ,mem_usb0_set_report_data + 1 
-03a9 c1828000 rtnne ms_type 
-03aa 20400396 call p_dongle_ms_ep2_ack_data_clr 
-03ab 6fe08876 fetch 1 ,mem_usb0_set_report_data + 1 
-03ac 67e0ca53 store 1 ,mem_24g_device_type 
-03ad 202003a5 branch p_dongle_ms_ack_data_copy 
+03ac 6fe08876 fetch 1 ,mem_usb0_set_report_data + 1 
+03ad c1828000 rtnne ms_type 
+03ae 2040039b call p_dongle_ms_ep2_ack_data_clr 
+03af 6fe08876 fetch 1 ,mem_usb0_set_report_data + 1 
+03b0 67e0ca53 store 1 ,mem_24g_device_type 
+03b1 202003a9 branch p_dongle_ms_ack_data_copy 
 
 p_dongle_dispose_set_sleep_timer:
-03ae 6fe08876 fetch 1 ,mem_usb0_set_report_data + 1 
-03af c00283b2 beq ms_type ,p_dongle_dispose_ms_sleep_timer 
-03b0 c00503b5 beq kb_type ,p_dongle_dispose_kb_sleep_timer 
-03b1 20600000 rtn 
+03b2 6fe08876 fetch 1 ,mem_usb0_set_report_data + 1 
+03b3 c00283b6 beq ms_type ,p_dongle_dispose_ms_sleep_timer 
+03b4 c00503b9 beq kb_type ,p_dongle_dispose_kb_sleep_timer 
+03b5 20600000 rtn 
 
 p_dongle_dispose_ms_sleep_timer:
-03b2 20400396 call p_dongle_ms_ep2_ack_data_clr 
-03b3 704a5305 jam ms_type ,mem_24g_device_type 
-03b4 202003a5 branch p_dongle_ms_ack_data_copy 
+03b6 2040039b call p_dongle_ms_ep2_ack_data_clr 
+03b7 704a5305 jam ms_type ,mem_24g_device_type 
+03b8 202003a9 branch p_dongle_ms_ack_data_copy 
 
 p_dongle_dispose_kb_sleep_timer:
-03b5 704a530a jam kb_type ,mem_24g_device_type 
-03b6 20600000 rtn 
+03b9 704a530a jam kb_type ,mem_24g_device_type 
+03ba 20600000 rtn 
+
+p_dongle_dispose_ms_cmd_set_key_fuction:
+03bb 6fe08876 fetch 1 ,mem_usb0_set_report_data + 1 
+03bc c1828000 rtnne ms_type 
+03bd 2040039b call p_dongle_ms_ep2_ack_data_clr 
+03be 704a5305 jam ms_type ,mem_24g_device_type 
+03bf 6fe088fa fetch 1 ,mem_usb_tx_mac_enable 
+03c0 67e08878 store 1 ,mem_usb0_set_report_data + 3 
+03c1 202003a9 branch p_dongle_ms_ack_data_copy 
 
 p_dongle_dispose_cmd_get_dpi:
-03b7 70495001 jam 1 ,mem_usb_dpi_info_data + 4 
-03b8 2020042f branch p_dongle_usb_tx_dpi_level_enable 
+03c2 70495001 jam 1 ,mem_usb_dpi_info_data + 4 
+03c3 2020043a branch p_dongle_usb_tx_dpi_level_enable 
 
 p_dongle_dispose_cmd_check_status:
-03b9 58000064 setarg 0x64 
-03ba 67e0c9d1 store 1 ,mem_dg_protocol_usb_in_data_buff 
-03bb 58000064 setarg 0x64 
-03bc 67e0c9d2 store 1 ,mem_dg_protocol_usb_in_data_buff + 1 
-03bd 58000000 setarg 0x00 
-03be 67e0c9d3 store 1 ,mem_dg_protocol_usb_in_data_buff + 2 
-03bf 58000000 setarg 0x00 
-03c0 67e0c9d4 store 1 ,mem_dg_protocol_usb_in_data_buff + 3 
-03c1 58000001 setarg 0x01 
-03c2 67e0c9d5 store 1 ,mem_dg_protocol_usb_in_data_buff + 4 
-03c3 6fe2458f fetch 4 ,mem_24g_addr 
-03c4 67e249d8 store 4 ,mem_dg_protocol_usb_in_data_buff + 7 
-03c5 70090c24 jam usb_ep2_protocol ,mem_usb_ep2_data 
-03c6 2020043e branch p_dongle_usb_tx_enable_ep2 
+03c4 58000064 setarg 0x64 
+03c5 67e0c9d1 store 1 ,mem_dg_protocol_usb_in_data_buff 
+03c6 58000064 setarg 0x64 
+03c7 67e0c9d2 store 1 ,mem_dg_protocol_usb_in_data_buff + 1 
+03c8 58000000 setarg 0x00 
+03c9 67e0c9d3 store 1 ,mem_dg_protocol_usb_in_data_buff + 2 
+03ca 58000000 setarg 0x00 
+03cb 67e0c9d4 store 1 ,mem_dg_protocol_usb_in_data_buff + 3 
+03cc 58000001 setarg 0x01 
+03cd 67e0c9d5 store 1 ,mem_dg_protocol_usb_in_data_buff + 4 
+03ce 6fe2458f fetch 4 ,mem_24g_addr 
+03cf 67e249d8 store 4 ,mem_dg_protocol_usb_in_data_buff + 7 
+03d0 70090c24 jam usb_ep2_protocol ,mem_usb_ep2_data 
+03d1 20200449 branch p_dongle_usb_tx_enable_ep2 
 
 p_dongle_dispose_cmd_set:
-03c7 6fe08876 fetch 1 ,mem_usb0_set_report_data + 1 
-03c8 67e0ca53 store 1 ,mem_24g_device_type 
-03c9 20600000 rtn 
+03d2 6fe08876 fetch 1 ,mem_usb0_set_report_data + 1 
+03d3 67e0ca53 store 1 ,mem_24g_device_type 
+03d4 20600000 rtn 
 
 p_dongle_dispose_cmd_get_in_data:
-03ca 6fe08876 fetch 1 ,mem_usb0_set_report_data + 1 
-03cb 67e0ca53 store 1 ,mem_24g_device_type 
-03cc df200040 arg 64 ,loopcnt 
-03cd d8c008b5 arg mem_usb0_get_report_data ,contr 
-03ce d8a049d1 arg mem_dg_protocol_usb_in_data_buff ,contw 
-03cf 20407ccc call memcpy_fast 
-03d0 70090c24 jam usb_ep2_protocol ,mem_usb_ep2_data 
-03d1 2020043e branch p_dongle_usb_tx_enable_ep2 
+03d5 6fe08876 fetch 1 ,mem_usb0_set_report_data + 1 
+03d6 67e0ca53 store 1 ,mem_24g_device_type 
+03d7 df200040 arg 64 ,loopcnt 
+03d8 d8c008b5 arg mem_usb0_get_report_data ,contr 
+03d9 d8a049d1 arg mem_dg_protocol_usb_in_data_buff ,contw 
+03da 20407ccc call memcpy_fast 
+03db 70090c24 jam usb_ep2_protocol ,mem_usb_ep2_data 
+03dc 20200449 branch p_dongle_usb_tx_enable_ep2 
 
 p_dongle_dispose_cmd_get_translen:
-03d2 6fe08876 fetch 1 ,mem_usb0_set_report_data + 1 
-03d3 67e0ca12 store 1 ,mem_dg_protocol_usb_out_data_buff 
-03d4 1fe27200 copy pdata ,loopcnt 
-03d5 d8c00877 arg mem_usb0_set_report_data + 2 ,contr 
-03d6 d8a04a13 arg mem_dg_protocol_usb_out_data_buff + 1 ,contw 
-03d7 20207ccc branch memcpy_fast 
+03dd 6fe08876 fetch 1 ,mem_usb0_set_report_data + 1 
+03de 67e0ca12 store 1 ,mem_dg_protocol_usb_out_data_buff 
+03df 1fe27200 copy pdata ,loopcnt 
+03e0 d8c00877 arg mem_usb0_set_report_data + 2 ,contr 
+03e1 d8a04a13 arg mem_dg_protocol_usb_out_data_buff + 1 ,contw 
+03e2 20207ccc branch memcpy_fast 
 
 p_dongle_dispose_cmd_set_test:
-03d8 70461602 jam dongle_test ,mem_24g_work_mode 
-03d9 70461500 jam clear_init ,mem_24g_mode_init 
-03da 6fe08876 fetch 1 ,mem_usb0_set_report_data + 1 
-03db 67e0c7ff store 1 ,mem_dg_test_mode 
-03dc 6fe08877 fetch 1 ,mem_usb0_set_report_data + 2 
-03dd 67e0c800 store 1 ,mem_dg_test_ch 
-03de 20600000 rtn 
+03e3 70461602 jam dongle_test ,mem_24g_work_mode 
+03e4 70461500 jam clear_init ,mem_24g_mode_init 
+03e5 6fe08876 fetch 1 ,mem_usb0_set_report_data + 1 
+03e6 67e0c7ff store 1 ,mem_dg_test_mode 
+03e7 6fe08877 fetch 1 ,mem_usb0_set_report_data + 2 
+03e8 67e0c800 store 1 ,mem_dg_test_ch 
+03e9 20600000 rtn 
 
 p_dongle_dispose_cmd_set_key_matrix:
-03df 6fe08876 fetch 1 ,mem_usb0_set_report_data + 1 
-03e0 67e0c98d store 1 ,mem_dg_keyboard_keymatrix_profile 
-03e1 6fe08877 fetch 1 ,mem_usb0_set_report_data + 2 
-03e2 67e0c98e store 1 ,mem_dg_keyboard_keymatrix_type 
-03e3 6fe08878 fetch 1 ,mem_usb0_set_report_data + 3 
-03e4 67e0c98f store 1 ,mem_dg_keyboard_keymatrix_page 
-03e5 6fe08879 fetch 1 ,mem_usb0_set_report_data + 4 
-03e6 67e0c990 store 1 ,mem_dg_keyboard_keymatrix_len 
-03e7 1fe27200 copy pdata ,loopcnt 
-03e8 d8c0087d arg mem_usb0_set_report_data + 8 ,contr 
-03e9 d8a04991 arg mem_dg_keyboard_keymatrix_setup_keyvalue ,contw 
-03ea 20407ccc call memcpy_fast 
-03eb 704a530a jam kb_type ,mem_24g_device_type 
-03ec 704a9601 jam 1 ,mem_dg_kb_ep2_ack_data_flag 
-03ed 704a97a2 jam report_id_data_out ,mem_dg_kb_ep2_ack_data 
-03ee 704a980a jam kb_type ,mem_dg_kb_ep2_ack_data + 1 
-03ef 6fe0c990 fetch 1 ,mem_dg_keyboard_keymatrix_len 
-03f0 67e0ca99 store 1 ,mem_dg_kb_ep2_ack_data + 2 
-03f1 1fe27200 copy pdata ,loopcnt 
-03f2 d8c0087d arg mem_usb0_set_report_data + 8 ,contr 
-03f3 d8a04a9a arg mem_dg_kb_ep2_ack_data + 3 ,contw 
-03f4 20207cda branch memcpy 
+03ea 6fe08876 fetch 1 ,mem_usb0_set_report_data + 1 
+03eb 67e0c98d store 1 ,mem_dg_keyboard_keymatrix_profile 
+03ec 6fe08877 fetch 1 ,mem_usb0_set_report_data + 2 
+03ed 67e0c98e store 1 ,mem_dg_keyboard_keymatrix_type 
+03ee 6fe08878 fetch 1 ,mem_usb0_set_report_data + 3 
+03ef 67e0c98f store 1 ,mem_dg_keyboard_keymatrix_page 
+03f0 6fe08879 fetch 1 ,mem_usb0_set_report_data + 4 
+03f1 67e0c990 store 1 ,mem_dg_keyboard_keymatrix_len 
+03f2 1fe27200 copy pdata ,loopcnt 
+03f3 d8c0087d arg mem_usb0_set_report_data + 8 ,contr 
+03f4 d8a04991 arg mem_dg_keyboard_keymatrix_setup_keyvalue ,contw 
+03f5 20407ccc call memcpy_fast 
+03f6 704a530a jam kb_type ,mem_24g_device_type 
+03f7 704a9601 jam 1 ,mem_dg_kb_ep2_ack_data_flag 
+03f8 704a97a2 jam report_id_data_out ,mem_dg_kb_ep2_ack_data 
+03f9 704a980a jam kb_type ,mem_dg_kb_ep2_ack_data + 1 
+03fa 6fe0c990 fetch 1 ,mem_dg_keyboard_keymatrix_len 
+03fb 67e0ca99 store 1 ,mem_dg_kb_ep2_ack_data + 2 
+03fc 1fe27200 copy pdata ,loopcnt 
+03fd d8c0087d arg mem_usb0_set_report_data + 8 ,contr 
+03fe d8a04a9a arg mem_dg_kb_ep2_ack_data + 3 ,contw 
+03ff 20207cda branch memcpy 
 
 p_dongle_dispose_cmd_get_key_matrix:
-03f5 6fe08876 fetch 1 ,mem_usb0_set_report_data + 1 
-03f6 67e0c98d store 1 ,mem_dg_keyboard_keymatrix_profile 
-03f7 6fe08877 fetch 1 ,mem_usb0_set_report_data + 2 
-03f8 67e0c98e store 1 ,mem_dg_keyboard_keymatrix_type 
-03f9 6fe08878 fetch 1 ,mem_usb0_set_report_data + 3 
-03fa 67e0c98f store 1 ,mem_dg_keyboard_keymatrix_page 
-03fb df200040 arg 64 ,loopcnt 
-03fc d8c04ad8 arg mem_dg_kb_keymatrix_buff ,contr 
-03fd d8a049d1 arg mem_dg_protocol_usb_in_data_buff ,contw 
-03fe 20407ccc call memcpy_fast 
-03ff 70090c24 jam usb_ep2_protocol ,mem_usb_ep2_data 
-0400 2020043e branch p_dongle_usb_tx_enable_ep2 
+0400 6fe08876 fetch 1 ,mem_usb0_set_report_data + 1 
+0401 67e0c98d store 1 ,mem_dg_keyboard_keymatrix_profile 
+0402 6fe08877 fetch 1 ,mem_usb0_set_report_data + 2 
+0403 67e0c98e store 1 ,mem_dg_keyboard_keymatrix_type 
+0404 6fe08878 fetch 1 ,mem_usb0_set_report_data + 3 
+0405 67e0c98f store 1 ,mem_dg_keyboard_keymatrix_page 
+0406 df200040 arg 64 ,loopcnt 
+0407 d8c04ad8 arg mem_dg_kb_keymatrix_buff ,contr 
+0408 d8a049d1 arg mem_dg_protocol_usb_in_data_buff ,contw 
+0409 20407ccc call memcpy_fast 
+040a 70090c24 jam usb_ep2_protocol ,mem_usb_ep2_data 
+040b 20200449 branch p_dongle_usb_tx_enable_ep2 
 
 p_dongle_g24_mouse:
-0401 70461100 jam 0 ,mem_24g_ackpayload_enable 
-0402 6fe0c7b1 fetch 1 ,mem_24g_rxdata_temp_new + 2 
-0403 c2830429 bbit1 data_dpi ,p_dongle_receive_ms_dpi_info 
-0404 c2838436 bbit1 data_battery ,p_dongle_receive_ms_battery_info 
-0405 c2828439 bbit1 data_heart ,p_dongle_receive_ms_heart_info 
+040c 70461100 jam 0 ,mem_24g_ackpayload_enable 
+040d 6fe0c7b1 fetch 1 ,mem_24g_rxdata_temp_new + 2 
+040e c2830434 bbit1 data_dpi ,p_dongle_receive_ms_dpi_info 
+040f c2838441 bbit1 data_battery ,p_dongle_receive_ms_battery_info 
+0410 c2828444 bbit1 data_heart ,p_dongle_receive_ms_heart_info 
 
 p_dongle_g24_mouse_next:
-0406 6fe0c57d fetch 1 ,mem_24g_rxdata_length 
-0407 1fe67c09 sub pdata ,0x09 ,null 
-0408 20228416 branch p_dongle_g24_mouse_data ,zero 
-0409 20400416 call p_dongle_g24_mouse_data 
-040a 6fe0c57d fetch 1 ,mem_24g_rxdata_length 
-040b 1fe0fff8 add pdata ,-8 ,pdata 
-040c 67e0c57d store 1 ,mem_24g_rxdata_length 
-040d 1fe27200 copy pdata ,loopcnt 
-040e d8a047b1 arg mem_24g_rxdata_temp_new + 2 ,contw 
-040f d8c047b9 arg mem_24g_rxdata_temp_new + 10 ,contr 
-0410 20407cda call memcpy 
-0411 6fe0c7b1 fetch 1 ,mem_24g_rxdata_temp_new + 2 
-0412 c2830429 bbit1 data_dpi ,p_dongle_receive_ms_dpi_info 
-0413 c2838436 bbit1 data_battery ,p_dongle_receive_ms_battery_info 
-0414 c2828439 bbit1 data_heart ,p_dongle_receive_ms_heart_info 
-0415 20600000 rtn 
+0411 6fe0c57d fetch 1 ,mem_24g_rxdata_length 
+0412 1fe67c09 sub pdata ,0x09 ,null 
+0413 20228421 branch p_dongle_g24_mouse_data ,zero 
+0414 20400421 call p_dongle_g24_mouse_data 
+0415 6fe0c57d fetch 1 ,mem_24g_rxdata_length 
+0416 1fe0fff8 add pdata ,-8 ,pdata 
+0417 67e0c57d store 1 ,mem_24g_rxdata_length 
+0418 1fe27200 copy pdata ,loopcnt 
+0419 d8a047b1 arg mem_24g_rxdata_temp_new + 2 ,contw 
+041a d8c047b9 arg mem_24g_rxdata_temp_new + 10 ,contr 
+041b 20407cda call memcpy 
+041c 6fe0c7b1 fetch 1 ,mem_24g_rxdata_temp_new + 2 
+041d c2830434 bbit1 data_dpi ,p_dongle_receive_ms_dpi_info 
+041e c2838441 bbit1 data_battery ,p_dongle_receive_ms_battery_info 
+041f c2828444 bbit1 data_heart ,p_dongle_receive_ms_heart_info 
+0420 20600000 rtn 
 
 p_dongle_g24_mouse_data:
-0416 58000001 setarg ms_report_id 
-0417 67e08913 store 1 ,mem_usb_mouse_data 
-0418 6fe3c7b2 fetch 7 ,mem_24g_rxdata_temp_new + 3 
-0419 e7e38005 istore 7 ,contw 
-041a 6fe0c7b2 fetch 1 ,mem_24g_rxdata_temp_new + 3 
-041b 245a48dd ncall dongle_g24_ms_enable_blank_data_forcibly ,blank 
-041c 6fe0c7b2 fetch 1 ,mem_24g_rxdata_temp_new + 3 
-041d 205a48e1 call dongle_g24_ms_disable_blank_data_forcibly ,blank 
-041e 6fe38914 fetch 7 ,mem_usb_mouse_data + 1 
-041f 67e3c943 store 7 ,mem_dg_mouse_data 
-0420 6fe0c943 fetch 1 ,mem_dg_mouse_data 
-0421 6848c94a fetcht 1 ,mem_dg_mouse_key_data_last 
-0422 67e0c94a store 1 ,mem_dg_mouse_key_data_last 
-0423 98467c00 isub temp ,null 
-0424 24228427 nbranch p_dongle_mouse_data_tx_enable ,zero 
+0421 58000001 setarg ms_report_id 
+0422 67e08913 store 1 ,mem_usb_mouse_data 
+0423 6fe3c7b2 fetch 7 ,mem_24g_rxdata_temp_new + 3 
+0424 e7e38005 istore 7 ,contw 
+0425 6fe0c7b2 fetch 1 ,mem_24g_rxdata_temp_new + 3 
+0426 245a48dd ncall dongle_g24_ms_enable_blank_data_forcibly ,blank 
+0427 6fe0c7b2 fetch 1 ,mem_24g_rxdata_temp_new + 3 
+0428 205a48e1 call dongle_g24_ms_disable_blank_data_forcibly ,blank 
+0429 6fe38914 fetch 7 ,mem_usb_mouse_data + 1 
+042a 67e3c943 store 7 ,mem_dg_mouse_data 
+042b 6fe0c943 fetch 1 ,mem_dg_mouse_data 
+042c 6848c94a fetcht 1 ,mem_dg_mouse_key_data_last 
+042d 67e0c94a store 1 ,mem_dg_mouse_key_data_last 
+042e 98467c00 isub temp ,null 
+042f 24228432 nbranch p_dongle_mouse_data_tx_enable ,zero 
 
 p_dongle_receive_mouse_data_check:
-0425 6fe34944 fetch 6 ,mem_dg_mouse_data + 1 
-0426 207a0000 rtn blank 
+0430 6fe34944 fetch 6 ,mem_dg_mouse_data + 1 
+0431 207a0000 rtn blank 
 
 p_dongle_mouse_data_tx_enable:
-0427 70090c20 jam usb_ep2_ms ,mem_usb_ep2_data 
-0428 2020043e branch p_dongle_usb_tx_enable_ep2 
+0432 70090c20 jam usb_ep2_ms ,mem_usb_ep2_data 
+0433 20200449 branch p_dongle_usb_tx_enable_ep2 
 
 p_dongle_receive_ms_dpi_info:
-0429 6fe0c7b2 fetch 1 ,mem_24g_rxdata_temp_new + 3 
-042a 6848c94b fetcht 1 ,mem_dg_mouse_dpi_level 
-042b 67e0c94b store 1 ,mem_dg_mouse_dpi_level 
-042c 98467c00 isub temp ,null 
-042d 20628000 rtn zero 
-042e 70495000 jam 0 ,mem_usb_dpi_info_data + 4 
+0434 6fe0c7b2 fetch 1 ,mem_24g_rxdata_temp_new + 3 
+0435 6848c94b fetcht 1 ,mem_dg_mouse_dpi_level 
+0436 67e0c94b store 1 ,mem_dg_mouse_dpi_level 
+0437 98467c00 isub temp ,null 
+0438 20628000 rtn zero 
+0439 70495000 jam 0 ,mem_usb_dpi_info_data + 4 
 
 p_dongle_usb_tx_dpi_level_enable:
-042f 70494c40 jam 0x40 ,mem_usb_dpi_info_data 
-0430 70494da1 jam report_id_data_in ,mem_usb_dpi_info_data + 1 
-0431 70494e05 jam ms_type ,mem_usb_dpi_info_data + 2 
-0432 6fe0c94b fetch 1 ,mem_dg_mouse_dpi_level 
-0433 67e0c94f store 1 ,mem_usb_dpi_info_data + 3 
-0434 70090c23 jam usb_ep2_dpi ,mem_usb_ep2_data 
-0435 2020043e branch p_dongle_usb_tx_enable_ep2 
+043a 70494c40 jam 0x40 ,mem_usb_dpi_info_data 
+043b 70494da1 jam report_id_data_in ,mem_usb_dpi_info_data + 1 
+043c 70494e05 jam ms_type ,mem_usb_dpi_info_data + 2 
+043d 6fe0c94b fetch 1 ,mem_dg_mouse_dpi_level 
+043e 67e0c94f store 1 ,mem_usb_dpi_info_data + 3 
+043f 70090c23 jam usb_ep2_dpi ,mem_usb_ep2_data 
+0440 20200449 branch p_dongle_usb_tx_enable_ep2 
 
 p_dongle_receive_ms_battery_info:
-0436 6fe0c7b2 fetch 1 ,mem_24g_rxdata_temp_new + 3 
-0437 67e0c7f7 store 1 ,mem_dg_mouse_battery_level 
-0438 20600000 rtn 
+0441 6fe0c7b2 fetch 1 ,mem_24g_rxdata_temp_new + 3 
+0442 67e0c7f7 store 1 ,mem_dg_mouse_battery_level 
+0443 20600000 rtn 
 
 p_dongle_receive_ms_heart_info:
-0439 6fe0ca54 fetch 1 ,mem_dg_ms_ep2_ack_data_flag 
-043a 207a0000 rtn blank 
-043b 704a5400 jam 0 ,mem_dg_ms_ep2_ack_data_flag 
+0444 6fe0ca54 fetch 1 ,mem_dg_ms_ep2_ack_data_flag 
+0445 207a0000 rtn blank 
+0446 704a5400 jam 0 ,mem_dg_ms_ep2_ack_data_flag 
 
 p_24g_ackpayload_enable_set:
-043c 70461108 jam protocol_ackpayload ,mem_24g_ackpayload_enable 
-043d 20600000 rtn 
+0447 70461108 jam protocol_ackpayload ,mem_24g_ackpayload_enable 
+0448 20600000 rtn 
 
 p_dongle_usb_tx_enable_ep2:
-043e 6fe0890e fetch 1 ,mem_usb_device_enumeration_endflag 
-043f 207a0000 rtn blank 
-0440 da20493b arg mem_usb_ep2_fifo ,rega 
-0441 20407da5 call fifo_is_full 
-0442 247a0000 nrtn blank 
-0443 6fe0890c fetch 1 ,mem_usb_ep2_data 
-0444 67e0866f store 1 ,mem_fifo_temp 
-0445 da20493b arg mem_usb_ep2_fifo ,rega 
-0446 20207d8b branch fifo_in 
+0449 6fe0890e fetch 1 ,mem_usb_device_enumeration_endflag 
+044a 207a0000 rtn blank 
+044b da20493b arg mem_usb_ep2_fifo ,rega 
+044c 20407da5 call fifo_is_full 
+044d 247a0000 nrtn blank 
+044e 6fe0890c fetch 1 ,mem_usb_ep2_data 
+044f 67e0866f store 1 ,mem_fifo_temp 
+0450 da20493b arg mem_usb_ep2_fifo ,rega 
+0451 20207d8b branch fifo_in 
 
 p_dongle_g24_kb:
-0447 6fe0c7b1 fetch 1 ,mem_24g_rxdata_temp_new + 2 
-0448 c2830460 bbit1 data_key_matrix ,p_dongle_receive_kb_key_matrix_data 
-0449 c282845b bbit1 data_heart ,p_dongle_receive_kb_heart_info 
-044a 6fe0c7b2 fetch 1 ,mem_24g_rxdata_temp_new + 3 
-044b c000044f beq 0 ,p_dongle_g24_kb_type0 
-044c c0010455 beq 2 ,p_dongle_g24_kb_type2 
-044d c0018458 beq 3 ,p_dongle_g24_kb_type3 
-044e 202033be branch g24_rx_interrupt_clear 
+0452 6fe0c7b1 fetch 1 ,mem_24g_rxdata_temp_new + 2 
+0453 c283046b bbit1 data_key_matrix ,p_dongle_receive_kb_key_matrix_data 
+0454 c2828466 bbit1 data_heart ,p_dongle_receive_kb_heart_info 
+0455 6fe0c7b2 fetch 1 ,mem_24g_rxdata_temp_new + 3 
+0456 c000045a beq 0 ,p_dongle_g24_kb_type0 
+0457 c0010460 beq 2 ,p_dongle_g24_kb_type2 
+0458 c0018463 beq 3 ,p_dongle_g24_kb_type3 
+0459 202033be branch g24_rx_interrupt_clear 
 
 p_dongle_g24_kb_type0:
-044f 6fe0c7b4 fetch 1 ,mem_24g_rxdata_temp_new + 5 
-0450 67e0c611 store 1 ,mem_24g_ackpayload_enable 
-0451 7047b400 jam 0 ,mem_24g_rxdata_temp_new + 5 
-0452 d8a00923 arg mem_usb_kb_data ,contw 
-0453 d8c047b3 arg mem_24g_rxdata_temp_new + 4 ,contr 
-0454 202048ef branch dongle_g24_kb_type0 + 5 
+045a 6fe0c7b4 fetch 1 ,mem_24g_rxdata_temp_new + 5 
+045b 67e0c611 store 1 ,mem_24g_ackpayload_enable 
+045c 7047b400 jam 0 ,mem_24g_rxdata_temp_new + 5 
+045d d8a00923 arg mem_usb_kb_data ,contw 
+045e d8c047b3 arg mem_24g_rxdata_temp_new + 4 ,contr 
+045f 202048ef branch dongle_g24_kb_type0 + 5 
 
 p_dongle_g24_kb_type2:
-0455 d8a00943 arg mem_usb_kb_system ,contw 
-0456 d8c047b2 arg mem_24g_rxdata_temp_new + 3 ,contr 
-0457 2020491f branch dongle_g24_kb_type2 + 2 
+0460 d8a00943 arg mem_usb_kb_system ,contw 
+0461 d8c047b2 arg mem_24g_rxdata_temp_new + 3 ,contr 
+0462 2020491f branch dongle_g24_kb_type2 + 2 
 
 p_dongle_g24_kb_type3:
-0458 d8a00933 arg mem_usb_kb_multikey ,contw 
-0459 d8c047b2 arg mem_24g_rxdata_temp_new + 3 ,contr 
-045a 20204907 branch dongle_g24_kb_type3 + 2 
+0463 d8a00933 arg mem_usb_kb_multikey ,contw 
+0464 d8c047b2 arg mem_24g_rxdata_temp_new + 3 ,contr 
+0465 20204907 branch dongle_g24_kb_type3 + 2 
 
 p_dongle_receive_kb_heart_info:
-045b 6fe0ca96 fetch 1 ,mem_dg_kb_ep2_ack_data_flag 
-045c 207a0000 rtn blank 
-045d 704a9600 jam 0 ,mem_dg_kb_ep2_ack_data_flag 
+0466 6fe0ca96 fetch 1 ,mem_dg_kb_ep2_ack_data_flag 
+0467 207a0000 rtn blank 
+0468 704a9600 jam 0 ,mem_dg_kb_ep2_ack_data_flag 
 
 p_24g_ackpayload_kb_enable_set:
-045e 70461108 jam protocol_ackpayload ,mem_24g_ackpayload_enable 
-045f 20600000 rtn 
+0469 70461108 jam protocol_ackpayload ,mem_24g_ackpayload_enable 
+046a 20600000 rtn 
 
 p_dongle_receive_kb_key_matrix_data:
-0460 6fe0c7b0 fetch 1 ,mem_24g_rxdata_temp_new + 1 
-0461 1fe0ffff increase -1 ,pdata 
-0462 1fe27200 copy pdata ,loopcnt 
-0463 6fe14b79 fetch 2 ,mem_keymatrix_wptr 
-0464 205a046b call p_dongle_write_from_head ,blank 
-0465 245a046d ncall p_dongle_write_from_last ,blank 
-0466 d8c047b2 arg mem_24g_rxdata_temp_new + 3 ,contr 
-0467 20407ccc call memcpy_fast 
-0468 18a27e00 copy contw ,pdata 
-0469 67e14b79 store 2 ,mem_keymatrix_wptr 
-046a 20600000 rtn 
+046b 6fe0c7b0 fetch 1 ,mem_24g_rxdata_temp_new + 1 
+046c 1fe0ffff increase -1 ,pdata 
+046d 1fe27200 copy pdata ,loopcnt 
+046e 6fe14b79 fetch 2 ,mem_keymatrix_wptr 
+046f 205a0476 call p_dongle_write_from_head ,blank 
+0470 245a0478 ncall p_dongle_write_from_last ,blank 
+0471 d8c047b2 arg mem_24g_rxdata_temp_new + 3 ,contr 
+0472 20407ccc call memcpy_fast 
+0473 18a27e00 copy contw ,pdata 
+0474 67e14b79 store 2 ,mem_keymatrix_wptr 
+0475 20600000 rtn 
 
 p_dongle_write_from_head:
-046b d8a04ad8 arg mem_dg_kb_keymatrix_buff ,contw 
-046c 20600000 rtn 
+0476 d8a04ad8 arg mem_dg_kb_keymatrix_buff ,contw 
+0477 20600000 rtn 
 
 p_dongle_write_from_last:
-046d 6fe14b79 fetch 2 ,mem_keymatrix_wptr 
-046e 1fe20a00 copy pdata ,contw 
-046f 20600000 rtn 
+0478 6fe14b79 fetch 2 ,mem_keymatrix_wptr 
+0479 1fe20a00 copy pdata ,contw 
+047a 20600000 rtn 
 
 p_checksum_calcu:
-0470 da200000 arg 0 ,rega 
+047b da200000 arg 0 ,rega 
 
 p_dongle_data_checksum:
-0471 efe08006 ifetch 1 ,contr 
-0472 9a20a200 iadd rega ,rega 
-0473 c2000471 loop p_dongle_data_checksum 
-0474 1a2122ff and_into 0xff ,rega 
-0475 20600000 rtn 
+047c efe08006 ifetch 1 ,contr 
+047d 9a20a200 iadd rega ,rega 
+047e c200047c loop p_dongle_data_checksum 
+047f 1a2122ff and_into 0xff ,rega 
+0480 20600000 rtn 
               org 0x2000
 
 start:
Index: program/patch.prog
===================================================================
--- /branch/keyboard/customer_FW/RY_project/RY_Dongle/program/patch.prog	(revision 1998)
+++ /branch/keyboard/customer_FW/RY_project/RY_Dongle/program/patch.prog	(working copy)
@@ -1194,6 +1194,11 @@
 	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_SET_MS_DPI_FUCTION,p_dongle_dispose_ms_cmd_set_key_fuction
+	beq CMD_SET_MS_B5_FUCTION,p_dongle_dispose_ms_cmd_set_key_fuction
+	beq CMD_SET_MS_B4_FUCTION,p_dongle_dispose_ms_cmd_set_key_fuction
+	beq CMD_SET_MS_RKEY_FUCTION,p_dongle_dispose_ms_cmd_set_key_fuction
+	beq CMD_SET_MS_MKEY_FUCTION,p_dongle_dispose_ms_cmd_set_key_fuction
 	beq CMD_SET_SLEEP_TIMER,p_dongle_dispose_set_sleep_timer
 	beq CMD_GET_IN_DATA,p_dongle_dispose_cmd_get_in_data
 	beq CMD_GET_TRANSLEN,p_dongle_dispose_cmd_get_translen
@@ -1223,8 +1228,7 @@
 	fetch 1,mem_usb0_set_report_data+1
 	rtnne MS_TYPE
 	call p_dongle_ms_ep2_ack_data_clr
-	fetch 1,mem_usb0_set_report_data+1
-	store 1,mem_24g_device_type
+	jam MS_TYPE,mem_24g_device_type
 	fetch 1,mem_usb0_set_report_data+2
 	store 1,mem_dg_mouse_dpi_level
 p_dongle_ms_ack_data_copy:
@@ -1256,7 +1260,16 @@
 p_dongle_dispose_kb_sleep_timer:
 	jam KB_TYPE,mem_24g_device_type
 	rtn
-	
+
+//1byte opcode + 1byte type +1byte data +1byte checksum
+p_dongle_dispose_ms_cmd_set_key_fuction:
+	fetch 1,mem_usb0_set_report_data+1
+	rtnne MS_TYPE
+	call p_dongle_ms_ep2_ack_data_clr
+	jam MS_TYPE,mem_24g_device_type
+	fetch 1,mem_usb_tx_mac_enable	//mac or win flag
+	store 1,mem_usb0_set_report_data+3
+	branch p_dongle_ms_ack_data_copy
 
 p_dongle_dispose_cmd_get_dpi:
 	jam 1,mem_usb_dpi_info_data+4
