Index: rongyuan/do.bat
===================================================================
--- /YC3121_demo/ModuleDemo/BlueTooth/BT_code_patch/keyboard/branches/rongyuan/do.bat	(nonexistent)
+++ /YC3121_demo/ModuleDemo/BlueTooth/BT_code_patch/keyboard/branches/rongyuan/do.bat	(working copy)
@@ -0,0 +1,250 @@
+cls
+@echo off
+
+::get Rom path
+set now_path=%~dp0
+call:getstrlocation %now_path% ModuleDemo location
+call:get_fix_len_str  %now_path% location soft_path
+set lib_path=%soft_path%Librarier
+set rom_path=%lib_path%\bt_rom
+set program=%rom_path%\program
+set format=%rom_path%\format
+set util=%rom_path%\util
+set patch_path=%now_path%patch
+set sched=%now_path%sched
+set format_ex=%now_path%format
+
+rem @echo rom_path=%rom_path%
+rem @echo program_path=%program%
+rem @echo format_path=%format%
+rem @echo util_path=%util%
+rem @echo patch_path=%patch_path%
+
+setlocal enabledelayedexpansion
+
+for /f %%f in ('dir /b /o program_patch\*.prog') do @if not %%f==main_patch.prog set progs_patch=!progs_patch! program_patch\%%f
+for /f %%f in ('dir /b /o program_patch\keyboard_24g_spec_code\*.prog') do @set progs_patch=!progs_patch! program_patch\keyboard_24g_spec_code\%%f
+for /f %%f in ('dir /b /o program_patch\keyboard_ble_spec_code\*.prog') do @set progs_patch=!progs_patch! program_patch\keyboard_ble_spec_code\%%f
+for /f %%f in ('dir /b /o program_patch\keyboard_bt_spec_code\*.prog') do @set progs_patch=!progs_patch! program_patch\keyboard_bt_spec_code\%%f
+type program_patch\main_patch.prog %progs_patch% > patch\patch.prog
+
+set progs=""
+for /f %%f in ('dir /b /o %program%\*.prog') do @if not %%f==bt.prog if not %%f==patch.prog if not %%f==sim.prog set progs=!progs! + %program%\%%f
+copy %program%\bt.prog + %progs%  output\bt_program23.meta > output\1
+
+set fmts=""
+for /f %%f in ('dir /b /o %format%\*.format') do @if not %%f==bt.format if not %%f==command.format set fmts=!fmts! + %format%\%%f
+copy %format%\bt.format + %fmts%  + %format_ex%\app_module.format + %format_ex%\ui.format + %format_ex%\le.format + %format_ex%\utility.format + %format%\command.format output\bt_format.meta > output\2
+
+perl %util%/mergepatch.pl 				output/bt_program23.meta %patch_path%
+perl %util%/memalloc.pl 				output/bt_format.meta
+
+cd output
+osiuasm bt_program23 -O-W
+copy ..\sched\24g_keyboard.dat + ..\sched\ble_keyboard.dat + ..\sched\bt_keyboard.dat + ..\sched\DM_module.dat  + ..\sched\109x.dat ..\output\sched.rom
+Creat_patch_Module
+if "%1" equ "eep" (
+	goto genromrevc
+)else (
+  goto downloadram
+)
+
+:genromrevc
+echo off
+@echo Start to generate EEPROM code
+geneep -n
+
+
+:gen_eep_end
+cd ..
+echo **********************************
+echo EEPROM Generated.
+echo Use command "e fp" to download EEPROM.
+echo **********************************
+goto end
+
+
+
+:genrom
+@rem echo on
+perl ..\util\rom2mif.pl romcode
+del ..\..\%FPGA_PATH%\romcode.mif
+copy .\romcode.mif ..\..\%FPGA_PATH%\romcode.mif
+perl ..\util\gen_patch_h.pl >%YC_PATCH_FILE%
+copy .\%YC_PATCH_FILE% ..\..\%MV_PATCH%\%YC_PATCH_FILE%
+copy .\%YC_PATCH_FILE% D:\work\yichip\mv_proj\src\inc\%YC_PATCH_FILE%
+cd ..\..\%FPGA_PATH%
+quartus_cdb btspi -c btspi --update_mif
+quartus_asm --read_settings_files=off --write_settings_files=off btspi -c btspi
+quartus_pgm -c USB-Blaster[USB-0] -m jtag -o "p;.\output\btspi.sof" 
+@echo bitstream_compression=on >1
+@echo memory_map_file=on >> 1
+quartus_cpf -c -o 1 -s EP3C55 -d EPCS16 output\btspi.sof output\btspi.jic  
+@rem quartus_pgm -c USB-Blaster[USB-0] -m jtag -o "pi;.\output\btspi.jic"   
+@del 1
+goto end
+
+
+
+:downloadram
+echo on
+@echo Start to download ram code
+e ku
+e hu
+e su sched.rom
+@echo **********************************
+@echo RAM CODE has been downloaded. 
+@echo **********************************
+cd ..
+
+
+:end
+echo create bt_code.c file
+perl %util%/rom2h.pl  <.\output\eeprom.dat>  .\output\bt_code.c
+copy .\output\bt_code.c D:\desktop\YC3121AB_24G_RX\YC3121AB_SDK\Librarier\core\bt_code.c
+copy .\output\bt_code.c D:\desktop\YC3121AB_24G_TX\YC3121AB_SDK\Librarier\core\bt_code.c
+goto:eof
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+::------------------------------------------
+::---------------func:getstrlocation-------
+::------------------------------------------
+:getstrlocation
+setlocal
+set "bstr=%1"
+set "cstr=%2"
+set %3=0
+set "num=0"
+set "len_bstr=0"
+set "len_cstr=0"
+
+call:getstrlen %bstr% len_bstr
+call:getstrlen %cstr% len_cstr
+
+:getstrlocation_next
+set /a len_remain=len_bstr-num
+if %len_remain% lss %len_cstr% (
+echo "cann't get str location"
+set /a num =0
+goto getstrlocation_last
+)
+
+call:get_fix_len_str %bstr%  len_cstr compar_str
+
+if not %compar_str%==%cstr% (
+set /a num+=1
+set "bstr=%bstr:~1%"
+goto getstrlocation_next
+)
+
+:getstrlocation_last
+(endlocal
+	set %3=%num%
+)
+goto:eof
+::---------------end:func-------------------
+
+
+::------------------------------------------
+::---------------func:get_fix_len_str-------
+::------------------------------------------
+:get_fix_len_str
+setlocal
+set "getstr=%NULL%"
+set str=%1
+set /a len=%2
+set num=0
+:get_fix_len_str_loop
+set getstr=%getstr%%str:~0,1%
+set /a num+=1
+set str=%str:~1%
+if %num% lss %len% goto get_fix_len_str_loop
+(endlocal
+ set %3=%getstr%
+)
+goto:eof
+::---------------end:func-------------------
+
+
+
+
+::------------------------------------------
+::---------------func:getstrlen-------------
+::------------------------------------------
+:getstrlen
+setlocal
+set str=%1
+set %2=0
+set /a "num=0"
+
+:getstrlen_next
+if "%str%"=="" goto getstrlen_last
+
+if not "%str%"=="" (
+set /a num+=1 
+set "str=%str:~1%"
+goto getstrlen_next
+)
+
+:getstrlen_last
+(endlocal
+	set /a "%2=%num%"
+)
+goto:eof
+::---------------end:func-------------------
+
+
+
+
+::------------------------------------------
+::---------------func:getcharlocation-------
+::------------------------------------------
+:getcharlocation
+setlocal
+set "str=%1"
+set "ch=%2"
+set %3=0
+set /a "num=0"
+
+:getcharnext
+if "%str%"=="" ( 
+set /a num=0
+goto getcharlast
+)
+
+if not "%str%"=="" (
+set /a num+=1
+if "%str:~0,1%"=="%ch%" goto getcharlast
+set "str=%str:~1%"
+goto getcharnext
+)
+:getcharlast
+(endlocal
+set %3=%num%
+)
+goto:eof 
+::---------------end:func-------------------
+
+
+
+
+
+
Index: rongyuan/format/app_module.format
===================================================================
--- /YC3121_demo/ModuleDemo/BlueTooth/BT_code_patch/keyboard/branches/rongyuan/format/app_module.format	(nonexistent)
+++ /YC3121_demo/ModuleDemo/BlueTooth/BT_code_patch/keyboard/branches/rongyuan/format/app_module.format	(working copy)
@@ -0,0 +1,265 @@
+bmemalloc(
+34 mem_24g_rxbuf
+32 mem_24g_txbuf
+34 mem_24g_txpayload
+32 mem_24g_rxpayload
+
+256 mem_rssi_noise_buffer
+256 mem_rssi_noise_dg_buffer
+256 mem_rssi_noise_ms_buffer
+256 mem_rssi_noise_kb_buffer
+32 mem_24g_common_temp
+
+
+)
+omemalloc(	
+	2 mem_soft_version_num
+
+	2 mem_current_packet_length
+	1 mem_module_state
+	
+	1 mem_module_spp_lpm_mult
+	1 mem_module_le_lpm_mult	
+	1 mem_module_bluetooth_stauts_by_command
+
+	//ble
+	1 mem_module_le_rx_data_len
+	2 mem_module_le_rx_data_address
+	2 mem_module_le_rx_data_handle
+	//ble write handle
+	2 mem_module_data_write_handle
+	2 mem_module_data_write_handle2
+	//flag
+	1 mem_module_flag
+
+	1 mem_module_hci_notify_len
+	2 mem_module_hci_notify_handle
+	2 mem_module_hci_nofiy_addr
+
+	4 mem_last_transmite_clock
+	
+	604 mem_module_uuid_list
+	0 mem_module_uuid_list_end
+	536 mem_module_le_att_list
+	0 mem_module_le_att_list_end
+	0 mem_module_nv_data
+	34 mem_module_nv_data0
+	34 mem_module_nv_data1
+	34 mem_module_nv_data2
+	34 mem_module_nv_data3
+	34 mem_module_nv_data4
+	
+	15 mem_rf_init
+
+	//classic shutter config
+	1 mem_classic_shutter_cable_unplug_conut
+	1 mem_classic_shutter_hid_disconn_count
+
+	// Be aware of memory boundaries  limit 0x4bff
+	1 mem_suspend_flag
+
+//24g profile
+8 mem_24g_enter_hibernate
+1 mem_24g_txfail_cnt
+1 mem_mouse_retry_flag
+1 mem_24g_led_flag
+
+
+32 mem_24g_txbuf_new
+4 mem_24g_enter_hibernate_setup
+4 mem_24g_enter_hibernate_max
+
+
+// patch allocated
+1 mem_24g_rxdata_length
+1 mem_24g_pid
+1 mem_24g_datalen
+1 mem_24g_data_type
+1 mem_24g_txlen
+2 mem_24g_rx_window
+1 mem_24g_ensure
+1 mem_24g_get_ack_fail
+1 mem_24g_retry
+1 mem_24g_ch
+1 mem_24g_current_ch_number
+
+
+//�����ĵ�ַ
+4 mem_24g_addr
+2 mem_24g_check_dongle_times
+4 mem_24g_device_addr
+1 mem_24g_no_ack
+3 mem_24g_sta_crc
+1 mem_24g_sta_pid
+1 mem_24g_max_retry
+1 mem_24g_mode
+1 mem_24g_hop_pac_retry
+1 mem_24g_idle_timeout
+1 mem_24g_idle_cnt
+1 mem_24g_auto_paring_switch
+1 mem_24g_enter_lpm_timer
+2 mem_24g_syncword
+1 mem_24g_syncword_crc8
+1 mem_24g_get_syncword_crc8
+2 mem_24g_discard_cnt
+2 mem_cb_24g_data
+9 mem_24g_lasttx
+
+1 mem_power_ctrl_pac_succ_cnt
+1 mem_power_ctrl_level
+
+1 mem_rssi_avg_received
+1 mem_rssi_hex_received
+8 mem_rssi_signal_buf
+8 mem_rssi_noise_buf
+1 mem_rssi_noise_index
+1 mem_rssi_signal_index
+
+
+34 mem_24g_ackbuffer
+1 mem_24g_pll_flag
+28 mem_read_otp_data
+
+
+1 mem_24g_retransmit_cnt
+1 mem_en_24g_flag
+)
+(
+45 mark_24g_rx
+38 BT_CMD_START_UNCONN_ADV
+)
+(
+0x55aa OTP_INIT_VAL
+)
+(
+0x18508 sec_otp_addr
+0x1850a sec_otp_ctrl
+0x1850c sec_otp_data
+)
+
+//mem_24g_pairing_sm
+(
+0 STATE_24G_PAIRING_NULL
+1 STATE_24G_PAIRING_1
+2 STATE_24G_PAIRING_2
+3 STATE_24G_PAIRING_3
+0X11 STATE_24G_PAIRING_1_WAITING_ACK
+0X12 STATE_24G_PAIRING_2_WAITING_ACK
+0X13 STATE_24G_PAIRING_3_WAITING_ACK
+0XFF STATE_24G_PAIRING_SUCCESS
+)
+
+(
+0 ENSURE_OFF_24G
+1 ENSURE_ON_24G
+0x4e G24_PAIR_CH
+)
+
+(
+7 RSSI_BUF_LEN_SIGNAL
+255 RSSI_BUF_LEN_NOISE
+0x50 RSSI_THRESH_NOISE
+
+0x77 RSSI_DIS_MIN_24G
+0x82 RSSI_DIS_MAX_24G
+
+0x75 RSSI_DIS_MIN_BLE
+0x80 RSSI_DIS_MAX_BLE
+)
+
+/* 24g */
+(
+6 dlen_24g
+14 plen_24g
+90 blen_tx_24g
+106 blen_rx_24g
+42 blen_txack_24g
+58 blen_rxack_24g
+7 retry_24g
+0xaaf08e acc_24g
+0x15c4 crc_data_3byte
+0xbb81 crc_data_6byte
+0x4160 crc_ack
+41390 crc_ack_4byte
+)
+
+//mem_24g_data_type
+(
+0x07 bits_data
+//0-2 data type
+3 bit_abort
+4 bit_hop
+5 bit_sync
+//6-7 channel offset
+)
+
+
+(
+249 LE_BASEBAND_MAX_BUFFER
+)
+(
+	0x200 UART_AIR_CONTROL_THRESHOLD
+)
+(//Command
+0x15 HCI_CMD_SET_COD
+0x76 HCI_CMD_ADD_SERVICE_CHARAC_UUID
+
+
+0xA0 HCI_CMD_ADV_DATA_CHANGE
+
+0xb0 HCI_CMD_SEND_HID_DATA
+0xb1 HCI_CMD_CREAT_BT_RECONNECT
+
+0xc0 HCI_CMD_24G_RFENABLE
+0xc1 HCI_CMD_24G_TX
+0xc2 HCI_CMD_24G_RX
+0xc3 HCI_CMD_24G_RXPOWER
+0xc4 HCI_CMD_24G_CHANNEL
+0xc5 HCI_CMD_24G_ADDR
+0xc6 HCI_CMD_24G_SET_RETRAN_TIME
+0xc7 HCI_CMD_24G_NO_ACK_FLAG
+0xc8 HCI_CMD_24G_SET_ACKDATA
+0xc9 HCI_CMD_SEND_24G_DATA
+
+
+0xfe HCI_CMD_ALL_ROUND
+)
+(
+0 with_ack_24g
+1 no_ack_24g
+)
+
+
+(//event
+0x29 HCI_EVENT_UUID_HANDLE
+
+0xb0 HCI_EVENT_BT_HID_CONNECT
+0xb1 HCI_EVENT_BT_RECONNECT_FAIL
+0xb2 HCI_EVENT_RECEIVE_BT_HID_DATA
+0xb3 HCI_EVENT_BLE_HID_CONNECT
+0xb4 HCI_EVENT_BLE_ENC_INFO
+0xb5 HCI_EVENT_BT_ENC_INFO
+0xb6 HCI_EVENT_BT_HID_DISCONNECT
+
+
+
+0xc1 HCI_EVENT_RECEIVE_24G_DATA
+0xc2 HCI_EVNET_SEND_DATA_FAIL
+)
+
+(
+1  FLAG_SHUTTER_HID_DISCONN_TIMEOUT
+5 FLAG_SHUTTER_CABLE_UNPLUG_TIMEOUT
+)
+
+(
+0x0007 HANDLE_UUID_CHRCTR_DEVICE_NAME
+0x000e HANDLE_UUID_CHRCTR_MANUFACTURER_NAME
+0x0010 HANDLE_UUID_PNP_ID
+0x0021 HANDLE_UUID_CHRCTR_REPORT_ID1_OUTPUT
+0x002d HANDLE_UUID_END
+)
+(
+	7 MODULE_READ_OTP_BIT
+)
+
Index: rongyuan/format/le.format
===================================================================
--- /YC3121_demo/ModuleDemo/BlueTooth/BT_code_patch/keyboard/branches/rongyuan/format/le.format	(nonexistent)
+++ /YC3121_demo/ModuleDemo/BlueTooth/BT_code_patch/keyboard/branches/rongyuan/format/le.format	(working copy)
@@ -0,0 +1,17 @@
+	/* LE control packet type */
+	(
+	0x14 LL_LENGTH_REQ
+	0x15 LL_LENGTH_RSP
+	)
+(
+0 BIT_CHARACTERISTIC_BROADCAST
+1 BIT_CHARACTERISTIC_READ
+2 BIT_CHARACTERISTIC_WRITE_WITHOUT_RESPONSE
+3 BIT_CHARACTERISTIC_WRITE
+4 BIT_CHARACTERISTIC_NOTIFY
+5 BIT_CHARACTERISTIC_INDICATE
+6 BIT_CHARACTERISTIC_SIGNED_WRITE
+7 BIT_CHARACTERISTIC_EXTENDED_PROPERTIES
+)
+
+
Index: rongyuan/format/ui.format
===================================================================
--- /YC3121_demo/ModuleDemo/BlueTooth/BT_code_patch/keyboard/branches/rongyuan/format/ui.format	(nonexistent)
+++ /YC3121_demo/ModuleDemo/BlueTooth/BT_code_patch/keyboard/branches/rongyuan/format/ui.format	(working copy)
@@ -0,0 +1,4 @@
+//mem_ui_state_map
+(
+12 UI_STATE_BT_HID_CONNECT
+)
Index: rongyuan/format/utility.format
===================================================================
--- /YC3121_demo/ModuleDemo/BlueTooth/BT_code_patch/keyboard/branches/rongyuan/format/utility.format	(nonexistent)
+++ /YC3121_demo/ModuleDemo/BlueTooth/BT_code_patch/keyboard/branches/rongyuan/format/utility.format	(working copy)
@@ -0,0 +1,29 @@
+bmemalloc(
+
+)
+(// mem_bb_flag
+0 OLD_PACKET				//0:new packet   1: old packet  
+1 USE_BB_BUFFER_NOW		//0:BB BUFFER1  1:BB BUFFER2
+)
+(
+0 CACHE_BUFFER_FLAG
+1 CACHE_BUFFER_LCH
+2 CACHE_BUFFER_LEN
+4 CACHE_BUFFER_DATA_PTR
+
+
+)
+(
+0x0b1b mem_bb_cache_bufptr
+0x0b1d mem_bb_flag
+
+0x0b20 mem_baseband_buffer1_flag
+0x0b21 mem_baseband_buffer1_lch
+0x0b22 mem_baseband_buffer1_len
+0x0b24 mem_baseband_buffer1
+
+0x0c20 mem_baseband_buffer2_flag
+0x0c21 mem_baseband_buffer2_lch
+0x0c22 mem_baseband_buffer2_len
+0x0c24 mem_baseband_buffer2 
+)
Index: rongyuan/output/bt_code.c
===================================================================
--- /YC3121_demo/ModuleDemo/BlueTooth/BT_code_patch/keyboard/branches/rongyuan/output/bt_code.c	(nonexistent)
+++ /YC3121_demo/ModuleDemo/BlueTooth/BT_code_patch/keyboard/branches/rongyuan/output/bt_code.c	(working copy)
@@ -0,0 +1,317 @@
+const unsigned char bt_code[] = {
+0x00,0x02,0xaa,0x55,0x36,0x0e,0xc2,0x84,0x00,0x0f,0xc0,0x00,0x81,0x68,0xc0,0x01,
+0x81,0x6e,0xc0,0x42,0x81,0x70,0xc0,0x44,0x81,0x96,0xc0,0x4a,0x01,0x4e,0xc0,0x51,
+0x01,0x9f,0xc0,0x51,0x81,0x59,0xc0,0x54,0x81,0x5c,0xc0,0x56,0x01,0xa6,0xc0,0x5c,
+0x00,0x30,0xc0,0x5d,0x80,0x77,0xc0,0x5e,0x00,0xf3,0xc0,0x5f,0x03,0x6e,0x20,0x20,
+0x4a,0x8b,0xc0,0x01,0x82,0xc3,0xc0,0x02,0x82,0xba,0xc0,0x03,0x01,0x91,0xc0,0x09,
+0x82,0xe6,0xc0,0x0f,0x82,0xcf,0xc0,0x10,0x82,0xe1,0xc0,0x18,0x00,0x2a,0xc0,0x1e,
+0x01,0x0b,0xc0,0x1d,0x01,0x15,0xc0,0x1e,0x81,0x25,0xc0,0x1f,0x01,0x32,0xc0,0x20,
+0x81,0x44,0xc0,0x4c,0x81,0x4a,0xc0,0x51,0x00,0x1e,0x20,0x20,0x4a,0x8b,0x18,0x42,
+0x7e,0x00,0x20,0x7a,0x00,0x00,0xc0,0x13,0x00,0x22,0x20,0x20,0x7b,0xd4,0x70,0x43,
+0x40,0x01,0x70,0x44,0x56,0x02,0x6f,0xe4,0x46,0x52,0x79,0x20,0x7e,0x0b,0x67,0xe4,
+0x46,0x52,0x20,0x60,0x00,0x00,0x70,0x0a,0x95,0x26,0x20,0x20,0x7b,0xb4,0x20,0x40,
+0x5b,0x86,0x20,0x20,0x00,0x2c,0xda,0x60,0x43,0x81,0xda,0x20,0x43,0x62,0x20,0x40,
+0x5b,0xa5,0x20,0x60,0x00,0x00,0x58,0x00,0x00,0x3f,0x67,0xe4,0x41,0xf6,0x58,0x00,
+0x00,0x5f,0x67,0xe4,0x41,0xfe,0x58,0x00,0x00,0x63,0x67,0xe4,0x41,0xfa,0x58,0x00,
+0x00,0x74,0x67,0xe4,0x41,0xea,0x58,0x00,0x00,0x75,0x67,0xe4,0x41,0xf2,0x20,0x40,
+0x02,0xb4,0x20,0x40,0x4d,0xaf,0x20,0x40,0x4d,0xbc,0x20,0x40,0x4c,0x2a,0x20,0x20,
+0x50,0x4d,0x1a,0x62,0x7e,0x00,0xc0,0x00,0x83,0x06,0xc0,0x01,0x03,0x09,0xc0,0x02,
+0x03,0x17,0xc0,0x02,0x83,0x1f,0xc0,0x03,0x03,0x20,0xc0,0x03,0x83,0x23,0xc0,0x09,
+0x03,0x2c,0xc0,0x09,0x83,0x36,0xc0,0x13,0x83,0x37,0xc0,0x17,0x03,0x3a,0xc0,0x1e,
+0x83,0x3b,0xc0,0x0c,0x03,0x3c,0xc0,0x14,0x82,0xfb,0xc0,0x05,0x80,0x4f,0x20,0x20,
+0x4d,0xdf,0x20,0x40,0x4d,0xd7,0x6f,0xe4,0x40,0x42,0x1f,0xe3,0x7e,0x00,0x68,0x44,
+0x41,0xe4,0x98,0x46,0x7c,0x00,0x20,0x20,0x4d,0x91,0x6f,0xe2,0x46,0x79,0xc3,0x82,
+0x80,0x00,0x6f,0xe4,0x4f,0xfc,0x68,0x44,0x4f,0xfe,0x98,0x46,0x7c,0x00,0x24,0x42,
+0xd0,0xda,0x20,0x20,0x4d,0x87,0x20,0x60,0x00,0x00,0x20,0x40,0x4d,0x6b,0x20,0x20,
+0x4d,0x73,0x20,0x40,0x03,0x48,0x20,0x40,0x03,0x50,0x20,0x40,0x03,0x53,0x20,0x60,
+0x00,0x00,0x20,0x40,0x4f,0x11,0x20,0x74,0x00,0x00,0x1a,0x22,0x7e,0x00,0x67,0xe4,
+0x46,0x71,0x1a,0x42,0x7e,0x00,0x67,0xe2,0x46,0x70,0x68,0x44,0x04,0x74,0x60,0x44,
+0x46,0x73,0x20,0x40,0x5b,0x6c,0x24,0x3a,0x4a,0x8b,0x6f,0xe2,0x04,0x9e,0x20,0x20,
+0x50,0x42,0xe8,0x42,0x00,0x11,0x58,0x00,0x00,0x01,0x67,0xe2,0x0a,0x96,0xe0,0x42,
+0x00,0x05,0x20,0x20,0x03,0x7e,0x20,0x20,0x4d,0xbd,0x20,0x20,0x00,0x76,0x20,0x20,
+0x4d,0xc8,0x6f,0xe2,0x0a,0xff,0xc0,0x08,0x80,0xd8,0xc0,0x0a,0x80,0xe0,0xc0,0x13,
+0x80,0xee,0xc0,0x06,0x00,0xe5,0xc0,0x58,0x00,0xf0,0xc0,0x58,0x83,0x63,0xc0,0x50,
+0x00,0xba,0xc0,0x01,0x00,0xa0,0xc0,0x3b,0x00,0x8c,0xc0,0x64,0x81,0xb2,0xc0,0x60,
+0x01,0xa7,0xc0,0x60,0x81,0xac,0xc0,0x61,0x01,0xaf,0xc0,0x61,0x81,0xb8,0xc0,0x62,
+0x01,0xbd,0xc0,0x62,0x81,0xc0,0xc0,0x64,0x01,0xd2,0xc0,0x63,0x01,0xd8,0xc0,0x63,
+0x81,0xde,0x20,0x20,0x4e,0x5c,0x20,0x40,0x00,0x95,0x18,0xc0,0x8d,0xfe,0x18,0xc2,
+0x0a,0x00,0x6f,0xe2,0x0b,0x00,0x1f,0xe2,0x72,0x00,0x20,0x40,0x67,0xed,0x58,0x00,
+0x00,0x00,0xe7,0xe4,0x00,0x05,0x20,0x20,0x50,0x1f,0x6f,0xe4,0x44,0x8e,0x98,0x00,
+0x0c,0x00,0xef,0xe4,0x00,0x06,0x20,0x7a,0x00,0x00,0x1f,0xe0,0x84,0x01,0xef,0xe2,
+0x00,0x06,0x98,0xc0,0x8c,0x00,0xef,0xe2,0x00,0x06,0x98,0xc0,0x8c,0x00,0x18,0xc2,
+0x0a,0x00,0x20,0x20,0x00,0x97,0x6f,0xe2,0x0b,0x00,0xc0,0x80,0xd0,0x1c,0x1a,0x22,
+0x06,0x00,0x20,0x40,0x50,0x1f,0xe8,0x42,0x00,0x03,0x60,0x42,0x46,0x6f,0x6f,0xe4,
+0x46,0x52,0xc3,0x84,0x80,0x00,0xc3,0x80,0x00,0x00,0x6f,0xe2,0x46,0x6c,0x2f,0xef,
+0xfe,0x00,0x24,0x20,0x80,0xaf,0x68,0x42,0x46,0x6f,0x18,0x41,0x7e,0x03,0x67,0xe2,
+0x40,0x93,0x6f,0xe2,0x46,0x6c,0x2f,0xef,0xfe,0x01,0x24,0x60,0x80,0x00,0x68,0x42,
+0x46,0x6f,0x28,0x4f,0xfe,0x02,0x20,0x20,0x80,0xb6,0x20,0x20,0x4d,0x73,0x6f,0xe2,
+0x44,0x56,0xc0,0x00,0x4d,0x75,0xc0,0x00,0xcd,0x6f,0xc0,0x01,0x00,0x28,0xef,0xe2,
+0x00,0x03,0x2f,0xef,0xfe,0x00,0x20,0x20,0x80,0xc2,0x2f,0xef,0xfe,0x01,0x20,0x20,
+0x80,0xc6,0x2f,0xef,0xfe,0x02,0x20,0x20,0x80,0xcf,0x20,0x20,0x50,0x1c,0x70,0x44,
+0x56,0x01,0xef,0xec,0x00,0x03,0x67,0xec,0x41,0xd1,0x20,0x20,0x50,0x1f,0x70,0x44,
+0x56,0x02,0x6f,0xe2,0x0b,0x00,0x1f,0xe0,0xff,0xff,0x1f,0xe2,0x72,0x00,0x18,0x62,
+0x0c,0x00,0x67,0xe2,0x43,0x41,0xd8,0xa0,0x43,0x42,0x20,0x40,0x7c,0xcf,0x20,0x20,
+0x50,0x1f,0x70,0x44,0x56,0x00,0x6f,0xe2,0x0b,0x00,0x1f,0xe0,0xff,0xff,0x1f,0xe2,
+0x72,0x00,0x18,0x62,0x0c,0x00,0x67,0xe2,0x43,0x41,0xd8,0xa0,0x43,0x42,0x20,0x40,
+0x7c,0xcf,0x20,0x20,0x50,0x1f,0x6f,0xe4,0x46,0x52,0xc3,0x00,0x50,0x1c,0x20,0x40,
+0x50,0x1f,0x20,0x40,0x4d,0x64,0x6f,0xe4,0x46,0x52,0xc4,0x01,0x00,0x00,0x70,0x0a,
+0xff,0xb6,0x20,0x20,0x50,0x4e,0x6f,0xe2,0x0b,0x00,0xc0,0x81,0xd0,0x1f,0xef,0xe6,
+0x00,0x03,0x67,0xe6,0x40,0xaa,0x20,0x20,0x50,0x1f,0x1a,0x22,0x06,0x00,0xef,0xe2,
+0x00,0x03,0xc0,0x00,0x4f,0x1c,0xc0,0x00,0xcf,0x1f,0xc0,0x01,0x4f,0x25,0xc0,0x01,
+0x80,0xec,0x20,0x20,0x50,0x1c,0x58,0x00,0x00,0x01,0x20,0x20,0x4f,0x20,0x20,0x40,
+0x50,0x1f,0x20,0x20,0x4d,0x85,0x6f,0xe4,0x46,0x52,0xc2,0x81,0x03,0x56,0x20,0x20,
+0x50,0x1c,0x18,0x40,0xff,0xfd,0xd8,0x40,0x00,0xc8,0x20,0x40,0x7d,0xb5,0x68,0x42,
+0x46,0x7a,0x20,0x40,0x7d,0xb5,0x1f,0xe2,0x22,0x00,0x18,0x42,0x7e,0x00,0x9a,0x26,
+0x7e,0x00,0x67,0xe2,0x46,0x7a,0x68,0x44,0x46,0x7b,0x18,0x40,0x85,0xff,0x20,0x40,
+0x5b,0x4d,0x20,0x3a,0x01,0x07,0xe8,0x48,0x00,0x06,0x59,0x28,0x03,0x02,0x98,0x46,
+0x7c,0x00,0x24,0x22,0x81,0x07,0xef,0xe2,0x00,0x06,0xc2,0x82,0x4f,0x01,0x20,0x20,
+0x01,0x07,0x70,0x46,0x7a,0x00,0x70,0x0b,0x01,0x01,0x20,0x40,0x50,0xe0,0x20,0x20,
+0x50,0x1c,0x6f,0xe2,0x05,0x4e,0x67,0xe2,0x04,0xc5,0xc0,0x19,0x81,0x0f,0x20,0x20,
+0x61,0x94,0x6f,0xe2,0x04,0xcd,0x79,0x20,0x7e,0x00,0x67,0xe2,0x04,0xcd,0x70,0x0a,
+0x95,0x01,0x20,0x40,0x7b,0xab,0x20,0x20,0x61,0xbf,0x6f,0xe2,0x00,0x7d,0xc0,0x08,
+0x01,0x1c,0xc0,0x0b,0x81,0x22,0x20,0x20,0x60,0xfe,0x70,0x00,0x7d,0x2a,0x70,0x00,
+0x7c,0x03,0x20,0x60,0x00,0x00,0x68,0x42,0x05,0x4e,0x18,0x46,0x7c,0x06,0x20,0x21,
+0x01,0x20,0x20,0x20,0x62,0x06,0x70,0x00,0x7e,0x24,0x20,0x20,0x61,0x34,0x6f,0xe4,
+0x05,0x53,0x20,0x3a,0x62,0xd2,0x20,0x20,0x62,0xbc,0x6f,0xe2,0x05,0x4e,0x67,0xe2,
+0x04,0xc5,0xc0,0x05,0x81,0x29,0x20,0x20,0x61,0xa6,0x20,0x40,0x61,0xdf,0x6f,0xe2,
+0x00,0x55,0xc1,0x8c,0x80,0x00,0x70,0x0a,0xff,0xb1,0x58,0x00,0x00,0x01,0x20,0x40,
+0x50,0xa5,0x58,0x00,0x00,0x01,0xe7,0xe2,0x00,0x0a,0x20,0x20,0x67,0xb9,0x78,0x54,
+0x7c,0x00,0x20,0x40,0x66,0xa3,0x6f,0xe2,0x00,0x48,0x20,0x7a,0x00,0x00,0xc2,0x83,
+0x81,0x38,0x20,0x20,0x63,0xf2,0xc0,0x42,0x01,0x3b,0xc0,0x41,0x81,0x3e,0x20,0x20,
+0x64,0x21,0x20,0x40,0x01,0x41,0x6f,0xe2,0x00,0x48,0x20,0x20,0x64,0x7b,0x20,0x40,
+0x01,0x41,0x6f,0xe2,0x00,0x48,0x20,0x20,0x64,0xef,0x6f,0xe2,0x46,0x2c,0x20,0x3a,
+0x65,0x0d,0x20,0x20,0x65,0x06,0x6f,0xe2,0x40,0x9e,0x79,0x3f,0xfe,0x03,0x67,0xe2,
+0x40,0x9e,0x58,0x00,0x00,0x01,0x67,0xe4,0x04,0xca,0x20,0x60,0x00,0x00,0x6f,0xe2,
+0x44,0x90,0x20,0x3a,0x5e,0xd0,0x20,0x40,0x74,0x38,0x20,0x20,0x79,0x32,0x18,0x42,
+0x7e,0x00,0x20,0x40,0x7d,0x2b,0x1c,0x30,0x7e,0x00,0x79,0x20,0x7e,0x2c,0x20,0x40,
+0x7d,0x14,0x79,0x3f,0xfe,0x2c,0x20,0x40,0x4a,0x76,0x20,0x40,0x7d,0x14,0x20,0x74,
+0x00,0x00,0x20,0x40,0x01,0x65,0x20,0x20,0x4a,0x2f,0x1b,0x42,0x7e,0x00,0x20,0x40,
+0x01,0x64,0x20,0x20,0x4a,0xe9,0x6f,0xe4,0x40,0x4e,0x1f,0xe3,0x7e,0x00,0x20,0x40,
+0x7d,0x2b,0x1e,0x02,0x7e,0x00,0x20,0x40,0x7d,0x14,0x1b,0x42,0x04,0x00,0x20,0x40,
+0x01,0x64,0x20,0x20,0x4b,0x67,0x20,0x40,0x7d,0x14,0x98,0x00,0x0c,0x00,0x79,0x3f,
+0x8c,0x10,0x20,0x20,0x7d,0x1f,0x20,0x40,0x68,0xc4,0x20,0x40,0x60,0xd7,0x20,0x40,
+0x01,0x6c,0x20,0x20,0x40,0x0a,0x20,0x75,0x80,0x00,0x20,0x20,0x7b,0x9a,0x20,0x40,
+0x02,0xb2,0x20,0x20,0x40,0x10,0x20,0x30,0x81,0x80,0x70,0x89,0x55,0xd4,0x20,0x00,
+0x00,0x04,0x70,0x89,0x55,0xd2,0x20,0x00,0x00,0x04,0x70,0x89,0x55,0xd1,0x20,0x00,
+0x00,0x04,0x6f,0xe2,0x41,0xdf,0xc0,0x00,0x01,0x7e,0xc0,0x00,0x81,0x8e,0xc0,0x01,
+0x01,0x7e,0xc0,0x01,0x81,0x8e,0xc0,0x02,0x01,0x8e,0xc0,0x10,0x01,0x8e,0x70,0x89,
+0x55,0xd0,0x70,0x89,0x56,0xe0,0x18,0x00,0x2a,0x08,0x18,0x00,0x2a,0x00,0x78,0x50,
+0xfc,0x00,0x78,0x50,0x7c,0x00,0x78,0x2f,0x7c,0x00,0x70,0x89,0x02,0x00,0x70,0x89,
+0x01,0x00,0x70,0x89,0x00,0x00,0x70,0x89,0x03,0x00,0x70,0x89,0x04,0x70,0x6f,0xe2,
+0x89,0x06,0x79,0x20,0x7e,0x00,0x67,0xe2,0x89,0x06,0x20,0x60,0x00,0x00,0x70,0x89,
+0x55,0xd0,0x70,0x89,0x56,0xc0,0x20,0x20,0x01,0x80,0x20,0x40,0x57,0xaf,0x20,0x40,
+0x01,0x94,0x20,0x20,0x58,0xa7,0x20,0x36,0x81,0x9b,0x20,0x20,0x57,0xbe,0x60,0x42,
+0x00,0x17,0x20,0x40,0x49,0x2a,0x20,0x40,0x49,0x80,0x58,0x00,0x05,0x00,0x20,0x40,
+0x4a,0x8e,0x6f,0xe2,0x89,0x06,0x79,0x20,0x7e,0x00,0x67,0xe2,0x89,0x06,0x20,0x20,
+0x49,0x37,0x70,0x89,0x06,0x7c,0x20,0x75,0x80,0x00,0x58,0x00,0x00,0x00,0x67,0xe4,
+0x41,0xdd,0x1c,0x43,0x7e,0x00,0x67,0xe8,0x40,0x94,0x20,0x60,0x00,0x00,0x20,0x20,
+0x4b,0x7f,0x20,0x40,0x50,0x1f,0xef,0xe2,0x00,0x03,0x20,0x3a,0x01,0xab,0x20,0x20,
+0x49,0x30,0x20,0x20,0x48,0xf5,0x79,0x3f,0x80,0x2d,0x20,0x40,0x50,0x1f,0x20,0x20,
+0x02,0x1b,0x79,0x20,0x00,0x2d,0x20,0x40,0x02,0x4a,0x20,0x20,0x50,0x1f,0x6f,0xe2,
+0x0b,0x00,0x1f,0xe2,0x72,0x00,0x67,0xe2,0x0b,0x60,0xd8,0xa0,0x0b,0x61,0x20,0x40,
+0x67,0xed,0x20,0x20,0x50,0x1f,0xef,0xe2,0x00,0x03,0x67,0xe2,0x41,0xdf,0x20,0x40,
+0x48,0xf5,0x20,0x40,0x49,0x30,0x20,0x20,0x50,0x1f,0xef,0xe2,0x00,0x03,0x67,0xe2,
+0x4b,0xf0,0x20,0x20,0x50,0x1f,0xef,0xe8,0x00,0x03,0x67,0xe8,0x4b,0xf2,0x20,0x40,
+0x01,0xc4,0x20,0x20,0x50,0x1f,0x67,0xe8,0x4b,0xf2,0xda,0x20,0x00,0x00,0xdf,0x20,
+0x00,0x04,0xd8,0xc0,0x4b,0xf2,0xef,0xe2,0x00,0x06,0x9a,0x20,0xa2,0x00,0xc2,0x00,
+0x01,0xc8,0x1a,0x22,0x7e,0x00,0x67,0xe4,0x4c,0x08,0x6f,0xe2,0x4c,0x08,0x68,0x42,
+0x4c,0x09,0x98,0x40,0xfe,0x00,0x67,0xe2,0x4c,0x0a,0x20,0x60,0x00,0x00,0x6f,0xe2,
+0x0b,0x00,0x1f,0xe2,0x72,0x00,0x67,0xe2,0x4c,0x2f,0xd8,0xa0,0x4c,0x30,0x20,0x40,
+0x67,0xed,0x20,0x20,0x50,0x1f,0xef,0xe2,0x00,0x03,0x67,0xe2,0x4c,0x6e,0xef,0xe2,
+0x00,0x03,0x1f,0xef,0xfe,0x78,0x67,0xe4,0x4b,0xeb,0x20,0x20,0x50,0x1f,0xef,0xe2,
+0x00,0x03,0x67,0xe2,0x4b,0xfc,0x20,0x20,0x50,0x1f,0x78,0x44,0xfc,0x00,0x78,0x43,
+0xfc,0x00,0x58,0x55,0x55,0x55,0x98,0x00,0x1e,0x00,0x6f,0xe2,0x4b,0xf0,0x1f,0xed,
+0x84,0x00,0x79,0x20,0x04,0x01,0x18,0x43,0x1c,0x00,0x20,0x60,0x00,0x00,0x78,0x4d,
+0xfc,0x00,0x78,0x45,0xfc,0x00,0x78,0x4e,0xfc,0x00,0x78,0x4e,0x7c,0x00,0x78,0x46,
+0xfc,0x00,0x78,0x46,0x7c,0x00,0x78,0x44,0xfc,0x00,0x78,0x47,0x7c,0x00,0x78,0x43,
+0xfc,0x00,0x37,0xd3,0x82,0x00,0x20,0x00,0x00,0x64,0x20,0x60,0x00,0x00,0x20,0x40,
+0x49,0x15,0x68,0x42,0x4b,0xf0,0x20,0x20,0x49,0x30,0x20,0x40,0x57,0x9e,0x6f,0xe8,
+0x4b,0xf2,0x98,0x00,0x12,0x00,0x20,0x40,0x01,0xe1,0x20,0x40,0x01,0xf6,0x79,0x20,
+0x2a,0x00,0x78,0x2e,0xfc,0x00,0x78,0x30,0x7c,0x00,0x78,0x50,0xfc,0x00,0x19,0x31,
+0x7e,0x00,0x1f,0xec,0xfe,0x00,0x1f,0xf1,0xfe,0x00,0x08,0x00,0x86,0x28,0x78,0x4e,
+0xfc,0x00,0x78,0x2d,0xfc,0x00,0x78,0x23,0xfc,0x00,0x78,0x24,0xfc,0x00,0x6f,0xe2,
+0x4c,0x0a,0x08,0x00,0x86,0x08,0x6f,0xe2,0x0b,0x40,0x1f,0xe0,0xfe,0x01,0x98,0x00,
+0x72,0x00,0xd8,0xc0,0x0b,0x40,0xef,0xe2,0x00,0x06,0x08,0x00,0x86,0x08,0xc2,0x00,
+0x02,0x10,0x78,0x24,0x7c,0x00,0x08,0x00,0x86,0x18,0x78,0x44,0x7c,0x00,0x37,0xd3,
+0x82,0x00,0x20,0x00,0x00,0x64,0x78,0x4e,0xfc,0x00,0x78,0x4d,0xfc,0x00,0x20,0x60,
+0x00,0x00,0x70,0x4b,0xef,0x00,0x20,0x40,0x02,0x30,0x24,0x37,0x82,0x23,0x20,0x40,
+0x02,0x92,0x20,0x40,0x02,0x8b,0x58,0x00,0x00,0x00,0x67,0xe4,0x4b,0xbb,0x20,0x60,
+0x00,0x00,0x6f,0xe4,0x4b,0xbb,0x1f,0xe6,0x7c,0x05,0x24,0x21,0x02,0x8e,0x6f,0xe2,
+0x4b,0xef,0x1f,0xe0,0xfe,0x01,0x67,0xe2,0x4b,0xef,0x20,0x20,0x02,0x1c,0x6f,0xe2,
+0x0b,0x60,0x1f,0xe0,0xfe,0x01,0x1f,0xe2,0x72,0x00,0xd8,0xc0,0x0b,0x60,0xd8,0xa0,
+0x0b,0x40,0x20,0x20,0x7c,0xdc,0x78,0x57,0xfc,0x00,0x20,0x40,0x02,0x2a,0x20,0x40,
+0x01,0xf9,0x6f,0xe2,0x4b,0xfc,0xc0,0x00,0x82,0x3e,0x18,0x00,0x2a,0x00,0x6f,0xe8,
+0x4b,0xf2,0x98,0x00,0x12,0x00,0x68,0x42,0x00,0x17,0x20,0x40,0x49,0x1c,0x20,0x40,
+0x49,0x21,0x20,0x40,0x02,0x4a,0x20,0x57,0x81,0xea,0x20,0x60,0x00,0x00,0x70,0x0b,
+0x1f,0x00,0x78,0x37,0xfc,0x00,0x20,0x20,0x01,0xea,0x20,0x40,0x57,0x9e,0x6f,0xe8,
+0x4b,0xf2,0x98,0x00,0x12,0x00,0x20,0x40,0x49,0x15,0x68,0x42,0x4b,0xf0,0x20,0x40,
+0x49,0x1c,0x58,0x00,0x05,0x00,0x20,0x40,0x4a,0x8e,0x20,0x40,0x49,0x21,0x20,0x40,
+0x01,0xe1,0x78,0x26,0xfc,0x00,0x78,0x30,0xfc,0x00,0x78,0x50,0x7c,0x00,0x78,0x28,
+0x7c,0x00,0x6f,0xe4,0x4b,0xeb,0x98,0x00,0x36,0x00,0x37,0xc1,0x84,0x00,0x24,0x2c,
+0x01,0xea,0x78,0x46,0xfc,0x00,0x78,0x25,0xfc,0x00,0x78,0x23,0xfc,0x00,0x78,0x24,
+0xfc,0x00,0x09,0x80,0x00,0x08,0x19,0x89,0x7e,0x00,0x67,0xe2,0x4c,0x0b,0x68,0x42,
+0x4c,0x0a,0x98,0x46,0x7c,0x00,0x24,0x22,0x81,0xea,0x09,0x80,0x00,0x08,0x19,0x89,
+0x7e,0x00,0x67,0xe2,0x0b,0x1e,0x1f,0xe1,0x72,0x1f,0x20,0x22,0x82,0x66,0x09,0x80,
+0x00,0x08,0x19,0x89,0x7e,0x00,0xe7,0xe2,0x00,0x05,0xc2,0x00,0x02,0x62,0x09,0x80,
+0x00,0x18,0x1f,0xef,0x7e,0x00,0x1f,0xf1,0x7e,0x00,0xe7,0xe6,0x00,0x05,0x78,0x45,
+0xfc,0x00,0x20,0x23,0x01,0xea,0x78,0x37,0xfc,0x00,0x6f,0xe2,0x00,0x17,0x1f,0xe0,
+0xa2,0x00,0x20,0x40,0x49,0x80,0x78,0x46,0xfc,0x00,0x20,0x40,0x49,0x15,0x6f,0xe2,
+0x4c,0x1c,0x1f,0xe2,0x22,0x00,0x20,0x40,0x02,0x9b,0x20,0x60,0x00,0x00,0x20,0x40,
+0x02,0x7b,0x24,0x37,0x82,0x8b,0x20,0x40,0x02,0x92,0x78,0x57,0xfc,0x00,0x20,0x60,
+0x00,0x00,0x20,0x40,0x02,0x8b,0x78,0x57,0xfc,0x00,0x20,0x40,0x02,0x41,0x24,0x77,
+0x80,0x00,0x6f,0xe2,0x4b,0xfc,0xc0,0x00,0x81,0xea,0x20,0x40,0x02,0x85,0x20,0x40,
+0x01,0xf9,0x20,0x40,0x02,0x8b,0x20,0x20,0x01,0xea,0x6f,0xe2,0x4c,0x2f,0x1f,0xe0,
+0xfe,0x01,0x1f,0xe2,0x72,0x00,0xd8,0xc0,0x4c,0x2f,0xd8,0xa0,0x0b,0x40,0x20,0x20,
+0x7c,0xdc,0xd8,0xa0,0x0b,0x1e,0xdf,0x20,0x00,0x42,0x20,0x20,0x7c,0xaf,0x70,0x0a,
+0xff,0xc2,0x58,0x00,0x00,0x00,0x20,0x40,0x50,0xa5,0x20,0x20,0x67,0xb9,0x70,0x0a,
+0xff,0xc1,0x6f,0xe2,0x0b,0x1e,0x1f,0xe1,0x72,0x1f,0x20,0x7a,0x00,0x00,0x1f,0xe2,
+0x72,0x00,0x20,0x40,0x50,0xa5,0xd8,0xc0,0x0b,0x1f,0x20,0x40,0x67,0xd4,0x20,0x20,
+0x67,0xb9,0x68,0x42,0x4c,0x2e,0x58,0x00,0x4c,0x1d,0x98,0x40,0x8a,0x00,0x1a,0x22,
+0x7e,0x00,0xe7,0xe2,0x00,0x05,0x18,0x40,0x84,0x01,0x18,0x41,0x04,0x07,0x60,0x42,
+0x4c,0x2e,0x20,0x60,0x00,0x00,0x20,0x40,0x49,0xba,0x20,0x7a,0x00,0x00,0x68,0x42,
+0x4c,0x2d,0xda,0x20,0x0b,0xa2,0x20,0x40,0x02,0xab,0x60,0x42,0x4c,0x2d,0x20,0x60,
+0x00,0x00,0x1a,0x22,0x7e,0x00,0x98,0x40,0x8a,0x00,0x6f,0xe2,0x00,0x18,0xe7,0xe2,
+0x00,0x05,0x18,0x40,0x84,0x01,0x18,0x41,0x04,0xff,0x20,0x60,0x00,0x00,0xc6,0x96,
+0x80,0x00,0x20,0x20,0x02,0x76,0x58,0x00,0x00,0x25,0x67,0xe4,0x44,0xcc,0x20,0x40,
+0x5b,0xf0,0x20,0x40,0x5c,0x0c,0x20,0x40,0x5c,0x19,0x20,0x20,0x5b,0xf8,0x20,0x40,
+0x58,0xa3,0x20,0x40,0x49,0x15,0x68,0x42,0x00,0x17,0x20,0x40,0x49,0x1c,0x20,0x00,
+0x05,0xdc,0x20,0x40,0x49,0x21,0x78,0x28,0x7c,0x00,0xd9,0x60,0x15,0x7c,0x20,0x20,
+0x58,0x69,0x20,0x40,0x49,0xba,0x78,0x23,0xfc,0x00,0x78,0x24,0xfc,0x00,0x09,0x80,
+0x00,0x08,0x19,0x89,0x7e,0x00,0x67,0xe2,0x02,0xd5,0x09,0x80,0x00,0x08,0x19,0x89,
+0x7e,0x00,0xe7,0xe2,0x00,0x05,0x1f,0xe2,0x72,0x00,0x20,0x3a,0x58,0x8b,0x20,0x20,
+0x58,0x87,0xc6,0x07,0x80,0x00,0x20,0x40,0x5c,0x70,0x24,0x7a,0x00,0x00,0x6f,0xe2,
+0x02,0xd5,0x1f,0xe1,0x7e,0x03,0x67,0xe2,0x44,0xde,0xef,0xe2,0x00,0x06,0x67,0xe2,
+0x44,0xdd,0x20,0x7a,0x00,0x00,0x18,0xc2,0x7e,0x00,0x67,0xe4,0x44,0xdf,0x6f,0xe2,
+0x44,0xde,0xc0,0x01,0xe0,0x44,0x20,0x40,0x5a,0x76,0xd8,0xe0,0x00,0x03,0x24,0x34,
+0x4b,0xec,0x20,0x40,0x4b,0xf0,0x20,0x20,0x5a,0x6b,0xef,0xe4,0x00,0x06,0xc0,0x02,
+0x5c,0x8b,0xc0,0x03,0x5e,0xd4,0xc0,0x02,0xde,0x96,0x20,0x60,0x00,0x00,0x20,0x40,
+0x5a,0xc9,0x20,0x40,0x59,0x9a,0x6f,0xe2,0x02,0xd5,0x2f,0xef,0xfe,0x04,0x79,0x20,
+0x80,0x2a,0x1f,0xe3,0x7e,0x00,0x98,0x42,0xfe,0x00,0x2f,0xef,0xfe,0x02,0x79,0x20,
+0x80,0x0f,0xc6,0x07,0x80,0x00,0x6f,0xe2,0x02,0xd6,0x20,0x3a,0x59,0x96,0x6f,0xe2,
+0x04,0x3b,0xc3,0x02,0x59,0x96,0x20,0x40,0x73,0x42,0x20,0x40,0x72,0xb2,0x7d,0x3a,
+0x00,0x0f,0x24,0x7a,0x00,0x00,0x20,0x20,0x59,0x96,0x70,0x0a,0xff,0xb3,0x20,0x20,
+0x50,0x4e,0x70,0x0a,0xff,0xb4,0x58,0x00,0x00,0x1c,0x20,0x40,0x50,0xa5,0x6f,0xec,
+0x44,0x72,0xe7,0xec,0x00,0x0a,0x6f,0xec,0x04,0x4b,0xe7,0xec,0x00,0x0a,0xd8,0xc0,
+0x43,0xeb,0xdf,0x20,0x00,0x10,0x20,0x40,0x67,0xd4,0x20,0x20,0x67,0xb9,0x70,0x4b,
+0xb1,0x00,0x70,0x4b,0xb0,0x00,0x20,0x60,0x00,0x00,0x20,0x40,0x4e,0x2f,0x20,0x40,
+0x03,0x11,0x6f,0xe4,0x46,0x52,0xc4,0x06,0x00,0x00,0x79,0x3f,0xfe,0x0c,0x67,0xe4,
+0x46,0x52,0x70,0x0a,0xff,0xb6,0x20,0x20,0x50,0x4e,0x70,0x41,0xe3,0x00,0x70,0x46,
+0x50,0x00,0x70,0x42,0x04,0x00,0x70,0x4b,0xb0,0x00,0x70,0x4b,0xb1,0x00,0x20,0x60,
+0x00,0x00,0x20,0x40,0x4e,0x2f,0x70,0x0a,0xff,0xb1,0x58,0x00,0x00,0x01,0x20,0x40,
+0x50,0xa5,0x58,0x00,0x00,0x00,0xe7,0xe2,0x00,0x0a,0x20,0x40,0x67,0xb9,0x20,0x20,
+0x4d,0x34,0x20,0x20,0x00,0x5d,0x58,0x00,0x00,0x02,0x67,0xe2,0x46,0x50,0x20,0x60,
+0x00,0x00,0x6f,0xe4,0x46,0x52,0x79,0x3f,0xfe,0x0c,0x67,0xe4,0x46,0x52,0x70,0x0a,
+0xff,0xb6,0x20,0x40,0x50,0x4e,0x70,0x4b,0xb0,0x00,0x58,0x00,0x00,0x01,0x67,0xe2,
+0x4b,0xb1,0x20,0x60,0x00,0x00,0x6f,0xe2,0x41,0xe3,0xc1,0x00,0x80,0x00,0x6f,0xe4,
+0x46,0x52,0x79,0x20,0x7e,0x0c,0x67,0xe4,0x46,0x52,0x70,0x0a,0xff,0xb0,0x20,0x40,
+0x50,0x4e,0x70,0x41,0xe3,0x01,0x20,0x40,0x00,0x5d,0x20,0x20,0x4d,0x89,0x20,0x20,
+0x03,0x17,0x58,0x00,0x00,0x05,0x67,0xe2,0x4b,0xb0,0x20,0x60,0x00,0x00,0x20,0x20,
+0x4d,0x48,0x20,0x60,0x00,0x00,0x20,0x20,0x03,0x3d,0x70,0x0a,0xff,0xb5,0x58,0x00,
+0x00,0x1c,0x20,0x40,0x50,0xa5,0x6f,0xec,0x40,0xa0,0xe7,0xec,0x00,0x0a,0x6f,0xec,
+0x00,0x40,0xe7,0xec,0x00,0x0a,0xd8,0xc0,0x41,0xbf,0xdf,0x20,0x00,0x10,0x20,0x40,
+0x67,0xd4,0x20,0x20,0x67,0xb9,0xda,0x60,0x4b,0xb0,0xda,0x40,0x03,0x4b,0x20,0x20,
+0x4d,0x04,0x6f,0xe2,0x02,0x7b,0x79,0x20,0x7e,0x00,0x79,0x20,0x7e,0x07,0x67,0xe2,
+0x02,0x7b,0x20,0x60,0x00,0x00,0xda,0x60,0x46,0x50,0xda,0x40,0x03,0x2c,0x20,0x20,
+0x4d,0x04,0xda,0x60,0x4b,0xb1,0xda,0x40,0x4d,0x64,0x20,0x20,0x4d,0x04,0x20,0x40,
+0x56,0x4b,0x24,0x7a,0x00,0x00,0x6f,0xe2,0x0b,0x00,0x1f,0xe0,0xa2,0x01,0x20,0x40,
+0x51,0x3d,0x6f,0xe4,0x42,0x20,0xe7,0xe4,0x00,0x05,0x58,0x00,0x00,0xa1,0xe7,0xe2,
+0x00,0x05,0x6f,0xe2,0x0b,0x00,0x1f,0xe2,0x72,0x00,0x20,0x40,0x67,0xed,0x20,0x20,
+0x50,0x1f,0xef,0xec,0x00,0x03,0x67,0xec,0x40,0xa0,0xef,0xec,0x00,0x03,0x67,0xec,
+0x41,0xd1,0xd8,0xa0,0x41,0xbf,0xdf,0x20,0x00,0x10,0x20,0x40,0x67,0xed,0x20,0x40,
+0x68,0xbe,0x20,0x40,0x00,0x5d,0x20,0x40,0x4d,0x5c,0x20,0x20,0x50,0x1f,0x6f,0xe4,
+0x02,0x60,0x1f,0xe2,0x0c,0x00,0xef,0xe2,0x00,0x06,0x1f,0xe1,0x04,0x0f,0x1f,0xf1,
+0xfe,0x00,0xc0,0x04,0xd1,0x2d,0xc0,0x03,0xd1,0x2d,0xc0,0x05,0x03,0x7a,0xc0,0x02,
+0x83,0x84,0xc0,0x00,0x83,0x86,0xc0,0x02,0x51,0x2d,0x20,0x60,0x00,0x00,0xef,0xe4,
+0x00,0x06,0x67,0xe4,0x0a,0x96,0xc0,0x00,0x83,0x7e,0x20,0x60,0x00,0x00,0x70,0x0a,
+0xff,0xb2,0x58,0x00,0x00,0x02,0x20,0x40,0x50,0xa5,0x6f,0xe4,0x0a,0x96,0xe7,0xe4,
+0x00,0x0a,0x20,0x20,0x67,0xb9,0x20,0x40,0x03,0x7a,0x20,0x20,0x51,0x26,0x18,0x42,
+0x7e,0x00,0xc0,0x02,0xd1,0x1e,0x70,0x4b,0xb2,0x01,0xc0,0x01,0xd1,0x2d,0x70,0x4b,
+0xb2,0x00,0xc0,0x02,0x51,0x2d,0x20,0x60,0x00,0x00,0x80,0xc7,0xaa,0x55,0x40,0x00,
+0x00,0x40,0x0a,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x20,0x02,0x10,0x00,0x0c,0x12,0x00,0x59,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x68,0x00,0x08,0x80,0x02,0x00,0x01,0x74,0x02,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x02,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0xaa,0x55,0x01,0x00,0x02,0x4c,0x01,0xaa,0x55,0x01,0x00,0xe9,0x4b,0x02,
+0xaa,0x55,0x01,0x00,0x01,0x4c,0x40,0xaa,0x55,0x01,0x00,0xfc,0x4b,0x00,0xaa,0x55,
+0x02,0x00,0xeb,0x4b,0xc0,0x12,0xaa,0x55,0x0a,0x00,0xa2,0x0f,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0xaa,0x55,0x08,0x00,0xb3,0x4b,0x00,0x48,0x5d,0x00,
+0x00,0x00,0x00,0x00,0xaa,0x55,0x04,0x00,0xe2,0x4b,0xff,0xff,0xff,0xff,0xaa,0x55,
+0x01,0x00,0x6e,0x46,0x05,0xaa,0x55,0x07,0x00,0x25,0x44,0x02,0x03,0x00,0x05,0x10,
+0x02,0x03,0xaa,0x55,0x08,0x00,0x68,0x44,0x08,0x00,0x10,0x00,0x00,0x00,0x2c,0x01,
+0xaa,0x55,0x02,0x00,0xcc,0x44,0x31,0x00,0xaa,0x55,0x01,0x00,0x78,0x44,0x17,0xaa,
+0x55,0x01,0x00,0x7a,0x44,0x17,0xaa,0x55,0x01,0x00,0x90,0x44,0x00,0xaa,0x55,0x01,
+0x00,0x5f,0x44,0x07,0xaa,0x55,0x01,0x00,0x98,0x44,0x00,0xaa,0x55,0x01,0x00,0x40,
+0x43,0x00,0xaa,0x55,0x02,0x00,0x54,0x44,0x40,0x00,0xaa,0x55,0x06,0x00,0x72,0x44,
+0x21,0x22,0x01,0x33,0x02,0x3a,0xaa,0x55,0x0f,0x00,0x81,0x43,0x0e,0x42,0x54,0x34,
+0x2e,0x32,0x20,0x4b,0x65,0x79,0x62,0x6f,0x61,0x72,0x64,0xaa,0x55,0x1c,0x00,0x41,
+0x43,0x03,0x02,0x01,0x05,0x03,0x19,0xc1,0x03,0x03,0x03,0x12,0x18,0x0f,0x09,0x42,
+0x54,0x34,0x2e,0x32,0x20,0x4b,0x65,0x79,0x62,0x6f,0x61,0x72,0x64,0xaa,0x55,0x11,
+0x00,0x61,0x43,0x1f,0x0f,0x09,0x42,0x54,0x34,0x2e,0x32,0x20,0x4b,0x65,0x79,0x62,
+0x6f,0x61,0x72,0x64,0xaa,0x55,0x02,0x00,0x8e,0x44,0xdf,0x48,0xaa,0x55,0x02,0x00,
+0xdf,0x48,0x00,0x00,0xaa,0x55,0x01,0x00,0x06,0x42,0x17,0xaa,0x55,0x01,0x00,0x93,
+0x40,0x00,0xaa,0x55,0x01,0x00,0x6d,0x46,0x28,0xaa,0x55,0x03,0x00,0x2d,0x46,0x02,
+0x00,0x04,0xaa,0x55,0x01,0x00,0x2c,0x46,0x01,0xaa,0x55,0x01,0x00,0x34,0x46,0x02,
+0xaa,0x55,0x01,0x00,0x54,0x46,0x01,0xaa,0x55,0x06,0x00,0xa0,0x40,0x36,0xff,0xc2,
+0x08,0x66,0x22,0xaa,0x55,0x0f,0x00,0xe7,0x44,0x0e,0x42,0x54,0x33,0x2e,0x30,0x20,
+0x4b,0x65,0x79,0x62,0x6f,0x61,0x72,0x64,0xaa,0x55,0x03,0x00,0xe4,0x41,0x0e,0x00,
+0x01,0xaa,0x55,0x01,0x00,0xe8,0x41,0x01,0xaa,0x55,0x01,0x00,0x2c,0x45,0x0a,0xaa,
+0x55,0x03,0x00,0xaa,0x40,0x40,0x25,0x00,0xaa,0x55,0x01,0x00,0x92,0x40,0x43,0xaa,
+0x55,0x01,0x00,0x5b,0x41,0x00,0xaa,0x55,0x08,0x00,0x98,0x40,0xff,0xfb,0x8f,0xfa,
+0x8b,0x85,0x59,0x83,0xaa,0x55,0x01,0x00,0xd1,0x40,0x01,0xaa,0x55,0x0e,0x00,0x49,
+0x45,0x06,0x03,0x11,0x00,0x00,0x01,0x02,0x10,0x24,0x11,0x00,0x12,0x01,0x00,0xaa,
+0x55,0x01,0x00,0x5f,0x45,0x00,0xaa,0x55,0x02,0x00,0x47,0x45,0x83,0x46,0xaa,0x55,
+0x5a,0x02,0x83,0x46,0x04,0x00,0x11,0x01,0x00,0x10,0x02,0x11,0x24,0x00,0x01,0x00,
+0x00,0x36,0x01,0x9a,0x09,0x00,0x00,0x0a,0x00,0x01,0x00,0x00,0x09,0x00,0x01,0x35,
+0x03,0x19,0x11,0x24,0x09,0x00,0x04,0x35,0x0d,0x35,0x06,0x19,0x01,0x00,0x09,0x00,
+0x11,0x35,0x03,0x19,0x00,0x11,0x09,0x00,0x05,0x35,0x03,0x19,0x10,0x02,0x09,0x00,
+0x06,0x35,0x09,0x09,0x65,0x6e,0x09,0x00,0x6a,0x09,0x01,0x00,0x09,0x00,0x09,0x35,
+0x08,0x35,0x06,0x19,0x11,0x24,0x09,0x01,0x00,0x09,0x00,0x0d,0x35,0x0f,0x35,0x0d,
+0x35,0x06,0x19,0x01,0x00,0x09,0x00,0x13,0x35,0x03,0x19,0x00,0x11,0x09,0x01,0x00,
+0x25,0x3d,0x42,0x72,0x6f,0x61,0x64,0x63,0x6f,0x6d,0x20,0x42,0x6c,0x75,0x65,0x74,
+0x6f,0x6f,0x74,0x68,0x20,0x57,0x69,0x72,0x65,0x6c,0x65,0x73,0x73,0x20,0x20,0x4b,
+0x65,0x79,0x62,0x6f,0x61,0x72,0x64,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x09,
+0x01,0x01,0x25,0x08,0x4b,0x65,0x79,0x62,0x6f,0x61,0x72,0x64,0x09,0x01,0x02,0x25,
+0x10,0x42,0x72,0x6f,0x61,0x64,0x63,0x6f,0x6d,0x20,0x43,0x6f,0x72,0x70,0x2e,0x20,
+0x20,0x09,0x02,0x00,0x09,0x01,0x00,0x09,0x02,0x01,0x09,0x01,0x11,0x09,0x02,0x02,
+0x08,0x40,0x09,0x02,0x03,0x08,0x21,0x09,0x02,0x04,0x28,0x01,0x09,0x02,0x05,0x28,
+0x01,0x09,0x02,0x06,0x35,0x89,0x35,0x87,0x08,0x22,0x25,0x83,0x05,0x01,0x09,0x06,
+0xa1,0x01,0x85,0x01,0x75,0x01,0x95,0x08,0x05,0x07,0x19,0xe0,0x29,0xe7,0x15,0x00,
+0x25,0x01,0x81,0x02,0x95,0x01,0x75,0x08,0x81,0x03,0x95,0x05,0x75,0x01,0x05,0x08,
+0x19,0x01,0x29,0x05,0x91,0x02,0x95,0x01,0x75,0x03,0x91,0x03,0x95,0x06,0x75,0x08,
+0x15,0x00,0x25,0xff,0x05,0x07,0x19,0x00,0x29,0xff,0x81,0x00,0xc0,0x05,0x0c,0x09,
+0x01,0xa1,0x01,0x85,0x02,0x19,0x00,0x2a,0xff,0x03,0x15,0x00,0x26,0xff,0x03,0x95,
+0x01,0x75,0x10,0x81,0x00,0xc0,0x05,0x01,0x09,0x06,0xa1,0x01,0x85,0x07,0x05,0x07,
+0x19,0xe0,0x29,0xe7,0x15,0x00,0x25,0x01,0x75,0x01,0x95,0x08,0x81,0x00,0x95,0xa8,
+0x75,0x01,0x15,0x00,0x25,0x01,0x05,0x07,0x19,0x00,0x29,0xa8,0x81,0x02,0xc0,0x09,
+0x02,0x07,0x35,0x08,0x35,0x06,0x09,0x04,0x09,0x09,0x01,0x00,0x09,0x02,0x0b,0x09,
+0x01,0x00,0x09,0x02,0x0c,0x09,0x0c,0x80,0x09,0x02,0x0d,0x28,0x00,0x09,0x02,0x0e,
+0x28,0x01,0x09,0x02,0x0f,0x09,0x03,0x18,0x09,0x02,0x10,0x09,0x00,0x00,0x03,0x10,
+0x02,0x12,0x00,0x00,0x01,0x00,0x01,0x00,0x01,0x36,0x00,0xa1,0x09,0x00,0x00,0x0a,
+0x00,0x01,0x00,0x01,0x09,0x00,0x01,0x35,0x03,0x19,0x12,0x00,0x09,0x00,0x04,0x35,
+0x0d,0x35,0x06,0x19,0x01,0x00,0x09,0x00,0x01,0x35,0x03,0x19,0x00,0x01,0x09,0x00,
+0x06,0x35,0x09,0x09,0x65,0x6e,0x09,0x00,0x6a,0x09,0x01,0x00,0x09,0x00,0x09,0x35,
+0x08,0x35,0x06,0x19,0x12,0x00,0x09,0x01,0x00,0x09,0x01,0x00,0x25,0x2f,0x42,0x72,
+0x6f,0x61,0x64,0x63,0x6f,0x6d,0x20,0x42,0x6c,0x75,0x65,0x74,0x6f,0x6f,0x74,0x68,
+0x20,0x57,0x69,0x72,0x65,0x6c,0x65,0x73,0x73,0x20,0x4b,0x65,0x79,0x62,0x6f,0x61,
+0x72,0x64,0x20,0x50,0x6e,0x50,0x20,0x53,0x65,0x72,0x76,0x65,0x72,0x09,0x01,0x01,
+0x25,0x08,0x4b,0x65,0x79,0x62,0x6f,0x61,0x72,0x64,0x09,0x02,0x00,0x09,0x01,0x03,
+0x09,0x02,0x01,0x09,0x04,0xe8,0x09,0x02,0x02,0x09,0x70,0x21,0x09,0x02,0x03,0x09,
+0x00,0x01,0x09,0x02,0x04,0x28,0x01,0x09,0x02,0x05,0x09,0x00,0x02,0x00,0xaa,0x55,
+0x01,0x00,0x92,0x40,0x0a,0xaa,0x55,0x03,0x00,0x14,0x42,0xf7,0x4a,0x00,0xaa,0x55,
+0x10,0x00,0xf0,0x4f,0x00,0x1c,0xff,0x1f,0x00,0x1c,0x00,0x1c,0x80,0x4c,0xe0,0x4f,
+0x80,0x4c,0x80,0x4c,0xaa,0x55,0x02,0x00,0x68,0x46,0x30,0x10,0xaa,0x55,0x01,0x00,
+0x6c,0x46,0x03,0xaa,0x55,0x01,0x00,0x6f,0x46,0x07,0xaa,0x55,0x01,0x00,0x79,0x46,
+0x00,0xaa,0x55,0x01,0x00,0x91,0x40,0x00,0xaa,0x55,0x03,0x00,0x54,0x41,0x00,0x01,
+0x08,0xaa,0x55,0x01,0x00,0x74,0x41,0x02,0xaa,0x55,0x02,0x00,0xe4,0x41,0x0e,0x00,
+0xaa,0x55,0x07,0x00,0x76,0x41,0x0f,0x84,0xf0,0x0a,0x0b,0xb2,0x32,0xaa,0x55,0x02,
+0x00,0x57,0x41,0x8b,0x0b,0xaa,0x55,0x08,0x00,0xa1,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0xaa,0x55,0x02,0x00,0xbd,0x40,0x02,0x24,0xaa,0x55,0x08,0x00,0xad,
+0x40,0x40,0x00,0x00,0x02,0x32,0x00,0x00,0x02,0xaa,0x55,0x02,0x00,0xbb,0x40,0x20,
+0x00,0xaa,0x55,0x04,0x00,0xb7,0x40,0x20,0x00,0x00,0x20,0xaa,0x55,0x04,0x00,0xbf,
+0x40,0x80,0x04,0x00,0x10,0xaa,0x55,0x05,0x00,0xe2,0x44,0x08,0x0e,0x05,0x04,0x00,
+0xaa,0x55,0x02,0x00,0x02,0x42,0x30,0x1f,0xaa,0x55,0x01,0x00,0x10,0x42,0x20,0xaa,
+0x55,0x01,0x00,0xe0,0x41,0x01,0xaa,0x55,0x0f,0x00,0xa1,0x4b,0x4b,0xba,0x55,0xd0,
+0x56,0xe0,0x57,0x88,0x58,0x6c,0x59,0x10,0x07,0xff,0xff,0xaa,0x55,0x02,0x00,0xc3,
+0x40,0xa1,0x4b,0x86,0x3e
+};
Index: rongyuan/output/eeprom.dat
===================================================================
--- /YC3121_demo/ModuleDemo/BlueTooth/BT_code_patch/keyboard/branches/rongyuan/output/eeprom.dat	(nonexistent)
+++ /YC3121_demo/ModuleDemo/BlueTooth/BT_code_patch/keyboard/branches/rongyuan/output/eeprom.dat	(working copy)
@@ -0,0 +1,5029 @@
+00
+02
+aa
+55
+36
+0e
+c2
+84
+00
+0f
+c0
+00
+81
+68
+c0
+01
+81
+6e
+c0
+42
+81
+70
+c0
+44
+81
+96
+c0
+4a
+01
+4e
+c0
+51
+01
+9f
+c0
+51
+81
+59
+c0
+54
+81
+5c
+c0
+56
+01
+a6
+c0
+5c
+00
+30
+c0
+5d
+80
+77
+c0
+5e
+00
+f3
+c0
+5f
+03
+6e
+20
+20
+4a
+8b
+c0
+01
+82
+c3
+c0
+02
+82
+ba
+c0
+03
+01
+91
+c0
+09
+82
+e6
+c0
+0f
+82
+cf
+c0
+10
+82
+e1
+c0
+18
+00
+2a
+c0
+1e
+01
+0b
+c0
+1d
+01
+15
+c0
+1e
+81
+25
+c0
+1f
+01
+32
+c0
+20
+81
+44
+c0
+4c
+81
+4a
+c0
+51
+00
+1e
+20
+20
+4a
+8b
+18
+42
+7e
+00
+20
+7a
+00
+00
+c0
+13
+00
+22
+20
+20
+7b
+d4
+70
+43
+40
+01
+70
+44
+56
+02
+6f
+e4
+46
+52
+79
+20
+7e
+0b
+67
+e4
+46
+52
+20
+60
+00
+00
+70
+0a
+95
+26
+20
+20
+7b
+b4
+20
+40
+5b
+86
+20
+20
+00
+2c
+da
+60
+43
+81
+da
+20
+43
+62
+20
+40
+5b
+a5
+20
+60
+00
+00
+58
+00
+00
+3f
+67
+e4
+41
+f6
+58
+00
+00
+5f
+67
+e4
+41
+fe
+58
+00
+00
+63
+67
+e4
+41
+fa
+58
+00
+00
+74
+67
+e4
+41
+ea
+58
+00
+00
+75
+67
+e4
+41
+f2
+20
+40
+02
+b4
+20
+40
+4d
+af
+20
+40
+4d
+bc
+20
+40
+4c
+2a
+20
+20
+50
+4d
+1a
+62
+7e
+00
+c0
+00
+83
+06
+c0
+01
+03
+09
+c0
+02
+03
+17
+c0
+02
+83
+1f
+c0
+03
+03
+20
+c0
+03
+83
+23
+c0
+09
+03
+2c
+c0
+09
+83
+36
+c0
+13
+83
+37
+c0
+17
+03
+3a
+c0
+1e
+83
+3b
+c0
+0c
+03
+3c
+c0
+14
+82
+fb
+c0
+05
+80
+4f
+20
+20
+4d
+df
+20
+40
+4d
+d7
+6f
+e4
+40
+42
+1f
+e3
+7e
+00
+68
+44
+41
+e4
+98
+46
+7c
+00
+20
+20
+4d
+91
+6f
+e2
+46
+79
+c3
+82
+80
+00
+6f
+e4
+4f
+fc
+68
+44
+4f
+fe
+98
+46
+7c
+00
+24
+42
+d0
+da
+20
+20
+4d
+87
+20
+60
+00
+00
+20
+40
+4d
+6b
+20
+20
+4d
+73
+20
+40
+03
+48
+20
+40
+03
+50
+20
+40
+03
+53
+20
+60
+00
+00
+20
+40
+4f
+11
+20
+74
+00
+00
+1a
+22
+7e
+00
+67
+e4
+46
+71
+1a
+42
+7e
+00
+67
+e2
+46
+70
+68
+44
+04
+74
+60
+44
+46
+73
+20
+40
+5b
+6c
+24
+3a
+4a
+8b
+6f
+e2
+04
+9e
+20
+20
+50
+42
+e8
+42
+00
+11
+58
+00
+00
+01
+67
+e2
+0a
+96
+e0
+42
+00
+05
+20
+20
+03
+7e
+20
+20
+4d
+bd
+20
+20
+00
+76
+20
+20
+4d
+c8
+6f
+e2
+0a
+ff
+c0
+08
+80
+d8
+c0
+0a
+80
+e0
+c0
+13
+80
+ee
+c0
+06
+00
+e5
+c0
+58
+00
+f0
+c0
+58
+83
+63
+c0
+50
+00
+ba
+c0
+01
+00
+a0
+c0
+3b
+00
+8c
+c0
+64
+81
+b2
+c0
+60
+01
+a7
+c0
+60
+81
+ac
+c0
+61
+01
+af
+c0
+61
+81
+b8
+c0
+62
+01
+bd
+c0
+62
+81
+c0
+c0
+64
+01
+d2
+c0
+63
+01
+d8
+c0
+63
+81
+de
+20
+20
+4e
+5c
+20
+40
+00
+95
+18
+c0
+8d
+fe
+18
+c2
+0a
+00
+6f
+e2
+0b
+00
+1f
+e2
+72
+00
+20
+40
+67
+ed
+58
+00
+00
+00
+e7
+e4
+00
+05
+20
+20
+50
+1f
+6f
+e4
+44
+8e
+98
+00
+0c
+00
+ef
+e4
+00
+06
+20
+7a
+00
+00
+1f
+e0
+84
+01
+ef
+e2
+00
+06
+98
+c0
+8c
+00
+ef
+e2
+00
+06
+98
+c0
+8c
+00
+18
+c2
+0a
+00
+20
+20
+00
+97
+6f
+e2
+0b
+00
+c0
+80
+d0
+1c
+1a
+22
+06
+00
+20
+40
+50
+1f
+e8
+42
+00
+03
+60
+42
+46
+6f
+6f
+e4
+46
+52
+c3
+84
+80
+00
+c3
+80
+00
+00
+6f
+e2
+46
+6c
+2f
+ef
+fe
+00
+24
+20
+80
+af
+68
+42
+46
+6f
+18
+41
+7e
+03
+67
+e2
+40
+93
+6f
+e2
+46
+6c
+2f
+ef
+fe
+01
+24
+60
+80
+00
+68
+42
+46
+6f
+28
+4f
+fe
+02
+20
+20
+80
+b6
+20
+20
+4d
+73
+6f
+e2
+44
+56
+c0
+00
+4d
+75
+c0
+00
+cd
+6f
+c0
+01
+00
+28
+ef
+e2
+00
+03
+2f
+ef
+fe
+00
+20
+20
+80
+c2
+2f
+ef
+fe
+01
+20
+20
+80
+c6
+2f
+ef
+fe
+02
+20
+20
+80
+cf
+20
+20
+50
+1c
+70
+44
+56
+01
+ef
+ec
+00
+03
+67
+ec
+41
+d1
+20
+20
+50
+1f
+70
+44
+56
+02
+6f
+e2
+0b
+00
+1f
+e0
+ff
+ff
+1f
+e2
+72
+00
+18
+62
+0c
+00
+67
+e2
+43
+41
+d8
+a0
+43
+42
+20
+40
+7c
+cf
+20
+20
+50
+1f
+70
+44
+56
+00
+6f
+e2
+0b
+00
+1f
+e0
+ff
+ff
+1f
+e2
+72
+00
+18
+62
+0c
+00
+67
+e2
+43
+41
+d8
+a0
+43
+42
+20
+40
+7c
+cf
+20
+20
+50
+1f
+6f
+e4
+46
+52
+c3
+00
+50
+1c
+20
+40
+50
+1f
+20
+40
+4d
+64
+6f
+e4
+46
+52
+c4
+01
+00
+00
+70
+0a
+ff
+b6
+20
+20
+50
+4e
+6f
+e2
+0b
+00
+c0
+81
+d0
+1f
+ef
+e6
+00
+03
+67
+e6
+40
+aa
+20
+20
+50
+1f
+1a
+22
+06
+00
+ef
+e2
+00
+03
+c0
+00
+4f
+1c
+c0
+00
+cf
+1f
+c0
+01
+4f
+25
+c0
+01
+80
+ec
+20
+20
+50
+1c
+58
+00
+00
+01
+20
+20
+4f
+20
+20
+40
+50
+1f
+20
+20
+4d
+85
+6f
+e4
+46
+52
+c2
+81
+03
+56
+20
+20
+50
+1c
+18
+40
+ff
+fd
+d8
+40
+00
+c8
+20
+40
+7d
+b5
+68
+42
+46
+7a
+20
+40
+7d
+b5
+1f
+e2
+22
+00
+18
+42
+7e
+00
+9a
+26
+7e
+00
+67
+e2
+46
+7a
+68
+44
+46
+7b
+18
+40
+85
+ff
+20
+40
+5b
+4d
+20
+3a
+01
+07
+e8
+48
+00
+06
+59
+28
+03
+02
+98
+46
+7c
+00
+24
+22
+81
+07
+ef
+e2
+00
+06
+c2
+82
+4f
+01
+20
+20
+01
+07
+70
+46
+7a
+00
+70
+0b
+01
+01
+20
+40
+50
+e0
+20
+20
+50
+1c
+6f
+e2
+05
+4e
+67
+e2
+04
+c5
+c0
+19
+81
+0f
+20
+20
+61
+94
+6f
+e2
+04
+cd
+79
+20
+7e
+00
+67
+e2
+04
+cd
+70
+0a
+95
+01
+20
+40
+7b
+ab
+20
+20
+61
+bf
+6f
+e2
+00
+7d
+c0
+08
+01
+1c
+c0
+0b
+81
+22
+20
+20
+60
+fe
+70
+00
+7d
+2a
+70
+00
+7c
+03
+20
+60
+00
+00
+68
+42
+05
+4e
+18
+46
+7c
+06
+20
+21
+01
+20
+20
+20
+62
+06
+70
+00
+7e
+24
+20
+20
+61
+34
+6f
+e4
+05
+53
+20
+3a
+62
+d2
+20
+20
+62
+bc
+6f
+e2
+05
+4e
+67
+e2
+04
+c5
+c0
+05
+81
+29
+20
+20
+61
+a6
+20
+40
+61
+df
+6f
+e2
+00
+55
+c1
+8c
+80
+00
+70
+0a
+ff
+b1
+58
+00
+00
+01
+20
+40
+50
+a5
+58
+00
+00
+01
+e7
+e2
+00
+0a
+20
+20
+67
+b9
+78
+54
+7c
+00
+20
+40
+66
+a3
+6f
+e2
+00
+48
+20
+7a
+00
+00
+c2
+83
+81
+38
+20
+20
+63
+f2
+c0
+42
+01
+3b
+c0
+41
+81
+3e
+20
+20
+64
+21
+20
+40
+01
+41
+6f
+e2
+00
+48
+20
+20
+64
+7b
+20
+40
+01
+41
+6f
+e2
+00
+48
+20
+20
+64
+ef
+6f
+e2
+46
+2c
+20
+3a
+65
+0d
+20
+20
+65
+06
+6f
+e2
+40
+9e
+79
+3f
+fe
+03
+67
+e2
+40
+9e
+58
+00
+00
+01
+67
+e4
+04
+ca
+20
+60
+00
+00
+6f
+e2
+44
+90
+20
+3a
+5e
+d0
+20
+40
+74
+38
+20
+20
+79
+32
+18
+42
+7e
+00
+20
+40
+7d
+2b
+1c
+30
+7e
+00
+79
+20
+7e
+2c
+20
+40
+7d
+14
+79
+3f
+fe
+2c
+20
+40
+4a
+76
+20
+40
+7d
+14
+20
+74
+00
+00
+20
+40
+01
+65
+20
+20
+4a
+2f
+1b
+42
+7e
+00
+20
+40
+01
+64
+20
+20
+4a
+e9
+6f
+e4
+40
+4e
+1f
+e3
+7e
+00
+20
+40
+7d
+2b
+1e
+02
+7e
+00
+20
+40
+7d
+14
+1b
+42
+04
+00
+20
+40
+01
+64
+20
+20
+4b
+67
+20
+40
+7d
+14
+98
+00
+0c
+00
+79
+3f
+8c
+10
+20
+20
+7d
+1f
+20
+40
+68
+c4
+20
+40
+60
+d7
+20
+40
+01
+6c
+20
+20
+40
+0a
+20
+75
+80
+00
+20
+20
+7b
+9a
+20
+40
+02
+b2
+20
+20
+40
+10
+20
+30
+81
+80
+70
+89
+55
+d4
+20
+00
+00
+04
+70
+89
+55
+d2
+20
+00
+00
+04
+70
+89
+55
+d1
+20
+00
+00
+04
+6f
+e2
+41
+df
+c0
+00
+01
+7e
+c0
+00
+81
+8e
+c0
+01
+01
+7e
+c0
+01
+81
+8e
+c0
+02
+01
+8e
+c0
+10
+01
+8e
+70
+89
+55
+d0
+70
+89
+56
+e0
+18
+00
+2a
+08
+18
+00
+2a
+00
+78
+50
+fc
+00
+78
+50
+7c
+00
+78
+2f
+7c
+00
+70
+89
+02
+00
+70
+89
+01
+00
+70
+89
+00
+00
+70
+89
+03
+00
+70
+89
+04
+70
+6f
+e2
+89
+06
+79
+20
+7e
+00
+67
+e2
+89
+06
+20
+60
+00
+00
+70
+89
+55
+d0
+70
+89
+56
+c0
+20
+20
+01
+80
+20
+40
+57
+af
+20
+40
+01
+94
+20
+20
+58
+a7
+20
+36
+81
+9b
+20
+20
+57
+be
+60
+42
+00
+17
+20
+40
+49
+2a
+20
+40
+49
+80
+58
+00
+05
+00
+20
+40
+4a
+8e
+6f
+e2
+89
+06
+79
+20
+7e
+00
+67
+e2
+89
+06
+20
+20
+49
+37
+70
+89
+06
+7c
+20
+75
+80
+00
+58
+00
+00
+00
+67
+e4
+41
+dd
+1c
+43
+7e
+00
+67
+e8
+40
+94
+20
+60
+00
+00
+20
+20
+4b
+7f
+20
+40
+50
+1f
+ef
+e2
+00
+03
+20
+3a
+01
+ab
+20
+20
+49
+30
+20
+20
+48
+f5
+79
+3f
+80
+2d
+20
+40
+50
+1f
+20
+20
+02
+1b
+79
+20
+00
+2d
+20
+40
+02
+4a
+20
+20
+50
+1f
+6f
+e2
+0b
+00
+1f
+e2
+72
+00
+67
+e2
+0b
+60
+d8
+a0
+0b
+61
+20
+40
+67
+ed
+20
+20
+50
+1f
+ef
+e2
+00
+03
+67
+e2
+41
+df
+20
+40
+48
+f5
+20
+40
+49
+30
+20
+20
+50
+1f
+ef
+e2
+00
+03
+67
+e2
+4b
+f0
+20
+20
+50
+1f
+ef
+e8
+00
+03
+67
+e8
+4b
+f2
+20
+40
+01
+c4
+20
+20
+50
+1f
+67
+e8
+4b
+f2
+da
+20
+00
+00
+df
+20
+00
+04
+d8
+c0
+4b
+f2
+ef
+e2
+00
+06
+9a
+20
+a2
+00
+c2
+00
+01
+c8
+1a
+22
+7e
+00
+67
+e4
+4c
+08
+6f
+e2
+4c
+08
+68
+42
+4c
+09
+98
+40
+fe
+00
+67
+e2
+4c
+0a
+20
+60
+00
+00
+6f
+e2
+0b
+00
+1f
+e2
+72
+00
+67
+e2
+4c
+2f
+d8
+a0
+4c
+30
+20
+40
+67
+ed
+20
+20
+50
+1f
+ef
+e2
+00
+03
+67
+e2
+4c
+6e
+ef
+e2
+00
+03
+1f
+ef
+fe
+78
+67
+e4
+4b
+eb
+20
+20
+50
+1f
+ef
+e2
+00
+03
+67
+e2
+4b
+fc
+20
+20
+50
+1f
+78
+44
+fc
+00
+78
+43
+fc
+00
+58
+55
+55
+55
+98
+00
+1e
+00
+6f
+e2
+4b
+f0
+1f
+ed
+84
+00
+79
+20
+04
+01
+18
+43
+1c
+00
+20
+60
+00
+00
+78
+4d
+fc
+00
+78
+45
+fc
+00
+78
+4e
+fc
+00
+78
+4e
+7c
+00
+78
+46
+fc
+00
+78
+46
+7c
+00
+78
+44
+fc
+00
+78
+47
+7c
+00
+78
+43
+fc
+00
+37
+d3
+82
+00
+20
+00
+00
+64
+20
+60
+00
+00
+20
+40
+49
+15
+68
+42
+4b
+f0
+20
+20
+49
+30
+20
+40
+57
+9e
+6f
+e8
+4b
+f2
+98
+00
+12
+00
+20
+40
+01
+e1
+20
+40
+01
+f6
+79
+20
+2a
+00
+78
+2e
+fc
+00
+78
+30
+7c
+00
+78
+50
+fc
+00
+19
+31
+7e
+00
+1f
+ec
+fe
+00
+1f
+f1
+fe
+00
+08
+00
+86
+28
+78
+4e
+fc
+00
+78
+2d
+fc
+00
+78
+23
+fc
+00
+78
+24
+fc
+00
+6f
+e2
+4c
+0a
+08
+00
+86
+08
+6f
+e2
+0b
+40
+1f
+e0
+fe
+01
+98
+00
+72
+00
+d8
+c0
+0b
+40
+ef
+e2
+00
+06
+08
+00
+86
+08
+c2
+00
+02
+10
+78
+24
+7c
+00
+08
+00
+86
+18
+78
+44
+7c
+00
+37
+d3
+82
+00
+20
+00
+00
+64
+78
+4e
+fc
+00
+78
+4d
+fc
+00
+20
+60
+00
+00
+70
+4b
+ef
+00
+20
+40
+02
+30
+24
+37
+82
+23
+20
+40
+02
+92
+20
+40
+02
+8b
+58
+00
+00
+00
+67
+e4
+4b
+bb
+20
+60
+00
+00
+6f
+e4
+4b
+bb
+1f
+e6
+7c
+05
+24
+21
+02
+8e
+6f
+e2
+4b
+ef
+1f
+e0
+fe
+01
+67
+e2
+4b
+ef
+20
+20
+02
+1c
+6f
+e2
+0b
+60
+1f
+e0
+fe
+01
+1f
+e2
+72
+00
+d8
+c0
+0b
+60
+d8
+a0
+0b
+40
+20
+20
+7c
+dc
+78
+57
+fc
+00
+20
+40
+02
+2a
+20
+40
+01
+f9
+6f
+e2
+4b
+fc
+c0
+00
+82
+3e
+18
+00
+2a
+00
+6f
+e8
+4b
+f2
+98
+00
+12
+00
+68
+42
+00
+17
+20
+40
+49
+1c
+20
+40
+49
+21
+20
+40
+02
+4a
+20
+57
+81
+ea
+20
+60
+00
+00
+70
+0b
+1f
+00
+78
+37
+fc
+00
+20
+20
+01
+ea
+20
+40
+57
+9e
+6f
+e8
+4b
+f2
+98
+00
+12
+00
+20
+40
+49
+15
+68
+42
+4b
+f0
+20
+40
+49
+1c
+58
+00
+05
+00
+20
+40
+4a
+8e
+20
+40
+49
+21
+20
+40
+01
+e1
+78
+26
+fc
+00
+78
+30
+fc
+00
+78
+50
+7c
+00
+78
+28
+7c
+00
+6f
+e4
+4b
+eb
+98
+00
+36
+00
+37
+c1
+84
+00
+24
+2c
+01
+ea
+78
+46
+fc
+00
+78
+25
+fc
+00
+78
+23
+fc
+00
+78
+24
+fc
+00
+09
+80
+00
+08
+19
+89
+7e
+00
+67
+e2
+4c
+0b
+68
+42
+4c
+0a
+98
+46
+7c
+00
+24
+22
+81
+ea
+09
+80
+00
+08
+19
+89
+7e
+00
+67
+e2
+0b
+1e
+1f
+e1
+72
+1f
+20
+22
+82
+66
+09
+80
+00
+08
+19
+89
+7e
+00
+e7
+e2
+00
+05
+c2
+00
+02
+62
+09
+80
+00
+18
+1f
+ef
+7e
+00
+1f
+f1
+7e
+00
+e7
+e6
+00
+05
+78
+45
+fc
+00
+20
+23
+01
+ea
+78
+37
+fc
+00
+6f
+e2
+00
+17
+1f
+e0
+a2
+00
+20
+40
+49
+80
+78
+46
+fc
+00
+20
+40
+49
+15
+6f
+e2
+4c
+1c
+1f
+e2
+22
+00
+20
+40
+02
+9b
+20
+60
+00
+00
+20
+40
+02
+7b
+24
+37
+82
+8b
+20
+40
+02
+92
+78
+57
+fc
+00
+20
+60
+00
+00
+20
+40
+02
+8b
+78
+57
+fc
+00
+20
+40
+02
+41
+24
+77
+80
+00
+6f
+e2
+4b
+fc
+c0
+00
+81
+ea
+20
+40
+02
+85
+20
+40
+01
+f9
+20
+40
+02
+8b
+20
+20
+01
+ea
+6f
+e2
+4c
+2f
+1f
+e0
+fe
+01
+1f
+e2
+72
+00
+d8
+c0
+4c
+2f
+d8
+a0
+0b
+40
+20
+20
+7c
+dc
+d8
+a0
+0b
+1e
+df
+20
+00
+42
+20
+20
+7c
+af
+70
+0a
+ff
+c2
+58
+00
+00
+00
+20
+40
+50
+a5
+20
+20
+67
+b9
+70
+0a
+ff
+c1
+6f
+e2
+0b
+1e
+1f
+e1
+72
+1f
+20
+7a
+00
+00
+1f
+e2
+72
+00
+20
+40
+50
+a5
+d8
+c0
+0b
+1f
+20
+40
+67
+d4
+20
+20
+67
+b9
+68
+42
+4c
+2e
+58
+00
+4c
+1d
+98
+40
+8a
+00
+1a
+22
+7e
+00
+e7
+e2
+00
+05
+18
+40
+84
+01
+18
+41
+04
+07
+60
+42
+4c
+2e
+20
+60
+00
+00
+20
+40
+49
+ba
+20
+7a
+00
+00
+68
+42
+4c
+2d
+da
+20
+0b
+a2
+20
+40
+02
+ab
+60
+42
+4c
+2d
+20
+60
+00
+00
+1a
+22
+7e
+00
+98
+40
+8a
+00
+6f
+e2
+00
+18
+e7
+e2
+00
+05
+18
+40
+84
+01
+18
+41
+04
+ff
+20
+60
+00
+00
+c6
+96
+80
+00
+20
+20
+02
+76
+58
+00
+00
+25
+67
+e4
+44
+cc
+20
+40
+5b
+f0
+20
+40
+5c
+0c
+20
+40
+5c
+19
+20
+20
+5b
+f8
+20
+40
+58
+a3
+20
+40
+49
+15
+68
+42
+00
+17
+20
+40
+49
+1c
+20
+00
+05
+dc
+20
+40
+49
+21
+78
+28
+7c
+00
+d9
+60
+15
+7c
+20
+20
+58
+69
+20
+40
+49
+ba
+78
+23
+fc
+00
+78
+24
+fc
+00
+09
+80
+00
+08
+19
+89
+7e
+00
+67
+e2
+02
+d5
+09
+80
+00
+08
+19
+89
+7e
+00
+e7
+e2
+00
+05
+1f
+e2
+72
+00
+20
+3a
+58
+8b
+20
+20
+58
+87
+c6
+07
+80
+00
+20
+40
+5c
+70
+24
+7a
+00
+00
+6f
+e2
+02
+d5
+1f
+e1
+7e
+03
+67
+e2
+44
+de
+ef
+e2
+00
+06
+67
+e2
+44
+dd
+20
+7a
+00
+00
+18
+c2
+7e
+00
+67
+e4
+44
+df
+6f
+e2
+44
+de
+c0
+01
+e0
+44
+20
+40
+5a
+76
+d8
+e0
+00
+03
+24
+34
+4b
+ec
+20
+40
+4b
+f0
+20
+20
+5a
+6b
+ef
+e4
+00
+06
+c0
+02
+5c
+8b
+c0
+03
+5e
+d4
+c0
+02
+de
+96
+20
+60
+00
+00
+20
+40
+5a
+c9
+20
+40
+59
+9a
+6f
+e2
+02
+d5
+2f
+ef
+fe
+04
+79
+20
+80
+2a
+1f
+e3
+7e
+00
+98
+42
+fe
+00
+2f
+ef
+fe
+02
+79
+20
+80
+0f
+c6
+07
+80
+00
+6f
+e2
+02
+d6
+20
+3a
+59
+96
+6f
+e2
+04
+3b
+c3
+02
+59
+96
+20
+40
+73
+42
+20
+40
+72
+b2
+7d
+3a
+00
+0f
+24
+7a
+00
+00
+20
+20
+59
+96
+70
+0a
+ff
+b3
+20
+20
+50
+4e
+70
+0a
+ff
+b4
+58
+00
+00
+1c
+20
+40
+50
+a5
+6f
+ec
+44
+72
+e7
+ec
+00
+0a
+6f
+ec
+04
+4b
+e7
+ec
+00
+0a
+d8
+c0
+43
+eb
+df
+20
+00
+10
+20
+40
+67
+d4
+20
+20
+67
+b9
+70
+4b
+b1
+00
+70
+4b
+b0
+00
+20
+60
+00
+00
+20
+40
+4e
+2f
+20
+40
+03
+11
+6f
+e4
+46
+52
+c4
+06
+00
+00
+79
+3f
+fe
+0c
+67
+e4
+46
+52
+70
+0a
+ff
+b6
+20
+20
+50
+4e
+70
+41
+e3
+00
+70
+46
+50
+00
+70
+42
+04
+00
+70
+4b
+b0
+00
+70
+4b
+b1
+00
+20
+60
+00
+00
+20
+40
+4e
+2f
+70
+0a
+ff
+b1
+58
+00
+00
+01
+20
+40
+50
+a5
+58
+00
+00
+00
+e7
+e2
+00
+0a
+20
+40
+67
+b9
+20
+20
+4d
+34
+20
+20
+00
+5d
+58
+00
+00
+02
+67
+e2
+46
+50
+20
+60
+00
+00
+6f
+e4
+46
+52
+79
+3f
+fe
+0c
+67
+e4
+46
+52
+70
+0a
+ff
+b6
+20
+40
+50
+4e
+70
+4b
+b0
+00
+58
+00
+00
+01
+67
+e2
+4b
+b1
+20
+60
+00
+00
+6f
+e2
+41
+e3
+c1
+00
+80
+00
+6f
+e4
+46
+52
+79
+20
+7e
+0c
+67
+e4
+46
+52
+70
+0a
+ff
+b0
+20
+40
+50
+4e
+70
+41
+e3
+01
+20
+40
+00
+5d
+20
+20
+4d
+89
+20
+20
+03
+17
+58
+00
+00
+05
+67
+e2
+4b
+b0
+20
+60
+00
+00
+20
+20
+4d
+48
+20
+60
+00
+00
+20
+20
+03
+3d
+70
+0a
+ff
+b5
+58
+00
+00
+1c
+20
+40
+50
+a5
+6f
+ec
+40
+a0
+e7
+ec
+00
+0a
+6f
+ec
+00
+40
+e7
+ec
+00
+0a
+d8
+c0
+41
+bf
+df
+20
+00
+10
+20
+40
+67
+d4
+20
+20
+67
+b9
+da
+60
+4b
+b0
+da
+40
+03
+4b
+20
+20
+4d
+04
+6f
+e2
+02
+7b
+79
+20
+7e
+00
+79
+20
+7e
+07
+67
+e2
+02
+7b
+20
+60
+00
+00
+da
+60
+46
+50
+da
+40
+03
+2c
+20
+20
+4d
+04
+da
+60
+4b
+b1
+da
+40
+4d
+64
+20
+20
+4d
+04
+20
+40
+56
+4b
+24
+7a
+00
+00
+6f
+e2
+0b
+00
+1f
+e0
+a2
+01
+20
+40
+51
+3d
+6f
+e4
+42
+20
+e7
+e4
+00
+05
+58
+00
+00
+a1
+e7
+e2
+00
+05
+6f
+e2
+0b
+00
+1f
+e2
+72
+00
+20
+40
+67
+ed
+20
+20
+50
+1f
+ef
+ec
+00
+03
+67
+ec
+40
+a0
+ef
+ec
+00
+03
+67
+ec
+41
+d1
+d8
+a0
+41
+bf
+df
+20
+00
+10
+20
+40
+67
+ed
+20
+40
+68
+be
+20
+40
+00
+5d
+20
+40
+4d
+5c
+20
+20
+50
+1f
+6f
+e4
+02
+60
+1f
+e2
+0c
+00
+ef
+e2
+00
+06
+1f
+e1
+04
+0f
+1f
+f1
+fe
+00
+c0
+04
+d1
+2d
+c0
+03
+d1
+2d
+c0
+05
+03
+7a
+c0
+02
+83
+84
+c0
+00
+83
+86
+c0
+02
+51
+2d
+20
+60
+00
+00
+ef
+e4
+00
+06
+67
+e4
+0a
+96
+c0
+00
+83
+7e
+20
+60
+00
+00
+70
+0a
+ff
+b2
+58
+00
+00
+02
+20
+40
+50
+a5
+6f
+e4
+0a
+96
+e7
+e4
+00
+0a
+20
+20
+67
+b9
+20
+40
+03
+7a
+20
+20
+51
+26
+18
+42
+7e
+00
+c0
+02
+d1
+1e
+70
+4b
+b2
+01
+c0
+01
+d1
+2d
+70
+4b
+b2
+00
+c0
+02
+51
+2d
+20
+60
+00
+00
+80
+c7
+aa
+55
+40
+00
+00
+40
+0a
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+20
+02
+10
+00
+0c
+12
+00
+59
+00
+00
+00
+00
+00
+00
+00
+00
+68
+00
+08
+80
+02
+00
+01
+74
+02
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+02
+04
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+aa
+55
+01
+00
+02
+4c
+01
+aa
+55
+01
+00
+e9
+4b
+02
+aa
+55
+01
+00
+01
+4c
+40
+aa
+55
+01
+00
+fc
+4b
+00
+aa
+55
+02
+00
+eb
+4b
+c0
+12
+aa
+55
+0a
+00
+a2
+0f
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+aa
+55
+08
+00
+b3
+4b
+00
+48
+5d
+00
+00
+00
+00
+00
+aa
+55
+04
+00
+e2
+4b
+ff
+ff
+ff
+ff
+aa
+55
+01
+00
+6e
+46
+05
+aa
+55
+07
+00
+25
+44
+02
+03
+00
+05
+10
+02
+03
+aa
+55
+08
+00
+68
+44
+08
+00
+10
+00
+00
+00
+2c
+01
+aa
+55
+02
+00
+cc
+44
+31
+00
+aa
+55
+01
+00
+78
+44
+17
+aa
+55
+01
+00
+7a
+44
+17
+aa
+55
+01
+00
+90
+44
+00
+aa
+55
+01
+00
+5f
+44
+07
+aa
+55
+01
+00
+98
+44
+00
+aa
+55
+01
+00
+40
+43
+00
+aa
+55
+02
+00
+54
+44
+40
+00
+aa
+55
+06
+00
+72
+44
+21
+22
+01
+33
+02
+3a
+aa
+55
+0f
+00
+81
+43
+0e
+42
+54
+34
+2e
+32
+20
+4b
+65
+79
+62
+6f
+61
+72
+64
+aa
+55
+1c
+00
+41
+43
+03
+02
+01
+05
+03
+19
+c1
+03
+03
+03
+12
+18
+0f
+09
+42
+54
+34
+2e
+32
+20
+4b
+65
+79
+62
+6f
+61
+72
+64
+aa
+55
+11
+00
+61
+43
+1f
+0f
+09
+42
+54
+34
+2e
+32
+20
+4b
+65
+79
+62
+6f
+61
+72
+64
+aa
+55
+02
+00
+8e
+44
+df
+48
+aa
+55
+02
+00
+df
+48
+00
+00
+aa
+55
+01
+00
+06
+42
+17
+aa
+55
+01
+00
+93
+40
+00
+aa
+55
+01
+00
+6d
+46
+28
+aa
+55
+03
+00
+2d
+46
+02
+00
+04
+aa
+55
+01
+00
+2c
+46
+01
+aa
+55
+01
+00
+34
+46
+02
+aa
+55
+01
+00
+54
+46
+01
+aa
+55
+06
+00
+a0
+40
+36
+ff
+c2
+08
+66
+22
+aa
+55
+0f
+00
+e7
+44
+0e
+42
+54
+33
+2e
+30
+20
+4b
+65
+79
+62
+6f
+61
+72
+64
+aa
+55
+03
+00
+e4
+41
+0e
+00
+01
+aa
+55
+01
+00
+e8
+41
+01
+aa
+55
+01
+00
+2c
+45
+0a
+aa
+55
+03
+00
+aa
+40
+40
+25
+00
+aa
+55
+01
+00
+92
+40
+43
+aa
+55
+01
+00
+5b
+41
+00
+aa
+55
+08
+00
+98
+40
+ff
+fb
+8f
+fa
+8b
+85
+59
+83
+aa
+55
+01
+00
+d1
+40
+01
+aa
+55
+0e
+00
+49
+45
+06
+03
+11
+00
+00
+01
+02
+10
+24
+11
+00
+12
+01
+00
+aa
+55
+01
+00
+5f
+45
+00
+aa
+55
+02
+00
+47
+45
+83
+46
+aa
+55
+5a
+02
+83
+46
+04
+00
+11
+01
+00
+10
+02
+11
+24
+00
+01
+00
+00
+36
+01
+9a
+09
+00
+00
+0a
+00
+01
+00
+00
+09
+00
+01
+35
+03
+19
+11
+24
+09
+00
+04
+35
+0d
+35
+06
+19
+01
+00
+09
+00
+11
+35
+03
+19
+00
+11
+09
+00
+05
+35
+03
+19
+10
+02
+09
+00
+06
+35
+09
+09
+65
+6e
+09
+00
+6a
+09
+01
+00
+09
+00
+09
+35
+08
+35
+06
+19
+11
+24
+09
+01
+00
+09
+00
+0d
+35
+0f
+35
+0d
+35
+06
+19
+01
+00
+09
+00
+13
+35
+03
+19
+00
+11
+09
+01
+00
+25
+3d
+42
+72
+6f
+61
+64
+63
+6f
+6d
+20
+42
+6c
+75
+65
+74
+6f
+6f
+74
+68
+20
+57
+69
+72
+65
+6c
+65
+73
+73
+20
+20
+4b
+65
+79
+62
+6f
+61
+72
+64
+20
+20
+20
+20
+20
+20
+20
+20
+20
+20
+20
+20
+20
+20
+20
+20
+20
+20
+20
+20
+20
+20
+20
+20
+09
+01
+01
+25
+08
+4b
+65
+79
+62
+6f
+61
+72
+64
+09
+01
+02
+25
+10
+42
+72
+6f
+61
+64
+63
+6f
+6d
+20
+43
+6f
+72
+70
+2e
+20
+20
+09
+02
+00
+09
+01
+00
+09
+02
+01
+09
+01
+11
+09
+02
+02
+08
+40
+09
+02
+03
+08
+21
+09
+02
+04
+28
+01
+09
+02
+05
+28
+01
+09
+02
+06
+35
+89
+35
+87
+08
+22
+25
+83
+05
+01
+09
+06
+a1
+01
+85
+01
+75
+01
+95
+08
+05
+07
+19
+e0
+29
+e7
+15
+00
+25
+01
+81
+02
+95
+01
+75
+08
+81
+03
+95
+05
+75
+01
+05
+08
+19
+01
+29
+05
+91
+02
+95
+01
+75
+03
+91
+03
+95
+06
+75
+08
+15
+00
+25
+ff
+05
+07
+19
+00
+29
+ff
+81
+00
+c0
+05
+0c
+09
+01
+a1
+01
+85
+02
+19
+00
+2a
+ff
+03
+15
+00
+26
+ff
+03
+95
+01
+75
+10
+81
+00
+c0
+05
+01
+09
+06
+a1
+01
+85
+07
+05
+07
+19
+e0
+29
+e7
+15
+00
+25
+01
+75
+01
+95
+08
+81
+00
+95
+a8
+75
+01
+15
+00
+25
+01
+05
+07
+19
+00
+29
+a8
+81
+02
+c0
+09
+02
+07
+35
+08
+35
+06
+09
+04
+09
+09
+01
+00
+09
+02
+0b
+09
+01
+00
+09
+02
+0c
+09
+0c
+80
+09
+02
+0d
+28
+00
+09
+02
+0e
+28
+01
+09
+02
+0f
+09
+03
+18
+09
+02
+10
+09
+00
+00
+03
+10
+02
+12
+00
+00
+01
+00
+01
+00
+01
+36
+00
+a1
+09
+00
+00
+0a
+00
+01
+00
+01
+09
+00
+01
+35
+03
+19
+12
+00
+09
+00
+04
+35
+0d
+35
+06
+19
+01
+00
+09
+00
+01
+35
+03
+19
+00
+01
+09
+00
+06
+35
+09
+09
+65
+6e
+09
+00
+6a
+09
+01
+00
+09
+00
+09
+35
+08
+35
+06
+19
+12
+00
+09
+01
+00
+09
+01
+00
+25
+2f
+42
+72
+6f
+61
+64
+63
+6f
+6d
+20
+42
+6c
+75
+65
+74
+6f
+6f
+74
+68
+20
+57
+69
+72
+65
+6c
+65
+73
+73
+20
+4b
+65
+79
+62
+6f
+61
+72
+64
+20
+50
+6e
+50
+20
+53
+65
+72
+76
+65
+72
+09
+01
+01
+25
+08
+4b
+65
+79
+62
+6f
+61
+72
+64
+09
+02
+00
+09
+01
+03
+09
+02
+01
+09
+04
+e8
+09
+02
+02
+09
+70
+21
+09
+02
+03
+09
+00
+01
+09
+02
+04
+28
+01
+09
+02
+05
+09
+00
+02
+00
+aa
+55
+01
+00
+92
+40
+0a
+aa
+55
+03
+00
+14
+42
+f7
+4a
+00
+aa
+55
+10
+00
+f0
+4f
+00
+1c
+ff
+1f
+00
+1c
+00
+1c
+80
+4c
+e0
+4f
+80
+4c
+80
+4c
+aa
+55
+02
+00
+68
+46
+30
+10
+aa
+55
+01
+00
+6c
+46
+03
+aa
+55
+01
+00
+6f
+46
+07
+aa
+55
+01
+00
+79
+46
+00
+aa
+55
+01
+00
+91
+40
+00
+aa
+55
+03
+00
+54
+41
+00
+01
+08
+aa
+55
+01
+00
+74
+41
+02
+aa
+55
+02
+00
+e4
+41
+0e
+00
+aa
+55
+07
+00
+76
+41
+0f
+84
+f0
+0a
+0b
+b2
+32
+aa
+55
+02
+00
+57
+41
+8b
+0b
+aa
+55
+08
+00
+a1
+00
+00
+00
+00
+00
+00
+00
+00
+00
+aa
+55
+02
+00
+bd
+40
+02
+24
+aa
+55
+08
+00
+ad
+40
+40
+00
+00
+02
+32
+00
+00
+02
+aa
+55
+02
+00
+bb
+40
+20
+00
+aa
+55
+04
+00
+b7
+40
+20
+00
+00
+20
+aa
+55
+04
+00
+bf
+40
+80
+04
+00
+10
+aa
+55
+05
+00
+e2
+44
+08
+0e
+05
+04
+00
+aa
+55
+02
+00
+02
+42
+30
+1f
+aa
+55
+01
+00
+10
+42
+20
+aa
+55
+01
+00
+e0
+41
+01
+aa
+55
+0f
+00
+a1
+4b
+4b
+ba
+55
+d0
+56
+e0
+57
+88
+58
+6c
+59
+10
+07
+ff
+ff
+aa
+55
+02
+00
+c3
+40
+a1
+4b
+86
+3e
Index: rongyuan/output/memmap.format
===================================================================
--- /YC3121_demo/ModuleDemo/BlueTooth/BT_code_patch/keyboard/branches/rongyuan/output/memmap.format	(nonexistent)
+++ /YC3121_demo/ModuleDemo/BlueTooth/BT_code_patch/keyboard/branches/rongyuan/output/memmap.format	(working copy)
@@ -0,0 +1,1009 @@
+0x0000 mem_le_adv_transmit
+0x0001 mem_le_adv_waitcnt
+0x0002 mem_le_adv_rcv
+0x0003 mem_le_req_rcv
+0x0004 mem_le_scanrsp_rcv
+0x0005 mem_le_conn_rcv
+0x0006 mem_inquiryscan_waitcnt
+0x0007 mem_inquiryscan_rcvcnt
+0x0008 mem_pagescan_waitcnt
+0x0009 mem_pagescan_rcvcnt
+0x000a mem_pagescan_rcvfhscnt
+0x000b mem_slave_rcvcnt
+0x000c mem_page_transmit
+0x000d mem_page_rcv
+0x000e mem_page_rcv_fhs
+0x000f mem_master_rcvcnt
+0x0010 mem_fhs_wait_counter
+0x0011 mem_newconnto_counter
+0x0012 mem_inquiry_transmit
+0x0013 mem_inquiry_rcv
+0x0014 mem_fw_ver
+0x0015 mem_current_context
+0x0016 mem_le_ch_mapped
+0x0017 mem_last_freq
+0x0018 mem_rssi
+0x0019 mem_rx_type
+0x001a mem_rx_hec_err
+0x001c mem_rx_crc_err
+0x001e mem_context_ptr
+0x0020 mem_display
+0x0028 mem_bcd
+0x0030 mem_state
+0x0031 mem_mode
+0x0032 mem_tsniff
+0x0034 mem_sniff_anchor
+0x0038 mem_clk_offset
+0x003e mem_rx_window
+0x0040 mem_plap
+0x0043 mem_puap
+0x0044 mem_pnap
+0x0046 mem_conn_handle
+0x0047 mem_arq
+0x0048 mem_lmp_to_send
+0x0049 mem_lmi_opcode
+0x004a mem_lmo_reason
+0x004b mem_op
+0x004c mem_state_map
+0x004d mem_supervision_timer
+0x0051 mem_supervision_to
+0x0053 mem_name_offset
+0x0054 mem_key_size
+0x0055 mem_conn_sm
+0x0056 mem_aco
+0x0062 mem_kc
+0x0072 mem_conn_timer
+0x0073 mem_sniff_attempt
+0x0074 mem_sniff_timeout
+0x0075 mem_dsniff
+0x0077 mem_amaddr
+0x0078 mem_lmo_opcode1
+0x0079 mem_lmi_opcode1
+0x007a mem_lmo_reason1
+0x007b mem_lmo_tid1
+0x007c mem_lmo_opcode2
+0x007d mem_lmi_opcode2
+0x007e mem_lmo_reason2
+0x007f mem_lmo_tid2
+0x0080 mem_hci_version
+0x0083 mem_acl_pktlen
+0x0085 mem_sco_pktlen
+0x0086 mem_acl_pktcnt
+0x0088 mem_sco_pktcnt
+0x008a mem_current_sniff_attempt
+0x008b mem_current_sniff_timeout
+0x008c mem_sniff_timeout_temp
+0x008d mem_nfreq_index_inq
+0x008e mem_nfreq_index_page
+0x008f mem_ninqy_index
+0x0090 mem_fhs_misc
+0x0091 mem_subsniff_instant
+0x0095 mem_subsniff_rate
+0x0096 mem_subsniff_tcmax
+0x0098 mem_subsniff_tsniff
+0x0099 mem_lpm_adjust
+0x009a mem_sync_clke
+0x00a0 mem_lpm_current_mult
+0x00a1 mem_gpio_wakeup
+0x00a7 mem_air_mode
+0x00a8 mem_sco_asso_handle
+0x00a9 mem_sco_handle
+0x00ab mem_esco_desco
+0x00ac mem_esco_type
+0x00ad mem_neogotiation_state
+0x00ae mem_saved_amaddr
+0x00af mem_esco_arq
+0x00b0 mem_esco_saved_arq
+0x00b1 mem_sco_obuf
+0x00cf mem_sco_ibuf
+0x00ed mem_sco_poll
+0x00ee mem_npage_index
+0x00ef mem_page_mode
+0x00f0 mem_page_clk
+0x00f4 mem_tst_pktcnt_sync
+0x00f6 mem_tst_pktcnt_hec
+0x00f8 mem_tst_pktcnt_crc
+0x00fa mem_tst_pktcnt_dmh
+0x00fc mem_tmp_buffer_head
+0x00ff mem_tmp_buffer
+0x014f mem_tester_emulate
+0x0150 mem_temp_payload
+0x0150 test_mode_scenario
+0x0151 test_mode_hopping_mode
+0x0152 test_mode_tx_freq
+0x0153 test_mode_rx_freq
+0x0154 test_mode_power_mode
+0x0155 test_mode_poll_period
+0x0156 test_mode_packet_type
+0x0157 test_mode_data_length
+0x0159 mem_test_mode_old_debug_config
+0x015a mem_tester_cnt
+0x015b mem_temp_am_addr
+0x015c mem_temp_arq
+0x015d mem_len
+0x015f mem_clkn_bt
+0x0163 mem_clke_bt
+0x0167 mem_dpll_clkn
+0x016b mem_connection_options
+0x016c mem_nameres_cnt
+0x016d mem_txptr
+0x016f mem_slot_offset
+0x0171 extm_fhs_misc
+0x0172 extm_newconn_am_addr
+0x0173 extm_class
+0x0176 extm_lap
+0x0179 extm_uap
+0x017a extm_nap
+0x017d mem_debug_config
+0x017e mem_lch_code
+0x017f mem_fhs_am_addr
+0x0180 mem_dpll_error
+0x0182 mem_select_list_item
+0x0183 mem_temp_reconn_record
+0x0183 mem_record_bt_mode
+0x0184 mem_temp_lap
+0x018a mem_list_item_ptr
+0x018c mem_eir
+0x01f0 mem_ucode_status
+0x01f1 mem_otp_ucode_flag
+0x01f3 mem_spid_tbuf/* spid buf: 03 addr[23:16] addr[15:8] addr[7:0] */
+0x01f4 mem_iicd_tbuf/* iicd buf: iic_adr addr[15:8] addr[7:0] iic_adr */
+0x01f4 mem_addr_hi
+0x01f5 mem_addr_mi
+0x01f6 mem_addr_lo
+0x01f7 mem_iicd_addr
+0x01f8 mem_spid_rbuf
+0x01fc mem_ucode_buf
+0x01fe mem_ucode_len
+0x0200 mem_sched_addr
+0x0202 mem_ucode_ptr
+0x0204 mem_ucode_keybuf
+0x0214 mem_check_plap_temp
+0x0226 mem_reconnect_flag
+0x0227 mem_switch_fail_master_count
+0x0228 mem_app_evt_timer_count
+0x0229 mem_h5rx_ackcnt
+0x022a mem_check_err_acl_cont
+0x022b mem_rp_packets
+0x022c mem_packet_type
+0x022e mem_hci_sniff_conn_handle
+0x0230 mem_hci_sniff_max_interval
+0x0232 mem_hci_sniff_min_interval
+0x0234 mem_hci_sniff_attempt
+0x0236 mem_hci_sniff_timeout
+0x0238 mem_voice_setting
+0x023a mem_retransmission_effort
+0x023b mem_sco_ptype
+0x023d mem_extm_uap_restore
+0x0240 mem_h5rx_rptr
+0x0242 mem_h5rx_ack
+0x0243 mem_h5tx_ack
+0x0244 mem_h5tx_rptr
+0x0246 mem_h5tx_wptr
+0x0248 mem_h5tx_free
+0x024a mem_h5rx_tmp
+0x024b mem_h5tx_seq
+0x024c mem_hci_acl_queue_wptr
+0x024e mem_hci_acl_queue_rptr
+0x0250 mem_hci_acl_queue_end
+0x0252 mem_hci_acl_queue_wcnt
+0x0253 mem_hci_acl_cnt
+0x0254 mem_hci_acl_tx_trigger_wptr//tx via uart
+0x0256 mem_hci_curr_len
+0x0257 mem_hci_curr_target
+0x0259 mem_l2cap_mem_start
+0x0259 mem_l2cap_rxbuff1_len
+0x025b mem_l2cap_rxbuff2_len
+0x025d mem_l2cap_rxbuff_new
+0x025f mem_l2cap_rxbuff_inuse
+0x0260 mem_l2cap_payload_ptr
+0x0262 mem_l2cap_rx_pkt_length
+0x0264 mem_l2cap_rx_cid
+0x0266 mem_l2cap_rx_done
+0x0267 mem_l2cap_signal_tx_buff_ptr
+0x0269 mem_l2cap_signal_tx_payload_ptr
+0x026b mem_l2cap_signal_tx_length
+0x026d mem_sdp_tx_buff_ptr
+0x026f mem_sdp_tx_payload_ptr
+0x0271 mem_sdp_tx_pkt_length
+0x0273 mem_rfcomm_tx_buff_ptr
+0x0275 mem_rfcomm_tx_payload_ptr
+0x0277 mem_rfcomm_tx_pkt_length
+0x0279 memL2CAP_T1
+0x027b mem_CONTROL_tasks
+0x027c mem_send_config_req
+0x027d mem_config_identifier
+0x027e mem_config_req_dest_CID
+0x0280 mem_rfcomm_malloc_fail_flag
+0x0281 mem_message_to_uppersm
+0x0282 mem_upper_sm_remote_page
+0x0283 mem_upper_sm_reconn
+0x0284 mem_upper_sm_ss
+0x0285 mem_tx_malloc_log
+0x02c5 mem_l2cap_mem_end
+0x02c5 mem_scid
+0x02c7 mem_cmd_length
+0x02c9 mem_tt2
+0x02cb mem_tt3
+0x02cd mem_id
+0x02cf mem_psm
+0x02d1 mem_l2cap_sdpres_delay_time
+0x02d5 mem_le_rxbuf
+0x030d mem_le_l2capbuf
+0x0413 mem_le_mic
+0x0417 mem_le_peer_mic
+0x041b mem_le_peer_ltk
+0x042b mem_le_mrand
+0x043b mem_le_state
+0x043c mem_le_mode
+0x043d mem_le_tsniff
+0x043f mem_le_anchor
+0x0443 mem_le_clk_offset
+0x0449 mem_le_receive_window
+0x044b mem_le_plap
+0x0451 mem_le_conn_handle
+0x0452 mem_le_arq
+0x0453 mem_le_ch
+0x0454 mem_le_hop
+0x0455 mem_le_event_count
+0x0457 mem_le_supervision_timer
+0x045b mem_le_instant
+0x045d mem_le_channels
+0x045e mem_le_op
+0x045f mem_le_access
+0x0463 mem_le_crcinit
+0x0466 mem_le_window_size
+0x0467 mem_le_slave_latency
+0x0469 mem_le_superto
+0x046b mem_le_channel_map
+0x0470 mem_le_no_using
+0x0472 mem_le_peer_sca
+0x0473 mem_le_att_opcode
+0x0474 mem_le_att_handle
+0x0476 mem_le_err_code
+0x0477 mem_le_ll_pairing_fail_reason
+0x0478 mem_le_sk
+0x0488 mem_le_testtype
+0x0489 mem_le_test_sync
+0x048b mem_le_test_pcnt
+0x048d mem_le_rxon_ts
+0x0493 mem_le_rx_ll_opcode
+0x0494 mem_le_notify_attr_start
+0x0496 mem_le_notify_len
+0x0497 mem_cmd_le_create_conn
+0x0498 mem_le_cur_attlist_start_ptr
+0x049a mem_le_cur_handle_start
+0x049c mem_le_cur_handle_end
+0x049e mem_le_cur_uuid_length
+0x049f mem_le_cur_uuid
+0x04af mem_le_curr_att_len
+0x04b0 mem_le_search_res
+0x04b1 mem_le_continue_type
+0x04b2 mem_lmo_header_length
+0x04b3 mem_lmo_header_opcode
+0x04b4 mem_lmo_payload
+0x04c5 mem_lmi_accepted_opcode
+0x04c6 mem_disconn_reason_send
+0x04c7 mem_tx_fixed_freq
+0x04c8 mem_rx_fixed_freq
+0x04c9 mem_ext_features_page
+0x04ca mem_lmpext_ssp_enable
+0x04cc mem_remote_sppcap
+0x04cd mem_lmp_conn_state
+0x04ce mem_soft_timer
+0x04d0 mem_pincode_state
+0x04d1 mem_sres_tid
+0x04d2 mem_accptsco_tid
+0x04d3 mem_auth_enable
+0x04d4 mem_wait_encryption
+0x04d5 mem_sniff_payload
+0x04e5 mem_aurand_send_delay_time
+0x04e9 memRemoteRPNBitRate
+0x04ea memRemotePRNDataBits
+0x04eb memRemotePRNStopBit
+0x04ec memRemotePRNParity
+0x04ed memRemotePRNFlowControl
+0x04ee memRemotePRNXon
+0x04ef memRemotePRNXoff
+0x04f0 mem_mod2div_temp
+0x04f3 mem_contw_temp
+0x04f5 mem_attrib_list
+0x04f7 mem_current_adss
+0x04f8 mem_current_channel
+0x04f9 mem_current_frame_type
+0x04fa mem_current_fcs
+0x04fb mem_current_length
+0x04fd mem_rfcomm_uih_payload_ptr
+0x04ff mem_uih_cmd_type
+0x0500 mem_uih_length
+0x0502 mem_param_payload_ptr
+0x0504 mem_ms_param
+0x0505 mem_pn_credit_flow_type_info
+0x0506 mem_pn_priority
+0x0507 mem_pn_acknowledg_timer
+0x0508 mem_pn_max_retrans
+0x0509 mem_rfcomm_send_adss
+0x050a mem_rfcomm_send_frame_type
+0x050b mem_rfcomm_send_fcs
+0x050c mem_rfcomm_send_offset
+0x050d mem_sdp_mem_start
+0x050d mem_sdp_uuid_search_ptr
+0x0515 mem_sdp_continue_byte
+0x0517 mem_sdp_pduid
+0x0518 mem_sdp_transactionid
+0x051a mem_sdp_transactionid_local
+0x051c mem_sdp_attribute_maxbyte
+0x051e mem_sdp_record_maxcnt
+0x0520 mem_sdp_record_handle
+0x0524 mem_sdp_LACAP_found
+0x0525 mem_sdp_RFCOMM_found
+0x0526 mem_sdp_handle_list
+0x0526 mem_sdp_attrib_list
+0x0546 mem_sdp_error_code
+0x0548 mem_sdp_all_length
+0x054a mem_handle_humber
+0x054b mem_search_uuid
+0x054d mem_sdp_mem_end
+0x054d mem_rxbuf
+0x055e mem_random_number
+0x056e mem_round_key
+0x057e mem_kinit
+0x058e mem_input_store
+0x059e mem_x
+0x05ae mem_y
+0x05bd mem_y15
+0x05be mem_key_store
+0x05cf mem_key_store_end
+0x05d0 memp_ar_key
+0x05d2 memp_ar_input
+0x05d4 mem_ar_hround
+0x05de mem_ec_infinite
+0x05df mem_ec_loopc
+0x05e1 mem_aes_cmac_data_length
+0x05e2 memdat
+0x05e2 mem_ax
+0x05fa mem_ay
+0x0612 mem_az
+0x062a mem_bx
+0x0642 mem_ax_256//32 bytes
+0x0642 mem_by
+0x065a mem_bz
+0x0662 mem_ay_256// 32 bytes
+0x0672 mem_cx
+0x0682 mem_az_256// 32 bytes
+0x068a mem_cy
+0x06a1 mem_cy5
+0x06a2 mem_bx_256// 32 bytes
+0x06a2 mem_cz
+0x06ba mem_k
+0x06c2 mem_by_256// 31 bytes
+0x06d2 mem_align
+0x06e2 mem_bz_256//32 bytes
+0x06e2 mem_tmp1
+0x06e2 memahbak
+0x06fa mem_tmp5
+0x0702 mem_cx_256//32 bytes
+0x0702 memahsave
+0x0712 mem_tmp2
+0x0722 mem_cy_256// 32 bytes
+0x0722 memahsave_end
+0x0722 mem_addr_padding
+0x0723 mem_addr_value/* 12 bytes     */ 
+0x072a mem_tmp3
+0x072a mem_t1
+0x072f mem_addr_value_end
+0x0732 mem_addr_iocap_end
+0x0741 mem_cy5_256// 1 byte
+0x0742 mem_cz_256// 32 bytes
+0x0742 mem_tmp0
+0x0742 mem_t0
+0x074a mem_tmp0a
+0x075a mem_t2
+0x0762 mem_k_256//32 bytes
+0x0772 mem_t3
+0x0782 mem_tmp1_256//32 bytes
+0x078a mem_t7
+0x07a2 mem_tmp5_256
+0x07c2 mem_tmp2_256
+0x07e2 mem_tmp3_256
+0x07e2 mem_t1_256
+0x0802 mem_tmp0_256
+0x0802 mem_t0_256
+0x0822 mem_t2_256
+0x0842 mem_t3_256
+0x0862 mem_t7_256
+0x0882 mem_p
+0x089a mem_a
+0x08b2 mem_b
+0x08ca mem_gx
+0x08e2 mem_gy
+0x08fa memh0
+0x091a mem_p_256
+0x093a mem_a_256
+0x095a mem_gx_256
+0x097a mem_gy_256
+0x099a mem_le_slat
+0x09aa mem_sp_state_start
+0x09aa mem_sp_state
+0x09ab mem_master_sp_state
+0x09ac mem_sp_flag
+0x09ad mem_master_sp_flag
+0x09ae mem_sp_calc
+0x09af mem_sp_dh_ready
+0x09b0 mem_sp_localsm
+0x09b1 mem_pairing_auth
+0x09b2 mem_sp_flag_start
+0x09b2 mem_sp_local_key_send_count
+0x09b3 mem_sp_remote_key_recv_count
+0x09b4 mem_sp_remote_key_invalid
+0x09b5 mem_sp_dhkey_invalid
+0x09b6 mem_gkey
+0x09ba mem_le_pubkey_remote_x_256
+0x09c2 mem_sp_pubkey_remote
+0x09c2 mem_sp_pubkey_remote_x
+0x09da mem_sp_pubkey_remote_x_end
+0x09da mem_le_pubkey_remote_y_256
+0x09e2 mem_sp_pubkey_remote_y
+0x09fa mem_le_dhkey_256
+0x0a02 mem_sp_dhkey
+0x0a1a mem_sp_dhkey_end
+0x0a1a mem_sp_random_local
+0x0a2a mem_sp_random_local_end
+0x0a2a mem_sp_random_remote
+0x0a3a mem_sp_random_remote_end
+0x0a3a memresult
+0x0a3a mem_sp_calc_result
+0x0a3a memh
+0x0a3e memg
+0x0a42 memf
+0x0a46 meme
+0x0a4a mem_sp_calc_result_high
+0x0a4a memd
+0x0a4e memc
+0x0a52 memb
+0x0a56 mema
+0x0a5a mem_sp_check_result
+0x0a6a mem_sp_confirm_remote
+0x0a7a mem_sp_prarm_stack
+0x0a8a mem_UI_data_txbuff_length
+0x0a8c mem_ipc_skip_continue_proc
+0x0a8d mem_ui_timer_temp//length 4
+0x0a8d mem_ipc_rega_temp
+0x0a91 mem_hold_contr
+0x0a93 mem_hold_contw
+0x0a95 mem_fifo_temp
+0x0a96 mem_pdatatemp
+0x0a9e mem_temp//8 bytes
+0x0aa6 mem_timeup// 4 bytes
+0x0aaa mem_rega//4 bytes
+0x0aae mem_regb//4 bytes
+0x0ab2 mem_regc//3 bytes
+0x0ab5 mem_contr//2 bytes
+0x0ab7 mem_contw//2 bytes
+0x0ab9 mem_wakup_from_power_flag
+0x0aba mem_saved_gpio_in
+0x0abe mem_shutter_random_mac_data_temp
+0x0abe mem_shutter_config_data_temp
+0x0abe mem_le_adv_channel_map_temp
+0x0abe mem_le_data_len_temp//1byte
+0x0abe mem_tx_fifo_map_temp
+0x0abe mem_rpn_dlci//1byte
+0x0abe mem_event_cmd_response_content//2byte
+0x0abe mem_le_prand//16byte
+0x0abe mem_AES_CMAC_k//16 bytes
+0x0abe mem_regext_index//1 bytes
+0x0abe mem_temp_block0
+0x0abf mem_le_data_temp//15bytes
+0x0abf mem_temp_block1
+0x0ace mem_le_aes_128//16byte
+0x0ace mem_regext//64 bytes
+0x0ace mem_AES_CMAC_k1//16 bytes
+0x0ace mem_temp_block2
+0x0ade mem_AES_CMAC_k2//16 bytes
+0x0ade mem_temp_block3
+0x0aee mem_AES_CMAC_temp// 16 bytes
+0x0aee mem_temp_block4
+0x0afe mem_AES_CMAC_M_last// 16 bytes
+0x0afe mem_module_uart_cmd
+0x0aff mem_module_uart_opcode
+0x0b00 mem_module_uart_len
+0x0b01 mem_module_temp_nl_discard_packet
+0x0b02 mem_temp_block5
+0x0b0e mem_le_mackey//16 bytes
+0x0b0e mem_app_receive_temp
+0x0b0e mem_key_value_temp
+0x0b10 mem_key_value
+0x0b12 mem_key_value_temp1
+0x0b13 mem_key_value_temp2
+0x0b14 mem_key_value_temp3
+0x0b15 mem_key_value_temp4
+0x0b16 mem_key_value_temp5
+0x0b17 mem_key_value_temp6
+0x0b18 mem_temp_block6
+0x4000 mem_patch00
+0x4001 mem_patch01
+0x4002 mem_patch02
+0x4003 mem_patch03
+0x4004 mem_patch04
+0x4005 mem_patch05
+0x4006 mem_patch06
+0x4007 mem_patch07
+0x4008 mem_patch08
+0x4009 mem_patch09
+0x400a mem_patch0a
+0x400b mem_patch0b
+0x400c mem_patch0c
+0x400d mem_patch0d
+0x400e mem_patch0e
+0x400f mem_patch0f
+0x4010 mem_patch10
+0x4011 mem_patch11
+0x4012 mem_patch12
+0x4013 mem_patch13
+0x4014 mem_patch14
+0x4015 mem_patch15
+0x4016 mem_patch16
+0x4017 mem_patch17
+0x4018 mem_patch18
+0x4019 mem_patch19
+0x401a mem_patch1a
+0x401b mem_patch1b
+0x401c mem_patch1c
+0x401d mem_patch1d
+0x401e mem_patch1e
+0x401f mem_patch1f
+0x4020 mem_patch20
+0x4021 mem_patch21
+0x4022 mem_patch22
+0x4023 mem_patch23
+0x4024 mem_patch24
+0x4025 mem_patch25
+0x4026 mem_patch26
+0x4027 mem_patch27
+0x4028 mem_patch28
+0x4029 mem_patch29
+0x402a mem_patch2a
+0x402b mem_patch2b
+0x402c mem_patch2c
+0x402d mem_patch2d
+0x402e mem_patch2e
+0x402f mem_patch2f
+0x4030 mem_patch30
+0x4031 mem_patch31
+0x4032 mem_patch32
+0x4033 mem_patch33
+0x4034 mem_patch34
+0x4035 mem_patch35
+0x4036 mem_patch36
+0x4037 mem_patch37
+0x4038 mem_patch38
+0x4039 mem_patch39
+0x403a mem_patch3a
+0x403b mem_patch3b
+0x403c mem_patch3c
+0x403d mem_patch3d
+0x403e mem_patch3e
+0x403f mem_patch3f
+0x4040 mem_context
+0x4090 mem_current_amaddr
+0x4091 mem_lpm_mode
+0x4092 mem_device_option
+0x4093 mem_scan_mode
+0x4094 mem_last_clkn
+0x4098 mem_features
+0x40a0 mem_lap
+0x40a3 mem_uap
+0x40a4 mem_nap
+0x40a6 mem_npage
+0x40a7 mem_glap
+0x40aa mem_class
+0x40ad mem_iscan_window
+0x40af mem_iscan_interval
+0x40b1 mem_pscan_window
+0x40b3 mem_pscan_interval
+0x40b5 mem_page_interval
+0x40b7 mem_page_window
+0x40b9 mem_page_to
+0x40bb mem_inq_window
+0x40bd mem_fcomp_mul
+0x40be mem_fcomp_div
+0x40bf mem_rx_window_init
+0x40c1 mem_rx_window_sniff
+0x40c3 mem_rf_init_ptr
+0x40c5 mem_last_type
+0x40c6 mem_last_type_esco
+0x40c7 mem_last_type_saved
+0x40c8 mem_retransmission_cnt
+0x40ca mem_next_btclk
+0x40ce mem_rf_rccal
+0x40cf mem_handle_num
+0x40d0 mem_max_slot
+0x40d1 mem_eir_enable
+0x40d2 mem_afh_instant
+0x40d6 mem_afh_error_total
+0x40d8 mem_afh_cfg
+0x40d9 mem_afh_new_mod
+0x40da mem_afh_map_lo
+0x40df mem_afh_map_hi
+0x40e4 mem_afh_used
+0x40e5 mem_afh_index
+0x40e7 mem_afh_map_new
+0x40f2 mem_afh_map
+0x4142 mem_afh_timer
+0x4146 mem_afh_classify_channel_map
+0x4150 mem_chip_functions
+0x4152 mem_lpm_wake_lock
+0x4154 mem_lpm_interval
+0x4156 mem_lpm_overhead
+0x4157 mem_lpm_hibernate_switch
+0x4158 mem_lpm_doze_switch
+0x4159 mem_esco_addr
+0x415a mem_sniff_unint_lost
+0x415b mem_ptt
+0x415c mem_sleep_counter//should be 0x41fc in REVC
+0x4160 mem_sleep_counter_all
+0x4164 mem_sleep_clkn
+0x416a mem_sniff_rcv
+0x416d mem_sniff_lost
+0x4170 mem_clks_per_lpo
+0x4173 mem_lpm_mult
+0x4174 mem_lpm_mult_timeout
+0x4175 mem_lpm_mult_cnt
+0x4176 mem_lpm_config
+0x4179 mem_lpm_xtalcnt
+0x417a mem_lpm_buckcnt
+0x417b mem_lpm_ldocnt
+0x417c mem_lpm_isogate
+0x417d mem_lpm_isogate_final
+0x417e mem_saved_gpio// should be 0x421e in REVC
+0x418e mem_saved_gsel
+0x4191 mem_saved_mark
+0x4199 mem_saved_spidctrl
+0x419a mem_patch_ptr
+0x419c mem_patch_len
+0x419e mem_timers
+0x41be mem_link_key_exists
+0x41bf mem_link_key
+0x41cf mem_hci_cmd
+0x41d0 mem_hci_conn_handle
+0x41d1 mem_hci_plap
+0x41d4 mem_hci_puap
+0x41d5 mem_hci_pnap
+0x41d7 mem_uartd_rxitems_got_data
+0x41d8 mem_uartd_rxitems_threshold
+0x41d9 mem_uartd_rx_timeout
+0x41db mem_loadcode_times
+0x41dc mem_tx_lch
+0x41dd mem_tx_len
+0x41df mem_tx_power
+0x41e0 mem_context_number
+0x41e1 mem_250k_freq_enable
+0x41e2 mem_rf_init_data
+0x41e3 mem_app_handshake_flag
+0x41e4 mem_sniff_param_interval
+0x41e6 mem_sniff_param_attempt
+0x41e8 mem_sniff_param_timeout
+0x41ea mem_cb_check_wakelock
+0x41ec mem_cb_before_hibernate
+0x41ee mem_cb_before_lpm
+0x41f0 mem_cb_le_process
+0x41f2 mem_cb_bt_process
+0x41f4 mem_cb_idle_process
+0x41f6 mem_cb_bb_event_process
+0x41f8 mem_cb_discovry_timeout
+0x41fa mem_cb_att_write
+0x41fc mem_cb_ble_transmit
+0x41fe mem_cb_event_timer
+0x4200 mem_cb_bt_set_mult
+0x4202 mem_eeprom_base
+0x4204 mem_unsniff2sniff_timer_count
+0x4205 mem_wake_up_delay_timer
+0x4206 mem_app_connection_options
+0x4207 mem_app_disconn_reason
+0x4209 mem_app_disconn_reason_flag
+0x420b mem_lpm_delay_after_sniff
+0x420f mem_xrecord_mode
+0x4210 mem_eeprom_block_size
+0x4211 mem_spi_init_clk
+0x4212 mem_spi_init_delay_time
+0x4213 mem_spi_ncs_gpio
+0x4214 mem_nv_data_ptr
+0x4216 mem_nv_data_number
+0x4217 mem_hci_lt_rx_state
+0x4218 mem_l2cap_xmem_start
+0x4218 mem_l2cap_tx_multi_offset//0 means single packet
+0x421a mem_sdp_remote_cid
+0x421c mem_rfcomm_remote_cid
+0x421e mem_hid_ctrl_remote_cid
+0x4220 mem_hid_int_remote_cid
+0x4222 mem_sdp_state
+0x4223 mem_rfcomm_state
+0x4224 mem_hid_control_state
+0x4225 mem_hid_interrupt_state
+0x4226 mem_spp_state
+0x4227 mem_ML2CAP_comm_id
+0x4228 mem_used_map
+0x4229 mem_tx_fifo0
+0x4229 mem_tx_fifo0_map
+0x422a mem_tx_fifo0_ptr
+0x422c mem_tx_fifo1
+0x422c mem_tx_fifo1_map
+0x422d mem_tx_fifo1_ptr
+0x422f mem_tx_fifo2
+0x422f mem_tx_fifo2_map
+0x4230 mem_tx_fifo2_ptr
+0x4232 mem_tx_fifo3
+0x4232 mem_tx_fifo3_map
+0x4233 mem_tx_fifo3_ptr
+0x4235 mem_tx_fifo_end
+0x4235 mem_l2cap_lpm_txbuf
+0x4335 mem_l2cap_flow_ctrl_flag
+0x4336 mem_l2cap_pending_item
+0x4337 mem_l2cap_xmem_end
+0x4337 mem_le_dsniff
+0x4339 mem_le_conn_interval
+0x433b mem_le_scan_enable
+0x433c mem_le_scan_interval
+0x433e mem_le_scan_window
+0x4340 mem_le_adv_enable
+0x4341 mem_le_adv_data_len
+0x4342 mem_le_adv_data
+0x4361 mem_le_scan_data_len
+0x4362 mem_le_scan_data
+0x4381 mem_le_name_len
+0x4382 mem_le_name
+0x43a0 mem_le_new_map
+0x43a5 mem_le_new_param
+0x43a5 mem_le_new_transmitwindowsize
+0x43a6 mem_le_new_transmitwindowoffset
+0x43a8 mem_le_new_conninterval
+0x43aa mem_le_new_connslavelatency
+0x43ac mem_le_new_connsupervisiontimeout
+0x43ae mem_le_txheader
+0x43af mem_le_txlen
+0x43b0 mem_le_txpayload
+0x43b2 mem_le_txcid
+0x43b4 mem_le_l2cap
+0x43b5 mem_le_l2cap_response
+0x43b6 mem_le_txbdy
+0x43d5 mem_le_pcnt_tx
+0x43da mem_le_pcnt_rx
+0x43df mem_le_last_mic
+0x43e3 mem_le_ivm
+0x43e7 mem_le_ivs
+0x43eb mem_le_ltk
+0x43fb mem_ltk_exists
+0x43fc mem_le_rconfirm
+0x440c mem_le_srand
+0x441c mem_le_iat
+0x441d mem_le_rat
+0x441e mem_le_preq
+0x441f mem_le_preq_iocap
+0x4420 mem_le_preq_oob
+0x4421 mem_le_preq_auth
+0x4422 mem_le_preq_max_keysize
+0x4423 mem_le_preq_init_key_distribution
+0x4424 mem_le_preq_resp_key_distribution
+0x4425 mem_le_pres
+0x4426 mem_le_pres_iocap
+0x4427 mem_le_pres_oob
+0x4428 mem_le_pres_auth
+0x4429 mem_le_pres_max_keysize
+0x442a mem_le_pres_init_key_distribution
+0x442b mem_le_pres_resp_key_distribution
+0x442c mem_le_search_handle_start
+0x442e mem_le_search_handle_end
+0x4430 mem_le_att_offset
+0x4430 mem_le_search_att_type_length
+0x4431 mem_le_search_att_type
+0x4441 mem_le_notify_handle
+0x4443 mem_le_search_uuid_length
+0x4444 mem_le_search_uuid
+0x4454 mem_le_adv_param
+0x4454 mem_le_adv_interval
+0x4456 mem_le_adv_type
+0x4457 mem_le_adv_own_addr_type
+0x4458 mem_le_adv_direct_addr_type
+0x4459 mem_le_adv_direct_addr
+0x445f mem_le_adv_channel_map
+0x4460 mem_le_conn_param
+0x4460 mem_le_conn_peer_addr_type
+0x4461 mem_le_conn_peer_addr
+0x4467 mem_le_conn_own_addr_type
+0x4468 mem_le_interval_min
+0x446a mem_le_interval_max
+0x446c mem_le_latency
+0x446e mem_le_timeout
+0x4470 mem_le_scan_params
+0x4470 mem_le_scan_type
+0x4471 mem_le_scan_own_addr_type
+0x4472 mem_le_lap
+0x4475 mem_le_uap
+0x4476 mem_le_nap
+0x4478 mem_le_local_mtu
+0x447a mem_le_remote_mtu
+0x447c mem_le_skdm
+0x4484 mem_le_skds
+0x448c mem_le_init_superto
+0x448e mem_ui_le_uuid_table
+0x4490 mem_le_secure_connect_enable
+0x4491 mem_le_secure_connect_flag
+0x4492 mem_le_sc_calc
+0x4493 mem_le_secure_connect_state
+0x4494 mem_le_sc_confirm_gkey_flag
+0x4495 mem_le_sc_local_key_invalid
+0x4496 mem_le_pairing_state
+0x4497 mem_le_enc_state
+0x4498 mem_le_pairing_mode
+0x4499 mem_le_tk
+0x449d mem_le_ediv
+0x449f mem_le_rand
+0x44a7 mem_le_irk
+0x44b7 mem_le_transmit_window
+0x44bb mem_le_configuration
+0x44bc mem_le_fixed_ltk
+0x44cc mem_le_pairing_handle
+0x44ce mem_le_l2cap_size
+0x44d0 mem_le_packet_len_recved
+0x44d1 mem_le_tx_buff_used
+0x44d2 mem_le_tx_ptr0
+0x44d4 mem_le_tx_ptr1
+0x44d6 mem_le_tx_ptr2
+0x44d8 mem_le_tx_ptr3
+0x44da mem_le_signaling_identifier
+0x44db mem_le_l2cap_signaling_conn_param_update_rsp_result
+0x44dd mem_le_packet_size
+0x44de mem_le_packet_llid
+0x44df mem_le_payload_ptr
+0x44e1 mem_le_md_count
+0x44e2 mem_lmp_version
+0x44e5 mem_lmp_subversion
+0x44e7 mem_local_name_length
+0x44e8 mem_local_name
+0x44eb mem_local_name2
+0x452b mem_local_name_end
+0x452c mem_unsniff2sniff_timer
+0x452d mem_switch_flag
+0x452e mem_classic_bt_flag
+0x452f mem_pn_dlci
+0x4530 mem_pn_max_frame_size
+0x4532 memFCStemp1
+0x4533 memFCStemp2
+0x4534 memFCStemp3
+0x4535 mem_rfcomm_initiator
+0x4536 mem_remote_spp_channel
+0x4537 mem_HIUfcs_SPP
+0x4538 mem_HIUfcs_SPP_WCredits
+0x4539 mem_rfcomm_send_more_pkt
+0x453a mem_remote_credits
+0x453b mem_credit_given
+0x453c mem_ms_channel
+0x453d mem_credit_flag
+0x453e mem_rfcomm_max_frame_size
+0x4540 mem_rfcomm_credit_init_data
+0x4541 mem_cb_receive_spp_data
+0x4543 mem_nl_rx_data_src
+0x4545 mem_nl_rx_len_all
+0x4547 mem_ui_uuid_table
+0x4549 mem_all_uuid_16bits
+0x455f mem_all_uuid_128bits
+0x4581 mem_sdp_l2capch_ptr
+0x4583 mem_sp_local_key_invalid
+0x4584 mem_le_private_key_256
+0x45a4 mem_le_pubkey_local_x_256
+0x45c4 mem_le_pubkey_local_y_256
+0x45e4 mem_sp_private_key
+0x45fc mem_sp_pubkey_local
+0x45fc mem_sp_pubkey_local_x
+0x4614 mem_sp_pubkey_local_x_end
+0x4614 mem_sp_pubkey_local_y
+0x462c mem_ssp_enable
+0x462d mem_sp_iocap_local
+0x4630 mem_sp_iocap_remote
+0x4633 mem_flag_mode_ssp_pin
+0x4634 mem_ssp_mode_flag
+0x4635 mem_authentication_passkey_times
+0x4636 mem_passkey_1bit
+0x4637 mem_flag_pairing_state
+0x4638 mem_ipc_lock_bt
+0x4639 mem_ipc_lock_c51
+0x463a mem_ipc_fifo_bt2c51
+0x4642 mem_ipc_fifo_c512bt
+0x464a mem_ui_timer_last_btclk
+0x464e mem_discovery_timeout_timer_count
+0x4650 mem_hid_handshake_timer_count
+0x4651 memui_reconnect_mode
+0x4652 mem_ui_state_map
+0x4654 mem_ui_profile_supported
+0x4655 mem_discovery_timeout
+0x4657 mem_pin_length
+0x4658 mem_pin
+0x4668 mem_soft_version_num
+0x466a mem_current_packet_length
+0x466c mem_module_state
+0x466d mem_module_spp_lpm_mult
+0x466e mem_module_le_lpm_mult
+0x466f mem_module_bluetooth_stauts_by_command
+0x4670 mem_module_le_rx_data_len
+0x4671 mem_module_le_rx_data_address
+0x4673 mem_module_le_rx_data_handle
+0x4675 mem_module_data_write_handle
+0x4677 mem_module_data_write_handle2
+0x4679 mem_module_flag
+0x467a mem_module_hci_notify_len
+0x467b mem_module_hci_notify_handle
+0x467d mem_module_hci_nofiy_addr
+0x467f mem_last_transmite_clock
+0x4683 mem_module_uuid_list
+0x48df mem_module_uuid_list_end
+0x48df mem_module_le_att_list
+0x4af7 mem_module_le_att_list_end
+0x4af7 mem_module_nv_data
+0x4af7 mem_module_nv_data0
+0x4b19 mem_module_nv_data1
+0x4b3b mem_module_nv_data2
+0x4b5d mem_module_nv_data3
+0x4b7f mem_module_nv_data4
+0x4ba1 mem_rf_init
+0x4bb0 mem_classic_shutter_cable_unplug_conut
+0x4bb1 mem_classic_shutter_hid_disconn_count
+0x4bb2 mem_suspend_flag
+0x4bb3 mem_24g_enter_hibernate
+0x4bbb mem_24g_txfail_cnt
+0x4bbc mem_mouse_retry_flag
+0x4bbd mem_24g_led_flag
+0x4bbe mem_24g_txbuf_new
+0x4bde mem_24g_enter_hibernate_setup
+0x4be2 mem_24g_enter_hibernate_max
+0x4be6 mem_24g_rxdata_length
+0x4be7 mem_24g_pid
+0x4be8 mem_24g_datalen
+0x4be9 mem_24g_data_type
+0x4bea mem_24g_txlen
+0x4beb mem_24g_rx_window
+0x4bed mem_24g_ensure
+0x4bee mem_24g_get_ack_fail
+0x4bef mem_24g_retry
+0x4bf0 mem_24g_ch
+0x4bf1 mem_24g_current_ch_number
+0x4bf2 mem_24g_addr
+0x4bf6 mem_24g_check_dongle_times
+0x4bf8 mem_24g_device_addr
+0x4bfc mem_24g_no_ack
+0x4bfd mem_24g_sta_crc
+0x4c00 mem_24g_sta_pid
+0x4c01 mem_24g_max_retry
+0x4c02 mem_24g_mode
+0x4c03 mem_24g_hop_pac_retry
+0x4c04 mem_24g_idle_timeout
+0x4c05 mem_24g_idle_cnt
+0x4c06 mem_24g_auto_paring_switch
+0x4c07 mem_24g_enter_lpm_timer
+0x4c08 mem_24g_syncword
+0x4c0a mem_24g_syncword_crc8
+0x4c0b mem_24g_get_syncword_crc8
+0x4c0c mem_24g_discard_cnt
+0x4c0e mem_cb_24g_data
+0x4c10 mem_24g_lasttx
+0x4c19 mem_power_ctrl_pac_succ_cnt
+0x4c1a mem_power_ctrl_level
+0x4c1b mem_rssi_avg_received
+0x4c1c mem_rssi_hex_received
+0x4c1d mem_rssi_signal_buf
+0x4c25 mem_rssi_noise_buf
+0x4c2d mem_rssi_noise_index
+0x4c2e mem_rssi_signal_index
+0x4c2f mem_24g_ackbuffer
+0x4c51 mem_24g_pll_flag
+0x4c52 mem_read_otp_data
+0x4c6e mem_24g_retransmit_cnt
+0x4c6f mem_en_24g_flag
+0x0b1e mem_24g_rxbuf
+0x0b40 mem_24g_txbuf
+0x0b60 mem_24g_txpayload
+0x0b82 mem_24g_rxpayload
+0x0ba2 mem_rssi_noise_buffer
+0x0ca2 mem_rssi_noise_dg_buffer
+0x0da2 mem_rssi_noise_ms_buffer
+0x0ea2 mem_rssi_noise_kb_buffer
+0x0fa2 mem_24g_common_temp
Index: rongyuan/output/otp.dat
===================================================================
--- /YC3121_demo/ModuleDemo/BlueTooth/BT_code_patch/keyboard/branches/rongyuan/output/otp.dat	(nonexistent)
+++ /YC3121_demo/ModuleDemo/BlueTooth/BT_code_patch/keyboard/branches/rongyuan/output/otp.dat	(working copy)
@@ -0,0 +1,8 @@
+00
+02
+aa
+55
+00
+00
+b3
+23
Index: rongyuan/output/sched.rom
===================================================================
--- /YC3121_demo/ModuleDemo/BlueTooth/BT_code_patch/keyboard/branches/rongyuan/output/sched.rom	(nonexistent)
+++ /YC3121_demo/ModuleDemo/BlueTooth/BT_code_patch/keyboard/branches/rongyuan/output/sched.rom	(working copy)
@@ -0,0 +1,587 @@
+mem_patch00:
+0a	#mem_patch00
+00	#mem_patch01
+00	#mem_patch02
+00	#mem_patch03
+00	#mem_patch04
+00	#mem_patch05
+00	#mem_patch06
+00	#mem_patch07
+00	#mem_patch08
+00	#mem_patch09
+00	#mem_patch0a
+00	#mem_patch0b
+00	#mem_patch0c
+00	#mem_patch0d
+00	#mem_patch0e
+00	#mem_patch0f
+20	#mem_patch10
+02	#mem_patch11
+10	#mem_patch12
+00	#mem_patch13
+0c	#mem_patch14
+12	#mem_patch15
+00	#mem_patch16
+59	#mem_patch17
+00	#mem_patch18
+00	#mem_patch19
+00	#mem_patch1a
+00	#mem_patch1b
+00	#mem_patch1c
+00	#mem_patch1d
+00	#mem_patch1e
+00	#mem_patch1f
+68	#mem_patch20
+00	#mem_patch21
+08	#mem_patch22
+80	#mem_patch23
+02	#mem_patch24
+00	#mem_patch25
+01	#mem_patch26
+74	#mem_patch27
+02	#mem_patch28
+00	#mem_patch29
+00	#mem_patch2a
+00	#mem_patch2b
+00	#mem_patch2c
+00	#mem_patch2d
+00	#mem_patch2e
+00	#mem_patch2f
+00	#mem_patch30
+00	#mem_patch31
+00	#mem_patch32
+02	#mem_patch33
+04	#mem_patch34
+00	#mem_patch35
+00	#mem_patch36
+00	#mem_patch37
+00	#mem_patch38
+00	#mem_patch39
+00	#mem_patch3a
+00	#mem_patch3b
+00	#mem_patch3c
+00	#mem_patch3d
+00	#mem_patch3e
+00	#mem_patch3f
+mem_24g_mode:01#tx
+mem_24g_data_type:02        #mouse 1,kb 2
+mem_24g_max_retry:4#max tx retry
+mem_24g_no_ack:00#with ack
+mem_24g_rx_window:c0 12     #400us 
+
+
+mem_24g_common_temp:00 00 00 00 00 00 00 00 00 00
+mem_24g_enter_hibernate:00 48 5d 00 00 00 00 00#10 min
+mem_24g_enter_hibernate_max:ff ff ff ff
+
+
+
+
+mem_module_le_lpm_mult:05
+
+
+mem_le_pres:02 03 00 05 10 02 03
+
+mem_le_interval_min:
+08 00 #min interval
+10 00 #max interval
+00 00 #latency
+2c 01 #timeout
+
+
+
+
+mem_le_pairing_handle:31 00
+
+
+
+mem_le_local_mtu:17
+mem_le_remote_mtu:17
+
+mem_le_secure_connect_enable:00
+mem_le_adv_channel_map:07
+mem_le_pairing_mode:00
+
+mem_le_adv_enable:00
+mem_le_adv_interval:40 00
+
+mem_le_lap:21 22 01 33 02 3a
+mem_le_name_len:
+'BT4.2 Keyboard
+
+mem_le_adv_data_len:03
+mem_le_adv_data:
+02 01 05
+03 19 c1 03
+03 03 12 18
+'\09BT4.2 Keyboard
+
+mem_le_scan_data_len:1f
+mem_le_scan_data:
+'\09BT4.2 Keyboard
+
+
+mem_ui_le_uuid_table:mem_module_le_att_list
+
+#attribute list: handle 2bytes, uuid 2bytes, length 1bytes, attribute Nbytes
+mem_module_le_att_list:
+00 00
+#Primary service: GATT
+#01 00 02 00 28 02 01 18
+#Characteristic: Service changed
+#02 00 02 03 28 01 20
+#03 00 02 05 2a 01 00
+#Client Characteristic Configuration
+#04 00 02 02 29 02 00 00
+
+#Primary Service: GAP
+#05 00 02 00 28 02 00 18 
+#Characteristic: Device Name
+#06 00 02 03 28 01 02 
+#07 00 02 00 2a 
+#1d 42 54 34 2e 32 20 4b 65 79 62 6f 61 72 64 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20#'BT4.2 Keyboard
+
+#Characteristic: Appearance
+#08 00 02 03 28 01 02 
+#09 00 02 01 2a 02 c1 03 
+#Characteristic: Peripheral Preferred Connection Parameters
+#0a 00 02 03 28 01 02
+#0b 00 02 04 2a 08 06 00 06 00 64 00 2c 01 # interval 6ms, latency 100, timeout 300
+
+#Primary Service: Device Information
+#0c 00 02 00 28 02 0a 18
+#Manufacturer Name
+#0d 00 02 03 28 01 02
+#0e 00 02 29 2a 06 59 69 43 68 69 70			#IOS 13.5.1
+#Characteristic: pnp id
+#0f 00 02 03 28 01 02
+#10 00 02 50 2a 07 02 e8 04 21 70 01 00		# SAMSUNG soft keyboard,setup shortcuts
+
+#Primary service: HID
+#11 00 02 00 28 02 12 18
+#Characteristic:Protocol mode
+#12 00 02 03 28 01 06
+#13 00 02 4e 2a 01 01
+#Characteristic: hid report
+#14 00 02 03 28 01 12   
+#15 00 02 4d 2a 08 00 00 00 00 00 00 00 00	#hid report	led handle write
+#16 00 02 02 29 02 00 00	
+#17 00 02 08 29 02 01 01	#Report ID: 1	Report Type: Input
+
+#Characteristic:hid report
+#18 00 02 03 28 01 12  
+#19 00 02 4d 2a 14 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  # d 14
+#1a 00 02 02 29 02 00 00
+#1b 00 02 08 29 02 07 01	#Report ID: 7	Report Type: Input 游戏键盘
+
+#Characteristic:hid report
+#1c 00 02 03 28 01 12   
+#1d 00 02 4d 2a 02 00 00 	#hid report	led handle write
+#1e 00 02 02 29 02 00 00	
+#1f 00 02 08 29 02 02 01	#Report ID: 2	Report Type: Input
+
+#Characteristic:hid report
+#20 00 02 03 28 01 0e   
+#21 00 02 4d 2a 02 00	00	#hid report	led handle write
+#22 00 02 02 29 02 00 00	
+#23 00 02 08 29 02 01 02	#Report ID: 1	Report Type: Output
+
+#Characteristic:Report map
+#24 00 02 03 28 01 0a
+#25 00 02 4b 2a 83		#length 66+25+60=160=0xa0 #0xa0 -0x45 +0x19=0x74
+#66+25+25=116=0x74
+
+# hid descriptor
+#0501 # Usage Page(Generic Desktop)
+#0906 # Usage(Keyboard)
+#a101 # Collection(Application)
+#8501 # Report ID(1)
+#7501 # Report Size(1)
+#9508 # Report Count(8)
+#0507 # Usage Page(Keyboard/Keypad)
+#19e0 # Usage Minimum(224)
+#29e7 # Usage Maximum(231)
+#1500 # Logical Minimum(0)
+#2501 # Logical Maximum(1)
+#8102 # Input(Data Variable Absolute) ; Modifier byte
+#9501 # Report Count(1)
+#7508 # Report Size(8)
+#8103 # Input(Constant Variable Absolute) ; 
+#9505 # Report Count(5)
+#7501 # Report Size(1)
+#0508 # Usage Page(LEDs)
+#1901 # Usage Minimum(1)
+#2905 # Usage Maximum(5)
+#9102 # Output(Data Variable Absolute) ; LED report
+#9501 # Report Count(1)
+#7503 # Report Size(3)
+#9103 # Output(Constant Variable Absolute) ; 
+#9506 # Report Count(6)
+#7508 # Report Size(8)
+#1500 # Logical Minimum(0)
+#25ff # Logical Maximum(255)
+#0507 # Usage Page(Keyboard/Keypad)
+#1900 # Usage Minimum(0)
+#29ff # Usage Maximum(255)
+#8100 # Input(Data Array) ; Key arrarys 6 bytes
+#c0 # End Collection
+
+
+#05 0c #Usage Page (Consumer)
+#09 01 #Usage (Consumer Control)	09 01
+#a1 01 #Collection (Application)	A1 01
+#85 02#    Report Id (2)	85 02			
+#19 00 #    Usage Minimum (Unassigned)	19 00
+#2a ff 03 #    Usage Maximum (Reserved (0x03FF))	2A FF 03
+#15 00 #    Logical minimum (0)	15 00
+#26 ff 03 #    Logical maximum (1'023)	26 FF 03
+#95 01 #    Report Count (1)	95 01
+#75 10 #    Report Size (16)	75 10
+#81 00 #    Input (Data,Array,Absolute,Bit Field)	81 00
+#c0 #End Collection	C0 
+
+#自定义
+#0501 # Usage Page(Generic Desktop)
+#0906 # Usage(Keyboard)
+#a101 # Collection(Application)
+#8507# Report ID(7)    
+#0507# Usage Page(Keyboard/Keypad)
+#19e0 #    Usage Minimum (Keyboard Left Control)	19 E0
+#29e7 #    Usage Maximum (Keyboard Right GUI)	29 E7
+#1500 # Logical Minimum(0)
+#2501 # Logical Maximum(1)
+#7501 #    Report Size (1)	75 01
+#9508 # Report Count(8)
+#8100 #     Input (Data,Array,Absolute,Bit Field)	81 00
+#9598 #    Report Count (152)	95 98
+#7501 # Report Size(1)
+#1500 # Logical Minimum(0)
+#2501 # Logical Maximum(1)
+#0507 # Usage Page(Keyboard/Keypad)
+#1900 #     Usage Minimum (No event indicated)	19 00
+#2998 #     Usage Maximum (Reserved (0x0098))	29 98
+#8102 # Input(Data Variable Absolute) ; Modifier byte
+#c0 # End Collection
+
+#Characteristic:Hid information
+#26 00 02 03 28 01 02
+#27 00 02 4a 2a 04 11 01 00 01        
+#Characteristic
+#28 00 02 03 28 01 04
+#29 00 02 4c 2a 01 00
+
+#Primary Service: BAS
+#2a 00 02 00 28 02 0f 18 
+#Characteristic: Battery Level
+#2b 00 02 03 28 01 12 
+#2c 00 02 19 2a 01 64 
+#Client Characteristic Configuration
+#2d 00 02 02 29 02 00 00 
+#End of Attribute list
+#00 00
+
+
+
+
+
+
+mem_app_connection_options:17
+
+###3.0###
+mem_scan_mode:00
+mem_module_spp_lpm_mult:28
+
+##############passkey CONFIG##############
+mem_sp_iocap_local:02 00 04
+mem_ssp_enable:01
+mem_ssp_mode_flag:02
+#####################################
+
+mem_ui_profile_supported:01
+
+mem_lap:36 ff c2 08 66 22    
+mem_local_name_length:
+'BT3.0 Keyboard
+
+###3.0 sinff param###
+mem_sniff_param_interval:0e 00
+mem_sniff_param_attempt:01
+mem_sniff_param_timeout:01
+mem_unsniff2sniff_timer:0a
+
+mem_class: 40 25 00
+
+mem_device_option:43
+mem_ptt:0
+mem_features:
+ff
+fb
+8f
+fa	#fe--EDR  F8--BR
+8b	#AFHclose 83
+85
+59
+83
+
+
+
+mem_eir_enable:01
+
+mem_all_uuid_16bits:
+06
+03#Type: Complete list of 16-bit UUIDs
+1100 0001 0210 2411  0012  0100
+
+mem_all_uuid_128bits:00
+
+
+mem_ui_uuid_table:mem_module_uuid_list
+
+mem_module_uuid_list:
+#uuids
+04 0011 0100 1002 1124
+
+#handle
+00010000
+
+#total length
+36019a #01b6+19-43-2=1cf-43-2=18c-2=18a
+
+#attribute start, first 4 digit is attribute ID
+090000 0a 00010000
+090001 3503 191124
+090004 350d 3506 190100 090011 3503 190011
+090005 3503 191002
+090006 3509 09656e 09006a 090100
+090009 3508 3506 191124 090100
+09000d 350f 350d 3506 190100 090013 3503 190011
+
+#Service Name
+#090100 2517
+#'Apple Wireless Keyboard
+#41 70 70 6c 65 20 57 69 72 65 6c 65 73 73 20 4b 65 79 62 6f 61 72 64
+#Service Name
+090100 253d
+#'Broadcom Bluetooth Wireless  Keyboard                        
+4272 6f61 6463 6f6d 2042 6c75 6574 6f6f 7468 2057 6972 656c 6573 7320 204b 6579 626f 6172 6420 
+2020 2020 2020 2020 2020 2020 2020 2020 2020 2020 2020 20
+
+#Service Description
+090101 2508
+#'Keyboard
+4b6579626f617264
+
+#Provider Name
+#090102 250a
+#'Apple Inc.
+#41 70 70 6c 65 20 49 6e 63 2e
+#Provider Name
+090102 2510
+#'Broadcom Corp.  
+4272 6f61 6463 6f6d 2043 6f72 702e 2020
+
+090200 090100
+090201 090111
+090202 0840
+090203 0821
+090204 2801
+090205 2801
+090206 3589 3587 0822 2583  #9f+19-43-2 = 73
+
+# hid descriptor
+0501 # Usage Page(Generic Desktop)
+0906 # Usage(Keyboard)
+a101 # Collection(Application)
+8501 # Report ID(1)
+7501 # Report Size(1)
+9508 # Report Count(8)
+0507 # Usage Page(Keyboard/Keypad)
+19e0 # Usage Minimum(224)
+29e7 # Usage Maximum(231)
+1500 # Logical Minimum(0)
+2501 # Logical Maximum(1)
+8102 # Input(Data Variable Absolute) ; Modifier byte
+9501 # Report Count(1)
+7508 # Report Size(8)
+8103 # Input(Constant Variable Absolute) ; 
+9505 # Report Count(5)
+7501 # Report Size(1)
+0508 # Usage Page(LEDs)
+1901 # Usage Minimum(1)
+2905 # Usage Maximum(5)
+9102 # Output(Data Variable Absolute) ; LED report
+9501 # Report Count(1)
+7503 # Report Size(3)
+9103 # Output(Constant Variable Absolute) ; 
+9506 # Report Count(6)
+7508 # Report Size(8)
+1500 # Logical Minimum(0)
+25ff # Logical Maximum(255)
+0507 # Usage Page(Keyboard/Keypad)
+1900 # Usage Minimum(0)
+29ff # Usage Maximum(255)
+8100 # Input(Data Array) ; Key arrarys 6 bytes
+c0 # End Collection
+
+
+05 0c #Usage Page (Consumer)
+09 01 #Usage (Consumer Control)	09 01
+a1 01 #Collection (Application)	A1 01
+85 02#    Report Id (2)	85 02			
+19 00 #    Usage Minimum (Unassigned)	19 00
+2a ff 03 #    Usage Maximum (Reserved (0x03FF))	2A FF 03
+15 00 #    Logical minimum (0)	15 00
+26 ff 03 #    Logical maximum (1'023)	26 FF 03
+95 01 #    Report Count (1)	95 01
+75 10 #    Report Size (16)	75 10
+81 00 #    Input (Data,Array,Absolute,Bit Field)	81 00
+c0 #End Collection	C0 
+
+#×??¨ò?
+0501 # Usage Page(Generic Desktop)
+0906 # Usage(Keyboard)
+a101 # Collection(Application)
+8507# Report ID(7)    
+0507# Usage Page(Keyboard/Keypad)
+19e0 #    Usage Minimum (Keyboard Left Control)	19 E0
+29e7 #    Usage Maximum (Keyboard Right GUI)	29 E7
+1500 # Logical Minimum(0)
+2501 # Logical Maximum(1)
+7501 #    Report Size (1)	75 01
+9508 # Report Count(8)
+8100 #     Input (Data,Array,Absolute,Bit Field)	81 00
+95a8 #    Report Count (168)	95 A8
+7501 # Report Size(1)
+1500 # Logical Minimum(0)
+2501 # Logical Maximum(1)
+0507 # Usage Page(Keyboard/Keypad)
+1900 #     Usage Minimum (No event indicated)	19 00
+29a8 #     Usage Maximum (Reserved (0x00A8))	29 A8
+8102 # Input(Data Variable Absolute) ; Modifier byte
+c0 # End Collection
+
+
+090207 3508 3506 090409 090100
+09020b 090100
+09020c 090c80
+09020d 2800
+09020e 2801
+09020f 090318
+090210 090000
+#attribute end
+
+#uuids for pnpInformation	
+03 1002 1200 0001
+
+#handle
+00010001
+
+#total length 90 bytes
+3600a1
+
+#attribute list
+090000 0a00010001
+090001 3503 191200
+090004 350d 3506 190100 090001 3503 190001
+090006 3509 09656e 09006a 090100
+090009 3508 3506 191200 090100
+090100 252f42726f6164636f6d20426c7565746f6f746820576972656c657373204b6579626f61726420506e5020536572766572
+090101 25084b6579626f617264
+090200 090103
+090201# VendorID
+0904e8
+090202#ProductID
+097021
+090203 090001
+090204 2801
+090205 090002
+
+#attribute end
+00
+
+#Auto reconnection after power on
+
+
+
+mem_device_option:0a
+
+##############NVRAM CONFIG##############
+mem_nv_data_ptr:mem_module_nv_data
+mem_nv_data_number:00
+#####################################
+
+
+
+
+################IPC BUFFER INIT#####################
+4FF0:00 1C
+4FF2:FF 1F
+4FF4:00 1C
+4FF6:00 1C
+4FF8:80 4C
+4FFA:E0 4F
+4FFC:80 4C
+4FFE:80 4C
+
+##############BLUETOOTH CONFIG##############
+###commom###
+mem_soft_version_num:3010
+mem_module_state:03
+mem_module_bluetooth_stauts_by_command:07
+
+mem_module_flag:00
+#bit0 MODULE_FLAG_UART_FLOW_CONTROL
+#bit1 MODULE_FLAG_BLE_SEND_MTU23
+#bit2 MODULE_FLAG_BLE_DATA_ENCRYPT
+mem_lpm_mode:00
+mem_lpm_interval:00 01
+mem_lpm_overhead:08
+mem_lpm_mult_timeout:02
+
+mem_sniff_param_interval:0e 00
+
+###ble###
+
+#####################################
+
+
+mem_lpm_config:0f 84 f0
+mem_lpm_xtalcnt:0a 0b b2 32
+mem_lpm_hibernate_switch:8b
+mem_lpm_doze_switch:0b
+mem_gpio_wakeup:00 00 00 00 00 00 00 00
+
+mem_fcomp_mul:02
+mem_fcomp_div:24
+mem_iscan_window:40 00
+mem_iscan_interval:00 02
+mem_pscan_window:32 00
+mem_pscan_interval:00 02
+
+mem_inq_window:20 00
+mem_page_window:20 00
+mem_page_to:00 20
+mem_rx_window_init:80 04
+mem_rx_window_sniff:00 10
+
+
+
+mem_lmp_version:08 0e 05 04 00
+
+mem_eeprom_base:30 1f
+mem_eeprom_block_size:20
+mem_context_number:01
+
+mem_rf_init:
+4b ba
+55 d0
+56 e0
+57 88
+58 6c
+59 10
+07 ff
+ff
+mem_rf_init_ptr:mem_rf_init
+
+
+
Index: rongyuan/patch/patch.prog
===================================================================
--- /YC3121_demo/ModuleDemo/BlueTooth/BT_code_patch/keyboard/branches/rongyuan/patch/patch.prog	(nonexistent)
+++ /YC3121_demo/ModuleDemo/BlueTooth/BT_code_patch/keyboard/branches/rongyuan/patch/patch.prog	(working copy)
@@ -0,0 +1,1643 @@
+
+define TX_POWER_MAX
+//define OTP
+/******************************************/
+/**************   Start   *****************/
+/******************************************/
+
+p_start:
+	bbit1 8,pf_patch_ext
+	//LPM exen bugfix
+	beq patch00_1,p_soft_reset
+	beq patch00_3,p_main_loop
+	beq patch10_5,p_shutdown_radio
+	beq patch11_1,p_set_freq_tx
+	//LMP bugfix
+	beq patch12_4,p_ahead_window
+	beq patch14_2,p_init_param
+	//LMP bugfix	
+	beq patch14_3,p_lpm_adjust_clk
+	beq patch15_1,p_lpm_dispatch_next
+	beq patch15_4,p_lpm_unconn_nossp
+	
+//	beq patch16_1,p_lpm_check_wake_lock
+	beq patch17_0,p_module_init
+	beq patch17_3,p_module_hci_cmd_control
+	beq patch17_4,p_module_hci_cmd_transmit_le_notify
+	beq patch17_6,p_hid_rx_process
+	branch assert
+pf_patch_ext:
+
+	beq patch20_3,p_le_receive_skip
+	beq patch20_5,p_le_transmit_receive_sifs
+	beq patch20_6,p_le_transmit
+	beq patch22_3,p_le_acknowledge
+	beq patch23_7,p_le_parse
+	beq patch24_1,p_le_parse_l2cap
+	beq patch26_0,p_le_modified_name
+	beq patch27_4,p_parse_lmp_accepted
+	beq patch27_2,p_parse_lmp
+	beq patch27_5,p_parse_lmp_not_accepted
+	beq patch27_6,p_send_lmp
+	beq patch28_1,p_ssp_disable
+	beq patch33_1,p_sp_initialize_256
+	beq patch34_2,p_check_51cmd_once
+	branch assert
+p_check_51cmd_once:
+	copy temp,pdata
+	rtn blank
+	beq BT_CMD_START_UNCONN_ADV,p_check_51cmd_unconn_adv
+	branch check_51cmd_once+8
+p_check_51cmd_unconn_adv:
+	jam ON,mem_le_adv_enable
+	jam ADV_NONCONN_IND,mem_le_adv_type
+	fetch 2,mem_ui_state_map
+	set1 UI_STATE_BLE_ADV,pdata
+	store 2,mem_ui_state_map
+	rtn
+
+app_ble_start_unconn_adv:
+	jam BT_CMD_START_UNCONN_ADV,mem_fifo_temp
+	branch ui_ipc_send_cmd
+
+p_le_modified_name:
+	call le_modified_name_att_list
+	branch p_le_modified_name_adv
+
+p_le_modified_name_adv:
+	arg mem_le_scan_data_len+32,regc
+	arg mem_le_scan_data,rega
+	call le_modified_name_adv_and_scan
+	rtn
+	
+	
+p_module_init:
+	setarg p_module_process_bb_event
+	store 2,mem_cb_bb_event_process
+
+	setarg p_module_bb_event_timer
+	store 2,mem_cb_event_timer
+
+	setarg p_module_le_receive_data
+	store 2,mem_cb_att_write
+
+	setarg p_module_lpm_lock
+	store 2,mem_cb_check_wakelock
+
+	setarg p_module_bt_conn_process
+	store 2,mem_cb_bt_process
+
+	call p_keyboard_ble_init
+
+	call module_lpm_uart_init
+	call module_gpio_init
+	call check_module_disabled
+	//call p_check_otp_shaomaqiang_app
+	branch module_hci_event_enter_standby_mode
+
+
+p_module_process_bb_event:
+	copy regc,pdata
+/***************classic shutter event****************/
+	beq BT_EVT_BB_CONNECTED,classic_shutter_process_baseband_connect
+	beq BT_EVT_BB_DISCONNECTED,classic_shutter_process_baseband_disconnect
+	beq BT_EVT_RECONN_FAILED,classic_shutter_process_reconnect_failed
+	beq BT_EVT_SETUP_COMPLETE,classic_shutter_process_setup_complete
+	beq BT_EVT_HID_CONNECTED,classic_shutter_process_hid_connect
+	beq BT_EVT_HID_DISCONNECTED,classic_shutter_process_hid_disconnect
+	beq BT_EVT_HID_HANDSHAKE,classic_shutter_process_hid_handshake
+	beq BT_EVT_RECONN_PAGE_TIMEOUT,classic_shutter_process_reconnect_page_timeout
+	beq BT_EVT_VIRTUAL_CABLE_UNPLUG,classic_shutter_process_virtual_cable_unplug
+	beq BT_EVT_REMOTE_UNSNIFF,classic_shutter_process_remote_unsniff
+	beq BT_EVT_STORE_NVRAM,classic_shutter_process_store_reconnect_information
+	beq BT_EVT_LINKKEY_GENERATE,classic_shutter_process_linkkey_generate
+/***************classic shutter event****************/
+
+/***************ble shutter event****************/
+//	beq BT_EVT_LE_START_ENC,p_module_hci_event_start_enc
+	beq BT_EVT_LE_ENC_INFO,p_module_hci_event_enc_info
+
+/***************24g event***********************/
+
+
+	//
+	beq BT_EVT_ENTER_SNIFF,p_module_process_enter_sniff
+
+	branch module_process_bb_event + 1
+
+
+p_module_process_enter_sniff:
+
+p_module_sniff_param_check:
+	call module_spp_clear_last_transmite_clock
+	//fetch 1,mem_context
+	//rtnbit0 state_insniff
+	fetch 2,mem_context+coffset_tsniff
+	rshift pdata,pdata
+	fetcht 2,mem_sniff_param_interval
+	isub temp,null
+//	nbranch module_sniff_param_check_unsniff,zero
+	branch app_lpm_mult_enable
+p_module_sniff_param_check_unsniff:
+	fetch 1,mem_module_flag
+	rtnbit1 MOUDLE_TASK_UNSNIFF
+//	fethc 2,core_uart_rxitems    //*
+	fetch 2,IPC_M02BT_READ_PTR
+	fetcht 2,IPC_M02BT_WRITE_PTR
+	isub temp,null
+	ncall module_set_unsniff_task_flag,zero    //*仰
+	branch app_bt_sniff_exit
+
+
+
+/*
+	��ģ��������
+*/
+keyboard_start_bluetooth_discovery:
+	rtn
+
+keyboard_stop_bluetooth_discovery:
+	call app_bt_stop_discovery
+	branch app_ble_stop_adv
+
+
+p_module_bb_event_timer:
+/**************classic shutter timer**********************/
+	call classic_shutter_check_unplug_timer
+	call classic_shutter_hid_handshake_timer
+	call classic_shutter_hid_disconn_timer
+/************************************/
+	rtn
+
+
+p_module_le_receive_data:
+	call module_check_ble_encrypt_state
+	rtn user
+	copy rega,pdata
+	store 2,mem_module_le_rx_data_address
+//	copy loopcnt,pdata
+	copy regb,pdata
+	store 1,mem_module_le_rx_data_len
+	fetcht 2,mem_le_att_handle
+	storet 2,mem_module_le_rx_data_handle
+
+	call le_att_get_handle_info
+	nbranch assert,blank
+	fetch 1,mem_le_cur_uuid_length	//	uuid length
+//	bne 0x02,module_hci_event_receive_le_data
+//	ifetcht 2,contr
+//	setarg CLIENT_CHARACTERTIC_CONFIGURATION
+//	isub temp,null
+//	rtn zero		//filter ccc handle data
+//	branch p_module_hci_event_receive_le_data_notify,zero
+	branch module_hci_event_receive_le_data
+
+p_moudle_le_receive_data_report_output:
+	ifetcht 1,rega
+	setarg 0x01
+	store 1,mem_pdatatemp
+	istoret 1,contw
+	branch p_hid_rx_process_data_hid_kb
+
+p_module_lpm_lock:
+	branch module_lpm_lock
+
+p_module_bt_conn_process:
+	branch p_module_spp_enter_sniff
+
+p_module_spp_enter_sniff:
+	branch module_spp_enter_sniff+1
+
+p_module_hci_cmd_control:
+	fetch 1,mem_module_uart_opcode
+	beq HCI_CMD_BT_DISCONNECT,p_module_hci_cmd_bt_disconnect
+	beq HCI_CMD_SET_COD,p_module_hci_cmd_set_cod
+	beq HCI_CMD_SLEEP,p_module_hci_cmd_enter_sleep
+	beq HCI_CMD_SET_PAIRING_REQ,p_module_hci_cmd_set_pairing_mode
+	beq HCI_CMD_SEND_HID_DATA,p_module_hci_cmd_send_hid_data
+	beq HCI_CMD_CREAT_BT_RECONNECT,p_moudle_hci_cmd_creat_bt_reconnect
+	beq HCI_CMD_ADV_DATA_CHANGE,p_module_hci_cmd_adv_data_change
+	beq HCI_CMD_SET_VISIBILITY_REQ,p_module_hci_cmd_set_visibility
+
+	
+//	beq HCI_CMD_DELETE_CUSTOMIZE_SERVICE,module_hci_cmd_delete_customize_service
+//	beq HCI_CMD_ADD_SERVICE_UUID,module_hci_cmd_add_service_uuid
+//	beq HCI_CMD_ADD_CHARACTERISTIC_UUID,module_hci_cmd_add_characteristic_uuid
+
+	beq HCI_CMD_ADD_SERVICE_CHARAC_UUID,p_module_hci_cmd_add_service_charactisic
+
+	beq HCI_CMD_SEND_24G_DATA,p_module_hci_cmd_send_24g_data
+	beq HCI_CMD_24G_RFENABLE,p_module_hci_cmd_24g_rfenable
+	beq HCI_CMD_24G_TX,p_module_hci_cmd_set_24g_tx
+	beq HCI_CMD_24G_RX,p_module_hci_cmd_set_24g_rx
+	beq HCI_CMD_24G_RXPOWER,p_module_hci_cmd_set_txpower
+	beq HCI_CMD_24G_CHANNEL,p_module_hci_cmd_set_24g_channel
+	beq HCI_CMD_24G_ADDR,p_module_hci_cmd_set_24g_addr
+	beq HCI_CMD_24G_SET_ACKDATA,p_module_hci_cmd_24g_send_ack_prep
+	beq HCI_CMD_24G_SET_RETRAN_TIME,p_module_hci_cmd_24g_set_retransmit_time
+	beq HCI_CMD_24G_NO_ACK_FLAG,p_module_hci_cmd_set_no_ack
+	branch module_hci_cmd_control + 2
+
+p_module_hci_cmd_add_service_charactisic:
+	call le_att_get_last_handle
+	increase -2,contr
+	copy contr,contw
+	fetch,1,mem_module_uart_len
+	copy pdata,loopcnt
+	call uart_copy_rx_bytes
+	setarg 0x0000
+	istore 2,contw
+	branch module_hci_event_receive_valid_cmd
+//module_hci_cmd_delete_customize_service:
+//	arg 0x000c,temp
+//	call le_att_get_handle_ptr2
+//	add contr,-2,contw
+//	setarg 0x0000
+//	istore 2,contw
+//	branch module_hci_event_receive_valid_cmd
+
+//module_hci_cmd_add_service_uuid:
+//	// call ice_break
+ //  	arg 1,temp
+ //   	fetch 2 ,mem_ui_le_uuid_table
+ // 	iforce contw
+ //   	call module_hci_cmd_add_service_uuid_set_uuid
+ //   	call uart_copy_rx_bytes_len_data
+ //   	setarg 0x0000
+ //   	istore 2,contw
+ //   	branch module_hci_event_uuid_handle
+
+//module_hci_cmd_add_characteristic_uuid:
+//	ifetch 1,contru	//Characteristic
+//	call module_hci_cmd_add_characteristic_uuid_set_handle
+//	call module_hci_cmd_add_characteristic_uuid_set_uuid
+//	branch module_hci_event_uuid_handle
+
+//module_hci_cmd_add_service_uuid_set_uuid:
+//	call le_att_creat_new_handle
+//	setarg 0x280002
+//	istore 3,contw
+//	rtn
+
+//module_hci_cmd_add_characteristic_uuid_set_handle:
+//	store 1,mem_pdatatemp
+//	call le_att_creat_new_handle
+//	setarg 0x01280302
+//	istore 4,contw
+//	fetch 1,mem_pdatatemp
+//	istore 3,contw
+//	rtn
+
+//module_hci_cmd_add_characteristic_uuid_set_uuid:
+//	call le_att_creat_new_handle
+//	call uart_copy_rx_bytes_len_data		//uuid
+//	call uart_copy_rx_bytes_len_data		//data
+//	setarg 0
+//	istore 2,contw
+//	increase -1,temp
+//	call le_att_get_handle_ptr2
+//	add contr,4,contr
+//	ifetch 1,contr		//characteristic data
+//	bbit1 BIT_CHARACTERISTIC_NOTIFY,module_hci_cmd_add_characteristic_uuid_set_ccc_uuid
+//	bbit1 BIT_CHARACTERISTIC_INDICATE,module_hci_cmd_add_characteristic_uuid_set_ccc_uuid
+//	increase 1,temp
+//	rtn
+
+//module_hci_cmd_add_characteristic_uuid_set_ccc_uuid:
+//	call le_att_creat_new_handle
+//	setarg 0x02290202
+//	istore 8,contw
+//	increase -1,temp
+//	rtn
+
+
+//uart_copy_rx_bytes_len_data:
+//	ifetch 1,contru
+//	copy pdata,loopcnt
+//	istore 1,contw
+//	branch uart_copy_rx_bytes
+
+
+//le_att_creat_new_handle:
+//	call le_att_get_last_handle
+//	istoret 2,contw
+//	rtn
+
+//output:temp:new handle num
+//contr:address write data
+le_att_get_last_handle:
+	fetch 2,mem_ui_le_uuid_table
+	iforce contr
+le_att_get_last_handle_loop:
+	ifetch 2,contr
+	rtn blank
+	add pdata,1,temp
+	ifetch 1,contr
+	iadd contr,contr	
+	ifetch 1,contr			// length
+	iadd contr,contr
+	copy contr,contw
+	branch le_att_get_last_handle_loop
+
+
+////input:temp uuid number
+//module_hci_event_uuid_handle:
+//	storet 2,mem_temp
+//	jam HCI_EVENT_UUID_HANDLE,mem_module_uart_opcode
+//	setarg 2
+//	call module_hci_prepare_tx
+//	fetcht 2,mem_temp
+//	istoret 2,contwu
+//	branch uartd_send
+
+
+p_module_hci_cmd_set_visibility:
+	fetch 1,mem_module_uart_len
+	bne 1,module_hci_event_receive_invalid_cmd
+	copy rega,contru
+	call module_hci_event_receive_valid_cmd
+	ifetcht 1,contru
+	storet 1,mem_module_bluetooth_stauts_by_command
+	fetch 2,mem_ui_state_map
+	rtnbit1 UI_STATE_BLE_CONNECTED
+	rtnbit1 UI_STATE_BT_CONNECTED
+p_module_start_adv_discovery_by_command:
+	fetch 1,mem_module_state
+	isolate1 MOUDLE_STATE_BT_BIT,pdata
+	nbranch p_moudle_start_adv_by_command,true
+	fetcht 1,mem_module_bluetooth_stauts_by_command
+	and temp,0x03,pdata
+	store 1,mem_scan_mode
+p_moudle_start_adv_by_command:
+	fetch 1,mem_module_state
+	isolate1 MOUDLE_STATE_BLE_BIT,pdata
+	nrtn true
+	fetcht 1,mem_module_bluetooth_stauts_by_command
+	isolate1 2,temp
+	branch p_app_ble_start_adv,true
+	branch app_ble_stop_adv
+p_app_ble_start_adv:
+	fetch 1,mem_le_adv_type
+	beq ADV_IND,app_ble_start_adv
+	beq ADV_DIRECT_IND,app_ble_start_direct_adv
+	beq ADV_NONCONN_IND,app_ble_start_unconn_adv
+
+
+p_module_hci_cmd_adv_data_change:
+	ifetch 1,contru
+	isolate1 0,pdata
+	branch p_module_set_direct_adv,true
+	isolate1 1,pdata
+	branch p_module_set_unconn_adv,true
+	isolate1 2,pdata
+	branch p_module_set_common_adv,true
+	branch module_hci_event_receive_invalid_cmd
+	
+p_module_set_direct_adv:
+	jam ADV_DIRECT_IND,mem_le_adv_type
+	ifetch 6,contru
+	store 6,mem_hci_plap
+	branch module_hci_event_receive_valid_cmd
+	
+p_module_set_unconn_adv:
+	jam ADV_NONCONN_IND,mem_le_adv_type
+	fetch 1,mem_module_uart_len
+	pincrease -1
+	icopy loopcnt
+	copy contru,contr
+	store 1,mem_le_adv_data_len
+	arg mem_le_adv_data,contw
+	call memcpy_fast
+	branch module_hci_event_receive_valid_cmd
+	
+p_module_set_common_adv:
+	jam ADV_IND,mem_le_adv_type
+	fetch 1,mem_module_uart_len
+	pincrease -1
+	icopy loopcnt
+	copy contru,contr
+	store 1,mem_le_adv_data_len
+	arg mem_le_adv_data,contw
+	call memcpy_fast
+	branch module_hci_event_receive_valid_cmd	
+
+
+
+	
+p_module_hci_cmd_bt_disconnect:
+	fetch 2,mem_ui_state_map
+	bbit0 UI_STATE_BT_CONNECTED,module_hci_event_receive_invalid_cmd
+	call module_hci_event_receive_valid_cmd
+	call app_bt_disconnect
+	fetch 2,mem_ui_state_map
+	rtnbit0 UI_STATE_BT_HID_CONN
+	jam HCI_EVENT_BT_HID_DISCONNECT,mem_module_uart_opcode
+	branch module_hci_event_enter_standby_mode_len0
+
+
+p_module_hci_cmd_set_cod:
+	fetch 1,mem_module_uart_len
+	bne 3,module_hci_event_receive_valid_cmd
+	ifetch 3,contru
+	store 3,mem_class
+	branch module_hci_event_receive_valid_cmd
+
+p_module_hci_cmd_set_pairing_mode:
+	copy rega,contru
+	ifetch 1,contru
+	beq PAIRING_PINCODE,module_hci_pairing_pincode_mode
+	beq PAIRING_JUSTWORK,module_hci_pairing_just_work_mode
+	beq PAIRING_PASSKEY,module_hci_pairing_passkey
+	beq PAIRING_CONFIRM,p_module_hci_pairing_numeric_comparison
+	branch module_hci_event_receive_invalid_cmd
+p_module_hci_pairing_numeric_comparison:
+	setarg 0x000001
+	branch module_hci_sspairing_mode
+
+
+p_module_hci_cmd_enter_sleep:
+	call module_hci_event_receive_valid_cmd
+	branch app_enter_hibernate
+
+
+p_module_hci_cmd_send_hid_data:
+	fetch 2,mem_ui_state_map
+	bbit1 UI_STATE_BT_HID_CONN,bt_keyboard_send_hid_data
+
+	branch module_hci_event_receive_invalid_cmd
+
+
+p_module_hci_cmd_transmit_le_notify:
+	add temp,-3,pdata		//sub handle and opcode
+	arg 200,temp	
+	call not_greater_than
+	fetcht 1,mem_module_hci_notify_len
+	call not_greater_than
+	copy pdata,rega
+	copy temp,pdata
+	isub rega,pdata
+	store 1,mem_module_hci_notify_len
+	fetcht 2,mem_module_hci_notify_handle
+	increase -1,temp
+	call le_att_get_handle_ptr2
+	branch p_module_hci_cmd_transmit_handle_error,blank
+	ifetcht 4,contr		//flag
+	setarg 0x01280302
+	isub temp,null
+	nbranch p_module_hci_cmd_transmit_handle_error,zero
+	ifetch 1,contr			//Characteristic
+	bbit1 BIT_CHARACTERISTIC_NOTIFY,module_hci_cmd_transmit_le_notify + 13
+	branch p_module_hci_cmd_transmit_handle_error
+
+p_module_hci_cmd_transmit_handle_error:
+	jam 0,mem_module_hci_notify_len
+	jam HCI_DISCARD_PACKET,mem_module_temp_nl_discard_packet 
+	call module_clear_le_tx_data_flag
+	branch module_hci_event_receive_invalid_cmd
+
+p_parse_lmp_accepted:
+	fetch 1,mem_rxbuf+1
+	store 1,mem_lmi_accepted_opcode
+	beq LMP_HOST_CONNECTION_REQ,p_parse_lmp_accepted_hostconn//ok
+	branch parse_lmp_accepted+2
+
+p_parse_lmp_accepted_hostconn:
+	//fetch 1,mem_state
+	//rtnbit0 state_init_seq
+	fetch 1,mem_lmp_conn_state
+	set1 RECEIVED_CONN_REQ,pdata
+	store 1,mem_lmp_conn_state
+	jam BT_EVT_BB_CONNECTED,mem_fifo_temp
+	call ui_ipc_send_event
+//	jam LMP_PACKET_TYPE_TABLE_REQ,mem_lmo_opcode2
+	//nbranch parse_lmp_accepted_hostconn_ctn,master
+	branch parse_lmp_accepted_hostconn_ctn
+
+p_parse_lmp:
+	fetch 1,mem_lmi_opcode2
+ 	beq LMP_ENCRYPTION_KEY_SIZE_REQ,p_parse_lmp_crypt_key
+	beq LMP_SNIFF_REQ, p_parse_lmp_sniff_req
+//	beq LMP_QUALITY_OF_SERVICE_REQ,parse_lmp_quality_of_service_req
+ 	branch parse_lmp + 21
+
+ parse_lmp_quality_of_service_req: 
+ 	jam LMP_QUALITY_OF_SERVICE_REQ,mem_lmi_opcode2  
+ 	jam LMP_ACCEPTED,mem_lmo_opcode2  
+ 	rtn
+
+p_parse_lmp_crypt_key:
+	fetcht 1,mem_rxbuf+1
+	sub temp,6,null
+	branch reject_lmp_packet_pdu_not_allowed,positive
+	branch parse_lmp_crypt_key + 1
+	
+reject_lmp_packet_pdu_not_allowed:
+	jam PDU_NOT_ALLOWED,mem_lmo_reason2
+	branch reject_lmp_packet
+
+p_parse_lmp_sniff_req:
+	fetch 2,mem_rxbuf+6
+	branch lmp_reject_sniff,blank
+	//call parse_lmp_sniff_req_check_sniff_para
+	//branch lmp_reject_sniff,positive
+	branch parse_lmp_sniff_req+5
+
+
+p_parse_lmp_not_accepted:
+	fetch 1,mem_rxbuf+1
+	store 1,mem_lmi_accepted_opcode
+	beq LMP_AU_RAND,p_parse_lmp_not_accepted_aurand//ok
+	branch parse_lmp_not_accepted+3
+
+p_parse_lmp_not_accepted_aurand:
+	call parse_lmp_not_accepted_aurand
+	fetch 1,mem_conn_sm
+	rtnne CONN_SM_AUTH_WAIT
+	jam HCI_EVENT_BT_RECONNECT_FAIL,mem_module_uart_opcode
+	setarg 1
+	call module_hci_prepare_tx
+	setarg 0x01
+	istore 1,contwu
+	branch uartd_send
+	
+
+p_send_lmp:
+	disable user
+	call lmo_fifo_process
+	fetch 1,mem_lmp_to_send
+	rtn blank
+	bbit1 7,p_send_lmp_escape
+	branch send_lmp0
+	
+p_send_lmp_escape:
+	beq LMP_EXT_FEATURES_RES,p_send_lmpext_features_res
+	beq LMP_EXT_FEATURES_REQ,p_send_lmpext_features_req	
+	branch send_lmp_escape
+
+p_send_lmpext_features_res:
+	call p_check_ssp_enable
+	fetch 1,mem_lmp_to_send
+	branch send_lmpext_features_res
+p_send_lmpext_features_req:
+	call p_check_ssp_enable
+	fetch 1,mem_lmp_to_send
+	branch send_lmpext_features_req
+
+p_check_ssp_enable:
+	fetch 1,mem_ssp_enable 
+	branch ssp_disable, blank
+	branch  ssp_enable
+
+p_ssp_disable:
+	fetch 1,mem_features+6
+	set0 param_featrue_ssp,pdata
+	store 1,mem_features+6
+	setarg 0x1
+	store 2,mem_lmpext_ssp_enable
+	rtn
+
+
+p_sp_initialize_256:	
+	fetch 1,mem_le_secure_connect_enable
+	branch  le_secure_connection_disable,blank
+//	call le_secure_connection_enable
+	call sp_clear_flags
+	branch sp_pubkey_calc_256
+
+ifdef OTP
+eut_read_otp_data:
+	fetch 1,mem_module_state
+	set1 MODULE_READ_OTP_BIT,pdata
+	store 1,mem_module_state
+	
+	arg 0x00,addhi
+	arg 0x8973,contr
+	ifetch 1,contr
+	set1 6,pdata			//enable chgpump
+	arg 0x8973,contw
+	istore 1,contw
+	
+	arg 0x0f,addhi
+
+	arg 6, loopcnt              //len
+	arg 2,regb                     //addr
+	arg mem_read_otp_data,rega                   //data
+	
+	call eut_read_otp
+
+	//
+	arg 20, loopcnt
+	arg 0x12c,regb
+	arg mem_read_otp_data+6,rega
+	call eut_read_otp
+
+	arg 2, loopcnt
+	arg 0x1ffe,regb
+	arg mem_read_otp_data+26,rega
+	call eut_read_otp
+
+	call eut_otp_deselect
+
+	arg 0x00,addhi
+	arg 0x8973,contr
+	ifetch 1,contr
+	set0 6,pdata			//disable chgpump
+	arg 0x8973,contw
+	istore 1,contw
+	
+	arg 0x00,addhi
+
+	fetch 1,mem_module_state
+	set0 MODULE_READ_OTP_BIT,pdata
+	store 1,mem_module_state
+	rtn
+
+// rega pointers to buffer, regb is otp address, loopcnt is length
+eut_read_otp:
+	lshift3 regb,regb
+	call eut_otp_ce
+	call eut_otp_readen
+eut_read_otp_loop:
+	call eut_write_otpaddr
+	fetch 1,sec_otp_data
+	istore 1,rega
+	increase 8,regb
+	increase 1,rega
+	loop eut_read_otp_loop
+	rtn
+
+eut_otp_ce:
+	setarg 0x20c
+	call eut_write_otpctrl
+	setarg 0x208
+	call eut_write_otpctrl
+	setarg 0x200
+	call eut_write_otpctrl
+	setarg 0x208
+	branch eut_write_otpctrl
+
+eut_write_otpctrl:
+	arg sec_otp_ctrl,contw
+eut_write_word:	
+	istore 1,contw
+	rshift8 pdata,pdata
+	istore 1,contw
+	rtn
+
+eut_otp_readen:
+	setarg 0x288
+	branch eut_write_otpctrl
+
+// regb is otp address
+eut_write_otpaddr:
+	deposit regb
+	arg sec_otp_addr,contw
+	branch eut_write_word
+
+eut_otp_deselect:
+	setarg 0x20c
+	branch eut_write_otpctrl
+
+p_otp_custom_encryption_data_add_loop:
+	arg 13,loopcnt
+	arg OTP_INIT_VAL,temp
+	arg mem_read_otp_data,contr
+p_otp_custom_add:	
+	ifetch 2,contr
+	iadd temp,pdata
+	copy pdata,temp
+	loop p_otp_custom_add
+	rtn
+
+p_otp_custom_encryption_data_xor_loop:
+	arg 13,loopcnt
+	arg mem_read_otp_data,contr
+p_otp_custom_xor:	
+	ifetch 2,contr
+	ixor temp,pdata
+	copy pdata,temp
+	loop p_otp_custom_xor
+	rtn
+
+p_otp_judge_set_flag:
+	jam 0,mem_en_24g_flag
+	arg 0xffff,temp
+	iand temp,pdata
+	arg mem_read_otp_data+26,contr
+	ifetcht 2,contr
+	isub temp,null
+	nrtn zero
+	jam 1,mem_en_24g_flag
+	rtn
+
+p_check_otp_shaomaqiang_app:
+	call eut_read_otp_data
+	call p_otp_custom_encryption_data_add_loop
+	call p_otp_custom_encryption_data_xor_loop
+	call p_otp_judge_set_flag
+	fetch 1,mem_en_24g_flag
+	compare 1,pdata,0xff
+	rtn true
+	branch assert
+
+endif
+	
+
+
+
+
+
+/*
+	оƬbugfix
+*/
+
+/*
+	YC 3121 LPM  bugfix
+*/
+p_ahead_window:
+	copy temp,pdata
+	call clk2bt
+	lshift16 bt_clk,pdata
+	set1 44,pdata
+	call clk_diff
+	set0 44,pdata
+	call get_clk
+	call clk_diff
+	rtn user
+	call p_clk2rt
+	branch ahead_window+12
+
+p_lpm_adjust_clk:
+	deposit clke
+	call p_clk_diff_rt
+	branch lpm_adjust_clk+3
+
+p_lpm_dispatch_next:
+	fetch 2,mem_context + coffset_rx_window
+	rshift pdata,pdata
+	call clk2bt
+	deposit alarm
+	call clk_diff
+	copy clke,temp
+	call p_clk_diff_rt
+	branch lpm_dispatch_next+30
+
+p_clk_diff_rt:
+	call clk_diff
+p_clk2rt:
+	iforce contr
+	set0 16,contr
+	branch clk2rt+1
+
+/*
+	YC3121 ûexen GPIO
+	disable exen
+*/
+p_soft_reset:
+	call rfcomm_init
+	call init_lmp
+	call p_ui_init
+	branch soft_reset + 9
+
+p_ui_init:
+	rtn wake
+	branch ui_timer_init
+
+p_main_loop:
+	call p_g24_dispatch
+	branch main_loop+1
+
+/*
+	YC3121 shutdown radio bugfix
+	rfen_adc bug 
+*/
+p_shutdown_radio:
+	branch p_shutdown_radio0,is_rx
+	hjam 0xd4, 0x955
+	nop 4
+	hjam 0xd2, 0x955
+	nop 4
+	hjam 0xd1, 0x955
+	nop 4	
+	fetch 1,mem_tx_power
+	beq TX_POWER_0DB,p_shutdown_radio_0db
+	beq TX_POWER_3DB,p_shutdown_radio_3db
+	beq TX_POWER_5DB,p_shutdown_radio_5db
+	beq TX_POWER_f3DB,p_shutdown_radio_f3db
+	beq TX_POWER_f5DB,p_shutdown_radio_f5db
+	beq TX_POWER_PAIR,p_shutdown_radio_pair
+p_shutdown_radio_5db:	
+p_shutdown_radio_0db:
+	hjam 0xd0, 0x955
+	hjam 0xe0, 0x956
+p_shutdown_radio0:
+	force 0x08,radio_ctrl
+	force 0,radio_ctrl
+	disable is_rx
+	disable is_tx
+	pulse packet_end
+	hjam 0x0,rfen_mdm
+	hjam 0x0,rfen_tx
+	hjam 0x0,rfen_rx
+	hjam 0,rfen_sn
+	hjam 0x70,rfen_msc
+	fetch 1,rfen_adc
+	set1 0,pdata
+	store 1,rfen_adc
+	rtn
+p_shutdown_radio_pair:
+p_shutdown_radio_f5db:
+p_shutdown_radio_f3db:
+p_shutdown_radio_3db:
+	hjam 0xd0,0x955
+	hjam 0xc0,0x956
+	branch p_shutdown_radio0
+
+
+p_le_transmit:
+	call le_prep
+	call p_letx_setfreq
+	branch le_transmit0
+
+p_letx_setfreq:
+	branch p_txon,match
+	branch letx_setfreq+1
+
+p_set_freq_tx:
+	storet 1,mem_last_freq
+	call set_freq_tx_offset
+	call rf_write_freq
+	setarg param_pll_setup
+	call sleep
+p_txon:	
+	fetch 1,rfen_adc
+	set1 0,pdata
+	store 1,rfen_adc
+	branch txon+1
+
+
+p_init_param:
+	hjam 0x7c,rfen_adc
+	rtn wake
+	setarg 0
+	store 2,mem_tx_len
+	rshift clkn_bt,pdata
+	store 4,mem_last_clkn
+	rtn
+
+
+
+/*
+	YC3121 оƬbugfix
+*/
+
+/*
+	رչ㲥ߵ
+*/
+p_lpm_unconn_nossp:
+	branch lpm_unconn_cont				//BT/BLE discover don't infect lpm
+
+
+
+//-----------------------------------------------------------------G24 CMD----------------------------------------------------------------------
+//----------------------------------------------------------------------------------------------------------------------------------------------------
+p_module_hci_cmd_24g_rfenable:
+//1 : enable 0 : disable
+	call module_hci_event_receive_valid_cmd
+	ifetch 1,contru
+	branch p_module_hci_cmd_24g_rfdisable,blank
+	branch set_freq_tx
+p_module_hci_cmd_24g_rfdisable:	
+	branch shutdown_radio
+
+p_module_hci_cmd_set_24g_tx:
+	set0 mark_24g_rx,mark
+	call module_hci_event_receive_valid_cmd
+	branch p_g24_transmit_packet
+
+p_module_hci_cmd_set_24g_rx:
+	set1 mark_24g_rx,mark
+	call p_g24_receive_rxon
+	
+	branch module_hci_event_receive_valid_cmd
+
+//function : tx copy 24gdata into buffer waiting for enable is_tx
+p_module_hci_cmd_send_24g_data:
+	fetch 1,mem_module_uart_len
+	copy pdata,loopcnt
+	store 1,mem_24g_txpayload
+	arg mem_24g_txpayload+1,contw
+	call uart_copy_rx_bytes
+	branch module_hci_event_receive_valid_cmd
+//function : set  tx power
+p_module_hci_cmd_set_txpower:
+	ifetch 1,contru
+	store 1,mem_tx_power
+	call shutdown_radio
+	call set_freq_tx
+	branch module_hci_event_receive_valid_cmd
+
+
+p_module_hci_cmd_set_24g_channel:
+	ifetch 1,contru
+	store 1,mem_24g_ch
+	
+	branch module_hci_event_receive_valid_cmd
+p_module_hci_cmd_set_24g_addr:	
+	ifetch 4,contru
+	store 4,mem_24g_addr
+	call p_g24_update_addr_and_synccrc8
+	branch module_hci_event_receive_valid_cmd	
+	
+// calculate crc8
+p_g24_update_addr_and_synccrc8:	
+	store 4,mem_24g_addr
+
+//output: 1BYTE crc8
+p_g24_syncword_crc8:
+	arg 0,rega
+	arg 4,loopcnt
+	arg mem_24g_addr,contr
+p_g24_syncword_crc8_loop:
+	ifetch 1,contr
+	iadd rega,rega
+	loop p_g24_syncword_crc8_loop
+	copy rega,pdata
+	store 2,mem_24g_syncword
+	fetch 1,mem_24g_syncword
+	fetcht 1,mem_24g_syncword+1
+	iadd temp,pdata
+	store 1,mem_24g_syncword_crc8
+	rtn
+	
+p_module_hci_cmd_24g_send_ack_prep:
+	fetch 1,mem_module_uart_len
+	copy pdata,loopcnt
+	store 1,mem_24g_ackbuffer
+	arg mem_24g_ackbuffer+1,contw
+	call uart_copy_rx_bytes
+	branch module_hci_event_receive_valid_cmd
+	
+
+
+p_module_hci_cmd_24g_set_retransmit_time:
+//first byte 24g retransmit cnt  second byte 24g receive ack time
+	ifetch 1,contru
+	store 1,mem_24g_retransmit_cnt
+	ifetch 1,contru
+	mul32 pdata,120,pdata
+	store 2,mem_24g_rx_window
+	branch module_hci_event_receive_valid_cmd
+
+p_module_hci_cmd_set_no_ack:
+// 0: without ack 1"with ack
+	ifetch 1,contru
+	store 1,mem_24g_no_ack
+	branch module_hci_event_receive_valid_cmd
+
+//----------------------------------------------------------------------------------------------------------------------------------------------------------------------
+//----------------------------------------------------------------------------------------------------------------------------------------------------------------------
+
+//prepare 24g crc white 
+p_g24_prep:
+	disable enable_crc
+	disable enable_white
+	setarg 0x555555
+	iforce crc24_init
+	fetch 1,mem_24g_ch
+	reverse pdata,temp
+	set1 1,temp
+	rshift temp,white_init
+	rtn
+p_g24_sync_timeout:
+//	call p_rssi_noise
+//	branch p_g24_end_of_packet
+p_g24_end_of_packet:
+	disable encode_fec1
+	disable decode_fec1
+	disable encode_fec0
+	disable encode_fec2
+	disable decode_fec0
+	disable decode_fec2
+	disable enable_crc
+	disable encrypt
+	disable enable_white
+	until null,tx_clear
+	nop 100          /* flush out the last bit */
+	rtn
+
+
+
+
+/////////////////////////////////////////////////////////////            24G TX DISPATCH           ////////////////////////////////////////////////////////////////	
+p_g24_set_freq_tx:
+	call set_sync_on
+	fetcht 1,mem_24g_ch
+	branch set_freq_tx
+p_g24_transmit:
+	call le_enable
+	fetch 4,mem_24g_addr
+	iforce access
+	call p_g24_prep
+	call p_g24_set_freq_tx
+	
+	set1 TXGFSK,radio_ctrl
+	enable encode_fec0
+	enable is_tx
+	disable is_rx
+	rshift16 access,pdata
+	rshift8 pdata,pdata
+	rshift4 pdata,pdata
+	inject mod,40
+	disable encode_fec0
+	enable encode_fec1
+	enable enable_white
+	enable enable_crc
+	fetch 1,mem_24g_syncword_crc8
+	inject mod,8
+	fetch 1,mem_24g_txbuf		//first byte txpayload len
+	pincrease 1,pdata
+	iforce loopcnt
+	arg mem_24g_txbuf,contr
+p_g24tr_loop:
+	ifetch 1,contr
+	inject mod,8 //һֽڵ
+	loop p_g24tr_loop
+p_g24tx_end:	
+	enable enable_parity
+	inject mod,24	//crc
+	disable enable_parity
+	until null,tx_clear
+	nop 100
+	disable encode_fec0
+	disable encode_fec1
+	rtn
+	
+
+
+
+
+
+//2.4GTX whole process of  sending data
+p_g24_transmit_packet:
+	jam 0,mem_24g_retry
+p_g24_transmit_loop:
+//	arg param_rx_setup,timeup
+//	until clkn_rt,meet
+	call p_g24_transmit_receive_ack			//if receive ack won't enter retransmit and report ack data
+	nbranch p_g24_retransmit,user3
+	call p_g24_evt_receive_packet_report
+p_g24_transmit_abandon:
+	call p_g24_rx_interrupt_clear
+	setarg 0
+	store 2,mem_24g_txfail_cnt
+	rtn	
+
+p_g24_retransmit:
+	fetch 2,mem_24g_txfail_cnt
+	sub pdata,0x5,null
+	nbranch p_g24_evt_send_data_failed,positive
+
+	fetch 1,mem_24g_retry
+	increase 1,pdata
+	store 1,mem_24g_retry
+	
+	branch p_g24_transmit_loop
+
+//separate 2.4G send data and ACK data buffer send  
+p_g24_data_transmit_prep:
+	fetch 1,mem_24g_txpayload
+	pincrease 1
+	copy pdata,loopcnt
+	arg mem_24g_txpayload,contr
+	arg mem_24g_txbuf,contw
+	branch memcpy
+	
+//G24 Tx mode   tx->rx	
+p_g24_transmit_receive_ack:
+	disable user3
+	call p_g24_data_transmit_prep
+	call p_g24_transmit
+	fetch 1,mem_24g_no_ack
+	beq no_ack_24g,p_g24_transmit_no_ack	//tx no ack
+	force 0,radio_ctrl
+	fetch 4,mem_24g_addr
+	iforce access
+	fetcht 1,mem_last_freq
+	call set_freq_rx
+	call rf_rx_enable
+	call p_g24_receive_rxon
+	call p_g24_end_of_packet,user3
+	rtn
+p_g24_transmit_no_ack:
+	jam 0,mem_24g_rxbuf+1
+	enable user3
+	branch p_g24_end_of_packet
+
+
+
+
+/////////////////////////////////////////////////////////////            24G RX DISPATCH           ////////////////////////////////////////////////////////////////		
+//processing for pll time and 24g channel&addr
+p_g24_receive_packet:
+	call le_enable
+	fetch 4,mem_24g_addr
+	iforce access
+	call set_sync_on
+	fetcht 1,mem_24g_ch
+	call set_freq_rx
+	setarg param_pll_setup		//if changing the channel must waiting for pll time 
+	call sleep
+	call rf_rx_enable
+p_g24_receive_rxon:
+	call p_g24_prep
+	enable decode_fec0	
+	enable is_rx
+	disable is_tx
+	enable swfine
+	fetch 2,mem_24g_rx_window
+	iforce stop_watch
+	correlate null,timeout
+	nbranch p_g24_sync_timeout,sync
+	disable decode_fec0
+	enable decode_fec1
+	enable enable_white
+	enable enable_crc
+	parse demod,bucket,8
+	rshift3 pwindow,pdata
+	store 1,mem_24g_get_syncword_crc8
+	fetcht 1,mem_24g_syncword_crc8
+	isub temp,null
+	nbranch p_g24_end_of_packet,zero
+p_g24_receive_skip:
+	parse demod,bucket,8					//first byte is payload length
+	rshift3 pwindow,pdata
+	store 1,mem_24g_rxbuf
+	and pdata,0x1f,loopcnt	//max payload: 32bytes
+	branch p_g24rx_nopayload,zero
+p_g24rx_loop:
+	parse demod,bucket,8
+	rshift3 pwindow,pdata
+	istore 1,contw
+	loop p_g24rx_loop
+p_g24rx_nopayload:
+	parse demod,bucket,24					//check crc whether right or not
+//	enable swfine
+//	arg param_sifs,stop_watch	
+	rshift32 pdata,pdata
+	rshift16 pdata,pdata
+	istore 3,contw
+	disable decode_fec1
+	branch p_g24_end_of_packet,crc_failed
+	enable user3
+	fetch 1,mem_last_freq
+	add pdata,0,rega
+	call rf_write_freq
+	disable decode_fec0
+	call set_sync_on
+	fetch 1,mem_rssi_hex_received
+	copy pdata,rega
+	call p_rssi_signal
+	rtn
+
+
+//2.4GRX whole process of  receiving data
+p_g24_receive_packet_start:
+	call p_g24_receive_transmit_ack
+	nbranch p_g24_rx_interrupt_clear,user3
+	call p_g24_evt_receive_packet_report
+	disable user3
+	rtn
+
+
+	
+//G24 Rx mode   rx->tx
+p_g24_receive_transmit_ack:
+	call p_g24_rx_interrupt_clear
+	disable user3
+	call p_g24_receive_packet
+	nrtn user3
+	//jam 0,mem_test_log
+	fetch 1,mem_24g_no_ack
+	beq no_ack_24g,p_g24_end_of_packet	//tx no ack
+p_g24tx_with_ack:
+	call p_g24_ackpayload_prep
+	call p_g24_transmit
+	call p_g24_rx_interrupt_clear
+	branch p_g24_end_of_packet
+
+
+
+
+//Separate 2.4G send data and ACK data buffer send  
+p_g24_ackpayload_prep:
+	fetch 1,mem_24g_ackbuffer
+	pincrease 1
+	copy pdata,loopcnt
+	arg mem_24g_ackbuffer,contr
+	arg mem_24g_txbuf,contw
+	branch memcpy
+	
+
+p_g24_rx_interrupt_clear:
+	arg mem_24g_rxbuf,contw
+	arg 66,loopcnt
+	branch clear_mem
+
+
+//-----------------------------------------------------------------------------G24 EVT----------------------------------------------------------------------
+//---------------------------------------------------------------------------------------------------------------------------------------------------------------
+p_g24_evt_send_data_failed:
+	jam HCI_EVNET_SEND_DATA_FAIL,mem_module_uart_opcode
+	setarg 0
+	call module_hci_prepare_tx
+
+	branch uartd_send
+p_g24_evt_receive_packet_report:
+	jam HCI_EVENT_RECEIVE_24G_DATA,mem_module_uart_opcode
+	fetch 1,mem_24g_rxbuf
+	and pdata,0x1f,loopcnt	//max payload: 32bytes
+	rtn blank
+	copy pdata,loopcnt
+	call module_hci_prepare_tx
+	arg mem_24g_rxbuf+1,contr
+	call uart_copy_tx_bytes
+	branch uartd_send
+	
+	
+p_rssi_signal:
+	fetcht 1,mem_rssi_signal_index
+	setarg mem_rssi_signal_buf
+	iadd temp,contw
+	copy rega,pdata
+	istore 1,contw
+	increase 1,temp
+	and_into RSSI_BUF_LEN_SIGNAL,temp
+	storet 1,mem_rssi_signal_index
+	rtn
+p_rssi_noise:
+	call save_rssi
+	rtn blank
+	fetcht 1,mem_rssi_noise_index
+	arg mem_rssi_noise_buffer,rega
+	call p_rssi_store
+	storet 1,mem_rssi_noise_index
+	rtn
+
+p_rssi_store:
+	copy rega,pdata
+	iadd temp,contw
+	fetch 1,mem_rssi
+	istore 1,contw
+	increase 1,temp
+	and_into RSSI_BUF_LEN_NOISE,temp
+	rtn
+
+
+
+
+
+	
+
+
+
+
+
+
+
+
+p_g24_dispatch:
+	rtnmark0 mark_24g_rx
+	branch p_g24_receive_packet_start
+	
+
+
+p_keyboard_ble_init:
+	setarg 0x25
+ 	store 2,mem_le_pairing_handle
+
+ 	call le_set_config_fixed_ltk
+	call le_set_fixed_ltk
+	call le_set_justwork
+	branch le_set_config_read_authentication
+
+
+/*
+	ble bugfix
+*/
+
+/*
+	㲥շȴ100us
+*/
+p_le_transmit_receive_sifs:
+	call le_transmit
+	call set_sync_on
+	fetcht 1,mem_last_freq
+	call set_freq_rx
+	nop 1500
+	call rf_rx_enable
+	enable swfine
+	arg 5500,timeup 
+	branch le_receive_rxon
+
+
+p_le_receive_skip:
+	call save_rssi
+	enable enable_white
+	enable enable_crc
+	parse demod,bucket,8
+	rshift3 pwindow,pdata
+	store 1,mem_le_rxbuf
+	parse demod,bucket,8
+	rshift3 pwindow,pdata
+	istore 1,contw
+	copy pdata,loopcnt
+	branch lerx_nopayload,blank
+	branch lerx_loop
+
+
+/*
+	l2cap 
+*/
+p_le_parse:
+	rtnmark1 mark_old_packet
+	call le_fifo_check_full
+	nrtn blank
+	fetch 1,mem_le_rxbuf
+	and pdata,0x3,pdata
+	store 1,mem_le_packet_llid
+	ifetch 1,contr
+	store 1,mem_le_packet_size
+	rtn blank							//empty rtn
+	copy contr,pdata
+	store 2,mem_le_payload_ptr
+	fetch 1,mem_le_packet_llid
+	beq LLID_LE_LL,le_parse_ll
+	call le_check_l2cap_complete
+	arg wake_lock_ble_rx_patch,queue
+	nbranch lpm_get_wake_lock,user
+	call lpm_put_wake_lock
+	branch le_parse_l2cap + 3
+
+
+p_le_parse_l2cap:
+	ifetch 2,contr
+	beq LE_L2CAP_CID_ATT,le_parse_att
+	beq LE_L2CAP_CID_SMP,le_parse_smp
+	beq LE_L2CAP_CID_SIGNAL,le_parse_signaling
+	rtn
+
+/*
+	ܴ󲻽
+*/
+p_le_acknowledge:
+	call le_supervision_flush
+	call le_check_wak
+	fetch 1,mem_le_rxbuf
+	isolate1 md,pdata
+	setflag true,mark_ble_rx_md,mark
+	rshift pdata,pdata
+	ixor temp,pdata
+	isolate1 nesn,pdata
+	setflag true,mark_old_packet,mark	/* retransmit */
+	rtnmark1 mark_old_packet
+	fetch 1,mem_le_rxbuf+1			
+	branch le_ack_unenc,blank		/* empty packet, no decryption */
+	fetch 1,mem_le_state
+	bbit0 lestate_encryption,le_ack_unenc
+	call load_sk
+	call le_decrypt
+	nsetflag blank,mark_old_packet,mark
+	nrtn blank
+	branch le_ack_unenc
+
+
+
+/*
+ble keyboard event deal
+*/
+
+p_module_hci_event_start_enc:
+	jam HCI_EVENT_BLE_HID_CONNECT,mem_module_uart_opcode
+	branch module_hci_event_enter_standby_mode_len0
+
+p_module_hci_event_enc_info:
+	jam HCI_EVENT_BLE_ENC_INFO,mem_module_uart_opcode
+	setarg 28
+	call module_hci_prepare_tx
+	fetch 6,mem_le_lap
+	istore 6,contwu
+	fetch 6,mem_le_plap
+	istore 6,contwu
+	arg mem_le_ltk,contr
+	arg 16,loopcnt
+	call uart_copy_tx_bytes
+	branch uartd_send
+
+
+
+/*
+	¼
+*/
+//timer
+classic_shutter_process_baseband_connect:
+	jam 0,mem_classic_shutter_hid_disconn_count
+	jam 0,mem_classic_shutter_cable_unplug_conut	
+	rtn
+
+classic_shutter_process_baseband_disconnect:
+	call module_disconn_start
+	call classic_shutter_disconnect_clear_flag
+	fetch 2,mem_ui_state_map
+	rtnbit0 UI_STATE_BT_HID_CONNECT
+	set0 UI_STATE_BT_HID_CONNECT,pdata
+	store 2,mem_ui_state_map
+	jam HCI_EVENT_BT_HID_DISCONNECT,mem_module_uart_opcode
+	branch module_hci_event_enter_standby_mode_len0
+
+
+classic_shutter_disconnect_clear_flag:
+	jam APP_HANDSHAKE_NULL,mem_app_handshake_flag
+	jam 0,mem_hid_handshake_timer_count
+	jam 0,mem_unsniff2sniff_timer_count
+	jam 0,mem_classic_shutter_cable_unplug_conut
+	jam 0,mem_classic_shutter_hid_disconn_count
+	rtn
+
+classic_shutter_process_reconnect_failed:
+	call module_disconn_start
+	jam HCI_EVENT_BT_RECONNECT_FAIL,mem_module_uart_opcode
+	setarg 1
+	call module_hci_prepare_tx
+	setarg 0x00
+	istore 1,contwu
+	call uartd_send
+	branch app_disconn_reason_clear
+
+classic_shutter_process_setup_complete:
+	branch keyboard_stop_bluetooth_discovery
+
+classic_shutter_process_hid_connect:
+	setarg HID_HANDSHAKE_TIMEOUT
+	store 1,mem_hid_handshake_timer_count
+	rtn
+
+classic_shutter_process_hid_disconnect:
+	fetch 2,mem_ui_state_map
+	set0 UI_STATE_BT_HID_CONNECT,pdata
+	store 2,mem_ui_state_map
+	jam HCI_EVENT_BT_HID_DISCONNECT,mem_module_uart_opcode
+	call module_hci_event_enter_standby_mode_len0
+	jam 0,mem_classic_shutter_cable_unplug_conut	
+	setarg FLAG_SHUTTER_HID_DISCONN_TIMEOUT
+	store 1,mem_classic_shutter_hid_disconn_count
+	rtn
+
+classic_shutter_process_hid_handshake:
+	fetch 1,mem_app_handshake_flag
+	rtneq APP_HANDSHAKE_DONE
+	fetch 2,mem_ui_state_map
+	set1 UI_STATE_BT_HID_CONNECT,pdata
+	store 2,mem_ui_state_map
+	jam HCI_EVENT_BT_HID_CONNECT,mem_module_uart_opcode
+	call module_hci_event_enter_standby_mode_len0
+	jam APP_HANDSHAKE_DONE,mem_app_handshake_flag
+//	call app_lpm_mult_enable
+	call keyboard_stop_bluetooth_discovery
+	branch app_bt_enter_sniff
+
+classic_shutter_process_reconnect_page_timeout:
+	branch classic_shutter_process_reconnect_failed
+
+classic_shutter_process_virtual_cable_unplug:
+	setarg FLAG_SHUTTER_CABLE_UNPLUG_TIMEOUT
+	store 1,mem_classic_shutter_cable_unplug_conut
+	rtn
+
+classic_shutter_process_remote_unsniff:
+	branch app_start_auto_sniff
+
+classic_shutter_process_store_reconnect_information:
+	rtn
+
+classic_shutter_process_linkkey_generate:
+	branch p_module_hci_event_bt_enc_info
+p_module_hci_event_bt_enc_info:
+	jam HCI_EVENT_BT_ENC_INFO,mem_module_uart_opcode
+	setarg 28
+	call module_hci_prepare_tx
+	fetch 6,mem_lap
+	istore 6,contwu
+	fetch 6,mem_plap
+	istore 6,contwu
+	arg mem_link_key,contr
+	arg 16,loopcnt
+	call uart_copy_tx_bytes
+	branch uartd_send
+
+
+/*
+	bt keyboard timer
+*/
+classic_shutter_check_unplug_timer:
+	arg mem_classic_shutter_cable_unplug_conut,regc
+	arg classic_shutter_unplug_timeout,regb
+	branch timer_single_step
+	
+classic_shutter_unplug_timeout:
+	fetch 1,mem_CONTROL_tasks
+	set1  L2CAP_DISCONNECT_INTERRUPT, pdata
+	set1  L2CAP_DISCONNECT_CONTROL, pdata
+	store 1,mem_CONTROL_tasks	
+	rtn
+
+classic_shutter_hid_handshake_timer:
+	arg mem_hid_handshake_timer_count,regc
+	arg classic_shutter_process_hid_handshake,regb
+	branch timer_single_step
+
+classic_shutter_hid_disconn_timer:
+	arg mem_classic_shutter_hid_disconn_count,regc
+	arg app_bt_disconnect,regb
+	branch timer_single_step
+
+
+/*
+	bt keyboard send hid data
+*/
+
+
+bt_keyboard_send_hid_data:
+	call l2cap_malloc_is_fifo_nearly_full
+	nrtn blank
+	fetch 1,mem_module_uart_len
+	add pdata,1,rega
+	call hid_malloc_tx_buff
+	fetch 2,mem_hid_int_remote_cid
+	istore 2,contw
+	setarg 0xa1
+	istore 1,contw
+	fetch 1,mem_module_uart_len
+	copy pdata,loopcnt
+	call uart_copy_rx_bytes
+	branch module_hci_event_receive_valid_cmd
+
+
+p_moudle_hci_cmd_creat_bt_reconnect:
+	ifetch 6,contru
+	store 6,mem_lap
+	ifetch 6,contru
+	store 6,mem_hci_plap
+	arg mem_link_key,contw
+	arg 16,loopcnt
+	call uart_copy_rx_bytes
+	call check_link_key_load
+	call keyboard_stop_bluetooth_discovery
+	call app_bt_start_reconnect
+	branch module_hci_event_receive_valid_cmd
+
+
+/*
+	bt hid patch bugfix
+*/
+p_hid_rx_process:
+	fetch 2,mem_l2cap_payload_ptr
+	copy pdata,contr
+	ifetch 1,contr
+	and pdata,0x0f,temp
+	rshift4 pdata,pdata //hidtype
+	beq hid_type_set_idle,hid_rx_process_handshake
+	beq hid_type_set_protocol,hid_rx_process_handshake
+	beq hid_type_data,p_hid_rx_process_data
+	beq HID_TYPE_SET_REPORT,p_hid_rx_process_set_report
+	beq HID_TYPE_CONTROL,p_hid_rx_process_hid_control
+	beq HID_TYPE_GET_REPORT,hid_rx_process_handshake
+	rtn
+
+p_hid_rx_process_data:
+	ifetch 2,contr
+	store 2,mem_pdatatemp
+	beq HID_REPORT_ID_KB,p_hid_rx_process_data_hid_kb	
+	rtn
+
+p_hid_rx_process_data_hid_kb:
+	jam HCI_EVENT_RECEIVE_BT_HID_DATA,mem_module_uart_opcode
+	setarg 2
+	call module_hci_prepare_tx	
+	fetch 2,mem_pdatatemp
+	istore 2,contwu
+	branch uartd_send
+
+p_hid_rx_process_set_report:
+	call p_hid_rx_process_data
+	branch hid_rx_process_set_report+1
+
+p_hid_rx_process_hid_control:
+	copy temp,pdata
+	beq HID_CONTROL_P_VIRTUALCABLEUNPLUG,hid_rx_process_virtual_cable_unplug
+	jam 1,mem_suspend_flag
+	beq HID_CONTROL_P_SUSPEND,hid_rx_process_handshake
+	jam 0,mem_suspend_flag
+	beq HID_CONTROL_P_EXITSUSPEND,hid_rx_process_handshake
+	rtn
+
Index: rongyuan/program_patch/keyboard_24g_spec_code/patch_24g.prog
===================================================================
--- /YC3121_demo/ModuleDemo/BlueTooth/BT_code_patch/keyboard/branches/rongyuan/program_patch/keyboard_24g_spec_code/patch_24g.prog	(nonexistent)
+++ /YC3121_demo/ModuleDemo/BlueTooth/BT_code_patch/keyboard/branches/rongyuan/program_patch/keyboard_24g_spec_code/patch_24g.prog	(working copy)
@@ -0,0 +1,411 @@
+//-----------------------------------------------------------------G24 CMD----------------------------------------------------------------------
+//----------------------------------------------------------------------------------------------------------------------------------------------------
+p_module_hci_cmd_24g_rfenable:
+//1 : enable 0 : disable
+	call module_hci_event_receive_valid_cmd
+	ifetch 1,contru
+	branch p_module_hci_cmd_24g_rfdisable,blank
+	branch set_freq_tx
+p_module_hci_cmd_24g_rfdisable:	
+	branch shutdown_radio
+
+p_module_hci_cmd_set_24g_tx:
+	set0 mark_24g_rx,mark
+	call module_hci_event_receive_valid_cmd
+	branch p_g24_transmit_packet
+
+p_module_hci_cmd_set_24g_rx:
+	set1 mark_24g_rx,mark
+	call p_g24_receive_rxon
+	
+	branch module_hci_event_receive_valid_cmd
+
+//function : tx copy 24gdata into buffer waiting for enable is_tx
+p_module_hci_cmd_send_24g_data:
+	fetch 1,mem_module_uart_len
+	copy pdata,loopcnt
+	store 1,mem_24g_txpayload
+	arg mem_24g_txpayload+1,contw
+	call uart_copy_rx_bytes
+	branch module_hci_event_receive_valid_cmd
+//function : set  tx power
+p_module_hci_cmd_set_txpower:
+	ifetch 1,contru
+	store 1,mem_tx_power
+	call shutdown_radio
+	call set_freq_tx
+	branch module_hci_event_receive_valid_cmd
+
+
+p_module_hci_cmd_set_24g_channel:
+	ifetch 1,contru
+	store 1,mem_24g_ch
+	
+	branch module_hci_event_receive_valid_cmd
+p_module_hci_cmd_set_24g_addr:	
+	ifetch 4,contru
+	store 4,mem_24g_addr
+	call p_g24_update_addr_and_synccrc8
+	branch module_hci_event_receive_valid_cmd	
+	
+// calculate crc8
+p_g24_update_addr_and_synccrc8:	
+	store 4,mem_24g_addr
+
+//output: 1BYTE crc8
+p_g24_syncword_crc8:
+	arg 0,rega
+	arg 4,loopcnt
+	arg mem_24g_addr,contr
+p_g24_syncword_crc8_loop:
+	ifetch 1,contr
+	iadd rega,rega
+	loop p_g24_syncword_crc8_loop
+	copy rega,pdata
+	store 2,mem_24g_syncword
+	fetch 1,mem_24g_syncword
+	fetcht 1,mem_24g_syncword+1
+	iadd temp,pdata
+	store 1,mem_24g_syncword_crc8
+	rtn
+	
+p_module_hci_cmd_24g_send_ack_prep:
+	fetch 1,mem_module_uart_len
+	copy pdata,loopcnt
+	store 1,mem_24g_ackbuffer
+	arg mem_24g_ackbuffer+1,contw
+	call uart_copy_rx_bytes
+	branch module_hci_event_receive_valid_cmd
+	
+
+
+p_module_hci_cmd_24g_set_retransmit_time:
+//first byte 24g retransmit cnt  second byte 24g receive ack time
+	ifetch 1,contru
+	store 1,mem_24g_retransmit_cnt
+	ifetch 1,contru
+	mul32 pdata,120,pdata
+	store 2,mem_24g_rx_window
+	branch module_hci_event_receive_valid_cmd
+
+p_module_hci_cmd_set_no_ack:
+// 0: without ack 1"with ack
+	ifetch 1,contru
+	store 1,mem_24g_no_ack
+	branch module_hci_event_receive_valid_cmd
+
+//----------------------------------------------------------------------------------------------------------------------------------------------------------------------
+//----------------------------------------------------------------------------------------------------------------------------------------------------------------------
+
+//prepare 24g crc white 
+p_g24_prep:
+	disable enable_crc
+	disable enable_white
+	setarg 0x555555
+	iforce crc24_init
+	fetch 1,mem_24g_ch
+	reverse pdata,temp
+	set1 1,temp
+	rshift temp,white_init
+	rtn
+p_g24_sync_timeout:
+//	call p_rssi_noise
+//	branch p_g24_end_of_packet
+p_g24_end_of_packet:
+	disable encode_fec1
+	disable decode_fec1
+	disable encode_fec0
+	disable encode_fec2
+	disable decode_fec0
+	disable decode_fec2
+	disable enable_crc
+	disable encrypt
+	disable enable_white
+	until null,tx_clear
+	nop 100          /* flush out the last bit */
+	rtn
+
+
+
+
+/////////////////////////////////////////////////////////////            24G TX DISPATCH           ////////////////////////////////////////////////////////////////	
+p_g24_set_freq_tx:
+	call set_sync_on
+	fetcht 1,mem_24g_ch
+	branch set_freq_tx
+p_g24_transmit:
+	call le_enable
+	fetch 4,mem_24g_addr
+	iforce access
+	call p_g24_prep
+	call p_g24_set_freq_tx
+	
+	set1 TXGFSK,radio_ctrl
+	enable encode_fec0
+	enable is_tx
+	disable is_rx
+	rshift16 access,pdata
+	rshift8 pdata,pdata
+	rshift4 pdata,pdata
+	inject mod,40
+	disable encode_fec0
+	enable encode_fec1
+	enable enable_white
+	enable enable_crc
+	fetch 1,mem_24g_syncword_crc8
+	inject mod,8
+	fetch 1,mem_24g_txbuf		//first byte txpayload len
+	pincrease 1,pdata
+	iforce loopcnt
+	arg mem_24g_txbuf,contr
+p_g24tr_loop:
+	ifetch 1,contr
+	inject mod,8 //һֽڵ
+	loop p_g24tr_loop
+p_g24tx_end:	
+	enable enable_parity
+	inject mod,24	//crc
+	disable enable_parity
+	until null,tx_clear
+	nop 100
+	disable encode_fec0
+	disable encode_fec1
+	rtn
+	
+
+
+
+
+
+//2.4GTX whole process of  sending data
+p_g24_transmit_packet:
+	jam 0,mem_24g_retry
+p_g24_transmit_loop:
+//	arg param_rx_setup,timeup
+//	until clkn_rt,meet
+	call p_g24_transmit_receive_ack			//if receive ack won't enter retransmit and report ack data
+	nbranch p_g24_retransmit,user3
+	call p_g24_evt_receive_packet_report
+p_g24_transmit_abandon:
+	call p_g24_rx_interrupt_clear
+	setarg 0
+	store 2,mem_24g_txfail_cnt
+	rtn	
+
+p_g24_retransmit:
+	fetch 2,mem_24g_txfail_cnt
+	sub pdata,0x5,null
+	nbranch p_g24_evt_send_data_failed,positive
+
+	fetch 1,mem_24g_retry
+	increase 1,pdata
+	store 1,mem_24g_retry
+	
+	branch p_g24_transmit_loop
+
+//separate 2.4G send data and ACK data buffer send  
+p_g24_data_transmit_prep:
+	fetch 1,mem_24g_txpayload
+	pincrease 1
+	copy pdata,loopcnt
+	arg mem_24g_txpayload,contr
+	arg mem_24g_txbuf,contw
+	branch memcpy
+	
+//G24 Tx mode   tx->rx	
+p_g24_transmit_receive_ack:
+	disable user3
+	call p_g24_data_transmit_prep
+	call p_g24_transmit
+	fetch 1,mem_24g_no_ack
+	beq no_ack_24g,p_g24_transmit_no_ack	//tx no ack
+	force 0,radio_ctrl
+	fetch 4,mem_24g_addr
+	iforce access
+	fetcht 1,mem_last_freq
+	call set_freq_rx
+	call rf_rx_enable
+	call p_g24_receive_rxon
+	call p_g24_end_of_packet,user3
+	rtn
+p_g24_transmit_no_ack:
+	jam 0,mem_24g_rxbuf+1
+	enable user3
+	branch p_g24_end_of_packet
+
+
+
+
+/////////////////////////////////////////////////////////////            24G RX DISPATCH           ////////////////////////////////////////////////////////////////		
+//processing for pll time and 24g channel&addr
+p_g24_receive_packet:
+	call le_enable
+	fetch 4,mem_24g_addr
+	iforce access
+	call set_sync_on
+	fetcht 1,mem_24g_ch
+	call set_freq_rx
+	setarg param_pll_setup		//if changing the channel must waiting for pll time 
+	call sleep
+	call rf_rx_enable
+p_g24_receive_rxon:
+	call p_g24_prep
+	enable decode_fec0	
+	enable is_rx
+	disable is_tx
+	enable swfine
+	fetch 2,mem_24g_rx_window
+	iforce stop_watch
+	correlate null,timeout
+	nbranch p_g24_sync_timeout,sync
+	disable decode_fec0
+	enable decode_fec1
+	enable enable_white
+	enable enable_crc
+	parse demod,bucket,8
+	rshift3 pwindow,pdata
+	store 1,mem_24g_get_syncword_crc8
+	fetcht 1,mem_24g_syncword_crc8
+	isub temp,null
+	nbranch p_g24_end_of_packet,zero
+p_g24_receive_skip:
+	parse demod,bucket,8					//first byte is payload length
+	rshift3 pwindow,pdata
+	store 1,mem_24g_rxbuf
+	and pdata,0x1f,loopcnt	//max payload: 32bytes
+	branch p_g24rx_nopayload,zero
+p_g24rx_loop:
+	parse demod,bucket,8
+	rshift3 pwindow,pdata
+	istore 1,contw
+	loop p_g24rx_loop
+p_g24rx_nopayload:
+	parse demod,bucket,24					//check crc whether right or not
+//	enable swfine
+//	arg param_sifs,stop_watch	
+	rshift32 pdata,pdata
+	rshift16 pdata,pdata
+	istore 3,contw
+	disable decode_fec1
+	branch p_g24_end_of_packet,crc_failed
+	enable user3
+	fetch 1,mem_last_freq
+	add pdata,0,rega
+	call rf_write_freq
+	disable decode_fec0
+	call set_sync_on
+	fetch 1,mem_rssi_hex_received
+	copy pdata,rega
+	call p_rssi_signal
+	rtn
+
+
+//2.4GRX whole process of  receiving data
+p_g24_receive_packet_start:
+	call p_g24_receive_transmit_ack
+	nbranch p_g24_rx_interrupt_clear,user3
+	call p_g24_evt_receive_packet_report
+	disable user3
+	rtn
+
+
+	
+//G24 Rx mode   rx->tx
+p_g24_receive_transmit_ack:
+	call p_g24_rx_interrupt_clear
+	disable user3
+	call p_g24_receive_packet
+	nrtn user3
+	//jam 0,mem_test_log
+	fetch 1,mem_24g_no_ack
+	beq no_ack_24g,p_g24_end_of_packet	//tx no ack
+p_g24tx_with_ack:
+	call p_g24_ackpayload_prep
+	call p_g24_transmit
+	call p_g24_rx_interrupt_clear
+	branch p_g24_end_of_packet
+
+
+
+
+//Separate 2.4G send data and ACK data buffer send  
+p_g24_ackpayload_prep:
+	fetch 1,mem_24g_ackbuffer
+	pincrease 1
+	copy pdata,loopcnt
+	arg mem_24g_ackbuffer,contr
+	arg mem_24g_txbuf,contw
+	branch memcpy
+	
+
+p_g24_rx_interrupt_clear:
+	arg mem_24g_rxbuf,contw
+	arg 66,loopcnt
+	branch clear_mem
+
+
+//-----------------------------------------------------------------------------G24 EVT----------------------------------------------------------------------
+//---------------------------------------------------------------------------------------------------------------------------------------------------------------
+p_g24_evt_send_data_failed:
+	jam HCI_EVNET_SEND_DATA_FAIL,mem_module_uart_opcode
+	setarg 0
+	call module_hci_prepare_tx
+
+	branch uartd_send
+p_g24_evt_receive_packet_report:
+	jam HCI_EVENT_RECEIVE_24G_DATA,mem_module_uart_opcode
+	fetch 1,mem_24g_rxbuf
+	and pdata,0x1f,loopcnt	//max payload: 32bytes
+	rtn blank
+	copy pdata,loopcnt
+	call module_hci_prepare_tx
+	arg mem_24g_rxbuf+1,contr
+	call uart_copy_tx_bytes
+	branch uartd_send
+	
+	
+p_rssi_signal:
+	fetcht 1,mem_rssi_signal_index
+	setarg mem_rssi_signal_buf
+	iadd temp,contw
+	copy rega,pdata
+	istore 1,contw
+	increase 1,temp
+	and_into RSSI_BUF_LEN_SIGNAL,temp
+	storet 1,mem_rssi_signal_index
+	rtn
+p_rssi_noise:
+	call save_rssi
+	rtn blank
+	fetcht 1,mem_rssi_noise_index
+	arg mem_rssi_noise_buffer,rega
+	call p_rssi_store
+	storet 1,mem_rssi_noise_index
+	rtn
+
+p_rssi_store:
+	copy rega,pdata
+	iadd temp,contw
+	fetch 1,mem_rssi
+	istore 1,contw
+	increase 1,temp
+	and_into RSSI_BUF_LEN_NOISE,temp
+	rtn
+
+
+
+
+
+	
+
+
+
+
+
+
+
+
+p_g24_dispatch:
+	rtnmark0 mark_24g_rx
+	branch p_g24_receive_packet_start
+	
Index: rongyuan/program_patch/keyboard_ble_spec_code/patch_ble.prog
===================================================================
--- /YC3121_demo/ModuleDemo/BlueTooth/BT_code_patch/keyboard/branches/rongyuan/program_patch/keyboard_ble_spec_code/patch_ble.prog	(nonexistent)
+++ /YC3121_demo/ModuleDemo/BlueTooth/BT_code_patch/keyboard/branches/rongyuan/program_patch/keyboard_ble_spec_code/patch_ble.prog	(working copy)
@@ -0,0 +1,102 @@
+
+
+p_keyboard_ble_init:
+	setarg 0x25
+ 	store 2,mem_le_pairing_handle
+
+ 	call le_set_config_fixed_ltk
+	call le_set_fixed_ltk
+	call le_set_justwork
+	branch le_set_config_read_authentication
+
+
+/*
+	ble bugfix
+*/
+
+/*
+	㲥շȴ100us
+*/
+p_le_transmit_receive_sifs:
+	call le_transmit
+	call set_sync_on
+	fetcht 1,mem_last_freq
+	call set_freq_rx
+	nop 1500
+	call rf_rx_enable
+	enable swfine
+	arg 5500,timeup 
+	branch le_receive_rxon
+
+
+p_le_receive_skip:
+	call save_rssi
+	enable enable_white
+	enable enable_crc
+	parse demod,bucket,8
+	rshift3 pwindow,pdata
+	store 1,mem_le_rxbuf
+	parse demod,bucket,8
+	rshift3 pwindow,pdata
+	istore 1,contw
+	copy pdata,loopcnt
+	branch lerx_nopayload,blank
+	branch lerx_loop
+
+
+/*
+	l2cap 
+*/
+p_le_parse:
+	rtnmark1 mark_old_packet
+	call le_fifo_check_full
+	nrtn blank
+	fetch 1,mem_le_rxbuf
+	and pdata,0x3,pdata
+	store 1,mem_le_packet_llid
+	ifetch 1,contr
+	store 1,mem_le_packet_size
+	rtn blank							//empty rtn
+	copy contr,pdata
+	store 2,mem_le_payload_ptr
+	fetch 1,mem_le_packet_llid
+	beq LLID_LE_LL,le_parse_ll
+	call le_check_l2cap_complete
+	arg wake_lock_ble_rx_patch,queue
+	nbranch lpm_get_wake_lock,user
+	call lpm_put_wake_lock
+	branch le_parse_l2cap + 3
+
+
+p_le_parse_l2cap:
+	ifetch 2,contr
+	beq LE_L2CAP_CID_ATT,le_parse_att
+	beq LE_L2CAP_CID_SMP,le_parse_smp
+	beq LE_L2CAP_CID_SIGNAL,le_parse_signaling
+	rtn
+
+/*
+	ܴ󲻽
+*/
+p_le_acknowledge:
+	call le_supervision_flush
+	call le_check_wak
+	fetch 1,mem_le_rxbuf
+	isolate1 md,pdata
+	setflag true,mark_ble_rx_md,mark
+	rshift pdata,pdata
+	ixor temp,pdata
+	isolate1 nesn,pdata
+	setflag true,mark_old_packet,mark	/* retransmit */
+	rtnmark1 mark_old_packet
+	fetch 1,mem_le_rxbuf+1			
+	branch le_ack_unenc,blank		/* empty packet, no decryption */
+	fetch 1,mem_le_state
+	bbit0 lestate_encryption,le_ack_unenc
+	call load_sk
+	call le_decrypt
+	nsetflag blank,mark_old_packet,mark
+	nrtn blank
+	branch le_ack_unenc
+
+
Index: rongyuan/program_patch/keyboard_ble_spec_code/patch_ble_event_deal.prog
===================================================================
--- /YC3121_demo/ModuleDemo/BlueTooth/BT_code_patch/keyboard/branches/rongyuan/program_patch/keyboard_ble_spec_code/patch_ble_event_deal.prog	(nonexistent)
+++ /YC3121_demo/ModuleDemo/BlueTooth/BT_code_patch/keyboard/branches/rongyuan/program_patch/keyboard_ble_spec_code/patch_ble_event_deal.prog	(working copy)
@@ -0,0 +1,22 @@
+
+/*
+ble keyboard event deal
+*/
+
+p_module_hci_event_start_enc:
+	jam HCI_EVENT_BLE_HID_CONNECT,mem_module_uart_opcode
+	branch module_hci_event_enter_standby_mode_len0
+
+p_module_hci_event_enc_info:
+	jam HCI_EVENT_BLE_ENC_INFO,mem_module_uart_opcode
+	setarg 28
+	call module_hci_prepare_tx
+	fetch 6,mem_le_lap
+	istore 6,contwu
+	fetch 6,mem_le_plap
+	istore 6,contwu
+	arg mem_le_ltk,contr
+	arg 16,loopcnt
+	call uart_copy_tx_bytes
+	branch uartd_send
+
Index: /YC3121_demo/ModuleDemo/BlueTooth/BT_code_patch/keyboard/branches/rongyuan/program_patch/keyboard_ble_spec_code/patch_ble_l2cap_att.prog	(added)
===================================================================
--- /YC3121_demo/ModuleDemo/BlueTooth/BT_code_patch/keyboard/branches/rongyuan/program_patch/keyboard_ble_spec_code/patch_ble_l2cap_att.prog	(revision 0)
+++ /YC3121_demo/ModuleDemo/BlueTooth/BT_code_patch/keyboard/branches/rongyuan/program_patch/keyboard_ble_spec_code/patch_ble_l2cap_att.prog	(revision 0)
Index: /YC3121_demo/ModuleDemo/BlueTooth/BT_code_patch/keyboard/branches/rongyuan/program_patch/keyboard_ble_spec_code/patch_ble_l2cap_signalling.prog	(added)
===================================================================
--- /YC3121_demo/ModuleDemo/BlueTooth/BT_code_patch/keyboard/branches/rongyuan/program_patch/keyboard_ble_spec_code/patch_ble_l2cap_signalling.prog	(revision 0)
+++ /YC3121_demo/ModuleDemo/BlueTooth/BT_code_patch/keyboard/branches/rongyuan/program_patch/keyboard_ble_spec_code/patch_ble_l2cap_signalling.prog	(revision 0)
Index: /YC3121_demo/ModuleDemo/BlueTooth/BT_code_patch/keyboard/branches/rongyuan/program_patch/keyboard_ble_spec_code/patch_ble_l2cap_smp.prog	(added)
===================================================================
--- /YC3121_demo/ModuleDemo/BlueTooth/BT_code_patch/keyboard/branches/rongyuan/program_patch/keyboard_ble_spec_code/patch_ble_l2cap_smp.prog	(revision 0)
+++ /YC3121_demo/ModuleDemo/BlueTooth/BT_code_patch/keyboard/branches/rongyuan/program_patch/keyboard_ble_spec_code/patch_ble_l2cap_smp.prog	(revision 0)
Index: /YC3121_demo/ModuleDemo/BlueTooth/BT_code_patch/keyboard/branches/rongyuan/program_patch/keyboard_ble_spec_code/patch_ble_ll.prog	(added)
===================================================================
--- /YC3121_demo/ModuleDemo/BlueTooth/BT_code_patch/keyboard/branches/rongyuan/program_patch/keyboard_ble_spec_code/patch_ble_ll.prog	(revision 0)
+++ /YC3121_demo/ModuleDemo/BlueTooth/BT_code_patch/keyboard/branches/rongyuan/program_patch/keyboard_ble_spec_code/patch_ble_ll.prog	(revision 0)
Index: rongyuan/program_patch/keyboard_bt_spec_code/patch_bt_event_deal.prog
===================================================================
--- /YC3121_demo/ModuleDemo/BlueTooth/BT_code_patch/keyboard/branches/rongyuan/program_patch/keyboard_bt_spec_code/patch_bt_event_deal.prog	(nonexistent)
+++ /YC3121_demo/ModuleDemo/BlueTooth/BT_code_patch/keyboard/branches/rongyuan/program_patch/keyboard_bt_spec_code/patch_bt_event_deal.prog	(working copy)
@@ -0,0 +1,162 @@
+
+
+/*
+	¼
+*/
+//timer
+classic_shutter_process_baseband_connect:
+	jam 0,mem_classic_shutter_hid_disconn_count
+	jam 0,mem_classic_shutter_cable_unplug_conut	
+	rtn
+
+classic_shutter_process_baseband_disconnect:
+	call module_disconn_start
+	call classic_shutter_disconnect_clear_flag
+	fetch 2,mem_ui_state_map
+	rtnbit0 UI_STATE_BT_HID_CONNECT
+	set0 UI_STATE_BT_HID_CONNECT,pdata
+	store 2,mem_ui_state_map
+	jam HCI_EVENT_BT_HID_DISCONNECT,mem_module_uart_opcode
+	branch module_hci_event_enter_standby_mode_len0
+
+
+classic_shutter_disconnect_clear_flag:
+	jam APP_HANDSHAKE_NULL,mem_app_handshake_flag
+	jam 0,mem_hid_handshake_timer_count
+	jam 0,mem_unsniff2sniff_timer_count
+	jam 0,mem_classic_shutter_cable_unplug_conut
+	jam 0,mem_classic_shutter_hid_disconn_count
+	rtn
+
+classic_shutter_process_reconnect_failed:
+	call module_disconn_start
+	jam HCI_EVENT_BT_RECONNECT_FAIL,mem_module_uart_opcode
+	setarg 1
+	call module_hci_prepare_tx
+	setarg 0x00
+	istore 1,contwu
+	call uartd_send
+	branch app_disconn_reason_clear
+
+classic_shutter_process_setup_complete:
+	branch keyboard_stop_bluetooth_discovery
+
+classic_shutter_process_hid_connect:
+	setarg HID_HANDSHAKE_TIMEOUT
+	store 1,mem_hid_handshake_timer_count
+	rtn
+
+classic_shutter_process_hid_disconnect:
+	fetch 2,mem_ui_state_map
+	set0 UI_STATE_BT_HID_CONNECT,pdata
+	store 2,mem_ui_state_map
+	jam HCI_EVENT_BT_HID_DISCONNECT,mem_module_uart_opcode
+	call module_hci_event_enter_standby_mode_len0
+	jam 0,mem_classic_shutter_cable_unplug_conut	
+	setarg FLAG_SHUTTER_HID_DISCONN_TIMEOUT
+	store 1,mem_classic_shutter_hid_disconn_count
+	rtn
+
+classic_shutter_process_hid_handshake:
+	fetch 1,mem_app_handshake_flag
+	rtneq APP_HANDSHAKE_DONE
+	fetch 2,mem_ui_state_map
+	set1 UI_STATE_BT_HID_CONNECT,pdata
+	store 2,mem_ui_state_map
+	jam HCI_EVENT_BT_HID_CONNECT,mem_module_uart_opcode
+	call module_hci_event_enter_standby_mode_len0
+	jam APP_HANDSHAKE_DONE,mem_app_handshake_flag
+//	call app_lpm_mult_enable
+	call keyboard_stop_bluetooth_discovery
+	branch app_bt_enter_sniff
+
+classic_shutter_process_reconnect_page_timeout:
+	branch classic_shutter_process_reconnect_failed
+
+classic_shutter_process_virtual_cable_unplug:
+	setarg FLAG_SHUTTER_CABLE_UNPLUG_TIMEOUT
+	store 1,mem_classic_shutter_cable_unplug_conut
+	rtn
+
+classic_shutter_process_remote_unsniff:
+	branch app_start_auto_sniff
+
+classic_shutter_process_store_reconnect_information:
+	rtn
+
+classic_shutter_process_linkkey_generate:
+	branch p_module_hci_event_bt_enc_info
+p_module_hci_event_bt_enc_info:
+	jam HCI_EVENT_BT_ENC_INFO,mem_module_uart_opcode
+	setarg 28
+	call module_hci_prepare_tx
+	fetch 6,mem_lap
+	istore 6,contwu
+	fetch 6,mem_plap
+	istore 6,contwu
+	arg mem_link_key,contr
+	arg 16,loopcnt
+	call uart_copy_tx_bytes
+	branch uartd_send
+
+
+/*
+	bt keyboard timer
+*/
+classic_shutter_check_unplug_timer:
+	arg mem_classic_shutter_cable_unplug_conut,regc
+	arg classic_shutter_unplug_timeout,regb
+	branch timer_single_step
+	
+classic_shutter_unplug_timeout:
+	fetch 1,mem_CONTROL_tasks
+	set1  L2CAP_DISCONNECT_INTERRUPT, pdata
+	set1  L2CAP_DISCONNECT_CONTROL, pdata
+	store 1,mem_CONTROL_tasks	
+	rtn
+
+classic_shutter_hid_handshake_timer:
+	arg mem_hid_handshake_timer_count,regc
+	arg classic_shutter_process_hid_handshake,regb
+	branch timer_single_step
+
+classic_shutter_hid_disconn_timer:
+	arg mem_classic_shutter_hid_disconn_count,regc
+	arg app_bt_disconnect,regb
+	branch timer_single_step
+
+
+/*
+	bt keyboard send hid data
+*/
+
+
+bt_keyboard_send_hid_data:
+	call l2cap_malloc_is_fifo_nearly_full
+	nrtn blank
+	fetch 1,mem_module_uart_len
+	add pdata,1,rega
+	call hid_malloc_tx_buff
+	fetch 2,mem_hid_int_remote_cid
+	istore 2,contw
+	setarg 0xa1
+	istore 1,contw
+	fetch 1,mem_module_uart_len
+	copy pdata,loopcnt
+	call uart_copy_rx_bytes
+	branch module_hci_event_receive_valid_cmd
+
+
+p_moudle_hci_cmd_creat_bt_reconnect:
+	ifetch 6,contru
+	store 6,mem_lap
+	ifetch 6,contru
+	store 6,mem_hci_plap
+	arg mem_link_key,contw
+	arg 16,loopcnt
+	call uart_copy_rx_bytes
+	call check_link_key_load
+	call keyboard_stop_bluetooth_discovery
+	call app_bt_start_reconnect
+	branch module_hci_event_receive_valid_cmd
+
Index: rongyuan/program_patch/keyboard_bt_spec_code/patch_bt_hid.prog
===================================================================
--- /YC3121_demo/ModuleDemo/BlueTooth/BT_code_patch/keyboard/branches/rongyuan/program_patch/keyboard_bt_spec_code/patch_bt_hid.prog	(nonexistent)
+++ /YC3121_demo/ModuleDemo/BlueTooth/BT_code_patch/keyboard/branches/rongyuan/program_patch/keyboard_bt_spec_code/patch_bt_hid.prog	(working copy)
@@ -0,0 +1,45 @@
+
+/*
+	bt hid patch bugfix
+*/
+p_hid_rx_process:
+	fetch 2,mem_l2cap_payload_ptr
+	copy pdata,contr
+	ifetch 1,contr
+	and pdata,0x0f,temp
+	rshift4 pdata,pdata //hidtype
+	beq hid_type_set_idle,hid_rx_process_handshake
+	beq hid_type_set_protocol,hid_rx_process_handshake
+	beq hid_type_data,p_hid_rx_process_data
+	beq HID_TYPE_SET_REPORT,p_hid_rx_process_set_report
+	beq HID_TYPE_CONTROL,p_hid_rx_process_hid_control
+	beq HID_TYPE_GET_REPORT,hid_rx_process_handshake
+	rtn
+
+p_hid_rx_process_data:
+	ifetch 2,contr
+	store 2,mem_pdatatemp
+	beq HID_REPORT_ID_KB,p_hid_rx_process_data_hid_kb	
+	rtn
+
+p_hid_rx_process_data_hid_kb:
+	jam HCI_EVENT_RECEIVE_BT_HID_DATA,mem_module_uart_opcode
+	setarg 2
+	call module_hci_prepare_tx	
+	fetch 2,mem_pdatatemp
+	istore 2,contwu
+	branch uartd_send
+
+p_hid_rx_process_set_report:
+	call p_hid_rx_process_data
+	branch hid_rx_process_set_report+1
+
+p_hid_rx_process_hid_control:
+	copy temp,pdata
+	beq HID_CONTROL_P_VIRTUALCABLEUNPLUG,hid_rx_process_virtual_cable_unplug
+	jam 1,mem_suspend_flag
+	beq HID_CONTROL_P_SUSPEND,hid_rx_process_handshake
+	jam 0,mem_suspend_flag
+	beq HID_CONTROL_P_EXITSUSPEND,hid_rx_process_handshake
+	rtn
+
Index: rongyuan/program_patch/main_patch.prog
===================================================================
--- /YC3121_demo/ModuleDemo/BlueTooth/BT_code_patch/keyboard/branches/rongyuan/program_patch/main_patch.prog	(nonexistent)
+++ /YC3121_demo/ModuleDemo/BlueTooth/BT_code_patch/keyboard/branches/rongyuan/program_patch/main_patch.prog	(working copy)
@@ -0,0 +1,748 @@
+
+define TX_POWER_MAX
+//define OTP
+/******************************************/
+/**************   Start   *****************/
+/******************************************/
+
+p_start:
+	bbit1 8,pf_patch_ext
+	//LPM exen bugfix
+	beq patch00_1,p_soft_reset
+	beq patch00_3,p_main_loop
+	beq patch10_5,p_shutdown_radio
+	beq patch11_1,p_set_freq_tx
+	//LMP bugfix
+	beq patch12_4,p_ahead_window
+	beq patch14_2,p_init_param
+	//LMP bugfix	
+	beq patch14_3,p_lpm_adjust_clk
+	beq patch15_1,p_lpm_dispatch_next
+	beq patch15_4,p_lpm_unconn_nossp
+	
+//	beq patch16_1,p_lpm_check_wake_lock
+	beq patch17_0,p_module_init
+	beq patch17_3,p_module_hci_cmd_control
+	beq patch17_4,p_module_hci_cmd_transmit_le_notify
+	beq patch17_6,p_hid_rx_process
+	branch assert
+pf_patch_ext:
+
+	beq patch20_3,p_le_receive_skip
+	beq patch20_5,p_le_transmit_receive_sifs
+	beq patch20_6,p_le_transmit
+	beq patch22_3,p_le_acknowledge
+	beq patch23_7,p_le_parse
+	beq patch24_1,p_le_parse_l2cap
+	beq patch26_0,p_le_modified_name
+	beq patch27_4,p_parse_lmp_accepted
+	beq patch27_2,p_parse_lmp
+	beq patch27_5,p_parse_lmp_not_accepted
+	beq patch27_6,p_send_lmp
+	beq patch28_1,p_ssp_disable
+	beq patch33_1,p_sp_initialize_256
+	beq patch34_2,p_check_51cmd_once
+	branch assert
+p_check_51cmd_once:
+	copy temp,pdata
+	rtn blank
+	beq BT_CMD_START_UNCONN_ADV,p_check_51cmd_unconn_adv
+	branch check_51cmd_once+8
+p_check_51cmd_unconn_adv:
+	jam ON,mem_le_adv_enable
+	jam ADV_NONCONN_IND,mem_le_adv_type
+	fetch 2,mem_ui_state_map
+	set1 UI_STATE_BLE_ADV,pdata
+	store 2,mem_ui_state_map
+	rtn
+
+app_ble_start_unconn_adv:
+	jam BT_CMD_START_UNCONN_ADV,mem_fifo_temp
+	branch ui_ipc_send_cmd
+
+p_le_modified_name:
+	call le_modified_name_att_list
+	branch p_le_modified_name_adv
+
+p_le_modified_name_adv:
+	arg mem_le_scan_data_len+32,regc
+	arg mem_le_scan_data,rega
+	call le_modified_name_adv_and_scan
+	rtn
+	
+	
+p_module_init:
+	setarg p_module_process_bb_event
+	store 2,mem_cb_bb_event_process
+
+	setarg p_module_bb_event_timer
+	store 2,mem_cb_event_timer
+
+	setarg p_module_le_receive_data
+	store 2,mem_cb_att_write
+
+	setarg p_module_lpm_lock
+	store 2,mem_cb_check_wakelock
+
+	setarg p_module_bt_conn_process
+	store 2,mem_cb_bt_process
+
+	call p_keyboard_ble_init
+
+	call module_lpm_uart_init
+	call module_gpio_init
+	call check_module_disabled
+	//call p_check_otp_shaomaqiang_app
+	branch module_hci_event_enter_standby_mode
+
+
+p_module_process_bb_event:
+	copy regc,pdata
+/***************classic shutter event****************/
+	beq BT_EVT_BB_CONNECTED,classic_shutter_process_baseband_connect
+	beq BT_EVT_BB_DISCONNECTED,classic_shutter_process_baseband_disconnect
+	beq BT_EVT_RECONN_FAILED,classic_shutter_process_reconnect_failed
+	beq BT_EVT_SETUP_COMPLETE,classic_shutter_process_setup_complete
+	beq BT_EVT_HID_CONNECTED,classic_shutter_process_hid_connect
+	beq BT_EVT_HID_DISCONNECTED,classic_shutter_process_hid_disconnect
+	beq BT_EVT_HID_HANDSHAKE,classic_shutter_process_hid_handshake
+	beq BT_EVT_RECONN_PAGE_TIMEOUT,classic_shutter_process_reconnect_page_timeout
+	beq BT_EVT_VIRTUAL_CABLE_UNPLUG,classic_shutter_process_virtual_cable_unplug
+	beq BT_EVT_REMOTE_UNSNIFF,classic_shutter_process_remote_unsniff
+	beq BT_EVT_STORE_NVRAM,classic_shutter_process_store_reconnect_information
+	beq BT_EVT_LINKKEY_GENERATE,classic_shutter_process_linkkey_generate
+/***************classic shutter event****************/
+
+/***************ble shutter event****************/
+//	beq BT_EVT_LE_START_ENC,p_module_hci_event_start_enc
+	beq BT_EVT_LE_ENC_INFO,p_module_hci_event_enc_info
+
+/***************24g event***********************/
+
+
+	//
+	beq BT_EVT_ENTER_SNIFF,p_module_process_enter_sniff
+
+	branch module_process_bb_event + 1
+
+
+p_module_process_enter_sniff:
+
+p_module_sniff_param_check:
+	call module_spp_clear_last_transmite_clock
+	//fetch 1,mem_context
+	//rtnbit0 state_insniff
+	fetch 2,mem_context+coffset_tsniff
+	rshift pdata,pdata
+	fetcht 2,mem_sniff_param_interval
+	isub temp,null
+//	nbranch module_sniff_param_check_unsniff,zero
+	branch app_lpm_mult_enable
+p_module_sniff_param_check_unsniff:
+	fetch 1,mem_module_flag
+	rtnbit1 MOUDLE_TASK_UNSNIFF
+//	fethc 2,core_uart_rxitems    //*
+	fetch 2,IPC_M02BT_READ_PTR
+	fetcht 2,IPC_M02BT_WRITE_PTR
+	isub temp,null
+	ncall module_set_unsniff_task_flag,zero    //*仰
+	branch app_bt_sniff_exit
+
+
+
+/*
+	��ģ��������
+*/
+keyboard_start_bluetooth_discovery:
+	rtn
+
+keyboard_stop_bluetooth_discovery:
+	call app_bt_stop_discovery
+	branch app_ble_stop_adv
+
+
+p_module_bb_event_timer:
+/**************classic shutter timer**********************/
+	call classic_shutter_check_unplug_timer
+	call classic_shutter_hid_handshake_timer
+	call classic_shutter_hid_disconn_timer
+/************************************/
+	rtn
+
+
+p_module_le_receive_data:
+	call module_check_ble_encrypt_state
+	rtn user
+	copy rega,pdata
+	store 2,mem_module_le_rx_data_address
+//	copy loopcnt,pdata
+	copy regb,pdata
+	store 1,mem_module_le_rx_data_len
+	fetcht 2,mem_le_att_handle
+	storet 2,mem_module_le_rx_data_handle
+
+	call le_att_get_handle_info
+	nbranch assert,blank
+	fetch 1,mem_le_cur_uuid_length	//	uuid length
+//	bne 0x02,module_hci_event_receive_le_data
+//	ifetcht 2,contr
+//	setarg CLIENT_CHARACTERTIC_CONFIGURATION
+//	isub temp,null
+//	rtn zero		//filter ccc handle data
+//	branch p_module_hci_event_receive_le_data_notify,zero
+	branch module_hci_event_receive_le_data
+
+p_moudle_le_receive_data_report_output:
+	ifetcht 1,rega
+	setarg 0x01
+	store 1,mem_pdatatemp
+	istoret 1,contw
+	branch p_hid_rx_process_data_hid_kb
+
+p_module_lpm_lock:
+	branch module_lpm_lock
+
+p_module_bt_conn_process:
+	branch p_module_spp_enter_sniff
+
+p_module_spp_enter_sniff:
+	branch module_spp_enter_sniff+1
+
+p_module_hci_cmd_control:
+	fetch 1,mem_module_uart_opcode
+	beq HCI_CMD_BT_DISCONNECT,p_module_hci_cmd_bt_disconnect
+	beq HCI_CMD_SET_COD,p_module_hci_cmd_set_cod
+	beq HCI_CMD_SLEEP,p_module_hci_cmd_enter_sleep
+	beq HCI_CMD_SET_PAIRING_REQ,p_module_hci_cmd_set_pairing_mode
+	beq HCI_CMD_SEND_HID_DATA,p_module_hci_cmd_send_hid_data
+	beq HCI_CMD_CREAT_BT_RECONNECT,p_moudle_hci_cmd_creat_bt_reconnect
+	beq HCI_CMD_ADV_DATA_CHANGE,p_module_hci_cmd_adv_data_change
+	beq HCI_CMD_SET_VISIBILITY_REQ,p_module_hci_cmd_set_visibility
+
+	
+//	beq HCI_CMD_DELETE_CUSTOMIZE_SERVICE,module_hci_cmd_delete_customize_service
+//	beq HCI_CMD_ADD_SERVICE_UUID,module_hci_cmd_add_service_uuid
+//	beq HCI_CMD_ADD_CHARACTERISTIC_UUID,module_hci_cmd_add_characteristic_uuid
+
+	beq HCI_CMD_ADD_SERVICE_CHARAC_UUID,p_module_hci_cmd_add_service_charactisic
+
+	beq HCI_CMD_SEND_24G_DATA,p_module_hci_cmd_send_24g_data
+	beq HCI_CMD_24G_RFENABLE,p_module_hci_cmd_24g_rfenable
+	beq HCI_CMD_24G_TX,p_module_hci_cmd_set_24g_tx
+	beq HCI_CMD_24G_RX,p_module_hci_cmd_set_24g_rx
+	beq HCI_CMD_24G_RXPOWER,p_module_hci_cmd_set_txpower
+	beq HCI_CMD_24G_CHANNEL,p_module_hci_cmd_set_24g_channel
+	beq HCI_CMD_24G_ADDR,p_module_hci_cmd_set_24g_addr
+	beq HCI_CMD_24G_SET_ACKDATA,p_module_hci_cmd_24g_send_ack_prep
+	beq HCI_CMD_24G_SET_RETRAN_TIME,p_module_hci_cmd_24g_set_retransmit_time
+	beq HCI_CMD_24G_NO_ACK_FLAG,p_module_hci_cmd_set_no_ack
+	branch module_hci_cmd_control + 2
+
+p_module_hci_cmd_add_service_charactisic:
+	call le_att_get_last_handle
+	increase -2,contr
+	copy contr,contw
+	fetch,1,mem_module_uart_len
+	copy pdata,loopcnt
+	call uart_copy_rx_bytes
+	setarg 0x0000
+	istore 2,contw
+	branch module_hci_event_receive_valid_cmd
+//module_hci_cmd_delete_customize_service:
+//	arg 0x000c,temp
+//	call le_att_get_handle_ptr2
+//	add contr,-2,contw
+//	setarg 0x0000
+//	istore 2,contw
+//	branch module_hci_event_receive_valid_cmd
+
+//module_hci_cmd_add_service_uuid:
+//	// call ice_break
+ //  	arg 1,temp
+ //   	fetch 2 ,mem_ui_le_uuid_table
+ // 	iforce contw
+ //   	call module_hci_cmd_add_service_uuid_set_uuid
+ //   	call uart_copy_rx_bytes_len_data
+ //   	setarg 0x0000
+ //   	istore 2,contw
+ //   	branch module_hci_event_uuid_handle
+
+//module_hci_cmd_add_characteristic_uuid:
+//	ifetch 1,contru	//Characteristic
+//	call module_hci_cmd_add_characteristic_uuid_set_handle
+//	call module_hci_cmd_add_characteristic_uuid_set_uuid
+//	branch module_hci_event_uuid_handle
+
+//module_hci_cmd_add_service_uuid_set_uuid:
+//	call le_att_creat_new_handle
+//	setarg 0x280002
+//	istore 3,contw
+//	rtn
+
+//module_hci_cmd_add_characteristic_uuid_set_handle:
+//	store 1,mem_pdatatemp
+//	call le_att_creat_new_handle
+//	setarg 0x01280302
+//	istore 4,contw
+//	fetch 1,mem_pdatatemp
+//	istore 3,contw
+//	rtn
+
+//module_hci_cmd_add_characteristic_uuid_set_uuid:
+//	call le_att_creat_new_handle
+//	call uart_copy_rx_bytes_len_data		//uuid
+//	call uart_copy_rx_bytes_len_data		//data
+//	setarg 0
+//	istore 2,contw
+//	increase -1,temp
+//	call le_att_get_handle_ptr2
+//	add contr,4,contr
+//	ifetch 1,contr		//characteristic data
+//	bbit1 BIT_CHARACTERISTIC_NOTIFY,module_hci_cmd_add_characteristic_uuid_set_ccc_uuid
+//	bbit1 BIT_CHARACTERISTIC_INDICATE,module_hci_cmd_add_characteristic_uuid_set_ccc_uuid
+//	increase 1,temp
+//	rtn
+
+//module_hci_cmd_add_characteristic_uuid_set_ccc_uuid:
+//	call le_att_creat_new_handle
+//	setarg 0x02290202
+//	istore 8,contw
+//	increase -1,temp
+//	rtn
+
+
+//uart_copy_rx_bytes_len_data:
+//	ifetch 1,contru
+//	copy pdata,loopcnt
+//	istore 1,contw
+//	branch uart_copy_rx_bytes
+
+
+//le_att_creat_new_handle:
+//	call le_att_get_last_handle
+//	istoret 2,contw
+//	rtn
+
+//output:temp:new handle num
+//contr:address write data
+le_att_get_last_handle:
+	fetch 2,mem_ui_le_uuid_table
+	iforce contr
+le_att_get_last_handle_loop:
+	ifetch 2,contr
+	rtn blank
+	add pdata,1,temp
+	ifetch 1,contr
+	iadd contr,contr	
+	ifetch 1,contr			// length
+	iadd contr,contr
+	copy contr,contw
+	branch le_att_get_last_handle_loop
+
+
+////input:temp uuid number
+//module_hci_event_uuid_handle:
+//	storet 2,mem_temp
+//	jam HCI_EVENT_UUID_HANDLE,mem_module_uart_opcode
+//	setarg 2
+//	call module_hci_prepare_tx
+//	fetcht 2,mem_temp
+//	istoret 2,contwu
+//	branch uartd_send
+
+
+p_module_hci_cmd_set_visibility:
+	fetch 1,mem_module_uart_len
+	bne 1,module_hci_event_receive_invalid_cmd
+	copy rega,contru
+	call module_hci_event_receive_valid_cmd
+	ifetcht 1,contru
+	storet 1,mem_module_bluetooth_stauts_by_command
+	fetch 2,mem_ui_state_map
+	rtnbit1 UI_STATE_BLE_CONNECTED
+	rtnbit1 UI_STATE_BT_CONNECTED
+p_module_start_adv_discovery_by_command:
+	fetch 1,mem_module_state
+	isolate1 MOUDLE_STATE_BT_BIT,pdata
+	nbranch p_moudle_start_adv_by_command,true
+	fetcht 1,mem_module_bluetooth_stauts_by_command
+	and temp,0x03,pdata
+	store 1,mem_scan_mode
+p_moudle_start_adv_by_command:
+	fetch 1,mem_module_state
+	isolate1 MOUDLE_STATE_BLE_BIT,pdata
+	nrtn true
+	fetcht 1,mem_module_bluetooth_stauts_by_command
+	isolate1 2,temp
+	branch p_app_ble_start_adv,true
+	branch app_ble_stop_adv
+p_app_ble_start_adv:
+	fetch 1,mem_le_adv_type
+	beq ADV_IND,app_ble_start_adv
+	beq ADV_DIRECT_IND,app_ble_start_direct_adv
+	beq ADV_NONCONN_IND,app_ble_start_unconn_adv
+
+
+p_module_hci_cmd_adv_data_change:
+	ifetch 1,contru
+	isolate1 0,pdata
+	branch p_module_set_direct_adv,true
+	isolate1 1,pdata
+	branch p_module_set_unconn_adv,true
+	isolate1 2,pdata
+	branch p_module_set_common_adv,true
+	branch module_hci_event_receive_invalid_cmd
+	
+p_module_set_direct_adv:
+	jam ADV_DIRECT_IND,mem_le_adv_type
+	ifetch 6,contru
+	store 6,mem_hci_plap
+	branch module_hci_event_receive_valid_cmd
+	
+p_module_set_unconn_adv:
+	jam ADV_NONCONN_IND,mem_le_adv_type
+	fetch 1,mem_module_uart_len
+	pincrease -1
+	icopy loopcnt
+	copy contru,contr
+	store 1,mem_le_adv_data_len
+	arg mem_le_adv_data,contw
+	call memcpy_fast
+	branch module_hci_event_receive_valid_cmd
+	
+p_module_set_common_adv:
+	jam ADV_IND,mem_le_adv_type
+	fetch 1,mem_module_uart_len
+	pincrease -1
+	icopy loopcnt
+	copy contru,contr
+	store 1,mem_le_adv_data_len
+	arg mem_le_adv_data,contw
+	call memcpy_fast
+	branch module_hci_event_receive_valid_cmd	
+
+
+
+	
+p_module_hci_cmd_bt_disconnect:
+	fetch 2,mem_ui_state_map
+	bbit0 UI_STATE_BT_CONNECTED,module_hci_event_receive_invalid_cmd
+	call module_hci_event_receive_valid_cmd
+	call app_bt_disconnect
+	fetch 2,mem_ui_state_map
+	rtnbit0 UI_STATE_BT_HID_CONN
+	jam HCI_EVENT_BT_HID_DISCONNECT,mem_module_uart_opcode
+	branch module_hci_event_enter_standby_mode_len0
+
+
+p_module_hci_cmd_set_cod:
+	fetch 1,mem_module_uart_len
+	bne 3,module_hci_event_receive_valid_cmd
+	ifetch 3,contru
+	store 3,mem_class
+	branch module_hci_event_receive_valid_cmd
+
+p_module_hci_cmd_set_pairing_mode:
+	copy rega,contru
+	ifetch 1,contru
+	beq PAIRING_PINCODE,module_hci_pairing_pincode_mode
+	beq PAIRING_JUSTWORK,module_hci_pairing_just_work_mode
+	beq PAIRING_PASSKEY,module_hci_pairing_passkey
+	beq PAIRING_CONFIRM,p_module_hci_pairing_numeric_comparison
+	branch module_hci_event_receive_invalid_cmd
+p_module_hci_pairing_numeric_comparison:
+	setarg 0x000001
+	branch module_hci_sspairing_mode
+
+
+p_module_hci_cmd_enter_sleep:
+	call module_hci_event_receive_valid_cmd
+	branch app_enter_hibernate
+
+
+p_module_hci_cmd_send_hid_data:
+	fetch 2,mem_ui_state_map
+	bbit1 UI_STATE_BT_HID_CONN,bt_keyboard_send_hid_data
+
+	branch module_hci_event_receive_invalid_cmd
+
+
+p_module_hci_cmd_transmit_le_notify:
+	add temp,-3,pdata		//sub handle and opcode
+	arg 200,temp	
+	call not_greater_than
+	fetcht 1,mem_module_hci_notify_len
+	call not_greater_than
+	copy pdata,rega
+	copy temp,pdata
+	isub rega,pdata
+	store 1,mem_module_hci_notify_len
+	fetcht 2,mem_module_hci_notify_handle
+	increase -1,temp
+	call le_att_get_handle_ptr2
+	branch p_module_hci_cmd_transmit_handle_error,blank
+	ifetcht 4,contr		//flag
+	setarg 0x01280302
+	isub temp,null
+	nbranch p_module_hci_cmd_transmit_handle_error,zero
+	ifetch 1,contr			//Characteristic
+	bbit1 BIT_CHARACTERISTIC_NOTIFY,module_hci_cmd_transmit_le_notify + 13
+	branch p_module_hci_cmd_transmit_handle_error
+
+p_module_hci_cmd_transmit_handle_error:
+	jam 0,mem_module_hci_notify_len
+	jam HCI_DISCARD_PACKET,mem_module_temp_nl_discard_packet 
+	call module_clear_le_tx_data_flag
+	branch module_hci_event_receive_invalid_cmd
+
+p_parse_lmp_accepted:
+	fetch 1,mem_rxbuf+1
+	store 1,mem_lmi_accepted_opcode
+	beq LMP_HOST_CONNECTION_REQ,p_parse_lmp_accepted_hostconn//ok
+	branch parse_lmp_accepted+2
+
+p_parse_lmp_accepted_hostconn:
+	//fetch 1,mem_state
+	//rtnbit0 state_init_seq
+	fetch 1,mem_lmp_conn_state
+	set1 RECEIVED_CONN_REQ,pdata
+	store 1,mem_lmp_conn_state
+	jam BT_EVT_BB_CONNECTED,mem_fifo_temp
+	call ui_ipc_send_event
+//	jam LMP_PACKET_TYPE_TABLE_REQ,mem_lmo_opcode2
+	//nbranch parse_lmp_accepted_hostconn_ctn,master
+	branch parse_lmp_accepted_hostconn_ctn
+
+p_parse_lmp:
+	fetch 1,mem_lmi_opcode2
+ 	beq LMP_ENCRYPTION_KEY_SIZE_REQ,p_parse_lmp_crypt_key
+	beq LMP_SNIFF_REQ, p_parse_lmp_sniff_req
+//	beq LMP_QUALITY_OF_SERVICE_REQ,parse_lmp_quality_of_service_req
+ 	branch parse_lmp + 21
+
+ parse_lmp_quality_of_service_req: 
+ 	jam LMP_QUALITY_OF_SERVICE_REQ,mem_lmi_opcode2  
+ 	jam LMP_ACCEPTED,mem_lmo_opcode2  
+ 	rtn
+
+p_parse_lmp_crypt_key:
+	fetcht 1,mem_rxbuf+1
+	sub temp,6,null
+	branch reject_lmp_packet_pdu_not_allowed,positive
+	branch parse_lmp_crypt_key + 1
+	
+reject_lmp_packet_pdu_not_allowed:
+	jam PDU_NOT_ALLOWED,mem_lmo_reason2
+	branch reject_lmp_packet
+
+p_parse_lmp_sniff_req:
+	fetch 2,mem_rxbuf+6
+	branch lmp_reject_sniff,blank
+	//call parse_lmp_sniff_req_check_sniff_para
+	//branch lmp_reject_sniff,positive
+	branch parse_lmp_sniff_req+5
+
+
+p_parse_lmp_not_accepted:
+	fetch 1,mem_rxbuf+1
+	store 1,mem_lmi_accepted_opcode
+	beq LMP_AU_RAND,p_parse_lmp_not_accepted_aurand//ok
+	branch parse_lmp_not_accepted+3
+
+p_parse_lmp_not_accepted_aurand:
+	call parse_lmp_not_accepted_aurand
+	fetch 1,mem_conn_sm
+	rtnne CONN_SM_AUTH_WAIT
+	jam HCI_EVENT_BT_RECONNECT_FAIL,mem_module_uart_opcode
+	setarg 1
+	call module_hci_prepare_tx
+	setarg 0x01
+	istore 1,contwu
+	branch uartd_send
+	
+
+p_send_lmp:
+	disable user
+	call lmo_fifo_process
+	fetch 1,mem_lmp_to_send
+	rtn blank
+	bbit1 7,p_send_lmp_escape
+	branch send_lmp0
+	
+p_send_lmp_escape:
+	beq LMP_EXT_FEATURES_RES,p_send_lmpext_features_res
+	beq LMP_EXT_FEATURES_REQ,p_send_lmpext_features_req	
+	branch send_lmp_escape
+
+p_send_lmpext_features_res:
+	call p_check_ssp_enable
+	fetch 1,mem_lmp_to_send
+	branch send_lmpext_features_res
+p_send_lmpext_features_req:
+	call p_check_ssp_enable
+	fetch 1,mem_lmp_to_send
+	branch send_lmpext_features_req
+
+p_check_ssp_enable:
+	fetch 1,mem_ssp_enable 
+	branch ssp_disable, blank
+	branch  ssp_enable
+
+p_ssp_disable:
+	fetch 1,mem_features+6
+	set0 param_featrue_ssp,pdata
+	store 1,mem_features+6
+	setarg 0x1
+	store 2,mem_lmpext_ssp_enable
+	rtn
+
+
+p_sp_initialize_256:	
+	fetch 1,mem_le_secure_connect_enable
+	branch  le_secure_connection_disable,blank
+//	call le_secure_connection_enable
+	call sp_clear_flags
+	branch sp_pubkey_calc_256
+
+ifdef OTP
+eut_read_otp_data:
+	fetch 1,mem_module_state
+	set1 MODULE_READ_OTP_BIT,pdata
+	store 1,mem_module_state
+	
+	arg 0x00,addhi
+	arg 0x8973,contr
+	ifetch 1,contr
+	set1 6,pdata			//enable chgpump
+	arg 0x8973,contw
+	istore 1,contw
+	
+	arg 0x0f,addhi
+
+	arg 6, loopcnt              //len
+	arg 2,regb                     //addr
+	arg mem_read_otp_data,rega                   //data
+	
+	call eut_read_otp
+
+	//
+	arg 20, loopcnt
+	arg 0x12c,regb
+	arg mem_read_otp_data+6,rega
+	call eut_read_otp
+
+	arg 2, loopcnt
+	arg 0x1ffe,regb
+	arg mem_read_otp_data+26,rega
+	call eut_read_otp
+
+	call eut_otp_deselect
+
+	arg 0x00,addhi
+	arg 0x8973,contr
+	ifetch 1,contr
+	set0 6,pdata			//disable chgpump
+	arg 0x8973,contw
+	istore 1,contw
+	
+	arg 0x00,addhi
+
+	fetch 1,mem_module_state
+	set0 MODULE_READ_OTP_BIT,pdata
+	store 1,mem_module_state
+	rtn
+
+// rega pointers to buffer, regb is otp address, loopcnt is length
+eut_read_otp:
+	lshift3 regb,regb
+	call eut_otp_ce
+	call eut_otp_readen
+eut_read_otp_loop:
+	call eut_write_otpaddr
+	fetch 1,sec_otp_data
+	istore 1,rega
+	increase 8,regb
+	increase 1,rega
+	loop eut_read_otp_loop
+	rtn
+
+eut_otp_ce:
+	setarg 0x20c
+	call eut_write_otpctrl
+	setarg 0x208
+	call eut_write_otpctrl
+	setarg 0x200
+	call eut_write_otpctrl
+	setarg 0x208
+	branch eut_write_otpctrl
+
+eut_write_otpctrl:
+	arg sec_otp_ctrl,contw
+eut_write_word:	
+	istore 1,contw
+	rshift8 pdata,pdata
+	istore 1,contw
+	rtn
+
+eut_otp_readen:
+	setarg 0x288
+	branch eut_write_otpctrl
+
+// regb is otp address
+eut_write_otpaddr:
+	deposit regb
+	arg sec_otp_addr,contw
+	branch eut_write_word
+
+eut_otp_deselect:
+	setarg 0x20c
+	branch eut_write_otpctrl
+
+p_otp_custom_encryption_data_add_loop:
+	arg 13,loopcnt
+	arg OTP_INIT_VAL,temp
+	arg mem_read_otp_data,contr
+p_otp_custom_add:	
+	ifetch 2,contr
+	iadd temp,pdata
+	copy pdata,temp
+	loop p_otp_custom_add
+	rtn
+
+p_otp_custom_encryption_data_xor_loop:
+	arg 13,loopcnt
+	arg mem_read_otp_data,contr
+p_otp_custom_xor:	
+	ifetch 2,contr
+	ixor temp,pdata
+	copy pdata,temp
+	loop p_otp_custom_xor
+	rtn
+
+p_otp_judge_set_flag:
+	jam 0,mem_en_24g_flag
+	arg 0xffff,temp
+	iand temp,pdata
+	arg mem_read_otp_data+26,contr
+	ifetcht 2,contr
+	isub temp,null
+	nrtn zero
+	jam 1,mem_en_24g_flag
+	rtn
+
+p_check_otp_shaomaqiang_app:
+	call eut_read_otp_data
+	call p_otp_custom_encryption_data_add_loop
+	call p_otp_custom_encryption_data_xor_loop
+	call p_otp_judge_set_flag
+	fetch 1,mem_en_24g_flag
+	compare 1,pdata,0xff
+	rtn true
+	branch assert
+
+endif
+	
+
+
+
+
Index: rongyuan/program_patch/patch_chip_common_bugfix.prog
===================================================================
--- /YC3121_demo/ModuleDemo/BlueTooth/BT_code_patch/keyboard/branches/rongyuan/program_patch/patch_chip_common_bugfix.prog	(nonexistent)
+++ /YC3121_demo/ModuleDemo/BlueTooth/BT_code_patch/keyboard/branches/rongyuan/program_patch/patch_chip_common_bugfix.prog	(working copy)
@@ -0,0 +1,140 @@
+
+/*
+	оƬbugfix
+*/
+
+/*
+	YC 3121 LPM  bugfix
+*/
+p_ahead_window:
+	copy temp,pdata
+	call clk2bt
+	lshift16 bt_clk,pdata
+	set1 44,pdata
+	call clk_diff
+	set0 44,pdata
+	call get_clk
+	call clk_diff
+	rtn user
+	call p_clk2rt
+	branch ahead_window+12
+
+p_lpm_adjust_clk:
+	deposit clke
+	call p_clk_diff_rt
+	branch lpm_adjust_clk+3
+
+p_lpm_dispatch_next:
+	fetch 2,mem_context + coffset_rx_window
+	rshift pdata,pdata
+	call clk2bt
+	deposit alarm
+	call clk_diff
+	copy clke,temp
+	call p_clk_diff_rt
+	branch lpm_dispatch_next+30
+
+p_clk_diff_rt:
+	call clk_diff
+p_clk2rt:
+	iforce contr
+	set0 16,contr
+	branch clk2rt+1
+
+/*
+	YC3121 ûexen GPIO
+	disable exen
+*/
+p_soft_reset:
+	call rfcomm_init
+	call init_lmp
+	call p_ui_init
+	branch soft_reset + 9
+
+p_ui_init:
+	rtn wake
+	branch ui_timer_init
+
+p_main_loop:
+	call p_g24_dispatch
+	branch main_loop+1
+
+/*
+	YC3121 shutdown radio bugfix
+	rfen_adc bug 
+*/
+p_shutdown_radio:
+	branch p_shutdown_radio0,is_rx
+	hjam 0xd4, 0x955
+	nop 4
+	hjam 0xd2, 0x955
+	nop 4
+	hjam 0xd1, 0x955
+	nop 4	
+	fetch 1,mem_tx_power
+	beq TX_POWER_0DB,p_shutdown_radio_0db
+	beq TX_POWER_3DB,p_shutdown_radio_3db
+	beq TX_POWER_5DB,p_shutdown_radio_5db
+	beq TX_POWER_f3DB,p_shutdown_radio_f3db
+	beq TX_POWER_f5DB,p_shutdown_radio_f5db
+	beq TX_POWER_PAIR,p_shutdown_radio_pair
+p_shutdown_radio_5db:	
+p_shutdown_radio_0db:
+	hjam 0xd0, 0x955
+	hjam 0xe0, 0x956
+p_shutdown_radio0:
+	force 0x08,radio_ctrl
+	force 0,radio_ctrl
+	disable is_rx
+	disable is_tx
+	pulse packet_end
+	hjam 0x0,rfen_mdm
+	hjam 0x0,rfen_tx
+	hjam 0x0,rfen_rx
+	hjam 0,rfen_sn
+	hjam 0x70,rfen_msc
+	fetch 1,rfen_adc
+	set1 0,pdata
+	store 1,rfen_adc
+	rtn
+p_shutdown_radio_pair:
+p_shutdown_radio_f5db:
+p_shutdown_radio_f3db:
+p_shutdown_radio_3db:
+	hjam 0xd0,0x955
+	hjam 0xc0,0x956
+	branch p_shutdown_radio0
+
+
+p_le_transmit:
+	call le_prep
+	call p_letx_setfreq
+	branch le_transmit0
+
+p_letx_setfreq:
+	branch p_txon,match
+	branch letx_setfreq+1
+
+p_set_freq_tx:
+	storet 1,mem_last_freq
+	call set_freq_tx_offset
+	call rf_write_freq
+	setarg param_pll_setup
+	call sleep
+p_txon:	
+	fetch 1,rfen_adc
+	set1 0,pdata
+	store 1,rfen_adc
+	branch txon+1
+
+
+p_init_param:
+	hjam 0x7c,rfen_adc
+	rtn wake
+	setarg 0
+	store 2,mem_tx_len
+	rshift clkn_bt,pdata
+	store 4,mem_last_clkn
+	rtn
+
+
Index: rongyuan/program_patch/patch_chip_function_bugfix.prog
===================================================================
--- /YC3121_demo/ModuleDemo/BlueTooth/BT_code_patch/keyboard/branches/rongyuan/program_patch/patch_chip_function_bugfix.prog	(nonexistent)
+++ /YC3121_demo/ModuleDemo/BlueTooth/BT_code_patch/keyboard/branches/rongyuan/program_patch/patch_chip_function_bugfix.prog	(working copy)
@@ -0,0 +1,13 @@
+
+/*
+	YC3121 оƬbugfix
+*/
+
+/*
+	رչ㲥ߵ
+*/
+p_lpm_unconn_nossp:
+	branch lpm_unconn_cont				//BT/BLE discover don't infect lpm
+
+
+
Index: rongyuan/ramcode.rom
===================================================================
--- /YC3121_demo/ModuleDemo/BlueTooth/BT_code_patch/keyboard/branches/rongyuan/ramcode.rom	(nonexistent)
+++ /YC3121_demo/ModuleDemo/BlueTooth/BT_code_patch/keyboard/branches/rongyuan/ramcode.rom	(working copy)
@@ -0,0 +1,2000 @@
+c284000f
+c0008197
+c001819d
+c042819f
+c04481c5
+c04a017d
+c05101ce
+c0518188
+c054818b
+c05601d5
+c05c0030
+c05d8070
+c05e0122
+c05f0390
+20204a8b
+c00182e5
+c00282dc
+c00301c0
+c0098308
+c00f82f1
+c0108303
+c018002a
+c01e013a
+c01d0144
+c01e8154
+c01f0161
+c0208173
+c04c8179
+c051001e
+20204a8b
+18427e00
+207a0000
+c0130022
+20207bd4
+70434001
+70445602
+6fe44652
+79207e0b
+67e44652
+20600000
+700a9526
+20207bb4
+20405b86
+2020002c
+da604381
+da204362
+20405ba5
+20600000
+5800003f
+67e441f6
+58000060
+67e441fe
+58000064
+67e441fa
+5800006d
+67e441ea
+5800006e
+67e441f2
+204002d6
+20404daf
+20404dbc
+20404c2a
+2020504d
+1a627e00
+c0008328
+c001032b
+c0020339
+c0028341
+c0030342
+c0038345
+c009034e
+c0098358
+c0138359
+c017035c
+c01e835d
+c00c035e
+c019031b
+c014831d
+c0058050
+20204ddf
+20404dd7
+6fe44042
+1fe37e00
+684441e4
+98467c00
+20204d91
+6fe24679
+c3828000
+6fe44ffc
+68444ffe
+98467c00
+2442d0da
+20204d87
+20600000
+20404d6b
+20204d73
+2040036a
+20400372
+20400375
+20600000
+68440474
+18467c21
+20228068
+20600000
+e8420011
+58000001
+67e20a96
+e0420005
+202003a0
+20204dbd
+2020006f
+20204dc8
+6fe20aff
+c0088107
+c00a810f
+c013811d
+c0060114
+c058011f
+c0588385
+c05000e9
+c00100cf
+c03b0087
+c03b808d
+c03c0095
+c06481e0
+c06001d6
+c06081db
+c06101dd
+c06181e6
+c06201eb
+c06281ee
+c06401f2
+c06301f7
+c06381fd
+20204e5c
+d840000c
+20405b4d
+18c08bfe
+58000000
+e7e40005
+2020501f
+d8400001
+6fe4448e
+98000a00
+20400099
+204000b6
+58000000
+e7e40005
+202000c8
+efe20003
+2040009d
+204000a4
+202000c8
+204000ba
+58280002
+e7e60005
+20600000
+67e20a96
+204000ba
+59280302
+e7e80005
+6fe20a96
+e7e60005
+20600000
+204000ba
+204000b6
+204000b6
+58000000
+e7e40005
+184085ff
+20405b4d
+18c08c04
+efe20006
+c28200b1
+c28280b1
+18408401
+20600000
+204000ba
+5a290202
+e7f00005
+184085ff
+20600000
+efe20003
+1fe27200
+e7e20005
+202067ed
+204000bd
+e0440005
+20600000
+6fe4448e
+98000c00
+efe40006
+207a0000
+1fe08401
+efe20006
+98c08c00
+efe20006
+98c08c00
+18c20a00
+202000bf
+60440a9e
+700aff29
+58000002
+204050a5
+68440a9e
+e044000a
+202067b9
+6fe20b00
+c080d01c
+1a220600
+2040501f
+e8420003
+6042466f
+6fe44652
+c3848000
+c3800000
+6fe2466c
+2feffe00
+242080de
+6842466f
+18417e03
+67e24093
+6fe2466c
+2feffe01
+24608000
+6842466f
+284ffe02
+202080e5
+20204d73
+6fe24456
+c0004d75
+c000cd6f
+c0010028
+efe20003
+2feffe00
+202080f1
+2feffe01
+202080f5
+2feffe02
+202080fe
+2020501c
+70445601
+efec0003
+67ec41d1
+2020501f
+70445602
+6fe20b00
+1fe0ffff
+1fe27200
+18620c00
+67e24341
+d8a04342
+20407ccf
+2020501f
+70445600
+6fe20b00
+1fe0ffff
+1fe27200
+18620c00
+67e24341
+d8a04342
+20407ccf
+2020501f
+6fe44652
+c300501c
+2040501f
+20404d64
+6fe44652
+c4010000
+700affb6
+2020504e
+6fe20b00
+c081d01f
+efe60003
+67e640aa
+2020501f
+1a220600
+efe20003
+c0004f1c
+c000cf1f
+c0014f25
+c001811b
+2020501c
+58000001
+20204f20
+2040501f
+20204d85
+6fe44652
+c2810378
+2020501c
+1840fffd
+d84000c8
+20407db5
+6842467a
+20407db5
+1fe22200
+18427e00
+9a267e00
+67e2467a
+6844467b
+184085ff
+20405b4d
+203a0136
+e8480006
+59280302
+98467c00
+24228136
+efe20006
+c2824f01
+20200136
+70467a00
+700b0101
+204050e0
+2020501c
+6fe2054e
+67e204c5
+c019813e
+20206194
+6fe204cd
+79207e00
+67e204cd
+700a9501
+20407bab
+202061bf
+6fe2007d
+c008014b
+c00b8151
+202060fe
+70007d2a
+70007c03
+20600000
+6842054e
+18467c06
+2021014f
+20206206
+70007e24
+20206134
+6fe40553
+203a62d2
+202062bc
+6fe2054e
+67e204c5
+c0058158
+202061a6
+204061df
+6fe20055
+c18c8000
+700affb1
+58000001
+204050a5
+58000001
+e7e2000a
+202067b9
+78547c00
+204066a3
+6fe20048
+207a0000
+c2838167
+202063f2
+c042016a
+c041816d
+20206421
+20400170
+6fe20048
+2020647b
+20400170
+6fe20048
+202064ef
+6fe2462c
+203a650d
+20206506
+6fe2409e
+793ffe03
+67e2409e
+58000001
+67e404ca
+20600000
+6fe24490
+203a5ed0
+20407438
+20207932
+18427e00
+20407d2b
+1c307e00
+79207e2c
+20407d14
+793ffe2c
+20404a76
+20407d14
+20740000
+20400194
+20204a2f
+1b427e00
+20400193
+20204ae9
+6fe4404e
+1fe37e00
+20407d2b
+1e027e00
+20407d14
+1b420400
+20400193
+20204b67
+20407d14
+98000c00
+793f8c10
+20207d1f
+204068c4
+204060d7
+2040019b
+2020400a
+20758000
+20207b9a
+204002d4
+20204010
+203081af
+708955d4
+20000004
+708955d2
+20000004
+708955d1
+20000004
+6fe241df
+c00001ad
+c00081bd
+c00101ad
+c00181bd
+c00201bd
+c01001bd
+708955d0
+708956e0
+18002a08
+18002a00
+7850fc00
+78507c00
+782f7c00
+70890200
+70890100
+70890000
+70890300
+70890470
+6fe28906
+79207e00
+67e28906
+20600000
+708955d0
+708956c0
+202001af
+204057af
+204001c3
+202058a7
+203681ca
+202057be
+60420017
+2040492a
+20404980
+58000500
+20404a8e
+6fe28906
+79207e00
+67e28906
+20204937
+7089067c
+20758000
+58000000
+67e441dd
+1c437e00
+67e84094
+20600000
+20204b7f
+2040501f
+efe20003
+203a01da
+20204930
+202048f5
+2040027b
+2020501f
+7920002d
+2040021e
+2020501f
+6fe20b00
+1fe27200
+67e20b60
+d8a00b61
+204067ed
+2020501f
+efe20003
+67e241df
+204048f5
+20404930
+2020501f
+efe20003
+67e24bf0
+2020501f
+efe80003
+67e84bf2
+204002c6
+2020501f
+6fe20b00
+1fe27200
+d8a04c2f
+204067ed
+2020501f
+efe20003
+67e240c8
+efe20003
+1feffe78
+67e44beb
+2020501f
+efe20003
+67e24bfc
+2020501f
+7844fc00
+7843fc00
+58555555
+98001e00
+6fe24bf0
+1fed8400
+79200401
+18431c00
+20600000
+784dfc00
+7845fc00
+784efc00
+784e7c00
+7846fc00
+78467c00
+7844fc00
+78477c00
+7843fc00
+37d38200
+20000064
+20600000
+2040579e
+6fe84bf2
+98001200
+20404915
+68424bf0
+2040491c
+58000500
+20404a8e
+20404921
+20400200
+7826fc00
+7830fc00
+78507c00
+78287c00
+6fe44beb
+98003600
+37c18400
+242c0209
+7846fc00
+7825fc00
+7823fc00
+7824fc00
+09800008
+19897e00
+67e24c0b
+68424c0a
+98467c00
+24228209
+09800008
+19897e00
+1fe97e00
+67e20b1e
+1fe1721f
+2022823b
+09800008
+19897e00
+e7e20005
+c2000237
+18a22200
+09800008
+19897e00
+67e24c1c
+1a220a00
+09800018
+78287c00
+db600664
+1fef7e00
+1ff17e00
+e7e60005
+7845fc00
+20230209
+7837fc00
+6fe20017
+1fe0a200
+20404980
+7846fc00
+20404915
+6fe24c1c
+1fe22200
+204002af
+20600000
+20404915
+68424bf0
+20204930
+2040579e
+6fe84bf2
+98001200
+20400200
+20400252
+79202a00
+782efc00
+78307c00
+7850fc00
+19317e00
+1fecfe00
+1ff1fe00
+08008628
+784efc00
+782dfc00
+7823fc00
+7824fc00
+6fe24c0a
+08008608
+6fe20b60
+98007200
+d8c00b60
+efe20006
+08008608
+c200026b
+78247c00
+08008618
+78447c00
+37d38200
+20000064
+784efc00
+784dfc00
+20600000
+d8c00b60
+d8a00b40
+6fe20b60
+1fe27200
+20207cdc
+7857fc00
+20400276
+20400255
+6fe24bfc
+c0008289
+18002a00
+6fe84bf2
+98001200
+68420017
+2040491c
+20404921
+2040021e
+20578209
+20600000
+700b1f00
+7837fc00
+20200209
+2040029b
+243782a4
+20400291
+7857fc00
+20600000
+700affc1
+6fe20b1f
+1fe97e00
+1fe1721f
+207a0000
+1fe27200
+204050a5
+d8c00b20
+204067d4
+202067b9
+204002a4
+7857fc00
+20400215
+24778000
+6fe24bfc
+c0008209
+204002a7
+20400255
+20200209
+d8a00b1e
+df200042
+20207caf
+704be800
+202002a9
+6fe24c2f
+67e24be8
+1fe1721f
+d8c04c30
+d8a00b40
+20207cdc
+68424c2e
+58004c1d
+98408a00
+1a227e00
+e7e20005
+18408401
+18410407
+60424c2e
+20600000
+204049ba
+207a0000
+68424c2d
+da200ba2
+204002bf
+60424c2d
+20600000
+1a227e00
+98408a00
+6fe20018
+e7e20005
+18408401
+184104ff
+20600000
+67e84bf2
+da200000
+df200004
+d8c04bf2
+efe20006
+9a20a200
+c20002ca
+1a227e00
+67e44c08
+6fe24c08
+68424c09
+9840fe00
+67e24c0a
+20600000
+c6968000
+2020028c
+58000025
+67e444cc
+20405bf0
+20405c0c
+20405c19
+20205bf8
+204058a3
+20404915
+68420017
+2040491c
+200005dc
+20404921
+78287c00
+d960157c
+20205869
+204049ba
+7823fc00
+7824fc00
+09800008
+19897e00
+67e202d5
+09800008
+19897e00
+e7e20005
+1fe27200
+203a588b
+20205887
+c6078000
+20405c70
+247a0000
+6fe202d5
+1fe17e03
+67e244de
+efe20006
+67e244dd
+207a0000
+18c27e00
+67e444df
+6fe244de
+c001e044
+20405a76
+d8e00003
+24344bec
+20404bf0
+20205a6b
+efe40006
+c0025c8b
+c0035ed4
+c002de96
+20600000
+20405ac9
+2040599a
+6fe202d5
+2feffe04
+7920802a
+1fe37e00
+9842fe00
+2feffe02
+7920800f
+c6078000
+6fe202d6
+203a5996
+6fe2043b
+c3025996
+20407342
+204072b2
+7d3a000f
+247a0000
+20205996
+700affb3
+2020504e
+700affb4
+5800001c
+204050a5
+6fec4472
+e7ec000a
+6fec044b
+e7ec000a
+d8c043eb
+df200010
+204067d4
+202067b9
+704bb100
+704bb000
+20600000
+20404e2f
+20400333
+6fe44652
+c4060000
+793ffe0c
+67e44652
+700affb6
+2020504e
+7041e300
+70465000
+70420400
+704bb000
+704bb100
+20600000
+20404e2f
+700affb1
+58000001
+204050a5
+58000000
+e7e2000a
+204067b9
+20204d34
+2020005e
+58000002
+67e24650
+20600000
+6fe44652
+793ffe0c
+67e44652
+700affb6
+2040504e
+704bb000
+58000001
+67e24bb1
+20600000
+6fe241e3
+c1008000
+6fe44652
+79207e0c
+67e44652
+700affb0
+2040504e
+7041e301
+2040005e
+20204d89
+20200339
+58000005
+67e24bb0
+20600000
+20204d48
+20600000
+2020035f
+700affb5
+5800001c
+204050a5
+6fec40a0
+e7ec000a
+6fec0040
+e7ec000a
+d8c041bf
+df200010
+204067d4
+202067b9
+da604bb0
+da40036d
+20204d04
+6fe2027b
+79207e00
+79207e07
+67e2027b
+20600000
+da604650
+da40034e
+20204d04
+da604bb1
+da404d64
+20204d04
+2040564b
+247a0000
+6fe20b00
+1fe0a201
+2040513d
+6fe44220
+e7e40005
+580000a1
+e7e20005
+6fe20b00
+1fe27200
+204067ed
+2020501f
+efec0003
+67ec40a0
+efec0003
+67ec41d1
+d8a041bf
+df200010
+204067ed
+204068be
+2040005e
+20404d5c
+2020501f
+6fe40260
+1fe20c00
+efe20006
+1fe1040f
+1ff1fe00
+c004d12d
+c003d12d
+c005039c
+c00283a6
+c00083a8
+c002512d
+20600000
+efe40006
+67e40a96
+c00083a0
+20600000
+700affb2
+58000002
+204050a5
+6fe40a96
+e7e4000a
+202067b9
+2040039c
+20205126
+18427e00
+c002d11e
+704bb201
+c001d12d
+704bb200
+c002512d
+20600000
+704bb200
+c002512d
+20600000
+1f2b7200
+98000c00
+18c08df8
+efe80006
+e7e80006
+c20003b4
+18c08dfc
+1de27e00
+e7e80006
+da400001
+1a40a5ff
+242283a6
+1a20a277
+1a60a7ff
+2422839b
+6fe20b21
+1ff18400
+6fe80b1e
+98001600
+19627e00
+20600000
+1a208c01
+efe20006
+1a208c04
+e8480006
+18421600
+19620400
+c28083d2
+1a208c0a
+efe80006
+99667e00
+1fe61600
+1a667e08
+1ff07e00
+1fed7e00
+1ff27e00
+9961de00
+efe20011
+2fec0000
+20600000
+6fe24a4d
+243a59f9
+6fe20452
+c3828000
+20405a1c
+20405c53
+203a5a3e
+efe20006
+e8420006
+18422200
+9a267e00
+204003ff
+20407db5
+1fe20400
+efe20006
+1fe20200
+1a227e00
+98c08c00
+d8a0493d
+18427200
+20407ccf
+20405a2e
+20405a40
+20405c53
+efe20006
+1fe22200
+18c22600
+e8420006
+18422400
+9a467e00
+204003ff
+20407db5
+9a40fe00
+e7e20013
+9a267c00
+24628000
+20205c76
+18c20a00
+68444939
+18a20c00
+20600000
+6fe24a4d
+243a5a41
+6042493c
+68420452
+79200405
+18417efc
+9821fe00
+67e20452
+1fe17e1f
+280ffe29
+7920fe04
+67e2493b
+6fe2493b
+28200601
+24208414
+6fe2493c
+207a0000
+6fe2043b
+c4020000
+20407342
+20207299
+6fe24a4d
+243a729a
+da60493b
+684a43d5
+20407277
+18007008
+98005e00
+18002200
+20407263
+204072e8
+da60493d
+6fe2493c
+1fe0a5ff
+9a608a00
+1800700c
+1de27e00
+e7e80005
+2040728e
+6fe2493c
+1fe0fe04
+67e2493c
+684a43d5
+18408401
+604a43d5
+20600000
+c6078000
+20405c70
+247a0000
+6fe202d5
+1fe17e03
+67e244de
+efe20006
+67e244dd
+207a0000
+18c27e00
+67e444df
+6fe244de
+c0018443
+20405a76
+d8e00003
+24344bec
+20404bf0
+20205a6b
+6fe24a4d
+243a6044
+6fe202d7
+c00a045a
+20206045
+da200009
+da400009
+20405c22
+58000021
+e7f00005
+2040044f
+20600000
+6ff04ab5
+67f04468
+700a9512
+20207bb4
+6fe202d8
+1fe17e20
+203a0458
+704a4d00
+20600000
+704a4d01
+20600000
+efe40006
+67e44939
+2020045d
+da200009
+da400015
+20405c22
+580000fb
+e7e40005
+58000848
+e7e40005
+580000fb
+e7e40005
+58000848
+e7e40005
+20600000
+efe40006
+c002046e
+c0035ed4
+c002de96
+20600000
+efe60006
+67e60473
+20205c8d
+d8e00007
+202050e2
+d8e00007
+202050e6
+20405ca9
+67e44478
+20205ca2
+700abe00
+70001625
+6fe24340
+207a0000
+d8e00000
+20407cf1
+247a0000
+7854fc00
+78287c00
+2040594c
+204058c3
+2436848b
+6fe20003
+1fe0fe01
+67e20003
+6fe202d5
+1fe17e0f
+c001848e
+c002db08
+d8e00000
+6fe44454
+20207ce3
+d8400004
+6fe24457
+7d3a0406
+604243ae
+68424361
+1840fe06
+67e243af
+6fec4472
+67ec43b0
+d8c04362
+18427200
+20407ccf
+204058a1
+2020048b
+6fe24a4d
+243a5bd5
+7855fc00
+203704a1
+2436dbe6
+20404ba0
+6fe440c1
+67e40449
+2436cbb3
+c507cbb3
+6fe244dd
+243a4bb3
+6fe2493c
+243a4bb3
+6fe244bb
+c282cbb3
+6fe2043b
+c282cbb3
+20204b95
+6fe2007d
+c00804b3
+c00b84b9
+202060fe
+6842054e
+18467c06
+202104b7
+20206206
+70007e24
+20206134
+202062b8
+78547c00
+204066a3
+6fe20048
+207a0000
+c28384c0
+202063f2
+c04204c3
+c04184c6
+20206421
+204004c9
+6fe20048
+2020647b
+204004c9
+6fe20048
+202064ef
+6fe2462c
+203a650d
+20206506
+6fe2409e
+793ffe03
+67e2409e
+58000001
+67e404ca
+20600000
+6fe24490
+203a5ed0
+20407438
+20207932
+aa36f2df
+ae2d6b79
+1b3d15d5
+8cfbb377
+0bddb5f0
+d1727ecc
+cb06b2e3
+87fff482
+83c8f55b
+4fba7ef4
+d733b1b0
+0c7542b9
+3d7f5d3f
+6d0c3c66
+d895fe9b
+5b73bf4c
+4def39b5
+641af45d
+b1be44c2
+be1171e8
+e533d14c
+7954f075
+68b6f107
+39b8b1ca
+60592173
+7c33df63
+36baeafe
+4a666795
+7767563a
+0439a6e5
+c557ba3f
+31fd613d
+0e3140b3
+1e7af1f9
+b94ee1ef
+54500771
+63acdae9
+b4bb2261
+0d473dae
+a6e4c258
+7a973164
+e5ebe8b3
+206bb3a1
+77774772
+f41571b2
+ddc65d8d
+72abc471
+fdc04767
+d04301fb
+913b7d27
+a046fe6d
+3b051fc2
+48e72814
+763d72fb
+c8eef29e
+a50a6091
+9fd4ae3d
+d3bea3ae
+9c77471e
+da5a6652
+793d8b3f
+e63f8ad3
+9297b9f7
+f64aaf5c
+65df2c7f
+d9731ce8
+dabba3f8
+9a6cd06a
+00d0697c
+ef574057
+3323bdfa
+5e254f58
+b95fc60e
+a3d3a93e
+8cc38126
+8a873952
+1cf76456
+fcfa63a4
+fb7b8aa1
+fe3bc940
+05991ffb
+76d18b1f
+6ca3ad3b
+a75acf90
+ce9d1c94
+eddd9b67
+7dcca5dd
+7d47166e
+35363df1
+c46e05f1
+1f83457b
+61b0d522
+aedd560d
+84c1bbc5
+394dc7f8
+7ae061fb
+2e965e75
+8fa62cbb
+77b1ce97
+3ba03cdb
+6e7b7992
+80e4b921
+11f5e244
+1450f2b4
+45316bca
+6c66e2d7
+4d7e511a
+bf768675
+84326189
+266867bc
+6cfd8cdf
+9db51fd4
+0c1f666b
+5eadf7d9
+f9e1f127
+dcf1de7d
+ad9d82cc
+c8060618
+faf4db2c
+02f61fc5
+d741acf9
+de56daef
+b334737b
+1f43db3d
+7847fe56
+d8e7e694
+5ff86788
+1b2f076c
+9dedd2f3
+616b0c5f
+70a9dafd
+cb41bbb9
+7ad74f87
+16ef26e0
+d526f26f
+6b8853fd
+b99e549d
+cdc3a479
+c2aac9c7
+271b6934
+7e934ade
+2440f142
+876a7541
+ef22b986
+6d9eb792
+a296664c
+abf7d927
+306cf7a1
+d658695e
+ff556f63
+aeb01b51
+aaf4d3ad
+63d64f66
+2699afeb
+4d040df5
+2bbde662
+e3578965
+b75d7484
+4a4c02ec
+856ef69e
+f3e25375
+287271dc
+e5c02bec
+f6449479
+d3daffc5
+5cadea23
+cb5d4ac5
+36a6374e
+7cfc2dce
+7cebf66f
+fb2c88bf
+8baae4bd
+1ed67b21
+f15a3128
+2f630189
+e0e37228
+7b4e3934
+9d935b5f
+f387f63c
+5f40520d
+e568a759
+697bed6b
+c3e6dabe
+bf2b6c73
+df11ba42
+50ef11fe
+7fa809f3
+c3f7d26e
+4238fd79
+03d4fb0e
+a15e5cb3
+1e8cb4b0
+d3a97757
+53d85dfe
+7089f817
+1607bf5d
+14702b7b
+e95a9ecc
+19118aef
+b1bce96b
+7f9f5a0e
+62eab7f4
+b2364a66
+fd2595c4
+244d7ddb
+bfc33667
+39677cf8
+0161fdea
+3d1a7458
+500a5fb3
+f2dcb1af
+f9a482b2
+c7f226a2
+ce07ff1a
+a29b8e53
+e536e0e3
+6c2d6a1f
+ed70eff2
+5fcb6366
+e73ae565
+6e281517
+e1da63ee
+a09fad8b
+2365c4e6
+804ac15f
+e61379f9
+f5474a74
+6f0c6c7e
+b0a55d64
+5ac9d060
+fcd64ded
+87b4c5f8
+165f4866
+15648fa1
+58df46b5
+e212c7b9
+c3edbc90
+4464c6c4
+8f74d87f
+74de5718
+ffb3a100
+19fd3072
+b5acce2f
+e5af9dbf
+56679bbd
+03fa4aa4
+bf896285
+8fbd25d7
+ff5955b4
+a46663c6
+488bae58
+d27b17f3
+2ae51963
+b1280a49
+67c9cd5e
+4e6c365e
+c5afb7fc
+d7f31964
+9d1eb80f
+1a77ef11
+52469840
+b35121f6
+2f9fca24
+f3f45472
+07d11ed3
+81834f90
+c93ba173
+e2b93f81
+8007ea81
+1e7fc9e2
+7efac68a
+8f619909
+d9fee617
+64e2f9f8
+29034438
+4172d38f
+e03c7751
+1fe49d2e
+f40e5cb7
+705eabde
+225c4de1
+3ee1ecb4
+60c5f257
+8b799652
+fb12af01
+9f09c3d5
+f4b41176
+9301a4d2
+53137e7c
+b0b533c9
+2f6af06a
+694a9b96
+e9ec7b3d
+9a95d458
+c74229b2
+e8083ec1
+cd8f0bd0
+a71f435d
+7c3e158a
+9eef0266
+b4d0aa8a
+56d56d17
+9bb33387
+f7575b80
+0bb49dd8
+f46d0123
+e11f900f
+a4509c6c
+9076fb66
+1ce7dcf5
+3c9b9254
+3b7bdb79
+717750e2
+5dff9eb3
+7d1245a9
+132cdff9
+ee230308
+ddb40bdc
+7594d9ee
+f3d5fb75
+f0441756
+9bf13095
+a9d3ceba
+64537d53
+df91aa90
+534dc19b
+d60f6e66
+a506f1d5
+cd2b2392
+98ce8472
+deed26f6
+7518f190
+f83aa22b
+b1e61cce
+fdc8df3d
+7a8a2f9f
+9c3ff49c
+356f0073
+dc76bcdd
+5ebadf02
+d2ee872f
+f4aefc6f
+eefb9a4d
+5431ce83
+a4edb530
+b970ab9d
+8fb95d84
+5d20f3b5
+ef1af086
+72c61541
+9fef1134
+74725b7b
+75458933
+6d040e78
+9ff10870
+c2a64085
+6a838028
+d18e1f97
+85b9520f
+7f371e80
+26fd9cd6
+acca995c
+8c9b1fc6
+976d9cb1
+81e1f678
+71d7d6a7
+6ccb1829
+219a9ff7
+1bd7348d
+8c33b5f4
+ff7c9ff8
+7c01ac9e
+e149ab7e
+953e8b1e
+e160ad3c
+ac85c216
+cf8d9eba
+74ab635e
+4d9feb53
+caf4fac8
+ff1e8262
+55e41048
+72f46333
+bad383bd
+4a0f851a
+f22f9bae
+5b95aca3
+0d3512e8
+97cfeb33
+afea4a39
+20865db1
+09098b7f
+5dc1c24a
+e772e601
+75d0e170
+2809bcef
+e6a99f54
+e9833898
+8c27c307
+deebcdfe
+6b03d8dd
+c09743e7
+9a902d80
+f764fc47
+5cec7b40
+51912f2f
+06ad4c73
+d2d38d8c
+57a3c797
+71d972bb
+1467e1f8
+6b39ae68
+9bca2e34
+14dc1ee3
+673e17d8
+0baf03f7
+f5a2b431
+984dfe26
+d7eed58a
+6f880b88
+9ea458f8
+e593fcb7
+5aef2772
+a436a60a
+8cea7528
+e1396fa6
+bd03f743
+5fae4886
+c80b4cf0
+dfe03b53
+ec3d57f6
+3d30fda3
+a03033f4
+fe7086f0
+bfa8a223
+db4ec29a
+4a1f07a3
+7a70eec9
+e7e1efaa
+222df185
+3b816bfa
+623a3800
+8f6f4ba2
+a08e38d8
+296189a1
+3693b54c
+bbfef3f2
+54bf881c
+428fd3c2
+829bbd59
+ea6cf9a4
+727acc0e
+85c3a799
+abf06f25
+52e50428
+ab9120fc
+61c5ada4
+2e1d4dc0
+4707999c
+0d24e7e3
+3f2c397a
+e3dd6dad
+dc6339e7
+baf33af2
+058534b7
+55db4b49
+c7122eb2
+d22ffff5
+efaabb6d
+19623c47
+c642067b
+9b4fcb62
+d64a839c
+aaf63b4e
+c0f0c1d3
+4fce9730
+b2757291
+21d5423a
+e577fb71
+7dd4ff8c
+f8069e2f
+34e3b2eb
+f4d6f47e
+0f61f361
+4c563e9d
+74ff71ed
+7dd1c232
+f69179ad
+ae0af8a8
+ff635873
+3c6b3624
+0c9e1d72
+5a33de0c
+fe1c57d2
+328ebd87
+942d872b
+d6b1da7c
+00513373
+7897d2e4
+b5d2554a
+fc217ae5
+77e69ce0
+fc4766f2
+100852e9
+ded04097
+b5019696
+475b51cc
+29a4fa7b
+a5fc5723
+7cf9fae2
+ae6adee7
+2cb116cb
+f97c2237
+49cf95e3
+bd3e1279
+cd77502f
+2e0e15d5
+ab64f6f3
+65269061
+6ebfca31
+69e108fb
+ed799d5c
+e2f7b1ee
+35e21993
+d7eac0af
+12639ed4
+45479aef
+f6df9908
+6ee3bce5
+626c8ee1
+f6ea111e
+1abe8ea1
+fd760c09
+3543a45f
+e5b32161
+5a08f582
+bb3d383f
+bd4d9d73
+1c9f57db
+6e678ee6
+7ffd5c5e
+f37add95
+a5fed8f5
+a39f4172
+ce98db27
+927fd0ef
+7e8c537e
+56d656ed
+24925f28
+93146ad0
+aeddc231
+59feea88
+2da9fd83
+6dfb570c
+691861b8
+ca0278c9
+78e38136
+fef3f8df
+3af16e6d
+dbb86c19
+e4a0c87e
+afe2240a
+d94b7011
+a2df70fd
+ce3cc32f
+b5d6f07b
+0ca3e719
+d77dfe8e
+9479b3d7
+1ecb7013
+5cffceaf
+42395d0f
+ea81df01
+8d9f2f3c
+8cba8ebc
+0c07b7ae
+77f8824b
+3eed7eef
+fae7b8eb
+ba38db6b
+3d7bfb85
+ada5d0d9
+10bfc84e
+3c76a519
+f1888fcd
+2cbe75c2
+7c2c4edf
+035eef94
+b4eb0a0f
+b85bed96
+d70bebc3
+4eeb6dd7
+c711cad1
+13b562a1
+ac6b52bf
+9401cf8d
+b2b58b5d
+79b5b085
+e0501546
+92f6077f
+eddb3b8e
+72df4733
+a8b6e53d
+31e5fbcf
+2f138e72
+32a3d4ae
+24909a4e
+ac8698b6
+485e0e46
+ebea43e8
+ce6c3f0e
+6bf5c893
+df43dc0a
+fa987571
+ef056fd8
+2bbe4ab3
+202e97e4
+01b2ed93
+963ed251
+eb6ff41b
+9dc4eced
+ffe27fc1
+c1b98641
+cc0c5c67
+c4e61d11
+24beae95
+d3fa575e
+f9bb3877
+ed3f76fc
+d49a2a8c
+2e401332
+f895eb9e
+8d2482ac
+ced145fa
+57bfba51
+9bf64193
+e8b31e2a
+7eb84177
+c57fb76b
+ea4ec105
+e3fbffea
+8f895637
+e81df9ad
+f464105c
+ff4706c8
+8ba75eb7
+504a01bf
+a22cbacb
+c2f1e498
+4f9ff9ff
+d88d442e
+51ae65f1
+944bbb91
+f98ba91d
+6c430942
+4b07cccb
+9190c7af
+a955fcdf
+3da51bad
+41d7ca21
+3d4ed5b5
+4392dd19
+65a51b20
+b310bc1e
+13df885d
+77903d2d
+69e6f532
+fb8f83be
+b13615fb
+78f595bc
+8fdc7d2f
+af307eda
+9d86fec7
+1e5a3700
+f9239496
+be6bcd1d
+9ced03f3
+dd9b3706
+efb176e5
+05826b7b
+5fc2e43d
+882f6519
+577cc1f6
+060d0f49
+1c405daa
+59bf0c71
+fca7ef3d
+365718f9
+4ee6ff93
+7c5e61d6
+d0a5aa9e
+7f1cf5ad
+3689f2a2
+fe2cdb47
+73a38706
+3f27ec16
+d8b1d798
+58559085
+a57f52f7
+cd5a8842
+c8f10b19
+69fe5d25
+fe11fa5b
+f9b3a0b3
+d67bd177
+64a9f29c
+ff2d7c13
+cce55de6
+ac3d7597
+afeaff14
+e0e9b50b
+eab33c3e
+84ed5ee6
+b1482787
+755ad8fe
+d9d4ed0c
+0b88bb61
+1a3a6fe1
+a9dfd3ab
+cad4ec6f
+3d4d3ab9
+5e1177a5
+4153739e
+cd79235d
+858ee12b
+b9c3b6ec
+ce38b97a
+1053b8fd
+9d96680d
+f447b67e
+32a35cfa
+d7f21fbe
+b89626f3
+fb6c97ce
+b5e8d1d2
+8f50ded6
+a78c6016
+1e0d46f6
+22575f97
+b5dadca5
+1ba45f74
+fca6dffe
+92a72524
+cdafccb9
+4a54a59c
+e7cfbedc
+4e61683e
+9ff225a2
+9cdce8f8
+8e7dc671
+d6a96537
+97c6b429
+a9cff44a
+92cdfb4f
+e8847075
+a3fa5a3b
+6bf791e3
+87f710c3
+67dd3559
+9b6570fd
+67fe764e
+b27c4148
Index: rongyuan/sched/109x.dat
===================================================================
--- /YC3121_demo/ModuleDemo/BlueTooth/BT_code_patch/keyboard/branches/rongyuan/sched/109x.dat	(nonexistent)
+++ /YC3121_demo/ModuleDemo/BlueTooth/BT_code_patch/keyboard/branches/rongyuan/sched/109x.dat	(working copy)
@@ -0,0 +1,52 @@
+mem_patch00:02
+mem_patch10:20
+mem_patch11:02
+mem_patch14:04
+mem_patch17:09
+mem_patch20:68
+mem_patch27:44
+mem_patch28:02
+mem_patch2a:04
+mem_patch33:02
+
+#mem_lpm_config:0f 84 30
+mem_lpm_config:0f 84 f0
+mem_lpm_xtalcnt:0a 0b b2 32
+mem_lpm_hibernate_switch:8b
+mem_lpm_doze_switch:0b
+mem_gpio_wakeup:00 00 00 00 00 00 00 00
+
+mem_fcomp_mul:02
+mem_fcomp_div:24
+mem_iscan_window:40 00
+mem_iscan_interval:00 02
+mem_pscan_window:32 00
+mem_pscan_interval:00 02
+
+mem_inq_window:20 00
+mem_page_window:20 00
+mem_page_to:00 20
+mem_rx_window_init:80 04
+mem_rx_window_sniff:00 10
+
+
+
+mem_lmp_version:08 0e 05 04 00
+
+mem_eeprom_base:30 1f
+mem_eeprom_block_size:20
+mem_context_number:01
+
+mem_rf_init:
+4b ba
+55 d0
+56 e0
+57 88
+58 6c
+59 10
+07 ff
+ff
+mem_rf_init_ptr:mem_rf_init
+
+
+
Index: rongyuan/sched/24g_keyboard.dat
===================================================================
--- /YC3121_demo/ModuleDemo/BlueTooth/BT_code_patch/keyboard/branches/rongyuan/sched/24g_keyboard.dat	(nonexistent)
+++ /YC3121_demo/ModuleDemo/BlueTooth/BT_code_patch/keyboard/branches/rongyuan/sched/24g_keyboard.dat	(working copy)
@@ -0,0 +1,16 @@
+
+
+#24g init
+mem_24g_mode:01#tx
+mem_24g_data_type:02        #mouse 1,kb 2
+mem_24g_max_retry:4#max tx retry
+mem_24g_no_ack:00#with ack
+mem_24g_rx_window:c0 12     #400us 
+
+
+mem_24g_common_temp:00 00 00 00 00 00 00 00 00 00
+mem_24g_enter_hibernate:00 48 5d 00 00 00 00 00#10 min
+mem_24g_enter_hibernate_max:ff ff ff ff
+
+
+
Index: rongyuan/sched/DM_module.dat
===================================================================
--- /YC3121_demo/ModuleDemo/BlueTooth/BT_code_patch/keyboard/branches/rongyuan/sched/DM_module.dat	(nonexistent)
+++ /YC3121_demo/ModuleDemo/BlueTooth/BT_code_patch/keyboard/branches/rongyuan/sched/DM_module.dat	(working copy)
@@ -0,0 +1,43 @@
+
+mem_device_option:0a
+
+##############NVRAM CONFIG##############
+mem_nv_data_ptr:mem_module_nv_data
+mem_nv_data_number:00
+#####################################
+
+
+
+
+################IPC BUFFER INIT#####################
+4FF0:00 1C
+4FF2:FF 1F
+4FF4:00 1C
+4FF6:00 1C
+4FF8:80 4C
+4FFA:E0 4F
+4FFC:80 4C
+4FFE:80 4C
+
+##############BLUETOOTH CONFIG##############
+###commom###
+mem_soft_version_num:3010
+mem_module_state:03
+mem_module_bluetooth_stauts_by_command:07
+
+mem_module_flag:00
+#bit0 MODULE_FLAG_UART_FLOW_CONTROL
+#bit1 MODULE_FLAG_BLE_SEND_MTU23
+#bit2 MODULE_FLAG_BLE_DATA_ENCRYPT
+mem_lpm_mode:00
+mem_lpm_interval:00 01
+mem_lpm_overhead:08
+mem_lpm_mult_timeout:02
+
+mem_sniff_param_interval:0e 00
+
+###ble###
+
+#####################################
+
+
Index: rongyuan/sched/ble_keyboard.dat
===================================================================
--- /YC3121_demo/ModuleDemo/BlueTooth/BT_code_patch/keyboard/branches/rongyuan/sched/ble_keyboard.dat	(nonexistent)
+++ /YC3121_demo/ModuleDemo/BlueTooth/BT_code_patch/keyboard/branches/rongyuan/sched/ble_keyboard.dat	(working copy)
@@ -0,0 +1,207 @@
+
+mem_module_le_lpm_mult:05
+
+
+mem_le_pres:02 03 00 05 10 02 03
+
+mem_le_interval_min:
+08 00 #min interval
+10 00 #max interval
+00 00 #latency
+2c 01 #timeout
+
+
+
+
+mem_le_pairing_handle:31 00
+
+
+
+mem_le_local_mtu:17
+mem_le_remote_mtu:17
+
+mem_le_secure_connect_enable:00
+mem_le_adv_channel_map:07
+mem_le_pairing_mode:00
+
+mem_le_adv_enable:00
+mem_le_adv_interval:40 00
+
+mem_le_lap:21 22 01 33 02 3a
+mem_le_name_len:
+'BT4.2 Keyboard
+
+mem_le_adv_data_len:03
+mem_le_adv_data:
+02 01 05
+03 19 c1 03
+03 03 12 18
+'\09BT4.2 Keyboard
+
+mem_le_scan_data_len:1f
+mem_le_scan_data:
+'\09BT4.2 Keyboard
+
+
+mem_ui_le_uuid_table:mem_module_le_att_list
+
+#attribute list: handle 2bytes, uuid 2bytes, length 1bytes, attribute Nbytes
+mem_module_le_att_list:
+00 00
+#Primary service: GATT
+#01 00 02 00 28 02 01 18
+#Characteristic: Service changed
+#02 00 02 03 28 01 20
+#03 00 02 05 2a 01 00
+#Client Characteristic Configuration
+#04 00 02 02 29 02 00 00
+
+#Primary Service: GAP
+#05 00 02 00 28 02 00 18 
+#Characteristic: Device Name
+#06 00 02 03 28 01 02 
+#07 00 02 00 2a 
+#1d 42 54 34 2e 32 20 4b 65 79 62 6f 61 72 64 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20#'BT4.2 Keyboard
+
+#Characteristic: Appearance
+#08 00 02 03 28 01 02 
+#09 00 02 01 2a 02 c1 03 
+#Characteristic: Peripheral Preferred Connection Parameters
+#0a 00 02 03 28 01 02
+#0b 00 02 04 2a 08 06 00 06 00 64 00 2c 01 # interval 6ms, latency 100, timeout 300
+
+#Primary Service: Device Information
+#0c 00 02 00 28 02 0a 18
+#Manufacturer Name
+#0d 00 02 03 28 01 02
+#0e 00 02 29 2a 06 59 69 43 68 69 70			#IOS 13.5.1
+#Characteristic: pnp id
+#0f 00 02 03 28 01 02
+#10 00 02 50 2a 07 02 e8 04 21 70 01 00		# SAMSUNG soft keyboard,setup shortcuts
+
+#Primary service: HID
+#11 00 02 00 28 02 12 18
+#Characteristic:Protocol mode
+#12 00 02 03 28 01 06
+#13 00 02 4e 2a 01 01
+#Characteristic: hid report
+#14 00 02 03 28 01 12   
+#15 00 02 4d 2a 08 00 00 00 00 00 00 00 00	#hid report	led handle write
+#16 00 02 02 29 02 00 00	
+#17 00 02 08 29 02 01 01	#Report ID: 1	Report Type: Input
+
+#Characteristic:hid report
+#18 00 02 03 28 01 12  
+#19 00 02 4d 2a 14 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  # d 14
+#1a 00 02 02 29 02 00 00
+#1b 00 02 08 29 02 07 01	#Report ID: 7	Report Type: Input Ϸ
+
+#Characteristic:hid report
+#1c 00 02 03 28 01 12   
+#1d 00 02 4d 2a 02 00 00 	#hid report	led handle write
+#1e 00 02 02 29 02 00 00	
+#1f 00 02 08 29 02 02 01	#Report ID: 2	Report Type: Input
+
+#Characteristic:hid report
+#20 00 02 03 28 01 0e   
+#21 00 02 4d 2a 02 00	00	#hid report	led handle write
+#22 00 02 02 29 02 00 00	
+#23 00 02 08 29 02 01 02	#Report ID: 1	Report Type: Output
+
+#Characteristic:Report map
+#24 00 02 03 28 01 0a
+#25 00 02 4b 2a 83		#length 66+25+60=160=0xa0 #0xa0 -0x45 +0x19=0x74
+#66+25+25=116=0x74
+
+# hid descriptor
+#0501 # Usage Page(Generic Desktop)
+#0906 # Usage(Keyboard)
+#a101 # Collection(Application)
+#8501 # Report ID(1)
+#7501 # Report Size(1)
+#9508 # Report Count(8)
+#0507 # Usage Page(Keyboard/Keypad)
+#19e0 # Usage Minimum(224)
+#29e7 # Usage Maximum(231)
+#1500 # Logical Minimum(0)
+#2501 # Logical Maximum(1)
+#8102 # Input(Data Variable Absolute) ; Modifier byte
+#9501 # Report Count(1)
+#7508 # Report Size(8)
+#8103 # Input(Constant Variable Absolute) ; 
+#9505 # Report Count(5)
+#7501 # Report Size(1)
+#0508 # Usage Page(LEDs)
+#1901 # Usage Minimum(1)
+#2905 # Usage Maximum(5)
+#9102 # Output(Data Variable Absolute) ; LED report
+#9501 # Report Count(1)
+#7503 # Report Size(3)
+#9103 # Output(Constant Variable Absolute) ; 
+#9506 # Report Count(6)
+#7508 # Report Size(8)
+#1500 # Logical Minimum(0)
+#25ff # Logical Maximum(255)
+#0507 # Usage Page(Keyboard/Keypad)
+#1900 # Usage Minimum(0)
+#29ff # Usage Maximum(255)
+#8100 # Input(Data Array) ; Key arrarys 6 bytes
+#c0 # End Collection
+
+
+#05 0c #Usage Page (Consumer)
+#09 01 #Usage (Consumer Control)	09 01
+#a1 01 #Collection (Application)	A1 01
+#85 02#    Report Id (2)	85 02			
+#19 00 #    Usage Minimum (Unassigned)	19 00
+#2a ff 03 #    Usage Maximum (Reserved (0x03FF))	2A FF 03
+#15 00 #    Logical minimum (0)	15 00
+#26 ff 03 #    Logical maximum (1'023)	26 FF 03
+#95 01 #    Report Count (1)	95 01
+#75 10 #    Report Size (16)	75 10
+#81 00 #    Input (Data,Array,Absolute,Bit Field)	81 00
+#c0 #End Collection	C0 
+
+#Զ
+#0501 # Usage Page(Generic Desktop)
+#0906 # Usage(Keyboard)
+#a101 # Collection(Application)
+#8507# Report ID(7)    
+#0507# Usage Page(Keyboard/Keypad)
+#19e0 #    Usage Minimum (Keyboard Left Control)	19 E0
+#29e7 #    Usage Maximum (Keyboard Right GUI)	29 E7
+#1500 # Logical Minimum(0)
+#2501 # Logical Maximum(1)
+#7501 #    Report Size (1)	75 01
+#9508 # Report Count(8)
+#8100 #     Input (Data,Array,Absolute,Bit Field)	81 00
+#9598 #    Report Count (152)	95 98
+#7501 # Report Size(1)
+#1500 # Logical Minimum(0)
+#2501 # Logical Maximum(1)
+#0507 # Usage Page(Keyboard/Keypad)
+#1900 #     Usage Minimum (No event indicated)	19 00
+#2998 #     Usage Maximum (Reserved (0x0098))	29 98
+#8102 # Input(Data Variable Absolute) ; Modifier byte
+#c0 # End Collection
+
+#Characteristic:Hid information
+#26 00 02 03 28 01 02
+#27 00 02 4a 2a 04 11 01 00 01        
+#Characteristic
+#28 00 02 03 28 01 04
+#29 00 02 4c 2a 01 00
+
+#Primary Service: BAS
+#2a 00 02 00 28 02 0f 18 
+#Characteristic: Battery Level
+#2b 00 02 03 28 01 12 
+#2c 00 02 19 2a 01 64 
+#Client Characteristic Configuration
+#2d 00 02 02 29 02 00 00 
+#End of Attribute list
+#00 00
+
+
+
+
Index: rongyuan/sched/bt_keyboard.dat
===================================================================
--- /YC3121_demo/ModuleDemo/BlueTooth/BT_code_patch/keyboard/branches/rongyuan/sched/bt_keyboard.dat	(nonexistent)
+++ /YC3121_demo/ModuleDemo/BlueTooth/BT_code_patch/keyboard/branches/rongyuan/sched/bt_keyboard.dat	(working copy)
@@ -0,0 +1,219 @@
+
+
+mem_app_connection_options:17
+
+###3.0###
+mem_scan_mode:00
+mem_module_spp_lpm_mult:28
+
+##############passkey CONFIG##############
+mem_sp_iocap_local:02 00 04
+mem_ssp_enable:01
+mem_ssp_mode_flag:02
+#####################################
+
+mem_ui_profile_supported:01
+
+mem_lap:36 ff c2 08 66 22    
+mem_local_name_length:
+'BT3.0 Keyboard
+
+###3.0 sinff param###
+mem_sniff_param_interval:0e 00
+mem_sniff_param_attempt:01
+mem_sniff_param_timeout:01
+mem_unsniff2sniff_timer:0a
+
+mem_class: 40 25 00
+
+mem_device_option:43
+mem_ptt:0
+mem_features:
+ff
+fb
+8f
+fa	#fe--EDR  F8--BR
+8b	#AFHclose 83
+85
+59
+83
+
+
+
+mem_eir_enable:01
+
+mem_all_uuid_16bits:
+06
+03#Type: Complete list of 16-bit UUIDs
+1100 0001 0210 2411  0012  0100
+
+mem_all_uuid_128bits:00
+
+
+mem_ui_uuid_table:mem_module_uuid_list
+
+mem_module_uuid_list:
+#uuids
+04 0011 0100 1002 1124
+
+#handle
+00010000
+
+#total length
+36019a #01b6+19-43-2=1cf-43-2=18c-2=18a
+
+#attribute start, first 4 digit is attribute ID
+090000 0a 00010000
+090001 3503 191124
+090004 350d 3506 190100 090011 3503 190011
+090005 3503 191002
+090006 3509 09656e 09006a 090100
+090009 3508 3506 191124 090100
+09000d 350f 350d 3506 190100 090013 3503 190011
+
+#Service Name
+#090100 2517
+#'Apple Wireless Keyboard
+#41 70 70 6c 65 20 57 69 72 65 6c 65 73 73 20 4b 65 79 62 6f 61 72 64
+#Service Name
+090100 253d
+#'Broadcom Bluetooth Wireless  Keyboard                        
+4272 6f61 6463 6f6d 2042 6c75 6574 6f6f 7468 2057 6972 656c 6573 7320 204b 6579 626f 6172 6420 
+2020 2020 2020 2020 2020 2020 2020 2020 2020 2020 2020 20
+
+#Service Description
+090101 2508
+#'Keyboard
+4b6579626f617264
+
+#Provider Name
+#090102 250a
+#'Apple Inc.
+#41 70 70 6c 65 20 49 6e 63 2e
+#Provider Name
+090102 2510
+#'Broadcom Corp.  
+4272 6f61 6463 6f6d 2043 6f72 702e 2020
+
+090200 090100
+090201 090111
+090202 0840
+090203 0821
+090204 2801
+090205 2801
+090206 3589 3587 0822 2583  #9f+19-43-2 = 73
+
+# hid descriptor
+0501 # Usage Page(Generic Desktop)
+0906 # Usage(Keyboard)
+a101 # Collection(Application)
+8501 # Report ID(1)
+7501 # Report Size(1)
+9508 # Report Count(8)
+0507 # Usage Page(Keyboard/Keypad)
+19e0 # Usage Minimum(224)
+29e7 # Usage Maximum(231)
+1500 # Logical Minimum(0)
+2501 # Logical Maximum(1)
+8102 # Input(Data Variable Absolute) ; Modifier byte
+9501 # Report Count(1)
+7508 # Report Size(8)
+8103 # Input(Constant Variable Absolute) ; 
+9505 # Report Count(5)
+7501 # Report Size(1)
+0508 # Usage Page(LEDs)
+1901 # Usage Minimum(1)
+2905 # Usage Maximum(5)
+9102 # Output(Data Variable Absolute) ; LED report
+9501 # Report Count(1)
+7503 # Report Size(3)
+9103 # Output(Constant Variable Absolute) ; 
+9506 # Report Count(6)
+7508 # Report Size(8)
+1500 # Logical Minimum(0)
+25ff # Logical Maximum(255)
+0507 # Usage Page(Keyboard/Keypad)
+1900 # Usage Minimum(0)
+29ff # Usage Maximum(255)
+8100 # Input(Data Array) ; Key arrarys 6 bytes
+c0 # End Collection
+
+
+05 0c #Usage Page (Consumer)
+09 01 #Usage (Consumer Control)	09 01
+a1 01 #Collection (Application)	A1 01
+85 02#    Report Id (2)	85 02			
+19 00 #    Usage Minimum (Unassigned)	19 00
+2a ff 03 #    Usage Maximum (Reserved (0x03FF))	2A FF 03
+15 00 #    Logical minimum (0)	15 00
+26 ff 03 #    Logical maximum (1'023)	26 FF 03
+95 01 #    Report Count (1)	95 01
+75 10 #    Report Size (16)	75 10
+81 00 #    Input (Data,Array,Absolute,Bit Field)	81 00
+c0 #End Collection	C0 
+
+#???
+0501 # Usage Page(Generic Desktop)
+0906 # Usage(Keyboard)
+a101 # Collection(Application)
+8507# Report ID(7)    
+0507# Usage Page(Keyboard/Keypad)
+19e0 #    Usage Minimum (Keyboard Left Control)	19 E0
+29e7 #    Usage Maximum (Keyboard Right GUI)	29 E7
+1500 # Logical Minimum(0)
+2501 # Logical Maximum(1)
+7501 #    Report Size (1)	75 01
+9508 # Report Count(8)
+8100 #     Input (Data,Array,Absolute,Bit Field)	81 00
+95a8 #    Report Count (168)	95 A8
+7501 # Report Size(1)
+1500 # Logical Minimum(0)
+2501 # Logical Maximum(1)
+0507 # Usage Page(Keyboard/Keypad)
+1900 #     Usage Minimum (No event indicated)	19 00
+29a8 #     Usage Maximum (Reserved (0x00A8))	29 A8
+8102 # Input(Data Variable Absolute) ; Modifier byte
+c0 # End Collection
+
+
+090207 3508 3506 090409 090100
+09020b 090100
+09020c 090c80
+09020d 2800
+09020e 2801
+09020f 090318
+090210 090000
+#attribute end
+
+#uuids for pnpInformation	
+03 1002 1200 0001
+
+#handle
+00010001
+
+#total length 90 bytes
+3600a1
+
+#attribute list
+090000 0a00010001
+090001 3503 191200
+090004 350d 3506 190100 090001 3503 190001
+090006 3509 09656e 09006a 090100
+090009 3508 3506 191200 090100
+090100 252f42726f6164636f6d20426c7565746f6f746820576972656c657373204b6579626f61726420506e5020536572766572
+090101 25084b6579626f617264
+090200 090103
+090201# VendorID
+0904e8
+090202#ProductID
+097021
+090203 090001
+090204 2801
+090205 090002
+
+#attribute end
+00
+
+#Auto reconnection after power on
+
+
