Index: d.bat
===================================================================
--- /YC1308AC/branch/usb/d.bat	(revision 1265)
+++ /YC1308AC/branch/usb/d.bat	(working copy)
@@ -1,5 +1,6 @@
 call do.bat eep
 e pu
+e 8043 00
 e 8070 00000000000000000000
 e 807a 00000000000000000000
 e 8070 3e6c6d   
Index: do.bat
===================================================================
--- /YC1308AC/branch/usb/do.bat	(revision 1265)
+++ /YC1308AC/branch/usb/do.bat	(working copy)
@@ -72,7 +72,7 @@
 ::geneep
 
 cd ..\output
-create_exen.pl 1 1024 64
+..\util\create_exen.pl 1 1024 64
 cd ..
 
 if "%device_option%" equ "mouse" (
Index: output/eeprom.dat
===================================================================
--- /YC1308AC/branch/usb/output/eeprom.dat	(revision 1265)
+++ /YC1308AC/branch/usb/output/eeprom.dat	(working copy)
@@ -2,8 +2,8 @@
 02
 aa
 55
-3e
-02
+42
+03
 c2
 84
 00
@@ -11,27 +11,27 @@
 c0
 41
 80
-23
+25
 c0
 45
 80
-19
+1b
 c0
 46
 00
-72
+74
 c0
 57
 00
-2a
+2c
 c0
 5d
 80
-3a
+3c
 c0
 5e
 00
-3c
+3e
 20
 20
 13
@@ -39,7 +39,7 @@
 c0
 47
 00
-15
+17
 c0
 47
 fa
@@ -51,15 +51,23 @@
 c0
 48
 00
-5d
+5f
 c0
 4a
 80
-87
+89
 c0
 54
 80
-0f
+11
+c0
+6f
+00
+91
+c0
+70
+80
+bc
 20
 20
 13
@@ -191,7 +199,7 @@
 58
 00
 00
-8d
+8f
 67
 e1
 48
@@ -239,7 +247,7 @@
 20
 40
 00
-38
+3a
 20
 20
 36
@@ -259,7 +267,7 @@
 20
 40
 00
-41
+43
 20
 20
 36
@@ -271,11 +279,11 @@
 20
 40
 00
-44
+46
 20
 20
 00
-50
+52
 6f
 e0
 c9
@@ -391,7 +399,7 @@
 c0
 00
 00
-62
+64
 20
 20
 7a
@@ -415,7 +423,7 @@
 c0
 00
 80
-68
+6a
 20
 20
 7a
@@ -427,7 +435,7 @@
 c0
 04
 80
-6b
+6d
 20
 20
 7a
@@ -507,7 +515,7 @@
 20
 40
 00
-6d
+6f
 1f
 e6
 7e
@@ -531,7 +539,7 @@
 24
 20
 80
-85
+87
 58
 00
 00
@@ -576,8 +584,260 @@
 60
 00
 00
-cd
-4d
+6f
+e0
+c8
+64
+20
+40
+16
+8b
+6f
+e2
+48
+3c
+98
+00
+12
+00
+20
+40
+10
+b0
+20
+40
+11
+61
+68
+48
+c8
+3a
+20
+40
+16
+c8
+20
+40
+21
+d5
+c5
+97
+80
+9e
+78
+3c
+fc
+00
+20
+00
+00
+1e
+20
+40
+21
+d5
+78
+57
+fc
+00
+78
+26
+fc
+00
+78
+30
+fc
+00
+78
+50
+7c
+00
+78
+28
+7c
+00
+6f
+e1
+48
+38
+98
+00
+36
+00
+37
+c1
+84
+00
+24
+2c
+22
+3d
+20
+40
+4c
+af
+c5
+17
+a1
+f6
+78
+23
+fc
+00
+78
+24
+fc
+00
+20
+40
+22
+3a
+67
+e0
+c8
+5a
+68
+48
+c8
+59
+98
+46
+7c
+00
+24
+22
+a2
+3f
+78
+58
+fc
+00
+28
+0f
+fe
+2f
+20
+40
+a2
+2c
+20
+38
+a2
+3f
+20
+40
+22
+3a
+67
+e0
+c7
+a4
+c5
+13
+a2
+09
+6f
+e0
+c7
+a4
+68
+48
+c8
+36
+a8
+40
+0e
+00
+24
+20
+a2
+3f
+20
+20
+22
+09
+6f
+e0
+c8
+65
+20
+40
+16
+8b
+6f
+e2
+48
+3c
+98
+00
+12
+00
+20
+40
+21
+d5
+20
+40
+22
+43
+79
+20
+2a
+00
+78
+2e
+fc
+00
+78
+30
+7c
+00
+78
+50
+fc
+00
+20
+40
+4c
+b5
+78
+5d
+7c
+00
+c5
+17
+a2
+73
+c5
+16
+a2
+85
+19
+31
+7e
+00
+1f
+ec
+fe
+00
+1f
+f1
+fe
+00
+08
+00
+86
+28
+c5
+17
+a2
+5c
+20
+20
+22
+5c
+a2
+a1
 aa
 55
 40
@@ -643,8 +903,8 @@
 00
 00
 00
-00
-00
+40
+02
 00
 00
 00
@@ -885,7 +1145,14 @@
 02
 40
 00
-7c
-03
-23
-61
+85
+04
+55
+aa
+aa
+55
+21
+30
+c9
+dc
+00
Index: program/patch.prog
===================================================================
--- /YC1308AC/branch/usb/program/patch.prog	(revision 1265)
+++ /YC1308AC/branch/usb/program/patch.prog	(working copy)
@@ -23,6 +23,8 @@
 	beq patch32_0,p_usb_class_type
 	beq patch32_5,p_usb_tx
 	beq patch35_1,p_le_enable
+	beq patch3b_6,p_g24_receive_packet
+	beq patch3c_1,p_g24_transmit
 	branch loop
 
 p_le_enable:
@@ -182,6 +184,7 @@
 	ifetch 1,contr
 	rtnne 3
 	ifetch 1,contr
+	beq G24_OTA_TARGET_DONGLE,p_g24_dongle_ota_version_no_mouse
 	rtnne G24_OTA_TARGET_DONGLE_MOUSE
 	jam 90,mem_g24_ota_version_timer
 	branch p_start_g24_ota
@@ -533,6 +536,8 @@
 
 
 
+
+
 	
 
 p_g24_work_mode_start:
@@ -571,6 +576,20 @@
 	
 
 
+
+
+	
+	
+	
+
+
+
+
+	
+	
+	
+
+
 	
 p_g24_receive_transmit_ack:
 	call g24_rx_interrupt_clear
@@ -1102,6 +1121,14 @@
 
 
 
+
+
+
+
+
+
+
+
 	
 
 p_dongle_timer:
@@ -1333,6 +1360,83 @@
 
 endif
 	
-
-
+p_g24_receive_packet:
+	//bpatchx patch3b_6,mem_patch3b
+	fetch 1,mem_24g_rx_phy
+	call le_enable_phy_by_pdata
+	fetch 4,mem_24g_addr
+	iforce access
+	call calc_mod_value_scale_le
+	call set_sync_on
+	fetcht 1,mem_24g_ch
+	call le_rf_rx_enable
+p_g24_receive_rxon:
+	call g24_prep
+	bmark0 mark_ble_lr,p_g24_receive_nolr
+	pulse dewhiten_code_calc
+	nop 30
+	call g24_prep
+p_g24_receive_nolr:
+	disable user3
+	enable decode_fec0
+	enable is_rx
+	disable is_tx
+	enable swfine
+	fetch 2,mem_24g_rx_window
+	iforce stop_watch
+	correlate null,timeout
+	nbranch g24_sync_timeout,sync
+	call rf_debug_rx_sync_line
+	bmark1 mark_ble_lr,g24_receive_skip_fec1
+//		disable decode_fec0	
+//		enable decode_fec1	//lr do not use fec1
+
+//g24_receive_skip_fec1:
+	enable enable_white
+	enable enable_crc
+	call g24_receive_byte
+	store 1,mem_24g_get_syncword_crc8
+	fetcht 1,mem_24g_syncword_crc8
+	isub temp,null
+	nbranch g24_end_of_packet,zero
+//	bpatchx patch3b_7,mem_patch3b
+	disable user7
+	isolate1 mark_ble_lr,mark
+	call g24_lr_receive_pdu_len,true
+	branch g24_end_of_packet,user7
+	call g24_receive_byte
+	store 1,mem_24g_rxbuf	//device id
+	bmark1 mark_24g_rxmode,g24_receive_skip
+	fetch 1,mem_24g_rxbuf
+	fetcht 1,mem_24g_data_type
+	icompare bits_data,temp
+	nbranch g24_end_of_packet,true
+	branch g24_receive_skip
+
+p_g24_transmit:
+//	bpatchx patch3c_1,mem_patch3c
+	fetch 1,mem_24g_tx_phy
+	call le_enable_phy_by_pdata
+	fetch 4,mem_24g_addr
+	iforce access
+	call g24_prep
+	call g24_set_freq_tx
+	set1 TXGFSK,radio_ctrl
+	enable encode_fec0
+	enable is_tx
+	disable is_rx
+	call rf_debug_tx_on_line
+	disable lr_s2en
+	bmark1 mark_ble_lr,g24_transmit_lr
+	bmark1 mark_ble_2M,g24_transmit_2M
+	rshift16 access,pdata
+	rshift8 pdata,pdata
+	rshift4 pdata,pdata
+	inject mod,40
+p_g24_transmit_packet:
+	bmark1 mark_ble_lr,g24_transmit_nolr
+//	enable encode_fec0
+//	disable encode_fec0	
+//	enable encode_fec1	////lr use encode_fec3
+	branch g24_transmit_nolr
 	
