Index: output/eeprom.dat
===================================================================
--- /YC1308AF/branch/mouse/FD_Project/USB_16M/output/eeprom.dat	(revision 734)
+++ /YC1308AF/branch/mouse/FD_Project/USB_16M/output/eeprom.dat	(working copy)
@@ -2,7 +2,7 @@
 02
 aa
 55
-66
+ae
 00
 c2
 84
@@ -11,7 +11,7 @@
 c0
 41
 80
-07
+08
 c0
 45
 12
@@ -19,15 +19,19 @@
 c0
 45
 80
-0c
+0d
 20
 20
 13
 7e
 c0
+47
+00
+15
+c0
 49
 80
-13
+25
 20
 20
 13
@@ -51,7 +55,7 @@
 20
 20
 11
-79
+61
 70
 41
 ea
@@ -76,10 +80,78 @@
 48
 bc
 1e
+70
+48
+d7
+01
 20
 20
 12
 52
+79
+3f
+80
+23
+6f
+e0
+8b
+59
+1f
+e1
+7e
+80
+c0
+00
+00
+1a
+20
+20
+7a
+a1
+6f
+e0
+8b
+59
+1f
+f1
+fe
+00
+1f
+e3
+7e
+00
+1f
+e1
+7e
+03
+c0
+00
+80
+20
+20
+20
+7a
+b4
+6f
+e0
+8b
+5a
+c0
+04
+80
+23
+20
+20
+7a
+cd
+20
+00
+3a
+98
+20
+20
+7c
+4a
 6f
 e0
 8b
@@ -105,77 +177,7 @@
 7c
 cc
 09
-97
-aa
-55
-40
-00
-00
-40
-00
-00
-00
-00
-00
-00
-00
-00
-00
-00
-00
-00
-00
-00
-00
-00
-08
-0c
-00
-00
-00
-00
-00
-00
-00
-00
-00
-00
-00
-00
-00
-00
-00
-00
-00
-00
-00
-00
-00
-00
-00
-00
-00
-00
-00
-00
-00
-00
-00
-00
-08
-00
-00
-00
-00
-00
-00
-00
-00
-00
-00
-00
-00
-00
+84
 aa
 55
 01
@@ -197,6 +199,22 @@
 55
 aa
 55
+02
+00
+10
+40
+08
+0c
+aa
+55
+02
+00
+31
+40
+40
+08
+aa
+55
 01
 00
 9a
@@ -209,11 +227,5 @@
 7b
 41
 10
-55
-aa
-aa
-55
-4b
-0a
-91
-a6
+96
+c8
Index: output/program.lis
===================================================================
--- /YC1308AF/branch/mouse/FD_Project/USB_16M/output/program.lis	(revision 734)
+++ /YC1308AF/branch/mouse/FD_Project/USB_16M/output/program.lis	(working copy)
@@ -1,40 +1,64 @@
               include "bt_format "
               org 0x0000
 0000 c2840005 bbit1 8 ,pf_patch_ext 
-0001 c0418007 beq patch10_3 ,p_set_sync_on 
+0001 c0418008 beq patch10_3 ,p_set_sync_on 
 0002 c0451237 beq patch11_2 ,set_tx_power_10db 
-0003 c045800c beq patch11_3 ,p_initialize_radio_cont 
+0003 c045800d beq patch11_3 ,p_initialize_radio_cont 
 0004 2020137e branch loop 
 
 pf_patch_ext:
-0005 c0498013 beq patch32_3 ,p_usb_tx 
-0006 2020137e branch loop 
+0005 c0470015 beq patch31_6 ,p_usb_class_type 
+0006 c0498025 beq patch32_3 ,p_usb_tx 
+0007 2020137e branch loop 
 
 p_set_sync_on:
-0007 70890005 jam 0x5 ,modem_en 
-0008 20000002 nop 2 
-0009 70890000 jam 0x0 ,modem_en 
-
-p_set_sync_on_16m:
-000a 708a8729 jam 0x29 ,core_syn_afc_cfg1 
-000b 20201179 branch set_sync_on_16m 
+0008 70890005 jam 0x5 ,modem_en 
+0009 20000002 nop 2 
+000a 70890000 jam 0x0 ,modem_en 
+000b 708a8729 jam 0x29 ,core_syn_afc_cfg1 
+000c 20201161 branch set_sync_on + 4 
 
 p_initialize_radio_cont:
-000c 7041eaff jam 0xff ,mem_gain_fix 
-000d 708a8500 jam 0x00 ,core_syn_loopdiv_dsm_cfg 
-000e 70892140 jam 0x40 ,0x8921 
-000f 70486702 jam 0x02 ,mem_24g_rx_phy 
-0010 70486802 jam 0x02 ,mem_24g_tx_phy 
-0011 7048bc1e jam 0x1e ,mem_24g_hop_interval 
-0012 20201252 branch initialize_radio_cont + 1 
+000d 7041eaff jam 0xff ,mem_gain_fix 
+000e 708a8500 jam 0x00 ,core_syn_loopdiv_dsm_cfg 
+000f 70892140 jam 0x40 ,0x8921 
+0010 70486702 jam 0x02 ,mem_24g_rx_phy 
+0011 70486802 jam 0x02 ,mem_24g_tx_phy 
+0012 7048bc1e jam 0x1e ,mem_24g_hop_interval 
+0013 7048d701 jam 1 ,mem_24g_b_s_mode_switch_disable 
+0014 20201252 branch initialize_radio_cont + 1 
+
+p_usb_class_type:
+0015 793f8023 set0 mark_isstr ,mark 
+0016 6fe08b59 fetch 1 ,mem_usb_setup_bmrequesttype 
+0017 1fe17e80 and_into 0x80 ,pdata 
+0018 c000001a beq out_device ,p_usb_out_device 
+0019 20207aa1 branch usb_class_type + 4 
+
+p_usb_out_device:
+001a 6fe08b59 fetch 1 ,mem_usb_setup_bmrequesttype 
+001b 1ff1fe00 rshift4 pdata ,pdata 
+001c 1fe37e00 rshift pdata ,pdata 
+001d 1fe17e03 and_into 0x03 ,pdata 
+001e c0008020 beq class_req ,p_usb_out_class_req 
+001f 20207ab4 branch usb_out_device + 4 
+
+p_usb_out_class_req:
+0020 6fe08b5a fetch 1 ,mem_usb_setup_brequest 
+0021 c0048023 beq set_report ,p_usb_set_report 
+0022 20207acd branch usb_out_class_req + 1 
+
+p_usb_set_report:
+0023 20003a98 nop 15000 
+0024 20207c4a branch usb_set_report 
 
 p_usb_tx:
-0013 6fe08bf9 fetch 1 ,mem_usb_tx_enable 
-0014 207a0000 rtn blank 
-0015 6ff08c24 fetch 1 ,core_usb_txbusy 
-0016 1fe17e0f and_into 0x0f ,pdata 
-0017 243a7d17 nbranch usb_inwake_state_tx_dispose ,blank 
-0018 20207ccc branch usb_tx + 3 
+0025 6fe08bf9 fetch 1 ,mem_usb_tx_enable 
+0026 207a0000 rtn blank 
+0027 6ff08c24 fetch 1 ,core_usb_txbusy 
+0028 1fe17e0f and_into 0x0f ,pdata 
+0029 243a7d17 nbranch usb_inwake_state_tx_dispose ,blank 
+002a 20207ccc branch usb_tx + 3 
               org 0x800
 
 start:
Index: program/patch.prog
===================================================================
--- /YC1308AF/branch/mouse/FD_Project/USB_16M/program/patch.prog	(revision 902)
+++ /YC1308AF/branch/mouse/FD_Project/USB_16M/program/patch.prog	(working copy)
@@ -6,6 +6,7 @@
 	branch loop
 
 pf_patch_ext:
+	beq patch31_6,p_usb_class_type
 	beq patch32_3,p_usb_tx
 	branch loop
 
@@ -13,9 +14,9 @@
 	jam 0x5,modem_en
 	nop 2
 	jam 0x0,modem_en	
-p_set_sync_on_16m:
+	
 	jam 0x29,core_syn_afc_cfg1
-	branch set_sync_on_16m
+	branch set_sync_on+4
 
 p_initialize_radio_cont:
 	//hw agc
@@ -29,9 +30,40 @@
 
 	//config hop interval
 	jam 0x1e,mem_24g_hop_interval
+
+	//disable mode switch
+	jam 1,mem_24g_B_S_mode_switch_disable
 	
 	branch initialize_radio_cont+1
 
+/************************keyboard led patch start**********/
+p_usb_class_type:
+	set0 mark_isstr,mark
+	fetch 1,mem_usb_setup_bmRequestType
+	and_into 0x80,pdata
+	beq OUT_DEVICE,p_usb_out_device
+	branch usb_class_type+4
+
+p_usb_out_device:
+	fetch 1,mem_usb_setup_bmRequestType
+	rshift4 pdata,pdata
+	rshift pdata,pdata
+	and_into 0x03,pdata
+	beq CLASS_REQ,p_usb_out_class_req	
+	branch usb_out_device+4
+
+p_usb_out_class_req:	
+	fetch 1,mem_usb_setup_bRequest
+	beq SET_REPORT,p_usb_set_report
+	branch usb_out_class_req+1
+
+p_usb_set_report:
+	nop 15000	//delay 1ms
+	branch usb_set_report
+
+/************************keyboard led patch end**********/
+	
+
 p_usb_tx:
 	fetch 1,mem_usb_tx_enable
 	rtn blank
@@ -39,6 +71,5 @@
 	and_into 0x0f,pdata
 	nbranch usb_inwake_state_tx_dispose,blank
 	branch usb_tx+3
-	
-	
+
 
Index: sched/dongle.dat
===================================================================
--- /YC1308AF/branch/mouse/FD_Project/USB_16M/sched/dongle.dat	(revision 902)
+++ /YC1308AF/branch/mouse/FD_Project/USB_16M/sched/dongle.dat	(working copy)
@@ -57,6 +57,7 @@
 
 mem_patch10:08
 mem_patch11:0c
+mem_patch31:40
 mem_patch32:08
 
 
