Index: output/eeprom.dat
===================================================================
--- /1121s/branch/shutter/branch/shutter/jxy_project/yc1386s_jxy_pcb028_2key/output/eeprom.dat	(revision 3178)
+++ /1121s/branch/shutter/branch/shutter/jxy_project/yc1386s_jxy_pcb028_2key/output/eeprom.dat	(working copy)
@@ -2,7 +2,7 @@
 02
 aa
 55
-ca
+ea
 07
 c2
 84
@@ -23,7 +23,7 @@
 c0
 0a
 01
-b1
+b9
 c0
 0a
 81
@@ -43,7 +43,7 @@
 c0
 12
 81
-d3
+db
 c0
 13
 80
@@ -59,11 +59,11 @@
 c0
 6d
 01
-82
+8a
 c0
 6e
 01
-92
+9a
 20
 20
 23
@@ -83,7 +83,7 @@
 c0
 1c
 81
-cd
+d5
 c0
 1f
 80
@@ -91,7 +91,7 @@
 c0
 26
 81
-d1
+d9
 c1
 7f
 80
@@ -739,11 +739,11 @@
 20
 40
 01
-54
+5c
 20
 40
 01
-7f
+87
 20
 40
 00
@@ -759,7 +759,7 @@
 20
 20
 01
-81
+89
 20
 75
 80
@@ -1200,6 +1200,38 @@
 75
 80
 00
+58
+00
+00
+02
+67
+e1
+45
+2e
+58
+00
+00
+06
+67
+e1
+45
+56
+58
+00
+00
+01
+67
+e1
+45
+33
+58
+00
+00
+06
+67
+e1
+45
+5b
 70
 40
 a6
@@ -1251,7 +1283,7 @@
 58
 00
 01
-42
+4a
 67
 e1
 43
@@ -1299,15 +1331,15 @@
 c0
 18
 81
-47
+4f
 c0
 0a
 81
-49
+51
 c0
 1f
 81
-4d
+55
 20
 20
 62
@@ -1415,7 +1447,7 @@
 20
 40
 01
-71
+79
 2a
 2f
 fe
@@ -1447,7 +1479,7 @@
 20
 40
 01
-71
+79
 d8
 a0
 8a
@@ -1475,7 +1507,7 @@
 20
 21
 01
-66
+6e
 20
 20
 21
@@ -1579,7 +1611,7 @@
 20
 40
 01
-aa
+b2
 70
 8a
 08
@@ -1615,7 +1647,7 @@
 20
 40
 01
-a0
+a8
 6f
 f0
 8a
@@ -1659,7 +1691,7 @@
 20
 40
 01
-aa
+b2
 70
 80
 cd
@@ -1719,7 +1751,7 @@
 c3
 02
 81
-ab
+b3
 68
 59
 01
@@ -1755,7 +1787,7 @@
 c0
 08
 01
-ca
+d2
 58
 00
 57
@@ -1799,7 +1831,7 @@
 c0
 08
 01
-c7
+cf
 58
 00
 2b
@@ -1835,7 +1867,7 @@
 20
 20
 01
-c3
+cb
 58
 00
 83
@@ -1847,7 +1879,7 @@
 20
 20
 01
-b8
+c0
 6f
 e0
 c3
@@ -1895,7 +1927,7 @@
 20
 40
 01
-da
+e2
 20
 20
 24
@@ -1967,7 +1999,7 @@
 20
 22
 81
-ed
+f5
 e7
 e0
 80
@@ -1987,7 +2019,7 @@
 c2
 00
 01
-e7
+ef
 1a
 42
 04
@@ -1996,8 +2028,8 @@
 60
 00
 00
-09
-28
+89
+1d
 aa
 55
 40
@@ -2356,40 +2388,8 @@
 55
 5c
 4c
-6f
-e6
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
+39
+11
 ff
 ff
 ff
@@ -8188,5 +8188,5 @@
 ff
 ff
 ff
-23
-ad
+e6
+b6
Index: output/flash.dat
===================================================================
--- /1121s/branch/shutter/branch/shutter/jxy_project/yc1386s_jxy_pcb028_2key/output/flash.dat	(revision 3178)
+++ /1121s/branch/shutter/branch/shutter/jxy_project/yc1386s_jxy_pcb028_2key/output/flash.dat	(working copy)
@@ -2,7 +2,7 @@
 02
 aa
 55
-ca
+ea
 07
 c2
 84
@@ -23,7 +23,7 @@
 c0
 0a
 01
-b1
+b9
 c0
 0a
 81
@@ -43,7 +43,7 @@
 c0
 12
 81
-d3
+db
 c0
 13
 80
@@ -59,11 +59,11 @@
 c0
 6d
 01
-82
+8a
 c0
 6e
 01
-92
+9a
 20
 20
 23
@@ -83,7 +83,7 @@
 c0
 1c
 81
-cd
+d5
 c0
 1f
 80
@@ -91,7 +91,7 @@
 c0
 26
 81
-d1
+d9
 c1
 7f
 80
@@ -739,11 +739,11 @@
 20
 40
 01
-54
+5c
 20
 40
 01
-7f
+87
 20
 40
 00
@@ -759,7 +759,7 @@
 20
 20
 01
-81
+89
 20
 75
 80
@@ -1200,6 +1200,38 @@
 75
 80
 00
+58
+00
+00
+02
+67
+e1
+45
+2e
+58
+00
+00
+06
+67
+e1
+45
+56
+58
+00
+00
+01
+67
+e1
+45
+33
+58
+00
+00
+06
+67
+e1
+45
+5b
 70
 40
 a6
@@ -1251,7 +1283,7 @@
 58
 00
 01
-42
+4a
 67
 e1
 43
@@ -1299,15 +1331,15 @@
 c0
 18
 81
-47
+4f
 c0
 0a
 81
-49
+51
 c0
 1f
 81
-4d
+55
 20
 20
 62
@@ -1415,7 +1447,7 @@
 20
 40
 01
-71
+79
 2a
 2f
 fe
@@ -1447,7 +1479,7 @@
 20
 40
 01
-71
+79
 d8
 a0
 8a
@@ -1475,7 +1507,7 @@
 20
 21
 01
-66
+6e
 20
 20
 21
@@ -1579,7 +1611,7 @@
 20
 40
 01
-aa
+b2
 70
 8a
 08
@@ -1615,7 +1647,7 @@
 20
 40
 01
-a0
+a8
 6f
 f0
 8a
@@ -1659,7 +1691,7 @@
 20
 40
 01
-aa
+b2
 70
 80
 cd
@@ -1719,7 +1751,7 @@
 c3
 02
 81
-ab
+b3
 68
 59
 01
@@ -1755,7 +1787,7 @@
 c0
 08
 01
-ca
+d2
 58
 00
 57
@@ -1799,7 +1831,7 @@
 c0
 08
 01
-c7
+cf
 58
 00
 2b
@@ -1835,7 +1867,7 @@
 20
 20
 01
-c3
+cb
 58
 00
 83
@@ -1847,7 +1879,7 @@
 20
 20
 01
-b8
+c0
 6f
 e0
 c3
@@ -1895,7 +1927,7 @@
 20
 40
 01
-da
+e2
 20
 20
 24
@@ -1967,7 +1999,7 @@
 20
 22
 81
-ed
+f5
 e7
 e0
 80
@@ -1987,7 +2019,7 @@
 c2
 00
 01
-e7
+ef
 1a
 42
 04
@@ -1996,8 +2028,8 @@
 60
 00
 00
-09
-28
+89
+1d
 aa
 55
 40
@@ -2356,40 +2388,8 @@
 55
 5c
 4c
-6f
-e6
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
+39
+11
 ff
 ff
 ff
@@ -8188,5 +8188,5 @@
 ff
 ff
 ff
-23
-ad
+e6
+b6
Index: output/otp.dat
===================================================================
--- /1121s/branch/shutter/branch/shutter/jxy_project/yc1386s_jxy_pcb028_2key/output/otp.dat	(revision 3178)
+++ /1121s/branch/shutter/branch/shutter/jxy_project/yc1386s_jxy_pcb028_2key/output/otp.dat	(working copy)
@@ -11,7 +11,7 @@
 00
 aa
 55
-ca
+ea
 07
 c2
 84
@@ -32,7 +32,7 @@
 c0
 0a
 01
-b1
+b9
 c0
 0a
 81
@@ -52,7 +52,7 @@
 c0
 12
 81
-d3
+db
 c0
 13
 80
@@ -68,11 +68,11 @@
 c0
 6d
 01
-82
+8a
 c0
 6e
 01
-92
+9a
 20
 20
 23
@@ -92,7 +92,7 @@
 c0
 1c
 81
-cd
+d5
 c0
 1f
 80
@@ -100,7 +100,7 @@
 c0
 26
 81
-d1
+d9
 c1
 7f
 80
@@ -748,11 +748,11 @@
 20
 40
 01
-54
+5c
 20
 40
 01
-7f
+87
 20
 40
 00
@@ -768,7 +768,7 @@
 20
 20
 01
-81
+89
 20
 75
 80
@@ -1209,6 +1209,38 @@
 75
 80
 00
+58
+00
+00
+02
+67
+e1
+45
+2e
+58
+00
+00
+06
+67
+e1
+45
+56
+58
+00
+00
+01
+67
+e1
+45
+33
+58
+00
+00
+06
+67
+e1
+45
+5b
 70
 40
 a6
@@ -1260,7 +1292,7 @@
 58
 00
 01
-42
+4a
 67
 e1
 43
@@ -1308,15 +1340,15 @@
 c0
 18
 81
-47
+4f
 c0
 0a
 81
-49
+51
 c0
 1f
 81
-4d
+55
 20
 20
 62
@@ -1424,7 +1456,7 @@
 20
 40
 01
-71
+79
 2a
 2f
 fe
@@ -1456,7 +1488,7 @@
 20
 40
 01
-71
+79
 d8
 a0
 8a
@@ -1484,7 +1516,7 @@
 20
 21
 01
-66
+6e
 20
 20
 21
@@ -1588,7 +1620,7 @@
 20
 40
 01
-aa
+b2
 70
 8a
 08
@@ -1624,7 +1656,7 @@
 20
 40
 01
-a0
+a8
 6f
 f0
 8a
@@ -1668,7 +1700,7 @@
 20
 40
 01
-aa
+b2
 70
 80
 cd
@@ -1728,7 +1760,7 @@
 c3
 02
 81
-ab
+b3
 68
 59
 01
@@ -1764,7 +1796,7 @@
 c0
 08
 01
-ca
+d2
 58
 00
 57
@@ -1808,7 +1840,7 @@
 c0
 08
 01
-c7
+cf
 58
 00
 2b
@@ -1844,7 +1876,7 @@
 20
 20
 01
-c3
+cb
 58
 00
 83
@@ -1856,7 +1888,7 @@
 20
 20
 01
-b8
+c0
 6f
 e0
 c3
@@ -1904,7 +1936,7 @@
 20
 40
 01
-da
+e2
 20
 20
 24
@@ -1976,7 +2008,7 @@
 20
 22
 81
-ed
+f5
 e7
 e0
 80
@@ -1996,7 +2028,7 @@
 c2
 00
 01
-e7
+ef
 1a
 42
 04
@@ -2005,8 +2037,8 @@
 60
 00
 00
-09
-28
+89
+1d
 aa
 55
 40
@@ -2365,5 +2397,5 @@
 55
 5c
 4c
-6f
-e6
+39
+11
Index: output/program.lis
===================================================================
--- /1121s/branch/shutter/branch/shutter/jxy_project/yc1386s_jxy_pcb028_2key/output/program.lis	(revision 3178)
+++ /1121s/branch/shutter/branch/shutter/jxy_project/yc1386s_jxy_pcb028_2key/output/program.lis	(working copy)
@@ -4,26 +4,26 @@
 0001 c0000061 beq patch00_0 ,p_soft_reset 
 0002 c001007a beq patch00_2 ,p_main_loop 
 0003 c0088083 beq patch02_1 ,p_set_sync_on 
-0004 c00a01b1 beq patch02_4 ,p_set_lemode 
+0004 c00a01b9 beq patch02_4 ,p_set_lemode 
 0005 c00a810f beq patch02_5 ,p_rf_rx_enable 
 0006 c00c011d beq patch03_0 ,p_txon 
 0007 c00c80dc beq patch03_1 ,p_set_tx_power 
 0008 c00d0095 beq patch03_2 ,p_initialize_radio_cont 
-0009 c01281d3 beq patch04_5 ,p_lpm_sleep 
+0009 c01281db beq patch04_5 ,p_lpm_sleep 
 000a c013803f beq patch04_7 ,p_lpm_adjust_clk 
 000b c0588127 beq patch16_1 ,p_shutter_init 
 000c c0628124 beq patch18_5 ,p_otp_read_data 
-000d c06d0182 beq patch1b_2 ,p_sadc_calibration 
-000e c06e0192 beq patch1b_4 ,p_enable_adc 
+000d c06d018a beq patch1b_2 ,p_sadc_calibration 
+000e c06e019a beq patch1b_4 ,p_enable_adc 
 000f 2020235a branch assert 
 
 pf_patch_ext:
 0010 c0120018 beq patch24_4 ,p_le_receive_rxon 
 0011 c0128075 beq patch24_5 ,p_le_rx_dec 
 0012 c0130065 beq patch24_6 ,p_le_rx_nopayload 
-0013 c01c81cd beq patch27_1 ,p_le_parse 
+0013 c01c81d5 beq patch27_1 ,p_le_parse 
 0014 c01f804a beq patch27_7 ,p_le_lpm_set_mult 
-0015 c02681d1 beq patch29_5 ,p_le_init_adv 
+0015 c02681d9 beq patch29_5 ,p_le_init_adv 
 0016 c17f8000 rtneq patch3f_7 
 0017 2020235a branch assert 
 
@@ -217,12 +217,12 @@
 00b4 58557474 setarg 0x557474 
 00b5 67f18968 store 3 ,0x8968 
 00b6 7089606e jam 0x6e ,0x8960 
-00b7 20400154 call p_rx_dcoc 
-00b8 2040017f call p_rfpll_aac_ghpc 
+00b7 2040015c call p_rx_dcoc 
+00b8 20400187 call p_rfpll_aac_ghpc 
 00b9 204000bd call p_set_xtal_cap 
 00ba 7041480c jam system_clk_12m ,mem_system_clk 
 00bb 20406f4e call sadc_calibration 
-00bc 20200181 branch p_dpll_ring_ibias_calc 
+00bc 20200189 branch p_dpll_ring_ibias_calc 
 
 p_set_xtal_cap:
 00bd 20758000 rtn wake 
@@ -359,259 +359,267 @@
 0128 7080d6c0 jam 0xc0 ,0x80d6 
 0129 20407396 call enable_authrom 
 012a 20758000 rtn wake 
-012b 7040a60a jam 0x0a ,mem_lpm_overhead 
-012c 5800000e setarg 0x000e 
-012d 67e144f2 store 2 ,mem_ble_shutter_reconn_adv_interval 
-012e 58000140 setarg 0x0140 
-012f 67e144f4 store 2 ,mem_ble_shutter_discovery_adv_interval 
-0130 67e14389 store 2 ,mem_le_adv_interval 
-0131 6fe4489e fetch 8 ,mem_shutter_discovery_time_conf 
-0132 67e44512 store 8 ,mem_ble_shutter_discovery_timeout 
-0133 6fe448a6 fetch 8 ,mem_shutter_reconn_or_discovery_blink_time_conf 
-0134 67e444fa store 8 ,mem_ble_shutter_reconn_blink_on_time 
-0135 58006327 setarg shutter_process_idle 
-0136 67e143db store 2 ,mem_cb_idle_process 
-0137 58000142 setarg p_shutter_process_bb_event 
-0138 67e143dd store 2 ,mem_cb_bb_event_process 
-0139 5800638a setarg ble_shutter_receive_data 
-013a 67e143df store 2 ,mem_cb_att_write 
-013b 5800630e setarg shutter_le_bb_event_timer 
-013c 67e143e3 store 2 ,mem_cb_event_timer 
-013d 58006365 setarg shutter_key_change 
-013e 67e14524 store 2 ,mem_cb_shutter_keycan 
-013f 204062c2 call shutter_common_init 
-0140 20406396 call shutter_load_buffer_config_form_datarom 
-0141 202062bd branch shutter_power_switch 
+012b 58000002 setarg 0x0002 
+012c 67e1452e store 2 ,mem_key0_press 
+012d 58000006 setarg 0x0006 
+012e 67e14556 store 2 ,mem_key0_release 
+012f 58000001 setarg 0x0001 
+0130 67e14533 store 2 ,mem_key1_press 
+0131 58000006 setarg 0x0006 
+0132 67e1455b store 2 ,mem_key1_release 
+0133 7040a60a jam 0x0a ,mem_lpm_overhead 
+0134 5800000e setarg 0x000e 
+0135 67e144f2 store 2 ,mem_ble_shutter_reconn_adv_interval 
+0136 58000140 setarg 0x0140 
+0137 67e144f4 store 2 ,mem_ble_shutter_discovery_adv_interval 
+0138 67e14389 store 2 ,mem_le_adv_interval 
+0139 6fe4489e fetch 8 ,mem_shutter_discovery_time_conf 
+013a 67e44512 store 8 ,mem_ble_shutter_discovery_timeout 
+013b 6fe448a6 fetch 8 ,mem_shutter_reconn_or_discovery_blink_time_conf 
+013c 67e444fa store 8 ,mem_ble_shutter_reconn_blink_on_time 
+013d 58006327 setarg shutter_process_idle 
+013e 67e143db store 2 ,mem_cb_idle_process 
+013f 5800014a setarg p_shutter_process_bb_event 
+0140 67e143dd store 2 ,mem_cb_bb_event_process 
+0141 5800638a setarg ble_shutter_receive_data 
+0142 67e143df store 2 ,mem_cb_att_write 
+0143 5800630e setarg shutter_le_bb_event_timer 
+0144 67e143e3 store 2 ,mem_cb_event_timer 
+0145 58006365 setarg shutter_key_change 
+0146 67e14524 store 2 ,mem_cb_shutter_keycan 
+0147 204062c2 call shutter_common_init 
+0148 20406396 call shutter_load_buffer_config_form_datarom 
+0149 202062bd branch shutter_power_switch 
 
 p_shutter_process_bb_event:
-0142 1a627e00 copy regc ,pdata 
-0143 c0188147 beq bt_evt_le_pairing_success ,p_ble_shutter_pair_success 
-0144 c00a8149 beq bt_evt_le_disconnected ,p_ble_shutter_process_baseband_disconnect 
-0145 c01f814d beq bt_evt_le_reconnect_complete ,p_ble_shutter_process_reconnect_complete 
-0146 202062da branch shutter_process_bb_event + 1 
+014a 1a627e00 copy regc ,pdata 
+014b c018814f beq bt_evt_le_pairing_success ,p_ble_shutter_pair_success 
+014c c00a8151 beq bt_evt_le_disconnected ,p_ble_shutter_process_baseband_disconnect 
+014d c01f8155 beq bt_evt_le_reconnect_complete ,p_ble_shutter_process_reconnect_complete 
+014e 202062da branch shutter_process_bb_event + 1 
 
 p_ble_shutter_pair_success:
-0147 7048ae01 jam 1 ,mem_shutter_ble_connect_flag 
-0148 20600000 rtn 
+014f 7048ae01 jam 1 ,mem_shutter_ble_connect_flag 
+0150 20600000 rtn 
 
 p_ble_shutter_process_baseband_disconnect:
-0149 7048ae00 jam 0 ,mem_shutter_ble_connect_flag 
-014a 204078ad call queue_init 
-014b 7044f100 jam 0 ,mem_ble_shutter_enable_notify 
-014c 20206340 branch shutter_start_reconnect 
+0151 7048ae00 jam 0 ,mem_shutter_ble_connect_flag 
+0152 204078ad call queue_init 
+0153 7044f100 jam 0 ,mem_ble_shutter_enable_notify 
+0154 20206340 branch shutter_start_reconnect 
 
 p_ble_shutter_process_reconnect_complete:
-014d 7048ae01 jam 1 ,mem_shutter_ble_connect_flag 
-014e 204078ad call queue_init 
-014f 7044f101 jam 1 ,mem_ble_shutter_enable_notify 
-0150 6fe44502 fetch 8 ,mem_ble_shutter_interval_min 
-0151 67e442d3 store 8 ,mem_le_interval_min 
-0152 2040432b call app_lpm_mult_enable 
-0153 20202e93 branch le_l2cap_tx_update_req 
+0155 7048ae01 jam 1 ,mem_shutter_ble_connect_flag 
+0156 204078ad call queue_init 
+0157 7044f101 jam 1 ,mem_ble_shutter_enable_notify 
+0158 6fe44502 fetch 8 ,mem_ble_shutter_interval_min 
+0159 67e442d3 store 8 ,mem_le_interval_min 
+015a 2040432b call app_lpm_mult_enable 
+015b 20202e93 branch le_l2cap_tx_update_req 
 
 p_rx_dcoc:
-0154 20758000 rtn wake 
-0155 20402160 call set_sync_on 
-0156 d8400027 arg 39 ,temp 
-0157 2040216f call set_freq_rx 
-0158 204021a6 call rf_rx_enable 
-0159 708a257f jam 0x7f ,0x8a25 
-015a 708a301a jam 0x1a ,0x8a30 
-015b 708a3178 jam 0x78 ,0x8a31 
-015c 708a8fb2 jam 0xb2 ,0x8a8f 
-015d 708ac200 jam 0 ,0x8ac2 
-015e 708ac300 jam 0 ,0x8ac3 
-015f d8e00006 arg 6 ,queue 
-0160 20400171 call p_rx_dcoc_avg 
-0161 2a2ffe0d isolate1 13 ,rega 
-0162 2040211d call qset_start 
-0163 2a4ffe0d isolate1 13 ,regb 
-0164 2040211e call qset_p 
-0165 d8e00005 arg 5 ,queue 
+015c 20758000 rtn wake 
+015d 20402160 call set_sync_on 
+015e d8400027 arg 39 ,temp 
+015f 2040216f call set_freq_rx 
+0160 204021a6 call rf_rx_enable 
+0161 708a257f jam 0x7f ,0x8a25 
+0162 708a301a jam 0x1a ,0x8a30 
+0163 708a3178 jam 0x78 ,0x8a31 
+0164 708a8fb2 jam 0xb2 ,0x8a8f 
+0165 708ac200 jam 0 ,0x8ac2 
+0166 708ac300 jam 0 ,0x8ac3 
+0167 d8e00006 arg 6 ,queue 
+0168 20400179 call p_rx_dcoc_avg 
+0169 2a2ffe0d isolate1 13 ,rega 
+016a 2040211d call qset_start 
+016b 2a4ffe0d isolate1 13 ,regb 
+016c 2040211e call qset_p 
+016d d8e00005 arg 5 ,queue 
 
 p_rx_dcoc_loop2:
-0166 2040211c call qset1_p 
-0167 2040211e call qset_p 
-0168 20400171 call p_rx_dcoc_avg 
-0169 d8a08ac2 arg 0x8ac2 ,contw 
-016a 1a31fe00 rshift4 rega ,pdata 
-016b 20402117 call qsetxor 
-016c 1a51fe00 rshift4 regb ,pdata 
-016d 20402117 call qsetxor 
-016e 18e08fff increase -1 ,queue 
-016f 20210166 branch p_rx_dcoc_loop2 ,positive 
-0170 2020214f branch rx_dcoc_loop2 + 10 
+016e 2040211c call qset1_p 
+016f 2040211e call qset_p 
+0170 20400179 call p_rx_dcoc_avg 
+0171 d8a08ac2 arg 0x8ac2 ,contw 
+0172 1a31fe00 rshift4 rega ,pdata 
+0173 20402117 call qsetxor 
+0174 1a51fe00 rshift4 regb ,pdata 
+0175 20402117 call qsetxor 
+0176 18e08fff increase -1 ,queue 
+0177 2021016e branch p_rx_dcoc_loop2 ,positive 
+0178 2020214f branch rx_dcoc_loop2 + 10 
 
 p_rx_dcoc_avg:
-0171 2000003c nop 60 
-0172 58000f00 setarg mem_dcoc_buf 
-0173 67f10982 store 2 ,0x8982 
-0174 58000ff0 setarg mem_dcoc_buf_end 
-0175 67f10984 store 2 ,0x8984 
-0176 70898109 jam 0x9 ,0x8981 
-0177 70898103 jam 0x3 ,0x8981 
-0178 70898006 jam 0x6 ,0x8980 
 0179 2000003c nop 60 
-017a da200000 arg 0 ,rega 
-017b da400000 arg 0 ,regb 
-017c df200010 arg 16 ,loopcnt 
-017d d8c00f00 arg mem_dcoc_buf ,contr 
-017e 2020212d branch rx_dcoc_loop 
+017a 58000f00 setarg mem_dcoc_buf 
+017b 67f10982 store 2 ,0x8982 
+017c 58000ff0 setarg mem_dcoc_buf_end 
+017d 67f10984 store 2 ,0x8984 
+017e 70898109 jam 0x9 ,0x8981 
+017f 70898103 jam 0x3 ,0x8981 
+0180 70898006 jam 0x6 ,0x8980 
+0181 2000003c nop 60 
+0182 da200000 arg 0 ,rega 
+0183 da400000 arg 0 ,regb 
+0184 df200010 arg 16 ,loopcnt 
+0185 d8c00f00 arg mem_dcoc_buf ,contr 
+0186 2020212d branch rx_dcoc_loop 
 
 p_rfpll_aac_ghpc:
-017f 20758000 rtn wake 
-0180 20202272 branch rfpll_aac_ghpc + 1 
+0187 20758000 rtn wake 
+0188 20202272 branch rfpll_aac_ghpc + 1 
 
 p_dpll_ring_ibias_calc:
-0181 20600000 rtn 
+0189 20600000 rtn 
 
 p_sadc_calibration:
-0182 20758000 rtn wake 
-0183 708a0777 jam 0x77 ,core_gpadc_ctrl 
-0184 708a08c9 jam 0xc9 ,core_gpadc_cfg0 
-0185 708a0b01 jam 0x01 ,core_gpadc_cfg3 
-0186 6fe0c409 fetch 1 ,mem_adc_clkdiv 
-0187 67f080cd store 1 ,core_sadc_clkdiv 
-0188 20000bb8 nop 3000 
-0189 204001aa call p_sadc_read 
-018a 708a08c1 jam 0xc1 ,core_gpadc_cfg0 
-018b 6a40c419 fetchr regb ,1 ,mem_spi_write_addr 
-018c df200008 arg 8 ,loopcnt 
-018d 20406f58 call sadc_cal_read + 1 
-018e 6fe0c419 fetch 1 ,mem_spi_write_addr 
-018f 67e0c433 store 1 ,mem_adc_cal_c7 
-0190 6240c419 storer regb ,1 ,mem_spi_write_addr 
-0191 20600000 rtn 
+018a 20758000 rtn wake 
+018b 708a0777 jam 0x77 ,core_gpadc_ctrl 
+018c 708a08c9 jam 0xc9 ,core_gpadc_cfg0 
+018d 708a0b01 jam 0x01 ,core_gpadc_cfg3 
+018e 6fe0c409 fetch 1 ,mem_adc_clkdiv 
+018f 67f080cd store 1 ,core_sadc_clkdiv 
+0190 20000bb8 nop 3000 
+0191 204001b2 call p_sadc_read 
+0192 708a08c1 jam 0xc1 ,core_gpadc_cfg0 
+0193 6a40c419 fetchr regb ,1 ,mem_spi_write_addr 
+0194 df200008 arg 8 ,loopcnt 
+0195 20406f58 call sadc_cal_read + 1 
+0196 6fe0c419 fetch 1 ,mem_spi_write_addr 
+0197 67e0c433 store 1 ,mem_adc_cal_c7 
+0198 6240c419 storer regb ,1 ,mem_spi_write_addr 
+0199 20600000 rtn 
 
 p_enable_adc:
-0192 204001a0 call p_sadc_cal_write 
-0193 6ff08a09 fetch 1 ,core_gpadc_cfg1 
-0194 793ffe07 set0 7 ,pdata 
-0195 67f08a09 store 1 ,core_gpadc_cfg1 
-0196 708a0777 jam 0x77 ,core_gpadc_ctrl 
-0197 708a08c1 jam 0xc1 ,core_gpadc_cfg0 
-0198 708a0b01 jam 0x01 ,core_gpadc_cfg3 
-0199 20406f90 call sadc_channel 
-019a 6fe0c409 fetch 1 ,mem_adc_clkdiv 
-019b 67f080cd store 1 ,core_sadc_clkdiv 
-019c 20000bb8 nop 3000 
-019d 204001aa call p_sadc_read 
-019e 7080cd00 jam 0 ,core_sadc_clkdiv 
-019f 20206fa1 branch sadc_dma 
+019a 204001a8 call p_sadc_cal_write 
+019b 6ff08a09 fetch 1 ,core_gpadc_cfg1 
+019c 793ffe07 set0 7 ,pdata 
+019d 67f08a09 store 1 ,core_gpadc_cfg1 
+019e 708a0777 jam 0x77 ,core_gpadc_ctrl 
+019f 708a08c1 jam 0xc1 ,core_gpadc_cfg0 
+01a0 708a0b01 jam 0x01 ,core_gpadc_cfg3 
+01a1 20406f90 call sadc_channel 
+01a2 6fe0c409 fetch 1 ,mem_adc_clkdiv 
+01a3 67f080cd store 1 ,core_sadc_clkdiv 
+01a4 20000bb8 nop 3000 
+01a5 204001b2 call p_sadc_read 
+01a6 7080cd00 jam 0 ,core_sadc_clkdiv 
+01a7 20206fa1 branch sadc_dma 
 
 p_sadc_cal_write:
-01a0 6ff080cc fetch 1 ,core_sadc_ctrl 
-01a1 79207e01 set1 1 ,pdata 
-01a2 67f080cc store 1 ,core_sadc_ctrl 
-01a3 6a40c419 fetchr regb ,1 ,mem_spi_write_addr 
-01a4 6fe0c433 fetch 1 ,mem_adc_cal_c7 
-01a5 67e0c419 store 1 ,mem_spi_write_addr 
-01a6 df200008 arg 8 ,loopcnt 
-01a7 20406f67 call sadc_cal_write + 4 
-01a8 6240c419 storer regb ,1 ,mem_spi_write_addr 
-01a9 20600000 rtn 
+01a8 6ff080cc fetch 1 ,core_sadc_ctrl 
+01a9 79207e01 set1 1 ,pdata 
+01aa 67f080cc store 1 ,core_sadc_ctrl 
+01ab 6a40c419 fetchr regb ,1 ,mem_spi_write_addr 
+01ac 6fe0c433 fetch 1 ,mem_adc_cal_c7 
+01ad 67e0c419 store 1 ,mem_spi_write_addr 
+01ae df200008 arg 8 ,loopcnt 
+01af 20406f67 call sadc_cal_write + 4 
+01b0 6240c419 storer regb ,1 ,mem_spi_write_addr 
+01b1 20600000 rtn 
 
 p_sadc_read:
-01aa 7080cc03 jam 0x03 ,core_sadc_ctrl 
+01b2 7080cc03 jam 0x03 ,core_sadc_ctrl 
 
 p_sadc_read_wait:
-01ab 6ff08129 fetch 1 ,core_perf_status 
-01ac c30281ab bbit0 saradc_done ,p_sadc_read_wait 
-01ad 68590164 fetcht 2 ,core_sadc_data 
-01ae 6049440a storet 2 ,mem_adc_current_value 
-01af 7080cc00 jam 0x00 ,core_sadc_ctrl 
-01b0 20600000 rtn 
+01b3 6ff08129 fetch 1 ,core_perf_status 
+01b4 c30281b3 bbit0 saradc_done ,p_sadc_read_wait 
+01b5 68590164 fetcht 2 ,core_sadc_data 
+01b6 6049440a storet 2 ,mem_adc_current_value 
+01b7 7080cc00 jam 0x00 ,core_sadc_ctrl 
+01b8 20600000 rtn 
 
 p_set_lemode:
-01b1 708a8211 jam 0x11 ,0x8a82 
-01b2 708a8d12 jam 0x12 ,0x8a8d 
-01b3 708a8e0a jam 0x0a ,0x8a8e 
-01b4 6fe0c099 fetch 1 ,mem_fcomp_div 
-01b5 c00801ca beq xtal_16m ,p_set_lemode_2m_16m 
-01b6 58005762 setarg 0x5762 
-01b7 67f10907 store 2 ,0x8907 
+01b9 708a8211 jam 0x11 ,0x8a82 
+01ba 708a8d12 jam 0x12 ,0x8a8d 
+01bb 708a8e0a jam 0x0a ,0x8a8e 
+01bc 6fe0c099 fetch 1 ,mem_fcomp_div 
+01bd c00801d2 beq xtal_16m ,p_set_lemode_2m_16m 
+01be 58005762 setarg 0x5762 
+01bf 67f10907 store 2 ,0x8907 
 
 p_set_lemode_2m:
-01b8 70890103 jam 3 ,0x8901 
-01b9 70893003 jam 3 ,0x8930 
-01ba c6168000 rtnmark1 mark_ble_2m 
-01bb 70890101 jam 1 ,0x8901 
-01bc 708a8207 jam 0x07 ,0x8a82 
-01bd 708a8d44 jam 0x44 ,0x8a8d 
-01be 708a8e0a jam 0x0a ,0x8a8e 
-01bf 6fe0c099 fetch 1 ,mem_fcomp_div 
-01c0 c00801c7 beq xtal_16m ,p_set_lemode_1m_16m 
-01c1 58002bb1 setarg 0x2bb1 
-01c2 67f10907 store 2 ,0x8907 
+01c0 70890103 jam 3 ,0x8901 
+01c1 70893003 jam 3 ,0x8930 
+01c2 c6168000 rtnmark1 mark_ble_2m 
+01c3 70890101 jam 1 ,0x8901 
+01c4 708a8207 jam 0x07 ,0x8a82 
+01c5 708a8d44 jam 0x44 ,0x8a8d 
+01c6 708a8e0a jam 0x0a ,0x8a8e 
+01c7 6fe0c099 fetch 1 ,mem_fcomp_div 
+01c8 c00801cf beq xtal_16m ,p_set_lemode_1m_16m 
+01c9 58002bb1 setarg 0x2bb1 
+01ca 67f10907 store 2 ,0x8907 
 
 p_set_lemode_1m:
-01c3 c6978000 rtnmark0 mark_ble_lr 
-01c4 70893024 jam 0x24 ,0x8930 
-01c5 70890105 jam 5 ,0x8901 
-01c6 20600000 rtn 
+01cb c6978000 rtnmark0 mark_ble_lr 
+01cc 70893024 jam 0x24 ,0x8930 
+01cd 70890105 jam 5 ,0x8901 
+01ce 20600000 rtn 
 
 p_set_lemode_1m_16m:
-01c7 58004189 setarg 0x4189 
-01c8 67f10907 store 2 ,0x8907 
-01c9 202001c3 branch p_set_lemode_1m 
+01cf 58004189 setarg 0x4189 
+01d0 67f10907 store 2 ,0x8907 
+01d1 202001cb branch p_set_lemode_1m 
 
 p_set_lemode_2m_16m:
-01ca 58008312 setarg 0x8312 
-01cb 67f10907 store 2 ,0x8907 
-01cc 202001b8 branch p_set_lemode_2m 
+01d2 58008312 setarg 0x8312 
+01d3 67f10907 store 2 ,0x8907 
+01d4 202001c0 branch p_set_lemode_2m 
 
 p_le_parse:
-01cd 6fe0c334 fetch 1 ,mem_le_packet_llid 
-01ce c1000000 rtneq llid_reserved 
-01cf c001b04a beq llid_le_ll ,le_parse_ll 
-01d0 202028e1 branch le_parse_l2cap 
+01d5 6fe0c334 fetch 1 ,mem_le_packet_llid 
+01d6 c1000000 rtneq llid_reserved 
+01d7 c001b04a beq llid_le_ll ,le_parse_ll 
+01d8 202028e1 branch le_parse_l2cap 
 
 p_le_init_adv:
-01d1 793f8030 set0 mark_ble_crc_fail ,mark 
-01d2 20202af6 branch le_init_adv + 1 
+01d9 793f8030 set0 mark_ble_crc_fail ,mark 
+01da 20202af6 branch le_init_adv + 1 
 
 p_lpm_sleep:
-01d3 6fe143e9 fetch 2 ,mem_cb_before_lpm_sleep 
-01d4 20407d79 call callback_func 
+01db 6fe143e9 fetch 2 ,mem_cb_before_lpm_sleep 
+01dc 20407d79 call callback_func 
 
 p_lpm_sleep_skip_cb_function:
-01d5 6fe240ad fetch 4 ,mem_sleep_counter_all 
-01d6 9840fe00 iadd temp ,pdata 
-01d7 67e240ad store 4 ,mem_sleep_counter_all 
-01d8 204001da call p_lpm_save_context 
-01d9 20202425 branch lpm_sleep_skip_cb_function + 4 
+01dd 6fe240ad fetch 4 ,mem_sleep_counter_all 
+01de 9840fe00 iadd temp ,pdata 
+01df 67e240ad store 4 ,mem_sleep_counter_all 
+01e0 204001e2 call p_lpm_save_context 
+01e1 20202425 branch lpm_sleep_skip_cb_function + 4 
 
 p_lpm_save_context:
-01da 600440e7 storer mark ,8 ,mem_saved_mark 
-01db d8c08070 arg core_gpio_conf ,contr 
-01dc d8a040cc arg mem_saved_gpio ,contw 
-01dd 20407c8f call memcpy16 
-01de d8c080d4 arg core_gpio_conf_hi ,contr 
-01df 20407c89 call memcpy8 
-01e0 6ff08080 fetch 1 ,core_spid_ctrl 
-01e1 67e0c0ef store 1 ,mem_saved_spidctrl 
-01e2 18422400 copy temp ,regb 
+01e2 600440e7 storer mark ,8 ,mem_saved_mark 
+01e3 d8c08070 arg core_gpio_conf ,contr 
+01e4 d8a040cc arg mem_saved_gpio ,contw 
+01e5 20407c8f call memcpy16 
+01e6 d8c080d4 arg core_gpio_conf_hi ,contr 
+01e7 20407c89 call memcpy8 
+01e8 6ff08080 fetch 1 ,core_spid_ctrl 
+01e9 67e0c0ef store 1 ,mem_saved_spidctrl 
+01ea 18422400 copy temp ,regb 
 
 p_lpm_write_gpio_wakeup:
-01e3 df20000c arg 12 ,loopcnt 
-01e4 da200016 arg mem_gpio_wakeup_cfg ,rega 
-01e5 da60814d arg core_gpio_wakeup_cfg ,regc 
-01e6 37d98200 until null ,lpo_edge 
+01eb df20000c arg 12 ,loopcnt 
+01ec da200016 arg mem_gpio_wakeup_cfg ,rega 
+01ed da60814d arg core_gpio_wakeup_cfg ,regc 
+01ee 37d98200 until null ,lpo_edge 
 
 p_lpm_write_gpio_loop:
-01e7 efe08011 ifetch 1 ,rega 
-01e8 e8408013 ifetcht 1 ,regc 
-01e9 98467c00 isub temp ,null 
-01ea 202281ed branch p_lpm_write_gpio_loop_next ,zero 
-01eb e7e08013 istore 1 ,regc 
-01ec 37d98200 until null ,lpo_edge 
+01ef efe08011 ifetch 1 ,rega 
+01f0 e8408013 ifetcht 1 ,regc 
+01f1 98467c00 isub temp ,null 
+01f2 202281f5 branch p_lpm_write_gpio_loop_next ,zero 
+01f3 e7e08013 istore 1 ,regc 
+01f4 37d98200 until null ,lpo_edge 
 
 p_lpm_write_gpio_loop_next:
-01ed 1a20a201 increase 1 ,rega 
-01ee 1a60a601 increase 1 ,regc 
-01ef c20001e7 loop p_lpm_write_gpio_loop 
-01f0 1a420400 copy regb ,temp 
-01f1 20600000 rtn 
+01f5 1a20a201 increase 1 ,rega 
+01f6 1a60a601 increase 1 ,regc 
+01f7 c20001ef loop p_lpm_write_gpio_loop 
+01f8 1a420400 copy regb ,temp 
+01f9 20600000 rtn 
               org 0x2000
 
 start:
Index: output/ramcode.rom
===================================================================
--- /1121s/branch/shutter/branch/shutter/jxy_project/yc1386s_jxy_pcb028_2key/output/ramcode.rom	(revision 3178)
+++ /1121s/branch/shutter/branch/shutter/jxy_project/yc1386s_jxy_pcb028_2key/output/ramcode.rom	(working copy)
@@ -2,24 +2,24 @@
 c0000061
 c001007a
 c0088083
-c00a01b1
+c00a01b9
 c00a810f
 c00c011d
 c00c80dc
 c00d0095
-c01281d3
+c01281db
 c013803f
 c0588127
 c0628124
-c06d0182
-c06e0192
+c06d018a
+c06e019a
 2020235a
 c0120018
 c0128075
 c0130065
-c01c81cd
+c01c81d5
 c01f804a
-c02681d1
+c02681d9
 c17f8000
 2020235a
 204025c2
@@ -181,12 +181,12 @@
 58557474
 67f18968
 7089606e
-20400154
-2040017f
+2040015c
+20400187
 204000bd
 7041480c
 20406f4e
-20200181
+20200189
 20758000
 37d98200
 6fe0c11c
@@ -297,6 +297,14 @@
 7080d6c0
 20407396
 20758000
+58000002
+67e1452e
+58000006
+67e14556
+58000001
+67e14533
+58000006
+67e1455b
 7040a60a
 5800000e
 67e144f2
@@ -309,7 +317,7 @@
 67e444fa
 58006327
 67e143db
-58000142
+5800014a
 67e143dd
 5800638a
 67e143df
@@ -321,9 +329,9 @@
 20406396
 202062bd
 1a627e00
-c0188147
-c00a8149
-c01f814d
+c018814f
+c00a8151
+c01f8155
 202062da
 7048ae01
 20600000
@@ -350,7 +358,7 @@
 708ac200
 708ac300
 d8e00006
-20400171
+20400179
 2a2ffe0d
 2040211d
 2a4ffe0d
@@ -358,14 +366,14 @@
 d8e00005
 2040211c
 2040211e
-20400171
+20400179
 d8a08ac2
 1a31fe00
 20402117
 1a51fe00
 20402117
 18e08fff
-20210166
+2021016e
 2020214f
 2000003c
 58000f00
@@ -391,7 +399,7 @@
 6fe0c409
 67f080cd
 20000bb8
-204001aa
+204001b2
 708a08c1
 6a40c419
 df200008
@@ -400,7 +408,7 @@
 67e0c433
 6240c419
 20600000
-204001a0
+204001a8
 6ff08a09
 793ffe07
 67f08a09
@@ -411,7 +419,7 @@
 6fe0c409
 67f080cd
 20000bb8
-204001aa
+204001b2
 7080cd00
 20206fa1
 6ff080cc
@@ -426,7 +434,7 @@
 20600000
 7080cc03
 6ff08129
-c30281ab
+c30281b3
 68590164
 6049440a
 7080cc00
@@ -435,7 +443,7 @@
 708a8d12
 708a8e0a
 6fe0c099
-c00801ca
+c00801d2
 58005762
 67f10907
 70890103
@@ -446,7 +454,7 @@
 708a8d44
 708a8e0a
 6fe0c099
-c00801c7
+c00801cf
 58002bb1
 67f10907
 c6978000
@@ -455,10 +463,10 @@
 20600000
 58004189
 67f10907
-202001c3
+202001cb
 58008312
 67f10907
-202001b8
+202001c0
 6fe0c334
 c1000000
 c001b04a
@@ -470,7 +478,7 @@
 6fe240ad
 9840fe00
 67e240ad
-204001da
+204001e2
 20202425
 600440e7
 d8c08070
@@ -488,11 +496,11 @@
 efe08011
 e8408013
 98467c00
-202281ed
+202281f5
 e7e08013
 37d98200
 1a20a201
 1a60a601
-c20001e7
+c20001ef
 1a420400
 20600000
Index: program/patch.prog
===================================================================
--- /1121s/branch/shutter/branch/shutter/jxy_project/yc1386s_jxy_pcb028_2key/program/patch.prog	(revision 3178)
+++ /1121s/branch/shutter/branch/shutter/jxy_project/yc1386s_jxy_pcb028_2key/program/patch.prog	(working copy)
@@ -382,6 +382,20 @@
 
 	call enable_authrom
 	rtn wake
+
+	setarg 0x0002
+	store 2,mem_key0_press
+
+	setarg 0x0006
+	store 2,mem_key0_release
+
+	setarg 0x0001
+	store 2,mem_key1_press
+
+	setarg 0x0006
+	store 2,mem_key1_release
+
+
 	jam 0x0a,mem_lpm_overhead
 	setarg 0x000e
 	store 2,mem_ble_shutter_reconn_adv_interval
