Index: output/eeprom.dat
===================================================================
--- /1121s/1121se/branch/mouse/mouse_public_1M/output/eeprom.dat	(revision 3370)
+++ /1121s/1121se/branch/mouse/mouse_public_1M/output/eeprom.dat	(working copy)
@@ -2,16 +2,36 @@
 02
 aa
 55
-12
+be
 00
 c2
 84
 00
-02
+06
+c0
+3c
+80
+09
+c0
+48
+00
+0b
+c0
+4b
+80
+1d
+c0
+75
+00
+2c
 20
 20
 23
 3e
+c0
+64
+80
+1e
 c1
 7f
 80
@@ -20,8 +40,230 @@
 20
 23
 3e
+20
+40
+37
+17
+20
+20
+4d
+f6
+20
+40
+2a
+06
+24
+7a
+00
+00
+6f
+e0
+c7
+4f
+c0
+7f
+80
+12
+6f
+e0
+c8
+82
+1f
+e1
+7e
+03
+c1
+81
+80
+00
+6f
+e0
+c9
+f9
+20
+5a
+53
+8b
+6f
+e4
+47
+0e
+c2
+80
+80
+1a
+c2
+80
+00
+1a
+c2
+82
+80
+1a
+c2
 83
-bb
+00
+1a
+20
+20
+54
+47
+58
+00
+00
+00
+67
+e3
+c6
+5c
+20
+20
+68
+3e
+20
+60
+00
+00
+6f
+e0
+c3
+cf
+c0
+04
+00
+21
+20
+20
+36
+3b
+6f
+e0
+c7
+52
+24
+7a
+00
+00
+20
+40
+00
+27
+6f
+e4
+47
+0e
+c3
+80
+80
+00
+20
+20
+36
+3b
+d8
+e0
+00
+0c
+20
+40
+7c
+f1
+24
+7a
+00
+00
+20
+40
+54
+d7
+20
+20
+59
+e6
+20
+40
+6b
+28
+20
+40
+6b
+63
+20
+20
+6b
+26
+fc
+bd
+aa
+55
+40
+00
+00
+40
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+02
+00
+00
+81
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+04
+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
+02
+00
+00
+00
+00
+00
+00
 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
+6b
+ed
+cf
 ff
 ff
 ff
@@ -8188,5 +8188,5 @@
 ff
 ff
 ff
-21
-9a
+86
+ad
Index: output/otp.dat
===================================================================
--- /1121s/1121se/branch/mouse/mouse_public_1M/output/otp.dat	(revision 3370)
+++ /1121s/1121se/branch/mouse/mouse_public_1M/output/otp.dat	(working copy)
@@ -11,16 +11,36 @@
 00
 aa
 55
-12
+be
 00
 c2
 84
 00
-02
+06
+c0
+3c
+80
+09
+c0
+48
+00
+0b
+c0
+4b
+80
+1d
+c0
+75
+00
+2c
 20
 20
 23
 3e
+c0
+64
+80
+1e
 c1
 7f
 80
@@ -29,8 +49,230 @@
 20
 23
 3e
+20
+40
+37
+17
+20
+20
+4d
+f6
+20
+40
+2a
+06
+24
+7a
+00
+00
+6f
+e0
+c7
+4f
+c0
+7f
+80
+12
+6f
+e0
+c8
+82
+1f
+e1
+7e
+03
+c1
+81
+80
+00
+6f
+e0
+c9
+f9
+20
+5a
+53
+8b
+6f
+e4
+47
+0e
+c2
+80
+80
+1a
+c2
+80
+00
+1a
+c2
+82
+80
+1a
+c2
 83
-bb
+00
+1a
+20
+20
+54
+47
+58
+00
+00
+00
+67
+e3
+c6
+5c
+20
+20
+68
+3e
+20
+60
+00
+00
+6f
+e0
+c3
+cf
+c0
+04
+00
+21
+20
+20
+36
+3b
+6f
+e0
+c7
+52
+24
+7a
+00
+00
+20
+40
+00
+27
+6f
+e4
+47
+0e
+c3
+80
+80
+00
+20
+20
+36
+3b
+d8
+e0
+00
+0c
+20
+40
+7c
+f1
+24
+7a
+00
+00
+20
+40
+54
+d7
+20
+20
+59
+e6
+20
+40
+6b
+28
+20
+40
+6b
+63
+20
+20
+6b
+26
+fc
+bd
+aa
+55
+40
+00
+00
+40
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+02
+00
+00
+81
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+04
+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
+02
+00
+00
+00
+00
+00
+00
 aa
 55
 08
@@ -1276,7 +1518,7 @@
 aa
 aa
 55
-e9
-69
-9a
-8d
+f1
+6b
+ed
+cf
Index: output/program.lis
===================================================================
--- /1121s/1121se/branch/mouse/mouse_public_1M/output/program.lis	(revision 3370)
+++ /1121s/1121se/branch/mouse/mouse_public_1M/output/program.lis	(working copy)
@@ -1,11 +1,72 @@
               include "bt_format "
               org 0x0000
-0000 c2840002 bbit1 8 ,pf_patch_ext 
-0001 2020233e branch assert 
+0000 c2840006 bbit1 8 ,pf_patch_ext 
+0001 c03c8009 beq patch0f_1 ,p_mouse_start_work 
+0002 c048000b beq patch12_0 ,p_mouse_le 
+0003 c04b801d beq patch12_7 ,p_mouse_store_device_info 
+0004 c075002c beq patch1d_2 ,p_otp_read_data 
+0005 2020233e branch assert 
 
 pf_patch_ext:
-0002 c17f8000 rtneq patch3f_7 
-0003 2020233e branch assert 
+0006 c064801e beq patch39_1 ,p_g24_retransmit 
+0007 c17f8000 rtneq patch3f_7 
+0008 2020233e branch assert 
+
+p_mouse_start_work:
+0009 20403717 call app_param_init 
+000a 20204df6 branch mouse_start_work + 1 
+
+p_mouse_le:
+000b 20402a06 call le_fifo_check_nearly_full 
+000c 247a0000 nrtn blank 
+000d 6fe0c74f fetch 1 ,mem_device_fast_conn_flag 
+000e c07f8012 beq 0xff ,p_mouse_le_next 
+000f 6fe0c882 fetch 1 ,mem_le_connect_status_flag 
+0010 1fe17e03 and pdata ,0x03 ,pdata 
+0011 c1818000 rtnne 0x03 
+
+p_mouse_le_next:
+0012 6fe0c9f9 fetch 1 ,mem_mouse_clear_sensor_data_flag 
+0013 205a538b call mouse_clear_sensor_data_by_reset ,blank 
+0014 6fe4470e fetch mouse_flag_len ,mem_mouse_flag 
+0015 c280801a bbit1 mouse_24g_pairing_flag ,p_mouse_le_send_empty_packet 
+0016 c280001a bbit1 mouse_select_device_flag ,p_mouse_le_send_empty_packet 
+0017 c282801a bbit1 mouse_bt_discovery_button_down_flag ,p_mouse_le_send_empty_packet 
+0018 c283001a bbit1 mouse_bt_discovery_button_long_down_flag ,p_mouse_le_send_empty_packet 
+0019 20205447 branch mouse_le_package 
+
+p_mouse_le_send_empty_packet:
+001a 58000000 setarg 0 
+001b 67e3c65c store 7 ,mem_mouse_key 
+001c 2020683e branch hid_device_le_send_mouse_data 
+
+p_mouse_store_device_info:
+001d 20600000 rtn 
+
+p_g24_retransmit:
+001e 6fe0c3cf fetch 1 ,mem_device_option 
+001f c0040021 beq dvc_op_mouse ,p_mouse_g24_retransmit 
+0020 2020363b branch g24_retransmit0 
+
+p_mouse_g24_retransmit:
+0021 6fe0c752 fetch 1 ,mem_device_need_soft_reset 
+0022 247a0000 nrtn blank 
+0023 20400027 call p_mouse_g24_retransmit_100ms_timer 
+0024 6fe4470e fetch mouse_flag_len ,mem_mouse_flag 
+0025 c3808000 rtnbit1 mouse_24g_pairing_flag 
+0026 2020363b branch g24_retransmit0 
+
+p_mouse_g24_retransmit_100ms_timer:
+0027 d8e0000c arg 12 ,queue 
+0028 20407cf1 call timer_check 
+0029 247a0000 nrtn blank 
+002a 204054d7 call mouse_commbination_key_process 
+002b 202059e6 branch mouse_g24_retransmit_100ms_timer_next 
+
+p_otp_read_data:
+002c 20406b28 call enable_otp_read 
+002d 20406b63 call otp_read_data1 
+002e 20206b26 branch otp_disable_chgpump 
               org 0x2000
 
 start:
@@ -17878,6 +17939,8 @@
 5444 c2806824 bbit1 mouse_select_device_flag ,hid_device_le_send_empty_packet 
 5445 c282e824 bbit1 mouse_bt_discovery_button_down_flag ,hid_device_le_send_empty_packet 
 5446 c2836824 bbit1 mouse_bt_discovery_button_long_down_flag ,hid_device_le_send_empty_packet 
+
+mouse_le_package:
 5447 20404f26 call mouse_motion 
 5448 204053cb call mouse_check_125hz 
 5449 24740000 nrtn user 
@@ -18060,11 +18123,11 @@
 54ce 1a217e07 and rega ,0x07 ,pdata 
 54cf 6848cac0 fetcht 1 ,mem_mouse_commbination_key_select_device 
 54d0 98467c00 isub temp ,null 
-54d1 2022d4d4 branch p_mouse_check_mouse_key_select_device_set ,zero 
+54d1 2022d4d4 branch mouse_check_mouse_key_select_device_set ,zero 
 54d2 6fe0cac2 fetch 1 ,mem_mouse_commbination_select_device_timer 
 54d3 202054c4 branch mouse_commbination_key_count_init 
 
-p_mouse_check_mouse_key_select_device_set:
+mouse_check_mouse_key_select_device_set:
 54d4 da604ac3 arg mem_mouse_commbination_key_count ,regc 
 54d5 da4057f6 arg mouse_ready_reconnection_by_button ,regb 
 54d6 20203755 branch timer_single_step 
@@ -19887,6 +19950,8 @@
 59e3 d8e0000c arg 12 ,queue 
 59e4 20407cf1 call timer_check 
 59e5 247a0000 nrtn blank 
+
+mouse_g24_retransmit_100ms_timer_next:
 59e6 20405776 call mouse_retransmit_select_device_by_pb_button 
 59e7 204054c9 call mouse_retransmit_commbination_key_check 
 59e8 204059ed call mouse_dpi_check_once 
Index: program/app_mouse.prog
===================================================================
--- /1121s/1121se/branch/mouse/mouse_public_1M/program/app_mouse.prog	(revision 3370)
+++ /1121s/1121se/branch/mouse/mouse_public_1M/program/app_mouse.prog	(working copy)
@@ -2794,6 +2794,7 @@
 	bbit1 MOUSE_SELECT_DEVICE_FLAG,hid_device_le_send_empty_packet
 	bbit1 MOUSE_BT_DISCOVERY_BUTTON_DOWN_FLAG,hid_device_le_send_empty_packet
 	bbit1 MOUSE_BT_DISCOVERY_BUTTON_LONG_DOWN_FLAG,hid_device_le_send_empty_packet
+mouse_le_package:
 	call mouse_motion
 	call mouse_check_125Hz
 	nrtn user
@@ -2987,11 +2988,11 @@
 	and rega,0x07,pdata
 	fetcht 1,mem_mouse_commbination_key_select_device
 	isub temp,null
-	branch p_mouse_check_mouse_key_select_device_set,zero
+	branch mouse_check_mouse_key_select_device_set,zero
 	fetch 1,mem_mouse_commbination_select_device_timer
 	branch mouse_commbination_key_count_init
 	
-p_mouse_check_mouse_key_select_device_set:
+mouse_check_mouse_key_select_device_set:
 	arg mem_mouse_commbination_key_count,regc
 	arg mouse_ready_reconnection_by_button,regb
 	branch timer_single_step
@@ -4104,7 +4105,8 @@
 	branch mouse_check_select_btdevice,true
 	branch mouse_check_select_24g_device
 
-mouse_switch_gpio_connect_gnd_once:
	
+mouse_switch_gpio_connect_gnd_once:
+	
 	fetch 1,mem_device_switch_gpio
 	call mouse_gpio_config_pu_check
 	fetcht 1,mem_device_switch_gpio
@@ -4808,6 +4810,7 @@
 	arg 12,queue
 	call timer_check
 	nrtn blank
+mouse_g24_retransmit_100ms_timer_next:
 	call mouse_retransmit_select_device_by_pb_button
 	call mouse_retransmit_commbination_key_check
 	call mouse_dpi_check_once
Index: program/patch.prog
===================================================================
--- /1121s/1121se/branch/mouse/mouse_public_1M/program/patch.prog	(revision 3370)
+++ /1121s/1121se/branch/mouse/mouse_public_1M/program/patch.prog	(working copy)
@@ -1,4 +1,4 @@
-//define TEST
+define TEST
 //define AUTO_TEST
 
 
@@ -10,19 +10,46 @@
 	beq patch11_2,p_mouse_init_sunt
 	beq patch11_3,p_mouse_init_sensor
 endif
+	beq patch12_0,p_mouse_le
 	beq patch12_7,p_mouse_store_device_info
 endif
+	beq patch1d_2,p_otp_read_data
 	branch assert
 
 pf_patch_ext:
+	beq patch39_1,p_g24_retransmit
 	rtneq patch3f_7
 	branch assert
 
+
 ifdef TEST
 p_mouse_start_work:
 	call app_param_init
 	branch mouse_start_work+1
 
+p_mouse_le:
+	call le_fifo_check_nearly_full
+	nrtn blank
+	fetch 1,mem_device_fast_conn_flag
+	beq 0xff,p_mouse_le_next
+	fetch 1,mem_le_connect_status_flag
+	and pdata,0x03,pdata
+	rtnne 0x03
+p_mouse_le_next:
+	fetch 1,mem_mouse_clear_sensor_data_flag
+	call mouse_clear_sensor_data_by_reset,blank
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	bbit1 MOUSE_24G_PAIRING_FLAG,p_mouse_le_send_empty_packet
+	bbit1 MOUSE_SELECT_DEVICE_FLAG,p_mouse_le_send_empty_packet
+	bbit1 MOUSE_BT_DISCOVERY_BUTTON_DOWN_FLAG,p_mouse_le_send_empty_packet
+	bbit1 MOUSE_BT_DISCOVERY_BUTTON_LONG_DOWN_FLAG,p_mouse_le_send_empty_packet
+	branch mouse_le_package
+
+p_mouse_le_send_empty_packet:
+	setarg 0
+	store 7,mem_mouse_key
+	branch hid_device_le_send_mouse_data
+
 p_mouse_store_device_info:
 //	fetch MOUSE_FLAG_LEN,mem_mouse_flag
 //	bbit1 MOUSE_ENABLE_EEPROM,mouse_store_eeprom_device_info
@@ -83,3 +110,27 @@
 
 endif
 
+
+p_g24_retransmit:
+	fetch 1,mem_device_option
+	beq DVC_OP_MOUSE,p_mouse_g24_retransmit
+	branch g24_retransmit0
+
+p_mouse_g24_retransmit:
+	fetch 1,mem_device_need_soft_reset
+	nrtn blank
+	call p_mouse_g24_retransmit_100ms_timer
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	rtnbit1 MOUSE_24G_PAIRING_FLAG
+	branch g24_retransmit0
+p_mouse_g24_retransmit_100ms_timer:
+	arg 12,queue
+	call timer_check
+	nrtn blank
+	call mouse_commbination_key_process
+	branch mouse_g24_retransmit_100ms_timer_next
+
+p_otp_read_data:
+	call enable_otp_read
+	call otp_read_data1
+	branch otp_disable_chgpump
Index: sched/mouse_sensor.dat
===================================================================
--- /1121s/1121se/branch/mouse/mouse_public_1M/sched/mouse_sensor.dat	(revision 3370)
+++ /1121s/1121se/branch/mouse/mouse_public_1M/sched/mouse_sensor.dat	(working copy)
@@ -2,13 +2,13 @@
 mem_mouse_dpi_seting:
 03##mem_320x_dpi_0  	1200/1300
 04##mem_320x_dpi_1  	1600
-01##mem_320x_dpi_2   800
+01##mem_320x_dpi_2      800
 02##mem_320x_dpi_3  	1000
 
 20##mem_3212_dpi_0	1200
 2a##mem_3212_dpi_1	1600
-3f ##mem_3212_dpi_2	2400
-15##mem_3212_dpi_3   800
+3f##mem_3212_dpi_2	2400
+15##mem_3212_dpi_3  	800
 
 14##mem_ka8g2_dpi_0	1200
 1b##mem_ka8g2_dpi_1	1600
