Index: format/app_dongle.format
===================================================================
--- /1306ac/branch/dongle/usb_ats/usb_1M/format/app_dongle.format	(revision 1068)
+++ /1306ac/branch/dongle/usb_ats/usb_1M/format/app_dongle.format	(working copy)
@@ -34,6 +34,8 @@
 //patch
 1 mem_24g_pair_tx_power_init
 1 mem_dg_bind_disable
+70 mem_dongle_kb_desc_new
+100 mem_dongle_ms_desc_new
 )
 
 
Index: format/usb.format
===================================================================
--- /1306ac/branch/dongle/usb_ats/usb_1M/format/usb.format	(revision 1068)
+++ /1306ac/branch/dongle/usb_ats/usb_1M/format/usb.format	(working copy)
@@ -85,7 +85,7 @@
 64 mem_usb_ep3_in_data
 64 mem_usb_ep3_out_data
 0 mem_usb_clear_mem_end
-64 mem_config_new
+
 )
 
 //class type
Index: output/eeprom.dat
===================================================================
--- /1306ac/branch/dongle/usb_ats/usb_1M/output/eeprom.dat	(revision 1068)
+++ /1306ac/branch/dongle/usb_ats/usb_1M/output/eeprom.dat	(working copy)
@@ -2,8 +2,8 @@
 02
 aa
 55
-c6
-04
+12
+05
 c2
 84
 00
@@ -39,15 +39,15 @@
 c0
 61
 80
-88
+91
 c0
 65
 80
-c6
+e0
 c0
 67
 80
-a1
+a3
 20
 20
 3a
@@ -58,16 +58,16 @@
 00
 c0
 23
-80
-f8
+81
+0b
 c0
 24
-80
-fe
+81
+11
 c0
 26
 80
-db
+ee
 c0
 27
 80
@@ -75,7 +75,7 @@
 c0
 28
 00
-d0
+e3
 20
 20
 3a
@@ -455,15 +455,51 @@
 58
 00
 00
-73
+7c
 67
 e1
 45
 2b
+58
+00
+51
+b4
+67
+e1
+45
+2f
+58
+00
+00
+7b
+67
+e1
+45
+31
+58
+00
+01
+30
+67
+e1
+45
+2d
+58
+00
+00
+c5
+67
+e1
+06
+f3
 20
 20
-50
-ba
+70
+3f
+20
+60
+00
+00
 6f
 e0
 c5
@@ -471,7 +507,7 @@
 c0
 00
 00
-76
+7f
 20
 20
 50
@@ -479,7 +515,7 @@
 20
 40
 00
-81
+8a
 d8
 e0
 00
@@ -491,7 +527,7 @@
 20
 5a
 00
-86
+8f
 20
 40
 4a
@@ -519,7 +555,7 @@
 20
 20
 00
-77
+80
 70
 45
 e1
@@ -548,14 +584,6 @@
 60
 00
 00
-58
-00
-01
-1d
-67
-e1
-45
-2d
 20
 40
 6e
@@ -565,33 +593,13 @@
 70
 56
 70
+07
+9b
+00
+70
 06
 2e
 00
-6f
-e0
-89
-00
-67
-e0
-86
-30
-1f
-e2
-72
-00
-d8
-c0
-09
-01
-d8
-a0
-06
-31
-20
-40
-74
-19
 70
 8c
 00
@@ -627,7 +635,7 @@
 58
 00
 0d
-40
+00
 67
 f1
 0c
@@ -639,7 +647,7 @@
 58
 00
 0d
-84
+44
 67
 f1
 0c
@@ -703,7 +711,7 @@
 20
 40
 00
-b0
+b2
 20
 20
 73
@@ -713,8 +721,8 @@
 8c
 24
 c3
-80
-80
+81
+00
 00
 6f
 e0
@@ -747,15 +755,19 @@
 c0
 10
 00
-bd
 c0
+70
+07
+aa
+00
+c1
 10
-f3
-77
-c0
+80
+00
+c1
 11
-73
-7f
+00
+00
 20
 20
 3a
@@ -766,8 +778,8 @@
 9b
 20
 3a
-00
-c2
+73
+73
 6f
 e0
 87
@@ -778,65 +790,129 @@
 64
 20
 20
-00
+73
+73
+6f
+e0
+c5
+b3
 c2
-70
-07
-aa
+82
 00
-df
+c9
+6f
+e0
+c5
+93
+c0
+ad
+00
+cd
+70
+45
+93
+5a
+6f
+f2
+13
+7a
+79
+20
+7e
+1d
+67
+e2
+06
+26
+6f
+e0
+c5
+de
+67
+e0
+86
+2e
+20
+40
+50
+fc
+20
+40
+70
+8d
+20
+40
+50
+e9
+20
 20
 00
-08
-d8
+d3
+6f
+e0
+c5
+93
 c0
-07
-b1
+2d
+00
+d9
+58
+00
+92
+72
+67
+e1
+05
+fb
+70
+06
+4a
+1a
 20
+60
+00
+00
+58
+00
+45
+e2
+67
+e1
+05
+fb
+70
+06
+4a
+17
+58
+00
+46
+28
+67
+e1
+05
+fd
+70
+06
+63
+4b
 20
-73
-0a
+60
+00
+00
 6f
 e0
 87
 0e
 c0
-00
-f1
-45
-c0
 10
 f1
 37
-c0
-11
-00
-cb
 20
 20
 71
 30
 6f
-e1
-07
-0f
-c0
-00
-71
-76
-c0
-00
-f1
-76
-c0
-01
-71
-7a
-20
-20
-71
-11
-6f
 e0
 c5
 61
@@ -847,7 +923,7 @@
 20
 40
 00
-d4
+e7
 20
 20
 4b
@@ -1015,7 +1091,7 @@
 c0
 7f
 81
-13
+26
 20
 60
 00
@@ -1027,7 +1103,7 @@
 c0
 00
 81
-03
+16
 c0
 01
 4a
@@ -1035,7 +1111,7 @@
 c0
 7f
 81
-11
+24
 20
 20
 4a
@@ -1071,7 +1147,7 @@
 c0
 00
 81
-0c
+1f
 20
 20
 4a
@@ -1103,7 +1179,7 @@
 20
 20
 01
-13
+26
 6f
 e0
 c5
@@ -1111,11 +1187,11 @@
 c0
 00
 81
-17
+2a
 c0
 01
 01
-1a
+2d
 20
 60
 00
@@ -1151,11 +1227,11 @@
 c0
 00
 81
-20
+33
 c0
 01
 01
-23
+36
 6f
 e0
 c5
@@ -1167,7 +1243,7 @@
 20
 20
 01
-25
+38
 6f
 e0
 c5
@@ -1183,11 +1259,11 @@
 c0
 00
 81
-29
+3c
 c0
 01
 81
-2d
+40
 20
 60
 00
@@ -1215,17 +1291,17 @@
 c0
 00
 81
-29
+3c
 c0
 7f
 81
-29
+3c
 20
 20
 51
 af
-ab
-e8
+e0
+01
 aa
 55
 40
@@ -1344,15 +1420,15 @@
 00
 b3
 45
-00
+10
 aa
 55
 06
 00
 3c
 44
-36
-60
+33
+16
 f0
 55
 12
@@ -1375,47 +1451,6 @@
 00
 aa
 55
-23
-00
-00
-09
-22
-09
-02
-22
-00
-01
-01
-00
-a0
-32
-09
-04
-00
-00
-01
-03
-01
-02
-00
-09
-21
-00
-02
-00
-01
-22
-a3
-00
-07
-05
-81
-03
-40
-00
-02
-aa
-55
 09
 00
 f9
@@ -1482,7 +1517,7 @@
 00
 e0
 45
-a8
+ab
 aa
 55
 01
@@ -1492,6 +1527,118 @@
 00
 aa
 55
+18
+00
+e2
+45
+17
+05
+0c
+09
+01
+a1
+01
+19
+00
+2a
+ff
+03
+15
+00
+26
+ff
+03
+95
+01
+75
+10
+81
+00
+c0
+aa
+55
+4c
+00
+28
+46
+4b
+05
+01
+09
+02
+a1
+01
+85
+01
+09
+01
+a1
+00
+05
+09
+19
+01
+29
+05
+15
+00
+25
+01
+95
+05
+75
+01
+81
+02
+95
+01
+75
+03
+81
+01
+05
+01
+09
+30
+09
+31
+16
+01
+f8
+26
+ff
+07
+75
+10
+95
+02
+81
+06
+09
+38
+15
+81
+25
+7f
+75
+08
+95
+01
+81
+06
+05
+0c
+0a
+38
+02
+95
+01
+81
+06
+c0
+c0
+aa
+55
 08
 00
 c4
@@ -1572,7 +1719,7 @@
 aa
 aa
 55
-69
-4c
-db
-aa
+f3
+61
+14
+06
Index: output/memmap.format
===================================================================
--- /1306ac/branch/dongle/usb_ats/usb_1M/output/memmap.format	(revision 1068)
+++ /1306ac/branch/dongle/usb_ats/usb_1M/output/memmap.format	(working copy)
@@ -316,18 +316,17 @@
 0x0880 mem_usb_ep3_in_data
 0x08c0 mem_usb_ep3_out_data
 0x0900 mem_usb_clear_mem_end
-0x0900 mem_config_new
-0x0940 mem_dg_rssi_noise_buffer
-0x0a40 mem_dg_rssi_noise_dg_buffer
-0x0b40 mem_dg_rssi_noise_ms_buffer
-0x0c40 mem_dg_rssi_noise_kb_buffer
-0x0d40 mem_usb_rxbuf_new//at least 68B
-0x0d84 mem_usb_rxbuf_new_end
-0x0940 mem_init_cnt
-0x0942 mem_data_pre
-0x0944 mem_data_current
-0x0946 mem_data_sum
-0x0949 mem_data_value
+0x0900 mem_dg_rssi_noise_buffer
+0x0a00 mem_dg_rssi_noise_dg_buffer
+0x0b00 mem_dg_rssi_noise_ms_buffer
+0x0c00 mem_dg_rssi_noise_kb_buffer
+0x0d00 mem_usb_rxbuf_new//at least 68B
+0x0d44 mem_usb_rxbuf_new_end
+0x0900 mem_init_cnt
+0x0902 mem_data_pre
+0x0904 mem_data_current
+0x0906 mem_data_sum
+0x0909 mem_data_value
 
 0x019a mem_le_new_param
 0x019a mem_le_new_transmitwindowsize
@@ -1327,6 +1326,8 @@
 0x45df mem_dg_24g_tx_power_default
 0x45e0 mem_24g_pair_tx_power_init
 0x45e1 mem_dg_bind_disable
+0x45e2 mem_dongle_kb_desc_new
+0x4628 mem_dongle_ms_desc_new
 0x451e mem_rssi_hex_received
 0x451f mem_24g_pair_sm
 0x4520 mem_24g_pair_no_ack
Index: output/program.lis
===================================================================
--- /1306ac/branch/dongle/usb_ats/usb_1M/output/program.lis	(revision 1068)
+++ /1306ac/branch/dongle/usb_ats/usb_1M/output/program.lis	(working copy)
@@ -8,18 +8,18 @@
 0005 c0180037 beq patch06_0 ,p_dongle_read_kb_bind_status 
 0006 c0188033 beq patch06_1 ,p_dongle_write_kb_bind_status 
 0007 c0380070 beq patch0e_0 ,p_dongle_init 
-0008 c0618088 beq patch18_3 ,p_usb_init 
-0009 c06580c6 beq patch19_3 ,p_usb0_request_get_descriptor 
-000a c06780a1 beq patch19_7 ,p_usb_tx 
+0008 c0618091 beq patch18_3 ,p_usb_init 
+0009 c06580e0 beq patch19_3 ,p_usb0_request_get_descriptor 
+000a c06780a3 beq patch19_7 ,p_usb_tx 
 000b 20203a8a branch assert 
 
 pf_patch_ext:
 000c c17f8000 rtneq patch3f_7 
-000d c02380f8 beq patch28_7 ,p_g24_bind_data_parse_next 
-000e c02480fe beq patch29_1 ,p_g24_receive_packet_start_next 
-000f c02680db beq patch29_5 ,p_g24_mode_switch_bind_search 
+000d c023810b beq patch28_7 ,p_g24_bind_data_parse_next 
+000e c0248111 beq patch29_1 ,p_g24_receive_packet_start_next 
+000f c02680ee beq patch29_5 ,p_g24_mode_switch_bind_search 
 0010 c027803b beq patch29_7 ,p_g24_bind_mode_auto 
-0011 c02800d0 beq patch2a_0 ,p_g24_search_mode_auto 
+0011 c02800e3 beq patch2a_0 ,p_g24_search_mode_auto 
 0012 20203a8a branch assert 
 
 p_initialize_radio_cont:
@@ -148,259 +148,284 @@
 006f 202039ef branch set_rf_ldo_cfg89 
 
 p_dongle_init:
-0070 58000073 setarg p_dongle_dispatch 
+0070 5800007c setarg p_dongle_dispatch 
 0071 67e1452b store 2 ,mem_cb_24g_receive_process 
-0072 202050ba branch dongle_init + 2 
+0072 580051b4 setarg dongle_g24_mouse 
+0073 67e1452f store 2 ,mem_cb_24g_data_device1 
+0074 5800007b setarg p_dongle_g24_kb 
+0075 67e14531 store 2 ,mem_cb_24g_data_device2 
+0076 58000130 setarg p_dongle_ackpayload_prep 
+0077 67e1452d store 2 ,mem_cb_24g_ackpayload 
+0078 580000c5 setarg p_dongle_usb_config 
+0079 67e106f3 store 2 ,mem_cb_usb_config 
+007a 2020703f branch usb_init 
+
+p_dongle_g24_kb:
+007b 20600000 rtn 
 
 p_dongle_dispatch:
-0073 6fe0c55b fetch 1 ,mem_24g_pair_mode 
-0074 c0000076 beq 0x00 ,p_dongle_auto_bind 
-0075 202050cd branch dongle_dispatch + 1 
+007c 6fe0c55b fetch 1 ,mem_24g_pair_mode 
+007d c000007f beq 0x00 ,p_dongle_auto_bind 
+007e 202050cd branch dongle_dispatch + 1 
 
 p_dongle_auto_bind:
-0076 20400081 call p_g24_mode_switch_init 
+007f 2040008a call p_g24_mode_switch_init 
 
 p_dongle_auto_bind_loop:
-0077 d8e00003 arg g24_mode_bind_enale_timer ,queue 
-0078 2040742e call timer_check 
-0079 205a0086 call p_g24_mode_switch_exit ,blank 
-007a 20404a7f call g24_mode_switch_bind_work 
-007b 20404aa5 call g24_mode_switch_bind_search 
-007c 20405183 call dongle_work_mode_auto 
-007d 20404adf call g24_bind_mode_auto 
-007e 20404afc call g24_search_mode_auto 
-007f 2040513f call dongle_usb_dispatch 
-0080 20200077 branch p_dongle_auto_bind_loop 
+0080 d8e00003 arg g24_mode_bind_enale_timer ,queue 
+0081 2040742e call timer_check 
+0082 205a008f call p_g24_mode_switch_exit ,blank 
+0083 20404a7f call g24_mode_switch_bind_work 
+0084 20404aa5 call g24_mode_switch_bind_search 
+0085 20405183 call dongle_work_mode_auto 
+0086 20404adf call g24_bind_mode_auto 
+0087 20404afc call g24_search_mode_auto 
+0088 2040513f call dongle_usb_dispatch 
+0089 20200080 branch p_dongle_auto_bind_loop 
 
 p_g24_mode_switch_init:
-0081 7045e100 jam 0 ,mem_dg_bind_disable 
-0082 5800bb80 setarg 48000 
-0083 d8e00003 arg g24_mode_bind_enale_timer ,queue 
-0084 20407420 call timer_init 
-0085 20204a7a branch g24_mode_switch_init 
+008a 7045e100 jam 0 ,mem_dg_bind_disable 
+008b 5800bb80 setarg 48000 
+008c d8e00003 arg g24_mode_bind_enale_timer ,queue 
+008d 20407420 call timer_init 
+008e 20204a7a branch g24_mode_switch_init 
 
 p_g24_mode_switch_exit:
-0086 7045e101 jam 1 ,mem_dg_bind_disable 
-0087 20600000 rtn 
+008f 7045e101 jam 1 ,mem_dg_bind_disable 
+0090 20600000 rtn 
 
 p_usb_init:
-0088 5800011d setarg p_dongle_ackpayload_prep 
-0089 67e1452d store 2 ,mem_cb_24g_ackpayload 
-008a 20406eb3 call enable_authrom 
-008b 20407056 call usb_init_param 
-008c 70062e00 jam 0x00 ,0x62e 
-008d 6fe08900 fetch 1 ,mem_config_new 
-008e 67e08630 store 1 ,mem_confdesc 
-008f 1fe27200 copy pdata ,loopcnt 
-0090 d8c00901 arg mem_config_new + 1 ,contr 
-0091 d8a00631 arg mem_confdesc + 1 ,contw 
-0092 20407419 call memcpy 
-0093 708c0000 jam 0x00 ,core_usb_config 
-0094 20002710 nop 10000 
-0095 708c1800 jam 0x00 ,core_usb_trig 
-0096 6ff10050 fetch 2 ,core_clkoff 
-0097 793ffe0a set0 clock_off_usb ,pdata 
-0098 67f10050 store 2 ,core_clkoff 
-0099 708c1100 jam 0x00 ,core_usb_hmode 
-009a 708c003c jam 0x3c ,core_usb_config 
-009b 58000d40 setarg mem_usb_rxbuf_new 
-009c 67f10c03 store 2 ,core_usb_rx_saddr 
-009d 67f10c07 store 2 ,core_usb_rxptr 
-009e 58000d84 setarg mem_usb_rxbuf_new_end 
-009f 67f10c05 store 2 ,core_usb_rx_eaddr 
-00a0 2020704f branch usb_init + 16 
+0091 20406eb3 call enable_authrom 
+0092 20407056 call usb_init_param 
+0093 70079b00 jam 0 ,mem_usb_get_protocol_flag 
+0094 70062e00 jam 0x00 ,0x62e 
+0095 708c0000 jam 0x00 ,core_usb_config 
+0096 20002710 nop 10000 
+0097 708c1800 jam 0x00 ,core_usb_trig 
+0098 6ff10050 fetch 2 ,core_clkoff 
+0099 793ffe0a set0 clock_off_usb ,pdata 
+009a 67f10050 store 2 ,core_clkoff 
+009b 708c1100 jam 0x00 ,core_usb_hmode 
+009c 708c003c jam 0x3c ,core_usb_config 
+009d 58000d00 setarg mem_usb_rxbuf_new 
+009e 67f10c03 store 2 ,core_usb_rx_saddr 
+009f 67f10c07 store 2 ,core_usb_rxptr 
+00a0 58000d44 setarg mem_usb_rxbuf_new_end 
+00a1 67f10c05 store 2 ,core_usb_rx_eaddr 
+00a2 2020704f branch usb_init + 16 
 
 p_usb_tx:
-00a1 6fe087ab fetch 1 ,mem_usb_tx_enable 
-00a2 207a0000 rtn blank 
-00a3 6ff08c24 fetch 1 ,core_usb_txbusy 
-00a4 1fe17e0f and_into 0x0f ,pdata 
-00a5 243a7383 nbranch usb_inwake_state_tx_dispose ,blank 
-00a6 6fe087ac fetch 1 ,mem_usb_device_enumeration_endflag 
-00a7 203a7356 branch usb_tx_fifo_release ,blank 
-00a8 6fe0879e fetch 1 ,mem_usb_state 
-00a9 c001f393 beq usb_sleep ,usb_windows_wakeup 
-00aa c0817356 bne usb_connected ,usb_tx_fifo_release 
-00ab 6fe087a0 fetch 1 ,mem_usb_clear_remote_wakeup 
-00ac 243a7356 nbranch usb_tx_fifo_release ,blank 
-00ad 2040732a call usb_tx_data_ep1 
-00ae 204000b0 call p_usb_tx_data_ep2 
-00af 20207342 branch usb_tx_data_ep3 
+00a3 6fe087ab fetch 1 ,mem_usb_tx_enable 
+00a4 207a0000 rtn blank 
+00a5 6ff08c24 fetch 1 ,core_usb_txbusy 
+00a6 1fe17e0f and_into 0x0f ,pdata 
+00a7 243a7383 nbranch usb_inwake_state_tx_dispose ,blank 
+00a8 6fe087ac fetch 1 ,mem_usb_device_enumeration_endflag 
+00a9 203a7356 branch usb_tx_fifo_release ,blank 
+00aa 6fe0879e fetch 1 ,mem_usb_state 
+00ab c001f393 beq usb_sleep ,usb_windows_wakeup 
+00ac c0817356 bne usb_connected ,usb_tx_fifo_release 
+00ad 6fe087a0 fetch 1 ,mem_usb_clear_remote_wakeup 
+00ae 243a7356 nbranch usb_tx_fifo_release ,blank 
+00af 2040732a call usb_tx_data_ep1 
+00b0 204000b2 call p_usb_tx_data_ep2 
+00b1 20207342 branch usb_tx_data_ep3 
 
 p_usb_tx_data_ep2:
-00b0 6ff08c24 fetch 1 ,core_usb_txbusy 
-00b1 c3808000 rtnbit1 1 
-00b2 6fe087ab fetch 1 ,mem_usb_tx_enable 
-00b3 c4010000 rtnbit0 2 
+00b2 6ff08c24 fetch 1 ,core_usb_txbusy 
+00b3 c3810000 rtnbit1 2 
 00b4 6fe087ab fetch 1 ,mem_usb_tx_enable 
-00b5 793ffe02 set0 2 ,pdata 
-00b6 67e087ab store 1 ,mem_usb_tx_enable 
-00b7 6fe087aa fetch 1 ,mem_usb_ep2_data 
-00b8 207a0000 rtn blank 
-00b9 c01000bd beq usb_ep2_ms ,p_usb_tx_ms_data 
-00ba c010f377 beq usb_ep2_multikey ,usb_tx_kb_multikey_data 
-00bb c011737f beq usb_ep2_systemkey ,usb_tx_kb_systemkey_data 
-00bc 20203a8a branch assert 
+00b5 c4010000 rtnbit0 2 
+00b6 6fe087ab fetch 1 ,mem_usb_tx_enable 
+00b7 793ffe02 set0 2 ,pdata 
+00b8 67e087ab store 1 ,mem_usb_tx_enable 
+00b9 6fe087aa fetch 1 ,mem_usb_ep2_data 
+00ba 207a0000 rtn blank 
+00bb c01000c0 beq usb_ep2_ms ,p_usb_tx_ms_data 
+00bc 7007aa00 jam 0 ,mem_usb_ep2_data 
+00bd c1108000 rtneq usb_ep2_multikey 
+00be c1110000 rtneq usb_ep2_systemkey 
+00bf 20203a8a branch assert 
 
 p_usb_tx_ms_data:
-00bd 6fe0879b fetch 1 ,mem_usb_get_protocol_flag 
-00be 203a00c2 branch p_usb_tx_ms_data_normal_mode ,blank 
-00bf 6fe0879c fetch 1 ,mem_usb_set_protocol_status 
-00c0 203a7364 branch usb_tx_ms_data_mac_boot_mode ,blank 
-00c1 202000c2 branch p_usb_tx_ms_data_normal_mode 
-
-p_usb_tx_ms_data_normal_mode:
-00c2 7007aa00 jam 0 ,mem_usb_ep2_data 
-
-p_usb_tx_mac_boot_ms_regroup_r_or_lrkey:
-00c3 df200008 arg 8 ,loopcnt 
-00c4 d8c007b1 arg mem_usb_mouse_data ,contr 
-00c5 2020730a branch usb_tx_ep1 
+00c0 6fe0879b fetch 1 ,mem_usb_get_protocol_flag 
+00c1 203a7373 branch usb_tx_ms_data_normal_mode ,blank 
+00c2 6fe0879c fetch 1 ,mem_usb_set_protocol_status 
+00c3 203a7364 branch usb_tx_ms_data_mac_boot_mode ,blank 
+00c4 20207373 branch usb_tx_ms_data_normal_mode 
+
+p_dongle_usb_config:
+00c5 6fe0c5b3 fetch 1 ,mem_dg_sys_config 
+00c6 c28200c9 bbit1 dg_enable_kb_icon ,p_dongle_usb_config_kb 
+00c7 6fe0c593 fetch 1 ,mem_dg_kb_bind_flag 
+00c8 c0ad00cd bne dongle_kb_bind_success ,p_dongle_usb_config_param 
+
+p_dongle_usb_config_kb:
+00c9 7045935a jam dongle_kb_bind_success ,mem_dg_kb_bind_flag 
+00ca 6ff2137a fetch 4 ,usb_devicedata_addr + 9 
+00cb 79207e1d set1 29 ,pdata 
+00cc 67e20626 store 4 ,mem_devicedesc + 9 
+
+p_dongle_usb_config_param:
+00cd 6fe0c5de fetch 1 ,mem_dg_usb_device_iserial_number 
+00ce 67e0862e store 1 ,mem_devicedesc + 17 
+00cf 204050fc call dongle_usb_device_name 
+00d0 2040708d call usb_tx_interval_config 
+00d1 204050e9 call dongle_usb_vid_pid_config 
+00d2 202000d3 branch p_dongle_usb_hid_icon_config 
+
+p_dongle_usb_hid_icon_config:
+00d3 6fe0c593 fetch 1 ,mem_dg_kb_bind_flag 
+00d4 c02d00d9 beq dongle_kb_bind_success ,p_dongle_usb_kb_hidreportdesc 
+00d5 58009272 setarg usb_kbdata_vendor_define_addr 
+00d6 67e105fb store 2 ,mem_hidreportdesc_kb 
+00d7 70064a1a jam 0x1a ,mem_confdesc + 26 
+00d8 20600000 rtn 
+
+p_dongle_usb_kb_hidreportdesc:
+00d9 580045e2 setarg mem_dongle_kb_desc_new 
+00da 67e105fb store 2 ,mem_hidreportdesc_kb 
+00db 70064a17 jam 0x17 ,mem_confdesc + 26 
+00dc 58004628 setarg mem_dongle_ms_desc_new 
+00dd 67e105fd store 2 ,mem_hidreportdesc_m 
+00de 7006634b jam 0x4b ,mem_confdesc + 51 
+00df 20600000 rtn 
 
 p_usb0_request_get_descriptor:
-00c6 6fe0870e fetch 1 ,mem_usb_setup_bvalueh 
-00c7 c000f145 beq dsc_device ,dsc_device_info 
-00c8 c010f137 beq dsc_hid ,dsc_hid_info + 1 
-00c9 c01100cb beq dsc_hid_report ,p_dsc_hid_report_info 
-00ca 20207130 branch usb0_request_get_descriptor + 2 
-
-p_dsc_hid_report_info:
-00cb 6fe1070f fetch 2 ,mem_usb_setup_windex 
-00cc c0007176 beq 0 ,dsc_hid_report_info1 
-00cd c000f176 beq 1 ,dsc_hid_report_info1 
-00ce c001717a beq 2 ,dsc_hid_report_info2 
-00cf 20207111 branch usb0_force_stall 
+00e0 6fe0870e fetch 1 ,mem_usb_setup_bvalueh 
+00e1 c010f137 beq dsc_hid ,dsc_hid_info + 1 
+00e2 20207130 branch usb0_request_get_descriptor + 2 
 
 p_g24_search_mode_auto:
-00d0 6fe0c561 fetch 1 ,mem_24g_work_mode 
-00d1 c1838000 rtnne dongle_search 
-00d2 204000d4 call p_g24_search_mode_init 
-00d3 20204b00 branch g24_search_mode_auto + 4 
+00e3 6fe0c561 fetch 1 ,mem_24g_work_mode 
+00e4 c1838000 rtnne dongle_search 
+00e5 204000e7 call p_g24_search_mode_init 
+00e6 20204b00 branch g24_search_mode_auto + 4 
 
 p_g24_search_mode_init:
-00d4 6fe0c560 fetch 1 ,mem_24g_mode_init 
-00d5 c3838000 rtnbit1 dongle_search 
-00d6 79207e07 set1 dongle_search ,pdata 
-00d7 67e0c560 store 1 ,mem_24g_mode_init 
-00d8 6fe0c56e fetch 1 ,mem_tx_power_temp 
-00d9 67e0c116 store 1 ,mem_tx_power 
-00da 20204af0 branch g24_search_mode_init + 4 
+00e7 6fe0c560 fetch 1 ,mem_24g_mode_init 
+00e8 c3838000 rtnbit1 dongle_search 
+00e9 79207e07 set1 dongle_search ,pdata 
+00ea 67e0c560 store 1 ,mem_24g_mode_init 
+00eb 6fe0c56e fetch 1 ,mem_tx_power_temp 
+00ec 67e0c116 store 1 ,mem_tx_power 
+00ed 20204af0 branch g24_search_mode_init + 4 
 
 p_g24_mode_switch_bind_search:
-00db 6fe0c561 fetch 1 ,mem_24g_work_mode 
-00dc c1000000 rtneq dongle_work 
-00dd 6fe0c575 fetch 1 ,mem_24g_b_s_mode_switch_disable 
-00de 247a0000 nrtn blank 
-00df 6fe0c573 fetch 1 ,mem_24g_mode_b_s_switch_exit 
-00e0 247a0000 nrtn blank 
-00e1 6fe0c56f fetch 1 ,mem_24g_mode_b_s_switch 
-00e2 207a0000 rtn blank 
-00e3 6fe0c51e fetch 1 ,mem_24g_device1_bind_step 
-00e4 c1800000 rtnne 0 
-00e5 6fe0c51f fetch 1 ,mem_24g_device2_bind_step 
-00e6 c1800000 rtnne 0 
-00e7 6fe0c576 fetch 1 ,mem_24g_bind_device_living 
-00e8 2fe00603 compare 3 ,pdata ,3 
-00e9 2020cac1 branch g24_mode_b_s_switch_exit ,true 
-00ea 204048be call g24_timer_check 
-00eb 24740000 nrtn user 
-00ec 6fe14571 fetch 2 ,mem_24g_mode_b_s_switch_cnt 
-00ed 1fe0fe01 increase 1 ,pdata 
-00ee 67e14571 store 2 ,mem_24g_mode_b_s_switch_cnt 
-00ef d84007d0 arg 0x7d0 ,temp 
-00f0 98467c00 isub temp ,null 
-00f1 20214ac1 branch g24_mode_b_s_switch_exit ,positive 
-00f2 6fe0c574 fetch 1 ,mem_24g_b_s_time_slice 
-00f3 1fe0fe01 increase 1 ,pdata 
-00f4 1fe17e01 and_into 1 ,pdata 
-00f5 67e0c574 store 1 ,mem_24g_b_s_time_slice 
-00f6 c0004b88 beq 0 ,g24_search_mode_enable 
-00f7 20204abc branch g24_mode_switch_bind_search_next + 1 
+00ee 6fe0c561 fetch 1 ,mem_24g_work_mode 
+00ef c1000000 rtneq dongle_work 
+00f0 6fe0c575 fetch 1 ,mem_24g_b_s_mode_switch_disable 
+00f1 247a0000 nrtn blank 
+00f2 6fe0c573 fetch 1 ,mem_24g_mode_b_s_switch_exit 
+00f3 247a0000 nrtn blank 
+00f4 6fe0c56f fetch 1 ,mem_24g_mode_b_s_switch 
+00f5 207a0000 rtn blank 
+00f6 6fe0c51e fetch 1 ,mem_24g_device1_bind_step 
+00f7 c1800000 rtnne 0 
+00f8 6fe0c51f fetch 1 ,mem_24g_device2_bind_step 
+00f9 c1800000 rtnne 0 
+00fa 6fe0c576 fetch 1 ,mem_24g_bind_device_living 
+00fb 2fe00603 compare 3 ,pdata ,3 
+00fc 2020cac1 branch g24_mode_b_s_switch_exit ,true 
+00fd 204048be call g24_timer_check 
+00fe 24740000 nrtn user 
+00ff 6fe14571 fetch 2 ,mem_24g_mode_b_s_switch_cnt 
+0100 1fe0fe01 increase 1 ,pdata 
+0101 67e14571 store 2 ,mem_24g_mode_b_s_switch_cnt 
+0102 d84007d0 arg 0x7d0 ,temp 
+0103 98467c00 isub temp ,null 
+0104 20214ac1 branch g24_mode_b_s_switch_exit ,positive 
+0105 6fe0c574 fetch 1 ,mem_24g_b_s_time_slice 
+0106 1fe0fe01 increase 1 ,pdata 
+0107 1fe17e01 and_into 1 ,pdata 
+0108 67e0c574 store 1 ,mem_24g_b_s_time_slice 
+0109 c0004b88 beq 0 ,g24_search_mode_enable 
+010a 20204abc branch g24_mode_switch_bind_search_next + 1 
 
 p_g24_bind_data_parse_next:
-00f8 6fe0c535 fetch 1 ,mem_24g_rxdata_temp + 2 
-00f9 c05549a2 beq datatype_bind ,g24_bind_first_step 
-00fa c02ac9b3 beq datatype_config ,g24_bind_second_step 
-00fb c01149d4 beq datatype_ok ,g24_bind_third_step 
-00fc c07f8113 beq datatype_attemp ,p_g24_data_attemp 
-00fd 20600000 rtn 
+010b 6fe0c535 fetch 1 ,mem_24g_rxdata_temp + 2 
+010c c05549a2 beq datatype_bind ,g24_bind_first_step 
+010d c02ac9b3 beq datatype_config ,g24_bind_second_step 
+010e c01149d4 beq datatype_ok ,g24_bind_third_step 
+010f c07f8126 beq datatype_attemp ,p_g24_data_attemp 
+0110 20600000 rtn 
 
 p_g24_receive_packet_start_next:
-00fe 6fe0c535 fetch 1 ,mem_24g_rxdata_temp + 2 
-00ff c0008103 beq datatype_device1 ,p_g24_data_device1 
-0100 c0014a4e beq datatype_device2 ,g24_data_device2 
-0101 c07f8111 beq datatype_attemp ,p_g24_data_receive_attemp 
-0102 20204a39 branch g24_rx_interrupt_clear 
+0111 6fe0c535 fetch 1 ,mem_24g_rxdata_temp + 2 
+0112 c0008116 beq datatype_device1 ,p_g24_data_device1 
+0113 c0014a4e beq datatype_device2 ,g24_data_device2 
+0114 c07f8124 beq datatype_attemp ,p_g24_data_receive_attemp 
+0115 20204a39 branch g24_rx_interrupt_clear 
 
 p_g24_data_device1:
-0103 20404a08 call g24_binding_dvc1_living 
-0104 20404ba2 call g24_ch_timer_reinit 
-0105 6fe0c555 fetch 1 ,mem_24g_abort_packet 
-0106 6848c533 fetcht 1 ,mem_24g_rxdata_temp 
-0107 284ffe03 isolate1 bit_abort ,temp 
-0108 7920fe00 setflag true ,0 ,pdata 
-0109 67e0c555 store 1 ,mem_24g_abort_packet 
-010a c000810c beq 1 ,p_g24_data_attemp_device1_abort 
-010b 20204a47 branch g24_data_device1 + 8 
+0116 20404a08 call g24_binding_dvc1_living 
+0117 20404ba2 call g24_ch_timer_reinit 
+0118 6fe0c555 fetch 1 ,mem_24g_abort_packet 
+0119 6848c533 fetcht 1 ,mem_24g_rxdata_temp 
+011a 284ffe03 isolate1 bit_abort ,temp 
+011b 7920fe00 setflag true ,0 ,pdata 
+011c 67e0c555 store 1 ,mem_24g_abort_packet 
+011d c000811f beq 1 ,p_g24_data_attemp_device1_abort 
+011e 20204a47 branch g24_data_device1 + 8 
 
 p_g24_data_attemp_device1_abort:
-010c 6fe0c529 fetch 1 ,mem_24g_device1_bind_disable 
-010d 247a0000 nrtn blank 
-010e 70452901 jam 1 ,mem_24g_device1_bind_disable 
-010f 6fe2453d fetch 4 ,mem_24g_rxdata_temp + 10 
-0110 20204c14 branch g24_store_device1_addr 
+011f 6fe0c529 fetch 1 ,mem_24g_device1_bind_disable 
+0120 247a0000 nrtn blank 
+0121 70452901 jam 1 ,mem_24g_device1_bind_disable 
+0122 6fe2453d fetch 4 ,mem_24g_rxdata_temp + 10 
+0123 20204c14 branch g24_store_device1_addr 
 
 p_g24_data_receive_attemp:
-0111 20404a16 call g24_bind_device_status 
-0112 20200113 branch p_g24_data_attemp 
+0124 20404a16 call g24_bind_device_status 
+0125 20200126 branch p_g24_data_attemp 
 
 p_g24_data_attemp:
-0113 6fe0c536 fetch 1 ,mem_24g_rxdata_temp + 3 
-0114 c0008117 beq datatype_device1 ,p_g24_data_attemp_device1 
-0115 c001011a beq datatype_device2 ,p_g24_data_attemp_device2 
-0116 20600000 rtn 
+0126 6fe0c536 fetch 1 ,mem_24g_rxdata_temp + 3 
+0127 c000812a beq datatype_device1 ,p_g24_data_attemp_device1 
+0128 c001012d beq datatype_device2 ,p_g24_data_attemp_device2 
+0129 20600000 rtn 
 
 p_g24_data_attemp_device1:
-0117 6fe0c529 fetch 1 ,mem_24g_device1_bind_disable 
-0118 247a0000 nrtn blank 
-0119 20204c12 branch g24_data_attemp_device1 
+012a 6fe0c529 fetch 1 ,mem_24g_device1_bind_disable 
+012b 247a0000 nrtn blank 
+012c 20204c12 branch g24_data_attemp_device1 
 
 p_g24_data_attemp_device2:
-011a 6fe0c52a fetch 1 ,mem_24g_device2_bind_disable 
-011b 247a0000 nrtn blank 
-011c 20204c16 branch g24_data_attemp_device2 
+012d 6fe0c52a fetch 1 ,mem_24g_device2_bind_disable 
+012e 247a0000 nrtn blank 
+012f 20204c16 branch g24_data_attemp_device2 
 
 p_dongle_ackpayload_prep:
-011d 6fe0c4d4 fetch 1 ,mem_24g_data_type 
-011e c0008120 beq datatype_device1 ,p_dongle_ackpayload_prep_mouse 
-011f c0010123 beq datatype_device2 ,p_dongle_ackpayload_prep_keyboard 
+0130 6fe0c4d4 fetch 1 ,mem_24g_data_type 
+0131 c0008133 beq datatype_device1 ,p_dongle_ackpayload_prep_mouse 
+0132 c0010136 beq datatype_device2 ,p_dongle_ackpayload_prep_keyboard 
 
 p_dongle_ackpayload_prep_mouse:
-0120 6fe0c5dd fetch 1 ,mem_dg_pc_sleep_flag 
-0121 c280519d bbit1 0 ,dongle_pc_sleep_ackpayload_prep_mouse 
-0122 20200125 branch p_dongle_ackpayload_prep_end 
+0133 6fe0c5dd fetch 1 ,mem_dg_pc_sleep_flag 
+0134 c280519d bbit1 0 ,dongle_pc_sleep_ackpayload_prep_mouse 
+0135 20200138 branch p_dongle_ackpayload_prep_end 
 
 p_dongle_ackpayload_prep_keyboard:
-0123 6fe0c5dd fetch 1 ,mem_dg_pc_sleep_flag 
-0124 c280d1a1 bbit1 1 ,dongle_pc_sleep_ackpayload_prep_keyboard 
+0136 6fe0c5dd fetch 1 ,mem_dg_pc_sleep_flag 
+0137 c280d1a1 bbit1 1 ,dongle_pc_sleep_ackpayload_prep_keyboard 
 
 p_dongle_ackpayload_prep_end:
-0125 6fe0c55c fetch 1 ,mem_24g_ackpayload_enable 
-0126 c0008129 beq bind_ackpayload ,p_dongle_g24_bind_ackpayload_prep 
-0127 c001812d beq kb_led_ackpayload ,p_dongle_g24_kb_led_ackpayload_prep 
-0128 20600000 rtn 
+0138 6fe0c55c fetch 1 ,mem_24g_ackpayload_enable 
+0139 c000813c beq bind_ackpayload ,p_dongle_g24_bind_ackpayload_prep 
+013a c0018140 beq kb_led_ackpayload ,p_dongle_g24_kb_led_ackpayload_prep 
+013b 20600000 rtn 
 
 p_dongle_g24_bind_ackpayload_prep:
-0129 70455c01 jam 1 ,mem_24g_ackpayload_enable 
-012a 6fe0c561 fetch 1 ,mem_24g_work_mode 
-012b c1000000 rtneq dongle_work 
-012c 202051a8 branch dongle_g24_bind_ackpayload_prep 
+013c 70455c01 jam 1 ,mem_24g_ackpayload_enable 
+013d 6fe0c561 fetch 1 ,mem_24g_work_mode 
+013e c1000000 rtneq dongle_work 
+013f 202051a8 branch dongle_g24_bind_ackpayload_prep 
 
 p_dongle_g24_kb_led_ackpayload_prep:
-012d 6fe0c444 fetch 1 ,mem_24g_rxbuf + 2 
-012e c0008129 beq datatype_device1 ,p_dongle_g24_bind_ackpayload_prep 
-012f c07f8129 beq datatype_attemp ,p_dongle_g24_bind_ackpayload_prep 
-0130 202051af branch dongle_g24_kb_led_ackpayload_prep + 3 
+0140 6fe0c444 fetch 1 ,mem_24g_rxbuf + 2 
+0141 c000813c beq datatype_device1 ,p_dongle_g24_bind_ackpayload_prep 
+0142 c07f813c beq datatype_attemp ,p_dongle_g24_bind_ackpayload_prep 
+0143 202051af branch dongle_g24_kb_led_ackpayload_prep + 3 
               org 0x3800
 
 start:
@@ -13112,22 +13137,22 @@
 mouse_drawing_optima_modify:
 5cca 20405cde call mouse_drawing_optima_xy_offset_modify 
 5ccb 6fe14677 fetch 2 ,mem_mouse_x_pre 
-5ccc 67e10942 store 2 ,mem_data_pre 
+5ccc 67e10902 store 2 ,mem_data_pre 
 5ccd 6fe14579 fetch 2 ,mem_mouse_x 
-5cce 67e10944 store 2 ,mem_data_current 
+5cce 67e10904 store 2 ,mem_data_current 
 5ccf 20405d17 call mouse_drawing_optima_data_x 
-5cd0 6fe10942 fetch 2 ,mem_data_pre 
+5cd0 6fe10902 fetch 2 ,mem_data_pre 
 5cd1 67e14677 store 2 ,mem_mouse_x_pre 
-5cd2 6fe10944 fetch 2 ,mem_data_current 
+5cd2 6fe10904 fetch 2 ,mem_data_current 
 5cd3 67e14579 store 2 ,mem_mouse_x 
 5cd4 6fe14679 fetch 2 ,mem_mouse_y_pre 
-5cd5 67e10942 store 2 ,mem_data_pre 
+5cd5 67e10902 store 2 ,mem_data_pre 
 5cd6 6fe1457b fetch 2 ,mem_mouse_y 
-5cd7 67e10944 store 2 ,mem_data_current 
+5cd7 67e10904 store 2 ,mem_data_current 
 5cd8 20405d1f call mouse_drawing_optima_data_y 
-5cd9 6fe10942 fetch 2 ,mem_data_pre 
+5cd9 6fe10902 fetch 2 ,mem_data_pre 
 5cda 67e14679 store 2 ,mem_mouse_y_pre 
-5cdb 6fe10944 fetch 2 ,mem_data_current 
+5cdb 6fe10904 fetch 2 ,mem_data_current 
 5cdc 67e1457b store 2 ,mem_mouse_y 
 5cdd 20600000 rtn 
 
@@ -13136,39 +13161,39 @@
 5cdf c41c8000 rtnbit0 mouse_enable_xy_offset 
 5ce0 44ac400b bpatch patch0b_0 ,mem_patch0b 
 5ce1 6fe14677 fetch 2 ,mem_mouse_x_pre 
-5ce2 67e10949 store 2 ,mem_data_value 
+5ce2 67e10909 store 2 ,mem_data_value 
 5ce3 20405cf2 call mouse_pre_xy_data_judge 
 5ce4 67e14677 store 2 ,mem_mouse_x_pre 
 5ce5 6fe14579 fetch 2 ,mem_mouse_x 
-5ce6 67e10949 store 2 ,mem_data_value 
+5ce6 67e10909 store 2 ,mem_data_value 
 5ce7 20405d00 call mouse_current_xy_data_judge 
 5ce8 67e14579 store 2 ,mem_mouse_x 
 5ce9 6fe14679 fetch 2 ,mem_mouse_y_pre 
-5cea 67e10949 store 2 ,mem_data_value 
+5cea 67e10909 store 2 ,mem_data_value 
 5ceb 20405cf2 call mouse_pre_xy_data_judge 
 5cec 67e14679 store 2 ,mem_mouse_y_pre 
 5ced 6fe1457b fetch 2 ,mem_mouse_y 
-5cee 67e10949 store 2 ,mem_data_value 
+5cee 67e10909 store 2 ,mem_data_value 
 5cef 20405d00 call mouse_current_xy_data_judge 
 5cf0 67e1457b store 2 ,mem_mouse_y 
 5cf1 20600000 rtn 
 
 mouse_pre_xy_data_judge:
-5cf2 6fe0894a fetch 1 ,mem_data_value + 1 
+5cf2 6fe0890a fetch 1 ,mem_data_value + 1 
 5cf3 203a5cf5 branch mouse_pre_xy_pdata_offset ,blank 
 5cf4 20205cfa branch mouse_pre_xy_ndata_offset 
 
 mouse_pre_xy_pdata_offset:
-5cf5 6fe08949 fetch 1 ,mem_data_value 
+5cf5 6fe08909 fetch 1 ,mem_data_value 
 5cf6 20405d0d call mouse_pre_xy_get_0_4_times 
-5cf7 67e08949 store 1 ,mem_data_value 
+5cf7 67e08909 store 1 ,mem_data_value 
 
 mouse_xy_data_offset_new:
-5cf8 6fe10949 fetch 2 ,mem_data_value 
+5cf8 6fe10909 fetch 2 ,mem_data_value 
 5cf9 20600000 rtn 
 
 mouse_pre_xy_ndata_offset:
-5cfa 6fe08949 fetch 1 ,mem_data_value 
+5cfa 6fe08909 fetch 1 ,mem_data_value 
 5cfb 20405d49 call mouse_pdata_invert 
 5cfc 20405d0d call mouse_pre_xy_get_0_4_times 
 5cfd 205a74d6 call disable_blank ,blank 
@@ -13176,18 +13201,18 @@
 5cff 20205cf8 branch mouse_xy_data_offset_new 
 
 mouse_current_xy_data_judge:
-5d00 6fe0894a fetch 1 ,mem_data_value + 1 
+5d00 6fe0890a fetch 1 ,mem_data_value + 1 
 5d01 203a5d03 branch mouse_current_xy_pdata_offset ,blank 
 5d02 20205d07 branch mouse_current_xy_ndata_offset 
 
 mouse_current_xy_pdata_offset:
-5d03 6fe08949 fetch 1 ,mem_data_value 
+5d03 6fe08909 fetch 1 ,mem_data_value 
 5d04 20405d12 call mouse_current_xy_get_0_6_times 
-5d05 67e08949 store 1 ,mem_data_value 
+5d05 67e08909 store 1 ,mem_data_value 
 5d06 20205cf8 branch mouse_xy_data_offset_new 
 
 mouse_current_xy_ndata_offset:
-5d07 6fe08949 fetch 1 ,mem_data_value 
+5d07 6fe08909 fetch 1 ,mem_data_value 
 5d08 20405d49 call mouse_pdata_invert 
 5d09 20405d12 call mouse_current_xy_get_0_6_times 
 5d0a 205a74d6 call disable_blank ,blank 
@@ -13209,8 +13234,8 @@
 5d16 20600000 rtn 
 
 mouse_drawing_optima_data_x:
-5d17 6fe10942 fetch 2 ,mem_data_pre 
-5d18 68490944 fetcht 2 ,mem_data_current 
+5d17 6fe10902 fetch 2 ,mem_data_pre 
+5d18 68490904 fetcht 2 ,mem_data_current 
 5d19 9840fe00 iadd temp ,pdata 
 5d1a 6848c67b fetcht 1 ,mem_mouse_data_xtemp 
 5d1b 9840fe00 iadd temp ,pdata 
@@ -13219,8 +13244,8 @@
 5d1e 20205d27 branch mouse_drawing_optima_data 
 
 mouse_drawing_optima_data_y:
-5d1f 6fe10942 fetch 2 ,mem_data_pre 
-5d20 68490944 fetcht 2 ,mem_data_current 
+5d1f 6fe10902 fetch 2 ,mem_data_pre 
+5d20 68490904 fetcht 2 ,mem_data_current 
 5d21 9840fe00 iadd temp ,pdata 
 5d22 6848c67c fetcht 1 ,mem_mouse_data_ytemp 
 5d23 9840fe00 iadd temp ,pdata 
@@ -13229,41 +13254,41 @@
 5d26 20205d27 branch mouse_drawing_optima_data 
 
 mouse_drawing_optima_data:
-5d27 67e18946 store 3 ,mem_data_sum 
+5d27 67e18906 store 3 ,mem_data_sum 
 5d28 2feffe10 isolate1 16 ,pdata 
 5d29 2020dd31 branch mouse_data_sum_overflow ,true 
-5d2a 6fe08947 fetch 1 ,mem_data_sum + 1 
+5d2a 6fe08907 fetch 1 ,mem_data_sum + 1 
 5d2b c07fdd38 beq 0xff ,mouse_data_sum_n 
-5d2c 6fe08946 fetch 1 ,mem_data_sum 
+5d2c 6fe08906 fetch 1 ,mem_data_sum 
 
 mouse_data_store_pre:
 5d2d 1fe37e00 rshift pdata ,pdata 
-5d2e 67e10942 store 2 ,mem_data_pre 
-5d2f 67e10944 store 2 ,mem_data_current 
+5d2e 67e10902 store 2 ,mem_data_pre 
+5d2f 67e10904 store 2 ,mem_data_current 
 5d30 20600000 rtn 
 
 mouse_data_sum_overflow:
-5d31 6fe08947 fetch 1 ,mem_data_sum + 1 
+5d31 6fe08907 fetch 1 ,mem_data_sum + 1 
 5d32 c0005d35 beq 0 ,mouse_data_sum_overflow_p 
-5d33 6fe18946 fetch 3 ,mem_data_sum 
+5d33 6fe18906 fetch 3 ,mem_data_sum 
 5d34 20205d2d branch mouse_data_store_pre 
 
 mouse_data_sum_overflow_p:
-5d35 70094800 jam 0 ,mem_data_sum + 2 
-5d36 6fe08946 fetch 1 ,mem_data_sum 
+5d35 70090800 jam 0 ,mem_data_sum + 2 
+5d36 6fe08906 fetch 1 ,mem_data_sum 
 5d37 20205d2d branch mouse_data_store_pre 
 
 mouse_data_sum_n:
-5d38 6fe08946 fetch 1 ,mem_data_sum 
+5d38 6fe08906 fetch 1 ,mem_data_sum 
 5d39 20405d43 call mouse_pdata_get_half 
-5d3a 67e08942 store 1 ,mem_data_pre 
-5d3b 67e08944 store 1 ,mem_data_current 
+5d3a 67e08902 store 1 ,mem_data_pre 
+5d3b 67e08904 store 1 ,mem_data_current 
 5d3c 203a5d41 branch mouse_data_zero ,blank 
 5d3d 580000ff setarg 0xff 
 
 mouse_data_set_direction:
-5d3e 67e08943 store 1 ,mem_data_pre + 1 
-5d3f 67e08945 store 1 ,mem_data_current + 1 
+5d3e 67e08903 store 1 ,mem_data_pre + 1 
+5d3f 67e08905 store 1 ,mem_data_current + 1 
 5d40 20600000 rtn 
 
 mouse_data_zero:
@@ -13277,7 +13302,7 @@
 mouse_pdata_get_new_value:
 5d45 20405d4a call mouse_rega_in_out 
 5d46 1fe67e00 sub pdata ,0 ,pdata 
-5d47 67e08949 store 1 ,mem_data_value 
+5d47 67e08909 store 1 ,mem_data_value 
 5d48 20600000 rtn 
 
 mouse_pdata_invert:
@@ -13320,17 +13345,17 @@
 5d61 20600000 rtn 
 
 mouse_data_abs:
-5d62 67e10944 store 2 ,mem_data_current 
-5d63 6fe08945 fetch 1 ,mem_data_current + 1 
+5d62 67e10904 store 2 ,mem_data_current 
+5d63 6fe08905 fetch 1 ,mem_data_current + 1 
 5d64 c07fdd68 beq 0xff ,mouse_data_reversal 
-5d65 6fe08944 fetch 1 ,mem_data_current 
+5d65 6fe08904 fetch 1 ,mem_data_current 
 
 mouse_data_abs_store:
 5d66 1fe17eff and_into 0xff ,pdata 
 5d67 20600000 rtn 
 
 mouse_data_reversal:
-5d68 6fe10944 fetch 2 ,mem_data_current 
+5d68 6fe10904 fetch 2 ,mem_data_current 
 5d69 1fe67e00 sub pdata ,0 ,pdata 
 5d6a 20205d66 branch mouse_data_abs_store 
 
Index: output/romcode.rom
===================================================================
--- /1306ac/branch/dongle/usb_ats/usb_1M/output/romcode.rom	(revision 1068)
+++ /1306ac/branch/dongle/usb_ats/usb_1M/output/romcode.rom	(working copy)
@@ -9418,66 +9418,66 @@
 202073ec
 20405cde
 6fe14677
-67e10942
+67e10902
 6fe14579
-67e10944
+67e10904
 20405d17
-6fe10942
+6fe10902
 67e14677
-6fe10944
+6fe10904
 67e14579
 6fe14679
-67e10942
+67e10902
 6fe1457b
-67e10944
+67e10904
 20405d1f
-6fe10942
+6fe10902
 67e14679
-6fe10944
+6fe10904
 67e1457b
 20600000
 6fe44864
 c41c8000
 44ac400b
 6fe14677
-67e10949
+67e10909
 20405cf2
 67e14677
 6fe14579
-67e10949
+67e10909
 20405d00
 67e14579
 6fe14679
-67e10949
+67e10909
 20405cf2
 67e14679
 6fe1457b
-67e10949
+67e10909
 20405d00
 67e1457b
 20600000
-6fe0894a
+6fe0890a
 203a5cf5
 20205cfa
-6fe08949
+6fe08909
 20405d0d
-67e08949
-6fe10949
+67e08909
+6fe10909
 20600000
-6fe08949
+6fe08909
 20405d49
 20405d0d
 205a74d6
 20405d45
 20205cf8
-6fe0894a
+6fe0890a
 203a5d03
 20205d07
-6fe08949
+6fe08909
 20405d12
-67e08949
+67e08909
 20205cf8
-6fe08949
+6fe08909
 20405d49
 20405d12
 205a74d6
@@ -9493,47 +9493,47 @@
 20407475
 1807fe00
 20600000
-6fe10942
-68490944
+6fe10902
+68490904
 9840fe00
 6848c67b
 9840fe00
 1fe10401
 6048c67b
 20205d27
-6fe10942
-68490944
+6fe10902
+68490904
 9840fe00
 6848c67c
 9840fe00
 1fe10401
 6048c67c
 20205d27
-67e18946
+67e18906
 2feffe10
 2020dd31
-6fe08947
+6fe08907
 c07fdd38
-6fe08946
+6fe08906
 1fe37e00
-67e10942
-67e10944
+67e10902
+67e10904
 20600000
-6fe08947
+6fe08907
 c0005d35
-6fe18946
+6fe18906
 20205d2d
-70094800
-6fe08946
+70090800
+6fe08906
 20205d2d
-6fe08946
+6fe08906
 20405d43
-67e08942
-67e08944
+67e08902
+67e08904
 203a5d41
 580000ff
-67e08943
-67e08945
+67e08903
+67e08905
 20600000
 58000000
 20205d3e
@@ -9541,7 +9541,7 @@
 1fe37e00
 20405d4a
 1fe67e00
-67e08949
+67e08909
 20600000
 1fe67e00
 67e084d8
@@ -9568,13 +9568,13 @@
 20405d62
 1fe22400
 20600000
-67e10944
-6fe08945
+67e10904
+6fe08905
 c07fdd68
-6fe08944
+6fe08904
 1fe17eff
 20600000
-6fe10944
+6fe10904
 1fe67e00
 20205d66
 da60456a
@@ -18429,4 +18429,4 @@
 a3ab1610
 00000042
 00000000
-000025cd
\ No newline at end of file
+0000b842
\ No newline at end of file
Index: program/patch.prog
===================================================================
--- /1306ac/branch/dongle/usb_ats/usb_1M/program/patch.prog	(revision 1068)
+++ /1306ac/branch/dongle/usb_ats/usb_1M/program/patch.prog	(working copy)
@@ -166,7 +166,18 @@
 p_dongle_init:
 	setarg p_dongle_dispatch
 	store 2,mem_cb_24g_receive_process
-	branch dongle_init+2
+	setarg dongle_g24_mouse
+	store 2,mem_cb_24g_data_device1
+	setarg p_dongle_g24_kb
+	store 2,mem_cb_24g_data_device2
+	setarg p_dongle_ackpayload_prep
+	store 2,mem_cb_24g_ackpayload
+	setarg p_dongle_usb_config
+	store 2,mem_cb_usb_config
+	branch usb_init
+
+p_dongle_g24_kb:
+	rtn
 
 p_dongle_dispatch:
 	fetch 1,mem_24g_pair_mode
@@ -199,17 +210,10 @@
 	rtn
 
 p_usb_init:
-	setarg p_dongle_ackpayload_prep
-	store 2,mem_cb_24g_ackpayload
 	call enable_authrom
 	call usb_init_param
-	jam 0x00,0x62e	
-	fetch 1,mem_config_new
-	store 1,mem_confdesc
-	copy pdata,loopcnt
-	arg mem_config_new+1,contr
-	arg mem_confdesc+1,contw
-	call memcpy
+	jam 0,mem_usb_get_protocol_flag
+	jam 0x00,0x62e
 	jam 0x00,core_usb_config
 	nop 10000
 	jam 0x00,core_usb_trig
@@ -242,7 +246,7 @@
 	branch usb_tx_data_ep3
 p_usb_tx_data_ep2:
 	fetch 1,core_usb_txbusy
-	rtnbit1 1
+	rtnbit1 2
 	fetch 1,mem_usb_tx_enable
 	rtnbit0 2
 	fetch 1,mem_usb_tx_enable
@@ -251,70 +255,56 @@
 	fetch 1,mem_usb_ep2_data
 	rtn blank
 	beq USB_EP2_MS,p_usb_tx_ms_data
-	beq USB_EP2_MULTIKEY,usb_tx_kb_multikey_data
-	beq USB_EP2_SYSTEMKEY,usb_tx_kb_systemkey_data
+	jam 0,mem_usb_ep2_data
+	rtneq USB_EP2_MULTIKEY
+	rtneq USB_EP2_SYSTEMKEY
 	branch assert
 p_usb_tx_ms_data:
 	fetch 1,mem_usb_get_protocol_flag
-	branch p_usb_tx_ms_data_normal_mode,blank
+	branch usb_tx_ms_data_normal_mode,blank
 	fetch 1,mem_usb_set_protocol_status
 	branch usb_tx_ms_data_mac_boot_mode,blank
-	branch p_usb_tx_ms_data_normal_mode
-p_usb_tx_ms_data_normal_mode:
-	jam 0,mem_usb_ep2_data
-p_usb_tx_mac_boot_ms_regroup_r_or_lrkey:
-	arg 8,loopcnt
-	arg mem_usb_mouse_data,contr
-	branch usb_tx_ep1
-/*
-p_le_enable_phy_by_pdata:
-	copy temp,pdata
-	bbit1 BIT_LE_2M_PHY,p_le_enable_2M
-	branch le_enable_phy_by_pdata+3
-p_le_enable_2M:
-	jam 0x89,core_rx_bq_cfg0	//bit7 set1,improve 2M rx sensitivity
-	branch le_enable_2M
-
-
-p_set_freq_tx:
-	jam 0x12,core_syn_top_ctrl
-	storet 1,mem_last_freq
-	add temp,2,rega
-	call rf_tx_write_freq
-	//bmark1 mark_pllon,txon
-	nop 600
-	branch txon
-*/
-/*
-p_g24_receive_skip_end:
+	branch usb_tx_ms_data_normal_mode
+
+p_dongle_usb_config:
 	fetch 1,mem_dg_sys_config
-	bbit0 DG_ENABLE_NEW_REVISION,g24_receive_skip_end+1
-	enable user3
-	nop 300
-	fetch 1,mem_24g_rxbuf+1
-	set1 bit_ack_24g,pdata
-	store 1,mem_24g_rxbuf+1	//sending ack once
-	//set1 mark_pllon,mark	//not waiting pll on
-	call g24_ackpayload_prep
-	call g24_transmit_prep
-	branch g24_transmit
-*/
+	bbit1 DG_ENABLE_KB_ICON,p_dongle_usb_config_kb
+	fetch 1,mem_dg_kb_bind_flag
+	bne DONGLE_KB_BIND_SUCCESS,p_dongle_usb_config_param
+p_dongle_usb_config_kb:
+	jam DONGLE_KB_BIND_SUCCESS,mem_dg_kb_bind_flag
+	fetch 4,USB_DEVICEDATA_ADDR+9
+	set1 29,pdata
+	store 4,mem_devicedesc+9
+p_dongle_usb_config_param:
+	fetch 1,mem_dg_usb_device_iserial_number
+	store 1,mem_devicedesc+17
+	call dongle_usb_device_name
+	call usb_tx_interval_config
+	call dongle_usb_vid_pid_config
+	branch p_dongle_usb_hid_icon_config
+
+p_dongle_usb_hid_icon_config:
+	fetch 1,mem_dg_kb_bind_flag
+	beq DONGLE_KB_BIND_SUCCESS,p_dongle_usb_kb_hidreportdesc
+	setarg USB_KBDATA_VENDOR_DEFINE_ADDR
+	store 2,mem_hidreportdesc_kb
+	jam 0x1a,mem_confdesc+26//hid_descriptor--keyboard length
+	rtn
+	
+p_dongle_usb_kb_hidreportdesc:
+	setarg mem_dongle_kb_desc_new
+	store 2,mem_hidreportdesc_kb
+	jam 0x17,mem_confdesc+26//hid_descriptor--keyboard length	
+	setarg mem_dongle_ms_desc_new
+	store 2,mem_hidreportdesc_m
+	jam 0x4b,mem_confdesc+51
+	rtn
 
 p_usb0_request_get_descriptor:
 	fetch 1,mem_usb_setup_bValueH
-	beq DSC_DEVICE,dsc_device_info
 	beq DSC_HID,dsc_hid_info+1
-	beq DSC_HID_REPORT,p_dsc_hid_report_info
 	branch usb0_request_get_descriptor+2
-p_dsc_hid_report_info:
-	fetch 2,mem_usb_setup_wIndex
-	beq 0,dsc_hid_report_info1//p_dsc_hid_report_info0
-	beq 1,dsc_hid_report_info1
-	beq 2,dsc_hid_report_info2
-	branch usb0_force_stall
-// p_dsc_hid_report_info0:
-// 	fetchr rega,2,mem_hidreportdesc_m
-// 	branch usb0_respond_length
 
 
 
Index: sched/dongle.dat
===================================================================
--- /1306ac/branch/dongle/usb_ats/usb_1M/sched/dongle.dat	(revision 1068)
+++ /1306ac/branch/dongle/usb_ats/usb_1M/sched/dongle.dat	(working copy)
@@ -10,12 +10,12 @@
 #sys config
 #bit4:enable kb icon
 #bit0:enable new revision
-mem_dg_sys_config:00
+mem_dg_sys_config:10
 
 
 
 #rf config
-mem_24g_lap:36 60 f0 55 12 13#low 4B used for 24g rxaddr
+mem_24g_lap:33 16 f0 55 12 13#low 4B used for 24g rxaddr
 #mem_24g_tx_phy:02#0x01:1M/0x02:2M/0x04:S2/0x84:S8
 #mem_24g_rx_phy:02#0x01:1M/0x02:2M/0x04:S2/0x84:S8
 #mem_24g_disable_fec1:01
@@ -44,11 +44,6 @@
 #mem_rssi_noise_device1_buffer_ptr:mem_dg_rssi_noise_ms_buffer
 #mem_rssi_noise_device2_buffer_ptr:mem_dg_rssi_noise_kb_buffer
 
-mem_config_new:
-22 09 02 22 00 01 01 00 A0 32
-09 04 00 00 01 03 01 02 00
-09 21 00 02 00 01 22 a3 00
-07 05 81 03 40 00 02
 
 
 #usb config
@@ -74,7 +69,7 @@
 
 mem_usb_sdsystem_wakeup_flag_judge:01
 
-mem_24g_pair_tx_power_init:a8 #a8=-40 a9=-45 ab=-47 b2=-50
+mem_24g_pair_tx_power_init:ab #a8=-40 a9=-45 ab=-47 b2=-50
 
 #ep3 config
 mem_usb_ep3_enable:00
@@ -218,6 +213,58 @@
 #02		#bInterval
 
 
-
+mem_dongle_kb_desc_new:
+17
+05 0c  		
+09 01  		
+a1 01				
+19 00  		
+2a ff 03 
+15 00 
+26 ff 03 		
+95 01  		
+75 10  			
+81 00  		
+c0
+
+mem_dongle_ms_desc_new:
+4B
+05 01 
+09 02 
+A1 01 
+85 01 
+09 01 
+A1 00 
+05 09 
+19 01 
+29 05 
+15 00 
+25 01 
+95 05 
+75 01 
+81 02 
+95 01 
+75 03 
+81 01 
+05 01 
+09 30 
+09 31 
+16 01 F8 
+26 FF 07 
+75 10 
+95 02 
+81 06 
+09 38 
+15 81 
+25 7F 
+75 08 
+95 01 
+81 06 
+05 0C 
+0A 38 02 
+95 01 
+81 06 
+C0 
+C0 
 
 
