Index: output/eeprom.dat
===================================================================
--- /YC1308AF/branch/mouse/YJX_Project/USB_24M_Trust/output/eeprom.dat	(revision 873)
+++ /YC1308AF/branch/mouse/YJX_Project/USB_24M_Trust/output/eeprom.dat	(working copy)
@@ -7,56 +7,28 @@
 c2
 84
 00
-05
-c0
-41
-80
-08
+03
 c0
 45
 80
-0d
-c0
-5d
-00
-18
+06
 20
 20
 13
 7e
 c0
+47
+00
+0e
+c0
 49
 80
-1a
-c0
-73
-00
-20
+1e
 20
 20
 13
 7e
 70
-89
-00
-05
-20
-00
-00
-02
-70
-89
-00
-00
-70
-8a
-87
-29
-20
-20
-11
-61
-70
 41
 ea
 ff
@@ -85,29 +57,73 @@
 d7
 01
 20
-40
+20
 12
 52
+79
+3f
+80
+23
+6f
+e0
+8b
+59
+1f
+e1
+7e
+80
+c0
+00
+00
+13
 20
-40
-62
-a4
-58
+20
+7a
+a1
+6f
+e0
+8b
+59
+1f
+f1
+fe
 00
+1f
+e3
+7e
 00
-7d
+1f
+e1
+7e
+03
+c0
+00
+80
+19
 20
 20
-62
-95
+7a
+b4
+6f
+e0
+8b
+5a
+c0
+04
+80
+1c
+20
+20
+7a
+cd
 20
-40
 00
-16
+3a
+98
 20
 20
-37
-30
+7c
+4a
 6f
 e0
 8b
@@ -132,62 +148,46 @@
 20
 7c
 cc
-6f
-e0
-c8
-c3
-c1
-80
-80
-00
-70
-41
-e8
-85
-20
-20
-24
-9f
-0e
-4f
+43
+76
 aa
 55
 20
 00
 15
 49
-06
+16
 01
-5f
-14
-b5
-02
+51
+31
+20
+10
 51
 31
 20
 30
 00
 14
-54
-72
-75
-73
-74
-20
-57
+50
+68
 69
-72
-65
 6c
-65
-73
+69
+70
 73
 20
-4d
-6f
-75
-73
+55
+53
+42
+20
+52
 65
+63
+65
+69
+76
+65
+72
 aa
 55
 06
@@ -202,33 +202,19 @@
 55
 aa
 55
-02
-00
-10
-40
-08
-08
-aa
-55
-01
-00
-17
-40
-04
-aa
-55
 01
 00
-32
+11
 40
 08
 aa
 55
-01
+02
 00
-3c
+31
 40
 40
+08
 aa
 55
 01
@@ -247,7 +233,7 @@
 aa
 aa
 55
-0f
-18
-75
-2b
+47
+14
+38
+58
Index: output/program.lis
===================================================================
--- /YC1308AF/branch/mouse/YJX_Project/USB_24M_Trust/output/program.lis	(revision 873)
+++ /YC1308AF/branch/mouse/YJX_Project/USB_24M_Trust/output/program.lis	(working copy)
@@ -1,55 +1,55 @@
               include "bt_format "
               org 0x0000
-0000 c2840005 bbit1 8 ,pf_patch_ext 
-0001 c0418008 beq patch10_3 ,p_set_sync_on 
-0002 c045800d beq patch11_3 ,p_initialize_radio_cont 
-0003 c05d0018 beq patch17_2 ,p_dongle_usb_dispatch 
-0004 2020137e branch loop 
+0000 c2840003 bbit1 8 ,pf_patch_ext 
+0001 c0458006 beq patch11_3 ,p_initialize_radio_cont 
+0002 2020137e branch loop 
 
 pf_patch_ext:
-0005 c049801a beq patch32_3 ,p_usb_tx 
-0006 c0730020 beq patch3c_6 ,p_g24_bind_mode_auto 
-0007 2020137e branch loop 
-
-p_set_sync_on:
-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 
+0003 c047000e beq patch31_6 ,p_usb_class_type 
+0004 c049801e beq patch32_3 ,p_usb_tx 
+0005 2020137e branch loop 
 
 p_initialize_radio_cont:
-000d 7041eaff jam 0xff ,mem_gain_fix 
-000e 708a8500 jam 0x00 ,core_syn_loopdiv_dsm_cfg 
-000f 70892140 jam 0x40 ,0x8921 
-0010 70486701 jam 0x01 ,mem_24g_rx_phy 
-0011 70486801 jam 0x01 ,mem_24g_tx_phy 
-0012 7048bc1e jam 0x1e ,mem_24g_hop_interval 
-0013 7048d701 jam 1 ,mem_24g_b_s_mode_switch_disable 
-0014 20401252 call initialize_radio_cont + 1 
-0015 204062a4 call wdt_set_enable 
-
-p_wdt_kick:
-0016 5800007d setarg 125 
-0017 20206295 branch wdt_init_config 
-
-p_dongle_usb_dispatch:
-0018 20400016 call p_wdt_kick 
-0019 20203730 branch dongle_usb_dispatch + 1 
+0006 7041eaff jam 0xff ,mem_gain_fix 
+0007 708a8500 jam 0x00 ,core_syn_loopdiv_dsm_cfg 
+0008 70892140 jam 0x40 ,0x8921 
+0009 70486701 jam 0x01 ,mem_24g_rx_phy 
+000a 70486801 jam 0x01 ,mem_24g_tx_phy 
+000b 7048bc1e jam 0x1e ,mem_24g_hop_interval 
+000c 7048d701 jam 1 ,mem_24g_b_s_mode_switch_disable 
+000d 20201252 branch initialize_radio_cont + 1 
+
+p_usb_class_type:
+000e 793f8023 set0 mark_isstr ,mark 
+000f 6fe08b59 fetch 1 ,mem_usb_setup_bmrequesttype 
+0010 1fe17e80 and_into 0x80 ,pdata 
+0011 c0000013 beq out_device ,p_usb_out_device 
+0012 20207aa1 branch usb_class_type + 4 
+
+p_usb_out_device:
+0013 6fe08b59 fetch 1 ,mem_usb_setup_bmrequesttype 
+0014 1ff1fe00 rshift4 pdata ,pdata 
+0015 1fe37e00 rshift pdata ,pdata 
+0016 1fe17e03 and_into 0x03 ,pdata 
+0017 c0008019 beq class_req ,p_usb_out_class_req 
+0018 20207ab4 branch usb_out_device + 4 
+
+p_usb_out_class_req:
+0019 6fe08b5a fetch 1 ,mem_usb_setup_brequest 
+001a c004801c beq set_report ,p_usb_set_report 
+001b 20207acd branch usb_out_class_req + 1 
+
+p_usb_set_report:
+001c 20003a98 nop 15000 
+001d 20207c4a branch usb_set_report 
 
 p_usb_tx:
-001a 6fe08bf9 fetch 1 ,mem_usb_tx_enable 
-001b 207a0000 rtn blank 
-001c 6ff08c24 fetch 1 ,core_usb_txbusy 
-001d 1fe17e0f and_into 0x0f ,pdata 
-001e 243a7d17 nbranch usb_inwake_state_tx_dispose ,blank 
-001f 20207ccc branch usb_tx + 3 
-
-p_g24_bind_mode_auto:
-0020 6fe0c8c3 fetch 1 ,mem_24g_work_mode 
-0021 c1808000 rtnne dongle_bind 
-0022 7041e885 jam tx_power_f5db ,mem_tx_power 
-0023 2020249f branch g24_bind_mode_auto + 3 
+001e 6fe08bf9 fetch 1 ,mem_usb_tx_enable 
+001f 207a0000 rtn blank 
+0020 6ff08c24 fetch 1 ,core_usb_txbusy 
+0021 1fe17e0f and_into 0x0f ,pdata 
+0022 243a7d17 nbranch usb_inwake_state_tx_dispose ,blank 
+0023 20207ccc branch usb_tx + 3 
               org 0x800
 
 start:
Index: program/patch.prog
===================================================================
--- /YC1308AF/branch/mouse/YJX_Project/USB_24M_Trust/program/patch.prog	(revision 873)
+++ /YC1308AF/branch/mouse/YJX_Project/USB_24M_Trust/program/patch.prog	(working copy)
@@ -1,21 +1,21 @@
 
 	bbit1 8,pf_patch_ext
-	beq patch10_3,p_set_sync_on
+//	beq patch10_3,p_set_sync_on
 	beq patch11_3,p_initialize_radio_cont
-	beq patch17_2,p_dongle_usb_dispatch
+//	beq patch17_2,p_dongle_usb_dispatch
 	branch loop
 
 pf_patch_ext:
+	beq patch31_6,p_usb_class_type
 	beq patch32_3,p_usb_tx
-	beq patch3c_6,p_g24_bind_mode_auto
 	branch loop
 
-p_set_sync_on:
-	jam 0x5,modem_en
-	nop 2
-	jam 0x0,modem_en	
-	jam 0x29,core_syn_afc_cfg1
-	branch set_sync_on+4
+//p_set_sync_on:
+//	jam 0x5,modem_en
+//	nop 2
+//	jam 0x0,modem_en	
+//	jam 0x29,core_syn_afc_cfg1
+//	branch set_sync_on+4
 
 p_initialize_radio_cont:
 	//hw agc
@@ -33,18 +33,46 @@
 	//disable mode switch
 	jam 1,mem_24g_B_S_mode_switch_disable
 	
-	call initialize_radio_cont+1
+	branch initialize_radio_cont+1
 
 	//watch dog enable
-	call wdt_set_enable
-p_wdt_kick:
+//	call wdt_set_enable
+//p_wdt_kick:
 	//about 128ms
-	setarg 125
-	branch wdt_init_config
+//	setarg 125
+//	branch wdt_init_config
 
-p_dongle_usb_dispatch:
-	call p_wdt_kick
-	branch dongle_usb_dispatch+1
+//p_dongle_usb_dispatch:
+//	call p_wdt_kick
+//	branch dongle_usb_dispatch+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
@@ -54,10 +82,4 @@
 	nbranch usb_inwake_state_tx_dispose,blank
 	branch usb_tx+3
 
-p_g24_bind_mode_auto:
-	fetch 1,mem_24g_work_mode
-	rtnne DONGLE_BIND
-	jam TX_POWER_F5DB,mem_tx_power
-	branch g24_bind_mode_auto+3
-	
 
Index: sched/dongle.dat
===================================================================
--- /YC1308AF/branch/mouse/YJX_Project/USB_24M_Trust/sched/dongle.dat	(revision 873)
+++ /YC1308AF/branch/mouse/YJX_Project/USB_24M_Trust/sched/dongle.dat	(working copy)
@@ -7,7 +7,7 @@
 #bit5:enable eeprom
 #bit4:enable kb icon
 #bit3-0:mem_tx_power#6dBm
-mem_dg_sys_config:06	#6dBm#24M
+mem_dg_sys_config:16	#6dBm#24M
 #24g new process #default value 00,if need new process set value 01
 #mem_24g_disable_fec1:00
 
@@ -15,14 +15,14 @@
 mem_dg_usb_vid_pid:
 01 #disable
 #mouse only#auto pair
-5f 14#VID
-b5 02#PID
+51 31#VID
+20 10#PID
 #mouse & keyboard
 51 31#VID
 20 30#PID
 mem_dg_usb_tx_interval:00
 mem_dg_usb_device_name:
-'Trust Wireless Mouse
+'Philips USB Receiver
 
 
 #rf config
@@ -55,11 +55,11 @@
 #mem_rssi_noise_device2_buffer_ptr:mem_dg_rssi_noise_kb_buffer
 
 
-mem_patch10:08
+#mem_patch10:08
 mem_patch11:08
-mem_patch17:04
+#mem_patch17:04
+mem_patch31:40
 mem_patch32:08
-mem_patch3c:40
 
 
 #with eeprom
