Index: output/eeprom.dat
===================================================================
--- /YC1308AC/branch/mouse_project/YDN_Project/usb_16M_AutoPair/output/eeprom.dat	(revision 606)
+++ /YC1308AC/branch/mouse_project/YDN_Project/usb_16M_AutoPair/output/eeprom.dat	(working copy)
@@ -2,7 +2,7 @@
 02
 aa
 55
-9a
+ae
 01
 c2
 84
@@ -11,23 +11,23 @@
 c0
 41
 80
-1b
+1c
 c0
 45
 80
-11
+12
 c0
 57
 00
-24
+25
 c0
 5d
 80
-2c
+2d
 c0
 5e
 00
-2e
+33
 20
 20
 13
@@ -35,15 +35,19 @@
 c0
 48
 00
-4f
+54
 c0
 4a
 80
-60
+65
 c0
 54
 80
-0b
+0c
+c0
+73
+00
+2f
 20
 20
 13
@@ -135,7 +139,7 @@
 c0
 04
 00
-22
+23
 20
 20
 11
@@ -183,7 +187,7 @@
 20
 40
 00
-2a
+2b
 20
 20
 36
@@ -194,6 +198,22 @@
 bf
 c1
 80
+80
+00
+70
+41
+e8
+85
+20
+20
+24
+99
+6f
+e0
+c8
+bf
+c1
+80
 00
 00
 20
@@ -203,7 +223,7 @@
 20
 40
 00
-33
+38
 20
 20
 36
@@ -215,11 +235,11 @@
 20
 40
 00
-36
+3b
 20
 20
 00
-42
+47
 6f
 e0
 c9
@@ -335,7 +355,7 @@
 c0
 00
 00
-54
+59
 20
 20
 7a
@@ -363,7 +383,7 @@
 c0
 00
 80
-5b
+60
 20
 20
 7a
@@ -375,7 +395,7 @@
 c0
 04
 80
-5e
+63
 20
 20
 7a
@@ -412,8 +432,8 @@
 20
 7c
 59
-eb
-1d
+91
+8b
 aa
 55
 40
@@ -480,7 +500,7 @@
 00
 00
 00
-00
+40
 00
 00
 00
@@ -583,7 +603,7 @@
 aa
 aa
 55
-cc
-1b
-9c
-dc
+0c
+1c
+e8
+7d
Index: output/program.lis
===================================================================
--- /YC1308AC/branch/mouse_project/YDN_Project/usb_16M_AutoPair/output/program.lis	(revision 606)
+++ /YC1308AC/branch/mouse_project/YDN_Project/usb_16M_AutoPair/output/program.lis	(working copy)
@@ -1,141 +1,148 @@
               include "bt_format "
               org 0x0000
 0000 c2840007 bbit1 8 ,pf_patch_ext 
-0001 c041801b beq patch10_3 ,p_set_sync_on 
-0002 c0458011 beq patch11_3 ,p_initialize_radio_cont 
-0003 c0570024 beq patch15_6 ,p_app_init 
-0004 c05d802c beq patch17_3 ,p_dongle_usb_dispatch 
-0005 c05e002e beq patch17_4 ,p_dongle_work_mode_auto 
+0001 c041801c beq patch10_3 ,p_set_sync_on 
+0002 c0458012 beq patch11_3 ,p_initialize_radio_cont 
+0003 c0570025 beq patch15_6 ,p_app_init 
+0004 c05d802d beq patch17_3 ,p_dongle_usb_dispatch 
+0005 c05e0033 beq patch17_4 ,p_dongle_work_mode_auto 
 0006 2020137c branch loop 
 
 pf_patch_ext:
-0007 c048004f beq patch32_0 ,p_usb_class_type 
-0008 c04a8060 beq patch32_5 ,p_usb_tx 
-0009 c054800b beq patch35_1 ,p_le_enable 
-000a 2020137c branch loop 
+0007 c0480054 beq patch32_0 ,p_usb_class_type 
+0008 c04a8065 beq patch32_5 ,p_usb_tx 
+0009 c054800c beq patch35_1 ,p_le_enable 
+000a c073002f beq patch3c_6 ,p_g24_bind_mode_auto 
+000b 2020137c branch loop 
 
 p_le_enable:
-000b 204016a6 call le_enable + 1 
-000c 708a6d89 jam 0x89 ,core_rx_bq_cfg0 
-000d 6ff08a43 fetch 1 ,core_syn_cal_ctrl 
-000e 1fe1fe0f or pdata ,0x0f ,pdata 
-000f 67f08a43 store 1 ,core_syn_cal_ctrl 
-0010 20600000 rtn 
+000c 204016a6 call le_enable + 1 
+000d 708a6d89 jam 0x89 ,core_rx_bq_cfg0 
+000e 6ff08a43 fetch 1 ,core_syn_cal_ctrl 
+000f 1fe1fe0f or pdata ,0x0f ,pdata 
+0010 67f08a43 store 1 ,core_syn_cal_ctrl 
+0011 20600000 rtn 
 
 p_initialize_radio_cont:
-0011 204012d1 call init_lpm_ctrl 
-0012 20000064 nop 100 
-0013 708a0e0b jam 0x0b ,core_rf_ldo_cfg2 
-0014 708a0f05 jam 0x05 ,core_rf_ldo_cfg3 
-0015 708a8390 jam 0x90 ,core_syn_pfd_lkd_cfg 
-0016 708a8500 jam 0x00 ,core_syn_loopdiv_dsm_cfg 
-0017 70892140 jam 0x40 ,0x8921 
-0018 70896876 jam 0x76 ,core_agc_wb_sat_th 
-0019 70896976 jam 0x76 ,core_agc_nb_sat_th 
-001a 20201256 branch initialize_radio_cont + 1 
+0012 204012d1 call init_lpm_ctrl 
+0013 20000064 nop 100 
+0014 708a0e0b jam 0x0b ,core_rf_ldo_cfg2 
+0015 708a0f05 jam 0x05 ,core_rf_ldo_cfg3 
+0016 708a8390 jam 0x90 ,core_syn_pfd_lkd_cfg 
+0017 708a8500 jam 0x00 ,core_syn_loopdiv_dsm_cfg 
+0018 70892140 jam 0x40 ,0x8921 
+0019 70896876 jam 0x76 ,core_agc_wb_sat_th 
+001a 70896976 jam 0x76 ,core_agc_nb_sat_th 
+001b 20201256 branch initialize_radio_cont + 1 
 
 p_set_sync_on:
-001b 70890005 jam 0x5 ,modem_en 
-001c 20000002 nop 2 
-001d 70890000 jam 0x0 ,modem_en 
-001e 6fe0c0c5 fetch 1 ,mem_fcomp_div 
-001f c00c1168 beq xtal_24m ,set_sync_on_24m 
-0020 c0040022 beq xtal_16m ,p_set_sync_on_16m 
-0021 20201168 branch set_sync_on_24m 
+001c 70890005 jam 0x5 ,modem_en 
+001d 20000002 nop 2 
+001e 70890000 jam 0x0 ,modem_en 
+001f 6fe0c0c5 fetch 1 ,mem_fcomp_div 
+0020 c00c1168 beq xtal_24m ,set_sync_on_24m 
+0021 c0040023 beq xtal_16m ,p_set_sync_on_16m 
+0022 20201168 branch set_sync_on_24m 
 
 p_set_sync_on_16m:
-0022 708a8729 jam 0x29 ,core_syn_afc_cfg1 
-0023 2020117d branch set_sync_on_16m 
+0023 708a8729 jam 0x29 ,core_syn_afc_cfg1 
+0024 2020117d branch set_sync_on_16m 
 
 p_app_init:
-0024 d840aa00 arg 0xaa00 ,temp 
-0025 20402320 call g24_rx_window_store 
-0026 70486402 jam 0x02 ,mem_24g_rx_phy 
-0027 70486502 jam 0x02 ,mem_24g_tx_phy 
-0028 20403620 call dongle_init 
-0029 2040623c call wdt_set_enable 
+0025 d840aa00 arg 0xaa00 ,temp 
+0026 20402320 call g24_rx_window_store 
+0027 70486402 jam 0x02 ,mem_24g_rx_phy 
+0028 70486502 jam 0x02 ,mem_24g_tx_phy 
+0029 20403620 call dongle_init 
+002a 2040623c call wdt_set_enable 
 
 p_wdt_kick:
-002a 5800007d setarg 125 
-002b 2020622d branch wdt_init_config 
+002b 5800007d setarg 125 
+002c 2020622d branch wdt_init_config 
 
 p_dongle_usb_dispatch:
-002c 2040002a call p_wdt_kick 
-002d 202036b5 branch dongle_usb_dispatch + 1 
+002d 2040002b call p_wdt_kick 
+002e 202036b5 branch dongle_usb_dispatch + 1 
+
+p_g24_bind_mode_auto:
+002f 6fe0c8bf fetch 1 ,mem_24g_work_mode 
+0030 c1808000 rtnne dongle_bind 
+0031 7041e885 jam tx_power_f5db ,mem_tx_power 
+0032 20202499 branch g24_bind_mode_auto + 3 
 
 p_dongle_work_mode_auto:
-002e 6fe0c8bf fetch 1 ,mem_24g_work_mode 
-002f c1800000 rtnne dongle_work 
-0030 20402491 call g24_work_mode_start 
-0031 20400033 call p_dongle_g24_blank_data_process 
-0032 202036f2 branch dongle_work_mode_auto + 5 
+0033 6fe0c8bf fetch 1 ,mem_24g_work_mode 
+0034 c1800000 rtnne dongle_work 
+0035 20402491 call g24_work_mode_start 
+0036 20400038 call p_dongle_g24_blank_data_process 
+0037 202036f2 branch dongle_work_mode_auto + 5 
 
 p_dongle_g24_blank_data_process:
-0033 2040368a call dongle_g24_ms_blank_data 
-0034 20400036 call p_dongle_g24_kb_blank_data 
-0035 20200042 branch p_dongle_g24_kb_mul_blank_data 
+0038 2040368a call dongle_g24_ms_blank_data 
+0039 2040003b call p_dongle_g24_kb_blank_data 
+003a 20200047 branch p_dongle_g24_kb_mul_blank_data 
 
 p_dongle_g24_kb_blank_data:
-0036 6fe0c906 fetch 1 ,mem_dg_kb_blank_data_enable 
-0037 207a0000 rtn blank 
-0038 d8e0000e arg timer_kb_blank ,queue 
-0039 20407d74 call timer_check 
-003a 247a0000 nrtn blank 
-003b 70490600 jam 0 ,mem_dg_kb_blank_data_enable 
-003c d8a00c0f arg mem_usb_kb_data ,contw 
-003d df200002 arg 2 ,loopcnt 
-003e 20407d17 call memset0 
-003f 6fe40c0f fetch 8 ,mem_usb_kb_data 
-0040 67e448f2 store 8 ,mem_dg_kb_data_last_data 
-0041 202036a2 branch dongle_usb_tx_kb_data 
+003b 6fe0c906 fetch 1 ,mem_dg_kb_blank_data_enable 
+003c 207a0000 rtn blank 
+003d d8e0000e arg timer_kb_blank ,queue 
+003e 20407d74 call timer_check 
+003f 247a0000 nrtn blank 
+0040 70490600 jam 0 ,mem_dg_kb_blank_data_enable 
+0041 d8a00c0f arg mem_usb_kb_data ,contw 
+0042 df200002 arg 2 ,loopcnt 
+0043 20407d17 call memset0 
+0044 6fe40c0f fetch 8 ,mem_usb_kb_data 
+0045 67e448f2 store 8 ,mem_dg_kb_data_last_data 
+0046 202036a2 branch dongle_usb_tx_kb_data 
 
 p_dongle_g24_kb_mul_blank_data:
-0042 6fe0c907 fetch 1 ,mem_dg_kb_mul_blank_data_enable 
-0043 207a0000 rtn blank 
-0044 d8e0000c arg timer_kb_mul_blank ,queue 
-0045 20407d74 call timer_check 
-0046 247a0000 nrtn blank 
-0047 70490700 jam 0 ,mem_dg_kb_mul_blank_data_enable 
-0048 d8a00c1f arg mem_usb_kb_multikey ,contw 
-0049 df200002 arg 2 ,loopcnt 
-004a 20407d17 call memset0 
-004b 700c1f03 jam kb_multikey_report_id ,mem_usb_kb_multikey 
-004c 6fe18c1f fetch 3 ,mem_usb_kb_multikey 
-004d 67e1c8fd store 3 ,mem_dg_kb_multikey_last_data 
-004e 202036b2 branch dongle_usb_tx_multikey_data 
+0047 6fe0c907 fetch 1 ,mem_dg_kb_mul_blank_data_enable 
+0048 207a0000 rtn blank 
+0049 d8e0000c arg timer_kb_mul_blank ,queue 
+004a 20407d74 call timer_check 
+004b 247a0000 nrtn blank 
+004c 70490700 jam 0 ,mem_dg_kb_mul_blank_data_enable 
+004d d8a00c1f arg mem_usb_kb_multikey ,contw 
+004e df200002 arg 2 ,loopcnt 
+004f 20407d17 call memset0 
+0050 700c1f03 jam kb_multikey_report_id ,mem_usb_kb_multikey 
+0051 6fe18c1f fetch 3 ,mem_usb_kb_multikey 
+0052 67e1c8fd store 3 ,mem_dg_kb_multikey_last_data 
+0053 202036b2 branch dongle_usb_tx_multikey_data 
 
 p_usb_class_type:
-004f 793f8023 set0 mark_isstr ,mark 
-0050 6fe08b59 fetch 1 ,mem_usb_setup_bmrequesttype 
-0051 1fe17e80 and_into 0x80 ,pdata 
-0052 c0000054 beq out_device ,p_usb_out_device 
-0053 20207a34 branch usb_class_type + 4 
+0054 793f8023 set0 mark_isstr ,mark 
+0055 6fe08b59 fetch 1 ,mem_usb_setup_bmrequesttype 
+0056 1fe17e80 and_into 0x80 ,pdata 
+0057 c0000059 beq out_device ,p_usb_out_device 
+0058 20207a34 branch usb_class_type + 4 
 
 p_usb_out_device:
-0054 6fe08b59 fetch 1 ,mem_usb_setup_bmrequesttype 
-0055 1ff1fe00 rshift4 pdata ,pdata 
-0056 1fe37e00 rshift pdata ,pdata 
-0057 1fe17e03 and_into 0x03 ,pdata 
-0058 c0007a53 beq standard_req ,usb_out_standard_req 
-0059 c000805b beq class_req ,p_usb_out_class_req 
-005a 20207a43 branch usb_out_device + 4 
+0059 6fe08b59 fetch 1 ,mem_usb_setup_bmrequesttype 
+005a 1ff1fe00 rshift4 pdata ,pdata 
+005b 1fe37e00 rshift pdata ,pdata 
+005c 1fe17e03 and_into 0x03 ,pdata 
+005d c0007a53 beq standard_req ,usb_out_standard_req 
+005e c0008060 beq class_req ,p_usb_out_class_req 
+005f 20207a43 branch usb_out_device + 4 
 
 p_usb_out_class_req:
-005b 6fe08b5a fetch 1 ,mem_usb_setup_brequest 
-005c c004805e beq set_report ,p_usb_set_report 
-005d 20207a5c branch usb_out_class_req + 1 
+0060 6fe08b5a fetch 1 ,mem_usb_setup_brequest 
+0061 c0048063 beq set_report ,p_usb_set_report 
+0062 20207a5c branch usb_out_class_req + 1 
 
 p_usb_set_report:
-005e 20003a98 nop 15000 
-005f 20207bd8 branch usb_set_report 
+0063 20003a98 nop 15000 
+0064 20207bd8 branch usb_set_report 
 
 p_usb_tx:
-0060 6fe08bf9 fetch 1 ,mem_usb_tx_enable 
-0061 207a0000 rtn blank 
-0062 6ff08c24 fetch 1 ,core_usb_txbusy 
-0063 1fe17e0f and_into 0x0f ,pdata 
-0064 243a7ca4 nbranch usb_inwake_state_tx_dispose ,blank 
-0065 20207c59 branch usb_tx + 3 
+0065 6fe08bf9 fetch 1 ,mem_usb_tx_enable 
+0066 207a0000 rtn blank 
+0067 6ff08c24 fetch 1 ,core_usb_txbusy 
+0068 1fe17e0f and_into 0x0f ,pdata 
+0069 243a7ca4 nbranch usb_inwake_state_tx_dispose ,blank 
+006a 20207c59 branch usb_tx + 3 
               org 0x800
 
 start:
Index: program/patch.prog
===================================================================
--- /YC1308AC/branch/mouse_project/YDN_Project/usb_16M_AutoPair/program/patch.prog	(revision 606)
+++ /YC1308AC/branch/mouse_project/YDN_Project/usb_16M_AutoPair/program/patch.prog	(working copy)
@@ -11,6 +11,7 @@
 	beq patch32_0,p_usb_class_type
 	beq patch32_5,p_usb_tx
 	beq patch35_1,p_le_enable
+	beq patch3c_6,p_g24_bind_mode_auto
 	branch loop
 p_le_enable:
 	call le_enable+1
@@ -75,6 +76,11 @@
 	call p_wdt_kick
 	branch dongle_usb_dispatch+1
 
+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
 
 /************************keyboard blank patch**********/
 p_dongle_work_mode_auto:
