Index: format/app_mouse.format
===================================================================
--- /branch/mouse_project/LeXiang/BT&BLE_Trust/format/app_mouse.format	(revision 2203)
+++ /branch/mouse_project/LeXiang/BT&BLE_Trust/format/app_mouse.format	(working copy)
@@ -236,6 +236,12 @@
 1 mem_mouse_dpi_blink_count
 3 mem_le_lap_high_3B
 4 mem_compare_addr_ff
+
+2 mem_firmware_version
+
+1 mem_mouse_data_xtemp
+1 mem_mouse_data_ytemp
+
 )
 
 (
Index: output/eeprom.dat
===================================================================
--- /branch/mouse_project/LeXiang/BT&BLE_Trust/output/eeprom.dat	(revision 2203)
+++ /branch/mouse_project/LeXiang/BT&BLE_Trust/output/eeprom.dat	(working copy)
@@ -2,7 +2,7 @@
 02
 aa
 55
-96
+ca
 17
 c2
 84
@@ -175,11 +175,11 @@
 68
 08
 cc
-66
+6a
 58
 00
 4c
-6d
+71
 98
 40
 8a
@@ -203,7 +203,7 @@
 60
 08
 cc
-66
+6a
 20
 60
 00
@@ -515,7 +515,7 @@
 60
 00
 cc
-62
+66
 20
 40
 05
@@ -551,7 +551,7 @@
 68
 00
 cc
-62
+66
 60
 00
 c1
@@ -1195,7 +1195,7 @@
 d8
 c0
 4b
-d3
+d7
 20
 40
 7f
@@ -5198,11 +5198,11 @@
 6f
 70
 4c
-e7
+eb
 01
 70
 4c
-e4
+e8
 00
 20
 60
@@ -5211,7 +5211,7 @@
 68
 00
 cc
-e4
+e8
 1f
 e0
 fe
@@ -5219,7 +5219,7 @@
 60
 00
 cc
-e4
+e8
 20
 60
 00
@@ -5227,7 +5227,7 @@
 68
 00
 cc
-e4
+e8
 1f
 e6
 7c
@@ -5239,7 +5239,7 @@
 68
 00
 cc
-e4
+e8
 c1
 00
 00
@@ -5251,14 +5251,14 @@
 60
 00
 cc
-e4
+e8
 20
 60
 00
 00
 70
 4c
-e4
+e8
 03
 20
 60
@@ -5283,7 +5283,7 @@
 da
 20
 4c
-6d
+71
 20
 40
 00
@@ -5291,7 +5291,7 @@
 60
 08
 cc
-e5
+e9
 58
 00
 00
@@ -5315,7 +5315,7 @@
 68
 00
 cc
-e4
+e8
 1f
 e6
 7c
@@ -5327,7 +5327,7 @@
 68
 00
 cc
-e4
+e8
 c0
 00
 05
@@ -5339,19 +5339,19 @@
 68
 00
 cc
-e4
+e8
 c1
 90
 00
 00
 70
 4c
-e4
+e8
 00
 68
 08
 cc
-e5
+e9
 58
 00
 00
@@ -5375,7 +5375,7 @@
 68
 00
 cc
-e7
+eb
 c0
 00
 05
@@ -5387,7 +5387,7 @@
 60
 00
 cc
-e7
+eb
 c0
 00
 05
@@ -5402,12 +5402,12 @@
 00
 70
 4c
-e4
+e8
 00
 68
 00
 cc
-e7
+eb
 c0
 01
 05
@@ -5419,7 +5419,7 @@
 60
 00
 cc
-e7
+eb
 c0
 00
 85
@@ -5659,7 +5659,7 @@
 20
 40
 05
-d4
+e1
 58
 00
 00
@@ -5667,7 +5667,7 @@
 20
 40
 05
-c7
+d4
 58
 00
 00
@@ -5675,7 +5675,7 @@
 20
 40
 05
-cd
+da
 68
 00
 cb
@@ -5743,7 +5743,7 @@
 20
 40
 05
-a0
+a8
 68
 01
 11
@@ -5776,6 +5776,58 @@
 40
 fe
 00
+68
+08
+cb
+27
+98
+40
+fe
+00
+1f
+e1
+04
+01
+60
+08
+cb
+27
+20
+20
+05
+b0
+68
+01
+11
+be
+68
+09
+11
+c0
+98
+40
+fe
+00
+68
+08
+cb
+28
+98
+40
+fe
+00
+1f
+e1
+04
+01
+60
+08
+cb
+28
+20
+20
+05
+b0
 60
 01
 91
@@ -5787,7 +5839,7 @@
 20
 20
 85
-ad
+ba
 68
 00
 91
@@ -5795,7 +5847,7 @@
 c0
 7f
 85
-b4
+c1
 68
 00
 91
@@ -5823,7 +5875,7 @@
 c0
 00
 05
-b1
+be
 68
 01
 91
@@ -5831,7 +5883,7 @@
 20
 20
 05
-a9
+b6
 70
 11
 c4
@@ -5843,7 +5895,7 @@
 20
 20
 05
-a9
+b6
 68
 00
 91
@@ -5851,7 +5903,7 @@
 20
 40
 05
-bf
+cc
 60
 00
 91
@@ -5863,7 +5915,7 @@
 20
 3a
 05
-bd
+ca
 58
 00
 00
@@ -5887,7 +5939,7 @@
 20
 20
 05
-ba
+c7
 1f
 e6
 7e
@@ -5927,7 +5979,7 @@
 24
 21
 05
-d2
+df
 9a
 46
 7c
@@ -5935,7 +5987,7 @@
 24
 21
 05
-d2
+df
 70
 4b
 0b
@@ -5963,7 +6015,7 @@
 20
 20
 05
-cb
+d8
 70
 4b
 0b
@@ -5983,7 +6035,7 @@
 20
 40
 05
-dd
+ea
 1f
 e2
 22
@@ -5999,7 +6051,7 @@
 20
 40
 05
-dd
+ea
 1f
 e2
 24
@@ -6015,7 +6067,7 @@
 c0
 7f
 85
-e2
+ef
 68
 00
 91
@@ -6039,9 +6091,9 @@
 20
 20
 05
-e0
-39
-6d
+ed
+0f
+0b
 aa
 55
 08
@@ -6672,7 +6724,7 @@
 00
 aa
 55
-04
+06
 00
 21
 4b
@@ -6680,11 +6732,13 @@
 ff
 ff
 ff
+01
+00
 aa
 55
 04
 00
-ac
+b0
 4b
 01
 00
@@ -6694,7 +6748,7 @@
 55
 15
 00
-b7
+bb
 4b
 20
 15
@@ -6721,7 +6775,7 @@
 55
 03
 00
-d0
+d4
 4b
 19
 19
@@ -6730,7 +6784,7 @@
 55
 03
 00
-da
+de
 4b
 00
 48
@@ -6739,66 +6793,12 @@
 55
 02
 00
-f0
+f4
 4b
 04
 01
-d6
-b7
-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
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
+0f
+d9
 ff
 ff
 ff
@@ -16380,5 +16380,5 @@
 ff
 ff
 ff
-39
-36
+86
+6e
Index: output/memmap.format
===================================================================
--- /branch/mouse_project/LeXiang/BT&BLE_Trust/output/memmap.format	(revision 2203)
+++ /branch/mouse_project/LeXiang/BT&BLE_Trust/output/memmap.format	(working copy)
@@ -1776,119 +1776,122 @@
 0x4b1d mem_mouse_dpi_blink_count
 0x4b1e mem_le_lap_high_3B
 0x4b21 mem_compare_addr_ff
-0x4b25 mem_24g_rxbuf
-0x4b47 mem_24g_txbuf
-0x4b67 mem_24g_txpayload
-0x4b89 mem_24g_rxpayload
-0x4ba9 mem_24g_rxdata_length
-0x4baa mem_24g_pid
-0x4bab mem_24g_datalen
-0x4bac mem_24g_data_type
-0x4bad mem_24g_txlen
-0x4bae mem_24g_rx_window
-0x4bb0 mem_24g_ensure
-0x4bb1 mem_24g_txfail_cnt
-0x4bb3 mem_24g_get_ack_fail
-0x4bb4 mem_24g_retry
-0x4bb5 mem_24g_ch
-0x4bb6 mem_24g_current_ch_number
-0x4bb7 mem_24g_paring_addr
-0x4bbb mem_24g_pairing_sm
-0x4bbc mem_24g_ch_map1
-0x4bc0 mem_24g_ch_map2
-0x4bc4 mem_24g_ch_map3
-0x4bc8 mem_24g_ch_map4
-0x4bcc mem_24g_tx_btclk
-0x4bd0 mem_24g_interval
-0x4bd1 mem_24g_interval_min
-0x4bd2 mem_24g_interval_max
-0x4bd3 mem_24g_addr
-0x4bd7 mem_24g_abort_pac
-0x4bd8 mem_24g_check_dongle_times
-0x4bda mem_24g_enter_hibernate
-0x4be2 mem_24g_device_addr
-0x4be6 mem_24g_pac_index
-0x4be7 mem_24g_no_ack
-0x4be8 mem_24g_sta_crc
-0x4beb mem_24g_last_crc
-0x4bee mem_24g_sta_pid
-0x4bef mem_24g_last_pid
-0x4bf0 mem_24g_max_retry
-0x4bf1 mem_24g_mode
-0x4bf2 mem_24g_rxdata_temp
-0x4c14 mem_24g_rx_addr
-0x4c18 mem_dongle_mode_init
-0x4c19 mem_dongle_work_mode
-0x4c1a mem_dongle_ms_bind_step
-0x4c1b mem_dongle_kb_bind_step
-0x4c1c mem_dongle_bind_device_status
-0x4c1d mem_24g_bind_payload
-0x4c25 mem_24g_abort_packet
-0x4c26 mem_24g_rf_laststa
-0x4c27 mem_24g_hop_btclk
-0x4c2b mem_24g_hop_interval
-0x4c2c mem_24g_mode_switch
-0x4c2d mem_24g_ackpayload_enable
-0x4c2e mem_24g_hop_packet
-0x4c2f mem_24g_pair_mode
-0x4c30 mem_24g_nodata_timer_enable
-0x4c31 mem_24g_time_slice
-0x4c32 mem_24g_kb_data_sta_data
-0x4c3a mem_24g_kb_data_last_data
-0x4c42 mem_24g_kb_multikey_sta_data
-0x4c45 mem_24g_kb_multikey_last_data
-0x4c48 mem_24g_kb_blank_data_enable
-0x4c49 mem_24g_kb_mul_blank_data_enable
-0x4c4a mem_24g_ms_blank_data_enable
-0x4c4b mem_24g_kb_addr
-0x4c4f mem_24g_ms_addr
-0x4c53 mem_24g_dg_last_ch
-0x4c54 mem_24g_dg_ch_number
-0x4c55 mem_24g_dg_config_ch_once
-0x4c56 mem_24g_kb_last_ch
-0x4c57 mem_24g_kb_ch_number
-0x4c58 mem_24g_kb_config_ch_once
-0x4c59 mem_24g_ms_last_ch
-0x4c5a mem_24g_ms_ch_number
-0x4c5b mem_24g_ms_config_ch_once
-0x4c5c mem_24g_syncword
-0x4c5e mem_24g_syncword_crc8
-0x4c5f mem_24g_get_syncword_crc8
-0x4c60 mem_24g_ota_sta_pid
-0x4c62 mem_tx_power_temp
-0x4c63 mem_rssi_hex
-0x4c64 mem_rssi_noise_avg
-0x4c65 mem_rssi_noise_index
-0x4c66 mem_rssi_signal_index
-0x4c67 mem_rssi_noise_dg_avg
-0x4c68 mem_rssi_noise_kb_avg
-0x4c69 mem_rssi_noise_ms_avg
-0x4c6a mem_rssi_noise_dg_index
-0x4c6b mem_rssi_noise_kb_index
-0x4c6c mem_rssi_noise_ms_index
-0x4c6d mem_rssi_signal_buf
-0x4c75 mem_queue_ele_num
-0x4c76 mem_queue_read
-0x4c78 mem_queue_write
-0x4c7a mem_queue_start
-0x4c7a mem_data_ele0
-0x4c9a mem_data_ele1
-0x4cba mem_data_ele2
-0x4cda mem_queue_end
-0x4cda mem_queue_temp
-0x4cdc mem_cb_24g_data
-0x4cde mem_24g_hop_fastly_cnt
-0x4cdf mem_24g_hop_pac_retry
-0x4ce0 mem_24g_rf_hop_ch
-0x4ce1 mem_24g_rf_last_sta
-0x4ce2 mem_24g_rf_work_stage
-0x4ce3 mem_24g_sync_cnt
-0x4ce4 mem_power_ctrl_pac_succ_cnt
-0x4ce5 mem_rssi_avg_received
-0x4ce6 mem_rssi_hex_received
-0x4ce7 mem_power_ctrl_level
-0x4ce8 mem_seqi
-0x4ce9 mem_24g_auto_paring_switch
-0x4cea mem_24g_paccnt
-0x4ceb mem_24g_transmit_by_interrupt
-0x4cec mem_24g_transmit_by_interrupt_exit_count
+0x4b25 mem_firmware_version
+0x4b27 mem_mouse_data_xtemp
+0x4b28 mem_mouse_data_ytemp
+0x4b29 mem_24g_rxbuf
+0x4b4b mem_24g_txbuf
+0x4b6b mem_24g_txpayload
+0x4b8d mem_24g_rxpayload
+0x4bad mem_24g_rxdata_length
+0x4bae mem_24g_pid
+0x4baf mem_24g_datalen
+0x4bb0 mem_24g_data_type
+0x4bb1 mem_24g_txlen
+0x4bb2 mem_24g_rx_window
+0x4bb4 mem_24g_ensure
+0x4bb5 mem_24g_txfail_cnt
+0x4bb7 mem_24g_get_ack_fail
+0x4bb8 mem_24g_retry
+0x4bb9 mem_24g_ch
+0x4bba mem_24g_current_ch_number
+0x4bbb mem_24g_paring_addr
+0x4bbf mem_24g_pairing_sm
+0x4bc0 mem_24g_ch_map1
+0x4bc4 mem_24g_ch_map2
+0x4bc8 mem_24g_ch_map3
+0x4bcc mem_24g_ch_map4
+0x4bd0 mem_24g_tx_btclk
+0x4bd4 mem_24g_interval
+0x4bd5 mem_24g_interval_min
+0x4bd6 mem_24g_interval_max
+0x4bd7 mem_24g_addr
+0x4bdb mem_24g_abort_pac
+0x4bdc mem_24g_check_dongle_times
+0x4bde mem_24g_enter_hibernate
+0x4be6 mem_24g_device_addr
+0x4bea mem_24g_pac_index
+0x4beb mem_24g_no_ack
+0x4bec mem_24g_sta_crc
+0x4bef mem_24g_last_crc
+0x4bf2 mem_24g_sta_pid
+0x4bf3 mem_24g_last_pid
+0x4bf4 mem_24g_max_retry
+0x4bf5 mem_24g_mode
+0x4bf6 mem_24g_rxdata_temp
+0x4c18 mem_24g_rx_addr
+0x4c1c mem_dongle_mode_init
+0x4c1d mem_dongle_work_mode
+0x4c1e mem_dongle_ms_bind_step
+0x4c1f mem_dongle_kb_bind_step
+0x4c20 mem_dongle_bind_device_status
+0x4c21 mem_24g_bind_payload
+0x4c29 mem_24g_abort_packet
+0x4c2a mem_24g_rf_laststa
+0x4c2b mem_24g_hop_btclk
+0x4c2f mem_24g_hop_interval
+0x4c30 mem_24g_mode_switch
+0x4c31 mem_24g_ackpayload_enable
+0x4c32 mem_24g_hop_packet
+0x4c33 mem_24g_pair_mode
+0x4c34 mem_24g_nodata_timer_enable
+0x4c35 mem_24g_time_slice
+0x4c36 mem_24g_kb_data_sta_data
+0x4c3e mem_24g_kb_data_last_data
+0x4c46 mem_24g_kb_multikey_sta_data
+0x4c49 mem_24g_kb_multikey_last_data
+0x4c4c mem_24g_kb_blank_data_enable
+0x4c4d mem_24g_kb_mul_blank_data_enable
+0x4c4e mem_24g_ms_blank_data_enable
+0x4c4f mem_24g_kb_addr
+0x4c53 mem_24g_ms_addr
+0x4c57 mem_24g_dg_last_ch
+0x4c58 mem_24g_dg_ch_number
+0x4c59 mem_24g_dg_config_ch_once
+0x4c5a mem_24g_kb_last_ch
+0x4c5b mem_24g_kb_ch_number
+0x4c5c mem_24g_kb_config_ch_once
+0x4c5d mem_24g_ms_last_ch
+0x4c5e mem_24g_ms_ch_number
+0x4c5f mem_24g_ms_config_ch_once
+0x4c60 mem_24g_syncword
+0x4c62 mem_24g_syncword_crc8
+0x4c63 mem_24g_get_syncword_crc8
+0x4c64 mem_24g_ota_sta_pid
+0x4c66 mem_tx_power_temp
+0x4c67 mem_rssi_hex
+0x4c68 mem_rssi_noise_avg
+0x4c69 mem_rssi_noise_index
+0x4c6a mem_rssi_signal_index
+0x4c6b mem_rssi_noise_dg_avg
+0x4c6c mem_rssi_noise_kb_avg
+0x4c6d mem_rssi_noise_ms_avg
+0x4c6e mem_rssi_noise_dg_index
+0x4c6f mem_rssi_noise_kb_index
+0x4c70 mem_rssi_noise_ms_index
+0x4c71 mem_rssi_signal_buf
+0x4c79 mem_queue_ele_num
+0x4c7a mem_queue_read
+0x4c7c mem_queue_write
+0x4c7e mem_queue_start
+0x4c7e mem_data_ele0
+0x4c9e mem_data_ele1
+0x4cbe mem_data_ele2
+0x4cde mem_queue_end
+0x4cde mem_queue_temp
+0x4ce0 mem_cb_24g_data
+0x4ce2 mem_24g_hop_fastly_cnt
+0x4ce3 mem_24g_hop_pac_retry
+0x4ce4 mem_24g_rf_hop_ch
+0x4ce5 mem_24g_rf_last_sta
+0x4ce6 mem_24g_rf_work_stage
+0x4ce7 mem_24g_sync_cnt
+0x4ce8 mem_power_ctrl_pac_succ_cnt
+0x4ce9 mem_rssi_avg_received
+0x4cea mem_rssi_hex_received
+0x4ceb mem_power_ctrl_level
+0x4cec mem_seqi
+0x4ced mem_24g_auto_paring_switch
+0x4cee mem_24g_paccnt
+0x4cef mem_24g_transmit_by_interrupt
+0x4cf0 mem_24g_transmit_by_interrupt_exit_count
Index: output/program.lis
===================================================================
--- /branch/mouse_project/LeXiang/BT&BLE_Trust/output/program.lis	(revision 2203)
+++ /branch/mouse_project/LeXiang/BT&BLE_Trust/output/program.lis	(working copy)
@@ -46,14 +46,14 @@
 
 p_rssi_signal:
 0029 1fe22200 copy pdata ,rega 
-002a 6808cc66 fetcht 1 ,mem_rssi_signal_index 
-002b 58004c6d setarg mem_rssi_signal_buf 
+002a 6808cc6a fetcht 1 ,mem_rssi_signal_index 
+002b 58004c71 setarg mem_rssi_signal_buf 
 002c 98408a00 iadd temp ,contw 
 002d 1a227e00 copy rega ,pdata 
 002e e0a08000 istore 1 ,contw 
 002f 18408401 increase 1 ,temp 
 0030 18410407 and_into rssi_buf_len_signal ,temp 
-0031 6008cc66 storet 1 ,mem_rssi_signal_index 
+0031 6008cc6a storet 1 ,mem_rssi_signal_index 
 0032 20600000 rtn 
 
 p_soft_reset_1:
@@ -157,7 +157,7 @@
 007c 20358086 branch p_device_init_common ,wake 
 007d 20400164 call p_mouse_data_init 
 007e 6800c1de fetch 1 ,mem_tx_power 
-007f 6000cc62 store 1 ,mem_tx_power_temp 
+007f 6000cc66 store 1 ,mem_tx_power_temp 
 0080 20400512 call power_ctrl_pac_succ_cnt_init 
 0081 6800c685 fetch 1 ,mem_ui_button_timeout 
 0082 6000c6da store 1 ,mem_combination_ui_button_count 
@@ -170,7 +170,7 @@
 0087 202074b9 branch enable_authrom 
 
 p_mouse_tx_power_init:
-0088 6800cc62 fetch 1 ,mem_tx_power_temp 
+0088 6800cc66 fetch 1 ,mem_tx_power_temp 
 0089 6000c1de store 1 ,mem_tx_power 
 008a 20600000 rtn 
 
@@ -385,7 +385,7 @@
 
 p_g24_factory_check:
 0128 df200002 arg 2 ,loopcnt 
-0129 d8c04bd3 arg mem_24g_addr ,contr 
+0129 d8c04bd7 arg mem_24g_addr ,contr 
 
 p_pdata_0xff_check:
 012a 20407fe7 call enable_user 
@@ -1750,28 +1750,28 @@
 0511 2020636f branch host_create_conn_send_conn_req 
 
 power_ctrl_pac_succ_cnt_init:
-0512 704ce701 jam 1 ,mem_power_ctrl_level 
-0513 704ce400 jam 0 ,mem_power_ctrl_pac_succ_cnt 
+0512 704ceb01 jam 1 ,mem_power_ctrl_level 
+0513 704ce800 jam 0 ,mem_power_ctrl_pac_succ_cnt 
 0514 20600000 rtn 
 
 power_ctrl_pac_succ_incrs:
-0515 6800cce4 fetch 1 ,mem_power_ctrl_pac_succ_cnt 
+0515 6800cce8 fetch 1 ,mem_power_ctrl_pac_succ_cnt 
 0516 1fe0fe01 increase 1 ,pdata 
-0517 6000cce4 store 1 ,mem_power_ctrl_pac_succ_cnt 
+0517 6000cce8 store 1 ,mem_power_ctrl_pac_succ_cnt 
 0518 20600000 rtn 
 
 power_ctrl_pac_succ_decrs:
-0519 6800cce4 fetch 1 ,mem_power_ctrl_pac_succ_cnt 
+0519 6800cce8 fetch 1 ,mem_power_ctrl_pac_succ_cnt 
 051a 1fe67c02 sub pdata ,2 ,null 
 051b 24410521 ncall power_ctrl_pac_succ_cnt_reinit ,positive 
-051c 6800cce4 fetch 1 ,mem_power_ctrl_pac_succ_cnt 
+051c 6800cce8 fetch 1 ,mem_power_ctrl_pac_succ_cnt 
 051d c1000000 rtneq 0 
 051e 1fe0ffff increase -1 ,pdata 
-051f 6000cce4 store 1 ,mem_power_ctrl_pac_succ_cnt 
+051f 6000cce8 store 1 ,mem_power_ctrl_pac_succ_cnt 
 0520 20600000 rtn 
 
 power_ctrl_pac_succ_cnt_reinit:
-0521 704ce403 jam 3 ,mem_power_ctrl_pac_succ_cnt 
+0521 704ce803 jam 3 ,mem_power_ctrl_pac_succ_cnt 
 0522 20600000 rtn 
 
 power_ctrl_start:
@@ -1779,9 +1779,9 @@
 0524 c3858000 rtnbit1 ui_state_ble_adv 
 0525 c3838000 rtnbit1 ui_state_bt_reconnect 
 0526 c3830000 rtnbit1 ui_state_bt_discovery 
-0527 da204c6d arg mem_rssi_signal_buf ,rega 
+0527 da204c71 arg mem_rssi_signal_buf ,rega 
 0528 20400054 call p_rssi_average 
-0529 6008cce5 storet 1 ,mem_rssi_avg_received 
+0529 6008cce9 storet 1 ,mem_rssi_avg_received 
 052a 58000082 setarg rssi_dis_max_24g 
 052b c513052d bmark1 mark_24g ,power_ctrl_start_next 
 052c 58000080 setarg rssi_dis_max_ble 
@@ -1789,20 +1789,20 @@
 power_ctrl_start_next:
 052d 98467c00 isub temp ,null 
 052e 24210545 nbranch power_ctrl_txpower_incrs_force ,positive 
-052f 6800cce4 fetch 1 ,mem_power_ctrl_pac_succ_cnt 
+052f 6800cce8 fetch 1 ,mem_power_ctrl_pac_succ_cnt 
 0530 1fe67c02 sub pdata ,2 ,null 
 0531 24210535 nbranch power_ctrl_txpower_decrs_check ,positive 
-0532 6800cce4 fetch 1 ,mem_power_ctrl_pac_succ_cnt 
+0532 6800cce8 fetch 1 ,mem_power_ctrl_pac_succ_cnt 
 0533 c0000546 beq 0 ,power_ctrl_txpower_incrs 
 0534 20600000 rtn 
 
 power_ctrl_txpower_decrs_check:
-0535 6800cce4 fetch 1 ,mem_power_ctrl_pac_succ_cnt 
+0535 6800cce8 fetch 1 ,mem_power_ctrl_pac_succ_cnt 
 0536 c1900000 rtnne 32 
-0537 704ce400 jam 0 ,mem_power_ctrl_pac_succ_cnt 
+0537 704ce800 jam 0 ,mem_power_ctrl_pac_succ_cnt 
 
 power_ctrl_txpower_decrs:
-0538 6808cce5 fetcht 1 ,mem_rssi_avg_received 
+0538 6808cce9 fetcht 1 ,mem_rssi_avg_received 
 0539 58000077 setarg rssi_dis_min_24g 
 053a c513053c bmark1 mark_24g ,power_ctrl_txpower_decrs_next 
 053b 58000075 setarg rssi_dis_min_ble 
@@ -1810,10 +1810,10 @@
 power_ctrl_txpower_decrs_next:
 053c 98467c00 isub temp ,null 
 053d 24610000 nrtn positive 
-053e 6800cce7 fetch 1 ,mem_power_ctrl_level 
+053e 6800cceb fetch 1 ,mem_power_ctrl_level 
 053f c000054d beq 0 ,power_ctrl_decrs_level0 
 0540 1fe0ffff increase -1 ,pdata 
-0541 6000cce7 store 1 ,mem_power_ctrl_level 
+0541 6000cceb store 1 ,mem_power_ctrl_level 
 0542 c000054d beq 0 ,power_ctrl_decrs_level0 
 
 power_ctrl_decrs_level1:
@@ -1823,13 +1823,13 @@
 0544 20600000 rtn 
 
 power_ctrl_txpower_incrs_force:
-0545 704ce400 jam 0 ,mem_power_ctrl_pac_succ_cnt 
+0545 704ce800 jam 0 ,mem_power_ctrl_pac_succ_cnt 
 
 power_ctrl_txpower_incrs:
-0546 6800cce7 fetch 1 ,mem_power_ctrl_level 
+0546 6800cceb fetch 1 ,mem_power_ctrl_level 
 0547 c001054b beq 2 ,power_ctrl_incrs_level2 
 0548 1fe0fe01 increase 1 ,pdata 
-0549 6000cce7 store 1 ,mem_power_ctrl_level 
+0549 6000cceb store 1 ,mem_power_ctrl_level 
 054a c0008543 beq 1 ,power_ctrl_incrs_level1 
 
 power_ctrl_incrs_level2:
@@ -1915,11 +1915,11 @@
 p_drawing_optima:
 0583 6802469b fetch 4 ,mem_mouse_x 
 0584 207a0000 rtn blank 
-0585 204005d4 call p_data_abs_check 
+0585 204005e1 call p_data_abs_check 
 0586 58000006 setarg 0x06 
-0587 204005c7 call p_data_greater_than_check 
+0587 204005d4 call p_data_greater_than_check 
 0588 58000003 setarg 0x03 
-0589 204005cd call p_data_less_than_check 
+0589 204005da call p_data_less_than_check 
 058a 6800cb0b fetch 1 ,mem_mouse_asm_flag 
 058b c000858d beq 1 ,p_drawing_optima_modify 
 058c 20200580 branch p_drawing_optima_init 
@@ -1929,7 +1929,7 @@
 058e 600111be store 2 ,mem_data_pre 
 058f 6801469b fetch 2 ,mem_mouse_x 
 0590 600111c0 store 2 ,mem_data_current 
-0591 204005a0 call p_drawing_optima_data 
+0591 204005a0 call p_drawing_optima_data_x 
 0592 680111be fetch 2 ,mem_data_pre 
 0593 60014b0c store 2 ,mem_mouse_x_pre 
 0594 680111c0 fetch 2 ,mem_data_current 
@@ -1938,113 +1938,130 @@
 0597 600111be store 2 ,mem_data_pre 
 0598 6801469d fetch 2 ,mem_mouse_y 
 0599 600111c0 store 2 ,mem_data_current 
-059a 204005a0 call p_drawing_optima_data 
+059a 204005a8 call p_drawing_optima_data_y 
 059b 680111be fetch 2 ,mem_data_pre 
 059c 60014b0e store 2 ,mem_mouse_y_pre 
 059d 680111c0 fetch 2 ,mem_data_current 
 059e 6001469d store 2 ,mem_mouse_y 
 059f 20600000 rtn 
 
-p_drawing_optima_data:
+p_drawing_optima_data_x:
 05a0 680111be fetch 2 ,mem_data_pre 
 05a1 680911c0 fetcht 2 ,mem_data_current 
 05a2 9840fe00 iadd temp ,pdata 
-05a3 600191c2 store 3 ,mem_data_sum 
-05a4 2feffe10 isolate1 16 ,pdata 
-05a5 202085ad branch p_data_sum_overflow ,true 
-05a6 680091c3 fetch 1 ,mem_data_sum + 1 
-05a7 c07f85b4 beq 0xff ,p_data_sum_n 
-05a8 680091c2 fetch 1 ,mem_data_sum 
+05a3 6808cb27 fetcht 1 ,mem_mouse_data_xtemp 
+05a4 9840fe00 iadd temp ,pdata 
+05a5 1fe10401 and pdata ,0x01 ,temp 
+05a6 6008cb27 storet 1 ,mem_mouse_data_xtemp 
+05a7 202005b0 branch p_drawing_optima_data 
+
+p_drawing_optima_data_y:
+05a8 680111be fetch 2 ,mem_data_pre 
+05a9 680911c0 fetcht 2 ,mem_data_current 
+05aa 9840fe00 iadd temp ,pdata 
+05ab 6808cb28 fetcht 1 ,mem_mouse_data_ytemp 
+05ac 9840fe00 iadd temp ,pdata 
+05ad 1fe10401 and pdata ,0x01 ,temp 
+05ae 6008cb28 storet 1 ,mem_mouse_data_ytemp 
+05af 202005b0 branch p_drawing_optima_data 
+
+p_drawing_optima_data:
+05b0 600191c2 store 3 ,mem_data_sum 
+05b1 2feffe10 isolate1 16 ,pdata 
+05b2 202085ba branch p_data_sum_overflow ,true 
+05b3 680091c3 fetch 1 ,mem_data_sum + 1 
+05b4 c07f85c1 beq 0xff ,p_data_sum_n 
+05b5 680091c2 fetch 1 ,mem_data_sum 
 
 p_data_store_pre:
-05a9 1fe37e00 rshift pdata ,pdata 
-05aa 600111be store 2 ,mem_data_pre 
-05ab 600111c0 store 2 ,mem_data_current 
-05ac 20600000 rtn 
+05b6 1fe37e00 rshift pdata ,pdata 
+05b7 600111be store 2 ,mem_data_pre 
+05b8 600111c0 store 2 ,mem_data_current 
+05b9 20600000 rtn 
 
 p_data_sum_overflow:
-05ad 680091c3 fetch 1 ,mem_data_sum + 1 
-05ae c00005b1 beq 0 ,p_data_sum_overflow_p 
-05af 680191c2 fetch 3 ,mem_data_sum 
-05b0 202005a9 branch p_data_store_pre 
+05ba 680091c3 fetch 1 ,mem_data_sum + 1 
+05bb c00005be beq 0 ,p_data_sum_overflow_p 
+05bc 680191c2 fetch 3 ,mem_data_sum 
+05bd 202005b6 branch p_data_store_pre 
 
 p_data_sum_overflow_p:
-05b1 7011c400 jam 0 ,mem_data_sum + 2 
-05b2 680091c2 fetch 1 ,mem_data_sum 
-05b3 202005a9 branch p_data_store_pre 
+05be 7011c400 jam 0 ,mem_data_sum + 2 
+05bf 680091c2 fetch 1 ,mem_data_sum 
+05c0 202005b6 branch p_data_store_pre 
 
 p_data_sum_n:
-05b4 680091c2 fetch 1 ,mem_data_sum 
-05b5 204005bf call p_pdata_get_half 
-05b6 600091be store 1 ,mem_data_pre 
-05b7 600091c0 store 1 ,mem_data_current 
-05b8 203a05bd branch p_data_zero ,blank 
-05b9 580000ff setarg 0xff 
+05c1 680091c2 fetch 1 ,mem_data_sum 
+05c2 204005cc call p_pdata_get_half 
+05c3 600091be store 1 ,mem_data_pre 
+05c4 600091c0 store 1 ,mem_data_current 
+05c5 203a05ca branch p_data_zero ,blank 
+05c6 580000ff setarg 0xff 
 
 p_data_set_direction:
-05ba 600091bf store 1 ,mem_data_pre + 1 
-05bb 600091c1 store 1 ,mem_data_current + 1 
-05bc 20600000 rtn 
+05c7 600091bf store 1 ,mem_data_pre + 1 
+05c8 600091c1 store 1 ,mem_data_current + 1 
+05c9 20600000 rtn 
 
 p_data_zero:
-05bd 58000000 setarg 0 
-05be 202005ba branch p_data_set_direction 
+05ca 58000000 setarg 0 
+05cb 202005c7 branch p_data_set_direction 
 
 p_pdata_get_half:
-05bf 1fe67e00 sub pdata ,0 ,pdata 
-05c0 60008aae store 1 ,mem_rega 
-05c1 68008aae fetch 1 ,mem_rega 
-05c2 1fe37e00 rshift pdata ,pdata 
-05c3 60008aae store 1 ,mem_rega 
-05c4 68008aae fetch 1 ,mem_rega 
-05c5 1fe67e00 sub pdata ,0 ,pdata 
-05c6 20600000 rtn 
+05cc 1fe67e00 sub pdata ,0 ,pdata 
+05cd 60008aae store 1 ,mem_rega 
+05ce 68008aae fetch 1 ,mem_rega 
+05cf 1fe37e00 rshift pdata ,pdata 
+05d0 60008aae store 1 ,mem_rega 
+05d1 68008aae fetch 1 ,mem_rega 
+05d2 1fe67e00 sub pdata ,0 ,pdata 
+05d3 20600000 rtn 
 
 p_data_greater_than_check:
-05c7 9a267c00 isub rega ,null 
-05c8 242105d2 nbranch p_enable_asm ,positive 
-05c9 9a467c00 isub regb ,null 
-05ca 242105d2 nbranch p_enable_asm ,positive 
+05d4 9a267c00 isub rega ,null 
+05d5 242105df nbranch p_enable_asm ,positive 
+05d6 9a467c00 isub regb ,null 
+05d7 242105df nbranch p_enable_asm ,positive 
 
 p_disable_asm:
-05cb 704b0b00 jam 0 ,mem_mouse_asm_flag 
-05cc 20600000 rtn 
+05d8 704b0b00 jam 0 ,mem_mouse_asm_flag 
+05d9 20600000 rtn 
 
 p_data_less_than_check:
-05cd 9a267c00 isub rega ,null 
-05ce 24610000 nrtn positive 
-05cf 9a467c00 isub regb ,null 
-05d0 24610000 nrtn positive 
-05d1 202005cb branch p_disable_asm 
+05da 9a267c00 isub rega ,null 
+05db 24610000 nrtn positive 
+05dc 9a467c00 isub regb ,null 
+05dd 24610000 nrtn positive 
+05de 202005d8 branch p_disable_asm 
 
 p_enable_asm:
-05d2 704b0b01 jam 1 ,mem_mouse_asm_flag 
-05d3 20600000 rtn 
+05df 704b0b01 jam 1 ,mem_mouse_asm_flag 
+05e0 20600000 rtn 
 
 p_data_abs_check:
-05d4 6801469b fetch 2 ,mem_mouse_x 
-05d5 600111c0 store 2 ,mem_data_current 
-05d6 204005dd call p_data_abs 
-05d7 1fe22200 copy pdata ,rega 
-05d8 6801469d fetch 2 ,mem_mouse_y 
-05d9 600111c0 store 2 ,mem_data_current 
-05da 204005dd call p_data_abs 
-05db 1fe22400 copy pdata ,regb 
-05dc 20600000 rtn 
+05e1 6801469b fetch 2 ,mem_mouse_x 
+05e2 600111c0 store 2 ,mem_data_current 
+05e3 204005ea call p_data_abs 
+05e4 1fe22200 copy pdata ,rega 
+05e5 6801469d fetch 2 ,mem_mouse_y 
+05e6 600111c0 store 2 ,mem_data_current 
+05e7 204005ea call p_data_abs 
+05e8 1fe22400 copy pdata ,regb 
+05e9 20600000 rtn 
 
 p_data_abs:
-05dd 680091c1 fetch 1 ,mem_data_current + 1 
-05de c07f85e2 beq 0xff ,p_data_reversal 
-05df 680091c0 fetch 1 ,mem_data_current 
+05ea 680091c1 fetch 1 ,mem_data_current + 1 
+05eb c07f85ef beq 0xff ,p_data_reversal 
+05ec 680091c0 fetch 1 ,mem_data_current 
 
 p_data_abs_store:
-05e0 1fe17eff and_into 0xff ,pdata 
-05e1 20600000 rtn 
+05ed 1fe17eff and_into 0xff ,pdata 
+05ee 20600000 rtn 
 
 p_data_reversal:
-05e2 680111c0 fetch 2 ,mem_data_current 
-05e3 1fe67e00 sub pdata ,0 ,pdata 
-05e4 202005e0 branch p_data_abs_store 
+05ef 680111c0 fetch 2 ,mem_data_current 
+05f0 1fe67e00 sub pdata ,0 ,pdata 
+05f1 202005ed branch p_data_abs_store 
 org 0x2000
 
 start:
Index: program/patch.prog
===================================================================
--- /branch/mouse_project/LeXiang/BT&BLE_Trust/program/patch.prog	(revision 2203)
+++ /branch/mouse_project/LeXiang/BT&BLE_Trust/program/patch.prog	(working copy)
@@ -3348,7 +3348,7 @@
 	store 2,mem_data_pre
 	fetch 2,mem_mouse_x
 	store 2,mem_data_current
-	call p_drawing_optima_data
+	call p_drawing_optima_data_x
 	fetch 2,mem_data_pre
 	store 2,mem_mouse_x_pre
 	fetch 2,mem_data_current
@@ -3358,21 +3358,38 @@
 	store 2,mem_data_pre
 	fetch 2,mem_mouse_y
 	store 2,mem_data_current
-	call p_drawing_optima_data
+	call p_drawing_optima_data_y
 	fetch 2,mem_data_pre
 	store 2,mem_mouse_y_pre
 	fetch 2,mem_data_current
 	store 2,mem_mouse_y
 	rtn
 
+p_drawing_optima_data_x:
+	fetch 2,mem_data_pre
+	fetcht 2,mem_data_current
+	iadd temp,pdata
+	fetcht 1,mem_mouse_data_xtemp
+	iadd temp,pdata
+	and pdata,0x01,temp
+	storet 1,mem_mouse_data_xtemp
+	branch p_drawing_optima_data
+
+p_drawing_optima_data_y:
+	fetch 2,mem_data_pre
+	fetcht 2,mem_data_current
+	iadd temp,pdata
+	fetcht 1,mem_mouse_data_ytemp
+	iadd temp,pdata
+	and pdata,0x01,temp
+	storet 1,mem_mouse_data_ytemp
+	branch p_drawing_optima_data
+	
 /**********
 input:data_pre,data_current
 output:data_pre,data_current after optima
 ***********/
 p_drawing_optima_data:
-	fetch 2,mem_data_pre
-	fetcht 2,mem_data_current
-	iadd temp,pdata
 	store 3,mem_data_sum
 	isolate1 16,pdata
 	branch p_data_sum_overflow,true
Index: sched/mouse.dat
===================================================================
--- /branch/mouse_project/LeXiang/BT&BLE_Trust/sched/mouse.dat	(revision 2203)
+++ /branch/mouse_project/LeXiang/BT&BLE_Trust/sched/mouse.dat	(working copy)
@@ -245,6 +245,8 @@
 mem_24g_common_temp:00 00 00 00 00 00 00 00 00 00
 mem_24g_enter_hibernate:00 48 60
 
+mem_firmware_version:01 00
+
 mem_device_flag:
 01
 ff
