Index: output/eeprom.dat
===================================================================
--- /1121s/1121se/branch/mouse/AI_Project/baidu_project/mouse_ai_voice_baidu/output/eeprom.dat	(revision 5388)
+++ /1121s/1121se/branch/mouse/AI_Project/baidu_project/mouse_ai_voice_baidu/output/eeprom.dat	(working copy)
@@ -10941,11 +10941,11 @@
 c2
 81
 00
-28
+29
 c2
 85
 00
-33
+35
 20
 60
 00
@@ -11061,7 +11061,11 @@
 c0
 01
 80
-26
+27
+c0
+02
+00
+27
 68
 48
 ce
@@ -11085,11 +11089,11 @@
 c0
 01
 80
-2b
+2c
 20
 20
 00
-2f
+31
 6f
 e0
 c8
@@ -11097,7 +11101,11 @@
 c0
 01
 80
-31
+33
+c0
+02
+00
+33
 68
 48
 ce
@@ -11129,11 +11137,11 @@
 c0
 01
 80
-36
+38
 20
 20
 00
-3a
+3d
 6f
 e0
 c8
@@ -11141,7 +11149,11 @@
 c0
 01
 80
-3c
+3f
+c0
+02
+00
+3f
 68
 48
 ce
@@ -11165,18 +11177,6 @@
 20
 20
 00
-0b
-00
-00
-00
-00
-00
-00
-00
-00
-20
-20
-00
 40
 c0
 10
@@ -11946,8 +11946,8 @@
 00
 00
 00
-2b
-6a
+c0
+3f
 ff
 1e
 f0
Index: output/otp.dat
===================================================================
--- /1121s/1121se/branch/mouse/AI_Project/baidu_project/mouse_ai_voice_baidu/output/otp.dat	(revision 5388)
+++ /1121s/1121se/branch/mouse/AI_Project/baidu_project/mouse_ai_voice_baidu/output/otp.dat	(working copy)
@@ -10950,11 +10950,11 @@
 c2
 81
 00
-28
+29
 c2
 85
 00
-33
+35
 20
 60
 00
@@ -11070,7 +11070,11 @@
 c0
 01
 80
-26
+27
+c0
+02
+00
+27
 68
 48
 ce
@@ -11094,11 +11098,11 @@
 c0
 01
 80
-2b
+2c
 20
 20
 00
-2f
+31
 6f
 e0
 c8
@@ -11106,7 +11110,11 @@
 c0
 01
 80
-31
+33
+c0
+02
+00
+33
 68
 48
 ce
@@ -11138,11 +11146,11 @@
 c0
 01
 80
-36
+38
 20
 20
 00
-3a
+3d
 6f
 e0
 c8
@@ -11150,7 +11158,11 @@
 c0
 01
 80
-3c
+3f
+c0
+02
+00
+3f
 68
 48
 ce
@@ -11174,18 +11186,6 @@
 20
 20
 00
-0b
-00
-00
-00
-00
-00
-00
-00
-00
-20
-20
-00
 40
 c0
 10
@@ -11955,6 +11955,6 @@
 00
 00
 00
-2b
-6a
+c0
+3f
 24
Index: output/program.lis
===================================================================
--- /1121s/1121se/branch/mouse/AI_Project/baidu_project/mouse_ai_voice_baidu/output/program.lis	(revision 5388)
+++ /1121s/1121se/branch/mouse/AI_Project/baidu_project/mouse_ai_voice_baidu/output/program.lis	(working copy)
@@ -34918,8 +34918,8 @@
 z_g24_send_spec_pro_info_check:
 40003 6fe1487b fetch 2 ,mem_ms_tx_pro_key_flag 
 40004 c2800008 bbit1 audio_key_bit ,z_g24_tx_audio_key_info 
-40005 c2810028 bbit1 transmit_key_bit ,z_g24_tx_transmit_key_info 
-40006 c2850033 bbit1 one_pullup_key_bit ,z_g24_tx_one_pullup_key_info 
+40005 c2810029 bbit1 transmit_key_bit ,z_g24_tx_transmit_key_info 
+40006 c2850035 bbit1 one_pullup_key_bit ,z_g24_tx_one_pullup_key_info 
 40007 20600000 rtn 
 
 z_g24_tx_audio_key_info:
@@ -34960,51 +34960,54 @@
 
 z_b4_app_key_function:
 40022 6fe0c87d fetch 1 ,mem_ms_tx_pro_key_val 
-40023 c0018026 beq long_press ,z_b4_app_key_long_function 
-40024 6848ce50 fetcht 1 ,mem_mouse_b4_fuction_info + 2 
-40025 2020000b branch z_g24_tx_key_info_check 
+40023 c0018027 beq long_press ,z_b4_app_key_long_function 
+40024 c0020027 beq long_release ,z_b4_app_key_long_function 
+40025 6848ce50 fetcht 1 ,mem_mouse_b4_fuction_info + 2 
+40026 2020000b branch z_g24_tx_key_info_check 
 
 z_b4_app_key_long_function:
-40026 6848ce51 fetcht 1 ,mem_mouse_b4_fuction_info + 3 
-40027 2020000b branch z_g24_tx_key_info_check 
+40027 6848ce51 fetcht 1 ,mem_mouse_b4_fuction_info + 3 
+40028 2020000b branch z_g24_tx_key_info_check 
 
 z_g24_tx_transmit_key_info:
-40028 6fe0ce53 fetch 1 ,mem_mouse_b5_fuction_info 
-40029 c001802b beq app_key ,z_b5_app_key_function 
-4002a 2020002f branch z_g24_tx_transmit_key_info_next 
+40029 6fe0ce53 fetch 1 ,mem_mouse_b5_fuction_info 
+4002a c001802c beq app_key ,z_b5_app_key_function 
+4002b 20200031 branch z_g24_tx_transmit_key_info_next 
 
 z_b5_app_key_function:
-4002b 6fe0c87d fetch 1 ,mem_ms_tx_pro_key_val 
-4002c c0018031 beq long_press ,z_b5_app_key_long_function 
-4002d 6848ce55 fetcht 1 ,mem_mouse_b5_fuction_info + 2 
-4002e 2020000b branch z_g24_tx_key_info_check 
+4002c 6fe0c87d fetch 1 ,mem_ms_tx_pro_key_val 
+4002d c0018033 beq long_press ,z_b5_app_key_long_function 
+4002e c0020033 beq long_release ,z_b5_app_key_long_function 
+4002f 6848ce55 fetcht 1 ,mem_mouse_b5_fuction_info + 2 
+40030 2020000b branch z_g24_tx_key_info_check 
 
 z_g24_tx_transmit_key_info_next:
-4002f d8400022 arg opcode_transmit_key ,temp 
-40030 2020000b branch z_g24_tx_key_info_check 
+40031 d8400022 arg opcode_transmit_key ,temp 
+40032 2020000b branch z_g24_tx_key_info_check 
 
 z_b5_app_key_long_function:
-40031 6848ce56 fetcht 1 ,mem_mouse_b5_fuction_info + 3 
-40032 2020000b branch z_g24_tx_key_info_check 
+40033 6848ce56 fetcht 1 ,mem_mouse_b5_fuction_info + 3 
+40034 2020000b branch z_g24_tx_key_info_check 
 
 z_g24_tx_one_pullup_key_info:
-40033 6fe0ce58 fetch 1 ,mem_mouse_dpi_fuction_info 
-40034 c0018036 beq app_key ,z_dpi_app_key_function 
-40035 2020003a branch z_g24_tx_one_pullup_key_info_next 
+40035 6fe0ce58 fetch 1 ,mem_mouse_dpi_fuction_info 
+40036 c0018038 beq app_key ,z_dpi_app_key_function 
+40037 2020003d branch z_g24_tx_one_pullup_key_info_next 
 
 z_dpi_app_key_function:
-40036 6fe0c87d fetch 1 ,mem_ms_tx_pro_key_val 
-40037 c001803c beq long_press ,z_dpi_app_key_long_function 
-40038 6848ce5a fetcht 1 ,mem_mouse_dpi_fuction_info + 2 
-40039 2020000b branch z_g24_tx_key_info_check 
+40038 6fe0c87d fetch 1 ,mem_ms_tx_pro_key_val 
+40039 c001803f beq long_press ,z_dpi_app_key_long_function 
+4003a c002003f beq long_release ,z_dpi_app_key_long_function 
+4003b 6848ce5a fetcht 1 ,mem_mouse_dpi_fuction_info + 2 
+4003c 2020000b branch z_g24_tx_key_info_check 
 
 z_g24_tx_one_pullup_key_info_next:
-4003a d8400030 arg opcode_one_pullup_key ,temp 
-4003b 2020000b branch z_g24_tx_key_info_check 
+4003d d8400030 arg opcode_one_pullup_key ,temp 
+4003e 2020000b branch z_g24_tx_key_info_check 
 
 z_dpi_app_key_long_function:
-4003c 6848ce5b fetcht 1 ,mem_mouse_dpi_fuction_info + 3 
-4003d 2020000b branch z_g24_tx_key_info_check 
+4003f 6848ce5b fetcht 1 ,mem_mouse_dpi_fuction_info + 3 
+40040 2020000b branch z_g24_tx_key_info_check 
               org 0x50001
 
 z_entrance4:
Index: output/romcode.rom
===================================================================
--- /1121s/1121se/branch/mouse/AI_Project/baidu_project/mouse_ai_voice_baidu/output/romcode.rom	(revision 5388)
+++ /1121s/1121se/branch/mouse/AI_Project/baidu_project/mouse_ai_voice_baidu/output/romcode.rom	(working copy)
@@ -23874,6 +23874,9 @@
 d840003a
 98467c00
 24217d4a
+d8400061
+98467c00
+20217d4d
 00020001
 18000228
 03020002
@@ -24385,4 +24388,4 @@
 00000000
 00000000
 00000000
-000080e6
\ No newline at end of file
+00002023
\ No newline at end of file
Index: program/z.prog
===================================================================
--- /1121s/1121se/branch/mouse/AI_Project/baidu_project/mouse_ai_voice_baidu/program/z.prog	(nonexistent)
+++ /1121s/1121se/branch/mouse/AI_Project/baidu_project/mouse_ai_voice_baidu/program/z.prog	(working copy)
@@ -0,0 +1,513 @@
+org 0x10001
+z_entrance0:
+	beq ZCODE_00,z_mouse_start_work
+    beq ZCODE_01,z_mouse_param_info_init
+    beq ZCODE_02,z_mouse_default_init
+	rtn
+z_mouse_start_work:
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	bbit1 MOUSE_ENABLE_24G_FIRST_AUTO_PAIRING, mouse_24g_first_start_auto_pair_mode
+	fetch 1,mem_device_flag
+	beq MODE_24G_DEVICE,mouse_24g_start_mode
+	call p_mouse_le_param_default
+	branch mouse_le_fast_conn_judge
+
+z_mouse_param_info_init:
+	call mouse_param_info_init+1
+	setarg mem_le_tx_buffer0_omemalloc_new
+	store 2,mem_ble_l2cap_tx_buff0_ptr
+	setarg MOUSE_BLE_L2CAP_TXBUFF_SIZE_NEW
+	store 2,mem_ble_l2cap_tx_buff_size_ptr
+	setarg mem_ui_le_uuid_table_new				//ble attlist start address
+	store 2,mem_ui_le_uuid_table
+	jam 70,mem_le_local_mtu
+	jam 0x0f,mem_24g_fast_hop_count
+	rtn
+
+z_mouse_default_init:
+	call mouse_default_init+1
+	jam 1,mem_24g_disable_fec1
+	jam 1,mem_power_ctrl_disable
+	jam 0,mem_voice_queue_count
+	jam 1,mem_mouse_sleep_deal_type
+	jam 0x10,mem_mouse_24g_tx_time_sum_count
+	rtn
+
+org 0x20001
+z_entrance1:
+    beq ZCODE_10,z_mouse_load_device_info_check
+    beq ZCODE_11,z_mouse_24g_attempt_fail
+    beq ZCODE_12,z_sadc_calibration
+    rtn
+z_mouse_load_device_info_check:
+	call mouse_load_eeprom_info_check
+	call z_mouse_load_key_info_check
+	fetch 1,mem_mouse_dpi
+	store 1,mem_mouse_last_dpi
+	arg 8,temp
+	arg msm_ms_auth_sn,rega
+	arg MOUSE_AUTH_INFO_OFFSET,regb
+	branch iicd_read_eep_data
+
+z_mouse_load_key_info_check:
+	arg 15,temp
+	arg mem_mouse_key_information_start,rega
+	arg MOUSE_VALUE_EEPROM_OFFECT,regb
+	branch iicd_read_eep_data
+
+z_mouse_24g_attempt_fail:
+	call mouse_soft_agc_disable
+	call device_fetch_normal_tx_power
+	fetch 1,mem_24g_attempt_fail_flag
+	nbranch mouse_24g_hibernate_set,blank
+	fetch 1,mem_24g_reconn_type
+	beq PAIR_AND_RECEIVER,mouse_24g_auto_pair_attempt_fail
+	beq FAST_CONN_AND_RECEIVER,z_mouse_24g_fast_conn_attempt_fail
+	branch mouse_24g_attempt_fail+4
+
+z_mouse_24g_fast_conn_attempt_fail:
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag 
+	bbit1 MOUSE_ENABLE_24G_FIRST_AUTO_PAIRING,z_mouse_24g_start_auto_pair
+	bbit1 MOUSE_ENABLE_AUTO_24G_PARING,z_mouse_24g_start_auto_pair
+	branch mouse_24g_fast_conn_attempt_fail+3
+z_mouse_24g_start_auto_pair:
+	fetch 2,mem_24g_pair_timeout_init
+	store 2,mem_24g_reconn_timeout
+	jam PAIR_AND_RECEIVER,mem_24g_reconn_type
+	branch g24_reconn_start
+
+z_sadc_calibration:
+	rtn wake
+	jam 0x77,core_gpadc_ctrl
+	jam 0xc9,core_gpadc_cfg0
+	jam 0x00,core_gpadc_cfg3
+	fetch 1,mem_adc_clkdiv
+	store 1,core_sadc_clkdiv
+	call p_sadc_read
+	fetcht 2,core_sadc_data
+	branch sadc_calibration+11
+
+
+org 0x30001
+z_entrance2:
+	beq ZCODE_20,z_g24_receive_ack_data_next
+	rtn
+z_g24_receive_ack_data_next:
+	fetch 1,mem_24g_rxpayload+3
+//	beq OPCODE_APPKEY,p_mouse_receive_dg_appkey_data
+//	beq OPCODE_SECRET,p_mouse_receive_dg_secret_data
+//	beq OPCODE_SN,p_mouse_receive_dg_sn_data
+//	beq OPCODE_CHIP_ID,p_mouse_receive_dg_chip_id_data
+	beq OPCODE_VOICE_START,z_mouse_receive_dg_voice_start_data
+	beq OPCODE_VOICE_END,z_mouse_receive_dg_voice_end_data
+	beq OPCODE_GET_DEVICE_INFO,z_mouse_receive_dg_get_device_info_data
+	beq OPCODE_GET_DPI,z_mouse_receive_dg_get_dpi_data
+	beq OPCODE_SET_DPI,z_mouse_receive_dg_set_dpi_data
+	beq OPCODE_GET_BATTERY,z_mouse_receive_dg_get_battery_data
+	beq OPCODE_GET_DEVICE_TYPE,z_mouse_receive_dg_get_device_type_data
+	beq OPCODE_SET_KEY_FUCTION,z_mouse_receive_dg_set_key_fuction_data
+	rtn
+/*
+p_mouse_receive_dg_appkey_data:
+	arg APPKEY,queue
+	branch p_ms_tx_nor_pro_flag_enable
+p_mouse_receive_dg_secret_data:
+	arg SECRET,queue
+	branch p_ms_tx_nor_pro_flag_enable
+p_mouse_receive_dg_sn_data:
+	arg SN_CODE,queue
+	branch p_ms_tx_nor_pro_flag_enable
+p_mouse_receive_dg_chip_id_data:
+	arg CHIP_ID,queue
+	branch p_ms_tx_nor_pro_flag_enable
+*/
+z_mouse_receive_dg_voice_start_data:
+	arg VOICE_START,queue
+	branch p_ms_tx_nor_pro_flag_enable
+z_mouse_receive_dg_voice_end_data:
+	arg VOICE_END,queue
+	branch p_ms_tx_nor_pro_flag_enable
+z_mouse_receive_dg_get_device_info_data:
+	arg DEVICE_INFO,queue
+	branch p_ms_tx_nor_pro_flag_enable
+z_mouse_receive_dg_get_dpi_data:
+	jam APP_ASK,mem_mouse_dpi_type
+	branch p_mouse_g24_tx_dpi_data
+z_mouse_receive_dg_set_dpi_data:
+	arg mem_24g_rxpayload+1,contr
+	call p_mouse_receive_dpi_check
+	arg SET_DPI,queue
+	branch p_ms_tx_nor_pro_flag_enable
+z_mouse_receive_dg_get_battery_data:
+	jam APP_ASK,mem_mouse_battery_type
+	arg GET_BATTERY,queue
+	branch p_ms_tx_nor_pro_flag_enable
+z_mouse_receive_dg_get_device_type_data:
+	arg GET_DEVICE_TYPE,queue
+	branch p_ms_tx_nor_pro_flag_enable
+z_mouse_receive_dg_set_key_fuction_data:
+	arg mem_24g_rxpayload+1,contr
+	call p_mouse_receive_key_fuction_check
+	arg SET_KEY_FUCTION,queue
+	branch p_ms_tx_nor_pro_flag_enable
+
+org 0x40001
+z_entrance3:
+	beq ZCODE_30,z_g24_send_spec_pro_info_check
+	rtn
+
+//===================spec pro: send key state=========================//
+z_g24_send_spec_pro_info_check:	
+	fetch 2,mem_ms_tx_pro_key_flag
+	bbit1 AUDIO_KEY_BIT,z_g24_tx_audio_key_info
+	// bbit1 ASK_KEY_BIT,p_g24_tx_ask_key_info
+	bbit1 TRANSMIT_KEY_BIT,z_g24_tx_transmit_key_info
+	// bbit1 AUDIO_CTRL_KEY_BIT,p_g24_tx_audio_ctrl_key_info
+	// bbit1 WRITE_KEY_BIT,p_g24_tx_write_key_info
+//	bbit1 SUMARY_KEY_BIT,p_g24_tx_sumary_key_info
+//	bbit1 PPT_KEY_BIT,p_g24_tx_ppt_key_info
+//	bbit1 DRAW_KEY_BIT,p_g24_tx_draw_key_info
+//	bbit1 PRTSCN_KEY_BIT,p_g24_tx_prtscn_key_info
+//	bbit1 AI_KEY_BIT,p_g24_tx_ai_key_info
+	bbit1 ONE_PULLUP_KEY_BIT,z_g24_tx_one_pullup_key_info
+	rtn
+
+z_g24_tx_audio_key_info:
+	fetch 1,mem_mouse_b4_fuction_info
+	beq APP_KEY,z_b4_app_key_function
+z_g24_tx_audio_key_info_next:
+	arg OPCODE_VOICE_KEY,temp
+z_g24_tx_key_info_check:
+	fetch 1,mem_ms_rf_data_flag
+	branch z_g24_only_send_key_info_interface,blank
+	// branch z_g24_send_key_info_interface
+z_g24_send_key_info_interface:
+	storet 1,mem_ms_24g_temp_buff+3
+	fetch 1,mem_24g_data_type
+	set1 SPEC_PRO_BIT,pdata
+	store 1,mem_ms_24g_temp_buff
+	jam START_FLAG,mem_ms_24g_temp_buff+1
+	jam KEY_STATE_PAYLOAD_LEN,mem_ms_24g_temp_buff+2
+	fetch 1,mem_ms_tx_pro_key_val
+	store 1,mem_ms_24g_temp_buff+4
+	arg KEY_STATE_INFO_LEN,temp
+	arg mem_ms_24g_temp_buff,rega
+	branch p_g24_send_rf_other_data
+
+z_g24_only_send_key_info_interface:
+	storet 1,mem_24g_txbuf_new+3
+	fetch 1,mem_24g_data_type
+	set1 SPEC_PRO_BIT,pdata
+	store 1,mem_24g_txbuf_new
+	jam START_FLAG,mem_24g_txbuf_new+1
+	jam KEY_STATE_PAYLOAD_LEN,mem_24g_txbuf_new+2
+	fetch 1,mem_ms_tx_pro_key_val
+	store 1,mem_24g_txbuf_new+4
+	jam KEY_STATE_INFO_LEN,mem_24g_datalen
+	rtn
+
+
+z_b4_app_key_function:
+	fetch 1,mem_ms_tx_pro_key_val
+	beq LONG_PRESS,z_b4_app_key_long_function
+	beq LONG_RELEASE,z_b4_app_key_long_function
+	fetcht 1,mem_mouse_b4_fuction_info+2
+	branch z_g24_tx_key_info_check
+
+z_b4_app_key_long_function:
+	fetcht 1,mem_mouse_b4_fuction_info+3
+	branch z_g24_tx_key_info_check
+
+
+z_g24_tx_transmit_key_info:
+	fetch 1,mem_mouse_b5_fuction_info
+	beq APP_KEY,z_b5_app_key_function
+	branch z_g24_tx_transmit_key_info_next
+z_b5_app_key_function:
+	fetch 1,mem_ms_tx_pro_key_val
+	beq LONG_PRESS,z_b5_app_key_long_function
+	beq LONG_RELEASE,z_b5_app_key_long_function
+	fetcht 1,mem_mouse_b5_fuction_info+2
+	branch z_g24_tx_key_info_check
+z_g24_tx_transmit_key_info_next:
+	arg OPCODE_TRANSMIT_KEY,temp
+	branch z_g24_tx_key_info_check
+
+z_b5_app_key_long_function:
+	fetcht 1,mem_mouse_b5_fuction_info+3
+	branch z_g24_tx_key_info_check
+
+
+z_g24_tx_one_pullup_key_info:
+	fetch 1,mem_mouse_dpi_fuction_info
+	beq APP_KEY,z_dpi_app_key_function
+	branch z_g24_tx_one_pullup_key_info_next
+z_dpi_app_key_function:
+	fetch 1,mem_ms_tx_pro_key_val
+	beq LONG_PRESS,z_dpi_app_key_long_function
+	beq LONG_RELEASE,z_dpi_app_key_long_function
+	fetcht 1,mem_mouse_dpi_fuction_info+2
+	branch z_g24_tx_key_info_check
+z_g24_tx_one_pullup_key_info_next:
+	arg OPCODE_ONE_PULLUP_KEY,temp
+	branch z_g24_tx_key_info_check
+
+z_dpi_app_key_long_function:
+	fetcht 1,mem_mouse_dpi_fuction_info+3
+	branch z_g24_tx_key_info_check
+
+
+
+// p_g24_tx_ask_key_info:
+// 	arg OPCODE_ASK_KEY,temp
+// 	branch p_g24_tx_key_info_check
+
+// p_b5_app_key_long_function:
+// 	fetcht 1,mem_mouse_b5_fuction_info+3
+// 	branch p_g24_tx_key_info_check
+
+// p_g24_tx_transmit_key_info:
+// 	fetch 1,mem_mouse_b5_fuction_info
+// 	beq APP_KEY,p_b5_app_key_function
+// 	branch p_g24_tx_transmit_key_info_next
+// p_b5_app_key_function:
+// 	fetch 1,mem_ms_tx_pro_key_val
+// 	beq LONG_PRESS,p_b5_app_key_long_function
+// 	fetcht 1,mem_mouse_b5_fuction_info+2
+// 	branch p_g24_tx_key_info_check
+// p_g24_tx_transmit_key_info_next:
+// 	arg OPCODE_TRANSMIT_KEY,temp
+// 	branch p_g24_tx_key_info_check
+
+
+// p_g24_tx_audio_ctrl_key_info:
+// 	arg OPCODE_VOICE_CTRL_KEY,temp
+// 	branch p_g24_tx_key_info_check
+
+// p_g24_tx_write_key_info:
+// 	arg OPCODE_WRITE_KEY,temp
+// 	branch p_g24_tx_key_info_check
+
+org 0x50001
+z_entrance4:
+	beq ZCODE_40,z_g24_tx_device_info
+	beq ZCODE_41,z_g24_get_dpi
+	rtn
+//device info
+z_g24_tx_device_info:
+	fetch 1,mem_ms_rf_data_flag
+	branch z_g24_only_send_device_info,blank
+	branch z_g24_send_device_info
+
+z_g24_only_send_device_info:
+	fetch 1,mem_24g_data_type
+	set1 NOR_PRO_BIT,pdata
+	store 1,mem_24g_txbuf_new
+	jam START_FLAG,mem_24g_txbuf_new+1
+	jam DEVICE_INFO_LEN,mem_24g_txbuf_new+2
+	jam OPCODE_GET_DEVICE_INFO,mem_24g_txbuf_new+3
+	jam DEVICE_INFO_LEN+NOR_PRO_HEADER_LEN,mem_24g_datalen
+	arg AUTH_LEN,loopcnt
+	arg mem_ms_auth_appkey,contr
+	arg mem_24g_txbuf_new+4,contw
+	call memcpy
+	branch p_g24_ms_info_set
+
+z_g24_send_device_info:
+	fetch 1,mem_24g_data_type
+	set1 NOR_PRO_BIT,pdata
+	store 1,mem_ms_24g_temp_buff
+	jam START_FLAG,mem_ms_24g_temp_buff+1
+	jam DEVICE_INFO_LEN,mem_ms_24g_temp_buff+2
+	jam OPCODE_GET_DEVICE_INFO,mem_ms_24g_temp_buff+3
+	arg AUTH_LEN,loopcnt
+	arg mem_ms_auth_appkey,contr
+	arg mem_ms_24g_temp_buff+4,contw
+	call memcpy
+	call p_g24_ms_info_set
+	arg DEVICE_INFO_LEN+4,temp
+	arg mem_ms_24g_temp_buff,rega
+	branch p_g24_send_rf_other_data
+
+
+//get dpi info
+z_g24_get_dpi:
+	fetch 1,mem_ms_rf_data_flag
+	branch z_g24_only_send_dpi_info,blank
+	branch z_g24_send_dpi_info
+
+z_g24_only_send_dpi_info:
+	fetch 1,mem_24g_data_type
+	set1 NOR_PRO_BIT,pdata
+	store 1,mem_24g_txbuf_new
+	jam START_FLAG,mem_24g_txbuf_new+1
+	jam NOR_PRO_HEADER_LEN,mem_24g_txbuf_new+2
+	jam OPCODE_GET_DPI,mem_24g_txbuf_new+3
+	fetch 1,mem_mouse_dpi
+	store 1,mem_24g_txbuf_new+4
+	fetch 1,mem_mouse_dpi_type
+	istore 1,contw
+	jam NOR_PRO_GET_DPI_LEN,mem_24g_datalen
+	rtn
+z_g24_send_dpi_info:
+	fetch 1,mem_24g_data_type
+	set1 NOR_PRO_BIT,pdata
+	store 1,mem_ms_24g_temp_buff
+	jam START_FLAG,mem_ms_24g_temp_buff+1
+	jam NOR_PRO_HEADER_LEN,mem_ms_24g_temp_buff+2
+	jam OPCODE_GET_DPI,mem_ms_24g_temp_buff+3
+	fetch 1,mem_mouse_dpi
+	store 1,mem_ms_24g_temp_buff+4
+	fetch 1,mem_mouse_dpi_type
+	istore 1,contw
+	arg NOR_PRO_GET_DPI_LEN,temp
+	arg mem_ms_24g_temp_buff,rega
+	branch p_g24_send_rf_other_data
+
+
+org 0x60001
+z_entrance5:
+	beq ZCODE_50,z_g24_set_dpi
+	beq ZCODE_51,z_g24_get_battery
+	rtn
+//set dpi info
+z_g24_set_dpi:
+	fetch 1,mem_ms_rf_data_flag
+	branch z_g24_only_set_dpi_info,blank
+	branch z_g24_set_dpi_info
+
+z_g24_only_set_dpi_info:
+	fetch 1,mem_24g_data_type
+	set1 NOR_PRO_BIT,pdata
+	store 1,mem_24g_txbuf_new
+	jam START_FLAG,mem_24g_txbuf_new+1
+	jam SET_DPI_LEN,mem_24g_txbuf_new+2
+	jam OPCODE_SET_DPI,mem_24g_txbuf_new+3
+	fetch 1,mem_mouse_dpi_set_result
+	store 1,mem_24g_txbuf_new+4
+	jam NOR_PRO_RES_LEN,mem_24g_datalen
+	rtn
+z_g24_set_dpi_info:
+	fetch 1,mem_24g_data_type
+	set1 NOR_PRO_BIT,pdata
+	store 1,mem_ms_24g_temp_buff
+	jam START_FLAG,mem_ms_24g_temp_buff+1
+	jam SET_DPI_LEN,mem_ms_24g_temp_buff+2
+	jam OPCODE_SET_DPI,mem_ms_24g_temp_buff+3
+	fetch 1,mem_mouse_dpi_set_result
+	store 1,mem_ms_24g_temp_buff+4
+	arg NOR_PRO_RES_LEN,temp
+	arg mem_ms_24g_temp_buff,rega
+	branch p_g24_send_rf_other_data
+
+
+//send battery info
+z_g24_get_battery:
+	fetch 1,mem_ms_rf_data_flag
+	branch z_g24_only_send_battery_info,blank
+	branch z_g24_send_battery_info
+
+z_g24_only_send_battery_info:
+	fetch 1,mem_24g_data_type
+	set1 NOR_PRO_BIT,pdata
+	store 1,mem_24g_txbuf_new
+	jam START_FLAG,mem_24g_txbuf_new+1
+	jam NOR_PRO_HEADER_LEN,mem_24g_txbuf_new+2
+	jam OPCODE_GET_BATTERY,mem_24g_txbuf_new+3
+	fetch 1,mem_le_battery_level_percentage
+	store 1,mem_24g_txbuf_new+4
+	fetch 1,mem_mouse_battery_type
+	istore 1,contw
+	jam NOR_PRO_GET_DPI_LEN,mem_24g_datalen
+	rtn
+
+z_g24_send_battery_info:
+	fetch 1,mem_24g_data_type
+	set1 NOR_PRO_BIT,pdata
+	store 1,mem_ms_24g_temp_buff
+	jam START_FLAG,mem_ms_24g_temp_buff+1
+	jam NOR_PRO_HEADER_LEN,mem_ms_24g_temp_buff+2
+	jam OPCODE_GET_BATTERY,mem_ms_24g_temp_buff+3
+	fetch 1,mem_le_battery_level_percentage
+	store 1,mem_ms_24g_temp_buff+4
+	fetch 1,mem_mouse_battery_type
+	istore 1,contw
+	arg NOR_PRO_GET_DPI_LEN,temp
+	arg mem_ms_24g_temp_buff,rega
+	branch p_g24_send_rf_other_data
+
+
+org 0x70001
+z_entrance6:
+	beq ZCODE_60,z_g24_get_device_type
+	beq ZCODE_61,z_g24_set_key_fuction
+	rtn
+//send device type info
+z_g24_get_device_type:
+	fetch 1,mem_ms_rf_data_flag
+	branch z_g24_only_send_device_type_info,blank
+	branch z_g24_send_device_type_info
+
+z_g24_only_send_device_type_info:
+	fetch 1,mem_24g_data_type
+	set1 NOR_PRO_BIT,pdata
+	store 1,mem_24g_txbuf_new
+	jam START_FLAG,mem_24g_txbuf_new+1
+	fetch 1,mem_mouse_device_type
+	increase 2,pdata
+	store 1,mem_24g_txbuf_new+2
+	jam OPCODE_GET_DEVICE_TYPE,mem_24g_txbuf_new+3
+	fetchr loopcnt,1,mem_mouse_device_type
+	arg mem_mouse_device_type+1,contr
+	arg mem_24g_txbuf_new+4,contw
+	call memcpy
+	fetch 1,mem_mouse_device_type
+	increase 4,pdata
+	store 1,mem_24g_datalen
+	rtn
+z_g24_send_device_type_info:
+	fetch 1,mem_24g_data_type
+	set1 NOR_PRO_BIT,pdata
+	store 1,mem_ms_24g_temp_buff
+	jam START_FLAG,mem_ms_24g_temp_buff+1
+	
+	fetch 1,mem_mouse_device_type
+	increase 2,pdata
+	store 1,mem_ms_24g_temp_buff+2
+	jam OPCODE_GET_DEVICE_TYPE,mem_ms_24g_temp_buff+3
+	fetchr loopcnt,1,mem_mouse_device_type
+	arg mem_mouse_device_type+1,contr
+	arg mem_ms_24g_temp_buff+4,contw
+	call memcpy
+	fetcht 1,mem_mouse_device_type
+	increase 4,temp
+	arg mem_ms_24g_temp_buff,rega
+	branch p_g24_send_rf_other_data
+
+
+//set key fuction info
+z_g24_set_key_fuction:	
+	fetch 1,mem_ms_rf_data_flag
+	branch z_g24_only_set_key_fuction_info,blank
+	branch z_g24_set_key_fuction_info
+z_g24_only_set_key_fuction_info:
+	fetch 1,mem_24g_data_type
+	set1 NOR_PRO_BIT,pdata
+	store 1,mem_24g_txbuf_new
+	jam START_FLAG,mem_24g_txbuf_new+1
+	jam SET_DPI_LEN,mem_24g_txbuf_new+2
+	jam OPCODE_SET_KEY_FUCTION,mem_24g_txbuf_new+3
+	jam 0,mem_24g_txbuf_new+4
+	jam NOR_PRO_RES_LEN,mem_24g_datalen
+	rtn
+z_g24_set_key_fuction_info:
+	fetch 1,mem_24g_data_type
+	set1 NOR_PRO_BIT,pdata
+	store 1,mem_ms_24g_temp_buff
+	jam START_FLAG,mem_ms_24g_temp_buff+1
+	jam SET_DPI_LEN,mem_ms_24g_temp_buff+2
+	jam OPCODE_SET_KEY_FUCTION,mem_ms_24g_temp_buff+3
+	jam 0,mem_ms_24g_temp_buff+4
+	arg NOR_PRO_RES_LEN,temp
+	arg mem_ms_24g_temp_buff,rega
+	branch p_g24_send_rf_other_data
