Index: format/usb.format
===================================================================
--- /1306ac/branch/dongle/usb_ats/usb_1M/format/usb.format	(revision 1062)
+++ /1306ac/branch/dongle/usb_ats/usb_1M/format/usb.format	(working copy)
@@ -143,24 +143,24 @@
 0x09 SET_REPORT				   // Code for Set Report
 0x0A SET_IDLE				   // Code for Set Idle
 0x0B SET_PROTOCOL			   // Code for Set Protocol
-0xF2 HID_REPORT_ID           
-64 EP0_PACKET_SIZE         
-6 EP1_PACKET_SIZE         
-16 HID_REPORT_SIZE         
-0x001B HID_REPORT_DESCRIPTOR_SIZE    
+0xF2 HID_REPORT_ID
+64 EP0_PACKET_SIZE
+6 EP1_PACKET_SIZE
+16 HID_REPORT_SIZE
+0x001B HID_REPORT_DESCRIPTOR_SIZE
 )
 //math cordic
 (
-0 TYPE_SIN		
-1 TYPE_ATAN	
-2 TYPE_MULT	
-3 TYPE_DIV		
-4 TYPE_ASIN	
-5 TYPE_SQRT	
-6 TYPE_COS		
-7 TYPE_TAN		 
+0 TYPE_SIN
+1 TYPE_ATAN
+2 TYPE_MULT
+3 TYPE_DIV
+4 TYPE_ASIN
+5 TYPE_SQRT
+6 TYPE_COS
+7 TYPE_TAN
 )
-   
+
 (
 0 DFIFO0_IN_EMPTY
 1 DFIFO1_IN_EMPTY
@@ -241,10 +241,10 @@
 // Define wIndex bitmaps
 0x81 IN_EP1                    // Index values used by Set and Clear
 0x01 OUT_EP1                   // commands for Endpoint_Halt
-0x82 IN_EP2              
-0x02 OUT_EP2             
-0x83 IN_EP3              
-0x03 OUT_EP3             
+0x82 IN_EP2
+0x02 OUT_EP2
+0x83 IN_EP3
+0x03 OUT_EP3
 )
 
 (
Index: output/eeprom.dat
===================================================================
--- /1306ac/branch/dongle/usb_ats/usb_1M/output/eeprom.dat	(revision 1062)
+++ /1306ac/branch/dongle/usb_ats/usb_1M/output/eeprom.dat	(working copy)
@@ -2,7 +2,7 @@
 02
 aa
 55
-16
+36
 04
 c2
 84
@@ -55,15 +55,15 @@
 c0
 23
 80
-cc
+d4
 c0
 24
 80
-d2
+da
 c0
 26
 80
-af
+b7
 c0
 27
 80
@@ -71,7 +71,7 @@
 c0
 28
 00
-a4
+ac
 20
 20
 3a
@@ -443,7 +443,7 @@
 58
 00
 00
-f1
+f9
 67
 e1
 45
@@ -656,11 +656,43 @@
 10
 f1
 37
+c0
+11
+00
+a5
 20
 20
 71
 30
 6f
+e1
+07
+0f
+c0
+00
+00
+aa
+c0
+00
+f1
+76
+c0
+01
+71
+7a
+20
+20
+71
+11
+6a
+21
+05
+fd
+20
+20
+72
+c6
+6f
 e0
 c5
 61
@@ -671,7 +703,7 @@
 20
 40
 00
-a8
+b0
 20
 20
 4b
@@ -839,7 +871,7 @@
 c0
 7f
 80
-e7
+ef
 20
 60
 00
@@ -851,7 +883,7 @@
 c0
 00
 80
-d7
+df
 c0
 01
 4a
@@ -859,7 +891,7 @@
 c0
 7f
 80
-e5
+ed
 20
 20
 4a
@@ -895,7 +927,7 @@
 c0
 00
 80
-e0
+e8
 20
 20
 4a
@@ -927,7 +959,7 @@
 20
 20
 00
-e7
+ef
 6f
 e0
 c5
@@ -935,11 +967,11 @@
 c0
 00
 80
-eb
+f3
 c0
 01
 00
-ee
+f6
 20
 60
 00
@@ -975,11 +1007,11 @@
 c0
 00
 80
-f4
+fc
 c0
 01
 00
-f7
+ff
 6f
 e0
 c5
@@ -990,8 +1022,8 @@
 9d
 20
 20
-00
-f9
+01
+01
 6f
 e0
 c5
@@ -1006,12 +1038,12 @@
 5c
 c0
 00
-80
-fd
+81
+05
 c0
 01
 81
-01
+09
 20
 60
 00
@@ -1038,18 +1070,18 @@
 44
 c0
 00
-80
-fd
+81
+05
 c0
 7f
-80
-fd
+81
+05
 20
 20
 51
 af
-bb
-7b
+04
+00
 aa
 55
 40
@@ -1357,5 +1389,5 @@
 55
 42
 48
-d2
-2c
+e4
+2d
Index: output/program.lis
===================================================================
--- /1306ac/branch/dongle/usb_ats/usb_1M/output/program.lis	(revision 1062)
+++ /1306ac/branch/dongle/usb_ats/usb_1M/output/program.lis	(working copy)
@@ -14,11 +14,11 @@
 
 pf_patch_ext:
 000b c17f8000 rtneq patch3f_7 
-000c c02380cc beq patch28_7 ,p_g24_bind_data_parse_next 
-000d c02480d2 beq patch29_1 ,p_g24_receive_packet_start_next 
-000e c02680af beq patch29_5 ,p_g24_mode_switch_bind_search 
+000c c02380d4 beq patch28_7 ,p_g24_bind_data_parse_next 
+000d c02480da beq patch29_1 ,p_g24_receive_packet_start_next 
+000e c02680b7 beq patch29_5 ,p_g24_mode_switch_bind_search 
 000f c027803a beq patch29_7 ,p_g24_bind_mode_auto 
-0010 c02800a4 beq patch2a_0 ,p_g24_search_mode_auto 
+0010 c02800ac beq patch2a_0 ,p_g24_search_mode_auto 
 0011 20203a8a branch assert 
 
 p_initialize_radio_cont:
@@ -145,7 +145,7 @@
 006c 2020005f branch p_set_tx_power_f20db + 2 
 
 p_usb_init:
-006d 580000f1 setarg p_dongle_ackpayload_prep 
+006d 580000f9 setarg p_dongle_ackpayload_prep 
 006e 67e1452d store 2 ,mem_cb_24g_ackpayload 
 006f 20406eb3 call enable_authrom 
 0070 20407056 call usb_init_param 
@@ -207,138 +207,150 @@
 00a0 6fe0870e fetch 1 ,mem_usb_setup_bvalueh 
 00a1 c000f145 beq dsc_device ,dsc_device_info 
 00a2 c010f137 beq dsc_hid ,dsc_hid_info + 1 
-00a3 20207130 branch usb0_request_get_descriptor + 2 
+00a3 c01100a5 beq dsc_hid_report ,p_dsc_hid_report_info 
+00a4 20207130 branch usb0_request_get_descriptor + 2 
+
+p_dsc_hid_report_info:
+00a5 6fe1070f fetch 2 ,mem_usb_setup_windex 
+00a6 c00000aa beq 0 ,p_dsc_hid_report_info0 
+00a7 c000f176 beq 1 ,dsc_hid_report_info1 
+00a8 c001717a beq 2 ,dsc_hid_report_info2 
+00a9 20207111 branch usb0_force_stall 
+
+p_dsc_hid_report_info0:
+00aa 6a2105fd fetchr rega ,2 ,mem_hidreportdesc_m 
+00ab 202072c6 branch usb0_respond_length 
 
 p_g24_search_mode_auto:
-00a4 6fe0c561 fetch 1 ,mem_24g_work_mode 
-00a5 c1838000 rtnne dongle_search 
-00a6 204000a8 call p_g24_search_mode_init 
-00a7 20204b00 branch g24_search_mode_auto + 4 
+00ac 6fe0c561 fetch 1 ,mem_24g_work_mode 
+00ad c1838000 rtnne dongle_search 
+00ae 204000b0 call p_g24_search_mode_init 
+00af 20204b00 branch g24_search_mode_auto + 4 
 
 p_g24_search_mode_init:
-00a8 6fe0c560 fetch 1 ,mem_24g_mode_init 
-00a9 c3838000 rtnbit1 dongle_search 
-00aa 79207e07 set1 dongle_search ,pdata 
-00ab 67e0c560 store 1 ,mem_24g_mode_init 
-00ac 6fe0c56e fetch 1 ,mem_tx_power_temp 
-00ad 67e0c116 store 1 ,mem_tx_power 
-00ae 20204af0 branch g24_search_mode_init + 4 
+00b0 6fe0c560 fetch 1 ,mem_24g_mode_init 
+00b1 c3838000 rtnbit1 dongle_search 
+00b2 79207e07 set1 dongle_search ,pdata 
+00b3 67e0c560 store 1 ,mem_24g_mode_init 
+00b4 6fe0c56e fetch 1 ,mem_tx_power_temp 
+00b5 67e0c116 store 1 ,mem_tx_power 
+00b6 20204af0 branch g24_search_mode_init + 4 
 
 p_g24_mode_switch_bind_search:
-00af 6fe0c561 fetch 1 ,mem_24g_work_mode 
-00b0 c1000000 rtneq dongle_work 
-00b1 6fe0c575 fetch 1 ,mem_24g_b_s_mode_switch_disable 
-00b2 247a0000 nrtn blank 
-00b3 6fe0c573 fetch 1 ,mem_24g_mode_b_s_switch_exit 
-00b4 247a0000 nrtn blank 
-00b5 6fe0c56f fetch 1 ,mem_24g_mode_b_s_switch 
-00b6 207a0000 rtn blank 
-00b7 6fe0c51e fetch 1 ,mem_24g_device1_bind_step 
-00b8 c1800000 rtnne 0 
-00b9 6fe0c51f fetch 1 ,mem_24g_device2_bind_step 
-00ba c1800000 rtnne 0 
-00bb 6fe0c576 fetch 1 ,mem_24g_bind_device_living 
-00bc 2fe00603 compare 3 ,pdata ,3 
-00bd 2020cac1 branch g24_mode_b_s_switch_exit ,true 
-00be 204048be call g24_timer_check 
-00bf 24740000 nrtn user 
-00c0 6fe14571 fetch 2 ,mem_24g_mode_b_s_switch_cnt 
-00c1 1fe0fe01 increase 1 ,pdata 
-00c2 67e14571 store 2 ,mem_24g_mode_b_s_switch_cnt 
-00c3 d84007d0 arg 0x7d0 ,temp 
-00c4 98467c00 isub temp ,null 
-00c5 20214ac1 branch g24_mode_b_s_switch_exit ,positive 
-00c6 6fe0c574 fetch 1 ,mem_24g_b_s_time_slice 
-00c7 1fe0fe01 increase 1 ,pdata 
-00c8 1fe17e01 and_into 1 ,pdata 
-00c9 67e0c574 store 1 ,mem_24g_b_s_time_slice 
-00ca c0004b88 beq 0 ,g24_search_mode_enable 
-00cb 20204abc branch g24_mode_switch_bind_search_next + 1 
+00b7 6fe0c561 fetch 1 ,mem_24g_work_mode 
+00b8 c1000000 rtneq dongle_work 
+00b9 6fe0c575 fetch 1 ,mem_24g_b_s_mode_switch_disable 
+00ba 247a0000 nrtn blank 
+00bb 6fe0c573 fetch 1 ,mem_24g_mode_b_s_switch_exit 
+00bc 247a0000 nrtn blank 
+00bd 6fe0c56f fetch 1 ,mem_24g_mode_b_s_switch 
+00be 207a0000 rtn blank 
+00bf 6fe0c51e fetch 1 ,mem_24g_device1_bind_step 
+00c0 c1800000 rtnne 0 
+00c1 6fe0c51f fetch 1 ,mem_24g_device2_bind_step 
+00c2 c1800000 rtnne 0 
+00c3 6fe0c576 fetch 1 ,mem_24g_bind_device_living 
+00c4 2fe00603 compare 3 ,pdata ,3 
+00c5 2020cac1 branch g24_mode_b_s_switch_exit ,true 
+00c6 204048be call g24_timer_check 
+00c7 24740000 nrtn user 
+00c8 6fe14571 fetch 2 ,mem_24g_mode_b_s_switch_cnt 
+00c9 1fe0fe01 increase 1 ,pdata 
+00ca 67e14571 store 2 ,mem_24g_mode_b_s_switch_cnt 
+00cb d84007d0 arg 0x7d0 ,temp 
+00cc 98467c00 isub temp ,null 
+00cd 20214ac1 branch g24_mode_b_s_switch_exit ,positive 
+00ce 6fe0c574 fetch 1 ,mem_24g_b_s_time_slice 
+00cf 1fe0fe01 increase 1 ,pdata 
+00d0 1fe17e01 and_into 1 ,pdata 
+00d1 67e0c574 store 1 ,mem_24g_b_s_time_slice 
+00d2 c0004b88 beq 0 ,g24_search_mode_enable 
+00d3 20204abc branch g24_mode_switch_bind_search_next + 1 
 
 p_g24_bind_data_parse_next:
-00cc 6fe0c535 fetch 1 ,mem_24g_rxdata_temp + 2 
-00cd c05549a2 beq datatype_bind ,g24_bind_first_step 
-00ce c02ac9b3 beq datatype_config ,g24_bind_second_step 
-00cf c01149d4 beq datatype_ok ,g24_bind_third_step 
-00d0 c07f80e7 beq datatype_attemp ,p_g24_data_attemp 
-00d1 20600000 rtn 
+00d4 6fe0c535 fetch 1 ,mem_24g_rxdata_temp + 2 
+00d5 c05549a2 beq datatype_bind ,g24_bind_first_step 
+00d6 c02ac9b3 beq datatype_config ,g24_bind_second_step 
+00d7 c01149d4 beq datatype_ok ,g24_bind_third_step 
+00d8 c07f80ef beq datatype_attemp ,p_g24_data_attemp 
+00d9 20600000 rtn 
 
 p_g24_receive_packet_start_next:
-00d2 6fe0c535 fetch 1 ,mem_24g_rxdata_temp + 2 
-00d3 c00080d7 beq datatype_device1 ,p_g24_data_device1 
-00d4 c0014a4e beq datatype_device2 ,g24_data_device2 
-00d5 c07f80e5 beq datatype_attemp ,p_g24_data_receive_attemp 
-00d6 20204a39 branch g24_rx_interrupt_clear 
+00da 6fe0c535 fetch 1 ,mem_24g_rxdata_temp + 2 
+00db c00080df beq datatype_device1 ,p_g24_data_device1 
+00dc c0014a4e beq datatype_device2 ,g24_data_device2 
+00dd c07f80ed beq datatype_attemp ,p_g24_data_receive_attemp 
+00de 20204a39 branch g24_rx_interrupt_clear 
 
 p_g24_data_device1:
-00d7 20404a08 call g24_binding_dvc1_living 
-00d8 20404ba2 call g24_ch_timer_reinit 
-00d9 6fe0c555 fetch 1 ,mem_24g_abort_packet 
-00da 6848c533 fetcht 1 ,mem_24g_rxdata_temp 
-00db 284ffe03 isolate1 bit_abort ,temp 
-00dc 7920fe00 setflag true ,0 ,pdata 
-00dd 67e0c555 store 1 ,mem_24g_abort_packet 
-00de c00080e0 beq 1 ,p_g24_data_attemp_device1_abort 
-00df 20204a47 branch g24_data_device1 + 8 
+00df 20404a08 call g24_binding_dvc1_living 
+00e0 20404ba2 call g24_ch_timer_reinit 
+00e1 6fe0c555 fetch 1 ,mem_24g_abort_packet 
+00e2 6848c533 fetcht 1 ,mem_24g_rxdata_temp 
+00e3 284ffe03 isolate1 bit_abort ,temp 
+00e4 7920fe00 setflag true ,0 ,pdata 
+00e5 67e0c555 store 1 ,mem_24g_abort_packet 
+00e6 c00080e8 beq 1 ,p_g24_data_attemp_device1_abort 
+00e7 20204a47 branch g24_data_device1 + 8 
 
 p_g24_data_attemp_device1_abort:
-00e0 6fe0c529 fetch 1 ,mem_24g_device1_bind_disable 
-00e1 247a0000 nrtn blank 
-00e2 70452901 jam 1 ,mem_24g_device1_bind_disable 
-00e3 6fe2453d fetch 4 ,mem_24g_rxdata_temp + 10 
-00e4 20204c14 branch g24_store_device1_addr 
+00e8 6fe0c529 fetch 1 ,mem_24g_device1_bind_disable 
+00e9 247a0000 nrtn blank 
+00ea 70452901 jam 1 ,mem_24g_device1_bind_disable 
+00eb 6fe2453d fetch 4 ,mem_24g_rxdata_temp + 10 
+00ec 20204c14 branch g24_store_device1_addr 
 
 p_g24_data_receive_attemp:
-00e5 20404a16 call g24_bind_device_status 
-00e6 202000e7 branch p_g24_data_attemp 
+00ed 20404a16 call g24_bind_device_status 
+00ee 202000ef branch p_g24_data_attemp 
 
 p_g24_data_attemp:
-00e7 6fe0c536 fetch 1 ,mem_24g_rxdata_temp + 3 
-00e8 c00080eb beq datatype_device1 ,p_g24_data_attemp_device1 
-00e9 c00100ee beq datatype_device2 ,p_g24_data_attemp_device2 
-00ea 20600000 rtn 
+00ef 6fe0c536 fetch 1 ,mem_24g_rxdata_temp + 3 
+00f0 c00080f3 beq datatype_device1 ,p_g24_data_attemp_device1 
+00f1 c00100f6 beq datatype_device2 ,p_g24_data_attemp_device2 
+00f2 20600000 rtn 
 
 p_g24_data_attemp_device1:
-00eb 6fe0c529 fetch 1 ,mem_24g_device1_bind_disable 
-00ec 247a0000 nrtn blank 
-00ed 20204c12 branch g24_data_attemp_device1 
+00f3 6fe0c529 fetch 1 ,mem_24g_device1_bind_disable 
+00f4 247a0000 nrtn blank 
+00f5 20204c12 branch g24_data_attemp_device1 
 
 p_g24_data_attemp_device2:
-00ee 6fe0c52a fetch 1 ,mem_24g_device2_bind_disable 
-00ef 247a0000 nrtn blank 
-00f0 20204c16 branch g24_data_attemp_device2 
+00f6 6fe0c52a fetch 1 ,mem_24g_device2_bind_disable 
+00f7 247a0000 nrtn blank 
+00f8 20204c16 branch g24_data_attemp_device2 
 
 p_dongle_ackpayload_prep:
-00f1 6fe0c4d4 fetch 1 ,mem_24g_data_type 
-00f2 c00080f4 beq datatype_device1 ,p_dongle_ackpayload_prep_mouse 
-00f3 c00100f7 beq datatype_device2 ,p_dongle_ackpayload_prep_keyboard 
+00f9 6fe0c4d4 fetch 1 ,mem_24g_data_type 
+00fa c00080fc beq datatype_device1 ,p_dongle_ackpayload_prep_mouse 
+00fb c00100ff beq datatype_device2 ,p_dongle_ackpayload_prep_keyboard 
 
 p_dongle_ackpayload_prep_mouse:
-00f4 6fe0c5dd fetch 1 ,mem_dg_pc_sleep_flag 
-00f5 c280519d bbit1 0 ,dongle_pc_sleep_ackpayload_prep_mouse 
-00f6 202000f9 branch p_dongle_ackpayload_prep_end 
+00fc 6fe0c5dd fetch 1 ,mem_dg_pc_sleep_flag 
+00fd c280519d bbit1 0 ,dongle_pc_sleep_ackpayload_prep_mouse 
+00fe 20200101 branch p_dongle_ackpayload_prep_end 
 
 p_dongle_ackpayload_prep_keyboard:
-00f7 6fe0c5dd fetch 1 ,mem_dg_pc_sleep_flag 
-00f8 c280d1a1 bbit1 1 ,dongle_pc_sleep_ackpayload_prep_keyboard 
+00ff 6fe0c5dd fetch 1 ,mem_dg_pc_sleep_flag 
+0100 c280d1a1 bbit1 1 ,dongle_pc_sleep_ackpayload_prep_keyboard 
 
 p_dongle_ackpayload_prep_end:
-00f9 6fe0c55c fetch 1 ,mem_24g_ackpayload_enable 
-00fa c00080fd beq bind_ackpayload ,p_dongle_g24_bind_ackpayload_prep 
-00fb c0018101 beq kb_led_ackpayload ,p_dongle_g24_kb_led_ackpayload_prep 
-00fc 20600000 rtn 
+0101 6fe0c55c fetch 1 ,mem_24g_ackpayload_enable 
+0102 c0008105 beq bind_ackpayload ,p_dongle_g24_bind_ackpayload_prep 
+0103 c0018109 beq kb_led_ackpayload ,p_dongle_g24_kb_led_ackpayload_prep 
+0104 20600000 rtn 
 
 p_dongle_g24_bind_ackpayload_prep:
-00fd 70455c01 jam 1 ,mem_24g_ackpayload_enable 
-00fe 6fe0c561 fetch 1 ,mem_24g_work_mode 
-00ff c1000000 rtneq dongle_work 
-0100 202051a8 branch dongle_g24_bind_ackpayload_prep 
+0105 70455c01 jam 1 ,mem_24g_ackpayload_enable 
+0106 6fe0c561 fetch 1 ,mem_24g_work_mode 
+0107 c1000000 rtneq dongle_work 
+0108 202051a8 branch dongle_g24_bind_ackpayload_prep 
 
 p_dongle_g24_kb_led_ackpayload_prep:
-0101 6fe0c444 fetch 1 ,mem_24g_rxbuf + 2 
-0102 c00080fd beq datatype_device1 ,p_dongle_g24_bind_ackpayload_prep 
-0103 c07f80fd beq datatype_attemp ,p_dongle_g24_bind_ackpayload_prep 
-0104 202051af branch dongle_g24_kb_led_ackpayload_prep + 3 
+0109 6fe0c444 fetch 1 ,mem_24g_rxbuf + 2 
+010a c0008105 beq datatype_device1 ,p_dongle_g24_bind_ackpayload_prep 
+010b c07f8105 beq datatype_attemp ,p_dongle_g24_bind_ackpayload_prep 
+010c 202051af branch dongle_g24_kb_led_ackpayload_prep + 3 
               org 0x3800
 
 start:
Index: program/patch.prog
===================================================================
--- /1306ac/branch/dongle/usb_ats/usb_1M/program/patch.prog	(revision 1062)
+++ /1306ac/branch/dongle/usb_ats/usb_1M/program/patch.prog	(working copy)
@@ -13,7 +13,7 @@
 	beq patch19_7,p_usb_tx
 //	beq patch1c_3,p_le_enable_phy_by_pdata
 	branch assert
-	
+
 pf_patch_ext:
 	rtneq patch3f_7
 	//beq patch26_4,p_g24_receive_skip_end
@@ -22,7 +22,7 @@
 	beq patch29_1,p_g24_receive_packet_start_next
 	beq patch29_5,p_g24_mode_switch_bind_search
 	beq patch29_7,p_g24_bind_mode_auto
-	beq patch2a_0,p_g24_search_mode_auto	
+	beq patch2a_0,p_g24_search_mode_auto
 	branch assert
 
 p_initialize_radio_cont:
@@ -58,7 +58,7 @@
 	nop 100
 	jam 0x0e,core_clkpll_ctrl2
 	jam 0x03,core_clkpll_ctrl0
-	
+
 	call p_set_tx_power_0db
 	jam 0x28,core_tx_mixer_cfg1
 	jam 0x3f,core_tx_mixer_cfg2
@@ -95,7 +95,7 @@
 	setarg 0
 	store 3,mem_24g_device1_bind_step
 	branch g24_bind_init+8
-	
+
 p_dongle_default_init:
 	call dongle_default_init+1
 	fetch 1,mem_24g_pair_tx_power_init
@@ -134,7 +134,7 @@
 p_set_tx_power_f20db:
 	jam 0x85,core_tx_pwr_ctrl0
 	jam 0x04,core_tx_pwr_ctrl1
-	jam 0xa3,core_rf_ldo_cfg8	
+	jam 0xa3,core_rf_ldo_cfg8
 	jam 0x0a,core_rf_ldo_cfg9
 	jam 0x18,0x8a3b
 	jam 0x0f,0x8a3c
@@ -144,7 +144,7 @@
 	jam 0x02,core_tx_pwr_ctrl1
 	branch p_set_tx_power_f20db+2
 
-	
+
 p_set_tx_power_f47db:
 	jam 0x82,core_tx_pwr_ctrl0
 	jam 0x01,core_tx_pwr_ctrl1
@@ -153,18 +153,19 @@
 	jam 0x81,core_tx_pwr_ctrl0
 	jam 0x01,core_tx_pwr_ctrl1
 	branch p_set_tx_power_f20db+2
-/*	
+/*
 	fetch 1,mem_dg_sys_config
 	rtnbit0 DG_ENABLE_NEW_REVISION
 	jam ON,mem_24g_disable_fec1
 	branch g24_enable_2M
-*/	
+*/
 
 p_usb_init:
 	setarg p_dongle_ackpayload_prep
 	store 2,mem_cb_24g_ackpayload
 	call enable_authrom
 	call usb_init_param
+
 	jam 0x00,core_usb_config
 	nop 10000
 	jam 0x00,core_usb_trig
@@ -216,7 +217,6 @@
 	branch usb_tx_ms_data_mac_boot_mode,blank
 	branch usb_tx_ms_data_normal_mode
 
-
 /*
 p_le_enable_phy_by_pdata:
 	copy temp,pdata
@@ -255,7 +255,18 @@
 	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,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
+
 
 p_g24_search_mode_auto:
 	fetch 1,mem_24g_work_mode
@@ -375,7 +386,7 @@
 	beq DATATYPE_DEVICE2,g24_data_device2	//keyboard
 	beq DATATYPE_ATTEMP,p_g24_data_receive_attemp	//reconn packet
 	branch g24_rx_interrupt_clear
-	
+
 p_g24_data_device1:
 	call g24_binding_dvc1_living	//works on auto pair only
 	call g24_ch_timer_reinit
@@ -437,4 +448,4 @@
 	fetch 1,mem_24g_rxbuf+2
 	beq DATATYPE_DEVICE1,p_dongle_g24_bind_ackpayload_prep
 	beq DATATYPE_ATTEMP,p_dongle_g24_bind_ackpayload_prep
-	branch dongle_g24_kb_led_ackpayload_prep+3	
+	branch dongle_g24_kb_led_ackpayload_prep+3
Index: program/usb.prog
===================================================================
--- /1306ac/branch/dongle/usb_ats/usb_1M/program/usb.prog	(revision 1062)
+++ /1306ac/branch/dongle/usb_ats/usb_1M/program/usb.prog	(working copy)
@@ -42,7 +42,7 @@
 	arg mem_usb_clear_mem_start,contw
 	isub contw,loopcnt
 	branch clear_mem
-	
+
 //usb_offline_check_init:
 //	fetcht 1,mem_usb_offline_check_gpio
 //	branch gpio_config_input
@@ -100,7 +100,7 @@
 	arg USB_DEVICEDATA_ADDR,contr
 	arg mem_devicedesc,contw
 	arg 19,loopcnt
-	call memcpy	
+	call memcpy
 	call usb_confdesc_config
 usb_config_cb:
 	fetch 2,mem_cb_usb_config
@@ -112,7 +112,7 @@
 usb_confdesc_config_without_ep3:
 	arg 60,loopcnt
 	arg mem_confdesc,contw
-	arg USB_CONFDATA_ADDR,contr	
+	arg USB_CONFDATA_ADDR,contr
 	branch memcpy
 
 usb_tx_interval_config:
@@ -136,14 +136,14 @@
 	fetch 1,mem_usb_status
 	bbit1 USB_STATUS_NAK,usb_nak_state_timer_init
 	rtn
-	
+
 usb_nak_state_timer_init:
 	call usb0_attached_state_judge
 	call timer_reinit
 	setarg TIMER_NAK_DELAY
 	arg USB_TIMER_NAK,queue
 	branch timer_init
-	
+
 usb0_attached_state_judge:
 	fetch 1,mem_usb_state
 	bne USB_CONNECTED,usb_clear_halt_dispose
@@ -212,7 +212,7 @@
 	call memcpy
 	fetch 1,mem_usb_read_len
 	beq 0x00,usb_rx_no_data
-	beq 0x01,usb_out_one_byte	// HUAWEI pad led status	
+	beq 0x01,usb_out_one_byte	// HUAWEI pad led status
 	sub pdata,7,null
 	rtn positive
 usb_class_type:
@@ -247,7 +247,7 @@
 	rshift pdata,pdata
 	and_into 0x03,pdata
 	beq STANDARD_REQ,usb_out_standard_req
-	beq CLASS_REQ,usb_out_class_req	
+	beq CLASS_REQ,usb_out_class_req
 	beq MANUFACTURER_REQ,usb_out_manufacturer_req
 	branch assert
 
@@ -299,7 +299,7 @@
 	set1 0,pdata
 	store 1,core_usb_stall
 	branch usb0_reply_zerolen
-	
+
 usb0_reply_zerolen:
 	jam 0x10,core_usb_trig
 	rtn
@@ -337,7 +337,7 @@
 //	set0 mark_isstr,mark
 	fetch 1,mem_usb_setup_bValueH
 	beq DSC_DEVICE,dsc_device_info
-	beq DSC_CONFIG,dsc_config_info	
+	beq DSC_CONFIG,dsc_config_info
 	beq DSC_STRING,dsc_string_info
 	beq DSC_HID,dsc_hid_info
 	beq DSC_HID_REPORT,dsc_hid_report_info
@@ -350,12 +350,12 @@
 	beq 1,dsc_hid_info_interface1
 	beq 2,dsc_hid_info_interface2
 	branch usb0_force_stall
-//class_descriptor hid_descriptor--keyboard 
+//class_descriptor hid_descriptor--keyboard
 dsc_hid_info_interface0:
 	fetchr regb,1,mem_confdesc+19
 	arg mem_confdesc+19,rega
 	branch usb0_respond
-//class_descriptor hid_descriptor--mouse 
+//class_descriptor hid_descriptor--mouse
 dsc_hid_info_interface1:
 	fetchr regb,1,mem_confdesc+44
 	arg mem_confdesc+44,rega
@@ -366,7 +366,7 @@
 	branch usb0_respond
 
 dsc_device_info:
-//input : pdata : data poniter 
+//input : pdata : data poniter
 //input : temp: data len
 //sets the data pointer and len to correct descriptor
 	fetch 1,mem_usb_set_high_addr_flag
@@ -381,7 +381,7 @@
 	nbranch dsc_info_set_current_data_len,positive
 dsc_info_set_initial_data_len:
 	fetch 1,mem_dsc_info_len
-dsc_info_set_data_size_completed:	
+dsc_info_set_data_size_completed:
 	iforce regb
 	fetch 2,mem_dsc_info_data_pointer
 	add pdata,1,pdata
@@ -413,7 +413,7 @@
 	nbranch usb0_force_stall,positive
 	fetch 1,mem_usb_setup_bValue
 	arg mem_string0,rega
-	beq 0,usb0_respond_length	
+	beq 0,usb0_respond_length
 	set1 mark_isstr,mark
 	arg mem_string1,rega
 	beq 1,usb0_respond_length
@@ -446,7 +446,7 @@
 	fetchr rega,2,mem_hidreportdesc_ep3
 	branch usb0_respond_length
 
-dsc_hid_enumerate_success:	
+dsc_hid_enumerate_success:
 	jam 1,mem_usb_device_enumeration_endflag
 	jam USB_GOT_REPORT_REQ,mem_usb_state
 	rtn
@@ -454,7 +454,7 @@
 
 usb0_request_get_interface:
 	fetch 1,mem_usb0_state
-	bne DEV_CONFIGURED,usb0_force_stall		
+	bne DEV_CONFIGURED,usb0_force_stall
 	fetch 1,mem_usb_setup_bmRequestType
 	bne IN_INTERFACE,usb0_force_stall
 	fetch 1,mem_usb_setup_bValue
@@ -530,7 +530,7 @@
 	and_into 0x7f,pdata
 	beq 0x00,usb0_get_status_in_ep_in_ep0
 	branch usb0_force_stall
-	
+
 usb0_get_status_in_ep_in_ep0:
 	fetch 1,mem_usb_ep0_stall_status
 usb0_get_status_in_ep_in_ack:
@@ -559,7 +559,7 @@
 	isub temp,null
 	nbranch usb0_force_stall,zero
 //	set0 mark_isstr,mark
-usb_get_report_dispose:	
+usb_get_report_dispose:
 	fetch 1,mem_usb0_data_ready_report
 	nbranch usb_get_report_data_success,blank
 	jam PC_GET_NONDATA,mem_usb0_get_report_data
@@ -568,7 +568,7 @@
 	iforce regb
 	arg mem_usb0_get_report_data,rega
 	call usb0_respond
-usb_get_report_data_release:	
+usb_get_report_data_release:
 	arg mem_usb0_get_report_data,contw
 	arg 8,loopcnt
 	branch memset0
@@ -647,7 +647,7 @@
 	branch usb0_reply_zerolen
 usb0_force_stall_ep1_in_off:
 	jam 0,mem_usb_ep1_stall_status
-usb0_force_stall_ep1_in_off_reply:	
+usb0_force_stall_ep1_in_off_reply:
 	jam 1,mem_usb_clear_halt
 	branch usb0_reply_zerolen
 usb0_force_stall_ep2_in_off:
@@ -685,7 +685,7 @@
 	setarg TIMER_WAKEUP_DELAY
 	arg USB_TIMER_WAKEUP,queue
 	branch timer_init
-	
+
 usb0_request_set_feature_out_interface:
 	branch usb0_force_stall
 
@@ -734,7 +734,7 @@
 	bne 0,usb0_force_stall
 	fetch 1,mem_usb_setup_bValue
 	bne 0,usb_usb0_state_set_dev_addr
-usb_usb0_state_set_dev_default:	
+usb_usb0_state_set_dev_default:
 	jam DEV_DEFAULT,mem_usb0_state
 usb0_request_set_wait_address:
 	fetch 1,mem_usb_setup_bValue
@@ -783,7 +783,7 @@
 
 usb0_request_set_interface:
 	fetch 1,mem_usb0_state
-	bne DEV_CONFIGURED,usb0_force_stall		
+	bne DEV_CONFIGURED,usb0_force_stall
 	fetch 1,mem_usb_setup_bmRequestType
 	bne OUT_INTERFACE,usb0_force_stall
 	fetch 1,mem_usb_setup_bValue
@@ -837,13 +837,13 @@
 	fetch 1,mem_usb_tx_win_enable
 	rtn blank
 	fetch 1,mem_usb0_set_report_data
-usb_get_led_status:	
+usb_get_led_status:
 	store 1,mem_24g_led_status
 	jam 0,mem_usb_tx_win_enable
 	jam KB_LED_ACKPAYLOAD,mem_24g_ackpayload_enable
 	rtn
 
-	
+
 usb_set_report_resume_judge:
 	fetch 2,mem_usb_setup_bValue
 	arg PC_SET_REPORT_bValue,temp
@@ -1068,7 +1068,7 @@
 	arg mem_usb_ep3_in_data,contw
 	arg 8,loopcnt
 	branch memset0
-	
+
 usb_tx_ms_data:
 	fetch 1,mem_usb_idle_flag
 	fetcht 1,mem_usb_get_protocol_flag
@@ -1096,11 +1096,11 @@
 	arg 4,loopcnt
 	arg mem_usb_mouse_data,contr
 	branch usb_tx_ep2
-	
+
 usb_tx_ms_data_normal_mode:
 	jam 0,mem_usb_ep2_data
-usb_tx_mac_boot_ms_regroup_r_or_lrkey:	
-	arg 8,loopcnt		
+usb_tx_mac_boot_ms_regroup_r_or_lrkey:
+	arg 8,loopcnt
 	arg mem_usb_mouse_data,contr
 	branch usb_tx_ep2
 
Index: sched/dongle.dat
===================================================================
--- /1306ac/branch/dongle/usb_ats/usb_1M/sched/dongle.dat	(revision 1062)
+++ /1306ac/branch/dongle/usb_ats/usb_1M/sched/dongle.dat	(working copy)
@@ -103,14 +103,14 @@
 #09		#Size of this descriptor in bytes.
 #02		#Configuration (assigned by USB).
 #5b 00 	#Total length of data returned for this configuration
-#03		#Number of interfaces supported by this configuration  
+#03		#Number of interfaces supported by this configuration
 #01		#bConfigurationValue
 #00		#iConfiguration
 #a0		#bmAttributes
-#32		#MaxPower (in 2mA units) 
-# 
+#32		#MaxPower (in 2mA units)
+#
 # #interface_descriptor hid_interface_descriptor--keyboard
-# 
+#
 #09		# bLength
 #04		# bDescriptorType
 #00		#  bInterfaceNumber
@@ -120,9 +120,9 @@
 #01		#  bInterfaceSubClass
 #01		#  bInterfaceProcotol ; 1=keyboard
 #00		#  iInterface
-# 
+#
 # #class_descriptor hid_descriptor--keyboard
-# 
+#
 #09		#  bLength
 #21		#   bDescriptorType
 #00 02	#  bcdHID
@@ -131,85 +131,85 @@
 #22		# bDescriptorType
 #1a 00 	#  wItemLength (tot. len. of report confdesc)
 #
-# #IN endpoint (mandatory for HID)--keyboard 
-# 
+# #IN endpoint (mandatory for HID)--keyboard
+#
 #07		#bLength
 #05		#bDescriptorType
 #81		#bEndpointAddress
 #03		#bmAttributes
 #40 00	#MaxPacketSize (LITTLE ENDIAN)
-#02		#bInterval 
-# 
+#02		#bInterval
+#
 # #interface_descriptor hid_interface_descriptor--mouse
-# 
-#09		#bLength 
-#04		#bDescriptorType   
-#01		#bInterfaceNumber  
+#
+#09		#bLength
+#04		#bDescriptorType
+#01		#bInterfaceNumber
 #00		#bAlternateSetting
-#01		#bNumEndpoints  
-#03		#bInterfaceClass (3 = HID)   
-#01		#bInterfaceSubClass  
-#02		#bInterfaceProcotol ; 2=mouse  
-#00		#iInterface 
-# 
-# #class_descriptor hid_descriptor--mouse 
-# 
-#09		#bLength   
-#21		#bDescriptorType  
-#00 02	#bcdHID 
-#00		#bCountryCode  
-#01		#bNumDescriptors  
+#01		#bNumEndpoints
+#03		#bInterfaceClass (3 = HID)
+#01		#bInterfaceSubClass
+#02		#bInterfaceProcotol ; 2=mouse
+#00		#iInterface
+#
+# #class_descriptor hid_descriptor--mouse
+#
+#09		#bLength
+#21		#bDescriptorType
+#00 02	#bcdHID
+#00		#bCountryCode
+#01		#bNumDescriptors
 #22		#bDescriptorType
 #a3 00	#wItemLength (tot. len. of report confdesc)
-# 
+#
 # #endpoint_descriptor hid_endpoint_in_descriptor--mouse
-# 
-#07		#bLength  
-#05		#bDescriptorType  
-#82		#bEndpointAddress  
-#03		# bmAttributes  
-#40 00	#MaxPacketSize (LITTLE  ENDIAN)  
+#
+#07		#bLength
+#05		#bDescriptorType
+#82		#bEndpointAddress
+#03		# bmAttributes
+#40 00	#MaxPacketSize (LITTLE  ENDIAN)
 #02		#bInterval
 #
 #
 ##interface_descriptor hid_interface_descriptor
 #
-#09		#bLength 
-#04		#bDescriptorType   
-#02		#bInterfaceNumber  
+#09		#bLength
+#04		#bDescriptorType
+#02		#bInterfaceNumber
 #00		#bAlternateSetting
 #02		#bNumEndpoints
-#03		#bInterfaceClass (3 = HID)   
-#00		#bInterfaceSubClass  
+#03		#bInterfaceClass (3 = HID)
+#00		#bInterfaceSubClass
 #00		#bInterfaceProcotol
-#00		#iInterface 
-# 
-##class_descriptor hid_descriptor 
-#
-#09		#bLength   
-#21		#bDescriptorType  
-#00 02	#bcdHID 
-#00		#bCountryCode  
-#01		#bNumDescriptors  
+#00		#iInterface
+#
+##class_descriptor hid_descriptor
+#
+#09		#bLength
+#21		#bDescriptorType
+#00 02	#bcdHID
+#00		#bCountryCode
+#01		#bNumDescriptors
 #22		#bDescriptorType
 #1b 00	#wItemLength (tot. len. of report confdesc)
-# 
+#
 ##endpoint_descriptor hid_endpoint_in_descriptor
 #
-#07		#bLength  
-#05		#bDescriptorType  
-#83		#bEndpointAddress  
-#03		# bmAttributes  
-#40 00	#MaxPacketSize (LITTLE ENDIAN) 
+#07		#bLength
+#05		#bDescriptorType
+#83		#bEndpointAddress
+#03		# bmAttributes
+#40 00	#MaxPacketSize (LITTLE ENDIAN)
 #02		#bInterval
 #
 ##endpoint_descriptor hid_endpoint_out_descriptor
 #
-#07		#bLength  
-#05		#bDescriptorType  
-#03		#bEndpointAddress  
-#03		# bmAttributes  
-#40 00	#MaxPacketSize (LITTLE ENDIAN) 
+#07		#bLength
+#05		#bDescriptorType
+#03		#bEndpointAddress
+#03		# bmAttributes
+#40 00	#MaxPacketSize (LITTLE ENDIAN)
 #02		#bInterval
 
 
