Index: a.bat
===================================================================
--- /branch/usb/usb_public_base/a.bat	(revision 0)
+++ /branch/usb/usb_public_base/a.bat	(working copy)
@@ -0,0 +1,10 @@
+e pu
+e 8043 00
+
+e hu output/romcode.rom 3800
+e ku
+e pu
+e hu output/ramcode.rom 0
+e pu
+e su output/sched.rom
+e cu
\ No newline at end of file
Index: d.bat
===================================================================
--- /branch/usb/usb_public_base/d.bat	(revision 0)
+++ /branch/usb/usb_public_base/d.bat	(working copy)
@@ -0,0 +1,10 @@
+call do.bat eep
+e pu
+e 8043 00
+e 8070 3e6c6d
+e er 0 10
+e ew 0 112233
+e er 0 10
+e ep ./output/eeprom.dat
+e er 0 10
+e ku
Index: do.bat
===================================================================
--- /branch/usb/usb_public_base/do.bat	(revision 0)
+++ /branch/usb/usb_public_base/do.bat	(working copy)
@@ -0,0 +1,89 @@
+@set FPGA_PATH=fpgajic\fpga
+@set ROM_PATH=.
+@set MV_PATCH=mv\src\yichip
+@set YC_PATCH_FILE=yc_patch_yc1021.h
+@set enc=1
+@set enckey=0000000000000000
+@rem set device_option=rfbqb
+@rem set device_option=mouse
+@rem set device_option=shutter
+@rem set device_option=hci
+@rem set device_option=antilost
+@set device_option=dongle
+@rem set device_option=module
+@rem set device_option=car
+@rem set device_option=remote_car
+@rem set device_option=light
+@echo off
+
+setlocal enabledelayedexpansion
+for %%f in (program\ble_protocol_stack\*.prog) do @set progs=!progs! %%f
+for %%f in (program\g24_protocol_stack\*.prog) do @set progs=!progs! %%f
+for %%f in (program\app_light\remoter\*.prog) do @set light_progs=!light_progs! %%f
+for %%f in (program\app_light\fan\*.prog) do @set light_progs=!light_progs! %%f
+for %%f in (program\app_light\common\*.prog) do @set light_progs=!light_progs! %%f
+for %%f in (program\*.prog) do @if not %%f==program\bt.prog if not %%f==program\patch.prog if not %%f==program\sim.prog set progs=!progs! %%f
+type program\bt.prog %progs% %light_progs% > output\bt_program23.meta
+
+for %%f in (format\ble_protocol_stack\*.format) do set fmts=!fmts! %%f
+for %%f in (format\g24_protocol_stack\*.format) do set fmts=!fmts! %%f
+for %%f in (format\app_light_format\*.format) do set fmts=!fmts! %%f
+for %%f in (format\*.format) do @if not %%f==format\bt.format if not %%f==format\command.format set fmts=!fmts! %%f
+type format\bt.format %fmts% format\command.format > output\bt_format.meta
+::perl util/memalloc.pl output/bt_format.meta
+
+if "%device_option%" equ "hci" (
+  copy sched\hci_boot.dat output\sched.rom
+) else if "%device_option%" equ "mouse" (
+  copy sched\mouse.dat + sched\1306.dat output\sched.rom
+) else if "%device_option%" equ "module" (
+  copy sched\DM_module.dat + sched\1306.dat output\sched.rom
+) else if "%device_option%" equ "shutter" (
+  copy sched\shutter.dat + sched\1306.dat output\sched.rom
+) else if "%device_option%" equ "antilost" (
+  copy sched\antilost.dat + sched\1306.dat output\sched.rom
+) else if "%device_option%" equ "dongle" (
+  copy sched\dongle.dat + sched\1306.dat output\sched.rom
+) else if "%device_option%" equ "car" (
+  copy sched\car.dat + sched\1306.dat output\sched.rom
+) else if "%device_option%" equ "remote_car" (
+  copy sched\remote_car.dat + sched\1306.dat output\sched.rom
+ ) else if "%device_option%" equ "light" (
+  copy sched\1306.dat output\sched.rom
+) else (
+
+cd ..
+echo **********************************
+echo Error: illegal device_option !
+echo **********************************
+goto end
+) 
+
+perl util/mergepatch.pl 
+
+cd output
+osiuasm bt_program23 -O-W
+
+geneep -n 
+::geneep -n -k key.dat 
+
+echo create auth rom
+perl ../util/mergepatch.pl mouse_ble_att_list usb_kbdata_vendor_define usb_kbdata usb_msdata usb_devicedata usb_confdata ble_shutter_gatt_list ble_shutter_key_value_list ble_car_att_list 
+perl ../util/romcrc.pl romcode.rom
+
+
+if "%device_option%" equ "mouse" (
+cd ..\output
+copy eeprom.dat ..\util\eeprom.dat
+cd ..\util
+eeprom2fulleeprom.exe eeprom.dat 64>compare2.dat
+crc16.exe compare2.dat 2 >..\output\eeprom.dat
+del eeprom.dat
+del compare2.dat
+cd ..\output
+copy eeprom.dat ..\output\flash.dat 
+)
+
+
+:end
+
Index: format/app.format
===================================================================
--- /branch/usb/usb_public_base/format/app.format	(revision 0)
+++ /branch/usb/usb_public_base/format/app.format	(working copy)
@@ -0,0 +1,316 @@
+
+memalloc(
+
+/* load code */
+1 mem_ucode_device_flag
+1 mem_peripheral_lock_flag
+1 mem_ucode_status
+1 mem_spid_tbuf				/* spid buf: 03 addr[23:16] addr[15:8] addr[7:0] */
+0 mem_iicd_tbuf				/* iicd buf: iic_adr addr[15:8] addr[7:0] iic_adr */
+1 mem_addr_hi
+1 mem_addr_mi
+1 mem_addr_lo
+1 mem_iicd_addr
+4 mem_spid_rbuf
+2 mem_ucode_buf
+2 mem_ucode_len
+2 mem_sched_addr
+2 mem_ucode_ptr
+16 mem_ucode_keybuf
+
+1 mem_app_evt_timer_count
+1 mem_load_delay
+1 mem_load_check_sum
+)
+
+xmemalloc(
+
+/*App Callback Functons*/
+2 mem_cb_check_wakelock
+2 mem_cb_before_hibernate
+2 mem_cb_before_lpm
+2 mem_cb_le_process
+2 mem_cb_idle_process
+2 mem_cb_bb_event_process
+2 mem_cb_att_write
+2 mem_cb_ble_transmit
+2 mem_cb_event_timer
+2 mem_cb_bt_set_mult
+2 mem_cb_spi_flash_write_complate
+2 mem_cb_before_lpm_sleep
+
+2 mem_eeprom_base
+
+//lpm mode
+1 mem_wake_up_delay_timer
+
+1 mem_app_connection_options
+
+//
+2 mem_app_disconn_reason
+2 mem_app_disconn_reason_flag
+1 mem_xrecord_mode
+
+1 mem_eeprom_block_size
+1 mem_spi_init_clk
+1 mem_spi_init_delay_time
+1 mem_spi_ncs_gpio
+
+2 mem_nv_data_ptr
+1 mem_nv_data_number
+
+2 mem_queue_ptr
+
+
+//adc
+2 mem_3v_adc_io_data
+2 mem_2v_adc_hvin_data
+2 mem_2v_adc_vinlpm_data
+2 mem_1v_adc_io_data
+2 mem_3v_adc_hvin_data
+2 mem_3v_adc_vinlpm_data
+1 mem_app_adc_read_count
+1 mem_start_adc_clkn
+2 mem_reference_voltage
+1 mem_adc_config_flag
+1 mem_adc_channel
+2 mem_adc_current_value
+1 mem_adc_power_flag	//bit0:low power falg ; bit1:no power flag
+
+3 mem_spi_write_addr
+2 mem_spi_write_ptr
+2 mem_spi_write_len
+1 mem_spi_write_flash_sm
+
+
+1 mem_spi_cs_gpio
+1 mem_spi_si_gpio
+1 mem_spi_so_gpio
+1 mem_spi_sclk_gpio
+1 mem_spi_wp_gpio
+1 mem_spi_hold_gpio
+
+
+1 mem_eeprom_wp_gpio
+1 mem_eeprom_scl_gpio
+1 mem_eeprom_sda_gpio
+2 mem_kscan_ptr
+0 mem_key_num_ptr
+2 mem_keyscan_ptr
+2 mem_key_value_retention
+2 mem_power_param_ptr
+3 mem_efuse_header
+
+1 mem_seqi
+1 mem_set_cdb_on
+1 mem_syn_cal_ctrl
+
+1 mem_dig_aon_vsel
+1 mem_syn_afc_cfg1
+1 mem_rf_ldo_cfg1
+1 mem_rc_cal
+
+1 mem_nec_decode_error_value
+
+ifdef AC_50HZ
+1 mem_ac_detect_gpio
+0 mem_ac_detect_control
+1 mem_ac_detect_div
+1 mem_ac_detect_window
+endif
+
+1 mem_wdt_always_work
+
+)
+//adc read
+(
+0 ADC_CONFIG_VINLPM
+1 ADC_CONFIG_HVIN
+2 ADC_CONFIG_GPIO
+)
+
+
+(
+0 QUEUE_OFFSET_EACH_SIZE
+1 QUEUE_OFFSET_LENGTH
+2 QUEUE_OFFSET_CURR_NUM
+3 QUEUE_OFFSET_READ_PTR
+4 QUEUE_OFFSET_WRITE_PTR
+5 QUEUE_OFFSET_ELE_INIT_ADDR
+)
+(
+//Flash Register
+0x05 FLASH_READ_SATUS
+
+// Flash Status Register
+0x00 FLASH_STATUS_WIP
+0X01 FLASH_STATUS_WEL
+0X02 FLASH_STATUS_BP0
+0X03 FLASH_STATUS_BP1
+
+//Flash Write Sm
+0X00 FLASH_SM_NO_BUYS
+0X01 FLASH_SM_START
+0X02 FLASH_SM_ERASE_SECTOR
+0X03 FLASH_SM_WAIT_ERASE_SECTOR
+0X04 FLASH_SM_WRITE_DATA
+0X05 FLASH_SM_WAIT_WRITE_DATA
+
+
+//Flash Command
+0x02 FLASH_COMMAND_WRITE_DATA
+0x03 FLASH_COMMAND_READ_DATA
+0x06 FLASH_COMMAND_WRITE_ENABLE
+0x20 FLASH_COMMAND_SECTOR_ERASE
+0xAB FLASH_COMMAND_RELEASE_FROM_POWERDOWN
+0xB9 FLASH_COMMAND_POWERDOWN
+
+)
+
+
+(
+3 OTP_UFLAG_AES
+2 OTP_UFLAG_SKIP_EEP
+1 OTP_UFLAG_SKIP_FLASH
+0 OTP_UFLAG_HCI
+)
+
+//OTP
+(
+0 OTP_OFFSET_UCODE_FLAG
+
+0x7d0 OTP_OFFSET_DEVICE_FLAG  
+0x7d1 OTP_OFFSET_PERIPHERALS_LOCK
+0x7d2 OTP_OFFSET_APP_VDD_SEL
+0x7d3 OTP_OFFSET_LOADCODE_DELAY
+0x7d4 OTP_OFFSET_LOADCODE_CHECKSUM
+
+0x7e0 OTP_OFFSET_ADC_PARAM
+0x7f0 OTP_OFFSET_UCODE_KEY
+)
+
+
+(
+//OTP_OFFSET_PERIPHERALS_LOCK
+0 OTP_SPI_LOCK_BIT
+2 OTP_UART_LOCK_BIT
+4 OTP_IIC_LOCK_BIT
+)
+
+
+
+/*mem_device_option*/
+(
+4 dvc_op_dongle
+5 dvc_op_test
+8 dvc_op_mouse
+9 dvc_op_shutter
+0x0a dvc_op_module
+0x0b dvc_op_light
+0x0c dvc_op_hci_boot
+0x0d dvc_op_remote_car
+0x0e dvc_op_car
+   
+)
+
+
+(
+7 gpio_active_bit
+)
+
+(
+5 LPM_WAKE_UP_DELAY_TIMER
+)
+
+
+//mem_app_disconn_reason
+//mem_app_disconn_reason_flag
+//bit map
+(
+2 APP_DISC_RSN_SIZE
+)
+
+(
+0 APP_DISC_BY_BUTTON
+7 APP_DISC_BLE
+)
+
+//eeprom init flag
+(
+0xaa55 EEPROM_INIT_FLAG
+)
+
+(
+1 KEY_CONF_STRUCT_LEN
+0 KEY_PIN_OFFSET
+)
+
+(
+12000000 PWM_12MHZ
+24000000 PWM_24MHZ
+33000 PWM_33KHZ
+)
+(
+0 POWER_OFF
+1 POWER_STARTING
+2 POWER_STANDBY
+)
+//power parameter offset(8 byte)
+(
+0 power_state_offset
+1 power_timer_offset
+2 power_off_timeout_offset
+3 power_starting_timeout_offset
+4 power_off_cb_offset
+6 power_starting_cb_offset
+8 power_standby_cb_offset
+10 ui_butten_up_cb_offset
+)
+
+//auth rom address
+(
+0x9000 MOUSE_BLE_ATT_LIST_ADDR
+0x9272 USB_KBDATA_VENDOR_DEFINE_ADDR
+0x928d USB_KBDATA_ADDR
+0x92cd USB_MSDATA_ADDR
+0x9371 USB_DEVICEDATA_ADDR
+0x9384 USB_CONFDATA_ADDR
+0x93c0 BLE_SHUTTER_GATT_LIST_ADDR
+0x94f9 BLE_SHUTTER_KEY_VALUE_LIST_ADDR
+0x9521 BLE_CAR_ATT_LIST_ADDR
+0x97fc mem_sim_slave
+)
+
+(//NEC 61212
+9000 NEC61212_BOOT_CODE_START_TIME
+4500 NEC61212_BOOT_CODE_END_TIME
+
+9000 NEC61212_REPEAT_START_TIME
+2250 NEC61212_REPEAT_END_TIME
+
+560 NEC61212_DATA_BIT_1_START_TIME
+1690 NEC61212_DATA_BIT_1_END_TIME
+
+560 NEC61212_DATA_BIT_0_START_TIME
+560 NEC61212_DATA_BIT_0_END_TIME
+
+560 NEC61212_STOP_TIME
+
+42580 NEC61212_DATA2REPEAT_TIME
+98190 NEC61212_REPEAT2REPEAT_TIME
+
+0xffff NEC61212_TIMEOUT_TIME
+)
+
+
+(
+0 ADC_GPIO_4
+1 ADC_GPIO_5
+2 ADC_GPIO_6
+3 ADC_GPIO_7
+4 ADC_GPIO_9
+5 ADC_GPIO_10
+6 ADC_GPIO_11
+7 ADC_GPIO_12
+)
+
Index: format/app_car.format
===================================================================
--- /branch/usb/usb_public_base/format/app_car.format	(revision 0)
+++ /branch/usb/usb_public_base/format/app_car.format	(working copy)
@@ -0,0 +1,335 @@
+
+
+xmemalloc g24_rx_car(
+1 mem_car_hard_soft_switch
+1 mem_car_queue_each_size
+1 mem_car__queue_length
+
+1 mem_car_queue_curr_num
+1 mem_car_queue_read_ptr
+1 mem_car_queue_write_ptr
+120 mem_car_queue_ele
+
+20 mem_car_pop_queue_buff
+
+1 mem_car_led_num
+10 mem_car_led_map
+
+1 mem_car_style1_led_type
+1 mem_car_style1_blink_count
+1 mem_car_style1_struct_led_gpio
+2 mem_car_style1_on_time
+2 mem_car_style1_off_time
+2 mem_car_style1_cb_ledon
+2 mem_car_style1_cb_ledoff
+
+1 mem_car_style2_led_type
+1 mem_car_style2_blink_count
+1 mem_car_style2_struct_led_gpio
+2 mem_car_style2_on_time
+2 mem_car_style2_off_time
+2 mem_car_style2_cb_ledon
+2 mem_car_style2_cb_ledoff
+
+//////motor
+0 mem_le_receive_data
+2 mem_le_receive_packet_head
+1 mem_le_receive_cmd
+2 mem_le_receive_length
+10 mem_le_receive_payload
+1 mem_le_receive_checksum
+1 mem_motor1_status
+1 mem_motor1_speed
+1 mem_motor2_status
+1 mem_motor2_speed
+1 mem_motor3_status
+1 mem_motor3_speed
+
+0 mem_motor1_pwm_set
+1 mem_motor1_pwm_pin1_set
+1 mem_motor1_pwm_pin2_set
+1 mem_motor1_pwm_pin_set
+1 mem_motor1_pwm_channel_set
+3 mem_motor1_pwm_freq_set
+1 mem_motor1_pwm_dute_set
+0 mem_motor2_pwm_set
+1 mem_motor2_pwm_pin1_set
+1 mem_motor2_pwm_pin2_set
+1 mem_motor2_pwm_pin_set
+1 mem_motor2_pwm_channel_set
+3 mem_motor2_pwm_freq_set
+1 mem_motor2_pwm_dute_set
+0 mem_motor3_pwm_set
+1 mem_motor3_pwm_pin1_set
+1 mem_motor3_pwm_pin2_set
+1 mem_motor3_pwm_pin_set
+1 mem_motor3_pwm_channel_set
+3 mem_motor3_pwm_freq_set
+1 mem_motor3_pwm_dute_set
+
+1 mem_motor_select_p_n
+1 mem_car_motor_status
+1 mem_car_motor_speed
+0 mem_motor_pwm_set
+1 mem_motor_pwm_pin1_set
+1 mem_motor_pwm_pin2_set
+1 mem_motor_pwm_pin_set
+1 mem_motor_pwm_channel_set
+3 mem_motor_pwm_freq_set
+1 mem_motor_pwm_dute_set
+
+1 mem_ir_rx_gpio
+2 mem_ir_data
+2 mem_ir_rx_buf
+4 mem_ir_receive_clkn
+
+3 mem_ir_notify_data
+5 mem_ir_notify_data_head
+2 mem_ir_notify_data_payload
+1 mem_ir_notify_data_check_sum
+1 mem_car_ir_breakdown_check_timer
+1 mem_car_ir_breakdown_flag
+
+0 mem_car_led_control
+1 mem_car_led1_status
+1 mem_car_led2_status
+1 mem_car_led3_status
+1 mem_car_led4_status
+1 mem_car_led5_status
+1 mem_car_led6_status
+1 mem_car_led7_status
+1 mem_car_led8_status
+1 mem_car_led_control_timer
+1 mem_car_led_blink_status
+1 mem_car_led_no
+
+3 mem_car_info_request
+5 mem_car_info_request_head
+8 mem_car_info_request_payload
+1 mem_car_info_request_checksum
+
+0 mem_car_config_param
+1 mem_car_config_setting_flag
+1 mem_car_config_device_select
+1 mem_car_config_motor_layout
+1 mem_car_config_ir_enable
+1 mem_car_config_ir_rx_gpio
+1 mem_car_config_pairing_led_conn_status
+1 mem_car_config_pairing_led_gpio
+1 mem_car_config_led_num
+0 mem_car_config_blood_led_gpio
+1 mem_car_config_blood_led1_gpio
+1 mem_car_config_blood_led2_gpio
+1 mem_car_config_blood_led3_gpio
+1 mem_car_config_blood_led4_gpio
+1 mem_car_config_blood_led5_gpio
+1 mem_car_config_blood_led6_gpio
+1 mem_car_config_blood_led7_gpio
+1 mem_car_config_blood_led8_gpio
+1 mem_car_config_bat_notify_enable
+1 mem_car_config_low_voltage_led_gpio
+1 mem_car_config_low_voltage_percent
+1 mem_car_config_soft_switch_enable
+1 mem_car_config_soft_switch_gpio
+
+1 mem_car_notify_vdd_count
+1 mem_car_notify_vdd_timer
+1 mem_car_notify_vdd_value_last
+1 mem_car_notify_vdd_percent
+1 mem_car_working_flag
+1 mem_low_bat_flag
+
+3 mem_notify_bat_packet
+5 mem_notify_bat_head
+1 mem_notify_bat_payload
+1 mem_notify_bat_check_sum
+
+1 mem_vdd_notify_flag
+2 mem_car_current_vdd_value_temp
+2 mem_car_last_vdd_value
+
+0 mem_vdd_calculate_set
+2 mem_vdd_full_vol
+2 mem_vdd_empty_vol
+2 mem_vdd_low_vol
+2 mem_vdd_now_vol
+
+
+1 mem_car_24g_status
+2 mem_car_24g_no_data_timeout_count
+2 mem_car_24g_no_data_timeout_timer
+
+1 mem_car_24g_ir_receive_attack_count
+1 mem_car_24g_go_die_flag
+1 mem_car_attack_shake_timer
+1 mem_car_attack_shake_flag
+
+0 mem_car_soft_power
+1 mem_car_power_state
+1 mem_car_power_timer
+1 mem_car_power_off_timeout
+1 mem_car_power_starting_timeout
+2 mem_car_power_off_cb
+2 mem_car_power_starting_cb
+2 mem_car_power_standby_cb
+2 mem_car_ui_button_up_cb
+
+
+500 mem_car_le_att_list
+
+1 mem_car_moto1_blank_timer
+1 mem_car_moto2_blank_timer
+1 mem_car_moto3_blank_timer
+
+1 mem_car_motor_gpio_num
+0 mem_car_motor_gpio_map
+1 mem_car_motor_left_gpio
+1 mem_car_motor_right_gpio
+1 mem_car_motor_front_gpio
+1 mem_car_motor_back_gpio
+1 mem_car_gpio
+1 mem_car_app_send_speed
+
+2 mem_rssi_sum
+2 mem_check_rssi_high_count
+8 mem_rssi_data
+
+1 mem_car_24g_received_pac
+1 mem_car_24g_bind_enable_delay_count
+
+0 mem_car_keyscan
+1 mem_car_key_num
+2 mem_cb_car_keyscan
+
+2 mem_car_enter_lpm_timer_count
+2 mem_car_enter_lpm_timer
+1 mem_car_enter_lpm_flag
+
+1 mem_car_24g_ch_polling
+
+8 mem_car_rssi_noise_buffer
+8 mem_car_rssi_noise_car_buffer
+8 mem_car_rssi_noise_remote_buffer
+
+
+4 mem_car_24g_commom_addr
+4 mem_car_24g_commom_addr_temp
+4 mem_car_24g_commom_addr_read
+1 mem_car_save_addr_flag
+400 mem_ble_att_list
+)
+
+(
+//20ms
+0x0020	FAST_ADV_INTERVAL_VALUE_CAR
+)
+
+(
+0x19 ATT_CAR_CONTROL_HANDLE
+0x19 ATT_SPEED_SET_HANDLE
+)
+
+
+(
+0 TURN_FRONT
+1 TURN_LEFT
+2 TURN_RIGHT
+0 MOTOR_STOP
+1 GO_FRONT
+2 GO_BACK
+0x6b5a LE_RECEIVE_PACKET_HEAD
+)
+
+(
+0 FLAG_IR_DISABLE
+1 FLAG_IR_ENABLE
+)
+
+(
+0 DEVICE_CAR
+1 DEVICE_TANK
+2 DEVICE_BATTLE_CAR
+3 DEVICE_BATTLE_TANK
+4 DEVICE_REMOTE
+)
+
+(
+0 F_B_MOTOR
+1 L_R_MOTOR
+2 F_B_BATTERY
+3 L_R_BATTERY
+)
+
+(
+0 CAR_WORK	   		//connect mode normal
+1 CAR_BIND			//code pair mode
+2 CAR_TEST			//test mode
+3 CAR_CODE			//PC_application
+4 CAR_PCBA			//PCBA_TEST
+5 CAR_DEBUG
+6 CAR_MODE_MAX
+7 CAR_SEARCH
+)
+
+(
+1 SPEED_LEVEL_1
+2 SPEED_LEVEL_2
+3 SPEED_LEVEL_3
+4 SPEED_LEVEL_4
+5 SPEED_LEVEL_5
+6 SPEED_LEVEL_6
+7 SPEED_LEVEL_7
+8 SPEED_LEVEL_8
+9 SPEED_LEVEL_9
+10 SPEED_LEVEL_10
+)
+
+(
+0 PWM0_DUTY_SETTING
+1 PWM1_DUTY_SETTING
+2 PWM2_DUTY_SETTING
+)
+
+(
+1 CAR_CMD_BATTERY
+2 CAR_CMD_OLD_CAR_CONTROL
+3 CAR_CMD_OLD_SPEED_CONTROL
+4 CAR_CMD_L_R_MOTOR_CONTROL
+5 CAR_CMD_F_B_MOTOR_CONTROL
+6 CAR_CMD_IR_CONTROL
+7 CAR_CMD_LED_CONTROL
+8 CAR_CMD_DEVICE_INFO
+)
+
+(
+0 CAR_REMOTE_CHECK_BUTTON
+1 CAR_REMOTE_CHECK_ROCKER
+)
+
+(
+0x11 CAR_NOTIFY_HANDLE
+)
+
+(
+0 LED_OFF
+1 LED_ON
+2 LED_BLINK
+0xFF LED_INVALID
+)
+
+(
+0xFF INVALID_PIN_NUM
+)
+
+
+(
+0 POWER_ON
+1 WORK_PAIRED
+2 WORK_SEARCH
+)
+
+(
+0x700 OTP_OFFSET_CAR_COMMOM_START_ADDR 
+0x7cc OTP_OFFSET_CAR_COMMOM_END_ADDR 
+)
+
Index: format/app_dongle.format
===================================================================
--- /branch/usb/usb_public_base/format/app_dongle.format	(revision 0)
+++ /branch/usb/usb_public_base/format/app_dongle.format	(working copy)
@@ -0,0 +1,143 @@
+
+memalloc usb_dongle(
+256 mem_dg_rssi_noise_buffer
+256 mem_dg_rssi_noise_dg_buffer
+256 mem_dg_rssi_noise_ms_buffer
+256 mem_dg_rssi_noise_kb_buffer
+
+68 mem_usb_rxbuf_new	//at least 68B
+0 mem_usb_rxbuf_new_end
+)
+
+
+xmemalloc g24_rx_dongle(
+1 mem_dg_kb_bind_flag
+8 mem_dg_kb_data_sta_data
+8 mem_dg_kb_data_last_data
+3 mem_dg_kb_multikey_sta_data
+3 mem_dg_kb_multikey_last_data
+3 mem_dg_kb_system_sta_data
+3 mem_dg_kb_system_last_data
+1 mem_dg_kb_blank_data_enable
+1 mem_dg_kb_mul_blank_data_enable
+1 mem_dg_ms_blank_data_enable
+
+1 mem_dg_sys_config
+9 mem_dg_usb_vid_pid
+1 mem_dg_usb_tx_interval
+30 mem_dg_usb_device_name
+1 mem_dg_kb_bind_success
+1 mem_dg_pc_sleep_flag
+
+1 mem_dg_24g_tx_power_default
+
+1 mem_24g_device1_bind_disable
+1 mem_24g_device2_bind_disable
+)
+
+
+//otp address offset
+(
+0x5A DONGLE_KB_BIND_SUCCESS
+0x1fdf DONGLE_KB_BIND_EFUSE_OFFECT	//otp addr 0x7df
+)
+
+(
+5 WORK_MODE_DELAY
+7 BIND_MODE_DELAY
+)
+
+(
+0 DONGLE_WORK	   		//connect mode normal
+1 DONGLE_BIND			//code pair mode
+2 DONGLE_TEST			//test mode
+3 DONGLE_CODE			//PC_application
+4 DONGLE_PCBA			//PCBA_TEST
+5 DONGLE_DEBUG
+6 DONGLE_MODE_MAX
+7 DONGLE_SEARCH
+0 CLEAR_INIT
+)
+
+
+(
+0xa0 COMMAND_MODE     //BYTE 0
+0x81 COM_MODE_BIND	//BYTE 1
+0x82 COM_MODE_TEST	//BYTE 1
+)
+(
+0xa1 COMMAND_BIND		//BYTE 0
+0x01 COM_BIND_GET		//1
+0x84 COM_BIND_EXIT		//1
+0xa7 COM_READ_MODE		//1
+)
+(
+0xa2 COMMAND_TEST	//BYTE 0
+0x81 COM_TEST_SC		//	进入单载波
+0x82 COM_TEST_CD		// fcc测试
+0x83 COM_TEST_DAT		// 数据测试
+0x84 COM_TEST_LOW_CH  //低频点
+0x85 COM_TEST_MID_CH	//中频点
+0x86 COM_TEST_HIG_CH	//高频点
+0x87 COM_TEST_SW_HIG	//自动切换频点为高 1mhz
+0x88 COIM_TEST_SW_LOW	//自动切换频点为低 1mhz
+0x89 COM_TEST_SW_STOP	//停止自动切换频点
+0x8a COM_TEST_POW_5		//设置输出功率5dbm
+0x8b COM_TEST_POW_0		//0dbm
+0x8c COM_TEST_POW_N5		//-5dbm
+0x8d COM_TEST_POW_N10		//-10dbm
+0x8e COM_TEST_EXIT			//退出测试模式
+)
+(
+0xa6 COMMAND_CURRENT_PROJECT
+0xa7 COMMAND_CURRENT_MODE
+0xa9 COMMAND_CURRENT_FW_VERSION
+0xb0 COMMAND_USER_DEFINED		//user defined cmd
+)
+
+(
+0x15 PRODUCT_ID
+0 FW_VERSION0
+0 FW_VERSION1
+1 FW_VERSION2
+7 FW_VERSION3
+)
+
+(
+640 TIMER_NODATA_DELAY	//200ms
+
+384 TIMER_MS_BLANK_DELAY
+
+384 TIMER_KB_MUL_BLANK_DELAY
+
+384 TIMER_KB_BLANK_DELAY
+)
+
+(
+0 KB_NORMAL_REPORT_ID
+1 MS_REPORT_ID
+2 KB_SYSTEM_CONCTRL_REPORT_ID
+3 KB_MULTIKEY_REPORT_ID
+)
+
+
+(
+0x01 BIND_ACKPAYLOAD
+0x03 KB_LED_ACKPAYLOAD
+)
+
+//mem_dg_sys_config
+(
+7 DG_ENABLE_XTAL_24M
+6 DG_ENABLE_NEW_CHMAP
+5 DG_ENABLE_EEPROM
+4 DG_ENABLE_KB_ICON
+3 DG_ENABLE_24G_2M
+)
+
+(
+0x04 HVIN_VIN_LESS_THAN_4V2
+0x06 HVIN_GREATER_THAN_4V2_AND_VIN_LESS_THAN_4V2
+0x3a HVIN_VIN_GREATER_THAN_4V2
+)
+
Index: format/app_light_format/dflp_mmap.format
===================================================================
--- /branch/usb/usb_public_base/format/app_light_format/dflp_mmap.format	(revision 0)
+++ /branch/usb/usb_public_base/format/app_light_format/dflp_mmap.format	(working copy)
@@ -0,0 +1,186 @@
+
+
+xmemalloc ftd_rlmp_dflp(
+	//value load from otp
+	0 mem_ftd_fan_cfg_catch
+	1 mem_fan_protocol_select_flag
+	1 mem_fan_tx_pin
+	1 mem_fan_yc_identify_flag
+	1 mem_customer_id
+	1 mem_customer_id_v2
+	1 mem_id_universal
+	1 mem_manufacture_id_temp
+	1 mem_light_device_flag
+	1 mem_ble_ch_mapped
+
+	
+	//base value
+	2 mem_ble_v2_decoder
+	1 mem_light_speed_temp
+	1 mem_light_blink_count
+	2 mem_pairing_timeout
+	1 mem_light_pairing_enable
+	1 mem_light_last_packetnum
+	6 mem_yc_fan_ble_addr
+	6 mem_recv_addr
+
+	//for 433 trans code
+	2 mem_fan_tx_bits_loop
+	1 mem_fan_opcode
+	1 mem_fan_tx_cnt
+	8 mem_fan_433code_packet   //预留8字节
+	2 mem_fan_tx_loop
+	2 mem_fan_tx_loop2
+	1 mem_fan_433_opcode
+	1 mem_fan_tx_gpio
+	2 mem_fan_tx_gpio_reg
+
+	2 mem_433_tx_cb
+	2 mem_fan_packet_indiscriminate_cb
+
+	
+	//v1 v2 
+	0 mem_ble_parameter
+	2 mem_ble_parameter_cmd
+	4 mem_ble_parameter_para
+	2 mem_ble_parameter_addr
+	1 mem_ble_parameter_group
+	3 mem_fan_addr_433
+
+	
+)
+
+memalloc ftd_rlmp_dflp(
+	0 mem_base_start
+	
+	0 mem_flash_paired_addr_base
+	2 mem_flash_paired_addr0
+	1 mem_flash_paired_addr0_group
+	2 mem_flash_paired_addr1
+	1 mem_flash_paired_addr1_group
+	2 mem_flash_paired_addr2
+	1 mem_flash_paired_addr2_group
+	2 mem_flash_paired_addr3
+	1 mem_flash_paired_addr3_group
+	2 mem_flash_paired_addr4
+	1 mem_flash_paired_addr4_group
+	2 mem_flash_paired_addr5
+	1 mem_flash_paired_addr5_group
+	2 mem_flash_paired_addr6
+	1 mem_flash_paired_addr6_group
+	2 mem_flash_paired_addr7
+	1 mem_flash_paired_addr7_group
+	2 mem_flash_paired_addr8
+	1 mem_flash_paired_addr8_group
+	2 mem_flash_paired_addr9
+	1 mem_flash_paired_addr9_group
+
+	0 mem_msg_cnt_base
+	1 mem_addr0_msg_cnt
+	1 mem_addr1_msg_cnt
+	1 mem_addr2_msg_cnt
+	1 mem_addr3_msg_cnt
+	1 mem_addr4_msg_cnt
+	1 mem_addr5_msg_cnt
+	1 mem_addr6_msg_cnt
+	1 mem_addr7_msg_cnt
+	1 mem_addr8_msg_cnt
+	1 mem_addr9_msg_cnt
+	1 mem_msg_cnt_base1
+	
+	1 mem_msg_addr_save
+	30 mem_msg_before_queue
+	3 mem_count_and_random
+	1 mem_msg_cnt_judgment_window_time
+	1 mem_msg_judgment_window_time
+
+	0 mem_base_end
+
+)
+
+(
+// FET2 433 cmd code
+
+
+	0x06 FAN_433_MASTER_ON_AND_OFF
+	0x10 FAN_433_TAP_POSOTION_1
+	0X12 FAN_433_TAP_POSOTION_2
+	0X1C FAN_433_TAP_POSOTION_3
+	0X0A FAN_433_TAP_POSOTION_4
+	0X0F FAN_433_TAP_POSOTION_5
+	0X0C FAN_433_TAP_POSOTION_6
+	0X16 FAN_433_TAP_POSOTION_0
+	0X17 FAN_433_FAN_SPEED_INC
+	0X1B FAN_433_FAN_SPEED_DEC
+	0X15 FAN_433_NATURAL_WIND
+	0X03 FAN_433_PAIRING
+	0X04 FAN_433_TURNIING_FORWARD
+	0X11 FAN_433_TURNING_REVERSE
+	0x07 FAN_433_WIND_REVERSE
+	0x02 FAN_433_TIMING_TO_OFF_1HOUR
+	0X09 FAN_433_TIMING_TO_OFF_2HOUR
+	0X19 FAN_433_TIMING_TO_OFF_4HOUR
+	0X1A FAN_433_TIMING_TO_OFF_8HOUR
+	0X14 FAN_433_LAMP_ON_ONLY
+	0X18 FAN_433_LAMP_OFF_ONLY	
+	0x08 FAN_433_LAMP_ON_AND_OFF
+	0x13 FAN_433_DEFLECTOR_ON_AND_OFF
+	0x0D FAN_433_DEFLECTOR_ON
+	0x0E FAN_433_DEFLECTOR_OFF
+	0X05 FAN_433_COLOR_SWITCH
+	0X1E FAN_433_SLEEP_WIND
+	0X1f FAN_433_BUZZ
+	0x1D FAN_433_CLEAR
+)
+
+(
+0 FAN_SPEED_FLAG_OFF
+1 FAN_SPEED_FLAG_LOW
+2 FAN_SPEED_FLAG_MIDDLE
+3 FAN_SPEED_FLAG_HIGH
+
+0x01 BLE_DEV_TYPE_LAMP
+0x02 BLE_DEV_TYPE_FAN
+0x04 BLE_DEV_TYPE_FAN_LAMP
+
+	
+60 FAN_BLE_CMD_TIMING_TO_OFF_1HOUR
+120 FAN_BLE_CMD_TIMING_TO_OFF_2HOUR
+240 FAN_BLE_CMD_TIMING_TO_OFF_4HOUR
+480 FAN_BLE_CMD_TIMING_TO_OFF_8HOUR
+
+255 FAN_BLE_CMD_TIMING_TO_OFF_8HOUR_V1
+)
+
+
+(
+0x55 REMOTER_MARKER
+)
+
+(
+0x528718 FTD_REMOTER_ID_CODE
+0x08f9ff FTD_ANDRIOD4913_ID_CODE
+0xf87703 FTD_B65F_ID_CODE
+0x08f903 FTD_IOS4913_ID_CODE
+)
+
+(
+0x00 BLE_PARA_NORMAL_MODE
+0x01 BLE_PARA_SLEEP_MODE
+0x02 BLE_PARA_NATURAL_MODE
+0x03 BLE_PARA_FAN_MODE_MAX
+)
+
+(
+	4 FAN_433CODE_LEN    /*unit: bytes*/
+	3 FAN_RETRANSMISSION_TIMES
+
+	6400 	FAN_HEADER_LOW_DELAY	//FAN_8ms_DELAY_CNT
+	599 	FAN_1_HIGH_DELAY		//FAN_0_75ms_DELAY_CNT
+	200 	FAN_1_LOW_DELAY			//FAN_0_25ms_DELAY_CNT
+	200 	FAN_0_HIGH_DELAY		//FAN_0_25ms_DELAY_CNT
+	599 	FAN_0_LOW_DELAY			//FAN_0_75ms_DELAY_CNT
+	200     FAN_END_HIGH_DELAY		//FAN_0_25ms_DELAY_CNT
+	559     FAN_END_LOW_DELAY		//FAN_0_25ms_DELAY_CNT
+)
+
Index: format/app_light_format/dlmp_mmap.format
===================================================================
--- /branch/usb/usb_public_base/format/app_light_format/dlmp_mmap.format	(revision 0)
+++ /branch/usb/usb_public_base/format/app_light_format/dlmp_mmap.format	(working copy)
@@ -0,0 +1,57 @@
+
+
+
+
+xmemalloc ftd_dlmp(
+
+	2 mem_cb_light_ac_detecting
+	2 mem_cb_light_gradual_dimmer
+	2 mem_light_pwm_freq_w
+	2 mem_light_pwm_freq_y
+	2 mem_light_pwm_freq_l
+	2 mem_light_W_aim_pcnt
+	2 mem_light_Y_aim_pcnt
+	2 mem_light_L_aim_pcnt
+	1 mem_light_gradual_step_w 
+	1 mem_light_gradual_step_y 
+	1 mem_light_gradual_step_l 
+	2 mem_light_mix_change_delay_time
+	1 mem_temp_flag
+	1 mem_light_pwm_enable_flag
+	1 mem_light_gpio_pin_w
+	1 mem_light_gpio_pin_y
+	1 mem_light_gpio_pin_l
+
+
+)
+
+
+
+
+(
+3000 LIGHT_PWM_L_FREQ   /*WY的PWM频率,frequency = 12M / LIGHT_PWM_L_FREQ*/
+1 LIGHT_GRADUAL_STEP_L /* 灯光渐变时的pcnt步进 */
+
+6000 LIGHT_PWM_W_FREQ   /*WY的PWM频率,frequency = 12M / LIGHT_PWM_WY_FREQ*/
+12000 LIGHT_PWM_Y_FREQ   /*WY的PWM频率,frequency = 12M / LIGHT_PWM_WY_FREQ*/
+1 LIGHT_GRADUAL_STEP_WY /* 灯光渐变时的pcnt步进 */
+
+0x04 LIGHT_W_GPIO
+0x809c LIGHT_W_PCNT
+0x809e LIGHT_W_NCNT
+0 PWM_W_ENABLE_BIT  /*pwm channel,用偶数pwm channel*/
+
+0x05 LIGHT_Y_GPIO
+0x80a0 LIGHT_Y_PCNT
+0x80a2 LIGHT_Y_NCNT
+1 PWM_Y_ENABLE_BIT  /*pwm channel,用奇数pwm channel*/
+
+0x06 LIGHT_L_GPIO
+0x80a4 LIGHT_L_PCNT
+0x80a6 LIGHT_L_NCNT
+2 PWM_L_ENABLE_BIT  /*pwm channel,用奇数pwm channel*/
+
+)
+
+
+
Index: format/app_light_format/protocol_V2.format
===================================================================
--- /branch/usb/usb_public_base/format/app_light_format/protocol_V2.format	(revision 0)
+++ /branch/usb/usb_public_base/format/app_light_format/protocol_V2.format	(working copy)
@@ -0,0 +1,50 @@
+
+
+
+(
+0x0009 LIGHT_CMD_TURN_ON_AND_OFF_V2
+0x0010 LIGHT_CMD_TURN_ON_V2
+0x0011 LIGHT_CMD_TURN_OFF_V2
+0x0012 LIGHT_CMD_AIDED_LIGHT_TURN_ON_V2
+0x0013 LIGHT_CMD_AIDED_LIGHT_TURN_OFF_V2
+0x0015 FAN_CMD_WIND_DIRECTION_V2
+0x0016 FAN_CMD_DEFLECTOR_V2
+0x0021 LIGHT_CMD_LIGHT_CTL_V2
+0x0023 LIGHT_CMD_NIGHT_LIGHT_V2
+0X001b LIGHT_CMD_FTD_RGB_FORWARD_AND_REVERSE_V2
+0x001c LIGHT_CMD_RGB_TURN_ON_OFF_V2
+0X001d LIGHT_CMD_FTD_RGB_LOOP_V2
+0x001e LIGHT_CMD_RGB_AUTO_TURN_ON_V2
+0x001f LIGHT_CMD_RGB_AUTO_TURN_OFF_V2
+0x0022 LIGHT_CMD_RGB_MANUAL_V2
+0x0030 FAN_CMD_WIND_SPEED_CTL_V2
+0x0031 FAN_CMD_WIND_SPEED_V2
+0x0033 FAN_CMD_MODE_SEL_V2
+0x0041 CMD_TIMING_OFF
+0x0045 CMD_CLEAR_CODE
+0x0046 LIGHT_CMD_KEYPRESS_DRIVE_RETENTION_V2
+0x0047 LIGHT_CMD_BACK_TO_RETENTION_STATE_V2
+0x006f FAN_CMD_MASTER_ON_AND_OFF_V2
+0x0028 CMD_PAIRING
+0x0022 LIGHT_CMD_RGB_COLOR_SWITCH_V2
+0x0068 LIGHT_CMD_BATH_V2
+0x0067 LIGHT_CMD_AIR_CHANGE_V2
+0X0066 LIGHT_CMD_HEATING_V2
+0X0032 LIGHT_CMD_FAN_TURN_ON
+0X0031 LIGHT_CMD_FAN_TURN_OFF
+0x006f LIGHT_CMD_FTD_MASSTER_OFF_V2
+0x0079 LIGHT_CMD_SWITCH_MODE_V2
+0x0071 LIGHT_CMD_EXPAND_CODE_0X71_V2
+0x0090 LIGHT_CMD_FTD_CURTAIN_ON_OFF_V2
+0x00e9 LIGHT_CMD_FTD_GENERAL_STOP_V2
+0x00ff LIGHT_CMD_TEST_MODE_V2
+0X0024 LIGHT_CMD_HELP_SLEEP_V2
+
+0 PRODUCT_SUBTYPE
+
+
+1 PRODUCT_MAINTYPE_LIGHT
+
+
+)
+
Index: format/app_light_format/rlmp_common.format
===================================================================
--- /branch/usb/usb_public_base/format/app_light_format/rlmp_common.format	(revision 0)
+++ /branch/usb/usb_public_base/format/app_light_format/rlmp_common.format	(working copy)
@@ -0,0 +1,421 @@
+
+
+//防debug error, 临时宏定义
+(
+8070 core_gpio_pu0
+)
+
+
+(
+0x08 LIGHT_CLEAR_CODE_ROW_GPIO
+29     LIGHT_AID_ROW_GPIO
+25 KEYBOARD_MAX_KEYS_NUM
+
+11 LIGHT_LT8KEY_COLOR_SWITCH
+5   LIGHT_LT8KEY_NIGHT_LIGHT
+10 LIGHT_LT8KEY_LIGHTEN
+4   LIGHT_LT8KEY_DARKEN
+7   LIGHT_LT8KEY_TO_W
+1   LIGHT_LT8KEY_TO_Y
+12 LIGHT_LT8KEY_TURN_ON
+6   LIGHT_LT8KEY_TURN_OFF
+
+24   LIGHT_ZS3KEY_KEY_ON
+18 LIGHT_ZS3KEY_KEY_OFF
+12 LIGHT_ZS3KEY_KEY_SWTICH
+
+19 LIGHT_LB12KEY_KEY_TEST_NIGHT_LIGHT
+21 LIGHT_LB12KEY_KEY_TEST_AIDED
+10 LIGHT_LB12KEY_KEY_TEST_LIGHTEN
+23 LIGHT_LB12KEY_KEY_TEST_TO_W
+4 LIGHT_LB12KEY_KEY_TEST_COLOR_SWITCH
+12 LIGHT_LB12KEY_KEY_TEST_TO_Y
+22 LIGHT_LB12KEY_KEY_TEST_DARKEN
+11 LIGHT_LB12KEY_KEY_TEST_TURN_ON
+24 LIGHT_LB12KEY_KEY_TEST_TURN_OFF
+5 LIGHT_LB12KEY_KEY_TEST_PAIRING
+7 LIGHT_LB12KEY_KEY_TEST_50PERCENT
+6 LIGHT_LB12KEY_KEY_TEST_100PERCENT
+
+13 LIGHT_LB12KEY_KEY_NIGHT_LIGHT
+21 LIGHT_LB12KEY_KEY_AIDED
+5 LIGHT_LB12KEY_KEY_LIGHTEN
+12 LIGHT_LB12KEY_KEY_TO_W
+6 LIGHT_LB12KEY_KEY_COLOR_SWITCH
+24 LIGHT_LB12KEY_KEY_TO_Y
+11 LIGHT_LB12KEY_KEY_DARKEN
+8 LIGHT_LB12KEY_KEY_TURN_ON
+23 LIGHT_LB12KEY_KEY_TURN_OFF
+20 LIGHT_LB12KEY_KEY_PAIRING
+2 LIGHT_LB12KEY_KEY_50PERCENT
+3 LIGHT_LB12KEY_KEY_100PERCENT
+
+15 LIGHT_KEY_AID2
+14 LIGHT_KEY_NIGHT_LIGHT
+4 LIGHT_KEY_RGB_AUTO
+16 LIGHT_KEY_TURN_OFF
+17 LIGHT_KEY_TURN_ON
+9 LIGHT_KEY_TO_W
+8 LIGHT_KEY_LIGHTEN
+7 LIGHT_KEY_PAIRING
+10 LIGHT_KEY_DARKEN
+3  LIGHT_KEY_AIDED1
+2 LIGHT_KEY_COLOR_SWITCH
+1 LIGHT_KEY_TO_Y
+13 LIGHT_KEY_RGB_MANUAL
+
+6 LIGHT_KLD13KEY_KEY_NIGHT_LIGHT
+18 LIGHT_KLD13KEY_KEY_RGB_AUTO
+13 LIGHT_KLD13KEY_KEY_TURN_OFF
+7 LIGHT_KLD13KEY_KEY_TURN_ON
+10 LIGHT_KLD13KEY_KEY_TO_W
+21 LIGHT_KLD13KEY_KEY_LIGHTEN
+11 LIGHT_KLD13KEY_KEY_PAIRING
+8 LIGHT_KLD13KEY_KEY_DARKEN
+24  LIGHT_KLD13KEY_KEY_AIDED
+16 LIGHT_KLD13KEY_KEY_COLOR_SWITCH
+20 LIGHT_KLD13KEY_KEY_TO_Y
+12 LIGHT_KLD13KEY_KEY_RGB_MANUAL
+17 LIGHT_KLD13KEY_KEY_50_AND_100PERCENT
+
+21 LIGHT_SJD_KEY_ON_OFF_ALTERNANT
+15 LIGHT_SJD_KEY_TIMING_15MINS
+19 LIGHT_SJD_KEY_TIMING_30MINS
+14 LIGHT_SJD_KEY_TIMING_60MINS
+20 LIGHT_SJD_KEY_ON
+13 LIGHT_SJD_KEY_OFF
+
+18 LIGHT_RHZ12KEY_KEY_ON_AND_OFF
+13 LIGHT_RHZ12KEY_KEY_SCENE1
+6 LIGHT_RHZ12KEY_KEY_SCENE2
+12 LIGHT_RHZ12KEY_KEY_COLOR_SWITCH
+17 LIGHT_RHZ12KEY_KEY_NIGHT_LIGHT
+4 LIGHT_RHZ12KEY_KEY_50PERCENT
+10 LIGHT_RHZ12KEY_KEY_100PERCENT
+7 LIGHT_RHZ12KEY_KEY_PAIRING
+16 LIGHT_RHZ12KEY_KEY_TO_Y
+11  LIGHT_RHZ12KEY_KEY_TO_W
+1 LIGHT_RHZ12KEY_KEY_LIGHTEN
+5 LIGHT_RHZ12KEY_KEY_DARKEN
+
+
+0x28 LIGHT_CMD_PAIRING_CODE
+0x45 LIGHT_CMD_CLEAR_CODE
+0x09 LIGHT_CMD_TURN_ON_AND_OFF
+0x10 LIGHT_CMD_TURN_ON
+0x11 LIGHT_CMD_TURN_OFF
+0x23 LIGHT_CMD_NIGHT_LIGHT
+0x24 LIGHT_CMD_HELP_SLEEP
+0x21 LIGHT_CMD_COLOR_SWTICH
+0x12 LIGHT_CMD_AID_TURN_ON
+0x13 LIGHT_CMD_AID_TURN_OFF
+0x04 LIGHT_CMD_LIGHTEN
+0x05 LIGHT_CMD_DARKEN
+0x06 LIGHT_CMD_TO_W
+0x07 LIGHT_CMD_TO_Y
+0x1b LIGHT_CMD_FTD_RGB_FORWARD_AND_REVERSE
+0x1c LIGHT_CMD_RGB_ON_OFF
+0x1d LIGHT_CMD_FTD_RGB_LOOP
+0x1e LIGHT_CMD_RGB_1E
+0x1f LIGHT_CMD_RGB_1F
+0x22 LIGHT_CMD_RGB_MANNUL
+0x41 LIGHT_CMD_DELAY_OFF
+0xc0 LIGHT_CMD_CHANGE_POWERON_STATE
+0x46 LIGHT_CMD_KEYPRESS_DRIVE_RETENTION
+0x47 LIGHT_CMD_BACK_TO_RETENTION_STATE
+0x48 LIGHT_CMD_KPS_DRIVE_RTT_NOT_INC_POWER_ON1
+0x49 LIGHT_CMD_BACK_TO_RTT_STATE_NOT_INC_POWER_ON1
+0x4a LIGHT_CMD_KPS_DRIVE_RTT_NOT_INC_POWER_ON2
+0x4b LIGHT_CMD_BACK_TO_RTT_STATE_NOT_INC_POWER_ON2
+0x46 LIGHT_CMD_SCENE_SET
+0x47 LIGHT_CMD_SCENE_GET
+0x48 LIGHT_CMD_SCENE_RESET
+0x6f LIGHT_CMD_FTD_MASSTER_ON_OFF
+0x7a FAN_LIGHT_COLOR_CTL
+0x79 LIGHT_CMD_SWITCH_MODE
+0x71 LIGHT_CMD_EXPAND_CODE_0X71
+0xff LIGHT_CMD_TEST_MODE
+
+0X67 LIGHT_CMD_AIR_CHANGE
+0X66 LIGHT_CMD_HEATING
+0X32 LIGHT_CMD_FAN_TURN_ON_V2
+0X31 LIGHT_CMD_FAN_TURN_OFF_V2
+0x33 LIGHT_CMD_FAN_WIND_TYPE_V2
+0x34 LIGHT_CMD_FAN_SHAKE_HEAD_V2
+
+0x21 LIGHT_CMD_FTD_COLOR_STATE_CHANGE
+0x14 LIGHT_CMD_FTD_LIGHTEN_RESERVED
+0x28 LIGHT_CMD_FTD_DARKEN_RESERVED
+0x18 LIGHT_CMD_FTD_Y_RESERVED
+0x24 LIGHT_CMD_FTD_W_RESERVED
+0x01 LIGHT_CMD_FTD_50PERCENT_RESERVED
+0x02 LIGHT_CMD_FTD_100PERCENT_RESERVED
+0x03 LIGHT_CMD_FTD_30PERCENT_RESERVED
+0x04 LIGHT_CMD_FTD_80PERCENT_RESERVED
+
+0x40 LIGHT_CMD_FTD_COLOR_SWTICH_RESERVED
+0x73 LIGHT_CB_DATA_PART_PCNT_50PERCENT
+0x7f LIGHT_FTD_DATA_PART_PCNT_50PERCENT
+0xc0 LIGHT_FTD_DATA_PART_PCNT_75PERCENT
+0x81 LIGHT_DATA_PART_81
+0x80 LIGHT_DATA_PART_80
+0xff LIGHT_DATA_PART_FF
+0x4e LIGHT_CB_DATA_PART_PCNT_30PERCENT
+0x40 LIGHT_CB_DATA_PART_PCNT_25PERCENT
+0xcc LIGHT_CB_DATA_PART_PCNT_80PERCENT
+0x22 LIGHT_CMD_RGB_COLOR_SWITCH
+
+0x90 LIGHT_CMD_FTD_CURTAIN_ON_OFF
+0xe9 LIGHT_CMD_FTD_GENERAL_STOP
+
+//LIGHT_CMD_CHANGE_POWERON_STATE W-data
+0x00 LIGHT_PARAMETER_POWER_STATE_OFF
+0x01 LIGHT_PARAMETER_POWER_STATE_ON
+0x02 LIGHT_PARAMETER_POWER_STATE_REVERSE
+0x46 LIGHT_CMD_FTD_SCENE_SET
+0x47 LIGHT_CMD_FTD_SCENE_SWITCH
+0x05 LIGHT_CMD_FTD_SCENE_REMOTER_COPY
+
+9 	LIGHT_LONG_PRESS_TIMEOUT_0_9S
+15     LIGHT_PAIRING_TIMEOUT
+50     LIGHT_CLAER_CODE_TIMEOUT_5S
+30     LIGHT_LONG_PRESS_TIMEOUT_3S
+20     LIGHT_LONG_PRESS_TIMEOUT_2S
+
+
+1 KSCAN_ANALYSIS_INTERVAL
+1 KEY_PRESS_LED_ON_TIME
+
+0x01feff LIGHT_FTD_CLEAR_CODE_ADDR
+20 LIGHT_CLEAR_CODE_TIMER
+
+160     LIGHT_KSCAN_ENABLE_TIMEOUT
+13       LIGHT_KSCAN_INTERVAL
+15       LIGHT_CLEAR_CODE_ENABLE_TIMEOUT
+
+8 LIGHT_WIRELESS_SWITCH_GPIO_KEY1
+4 LIGHT_WIRELESS_SWITCH_GPIO_KEY12
+5 LIGHT_WIRELESS_SWITCH_GPIO_KEY3
+0x28 LIGHT_WIRELESS_SWITCH_CMD_PAIRING
+
+0x65 OPCODE_BATH_FAN
+0x61 OPCODE_BATH_TIMING_CLOSE
+0x66 OPCODE_BATH_WARM
+0x67 OPCODE_BATH_VENTILATION
+0x68 OPCODE_BATH_BATH
+0x69 OPCODE_DRY
+0x6f OPCODE_BATH_SWITCH_OFF
+0xa0 OPCODE_SPEED
+0xb0 OPCODE_SWING
+
+2 BATH_KEY_WARM
+8 BATH_KEY_ON_AND_OFF
+3 BATH_KEY_VENTILATION
+1 BATH_KEY_SPEED_DOWN
+7 BATH_KEY_FAN
+9 BATH_KEY_SPEED_UP
+12 BATH_KEY_SWING
+10 BATH_KEY_MASTET_OFF
+14 BATH_KEY_TIMING_OFF
+
+160 LIGHT_BLINK_INTERVAL_100ms
+
+0x30 FAN_CMD_SPEED_CHANGE
+0x32 FAN_CMD_SPEED_32
+0x31 FAN_CMD_SPEED_31
+0X34 FAN_CMD_SHAKE_HEAD_ON_OFF
+0x51 FAN_CMD_TIMING_TO_OFF
+0x15 FAN_CMD_DIRECTION
+0x6f FAN_CMD_MASTER_ON_AND_OFF
+0x33 FAN_CMD_MODE
+0x10 FAN_CMD_LAMP_ON
+0x11 FAN_CMD_LAMP_OFF
+0x28 FAN_CMD_PAIRING
+0x16 FAN_CMD_DEFLECTOR
+0xa0 FAN_TURN_ON_FLAG_BYTE_Y
+0x17 FAN_CMD_DIRECTION_ON_AND_OFF
+0x18 FAN_CMD_DEFLECTOR_ON_AND_OFF
+
+39 FTD_PDU_LEN
+
+23 GEM_PDU_LEN
+3 GEM_LONG_KEYPRESS
+
+37 KEY_PDU_LEN
+
+
+(
+0x1a WY_RGB_SWITCH
+0x01 WY_RGB_SWITCH_RGB
+0x02 WY_RGB_SWITCH_RGB_AND_RGB
+0x03 WY_RGB_SWITCH_WY
+0x001a WY_RGB_SWITCH_V2
+0x01 WY_RGB_SWITCH_RGB_RESERVED
+0x02 WY_RGB_SWITCH_RGB_AND_RGB_RESERVED
+0x03 WY_RGB_SWITCH_WY_RESERVED
+)
+
+0x79 FAN_LIGHT_MODE_SWITCH
+0x80 FAN_MEM_SELET_CMD
+
+5 CONTINUOUS_KEY_PRESS_TIRG_CNT_5
+
+5 SHORT_PRESS_TIMEOUT
+
+0xa0 LIGHT_LIGHTEN_RELEASE_ADV_FLAG
+0xa1 LIGHT_DARKEN_RELEASE_ADV_FLAG
+0xa2 LIGHT_TO_W_RELEASE_ADV_FLAG
+0xa3 LIGHT_TO_Y_RELEASE_ADV_FLAG
+0xa4 FAN_SPEED_SLOW_RELEASE_ADV_FLAG
+0xa5 FAN_SPEED_HIGHER_RELEASE_ADV_FLAG
+0xa6 QIH_SPEC_FUNC_COLOR_CTL_RELEASE_ADV_FLAG
+0xa7 BABY_CAR_GO_FTD_ADV_FLAG
+0xa8 BABY_CAR_BACK_FTD_ADV_FLAG
+0xa9 BABY_CAR_LEFT_FTD_ADV_FLAG
+0xb0 BABY_CAR_RIGHT_FTD_ADV_FLAG
+0xb1 LIGHT_COLOR_SWITCH_RELEASE_ADV_FLAG
+
+17 FAN_XQ_21KEY_FAN_AND_LIGHT_OFF 
+16 FAN_XQ_21KEY_LIGHT_ON_AND_OFF
+3  FAN_XQ_21KEY_TURNING_FORWARD
+15 FAN_XQ_21KEY_TURNING_REVERSE
+2 FAN_XQ_21KEY_LIGHT_COLOR_SWITCH
+14 FAN_XQ_21KEY_LIGHT_NIGHT_LIGHT
+9 FAN_XQ_21KEY_LIGHT_TO_W
+8 FAN_XQ_21KEY_LIGHT_LIGHTEN
+7 FAN_XQ_21KEY_LIGHT_PAIRING
+10 FAN_XQ_21KEY_LIGHT_DARKEN
+1 FAN_XQ_21KEY_LIGHT_TO_Y
+4 FAN_XQ_21KEY_TURN_OFF_TIMER_1H
+13 FAN_XQ_21KEY_TURN_OFF_TIMER_2H
+6 FAN_XQ_21KEY_FAN_SPEED1
+22 FAN_XQ_21KEY_FAN_SPEED2
+11 FAN_XQ_21KEY_FAN_SPEED3
+23 FAN_XQ_21KEY_FAN_SPEED4
+19 FAN_XQ_21KEY_FAN_SPEED5
+21 FAN_XQ_21KEY_FAN_SPEED6
+18 FAN_XQ_21KEY_FAN_STOP1
+24 FAN_XQ_21KEY_FAN_STOP2
+)
+
+
+(
+0x8073 core_gpio03_conf
+0x8083 core_gpio19_conf
+)
+
+(
+16 ENTER_LPM_LEISURE_IO_CONFIG_NUM
+3 ENTER_LPM_LEISURE_IO_CONFIG_START
+)
+
+
+(
+0x80 LIGHT_CMD_SOLAR_ON
+0x80 LIGHT_CMD_SOLAR_OFF
+0x82 LIGHT_CMD_SOLAR_LIGHTNESS_LIGHTEN
+0x82 LIGHT_CMD_SOLAR_LIGHTNESS_DARKEN
+0x81 LIGHT_CMD_SOLAR_MODE_RADAR
+0x81 LIGHT_CMD_SOLAR_MODE_LIGHTNESS
+0x81 LIGHT_CMD_SOLAR_MODE_RAIN
+0x83 LIGHT_CMD_SOLAR_TIMMING_OFF
+0x84 LIGHT_CMD_SOLAR_AMBIENT
+)
+(
+0x05 GEM_LIGHT_ON_CODE
+0x09 GEM_LIGHT_OFF_CODE	
+0x0C GEM_LIGHT_ON_GROUP1_CODE
+0x0E GEM_LIGHT_OFF_GROUP1_CODE
+0x01 GEM_LIGHT_ON_GROUP2_CODE
+0x04 GEM_LIGHT_OFF_GROUP2_CODE
+0x0D GEM_LIGHT_ON_GROUP3_CODE
+0x0F GEM_LIGHT_OFF_GROUP3_CODE
+0x08 GEM_LIGHT_ON_GROUP4_CODE
+0x06 GEM_LIGHT_OFF_GROUP4_CODE
+0x13 GEM_LIGHT_AIDED_LIGHT_CODE
+0x10 GEM_LIGHT_NIGHT_LIGHT_CODE
+0x11 GEM_LIGHT_ENERGY_SAVE_LIGHT_CODE
+0x12 GEM_LIGHT_TIMING_OFF_CODE
+0x14 GEM_LIGHT_RGB_AUTO_CODE
+0x15 GEM_LIGHT_RGB_STEP_CODE
+0x02 GEM_LIGHT_LIGHTEN_CODE
+0x03 GEM_LIGHT_DARKEN_CODE
+0x0B GEM_LIGHT_TO_W_CODE
+0x0A GEM_LIGHT_TO_Y_CODE
+0x07 GEM_LIGHT_COLOR_SWITCH_CODE
+0x16 GEM_COLOR_SWITCH_W
+0x17 GEM_COLOR_SWITCH_Y
+)
+(
+//科云
+0x6f LIGHT_ON_CODE1
+0x60 LIGHT_OFF_CODE1
+0x6f LIGHT_PAIRING_CODE1
+0x6f LIGHT_CLEAR_CODE_CODE1
+0x66 LIGHT_LIGHTEN_CODE1
+0x65 LIGHT_DARKEN_CODE1
+0x6a LIGHT_TO_W_CODE1
+0x69 LIGHT_TO_Y_CODE1
+0x68 LIGHT_TIMING_CODE1
+0x6e LIGHT_AUX_LAMP_ON_AND_OFF_CODE1
+0x6d LIGHT_COLOR_SWITCH_CODE1
+0xa1 LIGHT_NIGHT_LIGHT_CODE1
+0xa3 LIGHT_50PER_CODE1
+0xa3 LIGHT_100PER_CODE1
+
+0xd1 LIGHT_ON_CODE2
+0xd1 LIGHT_OFF_CODE2
+0x55 LIGHT_PAIRING_CODE2
+0xaa LIGHT_CLEAR_CODE_CODE2
+0xd1 LIGHT_LIGHTEN_CODE2
+0xd1 LIGHT_DARKEN_CODE2
+0xd1 LIGHT_TO_W_CODE2
+0xd1 LIGHT_TO_Y_CODE2
+0x46 LIGHT_TIMING_CODE2
+0xf0 LIGHT_AUX_LAMP_ON_AND_OFF_CODE2
+0x01 LIGHT_COLOR_SWITCH_WY_CODE2
+0x02 LIGHT_COLOR_SWITCH_W_CODE2
+0x03 LIGHT_COLOR_SWITCH_Y_CODE2
+0xd1 LIGHT_NIGHT_LIGHT_CODE2
+0x0 LIGHT_50PER_CODE2
+0x1111 LIGHT_100PER_CODE2
+
+
+
+0x6f LIGHT_JYM_CMD_PAIRING
+0x6f LIGHT_JYM_CMD_CLEAR
+0x66 LIGHT_JYM_CMD_LIGHTEN
+0x65 LIGHT_JYM_CMD_DARKEN
+0x69 LIGHT_JYM_CMD_TO_Y
+0x6a LIGHT_JYM_CMD_TO_W
+0x68 LIGHT_JYM_CMD_TIMING_OFF
+0x6e LIGHT_JYM_CMD_AUX_LAMP
+0x6d LIGHT_JYM_CMD_WHITE_LAMP
+0x6d LIGHT_JYM_CMD_WY_LAMP
+0x6d LIGHT_JYM_CMD_YELLOW_LAMP
+0x6f LIGHT_JYM_CMD_ON
+0x60 LIGHT_JYM_CMD_OFF
+0x62 LIGHT_JYM_CMD_MODEL
+0x6e LIGHT_JYM_CMD_NIGHT_LIGHT
+0x6c LIGHT_JYM_CMD_RGB
+
+0x55 LIGHT_JYM_DATA_PAIRING
+0xaa LIGHT_JYM_DATA_CLEAR
+0x00 LIGHT_JYM_DATA_LIGHTEN
+0x00 LIGHT_JYM_DATA_DARKEN
+0x00 LIGHT_JYM_DATA_TO_Y
+0x00 LIGHT_JYM_DATA_TO_W
+0x46 LIGHT_JYM_DATA_TIMING_OFF
+0xf0 LIGHT_JYM_DATA_AUX_LAMP
+0x02 LIGHT_JYM_DATA_WHITE_LAMP
+0x01 LIGHT_JYM_DATA_WY_LAMP
+0x03 LIGHT_JYM_DATA_YELLOW_LAMP
+0x00 LIGHT_JYM_DATA_ON
+0x00 LIGHT_JYM_DATA_OFF
+0x00 LIGHT_JYM_DATA_MODEL_APPLY
+0x80 LIGHT_JYM_DATA_MODEL_STORE
+0x00 LIGHT_JYM_DATA_NIGHT_LIGHT
+0x00 LIGHT_JYM_DATA_RGB
+)
+
+
Index: format/app_light_format/rlmp_mmap.format
===================================================================
--- /branch/usb/usb_public_base/format/app_light_format/rlmp_mmap.format	(revision 0)
+++ /branch/usb/usb_public_base/format/app_light_format/rlmp_mmap.format	(working copy)
@@ -0,0 +1,275 @@
+
+
+
+xmemalloc ftd(
+64 mem_ble_v2_xbox
+39 mem_ble_v2_pdu
+
+1 mem_ble_v2_customer_id
+1 mem_ble_v2_packet_num
+1 mem_ble_v2_subtype
+1 mem_ble_v2_maintype
+4 mem_ble_v2_addr
+1 mem_ble_v2_group_index
+2 mem_ble_v2_cmd	
+4 mem_ble_v2_para
+
+1 mem_ble_customer_id
+1 mem_ble_count
+1 mem_ble_sub_type
+1 mem_ble_main_type
+4 mem_ble_addr
+1 mem_ble_group
+2 mem_ble_cmd
+4 mem_ble_para
+3 mem_ble_rfu
+1 mem_ble_relay
+1 mem_ble_is_app
+
+/***********************BLE Protocol V2****************************/
+2 mem_adv_CRC_False_initValue
+2 mem_CRC16_polynomial
+2 mem_ble_pack_cb
+0 mem_ble_v2_tx_end_dummy
+
+1 mem_ftd_device_option
+
+
+//gem
+1 mem_light_gm_tx_addr_type
+1 mem_light_gm_tx_len
+13 mem_light_gm_tx_header
+0 mem_light_gm_tx
+1 mem_light_gm_tx_press_time
+1 mem_light_gm_tx_remoter_ID
+2 mem_light_gm_tx_remoter_addr
+1 mem_light_gm_tx_group_num
+1 mem_light_gm_tx_code
+1 mem_light_gm_tx_count
+1 mem_light_gm_tx_sum
+
+2 mem_gem_cnt_inces_timeout
+2 mem_gem_long_keypress_timeout
+1 mem_gem_long_cnt_enable
+
+//科云
+0 mem_light_KY_tx
+23 mem_light_KY_tx_header
+1 mem_light_KY_tx_len
+1 mem_light_KY_tx_code1
+4 mem_light_KY_tx_remoter_ID
+1 mem_light_KY_tx_group_num
+1 mem_light_KY_tx_code2
+2 mem_light_KY_tx_sum
+2 mem_light_KY_tx_CRC
+2 mem_light_KY_tx_count
+1 mem_light_group_num
+
+/**************************JUYUAN MICRO***************************/
+12 mem_light_JYM_whitening_header
+0 mem_light_JYM_tx
+8 mem_light_JYM_tx_header
+1 mem_light_JYM_tx_len
+1 mem_light_JYM_tx_cmd
+4 mem_light_JYM_tx_ID
+1 mem_light_JYM_tx_group
+1 mem_light_JYM_tx_data
+1 mem_light_JYM_tx_count
+2 mem_light_JYM_tx_sum
+2 mem_light_JYM_tx_CRC
+37 mem_light_JYM_tx_temp
+1 mem_adv_cnts
+
+)
+
+
+
+xmemalloc ftd_rlmp(
+/******************kscan***********************/
+8 mem_kscan_record_keypress
+1 mem_kscan_row_nums
+1 mem_kscan_col_nums
+8 mem_kscan_row_gpio_pin
+8 mem_kscan_col_gpio_pin
+1 mem_kscan_row_scanned
+1 mem_kscan_col_scanned
+1 mem_keypress_analysis_flag
+2 mem_kscan_avoid_shake_delay_time
+1 mem_scan_col
+1 mem_kscan_enable
+2 mem_long_press_adv_timeout
+2 mem_kscan_analysis_interval_timeout
+/******************kscan***********************/
+
+2 mem_FTD_adv_raw_device_add_temp
+1 mem_set_clear_code_timeout_enable
+1 mem_light_lpm_enable
+1 mem_light_manufacture_id
+1 mem_light_indicator_led
+1 mem_groups_num
+1 mem_light_last_key
+1 mem_light_different_key_press_flag
+
+0 mem_FTD_adv_raw
+1 mem_FTD_adv_raw_cmd
+2 mem_FTD_adv_raw_device_add
+3 mem_FTD_adv_raw_data
+1 mem_FTD_adv_raw_packet_num
+1 mem_FTD_adv_raw_reserved
+8 mem_FTD_adv_raw_encryption
+
+2 mem_long_press_timeout
+1 mem_light_num_of_long_press
+1 mem_light_color_switch_cnt
+1 mem_light_brightness_switch_flag
+1 mem_light_rgb_hand_actuated_flag
+1 mem_rgb_switch
+1 mem_light_rgb_auto_flag
+1 mem_rgb_on_and_off
+1 mem_light_group1_on_and_off_flag
+1 mem_light_group2_on_and_off_flag
+1 mem_light_group3_on_and_off_flag
+1 mem_light_group4_on_and_off_flag
+1 mem_light_current_key
+2 mem_ble_light_adv_timeout
+1 mem_light_on_off_alternant
+1 mem_fan_speed
+1 mem_fan_direction_alternant
+1 mem_fan_on_off_flag
+128 mem_ble_xboxes
+
+/***********************FTD raw data****************************/
+0 mem_adv_packet
+23 mem_adv_packet_header
+14 mem_adv_packet_payload
+2 mem_adv_packet_tailer
+/***********************FTD raw data****************************/
+
+/***********************whitening****************************/
+39 mem_light_whitening_buffer
+2 mem_light_whitening_k
+1 mem_light_for_loop_cnt1
+1 mem_light_for_loop_cnt2
+1 mem_light_recvd_len
+1 mem_light_whitening_i
+4 mem_light_whitening_i1
+4 mem_light_whitening_i2
+4 mem_light_whitening_i3
+4 mem_light_whitening_i4
+1 mem_light_whitening_n
+
+4 mem_light_para1
+5 mem_light_para2
+8 mem_light_for_loop_lshift
+8 mem_light_integer_1_lshift_temp
+/***********************whitening****************************/
+
+2 mem_light_lpm_enable_timeout
+1 mem_indicator_turn_on_enable
+2 mem_indicator_led_turn_on_timeout
+1 mem_light_on_and_off_flag
+1 mem_fan_deflector_flag
+1 mem_light_aid_swtich_flag
+1 mem_light_manufacture_id2
+1 mem_light_manufacture_id2_v2
+
+39 mem_light_whitening_buffer_2
+39 mem_ble_v2_pdu_2
+1 mem_light_rgb_on_and_off_flag
+1 mem_rgb_loop_on_and_off
+1 mem_r_g_b_switch_flag
+1 mem_adv_manufacturer_switch_flag
+1 mem_adv_manufacturer_switch_flag1
+1 mem_adv_manufacturer_switch_flag2
+1 mem_adv_manufacturer_switch_flag3
+1 mem_fan_on_and_off_flag
+
+1 mem_light_release_adv_flag
+
+1 mem_light_blink_state_flag
+1 mem_light_indicator_led_blink_enable
+2 mem_light_continuous_kps_cnt_reset_timeout
+1 mem_light_key1_continuous_kps_cnt  
+1 mem_light_key2_continuous_kps_cnt 
+1 mem_light_key3_continuous_kps_cnt 
+1 mem_light_key4_continuous_kps_cnt 
+1 mem_light_key5_continuous_kps_cnt 
+1 mem_light_key6_continuous_kps_cnt 
+1 mem_light_key7_continuous_kps_cnt  
+1 mem_light_key8_continuous_kps_cnt 
+1 mem_light_key9_continuous_kps_cnt 
+1 mem_light_key10_continuous_kps_cnt  
+1 mem_light_key11_continuous_kps_cnt 
+1 mem_light_key12_continuous_kps_cnt 
+1 mem_light_key13_continuous_kps_cnt  
+1 mem_light_key14_continuous_kps_cnt 
+1 mem_light_key15_continuous_kps_cnt 
+1 mem_light_key16_continuous_kps_cnt 
+2 mem_16groups_on_off
+1 mem_group_flag
+
+1 mem_channel_enable
+1 mem_channel_num
+1 mem_scene_enable
+
+1 mem_special_agreemeet_enable
+
+2 mem_light_short_keypress_timeout
+1 mem_light_color_and_lgtness_long_press_adv_enable
+
+1 mem_airchange_speed
+1 mem_fan_tap_speed
+1 mem_light_airchange_flag
+1 mem_light_warm_wake_flag
+1 mem_light_warm_powerful_flag
+1 mem_light_fan_on_and_off
+1 mem_light_bath_on_off_flag
+
+1 mem_long_press_protect_enble_flag
+1 mem_long_press_protect_cnt
+1 mem_long_press_protect_start_flag
+8 mem_kscan_press_row_gpio
+
+1 mem_light_fan_on_and_off_flag
+4 mem_light_lpm_gpio_config_flag
+1 mem_light_lpm_gpio_config_io_temp
+
+1 mem_light_timing_of_alter_flag
+
+/*ble rx protocol*/
+	0 mem_light_adv_packet
+	1 mem_light_adv_packet_cmd
+	2 mem_light_adv_packet_addr
+	3 mem_light_adv_packet_data
+	1 mem_light_adv_packet_packetnum
+	1 mem_light_adv_packet_reserve
+	6 mem_light_adv_packet_encry
+	2 mem_light_adv_packet_CRC
+/*ble rx protocol*/
+
+2 mem_scene_led_timeout
+1 mem_scene_led_cnt
+1 mem_ble_rx_on_and_off
+1 mem_long_press_scene_timeout
+1 mem_le_adv_scan_channel
+4 mem_le_lap_addr
+4 mem_le_lap_addr_temp
+4 mem_le_lap_v2_addr
+1 mem_light_scene_mode
+1 mem_le_addr_change_flag
+
+2 mem_rmt_keydown_cb
+2 mem_rmt_released_cb
+2 mem_rmt_long_press_cb
+2 mem_rmt_continuous_keydown_cb
+2 mem_rmt_continuous_kps_time
+2 mem_light_adv_time
+2 mem_claer_code_time
+1 mem_ble_v2_customer_id_copy
+
+// 1 mem_scene_combination_flag
+)
+
+
+
+
Index: format/app_module.format
===================================================================
--- /branch/usb/usb_public_base/format/app_module.format	(revision 0)
+++ /branch/usb/usb_public_base/format/app_module.format	(working copy)
@@ -0,0 +1,249 @@
+
+memalloc module(
+	//ble
+	2 mem_module_le_rx_data_len
+	2 mem_module_le_rx_data_address
+	2 mem_module_le_rx_data_handle
+
+ifdef COMPILE_WECHAT
+	0 mem_wechat_tx_buffer
+	1 mem_wechat_tx_bMagicNumber
+	1 mem_wechat_tx_bVer
+	2 mem_wechat_tx_nLength
+	2 mem_wechat_tx_nCmdId
+	2 mem_wechat_tx_nSeq1
+	255 mem_wechat_tx_payload
+
+	0 mem_wechat_rx_buffer
+	1 mem_wechat_rx_bMagicNumber
+	1 mem_wechat_rx_bVer
+	2 mem_wechat_rx_nLength
+	2 mem_wechat_rx_nCmdId
+	2 mem_wechat_rx_nSeq
+	255 mem_wechat_rx_payload
+
+	255 mem_module_wechat_local_data_buffer
+
+endif
+)
+
+xmemalloc module(	
+	2 mem_soft_version_num
+	1 mem_module_wake_up_gpio
+	1 mem_module_state_gpio
+	1 mem_module_connect_state_gpio
+
+	2 mem_current_packet_length
+	1 mem_module_state
+	
+	1 mem_module_mcu_wake_pin
+	4 mem_module_mcu_wake_delay_us
+
+	1 mem_module_le_lpm_mult	
+	1 mem_module_bluetooth_stauts_by_command
+
+	//uart
+	2 mem_module_uart_rx_buffer
+	2 mem_module_uart_rx_buffer_end
+	2 mem_module_uart_tx_buffer
+	2 mem_module_uart_tx_buffer_end
+	2 mem_module_uarta_baud_rate
+
+	//ADC
+	1 mem_module_read_vdd_flag
+	1 mem_module_read_vdd_count
+	1 mem_module_vdd_quotient
+	1 mem_module_vdd_remainder
+
+	//ble
+	1 mem_module_ble_data_uart_max_length
+
+	//flag
+	2 mem_module_flag
+
+	1 mem_module_hci_notify_len
+	2 mem_module_hci_notify_handle
+	2 mem_module_hci_nofiy_addr
+	1 mem_module_hci_notify_type
+
+ifdef COMPILE_WECHAT
+	1 mem_module_wechat_indication_handle
+	1 mem_module_wechat_write_handle
+	2 mem_module_wechat_tx_buffer_ptr
+	2 mem_module_wechat_rx_buffer_ptr
+	2 mem_module_wechat_rx_push_data_cb
+	2 mem_module_wechat_tx_nSeq
+	2 mem_module_wechat_tx_len
+	2 mem_module_wechat_tx_address
+	2 mem_module_wechat_rx_len
+	2 mem_module_wechat_rx_address
+	1 mem_module_wechat_receive_push_data
+endif
+	
+	600 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
+	0 mem_module_nv_data_end
+)
+
+
+(//mem_module_flag
+//bit0~bit7 config module function
+0 MODULE_FLAG_UART_FLOW_CONTROL
+1 MODULE_FLAG_BLE_SEND_MTU23
+2 MODULE_FLAG_BLE_DATA_ENCRYPT
+
+//bit8~bit15 module states change
+8 MODULE_FLAG_BLE_DATA_FINISH
+
+)
+
+(
+34 NV_DATA_LEN
+-1 DECREASED_ONE
+)
+
+
+
+(
+	5 FLAG_MODULE_READ_VDD_COUNT
+)
+
+(
+	0x200 UART_AIR_CONTROL_THRESHOLD
+)
+
+(
+0x01 HCI_DISCARD_PACKET
+0x00 HCI_NOT_DISCARD_PACKET
+)
+
+
+
+(//Command
+0x01 HCI_CMD_SET_LE_ADDR_REQ
+0x02 HCI_CMD_SET_VISIBILITY_REQ
+0x04 HCI_CMD_SET_LE_NAME_REQ
+0x09 HCI_CMD_LE_DATA_REQ
+0x0b HCI_CMD_STATUS_IRQ
+0x0e HCI_CMD_SET_UARTCONTROL_REQ
+0x0f HCI_CMD_SET_UART_BAUD_REQ
+0x10 HCI_CMD_VERSION_REQ
+0x12 HCI_CMD_BLE_DISCONNECT
+0x13 HCI_CMD_DELETE_DEVICE
+0x14 HCI_CMD_CREATE_CONNECT
+0x26 HCI_CMD_SET_NVRAM_REQ
+0x27 HCI_CMD_SLEEP
+0x28 HCI_CMD_CONFIRM_GKEY
+0x2a HCI_CMD_AUTO_ADV_SCAN
+0x2b HCI_CMD_POWER_REQ
+0x2c HCI_CMD_POWER_SET
+0x30 HCI_CMD_PASSKEY_ENTRY
+0x31 HCI_CMD_SET_GPIO
+0x32 HCI_CMD_READ_GPIO
+0x33 HCI_CMD_LE_SET_PAIRING
+0x34 HCI_CMD_LE_SET_ADV_DATA
+0x35 HCI_CMD_LE_SET_SCAN_DATA
+0x36 HCI_CMD_LE_SEND_CONN_UPDATE_REQ
+0x37 HCI_CMD_LE_SET_ADV_PARM
+0x38 HCI_CMD_LE_START_PAIRING
+0x40 HCI_CMD_SET_WAKE_GPIO
+0x42 HCI_CMD_SET_TX_POWER
+0x43 HCI_CMD_BOOT_VERSION_REQ
+0x48 HCI_CMD_LE_CONFIRM_GKEY
+0x49 HCI_CMD_REJECT_JUSTWORK
+0x51 HCI_CMD_RESET_CHIP_REQ
+
+0x61 HCI_CMD_LE_SET_FIXED_PASSKEY
+
+0x76 HCI_CMD_DELETE_CUSTOMIZE_SERVICE
+0x77 HCI_CMD_ADD_SERVICE_UUID
+0x78 HCI_CMD_ADD_CHARACTERISTIC_UUID
+0x7a HCI_CMD_PASSKEY_ENTRY_INPUT
+
+0x90 HCI_CMD_BLE_SET_PHY
+0x91 HCI_CMD_BLE_READ_CURRENT_PHY
+0x92 HCI_CMD_BLE_SET_DLE
+0x93 HCI_CMD_READ_CHIP_DATA
+0x94 HCI_CMD_WRITE_CHIP_DATA
+ifdef COMPILE_WECHAT
+0x95 HCI_CMD_WECHAT_SEND_DATA
+endif
+0xff HCI_CMD_CLOSE_LPM
+)
+
+(//event
+0x00 HCI_EVENT_SPP_CONN_REP
+0x01 HCI_EVENT_HID_CONN_REP
+0x02 HCI_EVENT_LE_CONN_REP
+0x03 HCI_EVENT_SPP_DIS_REP
+0x04 HCI_EVENT_HID_DIS_REP
+0x05 HCI_EVENT_LE_DIS_REP
+0x06 HCI_EVENT_CMD_RES
+0x07 HCI_EVENT_SPP_DATA_REP
+0x08 HCI_EVENT_LE_DATA_REP
+0x09 HCI_EVENT_STANDBY_REP
+
+0x0a HCI_EVENT_STATUS_RES
+
+0x0D HCI_EVENT_NVRAM_REP
+0x0e HCI_EVENT_GKEY
+0x0F HCI_EVENT_INVALID_PACKET
+0x10 HCI_EVENT_GET_PASSKEY
+0x11 HCI_EVENT_LE_TK
+0x12 HCI_EVENT_REMOTE_MTU
+0x14 HCI_EVENT_LE_PAIRING_STATE
+0X15 HCI_EVENT_LE_ENCRYPTION_STATE
+0x17 HCI_EVENT_LE_CONNECTION_UPDATE
+0x1d HCI_EVENT_LE_GKEY
+0x29 HCI_EVENT_UUID_HANDLE
+0x2b HCI_EVENT_LE_INPUT_GKEY
+
+0x40 HCI_BLE_UPDATE_PHY_EVENT
+ifdef COMPILE_WECHAT
+0x41 HCI_BLE_WECHAT_RECEIVE_PUSH_DATA
+endif
+)
+
+
+(//command HCI_CMD_SET_GPIO
+//byte 0
+0x00 HCI_CMD_CONFIG_GPIO_INPUT
+0x01 HCI_CMD_CONFIG_GPIO_OUTPUT
+//byte 1 input state
+0x00 GPIO_INPUT_PULLUP
+0x01 GPIO_INPUT_PULLDOWN
+0x02 GPIO_INPUT_HIGH_IMPEDANCE
+)
+
+
+
+
+
+(
+0x0080	FLAG_BLE_PAIRING_SUCCESS
+0x0180	FLAG_BLE_PAIRING_FAIL
+)
+
+
+(
+1	FLAG_EVENT_START_ENC
+0	FLAG_EVENT_PAUSE_ENC
+)
+
+(
+0 MOUDLE_STATE_BT_BIT
+1 MOUDLE_STATE_BLE_BIT
+)
+
+(
+5 BIT_OF_NOTIFY_AUTHENTICATED
+6 BIT_OF_READ_AUTHENTICATED
+7 BIT_OF_WRITE_AUTHENTICATED
+)
+
Index: format/app_mouse.format
===================================================================
--- /branch/usb/usb_public_base/format/app_mouse.format	(revision 0)
+++ /branch/usb/usb_public_base/format/app_mouse.format	(working copy)
@@ -0,0 +1,601 @@
+
+memalloc mouse(
+2 mem_init_cnt
+2 mem_data_pre
+2 mem_data_current
+3 mem_data_sum
+2 mem_data_value
+
+
+)
+//dpi eeprom addr
+
+
+xmemalloc g24_tx_mouse(
+// Mouse Work Area
+1 mem_mouse_key
+2 mem_mouse_x
+2 mem_mouse_y
+1 mem_mouse_z
+1 mem_mouse_tz
+1 mem_mouse_xy_h
+1 mem_mouse_key_last
+
+//mouse wheel
+1 mem_wheel_tb_old_pinlevel
+1 mem_wheel_tb_new_pinlevel
+1 mem_wheel_tog 
+1 mem_mouse_tz_data
+1 mem_mwheel_b_old_pinlevel
+1 mem_mwheel_b_new_pinlevel
+1 mem_mwheel_tog 
+1 mem_mouse_z_data
+1 mem_mouse_wheel_trigger
+1 mem_mouse_wheel_trigger_timer
+
+// adc
+//adc struct
+0 mem_mouse_vdd_calculate_set
+2 mem_mouse_vdd_full_vol
+2 mem_mouse_vdd_empty_vol
+2 mem_mouse_vdd_low_vol
+2 mem_mouse_vdd_now_vol
+
+2 mem_mouse_vdd_button_press_vol
+2 mem_mouse_vdd_switch_gnd_24g_vol
+2 mem_mouse_vdd_switch_gnd_full_vol
+2 mem_mouse_vdd_switch_gnd_shutdown_voltage
+2 mem_mouse_vdd_switch_gnd_low_voltage
+1 mem_adc_mux_status
+1 mem_adc_read_timer
+1 mem_adc_read_time_init
+1 mem_adc_low_volatage_led_timer_count
+1 mem_adc_low_volatage_led_blink_enable
+1 mem_mouse_adc_last_low_voltage_flag
+1 mem_mouse_adc_button_press_flag
+1 mem_adc_channel_gpio
+
+1 mem_adc_config_flag_init
+
+2 mem_mouse_discovery_timeout
+2 mem_mouse_24g_pair_timeout_init
+1 mem_mouse_direct_timeout
+1 mem_mouse_24g_reconn_timeout_init
+1 mem_mouse_24g_pair_tx_power
+1 mem_rssi_dis_min_24g_init
+1 mem_rssi_dis_max_24g_init
+1 mem_rssi_hex_received_max_value_init
+1 mem_rssi_dis_min_ble_init
+1 mem_rssi_dis_max_ble_init
+1 mem_mouse_enable_flag
+
+0 mem_mouse_param_config
+1 mem_lbutton_gpio
+1 mem_mbutton_gpio
+1 mem_rbutton_gpio
+1 mem_bk_button_gpio
+1 mem_fw_button_gpio
+1 mem_dpi_button_gpio
+1 mem_whee_a_data_gpio
+1 mem_whee_b_data_gpio
+1 mem_mouse_sensor_sclk_gpio
+1 mem_mouse_sensor_sdio_gpio
+1 mem_select_sensor_angle_gpio
+1 mem_sensor_angle_default
+1 mem_sensor_angle_switch
+1 mem_config_sensor_dpi	
+1 mem_whee_ta_data_gpio
+1 mem_whee_tb_data_gpio
+1 mem_matrix_public_gpio
+1 mem_config_select_device_button_gpio
+1 mem_customer_key_gpio
+1 mem_sensor_motion_gpio
+1 mem_device_switch_gpio
+1 mem_mouse_reuse_2ice_gpio
+1 mem_config_low_voltage_alarm_gpio
+1 mem_config_device_24g_led_gpio
+1 mem_config_device_bt1_led_gpio
+1 mem_config_device_bt2_led_gpio	
+1 mem_dpi_led_gpio 
+0 mem_mouse_param_config_end
+
+1 mem_config_sensor_type
+1 mem_config_sensor_angle
+
+// usb
+1 mem_wire_usb_interval
+1 mem_usb_addr
+1 mem_mouse_usb_vdd_status
+1 mem_mouse_usb_keyboard_flag
+
+
+//led struct
+1 mem_mouse_led_type
+1 mem_mouse_blink_count
+1 mem_mouse_struct_led_gpio
+2 mem_mouse_on_time
+2 mem_mouse_off_time
+2 mem_mouse_cb_ledon
+2 mem_mouse_cb_ledoff
+
+//three devices param
+//eeprom/flash
+0 mem_mouse_information_start
+1 mem_device_flag
+1 mem_device1_type
+6 mem_device1_addr
+16 mem_device1_link_key
+6 mem_device1_locall_addr
+
+1 mem_device2_type
+6 mem_device2_addr
+16 mem_device2_link_key
+6 mem_device2_locall_addr
+
+1 mem_device3_type
+0 mem_mouse_compare_addr_ff
+6 mem_device3_addr
+16 mem_device3_link_key
+6 mem_device3_locall_addr
+2 mem_store_flag
+1 mem_mouse_dpi
+4 mem_mouse_24g_addr
+2 mem_random_addr_increase_count
+31 mem_mouse_retention
+0 mem_mouse_information_end
+
+3 mem_flash_base
+4 mem_write_flash_head_temp
+1 mem_store_information_delay_timer
+1 mem_store_information_delay_timer_init
+
+//sensor param
+1 mem_sensor_id1
+1 mem_sensor_id2
+
+1 mem_sensor_shutter_hi
+1 mem_sensor_shutter_lo
+1 mem_sensor_smart_flag
+1 mem_sensor_squal_reg
+1 mem_sensor_iqc
+1 mem_mouse_move_flag
+
+1 mem_mouse_asm_flag
+2 mem_mouse_x_pre
+2 mem_mouse_y_pre
+1 mem_mouse_data_xtemp
+1 mem_mouse_data_ytemp
+
+0 mem_mouse_dpi_seting
+1 mem_320x_dpi_0
+1 mem_320x_dpi_1
+1 mem_320x_dpi_2
+1 mem_320x_dpi_3
+1 mem_3212_dpi_0
+1 mem_3212_dpi_1
+1 mem_3212_dpi_2
+1 mem_3212_dpi_3
+1 mem_ka8g2_dpi_0
+1 mem_ka8g2_dpi_1
+1 mem_ka8g2_dpi_2
+1 mem_ka8g2_dpi_3
+1 mem_mouse_cpi_count
+1 mem_mouse_dpi_button_state
+1 mem_mouse_dpi_long_press_flag
+
+10 mem_sensor_3212_init
+10 mem_sensor_3204_init
+10 mem_sensor_3205_init
+26 mem_sensor_32xx_init
+34 mem_sensor_32xx_init_1
+38 mem_sensor_8650_init
+30 mem_sensor_ka8ul_init
+16 mem_sensor_8009_init
+16 mem_sensor_ka8g2_init
+12 mem_sensor_p6520_init
+8 mem_sensor_poweron_init
+	
+1 mem_mouse_clear_sensor_data_flag
+1 mem_bluetooth_125hz_cnt
+
+//no motion pin
+1 mem_mouse_long_mult_flag
+1 mem_mouse_current_mult_timer
+
+1 mem_reconn_times
+1 mem_reconn_times_init
+2 mem_mouse_no_data_timer
+1 mem_device_flag_temp
+8 mem_mouse_rssi_signal_buf				
+4 mem_btclk_sensor
+1 mem_mouse_bluetooth_fast_conn_flag
+2 mem_mouse_discovery_timer
+1 mem_mouse_bluetooth_reconnect_timeout
+1 mem_mouse_need_soft_reset
+
+// le
+1 mem_mouse_le_bb_connected_flag
+1 mem_mouse_le_reconnect_flag
+1 mem_mouse_send_secutiry_request_timer
+
+3 mem_mouse_le_lap_temp
+3 mem_le_adv_ind
+3 mem_le_adv_direct_ind
+20 mem_le_adv_swift_pair
+1 mem_le_data_len
+2 mem_le_keyboard_handle
+2 mem_le_multimedia_handle
+2 mem_le_systemctrl_handle
+2 mem_le_battery_level_handle
+1 mem_le_battery_level_percentage
+2 mem_le_battery_level_updata_timer_init
+2 mem_le_battery_level_updata_timer
+1 mem_mouse_le_conn_param_reject
+32 mem_le_tx_buffer0_omemalloc
+32 mem_le_tx_buffer1_omemalloc
+32 mem_le_tx_buffer2_omemalloc
+32 mem_le_tx_buffer3_omemalloc
+1 mem_le_connect_status_flag
+1 mem_le_start_encrypt_timer
+1 mem_mouse_direct_timer
+
+//bt
+7 mem_device_addr_temp
+1 mem_mouse_bt_boot_mode
+5 mem_mouse_bt_boot_data
+1 mem_bt_send_max_slot_req_accept_after_switch
+1 mem_mouse_bt_send_first_package_timer
+1 mem_mouse_bt_send_first_package_flag
+1 mem_lmi_opcode_temp 
+1 mem_lpm_mult_init
+
+// mouse key
+1 mem_customer_key
+1 mem_customer_data_trigger
+1 mem_customer_data_trigger_last
+
+1 mem_mouse_lkey_press_status
+1 mem_mouse_rkey_press_status
+1 mem_mouse_mkey_press_status
+1 mem_mouse_bkkey_press_status
+1 mem_mouse_fwkey_press_status
+1 mem_mouse_dpikey_press_status
+1 mem_mouse_pbkey_press_status
+1 mem_mouse_customerkey_press_status
+1 mem_mouse_key_temp
+1 mem_mouse_key_status
+
+1 mem_mouse_matrix_key_cow_count
+1 mem_mouse_matrix_key_row_count
+1 mem_mouse_ghost_flag
+1 mem_bt_discovery_count
+1 mem_select_device_count
+1 mem_mouse_commbination_key
+1 mem_select_device_button_statue
+1 mem_commbination_key_statue
+1 mem_combination_ui_button_count
+
+// 2.4G
+1 mem_mouse_search_dongle_interval
+1 mem_mouse_search_dongle_ch
+1 mem_mouse_search_dongle_count
+1 mem_mouse_search_dongle_action
+1 mem_24g_enter_lpm_timer
+1 mem_mouse_24g_enter_lpm_enable
+
+//led
+1 mem_mouse_device_poweron_timer_count
+1 mem_mouse_dpi_led_delay_count
+1 mem_mouse_led_off_4_led
+1 mem_24g_device_led_status
+
+// mouse configured param
+8 mem_mouse_flag 
+1 mem_device_number
+2 mem_mouse_page_to
+1 mem_mouse_fast_direct_timeout
+2 mem_mouse_fast_page_to
+2 mem_mouse_24g_power_on_fast_conn_timer
+2 mem_mouse_24g_search_dongle_time_init
+2 mem_mouse_no_data_timeout
+
+1 mem_mouse_device_poweron_timer_count_init
+1 mem_mouse_dpi_led_delay_count_init
+2 mem_mouse_dpi_led_blink_time
+2 mem_mouse_disconvey_led_blink_time
+2 mem_mouse_low_v_led_blink_time
+2 mem_adc_low_volatage_led_blink_timer
+
+1 mem_mouse_commbination_key_bt
+1 mem_mouse_commbination_key_24g
+
+9 mem_customer_key_press
+9 mem_customer_key_release
+3 mem_mouse_set_high_impedance_bit_set
+
+1 mem_sensor_shutdown_flag
+1 mem_24g_long_sleep_set_level
+)
+
+
+(
+//combination
+0x01 MOUSE_L_BUTTON
+0X02 MOUSE_R_BUTTON
+0x03 MOUSE_LR_BUTTON
+0X04 MOUSE_M_BUTTON
+0X05 MOUSE_LM_BUTTON
+0X06 MOUSE_RM_BUTTON
+0X07 MOUSE_LMR_BUTTON
+0x09 MOUSE_L_BK_BUTTON
+0x14 MOUSE_M_FW_BUTTON
+0X18 MOUSE_BK_FW_BUTTON
+//mouse default gpio
+0x1B MOUSE_DEFAULT_XA_GPIO
+0x1C MOUSE_DEFAULT_XB_GPIO
+
+//ui led blink
+0X00C8  LED_RECONNECT_BLINK //200
+0X0190  LED_DPI_BLINK //400
+0X03E8  LED_DPI_BLINK_FIXED    //1000
+0X03E8  LED_DISCOVERY_BLINK    //1000
+0XFF    LED_LONG_BLINK
+0x05	LED_SENSOR_BLINK_CNT
+//mode device number
+0x00 MODE_24G_DEVICE
+0x01 MODE_BT_DEVICE1
+0x02 MODE_BT_DEVICE2
+0x03 MODE_BT_DEVICE3
+//mouse  flag
+0X00 WRITE_REQ_ENABLE_FLAG
+0X01 LL_START_ENC_FLAG
+0X02 LL_PAIRING_SUCCESS_FLAG
+
+
+//mouse_function_flag
+0x08 MOUSE_FLAG_LEN
+//byte 1
+0x00 MOUSE_SELECT_DEVICE_FLAG
+0x01 MOUSE_24G_PAIRING_FLAG
+0x02 MOUSE_STORE_EEPROM_FLAG
+0x03 MOUSE_BT_CANNEL_RECONN_FLAG
+0x04 MOUSE_LOW_VOLTAGE_FLAG
+0x05 MOUSE_BT_DISCOVERY_BUTTON_DOWN_FLAG
+0x06 MOUSE_BT_DISCOVERY_BUTTON_LONG_DOWN_FLAG
+
+//byte 2
+0x08 MOUSE_ENABLE_BLE_RANDOM_ADDRE
+0x09 MOUSE_ENABLE_2K_EEPROM
+0x0a MOUSE_ENABLE_INIT_DELAY
+0x0b MOUSE_ENABLE_WAKEUP_FROM_POWER
+0x0c MOUSE_ENABLE_16M
+0x0d MOUSE_ENABLE_USB
+
+//byte 3
+0x10 MOUSE_ENABLE_SPI2
+0x11 MOUSE_ENABLE_24G
+0x12 MOUSE_ENABLE_FLASH
+0x13 MOUSE_ENABLE_EEPROM
+0x14 MOUSE_ENABLE_ADC
+0x15 MOUSE_ENABLE_KEYBOARD
+0x16 MOUSE_ENABLE_24G_SEARCH_DONGLE
+
+//byte 4
+0x18 MOUSE_ENABLE_24G_250Hz
+0x19 MOUSE_ENABLE_24G_500Hz
+0x1a MOUSE_ENABLE_24G_1000
+0x1b MOUSE_ENABLE_BT_125Hz
+0x1c MOUSE_ENABLE_DPI_LEVEL_4
+0x1d MOUSE_ENABLE_USB_250
+0x1e MOUSE_ENABLE_USB_500
+0x1f MOUSE_ENABLE_USB_1000
+
+//byte 5
+0x20 MOUSE_ENABLE_POWER_ON_LED
+0x21 MOUSE_ENABLE_LOW_VOLTAGE_LED
+0x22 MOUSE_ENABLE_LOW_VOLTAGE_USE_MODE_LED
+0x23 MOUSE_ENABLE_LOW_VOLTAGE_LED_BLINK_N_SECOND
+0x24 MOUSE_ENABLE_4_LED
+0x25 MOUSE_ENABLE_DPI_FOR_4_LED
+0x26 MOUSE_ENABLE_BT2_FOR_4_LED
+0x27 MOUSE_ENABLE_LOW_V_FOR_4_LED
+
+
+//byte 6
+0x28 MOUSE_ENABLE_SELECT_DEVICE_BY_DPI_BUTTON
+0x29 MOUSE_ENABLE_SELECT_DEVICE_BY_PB_BUTTON
+0x2a MOUSE_ENABLE_SELECT_DEVICE_BY_SWITCH_GPIO
+0x2b MOUSE_ENABLE_SELECT_DEVICE_BY_SWITCH_ADC
+0x2c MOUSE_ENABLE_DPI_KEY_CONNECT_GND
+0x2d MOUSE_ENABLE_PB_BUTTON_CONNECT_GND
+0x2e MOUSE_ENABLE_DPI_KEY_CONNECT_ADC
+0x2f MOUSE_ENABLE_24G_FIRST_AUTO_PAIRING
+//byte 7 
+0x30 MOUSE_ENABLE_AUTO_24G_PARING
+0x31 MOUSE_ENABLE_24G_POWER_ON_PAIRING
+0x32 MOUSE_ENABLE_COMMBINATION_KEY_BY_24G_PAIRING
+0x33 MOUSE_ENABLE_BT_RECONNECT_TIMEOUT_ENTER_DISCOVERY
+0x34 MOUSE_ENABLE_PB_BUTTON_SHORT_PRESS_ENTER_DISCOVERY
+0x35 MOUSE_ENABLE_COMMBINATION_KEY_BY_BT_DISCOVERY
+0x36 MOUSE_ENABLE_DPI_KEY_LONG_PRESS_DISCONVERY
+0x37 MOUSE_ENABLE_PB_BUTTON_LONG_PRESS_DISCONVERY
+
+//byte 8
+0x38 MOUSE_ENABLE_SMOOTHER
+0x39 MOUSE_ENABLE_XY_OFFSET
+0x3a MOUSE_ENABLE_24G_AUTO_PAIR_NERVER_BEEN_PAIRED
+0x3b MOUSE_ENABLE_LE_BATTERY_SERVICE_CANCEL
+0x3c MOUSE_ENABLE_WHEEL_WAKE_UP_CANCEL
+0x3d MOUSE_ENABLE_24G_2M_PHY
+
+//mouse dpi level
+0x00 MOUSE_DPI_LEVEL1
+0x01 MOUSE_DPI_LEVEL2
+0x02 MOUSE_DPI_LEVEL3
+0x03 MOUSE_DPI_LEVEL4
+
+
+//mouse sensor angle
+0x00 MOUSE_6CLK_ANGLE
+0X01 MOUSE_9CLK_ANGLE
+0X02 MOUSE_12CLK_ANGLE
+0X03 MOUSE_3CLK_ANGLE
+
+
+
+0xFF GPIO_DISABLE
+
+//DPI button state 
+0x00 DPI_BUTTON_STATE_UP
+0x01 DPI_BUTTON_STATE_DOWN
+
+
+//PB button state 
+0x00 PB_BUTTON_STATE_UP
+0x01 PB_BUTTON_STATE_DOWN
+
+//Commbination_key state 
+0x00 COMMBINATION_KEY_STATE_UP
+0x01 COMMBINATION_KEY_STATE_DOWN
+
+
+//eeprom address offect
+0X00 MOUSE_INFO_EEPROM_OFFECT
+0x58 MOUSE_STORE_FLAG
+0X5A MOUSE_DPI_EEPROM_OFFECT	//1byte
+0X5B MOUSE_G24_ADDR_EEPROM_OFFECT	//4bytes
+0X5F MOUSE_RANDOM_ADDR_COUNT_EEPROM_OFFSET	//2bytes
+0X61 MOUSE_EEPROM_MODULE_INIT_FLAG
+
+// Sensor id number
+0x30 P32XX_ID1
+0x31 P3065_ID1
+0x02 P3212_ID2
+0xD1 P3205_TJ3T_ID2
+0XD2 P3204_TJ3L_ID2
+0x54 PKA8_ID2
+0x70 P3065_XY_ID2
+0x00 P3065_ID2
+0x5a P_MX8650
+0xD8 P8009_ID2
+0x50 P6520A_ID2
+0x58 PKA8G2_ID1
+0x59 PKA8G2_ID2
+
+
+//Sensor type
+0X00 P3205
+0X01 P3065
+0X02 P3204
+0X03 P3212
+0X04 P3065_XY
+0x05 MX8650
+0x06 P8009
+0x07 P6520
+0X08 KA8
+0X09 KA8_UL
+0X0a KA8_HD
+0X0b KA8G2
+
+
+//SENSOR REG
+0x00 PAN_REG_PID_L
+0x01 PAN_REG_PID_H
+0x02 PAN_REG_MOTION_STAUS
+0x03 PAN_REG_DELTA_X
+0x04 PAN_REG_DELTA_Y
+0x05 PAN_REG_OPRATION_MODE
+0x06 PAN_REG_CONFIG
+0x07 PAN_REG_IMAGE_QUALITY
+0x08 PAN_REG_OPRATION_STATE
+0x09 PAN_REG_WRITE_PROTECT
+0x0A PAN_REG_SLEEP_1
+0x0B PAN_REG_ENTER_TIME
+0x0C PAN_REG_SLEEP_2
+0x0D PAN_REG_IMAGE_THRESHOLD
+0x0E PAN_REG_IMAGE_RECGNITION
+
+
+0x06 MOUSE_DPI_ADDRESS
+0x05 MOUSE_P3610_DPI_ADDRESS
+0x0D MOUSE_P3212_DPI_XADDRESS
+0x0E MOUSE_P3212_DPI_YADDRESS
+
+)
+
+(
+0x01 ADV_FLAG_LIMITED_DISCOVERABLE
+0x04 ADV_FLAG_BREDR_NOT_SUPPORTED
+)
+
+(
+2 BIT_POWER_ON
+)
+//device option low 2
+(
+1 MODE_4_MOUSE
+)
+
+
+(
+10 LE_LPM_DISABLE_TO
+1 LE_LPM_DISABLE
+0 LE_LPM_ENABLE
+
+12 LE_INTERVAL_15MS
+9 LE_INTERVAL_11_25MS//11.25ms
+7 LE_INTERVAL_8_75MS//8.75ms
+6 LE_INTERVAL_7_5MS//7.5ms
+12 CLASSIC_INTERVAL_7_5MS
+14 CLASSIC_INTERVAL_8_75MS
+18 CLASSIC_INTERVAL_11_25MS
+)
+
+(
+0x00 MOUSE_L_KEY
+0x01 MOUSE_R_KEY
+0x02 MOUSE_M_KEY
+0x03 MOUSE_BK_KEY
+0x04 MOUSE_FW_KEY
+0x05 MOUSE_DPI_KEY
+0x06 MOUSE_PB_KEY
+0x07 MOUSE_CUSTOMER_KEY
+)
+
+
+(
+0 G24_DISCONN_STATE
+1 G24_CONN_STATE
+
+8 G24_CH_NUMBER
+16 G24_CH_POLL_COUNT
+)
+
+(
+0 MOUSE_ADC_CHECK_BATTERY_ONLY
+1 MOUSE_ADC_CHECK_MULTIPLE
+2 MOUSE_ADC_CHECK_GPIO_MULTIPLE
+3 MOUSE_ADC_CHECK_VINLPM_MULTIPLE
+)
+
+
+(
+0x5a MOUSE_USB_INTERFACE_INSERT
+0xa5 MOUSE_USB_INTERFACE_REMOVE
+)
+
+(
+0x10 MOUSE_BLE_L2CAP_TXBUFF_SIZE
+)
+
+(
+0 MOUSE_ADC_ENABLE
+1 MOUSE_SEARCH_DONGLE_ENABLE
+2 MOUSE_24G_250HZ_ENABLE
+3 MOUSE_CLK_16M_ENABLE
+4 MOUSE_DPI_4_LEVEL_ENABLE
+5 MOUSE_KEYBOARD_ENABLE
+
+7 MOUSE_DEVICE_NUMBER_FLAG
+)
+
Index: format/app_remote_car.format
===================================================================
--- /branch/usb/usb_public_base/format/app_remote_car.format	(revision 0)
+++ /branch/usb/usb_public_base/format/app_remote_car.format	(working copy)
@@ -0,0 +1,167 @@
+
+xmemalloc g24_tx_remote(
+1 mem_remote_car_hard_soft_switch
+
+1 mem_remote_car_queue_each_size
+1 mem_remote_car_queue_length
+
+1 mem_remote_car_queue_curr_num
+1 mem_remote_car_queue_read_ptr
+1 mem_remote_car_queue_write_ptr
+90 mem_remote_car_queue_ele
+
+1 mem_remote_style_led_type
+1 mem_remote_style_blink_count
+1 mem_remote_style_struct_led_gpio
+2 mem_remote_style_on_time
+2 mem_remote_style_off_time
+2 mem_remote_style_cb_ledon
+2 mem_remote_style_cb_ledoff
+
+
+1 mem_remote_car_led_num
+8 mem_remote_car_led_map
+
+0 mem_remote_car_keyscan
+1 mem_remote_car_key_num
+2 mem_cb_remote_car_keyscan
+
+0 mem_remote_car_key_conf0
+1 mem_remote_car_key_conf0_pin
+0 mem_remote_car_key_conf1
+1 mem_remote_car_key_conf1_pin
+0 mem_remote_car_key_conf2
+1 mem_remote_car_key_conf2_pin
+0 mem_remote_car_key_conf3
+1 mem_remote_car_key_conf3_pin
+0 mem_remote_car_key_conf4
+1 mem_remote_car_key_conf4_pin
+0 mem_remote_car_key_conf5
+1 mem_remote_car_key_conf5_pin
+0 mem_remote_car_key_conf6
+1 mem_remote_car_key_conf6_pin
+
+
+//rocker
+1 mem_rocker_negative_flag
+1 mem_rocker_work_status
+2 mem_current_vdd_value_default_mid_x
+2 mem_current_vdd_value_default_mid_y
+2 mem_current_vdd_value_default_mid_temp
+2 mem_current_vdd_default_range
+2 mem_rocker_last_status
+0 mem_rocker_status
+1 mem_rocker_x_status
+1 mem_rocker_y_status
+
+0 mem_remote_car_config_param
+1 mem_remote_car_config_setting_flag
+1 mem_remote_car_config_key_map
+1 mem_remote_car_config_layout
+1 mem_remote_car_config_connect_led_gpio
+1 mem_remote_car_config_check_way
+1 mem_remote_car_config_soft_switch_enable
+1 mem_remote_car_config_soft_switch_gpio
+1 mem_remote_car_config_timeout_shutdown_enable
+
+0 mem_remote_car_24g_motor_packet
+1 mem_remote_car_24g_motor_packet_lenght
+2 mem_remote_car_24g_motor_send_packet_head
+1 mem_remote_car_24g_motor_send_cmd
+2 mem_remote_car_24g_motor_send_length
+0 mem_remote_car_24g_motor_send_payload
+2 mem_remote_car_24g_motor1_payload
+2 mem_remote_car_24g_motor2_payload
+2 mem_remote_car_24g_motor3_payload
+1 mem_remote_car_24g_motor_send_checksum
+
+0 mem_remote_car_24g_fire_packet
+1 mem_remote_car_24g_fire_packet_lenght
+2 mem_remote_car_24g_fire_send_packet_head
+1 mem_remote_car_24g_fire_send_cmd
+2 mem_remote_car_24g_fire_send_length
+2 mem_remote_car_24g_fire_send_payload
+1 mem_remote_car_24g_fire_send_checksum
+
+15 mem_remote_car_24g_tx_temp
+
+2 mem_remote_car_no_data_timeout
+2 mem_remote_car_no_data_timer
+
+0 mem_remote_car_soft_power
+1 mem_remote_car_power_state
+1 mem_remote_car_power_timer
+1 mem_remote_car_power_off_timeout
+1 mem_remote_car_power_starting_timeout
+2 mem_remote_car_power_off_cb
+2 mem_remote_car_power_starting_cb
+2 mem_remote_car_power_standby_cb
+
+1 mem_remote_key_status
+1 mem_remote_car_24g_status
+
+1 mem_remote_car_24g_auto_work_step
+1 mem_remote_car_24g_pair_success_flag
+1 mem_remote_car_empty_packet
+
+1 mem_remote_car_motor1_key0_press_state
+1 mem_remote_car_motor1_key1_press_state
+1 mem_remote_car_motor2_key2_press_state
+1 mem_remote_car_motor2_key3_press_state
+1 mem_remote_car_motor1_rel_state
+1 mem_remote_car_motor2_rel_state
+
+1 mem_remote_car_no_data_check
+
+4 mem_remote_24g_commom_addr
+4 mem_remote_24g_commom_addr_temp
+4 mem_remote_24g_commom_addr_read
+1 mem_remote_save_addr_flag
+)
+
+
+(
+// eeprom config
+0xb0 REMOTE_PARAM_EEPROM_CONFIG_ADDR
+//eeprom address offect
+0X00 REMOTE_INFO_EEPROM_OFFECT
+
+)
+
+
+(
+0x00 CONTROL_F_B_MOTOR
+0x02 CONTROL_L_R_MOTOR
+)
+
+(
+0x00 KEY_MAP_TEN
+0x01 KEY_MAP_LR
+)
+
+(
+0x00 CONTROL_F_B_TEN
+0x02 CONTROL_L_R_TEN
+0x03 CONTROL_L_R_LR
+)
+
+(
+0 KEY_CHECK
+1 ROCKER_CHECK
+)
+
+(
+1 MOTOR_POSITIVE
+2 MOTOR_NEGATIVE
+)
+
+(
+0 ROCKER_MIDDLE_KEY
+1 ROCKER_POSITIVE_KEY
+2 ROCKER_NEGATIVE_KEY
+)
+(
+0x700 OTP_OFFSET_REMOTE_COMMOM_START_ADDR 
+0x7cc OTP_OFFSET_REMOTE_COMMOM_END_ADDR 
+)
+
Index: format/app_shutter.format
===================================================================
--- /branch/usb/usb_public_base/format/app_shutter.format	(revision 0)
+++ /branch/usb/usb_public_base/format/app_shutter.format	(working copy)
@@ -0,0 +1,242 @@
+
+
+xmemalloc shutter(
+
+////////////////////////////////////
+//shutter common config
+1 mem_shutter_bluetooth_type
+////////////////////////////////////
+
+2 mem_shutter_config_eeprom_offset_addr
+
+////////
+2 mem_shutter_config_eeprom_start_flag
+1 mem_shutter_config_user_size
+///////
+1 mem_shutter_config_label
+2 mem_shutter_config_otp_addr
+///////////////////////////////////
+
+////////////////////////////////////
+//classic shutter config
+2 mem_classic_shutter_random_mac_offset_addr
+////////////////////////////////////
+
+////////////////////////////////////
+//ble shutter config
+1 mem_ble_shutter_enable_notify
+2 mem_ble_shutter_reconn_adv_interval
+2 mem_ble_shutter_discovery_adv_interval
+2 mem_ble_shutter_reconn_timeout
+2 mem_ble_shutter_reconn_timer
+2 mem_ble_shutter_reconn_blink_on_time
+2 mem_ble_shutter_reconn_blink_off_time
+2 mem_ble_shutter_discovery_blink_on_time
+2 mem_ble_shutter_discovery_blink_off_time
+
+2 mem_ble_shutter_interval_min
+2 mem_ble_shutter_interval_max
+2 mem_ble_shutter_latency
+2 mem_ble_shutter_timeout
+
+2 mem_ble_shutter_interval_min_new
+2 mem_ble_shutter_interval_max_new
+2 mem_ble_shutter_latency_new
+2 mem_ble_shutter_timeout_new
+
+//////////////////shutter sleep timeout//////////////////
+2 mem_classic_shutter_discovery_timeout
+2 mem_classic_shutter_connect_timeout
+2 mem_ble_shutter_discovery_timeout
+2 mem_ble_shutter_connect_timeout
+2 mem_shutter_sleep_timeout
+2 mem_shutter_sleep_timer
+
+/////////////////////////////////////////////////////////////////
+1 mem_shutter_hard_soft_switch_case
+1 mem_shutter_soft_switch_button_gpio
+1 mem_shutter_soft_switch_power_state
+1 mem_shutter_soft_switch_poweron_time
+1 mem_shutter_soft_switch_poweroff_time
+2 mem_shutter_soft_switch_poweron_callback_function
+2 mem_shutter_soft_switch_poweroff_callback_function
+
+
+0 mem_shutter_keyscan
+1 mem_shutter_key_num
+2 mem_cb_shutter_keycan
+1 mem_shutter_key_conf0
+1 mem_shutter_key_conf1
+1 mem_shutter_key_conf2
+1 mem_shutter_key_conf3
+1 mem_shutter_key_conf4
+1 mem_shutter_key_conf5
+1 mem_shutter_key_conf6
+1 mem_shutter_key_conf7
+
+
+5 mem_key0_press
+5 mem_key1_press
+5 mem_key2_press
+5 mem_key3_press
+5 mem_key4_press
+5 mem_key5_press
+5 mem_key6_press
+5 mem_key7_press
+
+5 mem_key0_release	
+5 mem_key1_release
+5 mem_key2_release
+5 mem_key3_release
+5 mem_key4_release
+5 mem_key5_release
+5 mem_key6_release
+5 mem_key7_release
+
+5 mem_ble_data_buffer1
+5 mem_ble_data_buffer2
+5 mem_ble_data_buffer3
+5 mem_ble_data_buffer4
+5 mem_ble_data_buffer5
+5 mem_ble_data_buffer6
+5 mem_ble_data_buffer7
+5 mem_ble_data_buffer8
+50 mem_ble_data_buffer9_58
+
+5 mem_classic_data_buffer
+
+5 mem_classic_data_buffer1
+5 mem_classic_data_buffer2
+5 mem_classic_data_buffer3
+5 mem_classic_data_buffer4
+5 mem_classic_data_buffer5
+5 mem_classic_data_buffer6
+5 mem_classic_data_buffer7
+5 mem_classic_data_buffer8
+50 mem_classic_data_buffer9_58
+
+1 mem_queue_each_size
+1 mem_queue_length
+1 mem_queue_curr_num
+1 mem_queue_read_ptr
+1 mem_queue_write_ptr
+32 mem_queue_ele
+
+
+170 mem_shutter_nv_data
+
+0 mem_shutter_led_struct_app_led
+1 mem_shutter_led_struct_app_led_type
+1 mem_shutter_led_struct_app_led_blink_count
+1 mem_shutter_led_struct_app_led_gpio
+2 mem_shutter_led_struct_app_led_on_time
+2 mem_shutter_led_struct_app_led_off_time
+2 mem_shutter_led_struct_app_led_on_callback
+2 mem_shutter_led_struct_app_led_off_callback
+
+0 mem_shutter_power_off_led_style
+1 mem_shutter_power_off_led_style_type
+1 mem_shutter_power_off_led_style_blink_count
+1 mem_shutter_power_off_led_style_gpio
+2 mem_shutter_power_off_led_style_on_time
+2 mem_shutter_power_off_led_style_off_time
+2 mem_shutter_power_off_led_style_on_callback
+2 mem_shutter_power_off_led_style_off_callback
+
+1 mem_shutter_soft_swtich_botton_down
+11 mem_shutter_soft_swtich_led_struct_temp
+1 mem_shutter_power_off_timeout
+1 mem_shutter_power_off_timer
+2 mem_shutter_key_conf0_temp
+1 mem_shutter_led_struct_app_led_gpio_temp
+1 mem_shutter_hard_soft_switch_case_temp
+1 mem_shutter_soft_switch_button_gpio_temp
+
+1 mem_shutter_soft_switch_first_power_on
+)
+
+
+
+
+(
+0 BLE_SHUTTER
+1 CLASSIC_SHUTTER
+)
+
+(
+0x0000 NVRAM_EEPROM_OFFSET
+)
+
+(
+0x1b3a SHUTTER_EEPROM_CONFIG_CRC
+)
+
+(
+5 MAX_QUEUE_NUM
+5 SHUTTER_BLE_DATA_BUFFER
+5 SHUTTER_CLASSIC_DATA_BUFFER
+)
+
+
+(
+0x13	GATT_CONSUMER_NOTIFY_HANDLE
+0x14	GATT_CONSUMER_WRITE_HANDLE
+0x17	GATT_KEYBOARD_NOTIFY_HANDLE
+0x18	GATT_KEYBOARD_WRITE_HANDLE
+)
+
+(
+//20ms
+0x0020	FAST_ADV_INTERVAL_VALUE
+//100ms
+0x00a0	SLOW_ADV_INTERVAL_VALUE
+)
+
+
+(
+0 ATT_BIT_NOTIFICATION
+1 ATT_BIT_INDICATION
+)
+///////////////////////////////////////////////////////////////////////////////////////
+
+(
+0 HARD_SWITCH
+1 SOFT_SWITCH
+)
+
+
+(
+1  FLAG_SHUTTER_HID_DISCONN_TIMEOUT
+5 FLAG_SHUTTER_CABLE_UNPLUG_TIMEOUT
+)
+
+(//Data Rom Buffer Addr
+313		BLE_GATT_LIST_SIZE
+487		BT_SDP_LIST_SIZE
+40		BLE_KEY_VALUE_LIST_SIZE
+40		BT_KEY_VALUE_LIST_SIZE
+)
+
+
+(//soft switch power state
+0		SS_STATE_POWER_UP
+1		SS_STATE_POWER_ON
+2		SS_STATE_POWER_OFF
+)
+
+(
+0		SS_POWER_STATE_OFFSET
+1		SS_POWER_ON_TIME
+2		SS_POWER_OFF_TIME
+3		SS_POWER_ON_CB
+5		SS_POWER_OFF_CB
+
+)
+
+(
+
+0x4FFE SIM_IIC_SCL_GPIO_NUM
+0x4FFF SIM_IIC_SDA_GPIO_NUM
+
+)
+
Index: format/ble_protocol_stack/le.format
===================================================================
--- /branch/usb/usb_public_base/format/ble_protocol_stack/le.format	(revision 0)
+++ /branch/usb/usb_public_base/format/ble_protocol_stack/le.format	(working copy)
@@ -0,0 +1,439 @@
+
+memalloc(
+260 mem_le_rxbuf
+
+/* security temp */
+4 mem_le_mic
+4 mem_le_peer_mic
+//8 mem_le_skdm
+//8 mem_le_skds
+16 mem_le_mrand
+
+
+/* ========= le context =========== */
+1 mem_le_state
+1 mem_le_mode
+2 mem_le_tsniff
+4 mem_le_anchor
+6 mem_le_clk_offset
+2 mem_le_receive_window
+6 mem_le_plap
+1 mem_le_conn_handle
+1 mem_le_arq
+1 mem_le_ch
+1 mem_le_hop
+2 mem_le_event_count
+4 mem_le_supervision_timer
+2 mem_le_instant
+1 mem_le_channels
+1 mem_le_op
+
+	/* these 3 should NOT be seperated */
+4 mem_le_access
+3 mem_le_crcinit
+1 mem_le_window_size
+
+	/* these 3 should NOT be seperated */
+2 mem_le_slave_latency
+2 mem_le_superto
+5 mem_le_channel_map
+
+
+1 mem_le_rx_phy
+1 mem_le_tx_phy
+
+9 mem_le_update_new_param
+
+16 mem_le_sk
+
+1 mem_le_peer_sca
+1 mem_le_err_code
+1 mem_le_ll_pairing_fail_reason
+
+/* ========= le context ending =========== */
+
+/* test */
+1 mem_le_testtype
+1 mem_cmd_le_create_conn
+
+)
+
+amemalloc mem_le_update_new_param(
+//update connection parameter
+	0 mem_le_new_param
+	1 mem_le_new_transmitwindowsize
+	2 mem_le_new_transmitwindowoffset
+	2 mem_le_new_conninterval
+	2 mem_le_new_connslavelatency
+	2 mem_le_new_connsupervisiontimeout
+)
+
+amemalloc mem_le_update_new_param(
+//update map parameter
+	5 mem_le_new_map
+)
+
+amemalloc mem_le_update_new_param(
+//update phy parameter
+	1 mem_le_new_m2s_phy
+	1 mem_le_new_s2m_phy
+)
+
+amemalloc mem_le_rxbuf(
+//data channel PDU
+	1 mem_le_rxbuf_data_header
+	1 mem_le_rxbuf_data_length
+	255 mem_le_rxbuf_data_payload
+)
+
+amemalloc mem_le_rxbuf(
+//data channel LL control PDU
+	1 mem_le_rxbuf_data_ll_header
+	1 mem_le_rxbuf_data_ll_length
+	1 mem_le_rxbuf_data_ll_opcode
+	26 mem_le_rxbuf_data_ll_control_data
+)
+
+xmemalloc(
+1 mem_version
+2 mem_company_id
+2 mem_sub_version
+
+2 mem_le_dsniff
+2 mem_le_conn_interval
+
+1 mem_le_txheader
+1 mem_le_txlen
+256 mem_le_txpayload
+
+//modified name
+1 mem_le_name_len
+30 mem_le_name
+
+
+/* smp related */
+
+16 mem_le_ltk
+1 mem_ltk_exists
+16 mem_le_rconfirm
+16 mem_le_srand
+1 mem_le_iat
+1 mem_le_rat
+1 mem_le_preq
+1 mem_le_preq_iocap
+1 mem_le_preq_oob
+1 mem_le_preq_auth
+1 mem_le_preq_max_keysize
+1 mem_le_preq_init_key_distribution
+1 mem_le_preq_resp_key_distribution
+1 mem_le_pres
+1 mem_le_pres_iocap
+1 mem_le_pres_oob
+1 mem_le_pres_auth
+1 mem_le_pres_max_keysize
+1 mem_le_pres_init_key_distribution
+1 mem_le_pres_resp_key_distribution
+
+/* att related */
+
+2 mem_le_notify_handle
+1 mem_le_search_uuid_length
+16 mem_le_search_uuid
+
+
+
+//START of LE conn parameter structure
+0 mem_le_conn_param
+1 mem_le_conn_peer_addr_type
+6 mem_le_conn_peer_addr
+1 mem_le_conn_own_addr_type
+2 mem_le_interval_min
+2 mem_le_interval_max
+2 mem_le_latency
+2 mem_le_timeout
+//START of LE conn parameter structure
+
+
+3 mem_le_lap
+1 mem_le_uap
+2 mem_le_nap
+
+
+2 mem_le_local_mtu
+2 mem_le_remote_mtu
+
+8 mem_le_skdm
+8 mem_le_skds
+
+2 mem_le_init_superto
+2 mem_ui_le_uuid_table
+
+1 mem_le_secure_connect_flag
+1 mem_le_secure_connect_state
+1 mem_le_sc_confirm_gkey_flag
+
+
+1 mem_le_pairing_state
+1 mem_le_enc_state
+1 mem_le_pairing_mode
+4 mem_le_tk
+2 mem_le_ediv
+8 mem_le_rand
+16 mem_le_irk
+
+//LE attribute list
+4 mem_le_transmit_window
+
+//ble General configuration 
+1 mem_le_configuration
+16 mem_le_fixed_ltk
+2 mem_le_pairing_handle
+
+
+1 mem_le_packet_llid
+
+//for continue
+2 mem_le_l2cap_size
+2 mem_le_packet_len_recved
+2 mem_le_payload_ptr
+
+
+//ble gatt signaling
+1 mem_le_signaling_identifier
+2 mem_le_l2cap_signaling_conn_param_update_rsp_result
+
+1 mem_le_md_count
+
+2 mem_ble_l2cap_tx_buff0_ptr
+2 mem_ble_l2cap_tx_buff_size_ptr
+)
+
+(//mem_le_T_IFS
+150 PARAM_T_IFS_150US
+20000 PARAM_20MS_INIT
+-11 PARAM_SYNC_TIME_DIFFERENCE
+40 PARAM_CODED_C1_TERM1_TIME_40US
+1666 PARAM_WINDOWN_SIZE
+//T_IFS = 150-modem(CRC time)
+)
+
+
+(
+0 DEFAULT_STATES
+1 IPHONE_LOST_LTK
+2 MODULE_LOST_LTK
+3 LTK_NOT_LOST
+)
+
+	//BLE ErrorCodes
+	(    
+	0x01 ERROR_UNKNOWN_HCI_COMMAND
+	0x02 ERROR_NO_CONNECTION
+	0x03 ERROR_HARDWARE_FAILURE
+	0x04 ERROR_PAGE_TIMEOUT
+	0x05 ERROR_AUTHENTICATION_FAILURE
+	0x06 ERROR_KEY_MISSING
+	0x07 ERROR_MEMORY_FULL
+	0x08 ERROR_CONNECTION_TIMEOUT
+	0x09 ERROR_MAX_CONNECTIONS
+	0x0A ERROR_MAX_SCO_CONNECTIONS
+	0x0B ERROR_MAX_ACL_CONNECTIONS
+	0x0C ERROR_COMMAND_DISALLOWED
+	0x0D ERROR_HOST_REJECT_LIMITED_RESOURCES
+	0x0E ERROR_HOST_REJECT_SECURITY_REASONS
+	0x0F ERROR_HOST_REJECT_REMOTE_IS_ONLY_PERSONAL
+	0x10 ERROR_HOST_TIMEOUT
+	0x11 ERROR_UNSUPPORTED_FEATURE_OR_PARAMETER_VALUE
+	0x12 ERROR_INVALID_HCI_COMMAND_PARAMETERS
+	0x13 ERROR_REMOTE_USER_TERMINATED_CONNECTION
+	0x14 ERROR_REMOTE_LOW_RESOURCES
+	0x15 ERROR_REMOTE_POWERING_OFF
+	0x16 ERROR_CONNECTION_TERMINATED_BY_LOCAL_HOST
+	0x17 ERROR_REPEATED_ATTEMPTS
+	0x18 ERROR_PAIRING_NOT_ALLOWED
+	0x19 ERROR_UNKNOWN_LMP_PDU
+	0x1A ERROR_UNSUPPORTED_REMOTE_FEATURE
+	0x1B ERROR_SCO_OFFSET_REJECTED
+	0x1C ERROR_SCO_INTERVAL_REJECTED
+	0x1D ERROR_SCO_AIR_MODE_REJECTED
+	0x1E ERROR_INVALID_LMP_PARAMETER
+	0x1F ERROR_UNSPECIFIED_ERROR
+	0x20 ERROR_UNSUPPORTED_LMP_PARAMETER_VALUE
+	0x21 ERROR_ROLE_CHANGE_NOT_ALLOWD
+	0x22 ERROR_LMP_RESPONSE_TIMEOUT
+	0x23 ERROR_ERROR_TRANSACTION_COLLISION
+	0x24 ERROR_LMP_PDU_NOT_ALLOWED
+	0x25 ERROR_ENCRYPTION_MODE_NOT_ACCEPTABLE
+	0x26 ERROR_UNIT_KEY_USED
+	0x27 ERROR_QOS_NOT_SUPPORTED
+	0x28 ERROR_INSTANT_PASSED
+	0x29 ERROR_PAIRING_W_UNIT_KEY_NOT_SUPPORTED
+	0x2a ERROR_DIFFERENT_TRANSACTION_COLLISION
+	0x2c ERROR_QOS_UNACCEPTABLE_PARAMETER
+	0x2d ERROR_QOS_REJECTED
+	0x2e ERROR_CHANNEL_CLASSIFICATION_NOT_SUPPORTED
+	0x2f ERROR_INSUFFICIENT_SECURITY
+	0x30 ERROR_PARAMETER_OUT_OF_MANDATORY_PANGE
+	0x32 ERROR_ROLE_SWITCH_PENDING
+	0x34 ERROR_RESERVED_SLOT_VIOLATION
+	0x35 ERROR_ROLE_SWITCH_FAILED
+	0x36 ERROR_EXTENDED_INQUIRY_RESPONSE_TOO_LARGE
+	0x37 ERROR_SIMPLE_PAIRING_NOT_SUPPORTED_BY_HOST
+	0x38 ERROR_HOST_BUSY_PAIRING
+	0x3d ERROR_MIC_FAILURE
+	)
+
+
+	//modified_name
+	(
+	0X20 SPACE	
+	)
+	/* LE L2CAP CID */
+	(
+	0x0004 LE_L2CAP_CID_ATT
+	0x0005 LE_L2CAP_CID_SIGNAL
+	0x0006 LE_L2CAP_CID_SMP
+	)
+
+	//LE address type
+	(
+	0 LE_ADDR_TYPE_PUBLIC
+	1 LE_ADDR_TYPE_RANDOM
+	)
+	//LE address type bitmap
+	(
+	7 LE_RECEIVER_ADDR_BIT
+	6 LE_SENDER_ADDR_BIT
+	)
+	//LE SCAN TYPE
+	(
+	0x00 LE_SCAN_TYPE_PASSIVE //no SCAN_REQ shall be sent
+	0x01 LE_SCAN_TYPE_ACTIVE
+	)
+
+	//LE SCAN ENABLE
+	(
+	0x00 LE_SCAN_DISABLE
+	0x01 LE_SCAN_ENABLE
+	0x0101 LE_ACTIVE_SCAN_ENABLE
+	)
+
+	//LE FIND INFORMATION RESPONSE
+	//THE FORMAT OF THE INFORMATION DATA
+	(
+	0x01 UUID_SIZE_16BIT
+	0x02 UUID_SIZE_128BIT
+	)
+
+//	le_state_map 0-2 is reserved for state_inconn,state_insniff and state_sco
+(
+3 lestate_got_first_packet
+4 lestate_encryption
+5 lestate_update_param
+6 lestate_update_map
+7 lestate_update_phy
+)
+
+// 	le mode
+(
+0 lemode_idle
+1 lemode_slave
+3 lemode_master
+0x20 lemode_2m
+0x40 lemode_lr_s2
+0xc0 lemode_lr_s8
+)
+
+(
+0 llid0
+1 llid1
+2 nesn
+3 sn
+4 md
+5 wak
+6 txdat
+)
+
+(
+0x01 LLID_CONTINUE
+0x02 LLID_START
+0x03 LLID_LE_LL
+0x01 LLID_EMPTY
+)
+
+(
+4 LE_TX_BUFF_COUNT
+3 LE_TX_BUFF_UPDATE_LOOPCNT //LE_TX_BUFF_COUNT-1
+
+12 LE_MD_MAX_COUNT
+)
+
+
+(
+0 LE_INITATOR_LTK_BIT
+1 LE_INITATOR_IRK_BIT
+2 LE_INITATOR_CSRK_BIT
+)
+
+
+
+
+
+(
+0  LE_FIND_BY_TYPE_VAL_RES_NOT_FOUND
+1  LE_FIND_BY_TYPE_VAL_RES_FOUND_STARTING_HANDLE
+2  LE_FIND_BY_TYPE_VAL_RES_FOUND_ENDING_HANDLE
+
+)
+
+(
+0 MASTER_PUBLIC_ADDR
+1 MASTER_RANDOM_ADDR
+)
+
+(
+0x06 LE_ERR_PIN_OR_KEY_MISSING
+)
+
+(
+39 LE_CCM_DIRECTIONBIT
+)
+(
+36 BR_CCM_0_LENGTH_CONTINUATION
+37 BR_CCM_DIRECTIONBIT
+)
+
+(
+96000 TIMER_SMP_PAIRING_TIMEOUT //30S
+)
+
+
+
+//mem_le_enc_state
+(
+0 FLAG_LE_ENC_NULL
+1 FLAG_LE_RCV_ENC_START
+2 FLAG_LE_ENC_PAUSE
+3 FLAG_LE_RCV_START_ENC_RSP
+4 FLAG_LE_SEND_START_ENC_RSP
+5 FLAG_LE_SEND_START_ENC_REQ
+0xff FLAG_LE_ENC_END
+)
+
+(//mem_le_configuration
+//bit0:use fixed key , ble passkey pairing
+0 BIT_BLE_PASSKEY_FIXED_KEY
+//bit1:ble pairing use fixed long term key
+1 BIT_BLE_PAIRING_FIXED_LTK
+//bit2:ble transmit packet will set more data flag
+2 BIT_BLE_TRANSMIT_PACKET_BY_MD
+//bit3:master read handle, with requires an authenticated link
+3 BIT_BLE_READ_AUTH
+//bit4:master write handle, with requires an authenticated link
+4 BIT_BLE_WRITE_AUTH
+//bit5:cannot enter long sleep
+5 BIT_BLE_SHORT_MULT
+//bit6:DEAL baseband packet
+6 BIT_BLE_DEAL_BB_PACKET
+)
+
Index: format/ble_protocol_stack/le_advertising.format
===================================================================
--- /branch/usb/usb_public_base/format/ble_protocol_stack/le_advertising.format	(revision 0)
+++ /branch/usb/usb_public_base/format/ble_protocol_stack/le_advertising.format	(working copy)
@@ -0,0 +1,104 @@
+
+xmemalloc(
+// parameters
+1 mem_le_scan_enable
+2 mem_le_scan_interval
+2 mem_le_scan_window
+
+
+1 mem_le_adv_data_len
+31 mem_le_adv_data
+1 mem_le_scan_data_len
+31 mem_le_scan_data
+
+//START of LE adv parameter structure
+1 mem_le_adv_enable
+0 mem_le_adv_param
+2 mem_le_adv_interval
+1 mem_le_adv_type
+1 mem_le_adv_own_addr_type
+6 mem_le_adv_direct_addr
+1 mem_le_adv_channel_map
+//END of LE adv parameter structure
+
+//START of LE scan parameter structure
+0 mem_le_scan_params
+1 mem_le_scan_type
+1 mem_le_scan_own_addr_type
+//END of LE scan parameter structure
+)
+
+amemalloc mem_le_rxbuf(
+//advertising channel PDU
+	1 mem_le_rxbuf_adv_header
+	1 mem_le_rxbuf_adv_length
+	255 mem_le_rxbuf_adv_payload
+)
+
+amemalloc mem_le_rxbuf(
+//advertising channel PDU
+//Scan Req
+	1 mem_le_rxbuf_adv_scan_req_header
+	1 mem_le_rxbuf_adv_scan_req_length
+	6 mem_le_rxbuf_adv_scan_req_scan_address
+	6 mem_le_rxbuf_adv_scan_req_adv_address
+)
+
+amemalloc mem_le_rxbuf(
+//advertising channel PDU
+//Connect IND
+	1 mem_le_rxbuf_adv_connect_ind_header
+	1 mem_le_rxbuf_adv_connect_ind_length
+	6 mem_le_rxbuf_adv_connect_ind_init_address
+	6 mem_le_rxbuf_adv_connect_ind_adv_address
+	4 mem_le_rxbuf_adv_connect_ind_access_address
+	3 mem_le_rxbuf_adv_connect_ind_crc_init
+	1 mem_le_rxbuf_adv_connect_ind_win_size
+	2 mem_le_rxbuf_adv_connect_ind_win_offset
+	2 mem_le_rxbuf_adv_connect_ind_interval
+	2 mem_le_rxbuf_adv_connect_ind_latency
+	2 mem_le_rxbuf_adv_connect_ind_timeout
+	5 mem_le_rxbuf_adv_connect_ind_channel_map
+	1 mem_le_rxbuf_adv_connect_ind_hop_and_sca
+)
+
+(
+0x01	GAP_ADTYPE_FLAGS
+0x02	GAP_ADTYPE_16BIT_MORE
+0x03	GAP_ADTYPE_16BIT_COMPLETE
+0x04	GAP_ADTYPE_32BIT_MORE
+0x05	GAP_ADTYPE_32BIT_COMPLETE
+0x06	GAP_ADTYPE_128BIT_MORE
+0x07	GAP_ADTYPE_128BIT_COMPLETE
+0x08	GAP_ADTYPE_LOCAL_NAME_SHORT
+0x09	GAP_ADTYPE_LOCAL_NAME_COMPLETE
+0x0a	GAP_ADTYPE_POWER_LEVEL
+0x16	GAP_ADTYPE_SERVICE_DATA
+0x2a	GAP_ADTYPE_MESH_MESSAGE
+0x2b 	GAP_ADTYPE_MESH_BEACON
+0xff	GAP_ADTYPE_MANUFACTURER_SPECIFIC
+)
+
+/* advertising channel PDU type */
+(
+0 ADV_IND
+1 ADV_DIRECT_IND
+2 ADV_NONCONN_IND
+3 SCAN_REQ
+3 AUX_SCAN_REQ
+4 SCAN_RSP
+5 CONNECT_REQ
+5 AUX_CONNECT_REQ
+6 ADV_SCAN_IND
+)
+
+(
+0 BIT_ADV_CHANNEL_MAP_37
+1 BIT_ADV_CHANNEL_MAP_38
+2 BIT_ADV_CHANNEL_MAP_39
+)
+
+(
+0xa0 param_le_sca
+)
+
Index: format/ble_protocol_stack/le_l2cap_att.format
===================================================================
--- /branch/usb/usb_public_base/format/ble_protocol_stack/le_l2cap_att.format	(revision 0)
+++ /branch/usb/usb_public_base/format/ble_protocol_stack/le_l2cap_att.format	(working copy)
@@ -0,0 +1,194 @@
+
+xmemalloc(
+	1 mem_le_l2cap_att_states
+
+	/* should be together */
+	1 mem_le_att_opcode
+	2 mem_le_att_handle
+	1 mem_le_search_res
+
+)
+
+amemalloc mem_temp_block2(
+	2 mem_le_search_handle_start
+	2 mem_le_search_handle_end
+	0 mem_le_att_offset
+	1 mem_le_search_att_type_length
+	16 mem_le_search_att_type
+
+	1 mem_le_curr_att_len
+
+	2 mem_le_cur_attlist_start_ptr
+	2 mem_le_cur_handle_start
+	2 mem_le_cur_handle_end
+	1 mem_le_cur_uuid_length
+	16 mem_le_cur_uuid
+)
+
+
+amemalloc mem_le_rxbuf(
+//data channel ATT start PDU
+	1 mem_le_rxbuf_data_att_header
+	1 mem_le_rxbuf_data_att_length
+	2 mem_le_rxbuf_data_att_l2cap_length
+	2 mem_le_rxbuf_data_att_cid
+	1 mem_le_rxbuf_data_att_opcode
+	250 mem_le_rxbuf_data_att_payload
+)
+
+
+amemalloc mem_le_rxbuf(
+//data channel ATT continue PDU
+	1 mem_le_rxbuf_data_continue_header
+	1 mem_le_rxbuf_data_continue_length
+	255 mem_le_rxbuf_data_continue_payload
+)
+
+amemalloc mem_le_rxbuf(
+//data channel ATT write request PDU
+	1 mem_le_rxbuf_data_att_write_header
+	1 mem_le_rxbuf_data_att_write_length
+	2 mem_le_rxbuf_data_att_write_l2cap_length
+	2 mem_le_rxbuf_data_att_write_cid
+	1 mem_le_rxbuf_data_att_write_opcode
+	2 mem_le_rxbuf_data_att_write_handle
+	248 mem_le_rxbuf_data_att_write_payload
+)
+
+amemalloc mem_le_rxbuf(
+//data channel ATT prepare write request PDU
+	1 mem_le_rxbuf_data_prepare_att_write_header
+	1 mem_le_rxbuf_data_prepare_att_write_length
+	2 mem_le_rxbuf_data_prepare_att_write_l2cap_length
+	2 mem_le_rxbuf_data_prepare_att_write_cid
+	1 mem_le_rxbuf_data_prepare_att_write_opcode
+	2 mem_le_rxbuf_data_prepare_att_write_handle
+	2 mem_le_rxbuf_data_prepare_att_write_offset
+	246 mem_le_rxbuf_data_prepare_att_write_payload
+)
+
+(//bit of mem_le_l2cap_att_states
+0 BLE_L2CAP_SEND_INDICATION_PACKET
+0 BLE_L2CAP_RECV_CONFIRMATION_PACKET
+1 BLE_L2CAP_DEAL_WITH_CONTINUE_PACKET
+)
+
+(//bit map of att handle
+14 BIT_OF_ATT_HANDLE_READ_AUTHENTICATED
+15 BIT_OF_ATT_HANDLE_WRITE_AUTHENTICATED
+)
+
+
+
+(
+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
+)
+
+/* ATT OPCODE */
+(
+0x01 ATTOP_ERROR_RESPONSE
+0x02 ATTOP_EXCHANGE_MTU_REQUEST
+0x03 ATTOP_EXCHANGE_MTU_RESPONSE
+0x04 ATTOP_FIND_INFORMATION_REQUEST
+0x05 ATTOP_FIND_INFORMATION_RESPONSE
+0x06 ATTOP_FIND_BY_TYPE_VALUE_REQUEST
+0x07 ATTOP_FIND_BY_TYPE_VALUE_RESPONSE
+0x08 ATTOP_READ_BY_TYPE_REQUEST
+0x09 ATTOP_READ_BY_TYPE_RESPONSE
+0x0A ATTOP_READ_REQUEST
+0x0B ATTOP_READ_RESPONSE
+0x0C ATTOP_READ_BLOB_REQUEST
+0x0D ATTOP_READ_BLOB_RESPONSE
+0x0E ATTOP_READ_MULTIPLE_REQUEST
+0x0F ATTOP_READ_MULTIPLE_RESPONSE
+0x10 ATTOP_READ_BY_GROUP_TYPE_REQUEST
+0x11 ATTOP_READ_BY_GROUP_TYPE_RESPONSE
+0x12 ATTOP_WRITE_REQUEST
+0x13 ATTOP_WRITE_RESPONSE
+0x16 ATTOP_PREPARE_WRITE_REQUEST
+0x17 ATTOP_PREPARE_WRITE_RESPONSE
+0x18 ATTOP_EXECUTE_WRITE_REQUEST
+0x19 ATTOP_EXECUTE_WRITE_RESPONSE
+0x1B ATTOP_HANDLE_VALUE_NOTIFICATION
+0x1D ATTOP_HANDLE_VALUE_INDICATION
+0x1E ATTOP_HANDLE_VALUE_CONFIRMATION
+0x52 ATTOP_WRITE_COMMAND
+0xD2 ATTOP_SIGNED_WRITE_COMMAND
+0x1f ATTOP_CONTINUE
+0x9e EMPTY_LE_DATA_PRE
+0x9f EMPTY_LE_DATA
+)
+
+/* ATT error code */
+(
+0x01 ATT_ERR_INVALID_HANDLE
+0x02 ATT_ERR_READ_NOT_PERMITTED
+0x03 ATT_ERR_WRITE_NOT_PERMITTED
+0x04 ATT_ERR_INVALID_PDU
+0x05 ATT_ERR_INSUFFICIENT_AUTHENTICATION
+0x06 ATT_ERR_REQUEST_NOT_SUPPORTED
+0x07 ATT_ERR_INVALID_OFFSET
+0x08 ATT_ERR_INSUFFICIENT_AUTHORIZATION
+0x09 ATT_ERR_PREPARE_QUEUE_FULL
+0x0A ATT_ERR_ATTRIBUTE_NOT_FOUND
+0x0B ATT_ERR_ATTRIBUTE_NOT_LONG
+0x0C ATT_ERR_INSUFFICIENT_ENCRYPTION_KEY_SIZE
+0x0D ATT_ERR_INVALID_ATTRIBUTE_VALUE_LENGTH
+0x0E ATT_ERR_UNLIKELY_ERROR
+0x0F ATT_ERR_INSUFFICIENT_ENCRYPTION
+0x10 ATT_ERR_UNSUPPORTED_GROUP_TYPE
+0x11 ATT_ERR_INSUFFICIENT_RESOURCES
+)
+
+/* GATT Specifications*/
+(
+0X2900 CHARACTERTIC_EXTENDED_PROPERTIES
+0X2901 CHARACTERTIC_USER_DESCRIPTION
+0X2902 CLIENT_CHARACTERTIC_CONFIGURATION
+0X2903 SERVER_CHARACTERTIC_CONFIGURATION
+0X2904 CHARACTERTIC_PRESENTATION_FORMAT
+0X2905 CHARACTERTIC_AGGREGATE
+0X2906 VALID_RANGE
+0X2907 EXTERNAL_REPORT_REFERENCE
+0X2908 REPORT_REFERENCE
+0X290B ENVIR_SENSING_CONFIGURATION
+0X290C ENVIR_SENSING_MEASUREMENT
+0X290D ENVIR_SENSING_TRIGGER_SETTING
+)
+
+
+/*	SERVICE UUID	*/
+(
+0x1800 UUID_SERVICE_GENERIC_ACC
+0x1801 UUID_SERVICE_GENERIC_ATT
+0x180a UUID_SERVICE_DEVICE_INFO
+0x180f UUID_SERVICE_BATTERY
+0x1812 UUID_SERVICE_HIDS
+0x2800 UUID_GATT_PRIMARY_SERVICE
+0x2801 UUID_GATT_SECONDARY_SERVICE
+0X2802 UUID_GATT_INCLUDE
+0X2803 UUID_GATT_CHARACTERISTIC
+0X2A00 UUID_CHRCTR_DEVICE_NAME
+0X2A19 UUID_CHRCTR_BATTERY_LEVEL
+0X2A22 UUID_CHRCTR_KEYBOARD_INPUT
+0X2A23 UUID_CHRCTR_SYSTEM_ID 
+0X2A25 UUID_CHRCTR_SERIAL_NUMBER
+0X2A26 UUID_CHRCTR_FIRMWARE
+0X2A32 UUID_CHRCTR_KEYBOARD_OUTPUT
+0X2A33 UUID_CHRCTR_MOUSE_INPUT
+0X2A4A UUID_CHRCTR_HID_INFO
+0X2A4B UUID_CHRCTR_REPORT_MAP
+0X2A4C UUID_CHRCTR_HID_CTRL_POINT
+0X2A4D UUID_CHRCTR_REPORT
+0X2A4E UUID_CHRCTR_PROTOCOL_MODE
+)
+
+
+
Index: format/ble_protocol_stack/le_l2cap_att_wechat.format
===================================================================
--- /branch/usb/usb_public_base/format/ble_protocol_stack/le_l2cap_att_wechat.format	(revision 0)
+++ /branch/usb/usb_public_base/format/ble_protocol_stack/le_l2cap_att_wechat.format	(working copy)
@@ -0,0 +1,85 @@
+ifdef COMPILE_WECHAT
+
+amemalloc mem_temp_block2(
+	0 mem_wechat_initreq_base_request
+	2 mem_wechat_authreq_base_request
+	4 mem_wechat_authreq_protocol_version
+	2 mem_wechat_authreq_auth_protocol
+	2 mem_wechat_authreq_eam_mac_no_encrypt
+	2 mem_wechat_authreq_mac_address
+	6 mem_wechat_authreq_device_address
+
+	1 mem_wechat_indication_handle
+	1 mem_wechat_write_handle
+	2 mem_wechat_tx_buffer_ptr
+	2 mem_wechat_rx_buffer_ptr
+	2 mem_wechat_rx_push_data_cb
+	2 mem_wechat_tx_nSeq
+	2 mem_wechat_tx_len
+	2 mem_wechat_tx_address
+	2 mem_wechat_rx_len
+	2 mem_wechat_rx_address
+	1 mem_wechat_receive_push_data
+
+)
+
+xmemalloc(
+
+/*
+wechat Air sync protocol parse
+uint8_t indication handle
+uint8_t write handle
+
+*/
+2 mem_le_wechat_air_sync_ptr
+
+)
+
+(
+17 WECHAT_AIR_SYNC_STRUCT_SIZE
+)
+
+(
+0x0000 ECI_NONE
+0x1127 ECI_REQ_AUTH
+0x1227 ECI_REQ_SEND_DATA
+0x1327 ECI_REQ_INIT
+0x214E ECI_RESPONSE_AUTH
+0x224E ECI_RESPONSE_SEND_DATA
+0x234E ECI_RESPONSE_INIT
+0x3175 ECI_PUSH_RECEIVE_DATA
+0x3275 ECI_PUSH_SWITCH_VIEW
+0x3375 ECI_PUSH_SWITCH_BACKGROUD
+0x2F75 ECI_ERR_DECODE
+)
+
+(
+2 ECI_REQ_INIT_MESSAGE_LENGTH
+18 ECI_REQ_AUTH_MESSAGE_LENGTH
+)
+
+(
+0xFE WECHAT_HEAD_MAGIC_NUMBER
+0x01 WECAHT_HEAD_VERSION
+0x01FE WECHAT_RX_HEAD
+)
+
+(
+//push data
+0x0a 	TAG_RecvDataPush_BasePush
+0x12	TAG_RecvDataPush_Data
+0x18	TAG_RecvDataPush_Type
+)
+
+
+(
+0 WECHAT_PROTOCOL_MESSAGE_B_MAGIC_NUMBER
+1 WECHAT_PROTOCOL_MESSAGE_B_VER
+2 WECHAT_PROTOCOL_MESSAGE_N_LENGTH
+4 WECHAT_PROTOCOL_MESSAGE_N_CMD_ID
+6 WECHAT_PROTOCOL_MESSAGE_N_SEQ
+8 WECHAT_PROTOCOL_MESSAGE_PAYLOAD
+)
+
+endif
+
Index: format/ble_protocol_stack/le_l2cap_signalling.format
===================================================================
--- /branch/usb/usb_public_base/format/ble_protocol_stack/le_l2cap_signalling.format	(revision 0)
+++ /branch/usb/usb_public_base/format/ble_protocol_stack/le_l2cap_signalling.format	(working copy)
@@ -0,0 +1,14 @@
+
+/* L2CAP Signaling OPCODE */
+(
+0x12 L2CAP_CONNECTION_PARAMETER_UPDATE_REQUEST
+0x13 L2CAP_CONNECTION_PARAMETER_UPDATE_RESPONSE
+)
+
+(
+0x0000 BLE_SIGNALING_CONNECT_PARAMETER_UPDATE_ACCEPTED
+0x0001 BLE_SIGNALING_CONNECT_PARAMETER_UPDATE_REJECTED
+)
+
+
+
Index: format/ble_protocol_stack/le_l2cap_smp.format
===================================================================
--- /branch/usb/usb_public_base/format/ble_protocol_stack/le_l2cap_smp.format	(revision 0)
+++ /branch/usb/usb_public_base/format/ble_protocol_stack/le_l2cap_smp.format	(working copy)
@@ -0,0 +1,113 @@
+
+
+(
+0x00 LE_PAIRING_MODE_NONE
+0x01 LE_PAIRING_MODE_LAGACY_JUSTWORK
+0x02 LE_PAIRING_MODE_LAGACY_PASSKEY
+0x04 LE_PAIRING_MODE_LAGACY_PASSKEY_RES_INPUT
+0x81 LE_PAIRING_MODE_SECURE_CONNECT_JUSTWORK
+0x82 LE_PAIRING_MODE_SECURE_CONNECT_NUMERIC
+0x83 LE_PAIRING_MODE_SECURE_CONNECT_PASSKEY
+0x84 LE_PAIRING_MODE_SECURE_CONNECT_PASSKEY_RES_INPUT
+
+7 LE_PAIRING_MODE_SECURE_CONNECT_BIT
+)
+
+
+(
+0 FLAG_IOCAP_DISPLAYONLY
+1 FLAG_IOCAP_DISPLAYYESNO
+2 FLAG_IOCAP_KEYBOARDONLY
+3 FLAG_IOCAP_NOINPUTNOOUTPUT
+4 FLAG_IOCAP_KEYBOARDDISPLAY
+
+0x00 FLAG_OOB_DATA_FLAG_NO
+)
+
+(
+0x00 FLAG_LE_NO_BONDING_NO_MITM
+0x01 FLAG_LE_BONDING_NO_MITM
+0x04 FLAG_LE_NO_BONDING_MITM
+0x05 FLAG_LE_BONDING_MITM
+0x09 FLAG_LE_BONDING_NO_MITM_SECURE
+0x0D FLAG_LE_BONDING_MITM_SECURE
+
+2 LE_AUTH_MITM_BIT
+3 LE_AUTH_SECURE_CONNECTION_PAIRING_BIT
+)
+
+//mem_le_pairing_state
+(
+0 FLAG_LE_PAIRING_NULL
+1 FLAG_LE_PAIRING_START
+2 FLAG_LE_PAIRING_SEND_RECURITY_REQ
+3 FLAG_LE_PAIRING_RCV_PAIRING_REQ
+4 FLAG_LE_PAIRING_WAIT_STK_GENERATION
+5 FLAG_LE_PAIRING_RECEIVE_PAIRING_CONFIRM
+6 FLAG_LE_PAIRING_SEND_PAIRING_CONFIRM
+7 FLAG_LE_PAIRING_RECEIVE_PAIRING_RANDOM
+8 FLAG_LE_PAIRING_SEND_PAIRING_RANDOM
+9 FLAG_LE_PAIRING_AFTER_AUTH
+10 FLAG_LE_PAIRING_SEND_START_ENC_RSP
+11 FLAG_LE_PARING_SEND_ENC_INFORMATION
+12 FLAG_LE_PARING_SEND_MASTER_IDENTIFICATION 
+13 FLAG_LE_PARING_SEND_INDENTITY_INFORMATION
+0xff FLAG_LE_PAIRING_END
+)
+
+/* Security Manager Protocol Code */
+(
+0x01 SMP_PAIRING_REQUEST
+0x02 SMP_PAIRING_RESPONSE
+0x03 SMP_PAIRING_CONFIRM
+0x04 SMP_PAIRING_RANDOM
+0x05 SMP_PAIRING_FAILED
+0x06 SMP_ENCRYPTION_INFORMATION
+0x07 SMP_MASTER_IDENTIFICATION
+0x08 SMP_IDENTITY_INFORMATION
+0x09 SMP_IDENTITY_ADDRESS_INFORMATION
+0x0A SMP_SIGNING_INFORMATION
+0x0B SMP_SECURITY_REQUEST
+0x0c SMP_PAIRING_PUBLIC_KEY
+0x0d SMP_PAIRING_DHKEY_CHECK
+)
+
+(// pairing failed reason
+0x00 PAIRING_FAILED_RESERVED
+0X01 PAIRING_FAILED_PASSKEY_ENTRY_FAILED
+0X02 PAIRING_FAILED_OOB_NOT_AVAILABLE
+0X03 PAIRING_FAILED_AUTHENTICATION_REQUIRE
+0X04 PAIRING_FAILED_CONFIRM_VALUE_FAILED
+0X05 PAIRING_FAILED_PAIRING_NOT_SUPPORTED
+0X06 PAIRING_FAILED_ENCRYPTION_KEY_SIZE
+0X07 PAIRING_FAILED_COMMAND_NOT_SUPPORTED
+0X08 PAIRING_FAILED_UNSPECIFIED_REASON
+0X09 PAIRING_FAILED_REPEATED_ATTEMPTS
+0X0A PAIRING_FAILED_INVALID_PARAMETERS
+0X0B PAIRING_FAILED_DHKEY_CHECK_FAILED
+0X0C PAIRING_FAILED_NUMERIC_COMPARISON_FAILED
+0X0D PAIRING_FAILED_BR_EDR_PAIRING_IN_PROGRESS
+0X0E PAIRING_FAILED_KEY_DERIVATION_GENERATION_NOT_ALLOWED
+)
+
+/*LE secure connect state */
+(
+0x00 LE_SC_STAT_NULL
+0x01 LE_SC_STAT_RECEIVE_PUBLIC_KEY
+0x02 LE_SC_STAT_WAIT_SEND_PUBLIC_KEY
+0x03 LE_SC_STAT_SEND_PUBLIC_KEY
+0x04 LE_SC_STAT_RECEIVE_RANDOM
+0x05 LE_SC_STAT_SEND_RANDOM
+0x06 LE_SC_STAT_RECEIVE_DHKEY
+0x07 LE_SC_STAT_WAIT_CONFIRM_GKEY
+0x08 LE_SC_STAT_PASSKEY_WAIT_CONFIRM
+)
+
+
+(
+0 FLAG_LE_SC_CONFRIM_NULL
+1 FLAG_LE_SC_CONFRIM_GKEY_OK
+)
+
+
+
Index: format/ble_protocol_stack/le_ll.format
===================================================================
--- /branch/usb/usb_public_base/format/ble_protocol_stack/le_ll.format	(revision 0)
+++ /branch/usb/usb_public_base/format/ble_protocol_stack/le_ll.format	(working copy)
@@ -0,0 +1,120 @@
+xmemalloc(
+8 mem_le_local_feature
+1 mem_le_tx_phys
+1 mem_le_rx_phys
+
+2 mem_remote_rx_max_octets
+2 mem_remote_rx_max_time
+2 mem_remote_tx_max_octets
+2 mem_remote_tx_max_time
+2 mem_local_rx_max_octets
+2 mem_local_rx_max_time
+2 mem_local_tx_max_octets
+2 mem_local_tx_max_time
+
+)
+
+/* LE control packet type */
+(
+0x00 LL_CONNECTION_UPDATE_IND
+0x01 LL_CHANNEL_MAP_IND
+0x02 LL_TERMINATE_IND
+0x03 LL_ENC_REQ
+0x04 LL_ENC_RSP
+0x05 LL_START_ENC_REQ
+0x06 LL_START_ENC_RSP
+0x07 LL_UNKNOWN_RSP
+0x08 LL_FEATURE_REQ
+0x09 LL_FEATURE_RSP
+0x0A LL_PAUSE_ENC_REQ
+0x0B LL_PAUSE_ENC_RSP
+0x0C LL_VERSION_IND
+0x0D LL_REJECT_IND
+0x0E LL_SLAVE_FEATURE_REQ
+0x0F LL_CONNECTION_PARAM_REQ
+0x10 LL_CONNECTION_PARAM_RSP
+0x11 LL_REJECT_IND_EXT
+0x12 LL_PING_REQ
+0x13 LL_PING_RSP
+0x14 LL_LENGTH_REQ
+0x15 LL_LENGTH_RSP
+0x16 LL_PHY_REQ
+0x17 LL_PHY_RSP
+0x18 LL_PHY_UPDATE_IND
+0x19 LL_MIN_USED_CHANNELS_IND
+0x1A LL_CTE_REQ
+0x1B LL_CTE_RSP
+0x1C LL_PERIODIC_SYNC_IND
+0x1D LL_CLOCK_ACCURACY_REQ
+0x1E LL_CLOCK_ACCURACY_RSP
+0x1F LL_CIS_REQ
+0x20 LL_CIS_RSP
+0x21 LL_CIS_IND
+0x22 LL_CIS_TERMINATE_IND
+0x23 LL_POWER_CONTROL_REQ
+0x24 LL_POWER_CONTROL_RSP
+0x25 LL_POWER_CHANGE_IND
+)
+
+
+
+(//bit map of mem_le_ll_feature
+//LL_FEATURE_REQ
+0 BIT_LL_FEATURE_LE_ENCRYPTION
+1 BIT_LL_FEATURE_CONNECTION_PARAMETERS_REQUEST_PROCEDURE
+2 BIT_LL_FEATURE_EXTENDED_REJECT_INDICATION
+3 BIT_LL_FEATURE_SLAVE_INITIATED_FEATURES_EXCHANGE
+4 BIT_LL_FEATURE_LE_PING
+5 BIT_LL_FEATURE_LE_DATA_PACKET_LENGTH_EXTENSION
+6 BIT_LL_FEATURE_LL_PRIVACY
+7 BIT_LL_FEATURE_EXTENDED_SCANNER_FILTER_POLICIES
+8 BIT_LL_FEATURE_LE_2M_PHY
+9 BIT_LL_FEATURE_STABLE_MODULATION_INDEX_TRANSMITTER
+10 BIT_LL_FEATURE_STABLE_MODULATION_INDEX_RECEIVER
+11 BIT_LL_FEATURE_LE_CODED_PHY
+12 BIT_LL_FEATURE_LE_EXTENDED_ADVERTISING
+13 BIT_LL_FEATURE_LE_PERIODIC_ADVERTISING
+14 BIT_LL_FEATURE_CHANNEL_SELECTION_ALGORITHM
+15 BIT_LL_FEATURE_LE_POWER_CLASS_1
+16 BIT_LL_FEATURE_MINIMUM_NUMBER_OF_USED_CHANNELS_PROCEDURE
+)
+(//function map of mem_le_ll_feature
+//LL_FEATURE_REQ
+0x1 FUN_LL_FEATURE_LE_ENCRYPTION
+0x2 FUN_LL_FEATURE_CONNECTION_PARAMETERS_REQUEST_PROCEDURE
+0x4 FUN_LL_FEATURE_EXTENDED_REJECT_INDICATION
+0x8 FUN_LL_FEATURE_SLAVE_INITIATED_FEATURES_EXCHANGE
+0x10 FUN_LL_FEATURE_LE_PING
+0x20 FUN_LL_FEATURE_LE_DATA_PACKET_LENGTH_EXTENSION
+0x40 FUN_LL_FEATURE_LL_PRIVACY
+0x80 FUN_LL_FEATURE_EXTENDED_SCANNER_FILTER_POLICIES
+0x100 FUN_LL_FEATURE_LE_2M_PHY
+0x200 FUN_LL_FEATURE_STABLE_MODULATION_INDEX_TRANSMITTER
+0x400 FUN_LL_FEATURE_STABLE_MODULATION_INDEX_RECEIVER
+0x800 FUN_LL_FEATURE_LE_CODED_PHY
+0x1000 FUN_LL_FEATURE_LE_EXTENDED_ADVERTISING
+0x2000 FUN_LL_FEATURE_LE_PERIODIC_ADVERTISING
+0x4000 FUN_LL_FEATURE_CHANNEL_SELECTION_ALGORITHM
+0x8000 FUN_LL_FEATURE_LE_POWER_CLASS_1
+0x10000 FUN_LL_FEATURE_MINIMUM_NUMBER_OF_USED_CHANNELS_PROCEDURE
+)
+
+(//bit of mem_le_tx_phys and mem_le_rx_phys
+0x00 BIT_LE_1M_PHY
+0x01 BIT_LE_2M_PHY
+0x02 BIT_LE_CODED_PHY
+
+0x02 BIT_LE_CODED_PHY_S2
+0x07 BIT_LE_CODED_PHY_S8
+)
+
+(//map of mem_le_tx_phys and mem_le_rx_phys
+0x01 FUN_TX_LL_1M_PHY
+0x02 FUN_TX_LL_2M_PHY
+0x04 FUN_TX_LL_CODED_PHY
+
+0x01 FUN_RX_LL_1M_PHY
+0x02 FUN_RX_LL_2M_PHY
+0x04 FUN_RX_LL_CODED_PHY
+)
+
Index: format/bt.format
===================================================================
--- /branch/usb/usb_public_base/format/bt.format	(revision 0)
+++ /branch/usb/usb_public_base/format/bt.format	(working copy)
@@ -0,0 +1,692 @@
+
+	width = 32
+	const length = 12000
+
+	/* ========= memory ============== */
+memalloc(
+ 1 mem_le_adv_transmit
+1 mem_le_adv_waitcnt
+1 mem_le_adv_rcv
+1 mem_le_req_rcv
+1 mem_le_scanrsp_rcv
+1 mem_le_conn_rcv
+
+1 mem_current_context
+1 mem_le_ch_mapped
+1 mem_last_freq
+1 mem_rssi
+2 mem_context_ptr
+2 mem_rx_window
+
+
+/* lpo related */
+1 mem_lpm_adjust
+6 mem_sync_clke
+1 mem_lpm_current_mult
+4 mem_gpio_wakeup_low
+4 mem_gpio_wakeup_high
+
+
+4 mem_clkn_bt
+4 mem_clke_bt
+4 mem_dpll_clkn
+
+2 mem_slot_offset
+
+
+1 mem_select_list_item
+0 mem_temp_reconn_record
+1 mem_record_bt_mode
+2 mem_list_item_ptr
+
+1 mem_rssi_hex
+
+
+2 mem_param_tx_setup
+2 mem_param_rf_setup
+2 mem_param_conn_access
+2 mem_param_clke_cal
+2 mem_param_pll_setup
+2 mem_param_rx_setup
+2 mem_param_dpll_start_delay
+2 mem_param_rt_rthalfslot
+2 mem_param_clke_cal_le_1m
+2 mem_param_clke_cal_le_2m
+2 mem_param_clke_cal_le_coded
+
+)
+
+memalloc test (
+/* test related */
+2 mem_tst_pktcnt_sync
+2 mem_tst_pktcnt_hec
+2 mem_tst_pktcnt_crc
+2 mem_tst_pktcnt_dmh
+3 mem_tmp_buffer_head
+80 mem_tmp_buffer
+
+1 mem_tester_emulate
+0 mem_temp_payload
+1 test_mode_scenario
+1 test_mode_hopping_mode
+1 test_mode_tx_freq
+1 test_mode_rx_freq
+1 test_mode_power_mode
+1 test_mode_poll_period
+1 test_mode_packet_type
+2 test_mode_data_length
+1 mem_test_mode_old_debug_config
+1 mem_tester_cnt
+
+)
+
+
+xmemalloc(
+/* patch enable 0x4000-0x403f  */
+
+1 mem_patch00
+1 mem_patch01
+1 mem_patch02
+1 mem_patch03
+1 mem_patch04
+1 mem_patch05
+1 mem_patch06
+1 mem_patch07
+1 mem_patch08
+1 mem_patch09
+1 mem_patch0a
+1 mem_patch0b
+1 mem_patch0c
+1 mem_patch0d
+1 mem_patch0e
+1 mem_patch0f
+1 mem_patch10
+1 mem_patch11
+1 mem_patch12
+1 mem_patch13
+1 mem_patch14
+1 mem_patch15
+1 mem_patch16
+1 mem_patch17
+1 mem_patch18
+1 mem_patch19
+1 mem_patch1a
+1 mem_patch1b
+1 mem_patch1c
+1 mem_patch1d
+1 mem_patch1e
+1 mem_patch1f
+1 mem_patch20
+1 mem_patch21
+1 mem_patch22
+1 mem_patch23
+1 mem_patch24
+1 mem_patch25
+1 mem_patch26
+1 mem_patch27
+1 mem_patch28
+1 mem_patch29
+1 mem_patch2a
+1 mem_patch2b
+1 mem_patch2c
+1 mem_patch2d
+1 mem_patch2e
+1 mem_patch2f
+1 mem_patch30
+1 mem_patch31
+1 mem_patch32
+1 mem_patch33
+1 mem_patch34
+1 mem_patch35
+1 mem_patch36
+1 mem_patch37
+1 mem_patch38
+1 mem_patch39
+1 mem_patch3a
+1 mem_patch3b
+1 mem_patch3c
+1 mem_patch3d
+1 mem_patch3e
+1 mem_patch3f
+
+	/* 3 device contexts  */
+83 mem_context
+1 mem_current_amaddr
+1 mem_lpm_mode
+1 mem_device_option
+4 mem_last_clkn
+
+	/* parameters */
+1 mem_fcomp_div
+2 mem_rx_window_sniff
+2 mem_rf_init_ptr
+
+
+1 mem_rf_rccal
+1 mem_handle_num
+
+
+	/* lpm related */
+2 mem_chip_functions
+2 mem_lpm_wake_lock
+2 mem_lpm_interval
+1 mem_lpm_overhead
+1 mem_lpm_hibernate_switch
+1 mem_sniff_unint_lost
+4 mem_sleep_counter   
+4 mem_sleep_counter_all
+6 mem_sleep_clkn
+3 mem_sniff_rcv
+3 mem_sniff_lost
+3 mem_clks_per_lpo
+
+1 mem_lpm_mult
+1 mem_lpm_mult_timeout
+1 mem_lpm_mult_cnt
+
+/* 8139-813b lpm_ctrl[31:12] */
+0 mem_lpm_config				
+1 mem_lpm_xtal_ib
+1 mem_lpm_ctrim
+1 mem_lpm_padding
+
+1 mem_lpm_xtalcnt
+1 mem_lpm_buckcnt
+1 mem_lpm_ldocnt
+1 mem_lpm_isogate
+1 mem_lpm_isogate_final
+
+0 mem_lpm_ctrl3
+1 mem_lpm_ctrl3_app_vsel
+1 mem_lpm_ctrl3_aon_vsel
+1 mem_lpm_ctrl3_core_byp
+1 mem_lpm_ctrl3_core_vsel
+
+13 mem_saved_gpio	 
+3 mem_saved_gsel
+8 mem_saved_mark
+1 mem_saved_spidctrl
+2 mem_patch_ptr
+2 mem_patch_len
+
+32 mem_timers
+
+
+/* HCI */
+1 mem_hci_cmd
+1 mem_hci_conn_handle
+3 mem_hci_plap
+1 mem_hci_puap
+2 mem_hci_pnap
+
+
+1 mem_loadcode_times
+
+
+1 mem_tx_power
+1 mem_modem_rssi
+1 mem_gain_fix
+3 mem_gain_table
+1 mem_gain_second_agc_en
+1 mem_system_clk
+
+ifdef DEBUG_RF_INIT
+1 mem_rf_init_data
+endif
+1 mem_xtal_freq
+)
+
+(//mem_system_clk
+12 SYSTEM_CLK_12M
+24 SYSTEM_CLK_24M
+)
+
+(//bluetooth tx power
+0x00 TX_POWER_0DB
+0x03 TX_POWER_3DB
+0x05 TX_POWER_5DB
+0x06 TX_POWER_6DB
+0x07 TX_POWER_7DB
+0x0a TX_POWER_10DB
+
+0x83 TX_POWER_F3DB
+0x85 TX_POWER_F5DB
+0x94 TX_POWER_F20DB
+0x9e TX_POWER_F30DB
+)
+
+
+	/* context */
+(
+0x01 coffset_mode
+0x02 coffset_tsniff
+0x04 coffset_sniff_anchor
+0x08 coffset_clk_offset
+0x0e coffset_rx_window
+0x10 coffset_plap
+0x16 coffset_conn_handle
+0x17 coffset_arq
+	/* 3.0 only */
+	
+	/* le only */
+0x18 coffset_le_ch
+0x19 coffset_le_hop
+0x1a coffset_le_event_cnt
+0x1c coffset_le_supervision_timer
+0x20 coffset_le_instant
+0x22 coffset_le_channels
+0x23 coffset_le_op
+0x24 coffset_le_access
+0x28 coffset_le_crcinit
+0x2b coffset_le_window_size
+0x2c coffset_le_slave_latency
+0x2e coffset_le_slave_superto
+0x30 coffset_le_channel_map
+0x35 coffset_le_rx_phy
+0x36 coffset_le_tx_phy
+0x37 coffset_le_new_map
+0x37 coffset_le_new_m2s_phy
+0x38 coffset_le_new_s2m_phy
+0x37 coffest_le_new_transmitwindowsize
+0x38 coffest_le_new_transmitwindowoffset
+0x3a coffest_le_new_conninterval
+0x3c coffest_le_new_connslavelatency
+0x3e coffest_le_new_connsupervisiontimeout
+0x40 coffset_le_sk
+0x50 coffset_le_peer_sca
+0x53 coffset_le_transmit_window
+	
+83 context_size
+1 context_num
+)
+
+(
+0 lpm_flag_wake
+1 lpm_flag_loadcode
+)
+
+/* ========= parameters ============== */
+(
+0x0a00 param_snooze_setup_orig
+0x5353 param_snooze_ahead_orig
+
+/* 24Mhz clock setting */
+ifdef CLK24M
+0x1c86 param_tx_setup
+0x0c00 param_rf_setup
+0x0c00 param_conn_access 
+0x1a00 param_rx_setup
+0x0776 param_clke_cal
+0x0a00 param_pll_setup
+4000 param_dpll_start_delay
+7500 param_halfclk
+60084 param_halfclk_neg
+-60084 param_halfclk_neg1
+else
+/* 12Mhz clock setting */
+0x0e43 param_tx_setup
+0x0600 param_rf_setup
+0x0600 param_conn_access 
+0x03bb param_clke_cal
+0x0500 param_pll_setup		// 120 is minimum
+0x0d00 param_rx_setup	// 114us before sync
+2000 param_dpll_start_delay
+3750 param_rt_rthalfslot
+
+480 param_clke_cal_le_1m	//preamble(1B) & access address(4B) time (1+4)*8*1 * 12
+288 	param_clke_cal_le_2m	//preamble(2B) & access address(4B) time (1+4)*8*1 * 12
+282 param_clke_cal_le_coded	//preamble(80us) & access address(256us)-312.5us(0.5slot)
+endif
+
+110 param_lpm_fix
+10 param_lpo_extra
+200 param_lpm_adjmax
+
+ifdef SIM
+20 param_hibernate_clks
+3 param_chgpump_delay
+else
+-1 param_hibernate_clks
+3000 param_chgpump_delay
+endif
+
+
+0x000a04 param_lmp_version
+0x12e9 param_lmp_subversion
+0x0012 param_tisw
+0x0012 param_tpsw
+0x1000 param_tisi
+0x0800 param_tpsi
+39 param_fcomp_div
+2 param_fcomp_mul
+
+)
+
+
+/* ========== flag[6] =============== */
+(
+0        always        /* always 1 */
+1        true          /* set/rstn by verify,compare,icompare (true) */
+2        positive      /* set/rstn by all alu operations (opcode = 0x03,0x13,0x0f,0x1f), if alu output >= 0 */
+3        timeout       /* read only, the timeout from timers */
+5        zero          /* set/rstn by all alu operations (opcode = 0x03,0x13,0x0f,0x1f), if alu output == 0 */
+6        crc_failed    /* level, cleared by hop_start */
+7        enable_white  /* outside mux decide whether to load bt_clk or response_X */
+8        enable_parity /* level */
+9        enable_crc    /* level */
+10       enable_hec    /* level */
+11       decode_fec1   /* level */
+12       decode_fec2   /* level */
+13       decode_fec0   /* level */
+14       encrypt       /* level */
+15       crc16       /* for caculate ccitt crc16 */
+16       swfine	/* =0 stop_watch count based on oneslot =1 on 1 clock */
+20       rqst_freq    /* pulse, to start calculating frequency */
+21       recalc        /* pulse, to recalculate the fhs_parity */
+22       init_encrypt  /* pulse, issued to initialize encrption */
+23       mhalfbnd    /* half slot boundary of clke_rt, or when clke_bt[0] toggles */
+24       sync          /* sync found as a result of correlation,set/rstn by correlate opcode */
+25       user10    /* user10 */
+26       kc_p_activate  /* pulse to recalc the kc_p */
+27       encode_fec1   /* level */
+28       encode_fec2   /* level */
+29       encode_fec0   /* level */
+30       packet_end    /* pulse */
+32       is_tx         /* level */
+33       is_rx         /* level */
+34       halfslot     /* pulse, read only, when clkn_bt[0] toggles */
+35       oneslot      /* pulse, read only, when clkn_bt[1] toggles */
+36       mslotbnd     /* pulse, read only, when clke_bt[1] toggles */
+37       expire       /* level, read only, when selected clock source exceed timeup value */
+38       meet         /* level, read only, when selected clock source meet timeup value */
+39       tx_clear     /* level, read only, indicate tx pipe is cleared */
+40       user         /* user0 */
+41       master        /* user1 */
+42       slave2         /* user2 */
+43       wake           /* user3 */
+44       user2        /* user4 */
+45       match         /* user5 */
+46       attempt        /* user6 */
+47       user3          /* user7 */
+48       clknt         /* user8 */
+49	   user7 	/* user9 */
+50       synchronize   /* synchronize lpo and regular version of the clock */
+51       lpo_edge  /* read only, 3 clocks after risling edge of lpo clock */
+52       blank         /* C0 only, means pdata == 0 */
+53       modone          /* set divide operation is done */
+55       aes_ready	/* set when aes is ok */
+56       encode_fec3   /* level */
+57       dewhiten_code_calc   /* dewhiten code calculate */
+58       lr_s2en       /* long range s2 enable */
+60	   ble_coded_info	//1:s2 0:s8
+63       never         /* read only, always 0 */
+)
+
+default flag = always
+
+/* ========== reg[6] =============== */
+(
+0        mark   /* for keeping strobes, more permanent */
+1        type   /* save and verify during rx */     /* rw */
+2        temp   /* general purpose register, 64 bits */
+3        contu  /* contr uart */
+3	 contru	/*contr uart*/
+3	 contwu	/*contw uart*/
+4        am_addr      /* verify during rx, read and send during tx */ /* ro */
+5        contw        /* last mem_addr during write */
+6        contr        /* last mem_addr during read */
+7        queue    /* the index of qset*,qisolate* commands, ie, if queue = 3, qset/qisolate operate on bit3 */
+8        debug    /* can be wired out for observation */
+9        access   /* the 72 bit access word */
+10       contus   /* contw uart */
+11       timeup        /* when does certain counter expire */
+12       pwindow       /* bit 71-61 of pdata; because on rx, bits shifts in from 71 down */
+13       fhs_parity    /* re-gernated based on bt_adr( {nap,uap,lap} ) when recalc flag is pulsed */
+14       white_init    /* init value of the whitening */
+15       crc24_init        /* init crc24 lfsr, 24 bits */
+16       contue    /* set interrupts, 40 bits */
+17       rega          /* general purpose register, 32 bits */
+18       regb          /* general purpose register, 32 bits */
+19       regc          /* general purpose register, 17 bits */
+20       regab         /* concat of {rega,regb}, thus 64 bits */
+21       radio_ctrl   /* radio i/f direct i/o ctrl, check following "radio_ctrl" section */
+
+23       freq_index   /* 7 bit read only */
+24       regd    /* 32 bit regext[1,0] */
+25       clkn              /* {clkn_bt, clkn_rt} */
+26       clke              /* {clke_bt, clke_rt} */
+27       stop_watch		
+28       fhs_misc   /* SR, SP, pscan mode */
+29       fhs_class  /* class field in fhs */
+30       fhs0   /* read only, bit 0-71 of fhs word */
+31       fhs1   /* read only, bit 72-142 of fhs word */
+32       bt_adr /* r/w, the bt_addr to access gen and freq hopping, contain only lap and uap */
+33       bt_clk /* r/w, the bt_clk for freq hopping */
+34       clkn_bt  /* read only, native bluetooth clock, free running 3.2KHz  or controlled by RTHALFSLOT register */
+35       clkn_rt  /* read only, native realtime clock, free running 12MHz, count from 0-3749, or controlled by RTHALFSLOT register */
+36       freq_mode
+37       xin   /* x parameter, read only */
+38       N_tx_slot /* the N factor in equations for Xi,Xp,Xprm,Xprs */
+39 	   auxcnt
+40       clke_bt  /* r/w,  external bluetooth clock , free running 3.2KHz or controlled by RTHALFSLOT register */
+41       clke_rt  /* r/w,  external realtime clock, , free running 12MHz, count from 0-3749, or controlled by RTHALFSLOT register */
+42       branch_addr	/* last branch address */
+43       rege         /* 64bit regext[3,2] */
+44       lap
+45       uap
+46       nap         
+47       regext		/* r/w extended 12x32bit registers,  indexed by regext_index */
+48       alarm             /* r/w, lpo wake up time, this is also how lpo and current clock keep sync */
+49       lpo_time          /* read only, this is the value to be copied back to clkn/clke after wakeup */
+50       kc_ls             /* secret key,                71: 0 */
+51       kc_ms             /* secret key,               127:72 */
+52       g1l               /* encryption length                */
+53		mask3ff		/* for mask 0x3ff operation */
+54       aes_ctrl		
+55       regf			/* 64bit regext[5,4] */
+56       regext_index   /* index of regext */
+57	     loopcnt
+58      stack			/* current return address */
+59       stack_ptr		/* stack depth */
+61         pc /* direct goto */
+62       null              /* to nowhere */
+63       pdata /* the shift register */
+)
+default reg = pdata
+
+/* regext_index */
+(
+0 regidx_data
+4 regidx_key
+8 regidx_xor
+12 regidx_result
+)
+/* ========== radio_ctrl========= */
+(
+0 TXGFSK
+1 PSK
+2 PSK3M
+3 RESET
+)
+/* assign BPWR = radio_ctrl[0]; */
+/* assign PARAMP = radio_ctrl[1]; */
+/* assign XTALPU = radio_ctrl[2]; */
+/* assign SYNTHPU = radio_ctrl[3]; */
+/* assign TXPU = radio_ctrl[4]; */
+/* assign RXPU = radio_ctrl[5]; */
+/* assign SLCTRL = radio_ctrl[6]; */
+/* assign XTALSEL_MUX_SEL = radio_ctrl[7] */
+
+
+/* =========== destination[4] ============== */
+(
+0 bucket
+1 rxf
+2 back
+3 mod
+)
+default dest = bucket
+
+/* =========== source[4] ============= */
+(
+1 txf
+3 demod
+)
+default source = 0
+
+
+/* ============== mark ============= */
+(
+5  mark_loopback
+9  mark_context
+13 mark_lpm_mult_enable
+14 mark_usb_first_resp
+15 mark_old_packet
+35 mark_isstr
+36 mark_loadcode
+37 mark_ext_patch
+38 mark_24g
+39 mark_24g_rxmode
+40 mark_eeprom_size
+41 mark_ble_tx_md
+42 mark_ble_rx_md
+43 mark_otp_encrypt
+44 mark_temp
+45 mark_ble_2M
+46 mark_ble_lr_s8
+47 mark_ble_lr
+48 mark_ble_crc_fail
+50 mark_ble_encryption
+51 mark_first_packet
+)
+
+(
+1 reload_type_otp
+2 reload_type_spi
+3 reload_type_iic
+)
+
+
+/* ============== soft timers ============== */
+(
+0 le_adv_interval_timer
+2 le_scan_interval_timer
+9 key_scan_timer
+7 smp_pairing_timer
+11  ui_led_blink  
+
+8 G24_TIMER_NODATA
+13 G24_TIMER_MS_BLANK
+12 G24_TIMER_KB_MUL_BLANK
+14 G24_TIMER_KB_BLANK
+
+1 USB_TIMER_NAK
+15 USB_TIMER_WAKEUP
+)
+
+(
+
+27 hci_cmd_le_create_conn
+29 hci_cmd_le_disconn
+30 hci_cmd_le_att_req
+)
+
+
+
+/* ============== mode ==========*/
+(
+0 mode_le
+1 mode_master
+)
+
+(
+0 state_inconn
+1 state_insniff
+)
+(
+3 op_disconn
+)
+
+
+
+// lpm_write
+(
+1 lpmreg_sel_ctrl
+2 lpmreg_sel_ctrl2
+4 lpmreg_sel_gpiolow
+8 lpmreg_sel_gpiohigh
+16 lpmreg_sel_counter
+32 lpmreg_sel_ctrl3
+)
+
+// lpm_write2
+(
+2 lpmreg2_sel_option
+4 lpmreg2_sel_mpu_s0
+8 lpmreg2_sel_mpu_s1
+)
+
+(
+8 lpmreg_spi_lock_bit
+0x0a lpmreg_uart_lock_bit
+0x0c lpmreg_iic_lock_bit
+0x0d lpmreg_rom_lock_bit
+0x0e lpmreg_ice_mode_bit
+
+0x01 lpmreg_spi_lock
+0x04 lpmreg_uart_lock
+0x10 lpmreg_iic_lock
+0x20 lpmreg_rom_lock
+0x40 lpmreg_ice_mode
+)
+
+//mem_lpm_wake_lock
+(
+0 wake_lock_ble_rx
+1 wake_lock_ble_tx
+
+3 wake_lock_key_press
+4 wake_lock_ble_tx_patch
+5 wake_lock_uart_tx
+6 wake_lock_uart_rx
+7 wake_lock_button
+8 wake_lock_cmd
+9 wake_lock_app
+12 wake_lock_l2cap_tx
+13 wake_lock_l2cap_rx
+14 wake_lock_ipc_c512bt
+15 wake_lock_ipc_bt2c51
+
+)
+
+(//mem_fcomp_div
+0x18 XTAL_24M
+0x08 XTAL_16M
+)
+
+( //verion
+6 BLUETOOTH_CORE_SPECIFICATION_4_0
+7 BLUETOOTH_CORE_SPECIFICATION_4_1
+8 BLUETOOTH_CORE_SPECIFICATION_4_2
+9 BLUETOOTH_CORE_SPECIFICATION_5_0
+10 BLUETOOTH_CORE_SPECIFICATION_5_1
+)
+
+(
+0x050e COMPANY_ID_YICHIP
+)
+
+(
+0x33  REC_3_MODE
+0x34  REC_4_MODE
+0x35  REC_4_MODE_STATIC_ADDRESS
+0x36  REC_4_MODE_RANDOM_RESOLVABLE_PRIVATE_ADDRESS
+0x37  REC_4_MODE_RANDOM_NON_RESOLVABLE_PRIVATE_ADDRESS
+)
+
+(
+0 bt_disabled
+1 ble_disabled
+2 module_disable
+)
+
Index: format/command.format
===================================================================
--- /branch/usb/usb_public_base/format/command.format	(revision 0)
+++ /branch/usb/usb_public_base/format/command.format	(working copy)
@@ -0,0 +1,1379 @@
+
+/* Parse Command:
+TX: take bits from tx fifo, jam it into shift and a destination (rf,bucket)
+RX: take bits from demod,  jam it into shift and a destination (acl,sco,bucket) */
+
+/* Inject Command:
+TX: 0 into shift, send tail of shift into a destination (rf,bucket)
+RX: 0 into shift, send tail of shift into a destination (acl,sco,bucket) */
+
+format
+  ! 15 romdat
+  % d0
+  % d1
+  % d2
+  % d3
+  [8] d0
+  [8] d1
+  [8] d2
+  [8] d3
+end
+
+format
+  ! 15 enable   /* set flag to 1 */
+  % flag
+  [5] opcode
+  [6] 1
+  [6] flag
+  [6] null
+  [9] 0
+end
+ /* High 5 bytes of channel map */
+format
+  ! 15 pulse   /* set flag to 1 */
+  % flag
+  [5] opcode
+  [6] 1
+  [6] flag
+  [6] null
+  [9] 0
+end
+
+format
+  ! 15 disable   /* set flag to 0 */
+  % flag
+  [5] opcode
+  [6] 2
+  [6] flag
+  [6] null
+  [9] 0
+end
+
+format
+  ! 15 set0  /* set selected bit of reg to 0 */
+  % immediate
+  % reg
+  [5] opcode
+  [6] 9
+  [6] never
+  [6] reg
+  [9] immediate
+end
+
+format
+  ! 15 set1  /* set selected bit of reg to 1 */
+  % immediate
+  % reg
+  [5] opcode
+  [6] 9          /* alu op demux */
+  [6] always
+  [6] reg
+  [9] immediate
+end
+
+format
+  ! 15 setflag  /* set selected bit of the reg to the polarity of the flag */
+  % flag
+  % immediate
+  % reg
+  [5] opcode
+  [6] 9
+  [6] flag
+  [6] reg
+  [9] immediate
+end
+
+format
+  ! 15 nsetflag  /* set the selected bit of the reg to the opposite polarity of the flag */
+  % flag
+  % immediate
+  % reg
+  [5] opcode
+  [6] 0x29
+  [6] flag
+  [6] reg
+  [9] immediate
+end
+
+format
+  ! 15 setflip    /* invert the selected bit of the reg */
+  % immediate
+  % reg
+  [5] opcode
+  [6] 10            /* this is alu op */
+  [6] always
+  [6] reg
+  [9] immediate
+end
+
+format
+  ! 0x1f qset1      /* demux the lowest 4 bit of queue and OR it with regr into regw */
+  % reg             /* in short, set the bit in reg indexed by queue to 1 */
+  [5] opcode
+  [6] 9
+  [6] always
+  [6] reg
+  [9] 0
+end
+  
+format
+  ! 0x1f qset0      /* demux the lowest 4 bit of queue and AND it with regr into regw */
+  % reg             /* in short, set the bit in reg indexed by queue to 0 */
+  [5] opcode
+  [6] 9
+  [6] never
+  [6] reg
+  [9] 0
+end
+
+format 
+  ! 0x1f qsetflag   /* set the bit in reg index by queue to same as flag */
+  % flag
+  % reg
+  [5] opcode
+  [6] 9
+  [6] flag
+  [6] reg
+  [9] 0
+end
+
+format 
+  ! 0x1f nqsetflag   /* set the bit in the reg index by queue to opposite of flag */
+  % flag
+  % reg
+  [5] opcode
+  [6] 0x29
+  [6] flag
+  [6] reg
+  [9] 0
+end
+
+format
+  ! 0x1f qsetflip      /* flip the bit in reg index by queue */
+  % reg
+  [5] opcode
+  [6] 10
+  [6] always
+  [6] reg
+  [9] 0
+end
+
+format
+  ! 1 parse       /* take bits out of source (sco_tx,tx_buffer,rx-elas) into pdata and dest (sco_rx,rx_fifo,tx-elas) */
+  % source
+  % dest
+  % immediate
+  [5] opcode
+  [4] source      /* voice, data, demod */
+  [2] 0
+  [6] 0    
+  [2] 0           /* parse or inject */ 
+  [4] dest        /* acl, sco, mod, bucket */
+  [9] immediate   /* number of bits to parse off */
+end
+
+format
+  ! 1 inject      /* shift data from pdata into destination (tx-elas,rx_fifo,sco_rx) */
+  % destination
+  % immediate
+  [5] opcode
+  [4] 0
+  [2] 0
+  [6] 1
+  [2] 0
+  [4] destination /* acl,sco,mod,bucket */
+  [9] immediate   /* number of bits to be injected */
+end
+
+format
+  ! 1 iinject
+  % destination
+  % regr
+  [5] opcode
+  [6] regr       /* contain the number of bits to inject */
+  [6] 3
+  [2] 0
+  [4] destination /* acl,sco,mod,bucket */
+  [9] 0 
+end
+
+format
+  ! 1 stuff  /* automatic parse, stuff_counter decrement on every bit until hits zero */
+  % source
+  % destination
+  [5] opcode
+  [4] source
+  [2] 0
+  [6] 2
+  [2] 0
+  [4] destination
+  [9] 0
+end
+
+format    /* force immediate value into registers */
+  ! 3 force
+  % immediate
+  % regw
+  [5] opcode
+  [6] 0
+  [6] 0    /* alu operation force */
+  [6] regw  /* destination register */
+  [9] immediate
+end
+
+format    /* force whatever is on shift_reg to regsiters */
+  ! 0x13 iforce
+  % regw
+  [5] opcode
+  [6] 0
+  [6] 0    /* alu operation force */
+  [6] regw  /* destination register */
+  [9] 0
+end
+
+format    /* force immediate value into registers */
+  ! 3 increase
+  % immediate
+  % reg
+  [5] opcode
+  [6] reg
+  [6] 1    /* alu operation add */
+  [6] reg
+  [9] immediate
+end
+
+format
+  ! 3 pincrease
+  % immediate
+  [5] opcode
+  [6] -1  /* pdata */
+  [6] 1   /* alu add */
+  [6] -1  /* back to pdata */
+  [9] immediate
+end
+
+format    /* force immediate value into registers */
+  ! 3 and_into
+  % immediate
+  % reg
+  [5] opcode
+  [6] reg
+  [6] 2    /* alu operation and into */
+  [6] reg
+  [9] immediate
+end
+
+format
+  ! 3 and
+  % regr
+  % immediate
+  % regw
+  [5] opcode
+  [6] regr
+  [6] 2    /* alu operation and into */
+  [6] regw
+  [9] immediate
+end
+  
+format
+  ! 0x13 iand    /* pdata & regr -> regw */
+  % regr
+  % regw
+  [5] opcode
+  [6] regr
+  [6] 2    /* alu operation and into */
+  [6] regw
+  [9] 0
+end
+  
+
+format    /* and whatever is in shiftreg with reg */
+  ! 0x13 iand_into
+  % reg
+  [5] opcode
+  [6] reg
+  [6] 2    /* alu operation and into */
+  [6] reg
+  [9] 0
+end
+
+format
+  ! 3 or_into
+  % immediate
+  % reg
+  [5] opcode
+  [6] reg
+  [6] 3    /* alu operation or into */
+  [6] reg
+  [9] immediate
+end
+
+format
+  ! 3 or
+  % regr
+  % immediate
+  % regw
+  [5] opcode
+  [6] regr
+  [6] 3    /* alu operation or into */
+  [6] regw
+  [9] immediate
+end
+
+format
+  ! 0x13 ior
+  % regr
+  % regw
+  [5] opcode
+  [6] regr
+  [6] 3    /* alu operation or into */
+  [6] regw
+  [9] 0
+end
+
+format
+  ! 0x13 ior_into
+  % reg
+  [5] opcode
+  [6] reg
+  [6] 3    /* alu operation or into */
+  [6] reg
+  [9] 0
+end
+
+format
+  ! 3 skip_to   /* jump to location stored in reg */
+  % reg
+  [5] opcode
+  [6] reg
+  [6] 4   /* alu operation copy */
+  [6] rom_addr
+  [9] 0
+end
+
+format
+  ! 3 copy
+  % regr
+  % regw
+  [5] opcode
+  [6] regr
+  [6] 4   /* alu operation copy */
+  [6] regw
+  [9] 0
+end
+
+format
+  ! 3 deposit   /* copy the register content thru alu to shift register, not prealigned like preload */
+  % reg
+  [5] opcode
+  [6] reg
+  [6] 4   /* alu operation copy */
+  [6] -1  /* pdata */
+  [9] 0
+end
+
+format
+  ! 3 icopy     /* copy the shift register lsb content directly to register, not aligned */
+  % regw
+  [5] opcode
+  [6] -1  /* pdata */
+  [6]  4  /* alu copy */
+  [6] regw
+  [9] 0
+end
+
+format
+  ! 3 add
+  % regr
+  % immediate
+  % regw
+  [5] opcode
+  [6] regr
+  [6] 1
+  [6] regw
+  [9] immediate
+end
+
+format
+  ! 0x13 iadd       /* regr + pdata -> regw */
+  % regr
+  % regw
+  [5] opcode
+  [6] regr
+  [6] 1
+  [6] regw
+  [9] 0
+end
+
+format
+  ! 3 sub          /* immediate - regr -> regw */
+  % regr
+  % immediate
+  % regw
+  [5] opcode
+  [6] regr
+  [6] 12
+  [6] regw
+  [9] immediate
+end
+
+format
+  ! 0x13 isub       /* pdata - regr -> regw */
+  % regr
+  % regw
+  [5] opcode
+  [6] regr
+  [6] 12
+  [6] regw
+  [9] 0
+end
+
+
+format
+  ! 3 flip
+  % immediate
+  % reg
+  [5] opcode
+  [6] reg
+  [6] 5
+  [6] reg
+  [9] immediate
+end
+  
+format
+  ! 0x13 iflip  /* use shift register as immediate to do xor */
+  % regr
+  % regw
+  [5] opcode
+  [6] regr
+  [6] 5
+  [6] regw
+  [9] 0
+end
+  
+format
+  ! 3 xor
+  % regr
+  % immediate
+  % regw
+  [5] opcode
+  [6] regr
+  [6] 5
+  [6] regw
+  [9] immediate
+end
+
+format
+  ! 3 xor_into
+  % immediate
+  % reg
+  [5] opcode
+  [6] reg
+  [6] 5
+  [6] reg
+  [9] immediate
+end
+  
+format
+  ! 0x13 ixor  /* pdata xor regr and store result in regw */
+  % regr
+  % regw
+  [5] opcode
+  [6] regr
+  [6] 5
+  [6] regw
+  [9] 0
+end
+  
+format
+  ! 3 invert
+  % regr
+  % regw
+  [5] opcode
+  [6] regr
+  [6] 8
+  [6] regw
+  [9] 0
+end
+
+format
+  ! 3 pinvert    /* invert pdata into itself */
+  [5] opcode
+  [6] -1
+  [6] 8
+  [6] -1
+  [9] 0
+end
+
+format
+  ! 3 div                 /* regr div immediate div */
+  % reg
+  % immediate
+  [5] opcode
+  [6] reg
+  [6] 13                   /* generate diven pulse to div */
+  [6] null
+  [9] immediate
+end
+
+format
+  ! 0x13 idiv           /* pdata div regr data ready at most after 41 nops */
+  % reg
+  [5] opcode
+  [6] reg
+  [6] 13                   /* generate diven pulse to div */
+  [6] null
+  [9] 0
+end
+
+format
+  ! 0x13 idiv48           /* pdata div regr data 48bit */
+  % reg
+  [5] opcode
+  [6] reg
+  [6] 17                   /* generate diven pulse to div */
+  [6] null
+  [9] 0
+end
+
+format
+  ! 3 remainder            /* harvest div remainder */
+  % regw
+  [5] opcode
+  [6] 0
+  [6] 14
+  [6] regw
+  [9] 0
+end
+
+format
+  ! 3 quotient             /* harvest div quotient */
+  % regw
+  [5] opcode
+  [6] 0
+  [6] 15
+  [6] regw
+  [9] 0
+end
+
+format
+  ! 3 rshift
+  % regr
+  % regw
+  [5] opcode
+  [6] regr
+  [6] 6
+  [6] regw
+  [9] 0
+end
+
+format
+  ! 3 rshift2
+  % regr
+  % regw
+  [5] opcode
+  [6] regr
+  [6] 22
+  [6] regw
+  [9] 0
+end
+
+format
+  ! 3 rshift3
+  % regr
+  % regw
+  [5] opcode
+  [6] regr
+  [6] 18
+  [6] regw
+  [9] 0
+end
+
+format
+  ! 3 rshift4
+  % regr
+  % regw
+  [5] opcode
+  [6] regr
+  [6] 35
+  [6] regw
+  [9] 0
+end
+
+format
+  ! 3 rshift8
+  % regr
+  % regw
+  [5] opcode
+  [6] regr
+  [6] 25
+  [6] regw
+  [9] 0
+end
+
+format
+  ! 3 rshift16
+  % regr
+  % regw
+  [5] opcode
+  [6] regr
+  [6] 34
+  [6] regw
+  [9] 0
+end
+
+format
+  ! 3 rshift32
+  % regr
+  % regw
+  [5] opcode
+  [6] regr
+  [6] 30
+  [6] regw
+  [9] 0
+end
+
+format
+  ! 3 lshift
+  % regr
+  % regw
+  [5] opcode
+  [6] regr
+  [6] 7
+  [6] regw
+  [9] 0
+end
+
+format
+  ! 3 lshift2
+  % regr
+  % regw
+  [5] opcode
+  [6] regr
+  [6] 23
+  [6] regw
+  [9] 0
+end
+
+format
+  ! 3 lshift8
+  % regr
+  % regw
+  [5] opcode
+  [6] regr
+  [6] 26
+  [6] regw
+  [9] 0
+end
+
+  
+format
+  ! 3 lshift3
+  % regr
+  % regw
+  [5] opcode
+  [6] regr
+  [6] 19
+  [6] regw
+  [9] 0
+end
+
+format
+  ! 3 lshift4
+  % regr
+  % regw
+  [5] opcode
+  [6] regr
+  [6] 36
+  [6] regw
+  [9] 0
+end
+  
+
+format
+  ! 3 lshift16
+  % regr
+  % regw
+  [5] opcode
+  [6] regr
+  [6] 32
+  [6] regw
+  [9] 0
+end
+
+format
+  ! 3 random               /* random number into regw */
+  % reg
+  [5] opcode
+  [6] 0
+  [6] 20
+  [6] reg
+  [9] 0
+end
+
+format                     /* bit reverse within a byte */
+  ! 3 reverse
+  % reg
+  % regw
+  [5] opcode
+  [6] reg
+  [6] 27
+  [6] regw
+  [9] 0
+end
+
+format
+  ! 3 priority    /* priority encode reg into regw, lsb is the top priority, ie, priority(8'b00010000) = 4 */
+  % reg
+  % regw
+  [5] opcode
+  [6] reg
+  [6] 21
+  [6] regw
+  [9] 0
+end
+
+format
+  ! 7 setsect   /* set a section of pdata */
+  % section    /* 0 sets 17:0 of pdata with set_data, 1 sets 35:18, 2 sets 53:36, 3 sets 71:54 */
+  % set_data
+  [5] opcode
+  [7] 0
+  [2] section
+  [18] set_data
+end
+
+format
+  ! 10 preload   /* load stuff into pdata according to fhs format, check us.v */
+  % reg
+  [5] opcode
+  [6] reg
+  [6] 0
+  [6] -1
+  [9] 0
+end
+
+format  /* load register with pdata content, according to fhs format, check us.v */
+  ! 10 ialigned   /* all bits are in position */
+  % regw
+  [5] opcode
+  [6] -1
+  [6] 0
+  [6] regw
+  [9] 0
+end
+
+format  /* load register to another according to fhs format */
+  ! 10 aligned
+  % regr
+  % regw
+  [5] opcode
+  [6] regr
+  [6] 0
+  [6] regw
+  [9] 0
+end
+
+format
+  ! 4 branch
+  % addr
+  % flag
+  [5] opcode
+  [6] 1
+  [6] flag
+  [15] addr
+end
+
+format
+  ! 4 call
+  % addr
+  % flag
+  [5] opcode
+  [6] 2
+  [6] flag
+  [15] addr
+end
+
+format
+  ! 4 rtn
+  % flag
+  [5] opcode
+  [6] 3
+  [6] flag
+  [15] 0
+end
+
+format
+  ! 0x0d fetch          /* read from memory, data into pdata, address from immediate then mem_ptr */
+  % num_bytes
+  % addr
+  [5] opcode
+  [6] 63
+  [1] addr
+  [1] 0
+  [4] num_bytes
+  [15] addr
+end
+
+format
+  ! 0x0d fetcht          /* read from memory, data into temp, address from immediate won't increment */
+  % num_bytes
+  % addr
+  [5] opcode
+  [6] 2
+  [1] addr
+  [1] 1
+  [4] num_bytes
+  [15] addr
+end
+
+format
+  ! 0x1d ifetch         /* read from memory, data into pdata, address from regr then mem_ptr */
+  % num_bytes
+  % reg
+  [5] opcode
+  [6] 63
+  [2] 0
+  [4] num_bytes
+  [9] 0
+  [6] reg
+end
+
+format
+  ! 0x1d ifetcht         /* read from memory, data into temp, address from regr won't increment */
+  % num_bytes
+  % reg
+  [5] opcode
+  [6] 2
+  [2] 0
+  [4] num_bytes
+  [9] 0
+  [6] reg
+end
+
+format
+  ! 0x0c store          /* write to memory, data from pdata, address from immediate then mem_ptr */
+  % num_bytes
+  % addr
+  [5] opcode
+  [6] 63
+  [1] addr
+  [1] 0
+  [4] num_bytes
+  [15] addr
+end
+
+format
+  ! 0x0c storet          /* write to memory, data from temp, address from immediate won't increment */
+  % num_bytes
+  % addr
+  [5] opcode
+  [6] 2
+  [1] addr
+  [1] 1
+  [4] num_bytes
+  [15] addr
+end
+
+format
+  ! 0x1c istore        /* write pdata to memory, address from regaddr */
+  % num_bytes
+  % regaddr
+  [5] opcode
+  [6] 63            
+  [2] 0
+  [4] num_bytes
+  [9] 0
+  [6] regaddr
+end
+
+format
+  ! 0x1c istoret        /* write temp to memory, address from regaddr */
+  % num_bytes
+  % regaddr
+  [5] opcode
+  [6] 2            
+  [2] 0
+  [4] num_bytes
+  [9] 0
+  [6] regaddr
+end
+
+format
+  ! 0x0d crc         // read from memory, count from loopcnt, put crc result into pdata 
+  % addr
+  [5] opcode
+  [6] 63
+  [6] 0
+  [15] addr
+end
+
+format
+  ! 0x1d icrc         /* read from memory, address from reg, count from loopcnt, put crc result into pdata */
+  % reg
+  [5] opcode
+  [6] 63
+  [15] 0
+  [6] reg
+end
+
+
+format
+  ! 0x0c storer          /* write reg to memory, address from immediate then mem_ptr */
+  % reg
+  % num_bytes
+  % addr
+  [5] opcode
+  [6] reg               
+  [1] addr
+  [1] 0
+  [4] num_bytes
+  [15] addr
+end
+
+
+format
+  ! 0x1c istorer        /* write regr to memory, address from regaddr */
+  % regr
+  % num_bytes
+  % regaddr
+  [5] opcode
+  [6] regr            
+  [2] 0
+  [4] num_bytes
+  [9] 0
+  [6] regaddr
+end
+
+
+format
+  ! 0x0d fetchr          /* read reg from memory, address from immediate then mem_ptr */
+  % reg
+  % num_bytes
+  % addr
+  [5] opcode
+  [6] reg               
+  [1] addr
+  [1] 0
+  [4] num_bytes
+  [15] addr
+end
+
+format
+  ! 0x1d ifetchr        /* read regr from memory, address from regaddr */
+  % regr
+  % num_bytes
+  % regaddr
+  [5] opcode
+  [6] regr
+  [2] 0
+  [4] num_bytes
+  [9] 0
+  [6] regaddr
+end
+
+
+
+
+format
+  ! 0x0e jam
+  % immediate
+  % addr
+  [5] opcode
+  [3] 0
+  [16] addr
+  [8] immediate
+end
+
+format			/* 0x242... */
+  ! 4 nbranch
+  % addr
+  % flag
+  [5] opcode
+  [1] 1
+  [5] 1
+  [6] flag
+  [15] addr
+end
+
+format
+  ! 4 ncall
+  % addr
+  % flag
+  [5] opcode
+  [1] 1
+  [5] 2
+  [6] flag
+  [15] addr
+end
+
+format
+  ! 4 nrtn
+  % flag
+  [5] opcode
+  [1] 1
+  [5] 3
+  [6] flag
+  [15] 0
+end
+
+format
+  ! 4 nop
+  % addr  /* no-op for addr+2 clocks */
+  [5] opcode
+  [6] 0     
+  [6] 0     /* always */ 
+  [15] addr
+end
+
+format
+  ! 4 clear_stack
+  [5] opcode
+  [6] 4
+  [6] 0    /* always */
+  [15] 0
+end
+
+format
+  ! 6 until
+  % reg
+  % flag
+  [5] opcode
+  [6] reg
+  [6] flag
+  [6] 1
+  [9] 0
+end
+  
+format
+  ! 6 correlate   /* quit if 1. flag is true 2, regr time up 3, found sync,(cond_true) */
+  % reg          /* expire counter to check against */
+  % flag
+  [5] opcode
+  [6] reg
+  [6] flag
+  [6] 2           /* correlate */
+  [9] 0           
+end
+
+format
+  ! 5 compare   /* sets cond flag,  if reg equals immediate */
+  % immediate
+  % reg
+  % mask
+  [5] opcode
+  [6] reg
+  [3] 0
+  [9] mask
+  [9] immediate
+end
+
+format
+  ! 0x15 icompare   /* sets cond flag,  if reg equals pdata */
+  % mask
+  % reg
+  [5] opcode
+  [6] reg
+  [3] 0
+  [9] mask
+  [9] 0
+end
+
+format   /* sets cond. flag, if reg equals LS half of shift reg with MS half of reg being mask */
+  ! 5 iverify
+  % reg
+  [5] opcode
+  [6] reg
+  [3] 2
+  [18] 0
+end
+
+format
+  ! 0x15 qisolate1
+  % reg
+  [5] opcode
+  [6] reg
+  [3] 3
+  [18] -1
+end
+
+format
+  ! 0x15 qisolate0
+  % reg
+  [5] opcode
+  [6] reg
+  [3] 3
+  [18] 0
+end
+
+	/* REVAB bug: cannot access bit above 35 */
+format
+  ! 5 isolate1
+  % addr
+  % reg
+  [5] opcode
+  [6] reg
+  [3] 3
+  [9] -1
+  [9] addr
+end
+
+format
+  ! 5 isolate0
+  % addr
+  % reg
+  [5] opcode
+  [6] reg
+  [3] 3
+  [9] 0
+  [9] addr
+end
+
+format
+  ! 11 setarg
+  % immediate
+  [5] opcode
+  [27] immediate
+end
+
+format
+  ! 0x1b arg
+  % immediate
+  % reg
+  [5] opcode
+  [6] reg
+  [21] immediate
+end
+
+  
+format
+  ! 0 sleep
+  [5] opcode
+  [27] 0
+end
+
+format
+  ! 0 snooze
+  [5] opcode
+  [6] -1
+  [21] 0
+end
+
+format
+  ! 0 revision
+  % rev_num
+  [5] opcode
+  [27] rev_num
+end
+
+format
+  ! 0x18 loop   /* branch when loopcnt is NOT zero, and decrease loopcnt */
+  % addr
+  [5] opcode
+  [4] 4
+  [8] 0
+  [15] addr
+end
+
+format
+  ! 0x18 beq   /* branch when pdata is equal to immediate */
+  % imme
+  % addr
+  [5] opcode
+  [4] 0
+  [8] imme
+  [15] addr
+end
+
+format
+  ! 0x18 bne   /* branch when pdata is NOT equal to immediate */
+  % imme
+  % addr
+  [5] opcode
+  [4] 1
+  [8] imme
+  [15] addr
+end
+
+format
+  ! 0x18 rtneq   /* return when pdata is equal to immediate */
+  % imme
+  [5] opcode
+  [4] 2
+  [8] imme
+  [15] 0
+end
+
+format
+  ! 0x18 rtnne   /* return when pdata is NOT equal to immediate */
+  % imme
+  [5] opcode
+  [4] 3
+  [8] imme
+  [15] 0
+end
+
+format
+  ! 0x18 bbit1   /* branch when pdata's imme bit is 1 */
+  % imme
+  % addr
+  [5] opcode
+  [4] 5
+  [8] imme
+  [15] addr
+end
+
+format
+  ! 0x18 bbit0   /* branch when pdata's imme bit is 0 */
+  % imme
+  % addr
+  [5] opcode
+  [4] 6
+  [8] imme
+  [15] addr
+end
+
+format
+  ! 0x18 rtnbit1   /* return when pdata's imme bit is 0 */
+  % imme
+  [5] opcode
+  [4] 7
+  [8] imme
+  [15] 0
+end
+
+format
+  ! 0x18 rtnbit0   /* return when pdata's imme bit is 0 */
+  % imme
+  [5] opcode
+  [4] 8
+  [8] imme
+  [15] 0
+end
+
+format
+  ! 8	bpatch
+  % imme
+  % addr
+  [5] opcode
+  [4] 9
+  [8] imme
+  [15] addr
+end
+
+format
+  ! 8	bpatchx
+  % imme
+  % addr
+  [5] opcode
+  [4] 14
+  [8] imme
+  [15] addr
+end
+
+format
+  ! 0x18 bmark1   /* branch when mark's imme bit is 1 */
+  % imme
+  % addr
+  [5] opcode
+  [4] 10
+  [8] imme
+  [15] addr
+end
+
+format
+  ! 0x18 bmark0   /* branch when mark's imme bit is 0 */
+  % imme
+  % addr
+  [5] opcode
+  [4] 11
+  [8] imme
+  [15] addr
+end
+
+format
+  ! 0x18 rtnmark1   /* return when mark's imme bit is 0 */
+  % imme
+  [5] opcode
+  [4] 12
+  [8] imme
+  [15] 0
+end
+
+format
+  ! 0x18 rtnmark0   /* return when mark's imme bit is 0 */
+  % imme
+  [5] opcode
+  [4] 13
+  [8] imme
+  [15] 0
+end
+
+format
+  ! 3 mul32                  /* immediate mult regr */ 
+  % regr
+  % immediate                                  
+  % regw
+  [5] opcode
+  [6] regr
+  [6] 31           
+  [6] regw
+  [9] immediate
+end
+
+format
+  ! 0x13 imul32           /* pdata mult regr 32x32=64bit */  
+  % regr
+  % regw
+  [5] opcode
+  [6] regr
+  [6] 31                   
+  [6] regw
+  [9] 0
+end
+
+format
+  ! 0x13 imults           /* pdata mult regr 32x32=64bit, signed */  
+  % regr
+  % regw
+  [5] opcode
+  [6] regr
+  [6] 16
+  [6] regw
+  [9] 0
+end
+
+
+format
+  ! 3 byteswap
+  % regr
+  % regw
+  [5] opcode
+  [6] regr
+  [6] 33
+  [6] regw
+  [9] 0
+end
+
+format
+  ! 3 shasx          /* SHA256 Sx operation, immediate is Sx */
+  % regr
+  % immediate
+  % regw
+  [5] opcode
+  [6] regr
+  [6] 28
+  [6] regw
+  [9] immediate
+end
+
+
+format
+  ! 0x13 regexrot 	/* regext[0] <- regext[7], regext[1] <- regext[0], regext[2] <- regext[1] ... */
+  [5] opcode
+  [6] 0
+  [6] 29
+  [6] null
+  [9] 0
+end
+
Index: format/debug.format
===================================================================
--- /branch/usb/usb_public_base/format/debug.format	(revision 0)
+++ /branch/usb/usb_public_base/format/debug.format	(working copy)
@@ -0,0 +1,6 @@
+xmemalloc(
+
+1 mem_rf_debug_rx_gpio
+1 mem_rf_debug_tx_gpio
+)
+
Index: format/fcc_auth.format
===================================================================
--- /branch/usb/usb_public_base/format/fcc_auth.format	(revision 0)
+++ /branch/usb/usb_public_base/format/fcc_auth.format	(working copy)
@@ -0,0 +1,80 @@
+
+
+
+
+/*
+为了不额外占用memalloc的空间，所以与mem_input_store复用
+*/
+amemalloc mem_input_store(
+	0 mem_fcc_param_new	
+	1 mem_fcc_ch_new   
+	1 mem_fcc_mod_new 
+	1 mem_fcc_txrx_new 
+	1 mem_fcc_btble_new  
+	1 mem_fcc_data_new  
+	1 mem_fcc_data_length_new    
+	1 mem_fcc_hop_new    
+	1 mem_fcc_tx_power_new
+
+	0 mem_fcc_param
+	1 mem_fcc_ch                    /*frequence set: default:0x00(2402Mhz); frequence = 2402MHz + mem_fcc_ch*/
+	1 mem_fcc_mod                 /*data rate:default:0x01(1Mbps) */
+	1 mem_fcc_txrx                  /*tx rx mode select:tx: 01; rx:02*/
+	1 mem_fcc_btble                /*BT and BLE select: BT3.0:01; BLE:02*/
+	1 mem_fcc_data                 /*carrier: 0x22; data: 0*/
+	1 mem_fcc_data_length     /*DH1:0x19; DH3:0x78; DH5:0xf0*/
+	1 mem_fcc_hop                  /*fixed freq:0x02; hop freq:0x01*/
+	1 mem_fcc_tx_power         /*同mem_tx_power*/
+
+	2 mem_fcc_config_cb
+
+)
+
+
+(
+0x0b00 mem_pn9  
+1022 mem_pn9_size
+)
+
+(
+8 FCC_PARA_LEN
+)
+
+//data rate
+(
+0x01 FCC_DATA_RATE_1Mbps
+)
+//tx rx mode select
+(
+0x01 FCC_TX
+0x02 FCC_RX
+)
+//BT or BLE
+(
+0x02 FCC_BLE_MODE
+0x01 FCC_BT_MODE
+)
+
+//carrier or data
+(
+0x22 FCC_CARRIER
+0 FCC_DATA
+)
+
+//data length
+(
+0x19 FCC_LEN_DH1
+0x78 FCC_LEN_DH3
+0xf0 FCC_LEN_DH5
+)
+
+//fixed or hop frequence
+(
+0x02 FCC_FIXED_FREQ
+0x01 FCC_HOP_FREQ
+)
+(
+0x890d core_tx_test_mode
+)
+
+
Index: format/g24_protocol_stack/24g.format
===================================================================
--- /branch/usb/usb_public_base/format/g24_protocol_stack/24g.format	(revision 0)
+++ /branch/usb/usb_public_base/format/g24_protocol_stack/24g.format	(working copy)
@@ -0,0 +1,67 @@
+
+xmemalloc g24(
+6 mem_24g_lap
+34 mem_24g_rxbuf
+32 mem_24g_txbuf
+36 mem_24g_txpayload
+32 mem_24g_rxpayload
+1 mem_24g_rxdata_length
+1 mem_24g_pid
+1 mem_24g_no_ack
+3 mem_24g_sta_crc
+3 mem_24g_last_crc
+1 mem_24g_sta_pid
+1 mem_24g_last_pid
+1 mem_24g_datalen
+1 mem_24g_data_type
+1 mem_24g_txlen
+2 mem_24g_rx_window
+1 mem_24g_ch
+1 mem_24g_current_ch_number
+4 mem_24g_addr
+4 mem_24g_ch_map1
+4 mem_24g_ch_map2
+4 mem_24g_ch_map3
+4 mem_24g_ch_map4
+4 mem_24g_tx_btclk
+1 mem_24g_interval
+1 mem_24g_interval_min
+1 mem_24g_interval_max
+2 mem_24g_syncword
+1 mem_24g_syncword_crc8
+1 mem_24g_get_syncword_crc8
+1 mem_24g_pair_switch
+8 mem_24g_enter_hibernate
+
+1 mem_24g_rx_phy
+1 mem_24g_tx_phy
+
+1 mem_24g_ch_map_update
+4 mem_24g_ch_update_map1
+4 mem_24g_ch_update_map2
+4 mem_24g_ch_update_map3
+4 mem_24g_ch_update_map4
+
+1 mem_24g_disable_fec1
+)
+
+
+xmemalloc g24_tx(
+1 mem_rssi_hex_received
+
+)
+
+
+
+(//mem_24g_data_type
+1 TYPE_MS
+2 TYPE_KB
+0x07 bits_data
+//0-2 data type
+3 bit_abort
+4 bit_hop
+5 bit_sync
+//6-7 channel offset
+)
+
+
Index: format/g24_protocol_stack/24g_pair.format
===================================================================
--- /branch/usb/usb_public_base/format/g24_protocol_stack/24g_pair.format	(revision 0)
+++ /branch/usb/usb_public_base/format/g24_protocol_stack/24g_pair.format	(working copy)
@@ -0,0 +1,50 @@
+
+
+xmemalloc g24(
+4 mem_24g_pair_addr
+1 mem_24g_pair_ch
+1 mem_24g_pair_tx_power
+
+)
+
+xmemalloc g24_tx(
+1 mem_24g_pair_sm
+1 mem_24g_pair_no_ack
+2 mem_24g_pair_timeout_init
+2 mem_24g_pair_timeout
+
+)
+
+xmemalloc g24_rx(
+1 mem_24g_device1_bind_step
+1 mem_24g_device2_bind_step
+1 mem_24g_bind_device_status
+8 mem_24g_bind_payload
+
+)
+
+(//mem_24g_pair_sm
+0 STATE_24G_PAIRING_NULL
+1 STATE_24G_PAIRING_1
+2 STATE_24G_PAIRING_2
+3 STATE_24G_PAIRING_3
+4 STATE_24G_PAIRING_4
+0X11 STATE_24G_PAIRING_1_WAITING_ACK
+0X12 STATE_24G_PAIRING_2_WAITING_ACK
+0X13 STATE_24G_PAIRING_3_WAITING_ACK
+0X14 STATE_24G_PAIRING_4_WAITING_ACK
+0XFF STATE_24G_PAIRING_SUCCESS
+)
+
+(
+0x01 DATATYPE_DEVICE1	//mouse
+0x02 DATATYPE_DEVICE2	//keyboard
+0xaa DATATYPE_BIND		//bind step 1
+0x55 DATATYPE_CONFIG	//bind step 2
+0x22 DATATYPE_OK		//bind step 3
+0xff DATATYPE_ATTEMP	//reconn
+)
+
+(
+5 BIND_MODE_CONTINUE
+)
Index: format/g24_protocol_stack/24g_receiver.format
===================================================================
--- /branch/usb/usb_public_base/format/g24_protocol_stack/24g_receiver.format	(revision 0)
+++ /branch/usb/usb_public_base/format/g24_protocol_stack/24g_receiver.format	(working copy)
@@ -0,0 +1,50 @@
+
+
+xmemalloc g24_rx(
+2 mem_cb_24g_receive_process
+2 mem_cb_24g_ackpayload
+2 mem_cb_24g_data_device1
+2 mem_cb_24g_data_device2
+34 mem_24g_rxdata_temp
+1 mem_24g_abort_packet
+4 mem_24g_hop_btclk
+1 mem_24g_hop_interval
+1 mem_24g_pair_mode
+1 mem_24g_ackpayload_enable
+1 mem_24g_hop_packet
+1 mem_24g_mode_switch
+1 mem_24g_nodata_timer_enable
+
+1 mem_24g_mode_init
+1 mem_24g_work_mode
+1 mem_24g_time_slice
+1 mem_24g_self_last_ch
+1 mem_24g_self_ch_number
+1 mem_24g_self_config_ch_once
+1 mem_24g_device1_last_ch
+1 mem_24g_device1_ch_number
+1 mem_24g_device1_config_ch_once
+1 mem_24g_device2_last_ch
+1 mem_24g_device2_ch_number
+1 mem_24g_device2_config_ch_once
+1 mem_24g_led_status
+1 mem_24g_bind_mode_continue
+
+1 mem_tx_power_temp
+
+1 mem_24g_mode_B_S_switch
+1 mem_24g_mode_B_S_switch_init
+2 mem_24g_mode_B_S_switch_cnt
+1 mem_24g_mode_B_S_switch_exit
+1 mem_24g_B_S_time_slice
+1 mem_24g_B_S_mode_switch_disable
+
+1 mem_24g_bind_device_living
+)
+
+
+(
+0 bit_ack_24g
+)
+
+
Index: format/g24_protocol_stack/24g_reconn.format
===================================================================
--- /branch/usb/usb_public_base/format/g24_protocol_stack/24g_reconn.format	(revision 0)
+++ /branch/usb/usb_public_base/format/g24_protocol_stack/24g_reconn.format	(working copy)
@@ -0,0 +1,29 @@
+xmemalloc g24_tx(
+2 mem_24g_reconn_timeout_init
+2 mem_24g_reconn_timeout
+2 mem_24g_reconn_count
+1 mem_24g_reconn_type
+1 mem_24g_fast_conn_enable
+4 mem_24g_fast_conn_addr
+4 mem_24g_receiver_addr
+1 mem_24g_fast_conn_temp_ch
+1 mem_24g_receiver_temp_ch
+1 mem_24g_device_temp_ch
+
+)
+
+xmemalloc g24_rx(
+4 mem_24g_transmitter_addr
+4 mem_24g_device1_addr
+4 mem_24g_device2_addr
+
+)
+
+(//mem_24g_reconn_type
+0 DEFAULT_24G_DEVICE
+1 FAST_CONN_AND_RECEIVER
+2 FAST_CONN_AND_3_0_ADDR
+3 RECEIVER_AND_3_0_ADDR
+4 PAIR_AND_3_0_ADDR
+)
+
Index: format/g24_protocol_stack/24g_rssi.format
===================================================================
--- /branch/usb/usb_public_base/format/g24_protocol_stack/24g_rssi.format	(revision 0)
+++ /branch/usb/usb_public_base/format/g24_protocol_stack/24g_rssi.format	(working copy)
@@ -0,0 +1,40 @@
+
+xmemalloc g24(
+1 mem_rssi_buff_index
+)
+
+
+xmemalloc g24_tx(
+1 mem_rssi_signal_index
+2 mem_rssi_signal_buf_ptr
+
+)
+
+
+xmemalloc g24_rx(
+1 mem_rssi_noise_avg
+1 mem_rssi_noise_index
+
+1 mem_rssi_noise_self_avg
+1 mem_rssi_noise_device1_avg
+1 mem_rssi_noise_device2_avg
+1 mem_rssi_noise_self_index
+1 mem_rssi_noise_device1_index
+1 mem_rssi_noise_device2_index
+
+2 mem_rssi_noise_buffer_ptr
+2 mem_rssi_noise_self_buffer_ptr
+2 mem_rssi_noise_device1_buffer_ptr
+2 mem_rssi_noise_device2_buffer_ptr
+
+)
+
+
+
+(
+0x50 RSSI_THRESH_NOISE
+)
+
+
+
+
Index: format/g24_protocol_stack/24g_transmitter.format
===================================================================
--- /branch/usb/usb_public_base/format/g24_protocol_stack/24g_transmitter.format	(revision 0)
+++ /branch/usb/usb_public_base/format/g24_protocol_stack/24g_transmitter.format	(working copy)
@@ -0,0 +1,64 @@
+
+
+xmemalloc g24_tx(
+2 mem_cb_24g_transmit_data
+2 mem_cb_24g_search_receiver
+2 mem_cb_24g_lpm_before
+
+1 mem_24g_conn_sm
+
+1 mem_24g_ensure
+2 mem_24g_txfail_cnt
+1 mem_24g_attempt_fail_flag
+
+1 mem_24g_retry
+1 mem_24g_abort_pac
+1 mem_24g_max_retry
+4 mem_24g_device_addr
+3 mem_24g_short_sleep_set
+8 mem_24g_long_sleep_set
+4 mem_24g_long_sleep_set1
+
+1 mem_24g_pac_index
+1 mem_24g_transmit_by_interrupt
+2 mem_24g_transmit_by_interrupt_exit_count
+2 mem_24g_transmit_by_interrupt_exit_count_init
+2 mem_24g_long_sleep_param_update_timer_init
+2 mem_24g_long_sleep_param_update_timer
+
+1 mem_24g_fast_hop_count
+)
+
+(
+1 NO_ACK_24G
+0 WITH_ACK_24G
+)
+
+(//mem_24g_conn_sm
+0 STATE_24G_STOP
+0 STATE_24G_START
+1 STATE_24G_PAIR
+2 STATE_24G_RECONN
+)
+
+(//mem_24g_transmit_by_interrupt
+1 G24_TX_TIMER_INT_ENABLE
+0 G24_TX_TIMER_INT_DISABLE
+)
+
+
+(
+1 OFFSET_DATA_TYPE
+2 OFFSET_LR_DATA_TYPE
+)
+
+(
+0x017700 G24_LONG_SLEEP_STEP1	//8ms
+0x36ee80 G24_LONG_SLEEP_STEP2	//300ms
+0x124f80 G24_LONG_SLEEP_STEP3	//100ms
+63500 G24_8MS_INTERVAL_PARAM		//8ms
+12210 G24_4MS_INTERVAL_PARAM
+)
+
+
+
Index: format/g24_protocol_stack/24g_txpower_ctrl.format
===================================================================
--- /branch/usb/usb_public_base/format/g24_protocol_stack/24g_txpower_ctrl.format	(revision 0)
+++ /branch/usb/usb_public_base/format/g24_protocol_stack/24g_txpower_ctrl.format	(working copy)
@@ -0,0 +1,20 @@
+
+xmemalloc g24_tx(
+1 mem_rssi_avg_received
+1 mem_power_ctrl_level
+1 mem_power_ctrl_pac_succ_cnt
+1 mem_power_ctrl_pac_succ_cnt_init
+
+1 mem_rssi_dis_min_24g
+1 mem_rssi_dis_max_24g
+1 mem_rssi_hex_received_max_value
+
+1 mem_rssi_dis_min_ble
+1 mem_rssi_dis_max_ble
+)
+
+
+(
+50 POWER_CTRL_DECRS_THRESHOLD
+)
+
Index: format/hci.format
===================================================================
--- /branch/usb/usb_public_base/format/hci.format	(revision 0)
+++ /branch/usb/usb_public_base/format/hci.format	(working copy)
@@ -0,0 +1,520 @@
+
+
+memalloc hci_boot(
+2 mem_hci_opcode_ocf
+1 mem_hci_opcode_ogf
+
+//event head
+1 mem_hci_event_head_type
+1 mem_hci_event_head_event_code
+1 mem_hci_event_para_total_length
+
+//command complete
+1 mem_hci_command_complete_num_hci_command_packet
+0 mem_hci_command_complete_command_opcode
+2 mem_hci_opcode
+0 mem_hci_command_complete_return_parameter
+1 mem_hci_command_complete_return_parameter_status
+0 mem_hci_command_complete_return_parameter_chip_id
+
+)
+
+xmemalloc hci_boot(
+1 mem_hci_uart_tx_gpio
+1 mem_hci_uart_rx_gpio
+1 mem_hci_uart_rts_gpio
+1 mem_hci_uart_cts_gpio
+1 mem_hci_pwm_12mhz_gpio
+)
+
+(
+0x05 HCI_UART_TX_GPIO_NUM
+0x06 HCI_UART_RX_GPIO_NUM
+0x09 HCI_UART_RTS_GPIO_NUM
+0x0a HCI_UART_CTS_GPIO_NUM
+0x0c HCI_PMW_12MHZ_GPIO_NUM
+)
+
+(
+0x00 COMMAND_SUCCEEDED
+0x01 COMMAND_UNKNOWN
+0x0c COMMAND_DISALLOWED
+)
+
+//HCI H4 Packet TYPE
+(
+0x01 HCI_H4_TYPE_CMD
+0x02 HCI_H4_TYPE_ACL
+0x04 HCI_H4_TYPE_EVENT
+)
+
+(
+0x00 BT_ACL_START_NO_FLUSH
+0x01 BT_ACL_CONT
+0x02 BT_ACL_START
+)
+
+// HCI command opcode group field values
+(
+0x01 HCI_OGF_LINK_CONTROL
+0x02 HCI_OGF_LINK_POLICY
+0x03 HCI_OGF_CONTROLLER_AND_BASEBAND
+0x04 HCI_OGF_INFOMATIONAL_PARAM
+0x05 HCI_OGF_STATUS_PARAM
+0x06 HCI_OGF_TEST
+0x08 HCI_OGF_LE_CONTROLLER
+0x3f HCI_OGF_VENDOR_SPECIFIC_DEBUG
+)
+
+// HCI link control opcode command field values, OGF=1
+(
+0x01 HCI_INQUIRY 
+0x02 HCI_INQUIRY_CANCEL 
+0x03 HCI_PERIODIC_INQUIRY_MODE 
+0x04 HCI_EXIT_PERIODIC_INQUIRY_MODE 
+0x05 HCI_CREATE_CONNECTION 
+0x06 HCI_DISCONNECT 
+0x07 HCI_ADD_SCO_CONNECTION 
+0x08 HCI_CREATE_CONNECTION_CANCEL
+0x09 HCI_ACCEPT_CONNECTION 
+0x0A HCI_REJECT_CONNECTION 
+0x0B HCI_LINK_KEY_REQUEST_REPLY 
+0x0C HCI_LINK_KEY_REQUEST_NEGATIVE_REPLY 
+0x0D HCI_PIN_CODE_REQUEST_REPLY 
+0x0E HCI_PIN_CODE_REQUEST_NEGATIVE_REPLY 
+0x0F HCI_CHANGE_CONNECTION_PACKET_TYPE 
+0x11 HCI_AUTHENTICATION_REQUESTED 
+0x13 HCI_SET_CONNECTION_ENCRYPTION 
+0x15 HCI_CHANGE_CONNECTION_LINK_KEY 
+0x17 HCI_MASTER_LINK_KEY 
+0x19 HCI_REMOTE_NAME_REQUEST 
+0x1A HCI_REMOTE_NAME_REQUEST_CANCEL
+0x1B HCI_READ_REMOTE_SUPPORTED_FEATURES 
+0x1C HCI_READ_REMOTE_EXT_FEATURES 
+0x1D HCI_READ_REMOTE_VERSION_INFORMATION 
+0x1F HCI_READ_CLOCK_OFFSET 
+0x20 HCI_READ_LMP_HANDLE
+0x28 HCI_SETUP_SCO_CONNECTION
+0x29 HCI_ACCEPT_SCO_CONNECTION
+0x2A HCI_REJECT_SCO_CONNECTION
+0x2B HCI_IO_CAP_REQUEST_REPLY
+0x2C HCI_USER_CONFIRMATION_REQUEST_REPLY
+0x2D HCI_USER_CONFIRMATION_REQUEST_NEGATIVE_REPLY
+0x2E HCI_USER_PASSKEY_REQUEST_REPLY
+0x2F HCI_USER_PASSKEY_REQUEST_NEGATIVE_REPLY
+0x30 HCI_REMOTE_OOB_DATA_REQUEST_REPLY
+0x33 HCI_REMOTE_OOB_DATA_REQUEST_NEGATIVE_REPLY
+0x34 HCI_IO_CAPABILITY_REQUEST_NEGATIVE_REPLY
+0x35 HCI_CREATE_PHYSICAL_LINK
+0x36 HCI_ACCEPT_PHYSICAL_LINK
+0x37 HCI_DISCONNECT_PHYSICAL_LINK
+0x38 HCI_CREATE_LOGICAL_LINK
+0x39 HCI_ACCEPT_LOGICAL_LINK
+0x3A HCI_DISCONNECT_LOGICAL_LINK
+0x3B HCI_LOGICAL_LINK_CANCEL
+0x3C HCI_FLOW_SPEC_MODIFY
+0x3D HCI_ENHANCED_SETUP_SYNCHRONOUS_CONNECTION
+0x3E HCI_ENHANCED_ACCEPT_SYNCHRONOUS_CONNECTION_REQUEST
+0x3F HCI_TRUNCATED_PAGE
+0x40 HCI_TRUNCATED_PAGE_CANCEL
+0x41 HCI_SET_CONNECTIONLESS_SLAVE_BROADCAST
+0x42 HCI_SET_CONNECTIONLESS_SLAVE_BROADCAST_RECEIVE
+0x43 HCI_START_SYNCHRONIZATION_TRAIN
+0x44 HCI_RECEIVE_SYNCHRONIZATION_TRAIN
+0x45 HCI_REMOTE_OOB_EXTENDED_DATA_REQUEST_REPLY
+)
+
+
+// HCI link policy commands OCF value, OGF=2
+(
+0x01 HCI_HOLD_MODE 
+0x03 HCI_SNIFF_MODE 
+0x04 HCI_EXIT_SNIFF_MODE 
+0x05 HCI_PARK_MODE 
+0x06 HCI_EXIT_PARK_MODE 
+0x07 HCI_QOS_SETUP 
+0x09 HCI_ROLE_DISCOVERY 
+0x0B HCI_SWITCH_ROLE 
+0x0C HCI_READ_LINK_POLICY_SETTINGS 
+0x0D HCI_WRITE_LINK_POLICY_SETTINGS 
+0x0e HCI_READ_DEFAULT_LINK_POLICY_SETTINGS
+0x0f HCI_WRITE_DEFAULT_LINK_POLICY_SETTINGS
+0x10 HCI_FLOW_SPECIFICATION
+0x11 HCI_SNIFF_SUBRATING
+)
+
+// HCI host controller and baseband commands OCF values, OGF=3
+(
+0x01 HCI_SET_EVENT_MASK 
+0x03 HCI_RESET 
+0x05 HCI_SET_EVENT_FILTER 
+0x08 HCI_FLUSH 
+0x09 HCI_READ_PIN_TYPE 
+0x0A HCI_WRITE_PIN_TYPE 
+0x0B HCI_CREATE_NEW_UNIT_KEY 
+0x0D HCI_READ_STORED_LINK_KEY 
+0x11 HCI_WRITE_STORED_LINK_KEY 
+0x12 HCI_DELETE_STORED_LINK_KEY 
+0x13 HCI_WRITE_LOCAL_NAME 
+0x14 HCI_READ_LOCAL_NAME 
+0x15 HCI_READ_CONN_ACCEPT_TIMEOUT 
+0x16 HCI_WRITE_CONN_ACCEPT_TIMEOUT 
+0x17 HCI_READ_PAGE_TIMEOUT 
+0x18 HCI_WRITE_PAGE_TIMEOUT 
+0x19 HCI_READ_SCAN_ENABLE 
+0x1A HCI_WRITE_SCAN_ENABLE 
+0x1B HCI_READ_PAGE_SCAN_ACTIVITY 
+0x1C HCI_WRITE_PAGE_SCAN_ACTIVITY 
+0x1D HCI_READ_INQUIRY_SCAN_ACTIVITY 
+0x1E HCI_WRITE_INQUIRY_SCAN_ACTIVITY 
+0x1F HCI_READ_AUTHENTICATION_ENABLE 
+0x20 HCI_WRITE_AUTHENTICATION_ENABLE 
+0x21 HCI_READ_ENCRYPTION_MODE 
+0x22 HCI_WRITE_ENCRYPTION_MODE 
+0x23 HCI_READ_CLASS_OF_DEVICE 
+0x24 HCI_WRITE_CLASS_OF_DEVICE 
+0x25 HCI_READ_VOICE_SETTING 
+0x26 HCI_WRITE_VOICE_SETTING 
+0x27 HCI_READ_AUTOMATIC_FLUSH_TIMEOUT 
+0x28 HCI_WRITE_AUTOMATIC_FLUSH_TIMEOUT 
+0x29 HCI_READ_NUM_BROADCAST_RETRANSMISSIONS 
+0x2A HCI_WRITE_NUM_BROADCAST_RETRANSMISSIONS 
+0x2B HCI_READ_HOLD_MODE_ACTIVITY 
+0x2C HCI_WRITE_HOLD_MODE_ACTIVITY 
+0x2D HCI_READ_TRANSMIT_POWER_LEVEL 
+0x2E HCI_READ_SCO_FLOW_CONTROL_ENABLE 
+0x2F HCI_WRITE_SCO_FLOW_CONTROL_ENABLE 
+0x31 HCI_SET_CONTROLLER_TO_HOST_FLOW_CONTROL 
+0x33 HCI_HOST_BUFFER_SIZE 
+0x35 HCI_HOST_NUM_COMPLETED_PACKETS 
+0x36 HCI_READ_LINK_SUPERVISION_TIMEOUT 
+0x37 HCI_WRITE_LINK_SUPERVISION_TIMEOUT 
+0x38 HCI_READ_NUMBER_OF_SUPPORTED_IAC 
+0x39 HCI_READ_CURRENT_IAC_LAP 
+0x3A HCI_WRITE_CURRENT_IAC_LAP 
+0x3B HCI_READ_PAGE_SCAN_PERIOD_MODE 
+0x3C HCI_WRITE_PAGE_SCAN_PERIOD_MODE 
+0x3D HCI_READ_PAGE_SCAN_MODE 
+0x3E HCI_WRITE_PAGE_SCAN_MODE 
+0x3F HCI_SET_AFH_CHANNEL_CLASSIFICATION 
+
+
+0x42 HCI_READ_INQUIRY_SCAN_TYPE 
+0x43 HCI_WRITE_INQUIRY_SCAN_TYPE 
+0x44 HCI_READ_INQUIRY_MODE 
+0x45 HCI_WRITE_INQUIRY_MODE 
+0x46 HCI_READ_PAGE_SCAN_TYPE 
+0x47 HCI_WRITE_PAGE_SCAN_TYPE 
+
+0x48 HCI_READ_AFH_CHANNEL_ACCESSMENT_MODE 
+0x49 HCI_WRITE_AFH_CHANNEL_ACCESSMENT_MODE 
+0x51 HCI_READ_EXTENDED_INQUIRY_RESPONSE
+0x52 HCI_WRITE_EXTENDED_INQUIRY_RESPONSE
+0x53 HCI_REFRESH_ENCRYPTION_KEY
+0x55 HCI_READ_SIMPLE_PAIRING_MODE
+0x56 HCI_WRITE_SIMPLE_PAIRING_MODE
+0x57 HCI_READ_LOCAL_OOB_DATA
+0x58 HCI_READ_INQUIRY_RESPONSE_TRANSMIT_POWER_LEVEL
+0x59 HCI_WRITE_INQUIRY_TRANSMIT_POWER_LEVEL
+0x60 HCI_SEND_KEYPRESS_NOTIFICATION
+0x5A HCI_READ_DEFAULT_ERRONEOUS_DATA_REPORTING
+0x5B HCI_WRITE_DEFAULT_ERRONEOUS_DATA_REPORTING
+0x5F HCI_ENHANCED_FLUSH
+0x61 HCI_READ_LOGICAL_LINK_ACCEPT_TIMEOUT
+0x62 HCI_WRITE_LOGICAL_LINK_ACCEPT_TIMEOUT
+0x63 HCI_SET_EVENT_MASK_PAGE_2
+0x64 HCI_READ_LOCATION_DATA
+0x65 HCI_WRITE_LOCATION_DATA
+0x66 HCI_READ_FLOW_CONTROL_MODE
+0x67 HCI_WRITE_FLOW_CONTROL_MODE
+0x68 HCI_READ_ENHANCE_TRANSMIT_POWER_LEVEL
+0x69 HCI_READ_BEST_EFFORT_FLUSH_TIMEOUT
+0x6A HCI_WRITE_BEST_EFFORT_FLUSH_TIMEOUT
+0x6B HCI_SHORT_RANGE_MODE
+0x6C HCI_READ_LE_HOST_SUPPORT
+0x6D HCI_WRITE_LE_HOST_SUPPORT
+0x6E HCI_SET_MWS_CHANNEL_PARAMETERS
+0x6F HCI_SET_EXTERNAL_FRAME_CONFIGURATION
+0x70 HCI_SET_MWS_SIGNALING
+0x71 HCI_SET_MWS_TRANSPORT_LAYER
+0x72 HCI_SET_MWS_SCAN_FREQUENCY_TABLE
+0x73 HCI_SET_MWS_PATTERN_CONFIGURATION
+0x74 HCI_SET_RESERVED_LT_ADDR
+0x75 HCI_DELETE_RESERVED_LT_ADDR
+0x76 HCI_SET_CONNECTIONLESS_SLAVE_BROADCAST_DATA
+0x77 HCI_READ_SYNCHRONIZATION_TRAIN_PARAMETERS
+0x78 HCI_WRITE_SYNCHRONIZATION_TRAIN_PARAMETERS
+0x79 HCI_READ_SECURE_CONNECTIONS_HOST_SUPPORT
+0x7A HCI_WRITE_SECURE_CONNECTIONS_HOST_SUPPORT
+0x7B HCI_READ_AUTHENTICATED_PAYLOAD_TIMEOUT
+0x7C HCI_WRITE_AUTHENTICATED_PAYLOAD_TIMEOUT
+0x7D HCI_READ_LOCAL_OOB_EXTENDED_DATA
+0x7E HCI_READ_EXTENDED_PAGE_TIMEOUT
+0x7F HCI_WRITE_EXTENDED_PAGE_TIMEOUT
+0x80 HCI_READ_EXTENDED_INQUIRY_LENGTH
+0x81 HCI_WRITE_EXTENDED_INQUIRY_LENGTH
+)
+
+
+// HCI informational parameters OCF values, OGF=4
+(
+0x01 HCI_READ_LOCAL_VERSION_INFORMATION 
+0x02 HCI_READ_LOCAL_SUPPORTED_COMMANDS
+0x03 HCI_READ_LOCAL_SUPPORTED_FEATURES 
+0x04 HCI_READ_LOCAL_EXT_FEATURES 
+0x05 HCI_READ_BUFFER_SIZE 
+0x07 HCI_READ_COUNTRY_CODE 
+0x09 HCI_READ_BD_ADDR 
+0x0A HCI_REJECT_CONNECTION_REQUEST
+0x0B HCI_READ_LOCAL_SUPPORTED_CODECS
+)
+
+// HCI status parameters OCF values, OGF=5
+(
+0x01 HCI_READ_FAILED_CONTACT_COUNTER 
+0x02 HCI_RESET_FAILED_CONTACT_COUNTER 
+0x03 HCI_GET_LINK_QUALITY 
+0x05 HCI_READ_RSSI 
+0x06 HCI_READ_AFH_CHANNEL_MAP
+0x07 HCI_READ_BD_CLOCK
+0x08 HCI_READ_ENCRYPTION_KEY_SIZE
+0x09 HCI_READ_LOCAL_AMP_INFO
+0x0A HCI_READ_LOCAL_AMP_ASSOC
+0x0B HCI_WRITE_REMOTE_AMP_ASSOC
+0x0C HCI_GET_MWS_TRANSPORT_LAYER_CONFIGURATION
+0x0D HCI_SET_TRIGGERED_CLOCK_CAPTURE
+)
+
+// HCI testing command OCF values, OGF=6
+(
+0x01 HCI_READ_LOOPBACK_MODE 
+0x02 HCI_WRITE_LOOPBACK_MODE 
+0x03 HCI_ENABLE_DEVICE_UNDER_TEST_MODE 
+0x04 HCI_WRITE_SIMPLE_PAIRING_DEBUG_MODE
+0x07 HCI_ENABLE_AMP_RECEIVER_REPORTS
+0x08 HCI_AMP_TEST_END
+0x09 HCI_AMP_TEST
+0x0A HCI_WRITE_SECURE_CONNECTIONS_TEST_MODE
+)
+
+// HCI vendor specific command OCF values -OGF=3F
+(
+0x01 HCI_WRITE_BD_ADDR 
+0x02 HCI_READ_INQUIRY_RESPONSE_TIMEOUT 
+0x03 HCI_WRITE_INQUIRY_RESPONSE_TIMEOUT 
+0x04 HCI_READ_PAGE_SCAN_REPETITION_MODE 
+0x05 HCI_WRITE_PAGE_SCAN_REPETITION_MODE 
+0x06 HCI_READ_PAGE_RESPONSE_TIMEOUT 
+0x07 HCI_WRITE_PAGE_RESPONSE_TIMEOUT 
+0x08 HCI_READ_NEW_CONNECTION_TIMEOUT 
+0x09 HCI_WRITE_NEW_CONNECTION_TIMEOUT 
+0x0a HCI_INITIALIZE_BASEBAND 
+0x0b HCI_WRITE_LOCAL_SUPPORTED_FEATURES 
+0x0c HCI_WRITE_PARK_PARAMETERS 
+0x0d HCI_READ_PARK_PARAMETERS 
+0x0e HCI_WRITE_QUALITY_OF_SERVICE 
+0x0f HCI_NOT_USED 
+0x10 HCI_MODIFY_BEACON_PARAMETERS 
+0x11 HCI_UNPARK_USING_PM_ADDR 
+0x12 HCI_WRITE_HOPPING_CHANNELS 
+0x13 HCI_SLEEP_FOREVER_MODE 
+0x14 HCI_WRITE_AUTO_PAGE_SCAN_ENABLE 
+0x15 HCI_READ_AUTO_PAGE_SCAN_ENABLE 
+0x16 HCI_SET_ENCRYPTION_KEY_SIZE 
+0x17 HCI_INVALIDATE_FLASH_AND_REBOOT 
+0x18 HCI_UPDATE_UART_BAUD_RATE 
+0x19 HCI_WRITE_GPIO_1_4_AS_OUTPUT 
+0x1A HCI_WRITE_GPIO_2_LED 
+0x1B HCI_SET_TESTMODE_TYPE 
+0x1C HCI_WRITE_SCO_PCM_INT_PARAM 
+0x1D HCI_READ_SCO_PCM_INT_PARAM 
+0x1E HCI_WRITE_PCM_DATA_FORMAT_PARAM 
+0x1F HCI_READ_PCM_DATA_FORMAT_PARAM 
+0x20 HCI_WRITE_COMFORT_NOISE_PARAM 
+0x21 HCI_READ_COMFORT_NOISE_PARAM 
+0x22 HCI_WRITE_SCO_TS 
+0x23 HCI_READ_SCO_TS 
+0x24 HCI_WRITE_PCM_LOOPBACK_MODE 
+0x25 HCI_READ_PCM_LOOPBACK_MODE 
+0x26 HCI_SET_TRANSMIT_POWER 
+0x27 HCI_SET_SLEEPMODE_PARAM 
+0x28 HCI_READ_SLEEPMODE_PARAM 
+0x29 HCI_SLEEPMODE_CMD 
+0x2A HCI_DELAY_PERIPHERAL_SCO_STARTUP 
+0x2B HCI_WRITE_RECEIVE_ONLY 
+0x2C HCI_WRITE_RATE_CONTROL 
+0x2D HCI_TX_UNMOD_CARRIER 
+0x2E HCI_DOWNLOAD_MINIDRIVER 
+0x2F HCI_CRYSTAL_PPM 
+0x30 HCI_SET_POWER_AMP_BIAS 
+0x31 HCI_SET_HAM_BEHAVIOR 
+0x32 HCI_SET_AFH_BEHAVIOR 
+0x33 HCI_READ_USER_DEFINED_NVRAM 
+0x34 HCI_ENABLE_RADIO 
+0x35 HCI_READ_DIAGNOSTIC_INFO 
+0x36 HCI_GET_HID_DEVICE_LIST 
+0x37 HCI_ADD_HID_DEVICE 
+0x38 HCI_READ_APP_FW_CONFIG_VERSION 
+0x39 HCI_DELETE_HID_DEVICE 
+0x3B HCI_ENABLE_USB_HID_EMULATION 
+// 0x3A available
+// 0x3B available
+0x3C HCI_SEND_LMPDU 
+0x3D HCI_AUTO_PAIR_REQ 
+0x3E HCI_READ_VS_EXTENSION 
+0x3F HCI_WRITE_VS_EXTENSION 
+
+0x77 HCI_OPCODE_FC77
+0x79 HCI_OPCODE_FC79
+0xC4 HCI_DOWNLOAD_PATCH
+0xCC HCI_OPCODE_FCCC
+
+0x00 HCI_VENDOR_CMD_RESET
+0x01 HCI_VENDOR_CMD_CHIPID
+0x02 HCI_VENDOR_CMD_BAUD
+0x03 HCI_VENDOR_CMD_PATCH
+0x04 HCI_VENDOR_CMD_PATCH_DONE
+0x05 HCI_VENDOR_CMD_ECHO
+0x06 HCI_VENDOR_CMD_BDADDR
+
+0x07 HCI_VENDOR_CMD_ENTER_LPM
+0x08 HCI_VENDOR_CMD_COMMU_READY
+
+0x10 HCI_VENDOR_CMD_MEM
+0x11 HCI_VENDOR_CMD_EEP
+
+0X12 HCI_VENDOR_CMD_PATCH_SEC_INIT
+0X13 HCI_VENDOR_CMD_PATCH_SEC
+0x14 HCI_VENDOR_CMD_SET_FLOW_CONTROL
+)
+
+//HCI LE controller command OCF values, OGF=8
+(
+0x01 HCI_LE_SET_EVENT_MASK
+0x02 HCI_LE_READ_BUFFER_SIZE
+0x03 HCI_LE_READ_LOCAL_SUPPORTED_FEATURES
+0x05 HCI_LE_SET_RANDOM_ADDRESS
+0x06 HCI_LE_SET_ADVERTISING_PARAMETERS
+0x07 HCI_LE_READ_ADVERTISING_CHANNEL_TX_POWER
+0x08 HCI_LE_SET_ADVERTISING_DATA
+0x09 HCI_LE_SET_SCAN_RESPONSE_DATA
+0x0A HCI_LE_SET_ADVERTISE_ENABLE
+0x0B HCI_LE_SET_SCAN_PARAMETERS
+0x0C HCI_LE_SET_SCAN_ENABLE
+0x0D HCI_LE_CREATE_CONNECTION
+0x0E HCI_LE_CREATE_CONNECTION_CANCEL
+0x0F HCI_LE_READ_WHITE_LIST_SIZE
+0x10 HCI_LE_CLEAR_WHITE_LIST
+0x11 HCI_LE_ADD_DEVICE_TO_WHITE_LIST
+0x12 HCI_LE_REMOVE_DEVICE_FROM_WHITE_LIST
+0x13 HCI_LE_CONNECTION_UPDATE
+0x14 HCI_LE_SET_HOST_CHANNEL_CLASSIFICATION
+0x15 HCI_LE_READ_CHANNEL_MAP
+0x16 HCI_LE_READ_REMOTE_USED_FEATURES
+0x17 HCI_LE_ENCRYPT
+0x18 HCI_LE_RAND
+0x19 HCI_LE_START_ENCRYPTION
+0x1A HCI_LE_LONG_TERM_KEY_REQUEST_REPLY
+0x1B HCI_LE_LONG_TERM_KEY_REQUEST_NEGATIVE_REPLY
+0x1C HCI_LE_READ_SUPPORTED_STATES
+0x1D HCI_LE_RECEIVER_TEST
+0x1E HCI_LE_TRANSMITTER_TEST
+0x1F HCI_LE_TEST_END
+0x20 HCI_LE_REMOTE_CONNECTION_PARAMETER_REQUEST_REPLY
+0x21 HCI_LE_REMOTE_CONNECTION_PARAMETER_REQUEST_NEGATIVE_REPLY
+)
+// HCI event code
+(
+0x01 HCI_EVENT_INQUIRY_COMPLETE
+0x02 HCI_EVENT_INQUIRY_RESULT
+0x03 HCI_EVENT_CONNECTION_COMPLETE
+0x04 HCI_EVENT_CONNECTION_REQUEST
+0x05 HCI_EVENT_DISCONNECTION_COMPLETE
+0x06 HCI_EVENT_AUTHENTICATION_COMPLETE
+0x07 HCI_EVENT_REMOTE_NAME_REQUEST_COMPLETE
+0x08 HCI_EVENT_ENCRYPTION_CHANGE_COMPLETE
+0x09 HCI_EVENT_CHANGE_CONNECTION_LINK_KEY_COMPLETE
+0x0A HCI_EVENT_MASTER_LINK_KEY_COMPLETE
+0x0B HCI_EVENT_READ_REMOTE_FEATURES_COMPLETE
+0x0C HCI_EVENT_READ_REMOTE_VERSION_INFORMATION_COMPLETE
+0x0D HCI_EVENT_QOS_SETUP_COMPLETE
+0x0E HCI_EVENT_COMMAND_COMPLETE
+0x0F HCI_EVENT_COMMAND_STATUS
+0x10 HCI_EVENT_HARDWARE_ERROR
+0x11 HCI_EVENT_FLUSH_OCCURRED
+0x12 HCI_EVENT_ROLE_CHANGE
+0x13 HCI_EVENT_NUM_COMPLETED_PACKETS
+0x14 HCI_EVENT_MODE_CHANGE
+0x15 HCI_EVENT_RETURN_LINK_KEYS
+0x16 HCI_EVENT_PIN_CODE_REQUEST
+0x17 HCI_EVENT_LINK_KEY_REQUEST
+0x18 HCI_EVENT_LINK_KEY_NOTIFICATION
+0x19 HCI_EVENT_LOOPBACK_COMMAND
+0x1A HCI_EVENT_DATA_BUFFER_OVERFLOW
+0x1B HCI_EVENT_MAX_SLOTS_CHANGE
+0x1C HCI_EVENT_READ_CLOCK_OFFSET_COMPLETE
+0x1D HCI_EVENT_CONNECTION_PACKET_TYPE_CHANGED
+0x1E HCI_EVENT_QOS_VIOLATION
+0x1F HCI_EVENT_PAGE_SCAN_MODE_CHANGE
+0x20 HCI_EVENT_PAGE_SCAN_REPETITION_MODE_CHANGE
+0x21 HCI_EVENT_FLOW_SPECIFICATION_COMPLETE
+0x22 HCI_EVENT_INQUIRY_RESULT_WITHRSSI
+0x23 HCI_EVENT_READ_REMOTE_EXT_FEATURES_COMPLETE
+0x2C HCI_EVENT_SCO_CONNECTION_COMPLETE
+0x2D HCI_EVENT_SCO_CONNECTION_CHANGED
+0x2E HCI_EVENT_SNIFF_SUBRATING
+0x2F HCI_EVENT_EXT_INQUIRY_RESULT
+0x30 HCI_EVENT_ENCRYPT_KEY_REFRESH_COMPLETE
+0x31 HCI_EVENT_IO_CAP_REQ
+0x32 HCI_EVENT_IO_CAP_RESPONSE
+0x33 HCI_EVENT_USER_CONFIRMATION_REQUEST
+0x34 HCI_EVENT_UESR_PASSKEY_REQUEST
+0x35 HCI_EVENT_REMOTE_OOB_DATA_REQUEST
+0x36 HCI_EVENT_SIMPLE_PAIRING_COMPLETE
+0x38 HCI_EVENT_LINK_SUPERVISION_TIMEOUT_CHANGED
+0x39 HCI_EVENT_ENHANCED_FLUSH_COMPLETE
+0x3B HCI_EVENT_USER_PASSKEY_NOTIFICATION
+0x3C HCI_EVENT_KEYPRESS_NOTIFICATION
+0x3D HCI_EVENT_REMOTE_HOST_SUPPORTED_FEATURES_NOTIFICATION 
+0x3E HCI_EVENT_LE_META_EVENT
+0x40 HCI_EVENT_PHYSICAL_LINK_COMPLETE
+0x41 HCI_EVENT_CHANNEL_SELECTED
+0x42 HCI_EVENT_DISCONNECTION_PHYSICAL_LINK_COMPLETE
+0x43 HCI_EVENT_PHYSICAL_LINK_LOSS_EARLY_WARNING
+0x44 HCI_EVENT_PHYSICAL_LINK_RECOVERY
+0x45 HCI_EVENT_LOGICAL_LINK_COMPLETE
+0x46 HCI_EVENT_DISCONNECTION_LOGICAL_LINK_COMPLETE
+0x47 HCI_EVENT_FLOW_SPEC_MODIFY_COMPLETE
+0x48 HCI_EVENT_NUMBER_OF_COMPLETED_DATA_BLOCKS
+0x49 HCI_EVENT_AMP_START_TEST
+0x4A HCI_EVENT_AMP_TEST_END
+0x4B HCI_EVENT_AMP_RECEIVER_REPORT
+0x4C HCI_EVENT_SHORT_RANGE_MODE_CHANGE_COMPLETE
+0x4D HCI_EVENT_AMP_STATUS_CHANGE
+0x4E HCI_EVENT_TRIGGERED_CLOCK_CAPTURE
+0x4F HCI_EVENT_SYNCHRONIZATION_TRAIN_COMPLETE
+0x50 HCI_EVENT_SYNCHRONIZATION_TRAIN_RECEIVED
+0x51 HCI_EVENT_CONNECTIONLESS_SLAVE_BROADCAST_RECEIVE
+0x52 HCI_EVENT_CONNECTIONLESS_SLAVE_BROADCAST_TIMEOUT
+0x53 HCI_EVENT_TRUNCATED_PAGE_COMPLETE
+0x54 HCI_EVENT_SLAVE_PAGE_RESPONSE_TIMEOUT
+0x55 HCI_EVENT_CONNECTIONLESS_SLAVE_BROADCAST_CHANNEL_MAP_CHANGE
+0x56 HCI_EVENT_INQUIRY_RESPONSE_NOTIFICATION
+0x57 HCI_EVENT_AUTHENTICATED_PAYLOAD_TIMEOUT_EXPIRED
+
+0xFE HCI_EVENT_LOGO_TESTING
+0xFF HCI_EVENT_VENDOR_SPECIFIC
+)
+(
+0x01 HCI_VENDOR_EVENT_COMMU_READY
+)
+//HCI LE SUBEVENT CODE
+(
+0x01 HCI_LE_SUBEVENT_CONN_COMPLETE
+0x02 HCI_LE_SUBEVENT_ADV_REPORT
+0x03 HCI_LE_SUBEVENT_CONN_UPDATE_COMPLETE
+0x04 HCI_LE_SUBEVENT_REMOTE_FEATURE_COMPLETE
+0x05 HCI_LE_SUBEVENT_LTK_REQUEST
+0x06 HCI_LE_SUBEVENT_REMOTE_CONN_PARAM_REQ
+)
+
Index: format/kscan_peipherals.format
===================================================================
--- /branch/usb/usb_public_base/format/kscan_peipherals.format	(revision 0)
+++ /branch/usb/usb_public_base/format/kscan_peipherals.format	(working copy)
@@ -0,0 +1,35 @@
+
+
+
+
+
+
+//0 mem_kscan_head_ptr
+//1 mem_col_num
+//1 mem_row_num
+//4 mem_col_conf_pin
+//4 mem_row_conf_pin
+//1 mem_row_count
+//1 mem_count_shift
+//2 mem_kscan_value_temp
+//2 mem_kscan_lastvalue
+//2 mem_kscan_value
+//4 mem_btclk_kscan
+//1 mem_btclk_kscan_interval
+
+
+0x00 KEYSCAN_OFFECT_COL_NUM
+0x01 KEYSCAN_OFFECT_ROW_NUM
+0x02 KEYSCAN_OFFECT_COL_CONF_PIN
+0x06 KEYSCAN_OFFECT_ROW_CONF_PIN
+
+0x0a KEYSCAN_OFFECT_ROW_COUNT
+0x0b KEYSCAN_OFFECT_SHIFT_COUNT
+
+0X0C KEYSCAN_OFFECT_VALUE_TEMP
+0X0E KEYSCAN_OFFECT_LASVALUE
+0X10 KEYSCAN_OFFECT_VALUE
+0x12 KEYSCAN_OFFECT_BTCLK
+0x16 KEYSCAN_OFFECT_BTCLK_INTERVAL
+
+
Index: format/l2cap.format
===================================================================
--- /branch/usb/usb_public_base/format/l2cap.format	(revision 0)
+++ /branch/usb/usb_public_base/format/l2cap.format	(working copy)
@@ -0,0 +1,40 @@
+
+
+
+xmemalloc(
+0 mem_l2cap_xmem_start
+
+//*******************L2CAP malloc********************//
+1 mem_used_map
+0 mem_tx_fifo0
+1 mem_tx_fifo0_map
+2 mem_tx_fifo0_ptr
+0 mem_tx_fifo1
+1 mem_tx_fifo1_map
+2 mem_tx_fifo1_ptr
+0 mem_tx_fifo2
+1 mem_tx_fifo2_map
+2 mem_tx_fifo2_ptr
+0 mem_tx_fifo3
+1 mem_tx_fifo3_map
+2 mem_tx_fifo3_ptr
+0 mem_tx_fifo_end
+
+2 mem_l2cap_lpm_txbuf_ptr
+0 mem_l2cap_xmem_end
+
+)
+
+
+//mem_l2cap_lpm_txbuf
+(
+256 l2cap_lpm_txbuf_len
+)
+
+(
+4 L2CAP_TX_FIFO_SIZE
+8 L2CAP_TX_BUFF_CNT
+
+)
+
+
Index: format/memblocks.format
===================================================================
--- /branch/usb/usb_public_base/format/memblocks.format	(revision 0)
+++ /branch/usb/usb_public_base/format/memblocks.format	(working copy)
@@ -0,0 +1,35 @@
+//
+//
+//Large memory blocks defined in this file.
+//Blocks Shall be defined with absolute address.
+//Blocks' length Shall be specified in comment following Blocks' names.
+//Different blocks MAY be overlap.
+//Blocks defined in this file Shall NOT be overlap with variable in memmap.format.
+
+
+
+//l2cap RX buffers
+(
+0xf00 mem_le_l2cap_buf		//0x100
+)
+
+//l2cap TX buffers
+(
+0xd00 mem_ble_tx_buff0
+0x60 mem_ble_l2cap_tx_buff_size
+)
+
+
+//uart buffer
+(
+0xc00 mem_h5rx_buf//0x400
+0xeff mem_h5rx_buf_end
+0xf00 mem_h5tx_buf
+0xfff mem_h5tx_buf_end
+)
+
+
+(
+0x4c00 mem_savelist
+)
+
Index: format/patch.format
===================================================================
--- /branch/usb/usb_public_base/format/patch.format	(revision 0)
+++ /branch/usb/usb_public_base/format/patch.format	(working copy)
@@ -0,0 +1,516 @@
+
+(
+	  0 patch00_0
+	  1 patch00_1
+	  2 patch00_2
+	  3 patch00_3
+	  4 patch00_4
+	  5 patch00_5
+	  6 patch00_6
+	  7 patch00_7
+	  8 patch01_0
+	  9 patch01_1
+	 10 patch01_2
+	 11 patch01_3
+	 12 patch01_4
+	 13 patch01_5
+	 14 patch01_6
+	 15 patch01_7
+	 16 patch02_0
+	 17 patch02_1
+	 18 patch02_2
+	 19 patch02_3
+	 20 patch02_4
+	 21 patch02_5
+	 22 patch02_6
+	 23 patch02_7
+	 24 patch03_0
+	 25 patch03_1
+	 26 patch03_2
+	 27 patch03_3
+	 28 patch03_4
+	 29 patch03_5
+	 30 patch03_6
+	 31 patch03_7
+	 32 patch04_0
+	 33 patch04_1
+	 34 patch04_2
+	 35 patch04_3
+	 36 patch04_4
+	 37 patch04_5
+	 38 patch04_6
+	 39 patch04_7
+	 40 patch05_0
+	 41 patch05_1
+	 42 patch05_2
+	 43 patch05_3
+	 44 patch05_4
+	 45 patch05_5
+	 46 patch05_6
+	 47 patch05_7
+	 48 patch06_0
+	 49 patch06_1
+	 50 patch06_2
+	 51 patch06_3
+	 52 patch06_4
+	 53 patch06_5
+	 54 patch06_6
+	 55 patch06_7
+	 56 patch07_0
+	 57 patch07_1
+	 58 patch07_2
+	 59 patch07_3
+	 60 patch07_4
+	 61 patch07_5
+	 62 patch07_6
+	 63 patch07_7
+	 64 patch08_0
+	 65 patch08_1
+	 66 patch08_2
+	 67 patch08_3
+	 68 patch08_4
+	 69 patch08_5
+	 70 patch08_6
+	 71 patch08_7
+	 72 patch09_0
+	 73 patch09_1
+	 74 patch09_2
+	 75 patch09_3
+	 76 patch09_4
+	 77 patch09_5
+	 78 patch09_6
+	 79 patch09_7
+	 80 patch0a_0
+	 81 patch0a_1
+	 82 patch0a_2
+	 83 patch0a_3
+	 84 patch0a_4
+	 85 patch0a_5
+	 86 patch0a_6
+	 87 patch0a_7
+	 88 patch0b_0
+	 89 patch0b_1
+	 90 patch0b_2
+	 91 patch0b_3
+	 92 patch0b_4
+	 93 patch0b_5
+	 94 patch0b_6
+	 95 patch0b_7
+	 96 patch0c_0
+	 97 patch0c_1
+	 98 patch0c_2
+	 99 patch0c_3
+	100 patch0c_4
+	101 patch0c_5
+	102 patch0c_6
+	103 patch0c_7
+	104 patch0d_0
+	105 patch0d_1
+	106 patch0d_2
+	107 patch0d_3
+	108 patch0d_4
+	109 patch0d_5
+	110 patch0d_6
+	111 patch0d_7
+	112 patch0e_0
+	113 patch0e_1
+	114 patch0e_2
+	115 patch0e_3
+	116 patch0e_4
+	117 patch0e_5
+	118 patch0e_6
+	119 patch0e_7
+	120 patch0f_0
+	121 patch0f_1
+	122 patch0f_2
+	123 patch0f_3
+	124 patch0f_4
+	125 patch0f_5
+	126 patch0f_6
+	127 patch0f_7
+	128 patch10_0
+	129 patch10_1
+	130 patch10_2
+	131 patch10_3
+	132 patch10_4
+	133 patch10_5
+	134 patch10_6
+	135 patch10_7
+	136 patch11_0
+	137 patch11_1
+	138 patch11_2
+	139 patch11_3
+	140 patch11_4
+	141 patch11_5
+	142 patch11_6
+	143 patch11_7
+	144 patch12_0
+	145 patch12_1
+	146 patch12_2
+	147 patch12_3
+	148 patch12_4
+	149 patch12_5
+	150 patch12_6
+	151 patch12_7
+	152 patch13_0
+	153 patch13_1
+	154 patch13_2
+	155 patch13_3
+	156 patch13_4
+	157 patch13_5
+	158 patch13_6
+	159 patch13_7
+	160 patch14_0
+	161 patch14_1
+	162 patch14_2
+	163 patch14_3
+	164 patch14_4
+	165 patch14_5
+	166 patch14_6
+	167 patch14_7
+	168 patch15_0
+	169 patch15_1
+	170 patch15_2
+	171 patch15_3
+	172 patch15_4
+	173 patch15_5
+	174 patch15_6
+	175 patch15_7
+	176 patch16_0
+	177 patch16_1
+	178 patch16_2
+	179 patch16_3
+	180 patch16_4
+	181 patch16_5
+	182 patch16_6
+	183 patch16_7
+	184 patch17_0
+	185 patch17_1
+	186 patch17_2
+	187 patch17_3
+	188 patch17_4
+	189 patch17_5
+	190 patch17_6
+	191 patch17_7
+	192 patch18_0
+	193 patch18_1
+	194 patch18_2
+	195 patch18_3
+	196 patch18_4
+	197 patch18_5
+	198 patch18_6
+	199 patch18_7
+	200 patch19_0
+	201 patch19_1
+	202 patch19_2
+	203 patch19_3
+	204 patch19_4
+	205 patch19_5
+	206 patch19_6
+	207 patch19_7
+	208 patch1a_0
+	209 patch1a_1
+	210 patch1a_2
+	211 patch1a_3
+	212 patch1a_4
+	213 patch1a_5
+	214 patch1a_6
+	215 patch1a_7
+	216 patch1b_0
+	217 patch1b_1
+	218 patch1b_2
+	219 patch1b_3
+	220 patch1b_4
+	221 patch1b_5
+	222 patch1b_6
+	223 patch1b_7
+	224 patch1c_0
+	225 patch1c_1
+	226 patch1c_2
+	227 patch1c_3
+	228 patch1c_4
+	229 patch1c_5
+	230 patch1c_6
+	231 patch1c_7
+	232 patch1d_0
+	233 patch1d_1
+	234 patch1d_2
+	235 patch1d_3
+	236 patch1d_4
+	237 patch1d_5
+	238 patch1d_6
+	239 patch1d_7
+	240 patch1e_0
+	241 patch1e_1
+	242 patch1e_2
+	243 patch1e_3
+	244 patch1e_4
+	245 patch1e_5
+	246 patch1e_6
+	247 patch1e_7
+	248 patch1f_0
+	249 patch1f_1
+	250 patch1f_2
+	251 patch1f_3
+	252 patch1f_4
+	253 patch1f_5
+	254 patch1f_6
+	255 patch1f_7
+	  0 patch20_0
+	  1 patch20_1
+	  2 patch20_2
+	  3 patch20_3
+	  4 patch20_4
+	  5 patch20_5
+	  6 patch20_6
+	  7 patch20_7
+	  8 patch21_0
+	  9 patch21_1
+	 10 patch21_2
+	 11 patch21_3
+	 12 patch21_4
+	 13 patch21_5
+	 14 patch21_6
+	 15 patch21_7
+	 16 patch22_0
+	 17 patch22_1
+	 18 patch22_2
+	 19 patch22_3
+	 20 patch22_4
+	 21 patch22_5
+	 22 patch22_6
+	 23 patch22_7
+	 24 patch23_0
+	 25 patch23_1
+	 26 patch23_2
+	 27 patch23_3
+	 28 patch23_4
+	 29 patch23_5
+	 30 patch23_6
+	 31 patch23_7
+	 32 patch24_0
+	 33 patch24_1
+	 34 patch24_2
+	 35 patch24_3
+	 36 patch24_4
+	 37 patch24_5
+	 38 patch24_6
+	 39 patch24_7
+	 40 patch25_0
+	 41 patch25_1
+	 42 patch25_2
+	 43 patch25_3
+	 44 patch25_4
+	 45 patch25_5
+	 46 patch25_6
+	 47 patch25_7
+	 48 patch26_0
+	 49 patch26_1
+	 50 patch26_2
+	 51 patch26_3
+	 52 patch26_4
+	 53 patch26_5
+	 54 patch26_6
+	 55 patch26_7
+	 56 patch27_0
+	 57 patch27_1
+	 58 patch27_2
+	 59 patch27_3
+	 60 patch27_4
+	 61 patch27_5
+	 62 patch27_6
+	 63 patch27_7
+	 64 patch28_0
+	 65 patch28_1
+	 66 patch28_2
+	 67 patch28_3
+	 68 patch28_4
+	 69 patch28_5
+	 70 patch28_6
+	 71 patch28_7
+	 72 patch29_0
+	 73 patch29_1
+	 74 patch29_2
+	 75 patch29_3
+	 76 patch29_4
+	 77 patch29_5
+	 78 patch29_6
+	 79 patch29_7
+	 80 patch2a_0
+	 81 patch2a_1
+	 82 patch2a_2
+	 83 patch2a_3
+	 84 patch2a_4
+	 85 patch2a_5
+	 86 patch2a_6
+	 87 patch2a_7
+	 88 patch2b_0
+	 89 patch2b_1
+	 90 patch2b_2
+	 91 patch2b_3
+	 92 patch2b_4
+	 93 patch2b_5
+	 94 patch2b_6
+	 95 patch2b_7
+	 96 patch2c_0
+	 97 patch2c_1
+	 98 patch2c_2
+	 99 patch2c_3
+	100 patch2c_4
+	101 patch2c_5
+	102 patch2c_6
+	103 patch2c_7
+	104 patch2d_0
+	105 patch2d_1
+	106 patch2d_2
+	107 patch2d_3
+	108 patch2d_4
+	109 patch2d_5
+	110 patch2d_6
+	111 patch2d_7
+	112 patch2e_0
+	113 patch2e_1
+	114 patch2e_2
+	115 patch2e_3
+	116 patch2e_4
+	117 patch2e_5
+	118 patch2e_6
+	119 patch2e_7
+	120 patch2f_0
+	121 patch2f_1
+	122 patch2f_2
+	123 patch2f_3
+	124 patch2f_4
+	125 patch2f_5
+	126 patch2f_6
+	127 patch2f_7
+	128 patch30_0
+	129 patch30_1
+	130 patch30_2
+	131 patch30_3
+	132 patch30_4
+	133 patch30_5
+	134 patch30_6
+	135 patch30_7
+	136 patch31_0
+	137 patch31_1
+	138 patch31_2
+	139 patch31_3
+	140 patch31_4
+	141 patch31_5
+	142 patch31_6
+	143 patch31_7
+	144 patch32_0
+	145 patch32_1
+	146 patch32_2
+	147 patch32_3
+	148 patch32_4
+	149 patch32_5
+	150 patch32_6
+	151 patch32_7
+	152 patch33_0
+	153 patch33_1
+	154 patch33_2
+	155 patch33_3
+	156 patch33_4
+	157 patch33_5
+	158 patch33_6
+	159 patch33_7
+	160 patch34_0
+	161 patch34_1
+	162 patch34_2
+	163 patch34_3
+	164 patch34_4
+	165 patch34_5
+	166 patch34_6
+	167 patch34_7
+	168 patch35_0
+	169 patch35_1
+	170 patch35_2
+	171 patch35_3
+	172 patch35_4
+	173 patch35_5
+	174 patch35_6
+	175 patch35_7
+	176 patch36_0
+	177 patch36_1
+	178 patch36_2
+	179 patch36_3
+	180 patch36_4
+	181 patch36_5
+	182 patch36_6
+	183 patch36_7
+	184 patch37_0
+	185 patch37_1
+	186 patch37_2
+	187 patch37_3
+	188 patch37_4
+	189 patch37_5
+	190 patch37_6
+	191 patch37_7
+	192 patch38_0
+	193 patch38_1
+	194 patch38_2
+	195 patch38_3
+	196 patch38_4
+	197 patch38_5
+	198 patch38_6
+	199 patch38_7
+	200 patch39_0
+	201 patch39_1
+	202 patch39_2
+	203 patch39_3
+	204 patch39_4
+	205 patch39_5
+	206 patch39_6
+	207 patch39_7
+	208 patch3a_0
+	209 patch3a_1
+	210 patch3a_2
+	211 patch3a_3
+	212 patch3a_4
+	213 patch3a_5
+	214 patch3a_6
+	215 patch3a_7
+	216 patch3b_0
+	217 patch3b_1
+	218 patch3b_2
+	219 patch3b_3
+	220 patch3b_4
+	221 patch3b_5
+	222 patch3b_6
+	223 patch3b_7
+	224 patch3c_0
+	225 patch3c_1
+	226 patch3c_2
+	227 patch3c_3
+	228 patch3c_4
+	229 patch3c_5
+	230 patch3c_6
+	231 patch3c_7
+	232 patch3d_0
+	233 patch3d_1
+	234 patch3d_2
+	235 patch3d_3
+	236 patch3d_4
+	237 patch3d_5
+	238 patch3d_6
+	239 patch3d_7
+	240 patch3e_0
+	241 patch3e_1
+	242 patch3e_2
+	243 patch3e_3
+	244 patch3e_4
+	245 patch3e_5
+	246 patch3e_6
+	247 patch3e_7
+	248 patch3f_0
+	249 patch3f_1
+	250 patch3f_2
+	251 patch3f_3
+	252 patch3f_4
+	253 patch3f_5
+	254 patch3f_6
+	255 patch3f_7
+
+)
Index: format/regs.format
===================================================================
--- /branch/usb/usb_public_base/format/regs.format	(revision 0)
+++ /branch/usb/usb_public_base/format/regs.format	(working copy)
@@ -0,0 +1,532 @@
+(
+	0x8000 core_chipid
+	0x8003 core_kick
+	0x8004 core_write_wdt
+	0x8005 core_lpm_wr
+	0x8006 core_misc_ctrl
+	0x8007 core_otp_rdata
+	0x800a core_ccm_ctrl
+	0x800b core_write_wdt2
+	0x8010 core_reset
+	0x8011 core_encrypt
+	0x8012 core_lpm_wr2
+	0x8022 core_ucode_hi
+	0x8023 core_ucode_ctrl
+	0x8024 core_ucode_low
+	0x8025 core_ucode_data
+
+	0x8040 core_halfslot
+	0x8042 core_clksel
+	0x8043 core_uart_clksel
+	0x8043 core_config
+	0x8044 core_xtal_stable_time
+	0x8045 core_otp_addr
+	0x8046 core_otp_din
+	0x8047 core_otp_ctrl
+	0x8048 core_otpd_addr
+	0x804a core_otpd_len
+	0x804b core_otpd_ctrl
+	0x804c core_lpm_reg
+	0x804f core_lpm_isogate
+	0x8050 core_clkoff
+	0x8052 core_uart_baud
+	0x8053 core_sum_en
+	0x8054 core_uart_rsaddr
+	0x8056 core_uart_readdr
+	0x8058 core_uart_rrptr
+	0x805a core_uart_tsaddr
+	0x805c core_uart_teaddr
+	0x805e core_uart_twptr
+	0x8060 core_uart_ctrl
+	0x8061 core_nec_start_addr
+	0x8063 core_nec_end_addr
+	0x8065 core_nec_rptr
+	0x8067 core_nec_control
+	0x8068 core_ccm_input_playload_addr
+	0x806a core_ccm_output_playload_addr
+	0x806c core_ccm_aad0
+	0x806d core_ccm_aad1
+	0x806e core_ccm_aad2
+	0x806f core_aes_en
+	0x8070 core_gpio_conf
+	0x807e core_keybuf_saddr
+	0x8080 core_spid_ctrl
+	0x8081 core_spid_delay
+	0x8082 core_spid_txlen
+	0x8084 core_spid_txaddr
+	0x8086 core_spid_rxaddr
+	0x8088 core_spid_rxlen
+	0x808a core_iicd_ctrl
+	0x808b core_iicd_scl_low
+	0x808c core_iicd_scl_high
+	0x808d core_iicd_start_setup
+	0x808e core_iicd_start_hold
+	0x808f core_iicd_stop_setup
+	0x8090 core_iicd_data_setup
+	0x8091 core_iicd_data_hold
+	0x8092 core_iicd_txlen
+	0x8094 core_iicd_txaddr
+	0x8096 core_iicd_rxaddr
+	0x8098 core_iicd_rxlen
+	0x809a core_pwm_en
+	0x809b core_pwm_init
+	0x809c core_pwm_pcnt0
+	0x809e core_pwm_ncnt0
+	0x80a0 core_pwm_pcnt1
+	0x80a2 core_pwm_ncnt1
+	0x80a4 core_pwm_pcnt2
+	0x80a6 core_pwm_ncnt2
+	0x80a8 core_pwm_pcnt3
+	0x80aa core_pwm_ncnt3
+	0x80ac core_pwm_pcnt4
+	0x80ae core_pwm_ncnt4
+	0x80b0 core_pwm_pcnt5
+	0x80b2 core_pwm_ncnt5
+	0x80b4 core_pwm_pcnt6
+	0x80b6 core_pwm_ncnt6
+	0x80b8 core_pwm_pcnt7
+	0x80ba core_pwm_ncnt7
+	0x80bc core_ac_ctrl
+	0x80bf core_ac_saddr
+	0x80c1 core_ccm_inptr
+	0x80c3 core_pwm_sync
+	0x80c5 core_pwm_autoload
+	0x80c6 core_sum_ctrl
+	
+	0x8108 core_misc_status
+	0x8109 core_qdec_cntx
+	0x810a core_watchdog_cnt
+	0x810b core_uart_status
+	0x810c core_uart_rbaud
+	0x810e core_uart_txitems
+	0x8110 core_uart_trptr
+	0x8112 core_uart_rxitems
+	0x8114 core_uart_rdptr
+	0x8116 core_uart_rwptr
+	0x8118 core_debug_baud
+	0x811a core_ccm_outptr
+	0x811c core_gpio_in
+	0x811d core_gpio_in1
+	0x811e core_ucode_flag
+	0x811f core_peripheral_lock
+	0x8120 core_nec_wptr
+	0x8122 core_current_otp_addr
+	0x8124 core_spid_remain
+	0x8126 core_iicd_remain
+	0x8128 core_dma_status
+	0x8129 core_perf_status
+	0x812a core_adc_in
+	0x812c core_nec_rxitem
+	0x8130 core_lpm_ctrl
+	0x8134 core_lpm_xtalcnt
+	0x8135 core_lpm_buckcnt
+	0x8136 core_lpm_ldocnt
+	0x8137 core_lpm_latch
+	0x8138 core_lpm_ctrl2
+	0x813c core_gpio_wakeup_low
+	0x8140 core_gpio_wakeup_high
+	0x8144 core_aes_decode_key_init
+	0x8145 core_clk_counter
+	0x814c core_adc_sum
+	0x814e core_mpu_s0_saddr
+	0x8150 core_mpu_s0_eaddr
+	0x8152 core_mpu_s1_saddr
+	0x8154 core_mpu_s1_eaddr
+	
+	0x8203 core_ice_ctrl
+	0x8204 core_ice_status
+	0x8205 core_ice_break0
+	0x8207 core_ice_break1
+  
+
+	0x8900 modem_en
+	0x8960 core_rf_rx_agc_ctrl
+	0x8961 core_rf_rx_gain_fix
+	0x8968 core_agc_wb_sat_th
+	0x8969 core_agc_nb_sat_th
+	0x89a0 modem_rssi
+	0x89a1 modem_wb_pow
+	0x89a2 modem_nb_pow
+	0x89a3 modem_gain
+	0x89a4 modem_status
+
+	0x89f0 fpga_rf_gain
+	0x89f1 fpga_rf_gain_ctrl
+	0x89f2 fpga_uart_ctrl
+	0x89f3 fpga_uart_wdata
+	0x89f4 fpga_uart_rdata
+	0x89f5 fpga_uart_status
+
+	0x8a00 core_clkpll_ctrl0              
+	0x8a01 core_clkpll_ctrl1              
+	0x8a02 core_clkpll_ctrl2              
+	0x8a03 core_clkpll_cfg0               
+	0x8a04 core_clkpll_cfg1               
+	0x8a05 core_clkpll_cfg2               
+	0x8a06 core_clkpll_cfg3               
+	0x8a07 core_clkpll_cfg4               
+	0x8a08 core_clkpll_cfg5               
+	0x8a09 core_clkpll_cfg6               
+	0x8a0a core_rf_ldo_en0                
+	0x8a0b core_rf_ldo_en1                
+	0x8a0c core_rf_ldo_cfg0               
+	0x8a0d core_rf_ldo_cfg1               
+	0x8a0e core_rf_ldo_cfg2               
+	0x8a0f core_rf_ldo_cfg3               
+	0x8a10 core_rf_ldo_cfg4               
+	0x8a11 core_rf_ldo_cfg5               
+	0x8a12 core_rf_ldo_cfg6               
+	0x8a13 core_rf_ldo_cfg7               
+	0x8a14 core_rf_ldo_cfg8               
+	0x8a15 core_rf_ldo_cfg9               
+	0x8a16 core_syn_en                    
+	0x8a17 core_rx_en0                    
+	0x8a18 core_rx_en1                    
+	0x8a19 core_tx_en0                    
+	0x8a1a core_tx_en1                    
+	0x8a1b core_force_ctrl                
+	0x8a1c core_rx_lna_gc_gc0             
+	0x8a1d core_rx_lna_gc_gc1             
+	0x8a1e core_rx_lna_gc_gc2             
+	0x8a1f core_rx_lna_gc_gc3             
+	0x8a20 core_rx_lna_gc_gc4             
+	0x8a21 core_rx_lna_gc_gc5             
+	0x8a22 core_rx_lna_gc_gc6             
+	0x8a23 core_rx_lna_gc_gc7             
+	0x8a24 core_rx_lna_gc_gc8             
+	0x8a25 core_rx_lna_hg_isel_gc6        
+	0x8a26 core_rx_lna_hg_isel_gc7        
+	0x8a27 core_rx_lna_hg_isel_gc8        
+	0x8a28 core_rx_lna_lg_isel_gc0        
+	0x8a29 core_rx_lna_lg_isel_gc1        
+	0x8a2a core_rx_lna_lg_isel_gc2        
+	0x8a2b core_rx_lna_lg_isel_gc3        
+	0x8a2c core_rx_lna_lg_isel_gc4        
+	0x8a2d core_rx_lna_lg_isel_gc5        
+	0x8a2e core_rx_bq_gc_gc0              
+	0x8a2f core_rx_bq_gc_gc1              
+	0x8a30 core_rx_bq_gc_gc2              
+	0x8a31 core_rx_bq_gc_gc3              
+	0x8a32 core_rx_bq_gc_gc4              
+	0x8a33 core_rx_bq_gc_gc5              
+	0x8a34 core_rx_bq_gc_gc6              
+	0x8a35 core_rx_bq_gc_gc7              
+	0x8a36 core_rx_bq_gc_gc8              
+	0x8a37 core_rx_gain_force             
+	0x8a38 core_rx_lna_isel_force         
+	0x8a39 core_tx_pwr_ctrl0              
+	0x8a3a core_tx_pwr_ctrl1              
+	0x8a3b core_tx_pwr_ctrl2              
+	0x8a3c core_tx_pwr_ctrl3              
+	0x8a3d core_syn_top_ctrl              
+	0x8a3e core_syn_mmd_cp_ctrl           
+	0x8a3f core_syn_divr_int              
+	0x8a40 core_syn_divr_frac2            
+	0x8a41 core_syn_divr_frac1            
+	0x8a42 core_syn_divr_frac0            
+	0x8a43 core_syn_cal_ctrl              
+	0x8a44 core_rx_tiai_dcoc_gc0          
+	0x8a45 core_rx_tiaq_dcoc_gc0          
+	0x8a46 core_rx_tiai_dcoc_gc1          
+	0x8a47 core_rx_tiaq_dcoc_gc1          
+	0x8a48 core_rx_tiai_dcoc_gc2          
+	0x8a49 core_rx_tiaq_dcoc_gc2          
+	0x8a4a core_rx_tiai_dcoc_gc3          
+	0x8a4b core_rx_tiaq_dcoc_gc3          
+	0x8a4c core_rx_tiai_dcoc_gc4          
+	0x8a4d core_rx_tiaq_dcoc_gc4          
+	0x8a4e core_rx_tiai_dcoc_gc5          
+	0x8a4f core_rx_tiaq_dcoc_gc5          
+	0x8a50 core_rx_tiai_dcoc_gc6          
+	0x8a51 core_rx_tiaq_dcoc_gc6          
+	0x8a52 core_rx_tiai_dcoc_gc7          
+	0x8a53 core_rx_tiaq_dcoc_gc7          
+	0x8a54 core_rx_tiai_dcoc_gc8          
+	0x8a55 core_rx_tiaq_dcoc_gc8          
+	0x8a56 core_rx_bq_daci_gc0            
+	0x8a57 core_rx_bq_dacq_gc0            
+	0x8a58 core_rx_bq_daci_gc1            
+	0x8a59 core_rx_bq_dacq_gc1            
+	0x8a5a core_rx_bq_daci_gc2            
+	0x8a5b core_rx_bq_dacq_gc2            
+	0x8a5c core_rx_bq_daci_gc3            
+	0x8a5d core_rx_bq_dacq_gc3            
+	0x8a5e core_rx_bq_daci_gc4            
+	0x8a5f core_rx_bq_dacq_gc4            
+	0x8a60 core_rx_bq_daci_gc5            
+	0x8a61 core_rx_bq_dacq_gc5            
+	0x8a62 core_rx_bq_daci_gc6            
+	0x8a63 core_rx_bq_dacq_gc6            
+	0x8a64 core_rx_bq_daci_gc7            
+	0x8a65 core_rx_bq_dacq_gc7            
+	0x8a66 core_rx_bq_daci_gc8            
+	0x8a67 core_rx_bq_dacq_gc8            
+	0x8a68 core_rx_tiai_dcoc_force        
+	0x8a69 core_rx_tiaq_dcoc_force        
+	0x8a6a core_rx_bq_daci_force          
+	0x8a6b core_rx_bq_dacq_force          
+	0x8a6c core_rx_bq_bw_cal              
+	0x8a6d core_rx_bq_cfg0                
+	0x8a6e core_rx_bq_cfg1                
+	0x8a6f core_rx_bq_cfg2                
+	0x8a70 core_rx_bq_cfg3                
+	0x8a71 core_rx_bq_cfg4                
+	0x8a72 core_rx_lna_cfg0               
+	0x8a73 core_rx_lna_cfg1               
+	0x8a74 core_rx_lna_cfg2               
+	0x8a75 core_rx_lna_cfg3               
+	0x8a76 core_rx_mixer_cfg0             
+	0x8a77 core_rx_mixer_cfg1             
+	0x8a78 core_rx_mixer_cfg2             
+	0x8a79 core_rx_adc_clk_cfg            
+	0x8a7a core_rx_iqadc_cfg              
+	0x8a7b core_rx_rssiadc_cfg            
+	0x8a7c core_syn_state0                
+	0x8a7d core_syn_state1                
+	0x8a7e core_syn_bias_cfg              
+	0x8a7f core_syn_cdb_cfg0              
+	0x8a80 core_syn_cdb_cfg1              
+	0x8a81 core_syn_cdb_cfg2              
+	0x8a82 core_syn_cdb_cfg3              
+	0x8a83 core_syn_pfd_lkd_cfg           
+	0x8a84 core_syn_cp_lpf_cfg            
+	0x8a85 core_syn_loopdiv_dsm_cfg       
+	0x8a86 core_syn_afc_cfg0              
+	0x8a87 core_syn_afc_cfg1              
+	0x8a88 core_syn_afc_cfg2              
+	0x8a89 core_syn_afc_cfg3              
+	0x8a8a core_syn_aac_cfg0              
+	0x8a8b core_syn_aac_cfg1              
+	0x8a8c core_logen_process_cal0        
+	0x8a8d core_logen_process_cal1        
+	0x8a8e core_logen_process_cal2        
+	0x8a8f core_logen_process_cal3        
+	0x8a90 core_logen_process_cal4        
+	0x8a91 core_logen_process_cal5        
+	0x8a92 core_logen_process_cal6        
+	0x8a93 core_logen_process_cal7        
+	0x8a94 core_logen_process_cal8        
+	0x8a95 core_logen_process_ca9         
+	0x8a96 core_logen_process_ca10        
+	0x8a97 core_gpadc_ctrl                
+	0x8a98 core_tx_abb_cfg                
+	0x8a99 core_tx_mixer_cfg0             
+	0x8a9a core_tx_mixer_cfg1             
+	0x8a9b core_tx_mixer_cfg2             
+	0x8a9c core_tx_pa_cfg                 
+	0x8a9d core_syn_tst_ctrl              
+	0x8a9e core_ana_test_control0         
+	0x8a9f core_ana_test_control1         
+	0x8aa0 rfen_chgpump
+	0x8aa1 rfen_chgpump_ctrl1
+	0x8aa2 rfen_chgpump_ctrl2
+
+	0x8c00 core_usb_config
+	0x8c01 core_usb_int_mask
+	0x8c02 core_usb_addr
+	0x8c03 core_usb_rx_saddr
+	0x8c05 core_usb_rx_eaddr
+	0x8c07 core_usb_rxptr
+	0x8c09 core_usb_tx_saddr0
+	0x8c0b core_usb_tx_saddr1
+	0x8c0d core_usb_tx_saddr2
+	0x8c0f core_usb_tx_saddr3
+	0x8c11 core_usb_hmode
+	0x8c18 core_usb_trig
+	0x8c19 core_usb_stall
+	0x8c1a core_usb_clear		//7bit reset   
+	0x8c20 core_usb_rx_wptr
+	0x8c22 core_usb_stall_status
+	0x8c23 core_usb_status
+	0x8c24 core_usb_txbusy
+	0x8c25 core_usb_sof_cntl
+	0x8c26 core_usb_sof_cnth
+
+	
+
+
+
+    
+    
+)
+
+(
+1 otpd_start
+)
+
+(
+4 rx_freq_offset
+2 tx_freq_offset
+)
+
+(
+/* bit difinitions */
+  4 whiteoff_bit
+  6 clksel_rc
+  1 clksel_dpll_24M
+  5 clksel_dpll
+  4 clksel_xtal
+  5 adc_rccal
+  0 bpf_rccal
+  1 demod_clkoff
+)
+
+(
+  2 reload_code
+  3 gpio_latch
+  4 enable_retmem
+  7 cold_wake
+  0xef isogate_mask
+  0xe0 cs_mask
+)
+
+
+// misc ctrl
+(
+  0X02 SPID_START
+  0X04 IICD_START
+  0X08 LOCK_OTP
+  0X10 X_SETHI
+  0X20 Y_SETHI
+  0X40 Z_SETHI
+  0X80 CCNT_START
+)
+// DMA STATUS BIT
+(
+  0 OTPD_CRCOK
+  1 OTPD_DONE
+  2 SPID_CRCOK
+  3 SPID_DONE
+  4 IICD_CRCOK
+  5 IICD_DONE
+  6 IICD_ACK
+)
+
+//bit map of core_uart_status
+(
+1 UART_STATUS_TX_BUSY
+2 UART_STATUS_RX_FIFO_EMPTY
+3 UART_STATUS_RX_FIFO_FULL
+4 UARTB_STATUS_TX_BUSY
+5 UARTB_STATUS_RX_FIFO_EMPTY
+6 UARTB_STATUS_RX_FIFO_FULL
+)
+
+(//core_uart_clksel
+0 UART_CLOCK_SELECT_BIT
+0xFE UART_CLOCK_SELECT_CRYSTAL
+0x01 UART_CLOCK_SELECT_DPLL
+
+24000000 uart_clock_freq_24M
+48000000 uart_clock_freq_48M
+)
+
+
+(//bit map of core_uart_ctrl
+0 BIT_UART_CONTROL_ENABLE
+1 BIT_UART_CONTROL_PARITY
+2 BIT_UART_CONTROL_DATA_LENGTH
+3 BIT_UART_CONTROL_STOP_BIT_SIZE
+4 BIT_UART_CONTROL_FLOW_CONTROL
+5 BIT_UART_CONTROL_7816_SMART_CARD_PROTOCOL
+6 BIT_UART_CONTROL_HALF_DUPLEX_SINGLE_LINE_UART
+7 BIT_UART_CONTROL_RATE_BAUD_SETTING
+)
+(//FUN of core_uart_ctrl
+0x01 FUN_UART_CONTROL_ENABLE
+0x06 FUN_UART_CONTROL_PARITY_ODD
+0x04 FUN_UART_CONTROL_PARITY_EVEN
+0x08 FUN_UART_CONTROL_STOP_2BIT
+0x00 FUN_UART_CONTROL_STOP_1BIT
+0x10 FUN_UART_CONTROL_FLOW_CONTROL_ENABLE
+0x20 FUN_UART_CONTROL_7816_SMART_CARD_PROTOCOL
+0x40 FUN_UART_CONTROL_HALF_DUPLEX_SINGLE_LINE_UART
+0x80 FUN_UART_CONTROL_SETTING_RATE_BAUD
+)
+
+(//bit map of core_nec_control
+0x00 BIT_NEC_ENABLE
+0x01 BIT_NEC_CLK_DIVIDE_NUM
+)
+
+(//FUN  of core_nec_control
+0x01 FUN_NEC_ENABLE
+0x30 FUN_NEC_CLK_DIVIDE_24	//24M , 
+)
+
+0x8b uart_ctrl_default //BCSP
+0x81 uart_ctrl_h4 //H4
+0x81 uart_ctrl_normal
+0x91 uart_ctrl_5line
+0x81 uart_ctrl_57600
+2 uart_baud_len
+0x00 uartclk_crystal
+0x01 uartclk_dpll
+0x1a0 uart_baud_115200
+0xbb uart_baud_256000
+0x340 uart_baud_57600
+0x34 uart_baud_921600
+0x9c4 uart_baud_9600
+
+//core_clkoff
+(
+	0 CLOCK_OFF_AUTH_ROM
+	1 CLOCK_OFF_UC_ROM
+	2 CLOCK_OFF_DEBUG_UART
+	3 CLOCK_OFF_SCHED_RAM
+	4 CLOCK_OFF_TRANCE_FIFO
+	5 CLOCK_OFF_CORDIC
+	6 CLOCK_OFF_OTPD
+	7 CLOCK_OFF_I2C
+	8 CLICK_OFF_8051
+	9 CLOCK_OFF_KEYSCAN
+	0x0a CLOCK_OFF_USB
+	0x0b CLOCK_OFF_QDECODER
+	0x0c CLOCK_OFF_SPI
+	0x0d CLOCK_OFF_PWM
+	0x0e CLOCK_OFF_UARTB
+	0x0f CLOCK_OFF_UART
+)
+
+// gpio config types
+(
+  0 gpcfg_input
+  
+  8 gpcfg_uart_txd
+  9 gpcfg_uart_rxd
+  10 gpcfg_uart_rts
+  11 gpcfg_uart_cts
+  
+  16 gpcfg_pwm_out0
+  17 gpcfg_pwm_out1
+  18 gpcfg_pwm_out2
+  19 gpcfg_pwm_out3
+  20 gpcfg_pwm_out4
+  21 gpcfg_pwm_out5
+  22 gpcfg_pwm_out6
+  23 gpcfg_pwm_out7
+  24 gpcfg_nec_input
+  25 gpcfg_ac_input
+  
+  31 gpcfg_spid_miso
+  32 gpcfg_spid_ncs
+  33 gpcfg_spid_sck
+  34 gpcfg_spid_mosi
+  35 gpcfg_spid_sdio
+  
+  44 gpcfg_iic_scl
+  45 gpcfg_iic_sda
+  
+  62 gpcfg_output_low
+  63 gpcfg_output_high
+  
+  0x00 gpcfg_high_impedance
+  0x40 gpcfg_pullup
+  0x80 gpcfg_pulldown
+  0xc0 gpcfg_no_ie
+)
+
+(
+13 GPIO_NUMBER
+)
+
Index: format/security.format
===================================================================
--- /branch/usb/usb_public_base/format/security.format	(revision 0)
+++ /branch/usb/usb_public_base/format/security.format	(working copy)
@@ -0,0 +1,52 @@
+
+memalloc (
+16 mem_input_store
+
+2 mem_ec_loopc
+1 mem_aes_cmac_data_length
+/* ecc calculation */
+32 mem_ax_256 //32 bytes
+32 mem_ay_256 // 32 bytes
+32 mem_az_256 // 32 bytes
+32 mem_bx_256 // 32 bytes
+32 mem_by_256 // 31 bytes
+
+32 mem_bz_256  //32 bytes
+32 mem_cx_256  //32 bytes
+31 mem_cy_256  // 32 bytes
+1 mem_cy5_256 // 1 byte
+32 mem_cz_256 // 32 bytes
+32 mem_k_256 //32 bytes
+32  mem_tmp1_256 //32 bytes
+
+32 mem_tmp5_256
+32  mem_tmp2_256
+0 mem_tmp3_256
+32 mem_t1_256
+0 mem_tmp0_256
+0 mem_dat
+32 mem_t0_256
+32 mem_t2_256
+32 mem_t3_256
+32 mem_t7_256
+
+
+32 mem_p_256		
+32 mem_a_256
+32 mem_gx_256
+32 mem_gy_256
+16 mem_le_slat
+
+)
+
+xmemalloc(
+5 mem_ccm_pcnt_tx
+5 mem_ccm_pcnt_rx
+4 mem_ccm_last_mic
+0 mem_ccm_iv
+4 mem_ccm_ivm
+4 mem_ccm_ivs
+2 mem_ccm_len
+2 mem_ccm_rx_ptr
+)
+
Index: format/simple_pairing.format
===================================================================
--- /branch/usb/usb_public_base/format/simple_pairing.format	(revision 0)
+++ /branch/usb/usb_public_base/format/simple_pairing.format	(working copy)
@@ -0,0 +1,68 @@
+
+ifdef SECURE_CONNECTION
+
+memalloc(
+0 mem_sp_state_start
+1 mem_sp_dhkey_invalid
+4 mem_gkey
+0 mem_sp_state_end
+
+32 mem_le_pubkey_remote_x_256
+32 mem_le_pubkey_remote_y_256
+32 mem_le_dhkey_256
+
+16 mem_sp_confirm_remote
+)
+
+xmemalloc(
+1 mem_sc_only_mode
+1 mem_sp_debug_mode
+1 mem_secure_connections_enable
+1 mem_sc_calc
+1 mem_sc_local_key_invalid
+
+
+32 mem_sc_private_key_256
+32 mem_sc_pubkey_local_x_256
+32 mem_sc_pubkey_local_y_256
+
+
+0 mem_sp_state_xmem
+1 mem_authentication_passkey_times
+1 mem_passkey_1bit
+0 mem_sp_state_xmem_end
+)
+endif
+
+/* simple pairing status flag */
+(
+  0x00   SP_FLAG_STANDBY
+  0x02   LE_SP_FLAG_COMMIT_256
+
+)
+
+/* simple pairing calc flag */
+(
+  0x00   SP_CALC_STANDBY
+  0x03   SP_CALC_PUBKEY_256
+  0x04   SP_CALC_DHKEY_256
+)
+
+
+
+/* simple paring invalid flag */
+(
+  0x00   SP_KEY_INVALID
+  0x03   SP_KEY_VALID_256
+
+)
+
+
+//mem_secure_connections_enable
+(
+0 SECURE_CONNECTIONS_LE_BIT
+1 SECURE_CONNECTIONS_BR_BIT
+)
+
+
+  
Index: format/ui.format
===================================================================
--- /branch/usb/usb_public_base/format/ui.format	(revision 0)
+++ /branch/usb/usb_public_base/format/ui.format	(working copy)
@@ -0,0 +1,148 @@
+/*****************************************************************************/
+/* RCS HEADER -- DO NOT ERASE                                                */
+/* $Author: Administrator $                                                           */
+/* $Id: bt_ui_format.upper,v 1.1 2009-09-28 04:06:17 Administrator Exp $     */
+/************************************************************************/
+
+
+	/* ========= memory ============== */
+memalloc(
+1 mem_ipc_skip_continue_proc
+) 
+
+xmemalloc(
+//UI Work area
+1 mem_ipc_lock_bt
+1 mem_ipc_lock_c51
+8 mem_ipc_fifo_bt2c51
+8 mem_ipc_fifo_c512bt
+
+1 mem_ui_button_timer
+1 mem_ui_button_last_state
+4 mem_ui_timer_last_btclk
+2 mem_ui_state_map
+
+1 mem_ui_button_timeout
+1 mem_ui_button_gpio
+1 mem_ui_led_init_state_set
+
+1 mem_ui_led_struct_num
+2 mem_ui_led_struct_ptr
+
+)
+
+
+//mem_ui_state_map
+(
+9 UI_STATE_BLE_CONNECTED
+10 UI_STATE_BLE_WRITE_RCV
+11 UI_STATE_BLE_ADV
+12 UI_STATE_BTN_DOWN
+)
+
+
+
+/* memui_Commands */
+(
+0 BT_CMD_STANDBY
+13 BT_CMD_START_ADV
+14 BT_CMD_STOP_ADV
+15 BT_CMD_START_DIRECT_ADV
+16 BT_CMD_STOP_DIRECT_ADV
+17 BT_CMD_LE_DISCONNECT
+18 BT_CMD_LE_UPDATE_CONN
+19 BT_CMD_LED_OFF
+20 BT_CMD_LED_ON
+21 BT_CMD_LED_BLINK
+22 BT_CMD_LE_START_CONN
+23 BT_CMD_LE_START_SCAN
+24 BT_CMD_LE_STOP_SCAN
+25 BT_CMD_ENTER_HIBERNATE
+27 BT_CMD_LE_SMP_SECURITY_REQUEST
+31 BT_CMD_STORE_RECONN_INFO_LE
+34 BT_CMD_START_24G
+35 BT_CMD_STOP_24G
+36 BT_CMD_PAIR_24G
+)
+
+(
+0x00 BT_EVT_NULL
+0x0F BT_EVT_DISCOVERY_STOPED
+0x10 BT_EVT_BUTTON_LONG_PRESSED
+0x14 BT_EVT_LE_CONNECTED
+0X15 BT_EVT_LE_DISCONNECTED
+0x17 BT_EVT_BUTTON_ENTER_HIBERNATE
+0x25 BT_EVT_BUTTON_ADJUST_DPI
+0x28 BT_EVT_LE_WRITE_REQUEST
+0x29 BT_EVT_LE_ENC_INFO
+0x2c BT_EVT_BUTTON_DOWN
+0x2d BT_EVT_BUTTON_UP
+0x2e BT_EVT_REMOTE_UNSNIFF
+0x30 BT_EVT_LE_PAIRING_FAIL
+0x31 BT_EVT_LE_PAIRING_SUCCESS
+0x32 BT_EVT_LE_START_ENC
+0X33 BT_EVT_LE_PAUSE_ENC
+0X34 BT_EVT_LE_TK_GENERATE
+0x35 BT_EVT_BT_GKEY_GENERATE
+0x36 BT_EVT_BT_GET_PASSKEY
+0x39 BT_EVT_24G_PAIRING_COMPLETE
+0x3a BT_EVT_24G_ATTEMPT_FAIL
+0x3b BT_EVT_LE_GKEY_GENERATE
+0x3c BT_EVT_24G_ATTEMPT_SUCCESS
+0x3d BT_EVT_STORE_NVRAM
+0x3e BT_EVT_LE_PAIRING_COMPLETE
+0x3F BT_EVT_LE_RECONNECT_COMPLETE
+0x40 BT_EVT_LE_PARSE_CONN_PAPA_UPDATE_RSP
+0x41 BT_EVT_LE_LTK_LOST
+0x42 BT_EVT_LE_UPDATE_PHY
+0x43 BT_EVT_LE_GET_PASSKEY
+0x44 BT_EVT_LE_PARSE_CONN_PARAM_ACCEPTED
+)
+//switch
+(
+0 OFF
+1 ON
+)
+
+
+(
+	160 UI_HUNDRED_MILLISECOND_TIME
+	0XFF UI_BUTTON_GPIO_DISABLE
+)
+
+(
+0x00 UI_BUTTON_STATE_DOWN
+0x01 UI_BUTTON_STATE_UP
+)
+
+//mem_ipc_skip_continue_proc
+(
+	0 IPC_CONTINUE_PROCESS
+	1 IPC_SKIP_CONTINUE_PROCESS
+)
+
+
+(//led style struct 
+0 		LED_OFFSET_LED_TYPE
+1 		LED_OFFSET_BLINK_COUNT
+2		LED_OFFSET_LED_GPIO
+3		LED_OFFSET_ON_TIME
+5		LED_OFFSET_OFF_TIME
+7 		LED_OFFSET_CB_LEDON
+9		LED_OFFSET_CB_LEDOFF
+11		LED_OFFSET_LENGTH
+)
+
+(//LED state
+0 UI_LED_STATE_BLINK_STOP
+1 UI_LED_STATE_BLINK_START
+2 UI_LED_STATE_LIGHTING
+3 UI_LED_STATE_DARKING
+4 UI_LED_STATE_BLINK_LIGHTING
+5 UI_LED_STATE_BLINK_DARKING
+
+0xFF LED_INFINITE_FLASH_NUM
+
+)
+
+
Index: format/usb.format
===================================================================
--- /branch/usb/usb_public_base/format/usb.format	(revision 0)
+++ /branch/usb/usb_public_base/format/usb.format	(working copy)
@@ -0,0 +1,252 @@
+memalloc usb(
+1 mem_usb_status
+1 mem_usb_fifo_empty
+2 mem_usb_read_len
+65 mem_usb_txbuf
+10 mem_usb_txbuf1
+10 mem_usb_txbuf2
+64 mem_usb_rxbuf
+1 mem_usb_rxbuf_end
+2 mem_bufptr
+1 mem_remain
+2 mem_hidreportdesc_kb
+2 mem_hidreportdesc_m
+19 mem_devicedesc
+60 mem_confdesc
+5 mem_string0
+30 mem_string1
+30 mem_string2
+30 mem_string3
+2 mem_cb_usb_config
+
+1 mem_usb_tx_interval
+9 mem_usb_vid_pid
+2 mem_usb_zero_packet
+2 mem_usb_ones_packet
+2 mem_usb_two_packet
+1 mem_usb0_state
+1 mem_usb_offline_check_gpio
+
+0 mem_usb_clear_mem_start
+0 mem_usb_setup
+1 mem_usb_setup_bmRequestType
+1 mem_usb_setup_bRequest
+1 mem_usb_setup_bValue
+1 mem_usb_setup_bValueH
+2 mem_usb_setup_wIndex
+1 mem_usb_setup_bLength
+1 mem_usb_setup_bLengthH
+64 mem_usb0_set_report_data
+64 mem_usb0_get_report_data
+2 mem_usb_setup_bValue_temp
+1 mem_usb0_get_set_report
+1 mem_usb0_data_ready_report
+1 mem_usb_tx_win_enable
+1 mem_usb_tx_mac_enable
+1 mem_usb_idle_flag
+1 mem_usb_idle_rate
+1 mem_usb_get_protocol_flag
+1 mem_usb_set_protocol_status
+1 mem_usb_set_protocol_value
+1 mem_usb_state
+1 mem_usb_remote_wakeup
+1 mem_usb_clear_remote_wakeup
+1 mem_sdsystem_wakeup_flag
+1 mem_usb_ep0_stall_status
+1 mem_usb_ep1_stall_status
+1 mem_usb_ep2_stall_status
+1 mem_usb_ep3_stall_status
+2 mem_dsc_info_data_pointer
+1 mem_dsc_info_len
+1 mem_usb_ep1_data
+1 mem_usb_ep2_data
+1 mem_usb_tx_enable
+1 mem_usb_device_enumeration_endflag
+1 mem_usb_wakestate_onetime_flag
+1 mem_usb_mac_wakeup_trig
+1 mem_usb_set_high_addr_flag
+1 mem_usb_clear_halt
+16 mem_usb_mouse_data
+16 mem_usb_kb_data
+16 mem_usb_kb_multikey
+16 mem_usb_kb_system
+2 mem_usb_test_cnt
+10 mem_usb_test_kb
+0 mem_usb_clear_mem_end
+
+)
+
+//class type
+(
+0x00 STANDARD_REQ
+0x01 CLASS_REQ
+0x02 MANUFACTURER_REQ
+)
+//Standard Request Codes
+(
+0x00 GET_STATUS                // Code for Get Status
+0x01 CLEAR_FEATURE             // Code for Clear Feature
+0x03 SET_FEATURE              // Code for Set Feature
+0x05 SET_ADDRESS              // Code for Set Address
+0x06 GET_DESCRIPTOR           // Code for Get Descriptor
+0x07 SET_DESCRIPTOR           // Code for Set Descriptor(not used)
+0x08 GET_CONFIGURATION        // Code for Get Configuration
+0x09 SET_CONFIGURATION        // Code for Set Configuration
+0x0A GET_INTERFACE            // Code for Get Interface
+0x0B SET_INTERFACE            // Code for Set Interface
+0x0C SYNCH_FRAME              // Code for Synch Frame(not used)
+)
+//Standard Descriptor Types
+(
+0x01 DSC_DEVICE               // Device Descriptor
+0x02 DSC_CONFIG               // Configuration Descriptor
+0x03 DSC_STRING               // String Descriptor
+0x04 DSC_INTERFACE            // Interface Descriptor
+0x05 DSC_ENDPOINT             // Endpoint Descriptor
+)
+//HID Descriptor Types
+(
+0x21 DSC_HID			      // HID Class Descriptor
+0x22 DSC_HID_REPORT			  // HID Report Descriptor
+)
+//Define bmRequestType bitmaps
+(
+0x80 IN_DEVICE                // Request made to device,
+                              // direction is IN
+0x00 OUT_DEVICE               // Request made to device,
+                              // direction is OUT
+0x81 IN_INTERFACE             // Request made to interface,
+                              // direction is IN
+0x01 OUT_INTERFACE            // Request made to interface,
+                              // direction is OUT
+0x82 IN_ENDPOINT              // Request made to endpoint,
+                              // direction is IN
+0x02 OUT_ENDPOINT             // Request made to endpoint,
+)
+//HID Request Codes
+(
+0x01 GET_REPORT 		       // Code for Get Report
+0x02 GET_IDLE				   // Code for Get Idle
+0x03 GET_PROTOCOL			   // Code for Get Protocol
+0x09 SET_REPORT				   // Code for Set Report
+0x0A SET_IDLE				   // Code for Set Idle
+0x0B SET_PROTOCOL			   // Code for Set Protocol
+0xF2 HID_REPORT_ID           
+64 EP0_PACKET_SIZE         
+6 EP1_PACKET_SIZE         
+16 HID_REPORT_SIZE         
+0x001B HID_REPORT_DESCRIPTOR_SIZE    
+)
+//math cordic
+(
+0 TYPE_SIN		
+1 TYPE_ATAN	
+2 TYPE_MULT	
+3 TYPE_DIV		
+4 TYPE_ASIN	
+5 TYPE_SQRT	
+6 TYPE_COS		
+7 TYPE_TAN		 
+)
+   
+(
+0 DFIFO0_IN_EMPTY
+1 DFIFO1_IN_EMPTY
+2 DFIFO2_IN_EMPTY
+3 DFIFO3_IN_EMPTY
+4 DFIFO0_OUT_EMPTY
+5 DFIFO1_OUT_EMPTY
+6 DFIFO2_OUT_EMPTY
+7 DFIFO3_OUT_EMPTY
+)
+
+(
+)
+
+(
+0 USB_STATUS_SETUP
+1 USB_STATUS_SUSPEND
+2 USB_STATUS_NAK
+3 USB_STATUS_RESET
+4 USB_STATUS_ACK
+5 USB_STATUS_RXREADY
+6 USB_STATUS_TXEMPTY
+6 USB_STATUS_RXEMPTY
+)
+
+(
+1 USB_GOT_REPORT_REQ
+2 USB_CONNECTED
+3 USB_SLEEP
+4 USB_RESUME
+5 USB_SETIDLE_1
+)
+
+(
+0x10 USB_EP1_KB
+0x20 USB_EP2_MS
+0x21 USB_EP2_MULTIKEY
+0x22 USB_EP2_SYSTEMKEY
+0x01 MAC_BOOT_MODE
+0x02 R_KEY
+0x03 LR_KEY
+)
+
+
+(
+0x01ba PC_GET_REPORT
+0x02ba PC_SET_REPORT
+0x0200 PC_SET_REPORT_bValue
+0x0000 PC_SET_REPORT_wIndex
+0x0001 PC_SET_REPORT_bLength
+0xba PC_REPORT_ID
+
+0x01 PC_GET_DATA
+0x00 PC_GET_NONDATA
+)
+
+(
+//--------------------------------------------------
+// Define device states
+0x00 DEV_ATTACHED	// Device is in Attached State
+0x01 DEV_POWERED	// Device is in Powered State
+0x02 DEV_DEFAULT		// Device is in Default State
+0x03 DEV_ADDRESS	// Device is in Addressed State
+0x04 DEV_CONFIGURED	// Device is in Configured State
+0x05 DEV_SUSPENDED	// Device is in Suspended State
+)
+
+(
+// Define wIndex bitmaps
+0x81 IN_EP1                    // Index values used by Set and Clear
+0x01 OUT_EP1                   // commands for Endpoint_Halt
+0x82 IN_EP2              
+0x02 OUT_EP2             
+0x83 IN_EP3              
+0x03 OUT_EP3             
+)
+
+(
+0 EP0_STALL
+1 EP1_IN_STALL
+2 EP1_OUT_STALL
+3 EP2_IN_STALL
+4 EP2_OUT_STALL
+5 EP3_IN_STALL
+6 EP3_OUT_STALL
+)
+
+(
+// Define wValue bitmaps for Standard Feature Selectors
+0x00 ENDPOINT_HALT             // Endpoint_Halt feature selector
+0x01 DEVICE_REMOTE_WAKEUP      // Remote wakeup feature(not used)
+0x00 BOOT_PROTOCOL
+0x01 REPORT_PROTOCOL
+0x01 USB_MAX_NUM_CFG
+)
+
+(
+640 TIMER_NAK_DELAY
+5000 TIMER_WAKEUP_DELAY
+)
+
Index: format/utility.format
===================================================================
--- /branch/usb/usb_public_base/format/utility.format	(revision 0)
+++ /branch/usb/usb_public_base/format/utility.format	(working copy)
@@ -0,0 +1,74 @@
+
+memalloc(
+
+1 mem_fifo_temp
+
+8 mem_pdatatemp
+8 mem_temp //8 bytes
+4 mem_timeup // 4 bytes
+4 mem_rega //4 bytes
+4 mem_regb //4 bytes
+3 mem_regc //3 bytes
+2 mem_contr //2 bytes
+2 mem_contw //2 bytes
+2 mem_contus
+2 mem_contue
+2 mem_contu
+2 mem_queue
+2 mem_loopcnt
+
+ 
+1 mem_wakup_from_power_flag
+4 mem_saved_gpio_in
+
+0 mem_module_rx_error_data_buffer
+0 mem_le_adv_channel_map_temp
+0 mem_le_data_len_temp	//1byte
+0 mem_event_cmd_response_content	//2byte
+0 mem_le_prand		//16byte
+0 mem_AES_CMAC_k	 //16 bytes
+0 mem_regext_index 	//1 bytes
+1 mem_temp_block0
+0 mem_le_data_temp	//15bytes
+15 mem_temp_block1
+0 mem_le_tx_buf_temp //48byte
+0 mem_le_aes_128	//16byte
+0 mem_regext   //64 bytes
+0 mem_AES_CMAC_k1  //16 bytes
+16 mem_temp_block2
+0 mem_AES_CMAC_k2  //16 bytes
+16 mem_temp_block3
+0 mem_AES_CMAC_temp  // 16 bytes
+16 mem_temp_block4
+0 mem_AES_CMAC_M_last // 16 bytes
+1 mem_module_uart_cmd
+1 mem_module_uart_opcode
+1 mem_module_uart_len
+1 mem_module_temp_nl_discard_packet
+12 mem_temp_block5
+0 mem_le_mackey //16 bytes
+0 mem_app_receive_temp
+2 mem_key_value_temp
+2 mem_key_value
+1 mem_key_value_temp1
+1 mem_key_value_temp2
+1 mem_key_value_temp3
+1 mem_key_value_temp4
+1 mem_key_value_temp5
+1 mem_key_value_temp6
+6 mem_temp_block6
+
+3 mem_scale_ratio
+3 mem_xcnt
+2 mem_scale_ratio_temp
+)
+
+
+//util fifo param
+(
+
+8 UTIL_FIFO_LEN
+-1 UTIL_FIFO_OFFSET
+)
+
+
Index: output/auth.rom
===================================================================
--- /branch/usb/usb_public_base/output/auth.rom	(revision 0)
+++ /branch/usb/usb_public_base/output/auth.rom	(working copy)
@@ -0,0 +1,1517 @@
+01
+00
+02
+00
+28
+02
+00
+18
+02
+00
+02
+03
+28
+01
+0a
+03
+00
+02
+00
+2a
+14
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+04
+00
+02
+03
+28
+01
+02
+05
+00
+02
+01
+2a
+02
+c2
+03
+06
+00
+02
+03
+28
+01
+02
+07
+00
+02
+04
+2a
+08
+06
+00
+06
+00
+64
+00
+2c
+01
+08
+00
+02
+00
+28
+02
+01
+18
+09
+00
+02
+03
+28
+01
+20
+0a
+00
+02
+05
+2a
+00
+0b
+00
+02
+02
+29
+02
+00
+00
+0c
+00
+02
+00
+28
+02
+0a
+18
+0d
+00
+02
+03
+28
+01
+02
+0e
+00
+02
+29
+2a
+06
+59
+69
+43
+68
+69
+70
+0f
+00
+02
+03
+28
+01
+02
+10
+00
+02
+50
+2a
+07
+02
+35
+12
+22
+aa
+01
+00
+11
+00
+02
+00
+28
+02
+12
+18
+12
+00
+02
+03
+28
+01
+06
+13
+00
+02
+4e
+2a
+01
+01
+14
+00
+02
+03
+28
+01
+12
+15
+00
+02
+4d
+2a
+08
+00
+00
+00
+00
+00
+00
+00
+00
+16
+00
+02
+02
+29
+02
+00
+00
+17
+00
+02
+08
+29
+02
+02
+01
+18
+00
+02
+03
+28
+01
+1a
+19
+00
+02
+4d
+2a
+07
+00
+00
+00
+00
+00
+00
+00
+1a
+00
+02
+02
+29
+02
+00
+00
+1b
+00
+02
+08
+29
+02
+01
+01
+1c
+00
+02
+03
+28
+01
+12
+1d
+00
+02
+4d
+2a
+02
+00
+00
+1e
+00
+02
+02
+29
+02
+00
+00
+1f
+00
+02
+08
+29
+02
+03
+01
+20
+00
+02
+03
+28
+01
+12
+21
+00
+02
+4d
+2a
+02
+00
+00
+22
+00
+02
+02
+29
+02
+00
+00
+23
+00
+02
+08
+29
+02
+04
+01
+24
+00
+02
+03
+28
+01
+0e
+25
+00
+02
+4d
+2a
+02
+00
+00
+26
+00
+02
+08
+29
+02
+02
+02
+27
+00
+02
+03
+28
+01
+02
+28
+00
+02
+4b
+2a
+bd
+05
+01
+09
+02
+a1
+01
+85
+01
+09
+01
+a1
+00
+05
+09
+19
+01
+29
+08
+15
+00
+25
+01
+75
+01
+95
+08
+81
+02
+05
+01
+09
+30
+09
+31
+16
+01
+f8
+26
+ff
+07
+75
+10
+95
+02
+81
+06
+09
+38
+15
+81
+25
+7f
+75
+08
+95
+01
+81
+06
+05
+0c
+0a
+38
+02
+95
+01
+81
+06
+c0
+c0
+05
+01
+09
+06
+a1
+01
+85
+02
+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
+26
+ff
+00
+05
+07
+19
+00
+29
+ff
+81
+00
+c0
+05
+0c
+09
+01
+a1
+01
+85
+03
+19
+00
+2a
+ff
+03
+15
+00
+26
+ff
+03
+95
+01
+75
+10
+81
+00
+c0
+05
+01
+09
+80
+A1
+01
+85
+04
+15
+00
+25
+01
+75
+01
+95
+03
+19
+81
+29
+83
+81
+02
+95
+01
+75
+05
+81
+03
+C0
+29
+00
+02
+03
+28
+01
+1a
+2a
+00
+02
+33
+2a
+08
+00
+00
+00
+00
+00
+00
+00
+00
+2b
+00
+02
+02
+29
+02
+01
+00
+2c
+00
+02
+03
+28
+01
+02
+2d
+00
+02
+4a
+2a
+04
+01
+01
+00
+03
+2e
+00
+02
+00
+28
+02
+0f
+18
+2f
+00
+02
+03
+28
+01
+12
+30
+00
+02
+19
+2a
+01
+64
+31
+00
+02
+02
+29
+02
+00
+00
+32
+00
+02
+03
+28
+01
+04
+33
+00
+02
+4c
+2a
+00
+00
+00
+1a
+06
+bc
+ff
+09
+88
+a1
+01
+85
+04
+19
+00
+2a
+ff
+00
+15
+00
+26
+ff
+00
+75
+08
+95
+01
+81
+00
+c0
+3f
+05
+01
+09
+06
+a1
+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
+a3
+05
+01
+09
+02
+a1
+01
+85
+01
+09
+01
+a1
+00
+05
+09
+19
+01
+29
+05
+15
+00
+25
+01
+95
+05
+75
+01
+81
+02
+95
+01
+75
+03
+81
+01
+05
+01
+09
+30
+09
+31
+16
+01
+F8
+26
+FF
+07
+75
+10
+95
+02
+81
+06
+09
+38
+15
+81
+25
+7f
+75
+08
+95
+01
+81
+06
+05
+0c
+0a
+38
+02
+95
+01
+81
+06
+c0
+c0
+05
+01
+09
+80
+a1
+01
+85
+02
+05
+01
+19
+81
+29
+88
+15
+00
+25
+01
+95
+08
+75
+01
+81
+06
+c0
+05
+0c
+09
+01
+a1
+01
+85
+03
+15
+00
+26
+80
+03
+19
+00
+2a
+80
+03
+75
+10
+95
+01
+81
+00
+c0
+06
+00
+ff
+09
+0e
+a1
+01
+85
+BA
+95
+1f
+75
+08
+26
+ff
+00
+15
+00
+09
+01
+91
+02
+85
+BA
+95
+1f
+75
+08
+26
+ff
+00
+15
+00
+09
+01
+81
+02
+C0
+12
+12
+01
+00
+02
+00
+00
+00
+40
+51
+31
+20
+10
+02
+00
+01
+02
+00
+01
+3b
+09
+02
+3b
+00
+02
+01
+00
+a0
+32
+09
+04
+00
+00
+01
+03
+01
+01
+00
+09
+21
+00
+02
+00
+01
+22
+1a
+00
+07
+05
+81
+03
+40
+00
+02
+09
+04
+01
+00
+01
+03
+01
+02
+00
+09
+21
+00
+02
+00
+01
+22
+a3
+00
+07
+05
+82
+03
+40
+00
+02
+01
+00
+02
+00
+28
+02
+01
+18
+02
+00
+02
+03
+28
+01
+20
+03
+00
+02
+05
+2a
+01
+00
+04
+00
+02
+02
+29
+02
+00
+00
+05
+00
+02
+00
+28
+02
+00
+18
+06
+00
+02
+03
+28
+01
+02
+07
+00
+02
+00
+2a
+13
+43
+68
+69
+70
+73
+65
+61
+2d
+42
+4c
+45
+20
+20
+20
+20
+20
+20
+20
+20
+08
+00
+02
+03
+28
+01
+02
+09
+00
+02
+01
+2a
+02
+c1
+03
+0a
+00
+02
+03
+28
+01
+02
+0b
+00
+02
+04
+2a
+08
+06
+00
+06
+00
+64
+00
+2c
+01
+0c
+00
+02
+00
+28
+02
+0a
+18
+0d
+00
+02
+03
+28
+01
+02
+0e
+00
+02
+50
+2a
+07
+02
+8a
+24
+66
+82
+01
+00
+0f
+00
+02
+00
+28
+02
+12
+18
+10
+00
+02
+03
+28
+01
+06
+11
+00
+02
+4e
+2a
+01
+01
+12
+00
+02
+03
+28
+01
+12
+13
+00
+02
+4d
+2a
+02
+00
+00
+14
+00
+02
+02
+29
+02
+00
+00
+15
+00
+02
+08
+29
+02
+02
+01
+16
+00
+02
+03
+28
+01
+12
+17
+00
+02
+4d
+2a
+02
+00
+00
+18
+00
+02
+02
+29
+02
+00
+00
+19
+00
+02
+08
+29
+02
+03
+01
+1a
+00
+02
+03
+28
+01
+02
+1b
+00
+02
+4b
+2a
+1b
+05
+0c
+09
+01
+a1
+01
+85
+02
+09
+e9
+09
+ea
+09
+e2
+09
+30
+15
+01
+25
+0c
+75
+10
+95
+01
+81
+00
+c0
+1c
+00
+02
+03
+28
+01
+02
+1d
+00
+02
+4a
+2a
+04
+11
+01
+00
+01
+1e
+00
+02
+03
+28
+01
+04
+1f
+00
+02
+4c
+2a
+01
+00
+20
+00
+02
+00
+28
+02
+0f
+18
+21
+00
+02
+03
+28
+01
+12
+22
+00
+02
+19
+2a
+01
+63
+00
+00
+02
+13
+00
+02
+00
+02
+13
+00
+01
+00
+02
+13
+00
+04
+00
+02
+13
+00
+06
+00
+02
+13
+00
+05
+00
+02
+13
+00
+00
+00
+02
+17
+00
+00
+28
+02
+17
+00
+00
+00
+01
+00
+02
+00
+28
+02
+01
+18
+02
+00
+02
+03
+28
+01
+20
+03
+00
+02
+05
+2a
+01
+00
+04
+00
+02
+02
+29
+02
+00
+00
+05
+00
+02
+00
+28
+02
+00
+18
+06
+00
+02
+03
+28
+01
+02
+07
+00
+02
+00
+2a
+11
+55
+43
+48
+4f
+4e
+20
+30
+31
+20
+20
+20
+20
+20
+20
+20
+20
+20
+08
+00
+02
+03
+28
+01
+02
+09
+00
+02
+01
+2a
+02
+c8
+00
+0a
+00
+02
+03
+28
+01
+02
+0b
+00
+02
+04
+2a
+08
+06
+00
+06
+00
+64
+00
+2c
+01
+0c
+00
+02
+00
+28
+02
+0a
+18
+0d
+00
+02
+03
+28
+01
+02
+0e
+00
+02
+50
+2a
+07
+02
+8a
+24
+66
+82
+01
+00
+0f
+00
+02
+00
+28
+02
+f0
+ff
+10
+00
+02
+03
+28
+01
+12
+11
+00
+02
+f1
+ff
+0e
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+12
+00
+02
+02
+29
+02
+00
+00
+13
+00
+02
+03
+28
+01
+08
+14
+00
+02
+f2
+ff
+0e
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
Index: output/eeprom.dat
===================================================================
--- /branch/usb/usb_public_base/output/eeprom.dat	(revision 0)
+++ /branch/usb/usb_public_base/output/eeprom.dat	(working copy)
@@ -0,0 +1,989 @@
+00
+02
+aa
+55
+c2
+02
+c2
+84
+00
+0d
+c0
+00
+00
+10
+c0
+01
+80
+85
+c0
+0b
+b9
+ff
+c0
+1b
+00
+1e
+c0
+31
+00
+15
+c0
+4a
+80
+a2
+c0
+5c
+80
+20
+c0
+6a
+80
+68
+c0
+6f
+00
+6d
+c0
+71
+00
+88
+c0
+74
+00
+92
+20
+20
+3a
+ba
+c1
+7f
+80
+00
+c0
+1d
+80
+31
+20
+20
+3a
+ba
+20
+35
+b8
+02
+6f
+e2
+40
+cc
+67
+f2
+00
+4c
+20
+40
+3c
+49
+20
+20
+38
+02
+6f
+e0
+c0
+95
+20
+3a
+4d
+9b
+20
+75
+80
+00
+70
+40
+cc
+3a
+20
+40
+3c
+41
+20
+40
+52
+49
+20
+40
+6d
+ee
+58
+00
+00
+10
+20
+20
+6d
+e1
+20
+40
+00
+1c
+20
+20
+52
+ee
+20
+40
+6f
+d3
+20
+40
+71
+a1
+70
+06
+10
+03
+70
+8c
+00
+00
+20
+00
+27
+10
+70
+8c
+18
+00
+6f
+f1
+00
+50
+79
+3f
+fe
+0a
+67
+f1
+00
+50
+70
+8c
+11
+00
+70
+8c
+00
+3c
+58
+00
+0b
+b3
+67
+f1
+0c
+03
+67
+f1
+0c
+07
+58
+00
+0b
+f7
+67
+f1
+0c
+05
+20
+20
+71
+92
+6f
+e0
+c5
+2d
+c0
+55
+00
+36
+c0
+2a
+80
+40
+c0
+11
+00
+50
+20
+20
+49
+c8
+6f
+e0
+c5
+2e
+c0
+00
+80
+3a
+c0
+01
+00
+3d
+20
+60
+00
+00
+6f
+e0
+c5
+d7
+24
+7a
+00
+00
+20
+20
+49
+ce
+6f
+e0
+c5
+d8
+24
+7a
+00
+00
+20
+20
+49
+d4
+6f
+e0
+c4
+f4
+20
+3a
+00
+46
+6f
+e2
+45
+2f
+68
+4a
+44
+37
+98
+46
+7c
+00
+24
+62
+80
+00
+6f
+e0
+c5
+2e
+c0
+00
+80
+4a
+c0
+01
+00
+4d
+20
+60
+00
+00
+6f
+e0
+c5
+d7
+24
+7a
+00
+00
+20
+20
+49
+e1
+6f
+e0
+c5
+d8
+24
+7a
+00
+00
+20
+20
+49
+ec
+6f
+e0
+c4
+f4
+20
+3a
+00
+56
+6f
+e2
+45
+2f
+68
+4a
+45
+6f
+98
+46
+7c
+00
+24
+62
+80
+00
+6f
+e0
+c5
+2e
+c0
+00
+80
+5a
+c0
+01
+00
+61
+20
+60
+00
+00
+6f
+e0
+c5
+d7
+24
+7a
+00
+00
+6f
+e0
+c5
+18
+c0
+01
+00
+5f
+20
+60
+00
+00
+70
+45
+d7
+01
+20
+20
+4a
+01
+6f
+e0
+c5
+d8
+24
+7a
+00
+00
+6f
+e0
+c5
+19
+c0
+80
+00
+66
+20
+60
+00
+00
+70
+45
+d8
+01
+20
+20
+4a
+0c
+18
+42
+7e
+00
+c2
+80
+80
+6b
+20
+20
+3d
+19
+70
+8a
+6d
+89
+20
+20
+3d
+1f
+20
+40
+3d
+3c
+c5
+97
+80
+73
+78
+3c
+fc
+00
+20
+00
+00
+1e
+20
+40
+3d
+3c
+19
+69
+96
+00
+78
+56
+fc
+00
+78
+26
+fc
+00
+78
+30
+fc
+00
+78
+50
+7c
+00
+19
+62
+36
+00
+37
+c1
+84
+00
+20
+37
+00
+7c
+1b
+42
+04
+00
+60
+4b
+00
+0f
+24
+2c
+3e
+75
+78
+28
+7c
+00
+db
+60
+4e
+ab
+6f
+e0
+c1
+1d
+9b
+6f
+84
+00
+98
+40
+b6
+00
+20
+20
+3d
+e9
+70
+00
+06
+00
+20
+20
+38
+22
+20
+40
+38
+63
+24
+22
+80
+83
+20
+20
+38
+1d
+20
+40
+6f
+09
+6f
+e0
+81
+98
+7d
+3e
+7e
+07
+67
+e0
+81
+98
+78
+46
+fc
+00
+20
+40
+39
+25
+70
+8a
+3d
+12
+68
+48
+80
+08
+18
+40
+a2
+02
+20
+20
+39
+8e
+20
+40
+3d
+3c
+20
+40
+3d
+4b
+20
+40
+64
+51
+79
+20
+2a
+00
+78
+2e
+fc
+00
+78
+30
+7c
+00
+78
+50
+fc
+00
+20
+40
+3d
+c2
+78
+5d
+7c
+00
+c5
+17
+be
+ff
+c5
+16
+80
+9e
+20
+20
+3e
+c8
+6f
+20
+c1
+1d
+20
+00
+00
+01
+c2
+00
+00
+9f
+20
+20
+3f
+15
+6a
+50
+8a
+12
+70
+8a
+12
+3d
+70
+8a
+11
+aa
+70
+8a
+0a
+0c
+6f
+f0
+8a
+09
+79
+20
+7e
+07
+67
+f0
+8a
+09
+70
+8a
+0b
+04
+20
+00
+00
+3c
+70
+8a
+16
+00
+70
+8a
+17
+06
+20
+40
+6c
+b4
+67
+f0
+8a
+97
+20
+20
+6c
+a7
+47
+b5
+aa
+55
+40
+00
+00
+40
+09
+00
+80
+00
+00
+00
+40
+00
+00
+00
+00
+00
+04
+00
+00
+00
+00
+00
+20
+00
+00
+00
+00
+02
+00
+00
+20
+40
+04
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+08
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+aa
+55
+01
+00
+95
+40
+04
+aa
+55
+01
+00
+32
+44
+ff
+aa
+55
+01
+00
+ab
+45
+00
+aa
+55
+01
+00
+10
+45
+00
+aa
+55
+01
+00
+d6
+45
+06
+aa
+55
+04
+00
+37
+44
+36
+27
+11
+30
+aa
+55
+02
+00
+52
+45
+1e
+00
+aa
+55
+08
+00
+16
+00
+00
+10
+00
+00
+00
+00
+00
+00
+aa
+55
+08
+00
+c4
+40
+88
+0b
+ca
+70
+3f
+0c
+33
+03
+aa
+55
+03
+00
+cd
+40
+9d
+10
+22
+aa
+55
+01
+00
+a8
+40
+00
+aa
+55
+01
+00
+1f
+41
+18
+aa
+55
+01
+00
+9a
+40
+18
+aa
+55
+01
+00
+e9
+43
+d3
+aa
+55
+01
+00
+e8
+43
+00
+aa
+55
+01
+00
+e7
+43
+29
+aa
+55
+01
+00
+e6
+43
+01
+aa
+55
+05
+00
+18
+41
+ff
+88
+66
+44
+00
+aa
+55
+02
+00
+9b
+40
+00
+0c
+aa
+55
+05
+00
+20
+41
+09
+0e
+05
+04
+00
+aa
+55
+01
+00
+e3
+43
+7f
+aa
+55
+01
+00
+1e
+41
+ff
+aa
+55
+02
+00
+9d
+40
+1e
+41
+aa
+55
+02
+00
+ec
+43
+06
+07
+55
+aa
+aa
+55
+36
+38
+b8
+2e
Index: output/flash.dat
===================================================================
--- /branch/usb/usb_public_base/output/flash.dat	(revision 0)
+++ /branch/usb/usb_public_base/output/flash.dat	(working copy)
@@ -0,0 +1,8192 @@
+00
+02
+aa
+55
+0a
+01
+c2
+84
+00
+07
+c0
+00
+00
+08
+c0
+01
+80
+25
+c0
+6f
+00
+0d
+c0
+71
+00
+28
+c0
+74
+00
+32
+20
+20
+3a
+ba
+20
+20
+3a
+ba
+20
+35
+b8
+02
+6f
+e2
+40
+cc
+67
+f2
+00
+4c
+20
+40
+3c
+49
+20
+20
+38
+02
+20
+40
+3d
+3c
+c5
+97
+80
+13
+78
+3c
+fc
+00
+20
+00
+00
+1e
+20
+40
+3d
+3c
+19
+69
+96
+00
+78
+56
+fc
+00
+78
+26
+fc
+00
+78
+30
+fc
+00
+78
+50
+7c
+00
+19
+62
+36
+00
+37
+c1
+84
+00
+20
+37
+00
+1c
+1b
+42
+04
+00
+60
+4b
+00
+0f
+24
+2c
+3e
+75
+78
+28
+7c
+00
+db
+60
+4e
+ab
+6f
+e0
+c1
+1d
+9b
+6f
+84
+00
+98
+40
+b6
+00
+20
+20
+3d
+e9
+70
+00
+06
+00
+20
+20
+38
+22
+20
+40
+38
+63
+24
+22
+80
+23
+20
+20
+38
+1d
+20
+40
+6f
+09
+6f
+e0
+81
+98
+7d
+3e
+7e
+07
+67
+e0
+81
+98
+78
+46
+fc
+00
+20
+40
+39
+25
+70
+8a
+3d
+12
+68
+48
+80
+08
+18
+40
+a2
+02
+20
+20
+39
+8e
+20
+40
+3d
+3c
+20
+40
+3d
+4b
+20
+40
+64
+51
+79
+20
+2a
+00
+78
+2e
+fc
+00
+78
+30
+7c
+00
+78
+50
+fc
+00
+20
+40
+3d
+c2
+78
+5d
+7c
+00
+c5
+17
+be
+ff
+c5
+16
+80
+3e
+20
+20
+3e
+c8
+6f
+20
+c1
+1d
+20
+00
+00
+01
+c2
+00
+00
+3f
+20
+20
+3f
+15
+df
+b6
+aa
+55
+40
+00
+00
+40
+09
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+40
+04
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+aa
+55
+08
+00
+48
+48
+04
+09
+4a
+00
+01
+80
+03
+03
+aa
+55
+1c
+00
+a4
+45
+02
+0a
+0b
+0c
+0c
+0b
+0a
+04
+03
+05
+06
+ff
+02
+01
+00
+ff
+ff
+08
+ff
+ff
+ff
+ff
+ff
+ff
+89
+89
+ff
+ff
+aa
+55
+01
+00
+95
+40
+08
+aa
+55
+01
+00
+50
+48
+02
+aa
+55
+01
+00
+32
+44
+ff
+aa
+55
+01
+00
+31
+44
+1e
+aa
+55
+03
+00
+34
+44
+01
+c6
+45
+aa
+55
+01
+00
+16
+41
+00
+aa
+55
+01
+00
+17
+45
+07
+aa
+55
+02
+00
+33
+45
+53
+47
+aa
+55
+02
+00
+9f
+45
+85
+90
+aa
+55
+02
+00
+a2
+45
+75
+80
+aa
+55
+01
+00
+a1
+45
+63
+aa
+55
+01
+00
+64
+45
+7d
+aa
+55
+02
+00
+62
+48
+90
+01
+aa
+55
+04
+00
+5e
+48
+90
+01
+e8
+03
+aa
+55
+01
+00
+5c
+48
+14
+aa
+55
+01
+00
+c0
+06
+ff
+aa
+55
+01
+00
+91
+45
+0a
+aa
+55
+01
+00
+97
+45
+02
+aa
+55
+02
+00
+64
+48
+64
+00
+aa
+55
+01
+00
+c3
+43
+04
+aa
+55
+01
+00
+cf
+44
+01
+aa
+55
+05
+00
+26
+45
+01
+0f
+0f
+0f
+0f
+aa
+55
+01
+00
+67
+48
+03
+aa
+55
+01
+00
+ff
+44
+00
+aa
+55
+01
+00
+7e
+48
+02
+aa
+55
+01
+00
+10
+45
+00
+aa
+55
+01
+00
+9e
+45
+94
+aa
+55
+02
+00
+9a
+45
+2c
+01
+aa
+55
+03
+00
+f5
+44
+00
+48
+60
+aa
+55
+02
+00
+5c
+45
+2c
+01
+aa
+55
+02
+00
+5a
+45
+50
+00
+aa
+55
+01
+00
+9d
+45
+05
+aa
+55
+04
+00
+56
+48
+05
+00
+64
+00
+aa
+55
+01
+00
+59
+46
+05
+aa
+55
+06
+00
+37
+44
+11
+21
+31
+41
+51
+61
+aa
+55
+01
+00
+94
+40
+01
+aa
+55
+01
+00
+c1
+40
+20
+aa
+55
+01
+00
+27
+48
+20
+aa
+55
+06
+00
+ae
+42
+71
+81
+91
+a1
+b1
+c1
+aa
+55
+01
+00
+66
+43
+07
+aa
+55
+01
+00
+9c
+45
+32
+aa
+55
+02
+00
+98
+45
+b0
+04
+aa
+55
+02
+00
+5a
+48
+70
+17
+aa
+55
+08
+00
+80
+43
+fb
+00
+48
+08
+fb
+00
+48
+08
+aa
+55
+02
+00
+8e
+47
+96
+00
+aa
+55
+02
+00
+85
+47
+15
+00
+aa
+55
+02
+00
+8b
+42
+19
+00
+aa
+55
+04
+00
+87
+47
+1d
+00
+21
+00
+aa
+55
+02
+00
+05
+43
+2d
+00
+aa
+55
+02
+00
+8b
+47
+30
+00
+aa
+55
+0c
+00
+1b
+43
+1f
+02
+01
+05
+03
+03
+12
+18
+03
+19
+c2
+03
+aa
+55
+14
+00
+70
+47
+06
+ff
+06
+00
+03
+00
+80
+0c
+09
+42
+54
+35
+2e
+32
+20
+4d
+6f
+75
+73
+65
+aa
+55
+0e
+00
+3b
+43
+1f
+0c
+09
+42
+54
+35
+2e
+32
+20
+4d
+6f
+75
+73
+65
+aa
+55
+0c
+00
+2b
+42
+0b
+42
+54
+35
+2e
+32
+20
+4d
+6f
+75
+73
+65
+aa
+55
+08
+00
+a6
+42
+07
+00
+07
+00
+20
+00
+2c
+01
+aa
+55
+06
+00
+6a
+47
+03
+12
+18
+ff
+00
+00
+aa
+55
+02
+00
+d1
+45
+00
+34
+aa
+55
+06
+00
+e9
+45
+71
+81
+91
+a1
+b1
+c1
+aa
+55
+03
+00
+51
+46
+00
+50
+00
+aa
+55
+02
+00
+a0
+43
+80
+1f
+aa
+55
+01
+00
+a9
+43
+80
+aa
+55
+0c
+00
+69
+46
+03
+04
+01
+02
+20
+2a
+3f
+15
+22
+33
+44
+11
+aa
+55
+0a
+00
+78
+46
+09
+5a
+26
+34
+19
+04
+09
+00
+ff
+ff
+aa
+55
+0a
+00
+8c
+46
+09
+5a
+0d
+10
+1d
+ed
+7d
+80
+ff
+ff
+aa
+55
+44
+00
+d2
+46
+09
+5a
+ff
+27
+ab
+40
+b3
+56
+9b
+e6
+a8
+12
+a9
+c0
+be
+e6
+a5
+af
+a0
+21
+a1
+02
+b8
+10
+b9
+0b
+a7
+ff
+b5
+d0
+b6
+00
+ff
+00
+09
+00
+ff
+ff
+09
+5a
+0d
+10
+0e
+c5
+5b
+9a
+10
+38
+11
+42
+28
+28
+41
+23
+49
+39
+4a
+b0
+4b
+a0
+4c
+90
+4d
+70
+09
+00
+ff
+ff
+aa
+55
+10
+00
+26
+47
+09
+a5
+46
+34
+60
+07
+69
+04
+7d
+20
+7e
+00
+09
+00
+ff
+ff
+aa
+55
+10
+00
+16
+47
+09
+5a
+06
+02
+09
+69
+0d
+48
+0e
+9f
+0f
+ba
+09
+00
+ff
+ff
+aa
+55
+08
+00
+42
+47
+09
+5a
+0b
+f3
+09
+00
+ff
+ff
+aa
+55
+08
+00
+16
+00
+00
+10
+00
+00
+00
+00
+00
+00
+aa
+55
+08
+00
+c4
+40
+88
+0a
+ca
+70
+3f
+0c
+33
+03
+aa
+55
+03
+00
+cd
+40
+9d
+10
+24
+aa
+55
+01
+00
+a8
+40
+00
+aa
+55
+01
+00
+1f
+41
+18
+aa
+55
+01
+00
+9a
+40
+18
+aa
+55
+01
+00
+e9
+43
+d3
+aa
+55
+01
+00
+e8
+43
+00
+aa
+55
+01
+00
+e7
+43
+29
+aa
+55
+01
+00
+e6
+43
+01
+aa
+55
+05
+00
+18
+41
+ff
+88
+66
+44
+00
+aa
+55
+02
+00
+9b
+40
+00
+0c
+aa
+55
+05
+00
+20
+41
+09
+0e
+05
+04
+00
+aa
+55
+01
+00
+e3
+43
+7f
+aa
+55
+01
+00
+1e
+41
+ff
+aa
+55
+02
+00
+9d
+40
+1e
+41
+aa
+55
+02
+00
+ec
+43
+06
+07
+55
+aa
+aa
+55
+70
+0e
+e4
+5a
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+35
+7b
Index: output/memmap.format
===================================================================
--- /branch/usb/usb_public_base/output/memmap.format	(revision 0)
+++ /branch/usb/usb_public_base/output/memmap.format	(working copy)
@@ -0,0 +1,1875 @@
+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_current_context
+0x0007 mem_le_ch_mapped
+0x0008 mem_last_freq
+0x0009 mem_rssi
+0x000a mem_context_ptr
+0x000c mem_rx_window
+0x000e mem_lpm_adjust
+0x000f mem_sync_clke
+0x0015 mem_lpm_current_mult
+0x0016 mem_gpio_wakeup_low
+0x001a mem_gpio_wakeup_high
+0x001e mem_clkn_bt
+0x0022 mem_clke_bt
+0x0026 mem_dpll_clkn
+0x002a mem_slot_offset
+0x002c mem_select_list_item
+0x002d mem_temp_reconn_record
+0x002d mem_record_bt_mode
+0x002e mem_list_item_ptr
+0x0030 mem_rssi_hex
+0x0031 mem_param_tx_setup
+0x0033 mem_param_rf_setup
+0x0035 mem_param_conn_access
+0x0037 mem_param_clke_cal
+0x0039 mem_param_pll_setup
+0x003b mem_param_rx_setup
+0x003d mem_param_dpll_start_delay
+0x003f mem_param_rt_rthalfslot
+0x0041 mem_param_clke_cal_le_1m
+0x0043 mem_param_clke_cal_le_2m
+0x0045 mem_param_clke_cal_le_coded
+0x0047 mem_le_rxbuf
+0x014b mem_le_mic
+0x014f mem_le_peer_mic
+0x0153 mem_le_mrand
+0x0163 mem_le_state
+0x0164 mem_le_mode
+0x0165 mem_le_tsniff
+0x0167 mem_le_anchor
+0x016b mem_le_clk_offset
+0x0171 mem_le_receive_window
+0x0173 mem_le_plap
+0x0179 mem_le_conn_handle
+0x017a mem_le_arq
+0x017b mem_le_ch
+0x017c mem_le_hop
+0x017d mem_le_event_count
+0x017f mem_le_supervision_timer
+0x0183 mem_le_instant
+0x0185 mem_le_channels
+0x0186 mem_le_op
+0x0187 mem_le_access
+0x018b mem_le_crcinit
+0x018e mem_le_window_size
+0x018f mem_le_slave_latency
+0x0191 mem_le_superto
+0x0193 mem_le_channel_map
+0x0198 mem_le_rx_phy
+0x0199 mem_le_tx_phy
+0x019a mem_le_update_new_param
+0x01a3 mem_le_sk
+0x01b3 mem_le_peer_sca
+0x01b4 mem_le_err_code
+0x01b5 mem_le_ll_pairing_fail_reason
+0x01b6 mem_le_testtype
+0x01b7 mem_cmd_le_create_conn
+0x01b8 mem_ucode_device_flag
+0x01b9 mem_peripheral_lock_flag
+0x01ba mem_ucode_status
+0x01bb mem_spid_tbuf
+0x01bc mem_iicd_tbuf
+0x01bc mem_addr_hi
+0x01bd mem_addr_mi
+0x01be mem_addr_lo
+0x01bf mem_iicd_addr
+0x01c0 mem_spid_rbuf
+0x01c4 mem_ucode_buf
+0x01c6 mem_ucode_len
+0x01c8 mem_sched_addr
+0x01ca mem_ucode_ptr
+0x01cc mem_ucode_keybuf
+0x01dc mem_app_evt_timer_count
+0x01dd mem_load_delay
+0x01de mem_load_check_sum
+0x01df mem_input_store
+0x01ef mem_ec_loopc
+0x01f1 mem_aes_cmac_data_length
+0x01f2 mem_ax_256//32 bytes
+0x0212 mem_ay_256// 32 bytes
+0x0232 mem_az_256// 32 bytes
+0x0252 mem_bx_256// 32 bytes
+0x0272 mem_by_256// 31 bytes
+0x0292 mem_bz_256//32 bytes
+0x02b2 mem_cx_256//32 bytes
+0x02d2 mem_cy_256// 32 bytes
+0x02f1 mem_cy5_256// 1 byte
+0x02f2 mem_cz_256// 32 bytes
+0x0312 mem_k_256//32 bytes
+0x0332 mem_tmp1_256//32 bytes
+0x0352 mem_tmp5_256
+0x0372 mem_tmp2_256
+0x0392 mem_tmp3_256
+0x0392 mem_t1_256
+0x03b2 mem_tmp0_256
+0x03b2 mem_dat
+0x03b2 mem_t0_256
+0x03d2 mem_t2_256
+0x03f2 mem_t3_256
+0x0412 mem_t7_256
+0x0432 mem_p_256
+0x0452 mem_a_256
+0x0472 mem_gx_256
+0x0492 mem_gy_256
+0x04b2 mem_le_slat
+0x04c2 mem_ipc_skip_continue_proc
+0x04c3 mem_fifo_temp
+0x04c4 mem_pdatatemp
+0x04cc mem_temp//8 bytes
+0x04d4 mem_timeup// 4 bytes
+0x04d8 mem_rega//4 bytes
+0x04dc mem_regb//4 bytes
+0x04e0 mem_regc//3 bytes
+0x04e3 mem_contr//2 bytes
+0x04e5 mem_contw//2 bytes
+0x04e7 mem_contus
+0x04e9 mem_contue
+0x04eb mem_contu
+0x04ed mem_queue
+0x04ef mem_loopcnt
+0x04f1 mem_wakup_from_power_flag
+0x04f2 mem_saved_gpio_in
+0x04f6 mem_module_rx_error_data_buffer
+0x04f6 mem_le_adv_channel_map_temp
+0x04f6 mem_le_data_len_temp//1byte
+0x04f6 mem_event_cmd_response_content//2byte
+0x04f6 mem_le_prand//16byte
+0x04f6 mem_AES_CMAC_k//16 bytes
+0x04f6 mem_regext_index//1 bytes
+0x04f6 mem_temp_block0
+0x04f7 mem_le_data_temp//15bytes
+0x04f7 mem_temp_block1
+0x0506 mem_le_tx_buf_temp//48byte
+0x0506 mem_le_aes_128//16byte
+0x0506 mem_regext//64 bytes
+0x0506 mem_AES_CMAC_k1//16 bytes
+0x0506 mem_temp_block2
+0x0516 mem_AES_CMAC_k2//16 bytes
+0x0516 mem_temp_block3
+0x0526 mem_AES_CMAC_temp// 16 bytes
+0x0526 mem_temp_block4
+0x0536 mem_AES_CMAC_M_last// 16 bytes
+0x0536 mem_module_uart_cmd
+0x0537 mem_module_uart_opcode
+0x0538 mem_module_uart_len
+0x0539 mem_module_temp_nl_discard_packet
+0x053a mem_temp_block5
+0x0546 mem_le_mackey//16 bytes
+0x0546 mem_app_receive_temp
+0x0546 mem_key_value_temp
+0x0548 mem_key_value
+0x054a mem_key_value_temp1
+0x054b mem_key_value_temp2
+0x054c mem_key_value_temp3
+0x054d mem_key_value_temp4
+0x054e mem_key_value_temp5
+0x054f mem_key_value_temp6
+0x0550 mem_temp_block6
+0x0556 mem_scale_ratio
+0x0559 mem_xcnt
+0x055c mem_scale_ratio_temp
+0x055e mem_base_start
+0x055e mem_flash_paired_addr_base
+0x055e mem_flash_paired_addr0
+0x0560 mem_flash_paired_addr0_group
+0x0561 mem_flash_paired_addr1
+0x0563 mem_flash_paired_addr1_group
+0x0564 mem_flash_paired_addr2
+0x0566 mem_flash_paired_addr2_group
+0x0567 mem_flash_paired_addr3
+0x0569 mem_flash_paired_addr3_group
+0x056a mem_flash_paired_addr4
+0x056c mem_flash_paired_addr4_group
+0x056d mem_flash_paired_addr5
+0x056f mem_flash_paired_addr5_group
+0x0570 mem_flash_paired_addr6
+0x0572 mem_flash_paired_addr6_group
+0x0573 mem_flash_paired_addr7
+0x0575 mem_flash_paired_addr7_group
+0x0576 mem_flash_paired_addr8
+0x0578 mem_flash_paired_addr8_group
+0x0579 mem_flash_paired_addr9
+0x057b mem_flash_paired_addr9_group
+0x057c mem_msg_cnt_base
+0x057c mem_addr0_msg_cnt
+0x057d mem_addr1_msg_cnt
+0x057e mem_addr2_msg_cnt
+0x057f mem_addr3_msg_cnt
+0x0580 mem_addr4_msg_cnt
+0x0581 mem_addr5_msg_cnt
+0x0582 mem_addr6_msg_cnt
+0x0583 mem_addr7_msg_cnt
+0x0584 mem_addr8_msg_cnt
+0x0585 mem_addr9_msg_cnt
+0x0586 mem_msg_cnt_base1
+0x0587 mem_msg_addr_save
+0x0588 mem_msg_before_queue
+0x05a6 mem_count_and_random
+0x05a9 mem_msg_cnt_judgment_window_time
+0x05aa mem_msg_judgment_window_time
+0x05ab mem_base_end
+0x055e mem_hci_opcode_ocf
+0x0560 mem_hci_opcode_ogf
+0x0561 mem_hci_event_head_type
+0x0562 mem_hci_event_head_event_code
+0x0563 mem_hci_event_para_total_length
+0x0564 mem_hci_command_complete_num_hci_command_packet
+0x0565 mem_hci_command_complete_command_opcode
+0x0565 mem_hci_opcode
+0x0567 mem_hci_command_complete_return_parameter
+0x0567 mem_hci_command_complete_return_parameter_status
+0x0568 mem_hci_command_complete_return_parameter_chip_id
+0x055e mem_module_le_rx_data_len
+0x0560 mem_module_le_rx_data_address
+0x0562 mem_module_le_rx_data_handle
+0x055e mem_init_cnt
+0x0560 mem_data_pre
+0x0562 mem_data_current
+0x0564 mem_data_sum
+0x0567 mem_data_value
+0x055e mem_tst_pktcnt_sync
+0x0560 mem_tst_pktcnt_hec
+0x0562 mem_tst_pktcnt_crc
+0x0564 mem_tst_pktcnt_dmh
+0x0566 mem_tmp_buffer_head
+0x0569 mem_tmp_buffer
+0x05b9 mem_tester_emulate
+0x05ba mem_temp_payload
+0x05ba test_mode_scenario
+0x05bb test_mode_hopping_mode
+0x05bc test_mode_tx_freq
+0x05bd test_mode_rx_freq
+0x05be test_mode_power_mode
+0x05bf test_mode_poll_period
+0x05c0 test_mode_packet_type
+0x05c1 test_mode_data_length
+0x05c3 mem_test_mode_old_debug_config
+0x05c4 mem_tester_cnt
+0x055e mem_usb_status
+0x055f mem_usb_fifo_empty
+0x0560 mem_usb_read_len
+0x0562 mem_usb_txbuf
+0x05a3 mem_usb_txbuf1
+0x05ad mem_usb_txbuf2
+0x05b7 mem_usb_rxbuf
+0x05f7 mem_usb_rxbuf_end
+0x05f8 mem_bufptr
+0x05fa mem_remain
+0x05fb mem_hidreportdesc_kb
+0x05fd mem_hidreportdesc_m
+0x05ff mem_devicedesc
+0x0612 mem_confdesc
+0x064e mem_string0
+0x0653 mem_string1
+0x0671 mem_string2
+0x068f mem_string3
+0x06ad mem_cb_usb_config
+0x06af mem_usb_tx_interval
+0x06b0 mem_usb_vid_pid
+0x06b9 mem_usb_zero_packet
+0x06bb mem_usb_ones_packet
+0x06bd mem_usb_two_packet
+0x06bf mem_usb0_state
+0x06c0 mem_usb_offline_check_gpio
+0x06c1 mem_usb_clear_mem_start
+0x06c1 mem_usb_setup
+0x06c1 mem_usb_setup_bmRequestType
+0x06c2 mem_usb_setup_bRequest
+0x06c3 mem_usb_setup_bValue
+0x06c4 mem_usb_setup_bValueH
+0x06c5 mem_usb_setup_wIndex
+0x06c7 mem_usb_setup_bLength
+0x06c8 mem_usb_setup_bLengthH
+0x06c9 mem_usb0_set_report_data
+0x0709 mem_usb0_get_report_data
+0x0749 mem_usb_setup_bValue_temp
+0x074b mem_usb0_get_set_report
+0x074c mem_usb0_data_ready_report
+0x074d mem_usb_tx_win_enable
+0x074e mem_usb_tx_mac_enable
+0x074f mem_usb_idle_flag
+0x0750 mem_usb_idle_rate
+0x0751 mem_usb_get_protocol_flag
+0x0752 mem_usb_set_protocol_status
+0x0753 mem_usb_set_protocol_value
+0x0754 mem_usb_state
+0x0755 mem_usb_remote_wakeup
+0x0756 mem_usb_clear_remote_wakeup
+0x0757 mem_sdsystem_wakeup_flag
+0x0758 mem_usb_ep0_stall_status
+0x0759 mem_usb_ep1_stall_status
+0x075a mem_usb_ep2_stall_status
+0x075b mem_usb_ep3_stall_status
+0x075c mem_dsc_info_data_pointer
+0x075e mem_dsc_info_len
+0x075f mem_usb_ep1_data
+0x0760 mem_usb_ep2_data
+0x0761 mem_usb_tx_enable
+0x0762 mem_usb_device_enumeration_endflag
+0x0763 mem_usb_wakestate_onetime_flag
+0x0764 mem_usb_mac_wakeup_trig
+0x0765 mem_usb_set_high_addr_flag
+0x0766 mem_usb_clear_halt
+0x0767 mem_usb_mouse_data
+0x0777 mem_usb_kb_data
+0x0787 mem_usb_kb_multikey
+0x0797 mem_usb_kb_system
+0x07a7 mem_usb_test_cnt
+0x07a9 mem_usb_test_kb
+0x07b3 mem_usb_clear_mem_end
+0x07b3 mem_dg_rssi_noise_buffer
+0x08b3 mem_dg_rssi_noise_dg_buffer
+0x09b3 mem_dg_rssi_noise_ms_buffer
+0x0ab3 mem_dg_rssi_noise_kb_buffer
+0x0bb3 mem_usb_rxbuf_new//at least 68B
+0x0bf7 mem_usb_rxbuf_new_end
+
+0x019a mem_le_new_param
+0x019a mem_le_new_transmitwindowsize
+0x019b mem_le_new_transmitwindowoffset
+0x019d mem_le_new_conninterval
+0x019f mem_le_new_connslavelatency
+0x01a1 mem_le_new_connsupervisiontimeout
+0x019a mem_le_new_map
+0x019a mem_le_new_m2s_phy
+0x019b mem_le_new_s2m_phy
+0x0047 mem_le_rxbuf_data_header
+0x0048 mem_le_rxbuf_data_length
+0x0049 mem_le_rxbuf_data_payload
+0x0047 mem_le_rxbuf_data_ll_header
+0x0048 mem_le_rxbuf_data_ll_length
+0x0049 mem_le_rxbuf_data_ll_opcode
+0x004a mem_le_rxbuf_data_ll_control_data
+0x0047 mem_le_rxbuf_adv_header
+0x0048 mem_le_rxbuf_adv_length
+0x0049 mem_le_rxbuf_adv_payload
+0x0047 mem_le_rxbuf_adv_scan_req_header
+0x0048 mem_le_rxbuf_adv_scan_req_length
+0x0049 mem_le_rxbuf_adv_scan_req_scan_address
+0x004f mem_le_rxbuf_adv_scan_req_adv_address
+0x0047 mem_le_rxbuf_adv_connect_ind_header
+0x0048 mem_le_rxbuf_adv_connect_ind_length
+0x0049 mem_le_rxbuf_adv_connect_ind_init_address
+0x004f mem_le_rxbuf_adv_connect_ind_adv_address
+0x0055 mem_le_rxbuf_adv_connect_ind_access_address
+0x0059 mem_le_rxbuf_adv_connect_ind_crc_init
+0x005c mem_le_rxbuf_adv_connect_ind_win_size
+0x005d mem_le_rxbuf_adv_connect_ind_win_offset
+0x005f mem_le_rxbuf_adv_connect_ind_interval
+0x0061 mem_le_rxbuf_adv_connect_ind_latency
+0x0063 mem_le_rxbuf_adv_connect_ind_timeout
+0x0065 mem_le_rxbuf_adv_connect_ind_channel_map
+0x006a mem_le_rxbuf_adv_connect_ind_hop_and_sca
+0x0506 mem_le_search_handle_start
+0x0508 mem_le_search_handle_end
+0x050a mem_le_att_offset
+0x050a mem_le_search_att_type_length
+0x050b mem_le_search_att_type
+0x051b mem_le_curr_att_len
+0x051c mem_le_cur_attlist_start_ptr
+0x051e mem_le_cur_handle_start
+0x0520 mem_le_cur_handle_end
+0x0522 mem_le_cur_uuid_length
+0x0523 mem_le_cur_uuid
+0x0047 mem_le_rxbuf_data_att_header
+0x0048 mem_le_rxbuf_data_att_length
+0x0049 mem_le_rxbuf_data_att_l2cap_length
+0x004b mem_le_rxbuf_data_att_cid
+0x004d mem_le_rxbuf_data_att_opcode
+0x004e mem_le_rxbuf_data_att_payload
+0x0047 mem_le_rxbuf_data_continue_header
+0x0048 mem_le_rxbuf_data_continue_length
+0x0049 mem_le_rxbuf_data_continue_payload
+0x0047 mem_le_rxbuf_data_att_write_header
+0x0048 mem_le_rxbuf_data_att_write_length
+0x0049 mem_le_rxbuf_data_att_write_l2cap_length
+0x004b mem_le_rxbuf_data_att_write_cid
+0x004d mem_le_rxbuf_data_att_write_opcode
+0x004e mem_le_rxbuf_data_att_write_handle
+0x0050 mem_le_rxbuf_data_att_write_payload
+0x0047 mem_le_rxbuf_data_prepare_att_write_header
+0x0048 mem_le_rxbuf_data_prepare_att_write_length
+0x0049 mem_le_rxbuf_data_prepare_att_write_l2cap_length
+0x004b mem_le_rxbuf_data_prepare_att_write_cid
+0x004d mem_le_rxbuf_data_prepare_att_write_opcode
+0x004e mem_le_rxbuf_data_prepare_att_write_handle
+0x0050 mem_le_rxbuf_data_prepare_att_write_offset
+0x0052 mem_le_rxbuf_data_prepare_att_write_payload
+0x01df mem_fcc_param_new
+0x01df mem_fcc_ch_new
+0x01e0 mem_fcc_mod_new
+0x01e1 mem_fcc_txrx_new
+0x01e2 mem_fcc_btble_new
+0x01e3 mem_fcc_data_new
+0x01e4 mem_fcc_data_length_new
+0x01e5 mem_fcc_hop_new
+0x01e6 mem_fcc_tx_power_new
+0x01e7 mem_fcc_param
+0x01e7 mem_fcc_ch
+0x01e8 mem_fcc_mod
+0x01e9 mem_fcc_txrx
+0x01ea mem_fcc_btble
+0x01eb mem_fcc_data
+0x01ec mem_fcc_data_length
+0x01ed mem_fcc_hop
+0x01ee mem_fcc_tx_power
+0x01ef mem_fcc_config_cb
+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
+0x4093 mem_current_amaddr
+0x4094 mem_lpm_mode
+0x4095 mem_device_option
+0x4096 mem_last_clkn
+0x409a mem_fcomp_div
+0x409b mem_rx_window_sniff
+0x409d mem_rf_init_ptr
+0x409f mem_rf_rccal
+0x40a0 mem_handle_num
+0x40a1 mem_chip_functions
+0x40a3 mem_lpm_wake_lock
+0x40a5 mem_lpm_interval
+0x40a7 mem_lpm_overhead
+0x40a8 mem_lpm_hibernate_switch
+0x40a9 mem_sniff_unint_lost
+0x40aa mem_sleep_counter
+0x40ae mem_sleep_counter_all
+0x40b2 mem_sleep_clkn
+0x40b8 mem_sniff_rcv
+0x40bb mem_sniff_lost
+0x40be mem_clks_per_lpo
+0x40c1 mem_lpm_mult
+0x40c2 mem_lpm_mult_timeout
+0x40c3 mem_lpm_mult_cnt
+0x40c4 mem_lpm_config
+0x40c4 mem_lpm_xtal_ib
+0x40c5 mem_lpm_ctrim
+0x40c6 mem_lpm_padding
+0x40c7 mem_lpm_xtalcnt
+0x40c8 mem_lpm_buckcnt
+0x40c9 mem_lpm_ldocnt
+0x40ca mem_lpm_isogate
+0x40cb mem_lpm_isogate_final
+0x40cc mem_lpm_ctrl3
+0x40cc mem_lpm_ctrl3_app_vsel
+0x40cd mem_lpm_ctrl3_aon_vsel
+0x40ce mem_lpm_ctrl3_core_byp
+0x40cf mem_lpm_ctrl3_core_vsel
+0x40d0 mem_saved_gpio
+0x40dd mem_saved_gsel
+0x40e0 mem_saved_mark
+0x40e8 mem_saved_spidctrl
+0x40e9 mem_patch_ptr
+0x40eb mem_patch_len
+0x40ed mem_timers
+0x410d mem_hci_cmd
+0x410e mem_hci_conn_handle
+0x410f mem_hci_plap
+0x4112 mem_hci_puap
+0x4113 mem_hci_pnap
+0x4115 mem_loadcode_times
+0x4116 mem_tx_power
+0x4117 mem_modem_rssi
+0x4118 mem_gain_fix
+0x4119 mem_gain_table
+0x411c mem_gain_second_agc_en
+0x411d mem_system_clk
+0x411e mem_rf_init_data
+0x411f mem_xtal_freq
+0x4120 mem_version
+0x4121 mem_company_id
+0x4123 mem_sub_version
+0x4125 mem_le_dsniff
+0x4127 mem_le_conn_interval
+0x4129 mem_le_txheader
+0x412a mem_le_txlen
+0x412b mem_le_txpayload
+0x422b mem_le_name_len
+0x422c mem_le_name
+0x424a mem_le_ltk
+0x425a mem_ltk_exists
+0x425b mem_le_rconfirm
+0x426b mem_le_srand
+0x427b mem_le_iat
+0x427c mem_le_rat
+0x427d mem_le_preq
+0x427e mem_le_preq_iocap
+0x427f mem_le_preq_oob
+0x4280 mem_le_preq_auth
+0x4281 mem_le_preq_max_keysize
+0x4282 mem_le_preq_init_key_distribution
+0x4283 mem_le_preq_resp_key_distribution
+0x4284 mem_le_pres
+0x4285 mem_le_pres_iocap
+0x4286 mem_le_pres_oob
+0x4287 mem_le_pres_auth
+0x4288 mem_le_pres_max_keysize
+0x4289 mem_le_pres_init_key_distribution
+0x428a mem_le_pres_resp_key_distribution
+0x428b mem_le_notify_handle
+0x428d mem_le_search_uuid_length
+0x428e mem_le_search_uuid
+0x429e mem_le_conn_param
+0x429e mem_le_conn_peer_addr_type
+0x429f mem_le_conn_peer_addr
+0x42a5 mem_le_conn_own_addr_type
+0x42a6 mem_le_interval_min
+0x42a8 mem_le_interval_max
+0x42aa mem_le_latency
+0x42ac mem_le_timeout
+0x42ae mem_le_lap
+0x42b1 mem_le_uap
+0x42b2 mem_le_nap
+0x42b4 mem_le_local_mtu
+0x42b6 mem_le_remote_mtu
+0x42b8 mem_le_skdm
+0x42c0 mem_le_skds
+0x42c8 mem_le_init_superto
+0x42ca mem_ui_le_uuid_table
+0x42cc mem_le_secure_connect_flag
+0x42cd mem_le_secure_connect_state
+0x42ce mem_le_sc_confirm_gkey_flag
+0x42cf mem_le_pairing_state
+0x42d0 mem_le_enc_state
+0x42d1 mem_le_pairing_mode
+0x42d2 mem_le_tk
+0x42d6 mem_le_ediv
+0x42d8 mem_le_rand
+0x42e0 mem_le_irk
+0x42f0 mem_le_transmit_window
+0x42f4 mem_le_configuration
+0x42f5 mem_le_fixed_ltk
+0x4305 mem_le_pairing_handle
+0x4307 mem_le_packet_llid
+0x4308 mem_le_l2cap_size
+0x430a mem_le_packet_len_recved
+0x430c mem_le_payload_ptr
+0x430e mem_le_signaling_identifier
+0x430f mem_le_l2cap_signaling_conn_param_update_rsp_result
+0x4311 mem_le_md_count
+0x4312 mem_ble_l2cap_tx_buff0_ptr
+0x4314 mem_ble_l2cap_tx_buff_size_ptr
+0x4316 mem_le_scan_enable
+0x4317 mem_le_scan_interval
+0x4319 mem_le_scan_window
+0x431b mem_le_adv_data_len
+0x431c mem_le_adv_data
+0x433b mem_le_scan_data_len
+0x433c mem_le_scan_data
+0x435b mem_le_adv_enable
+0x435c mem_le_adv_param
+0x435c mem_le_adv_interval
+0x435e mem_le_adv_type
+0x435f mem_le_adv_own_addr_type
+0x4360 mem_le_adv_direct_addr
+0x4366 mem_le_adv_channel_map
+0x4367 mem_le_scan_params
+0x4367 mem_le_scan_type
+0x4368 mem_le_scan_own_addr_type
+0x4369 mem_le_l2cap_att_states
+0x436a mem_le_att_opcode
+0x436b mem_le_att_handle
+0x436d mem_le_search_res
+0x436e mem_le_local_feature
+0x4376 mem_le_tx_phys
+0x4377 mem_le_rx_phys
+0x4378 mem_remote_rx_max_octets
+0x437a mem_remote_rx_max_time
+0x437c mem_remote_tx_max_octets
+0x437e mem_remote_tx_max_time
+0x4380 mem_local_rx_max_octets
+0x4382 mem_local_rx_max_time
+0x4384 mem_local_tx_max_octets
+0x4386 mem_local_tx_max_time
+0x4388 mem_cb_check_wakelock
+0x438a mem_cb_before_hibernate
+0x438c mem_cb_before_lpm
+0x438e mem_cb_le_process
+0x4390 mem_cb_idle_process
+0x4392 mem_cb_bb_event_process
+0x4394 mem_cb_att_write
+0x4396 mem_cb_ble_transmit
+0x4398 mem_cb_event_timer
+0x439a mem_cb_bt_set_mult
+0x439c mem_cb_spi_flash_write_complate
+0x439e mem_cb_before_lpm_sleep
+0x43a0 mem_eeprom_base
+0x43a2 mem_wake_up_delay_timer
+0x43a3 mem_app_connection_options
+0x43a4 mem_app_disconn_reason
+0x43a6 mem_app_disconn_reason_flag
+0x43a8 mem_xrecord_mode
+0x43a9 mem_eeprom_block_size
+0x43aa mem_spi_init_clk
+0x43ab mem_spi_init_delay_time
+0x43ac mem_spi_ncs_gpio
+0x43ad mem_nv_data_ptr
+0x43af mem_nv_data_number
+0x43b0 mem_queue_ptr
+0x43b2 mem_3v_adc_io_data
+0x43b4 mem_2v_adc_hvin_data
+0x43b6 mem_2v_adc_vinlpm_data
+0x43b8 mem_1v_adc_io_data
+0x43ba mem_3v_adc_hvin_data
+0x43bc mem_3v_adc_vinlpm_data
+0x43be mem_app_adc_read_count
+0x43bf mem_start_adc_clkn
+0x43c0 mem_reference_voltage
+0x43c2 mem_adc_config_flag
+0x43c3 mem_adc_channel
+0x43c4 mem_adc_current_value
+0x43c6 mem_adc_power_flag//bit0:low power falg ; bit1:no power flag
+0x43c7 mem_spi_write_addr
+0x43ca mem_spi_write_ptr
+0x43cc mem_spi_write_len
+0x43ce mem_spi_write_flash_sm
+0x43cf mem_spi_cs_gpio
+0x43d0 mem_spi_si_gpio
+0x43d1 mem_spi_so_gpio
+0x43d2 mem_spi_sclk_gpio
+0x43d3 mem_spi_wp_gpio
+0x43d4 mem_spi_hold_gpio
+0x43d5 mem_eeprom_wp_gpio
+0x43d6 mem_eeprom_scl_gpio
+0x43d7 mem_eeprom_sda_gpio
+0x43d8 mem_kscan_ptr
+0x43da mem_key_num_ptr
+0x43da mem_keyscan_ptr
+0x43dc mem_key_value_retention
+0x43de mem_power_param_ptr
+0x43e0 mem_efuse_header
+0x43e3 mem_seqi
+0x43e4 mem_set_cdb_on
+0x43e5 mem_syn_cal_ctrl
+0x43e6 mem_dig_aon_vsel
+0x43e7 mem_syn_afc_cfg1
+0x43e8 mem_rf_ldo_cfg1
+0x43e9 mem_rc_cal
+0x43ea mem_nec_decode_error_value
+0x43eb mem_wdt_always_work
+0x43ec mem_rf_debug_rx_gpio
+0x43ed mem_rf_debug_tx_gpio
+0x43ee mem_l2cap_xmem_start
+0x43ee mem_used_map
+0x43ef mem_tx_fifo0
+0x43ef mem_tx_fifo0_map
+0x43f0 mem_tx_fifo0_ptr
+0x43f2 mem_tx_fifo1
+0x43f2 mem_tx_fifo1_map
+0x43f3 mem_tx_fifo1_ptr
+0x43f5 mem_tx_fifo2
+0x43f5 mem_tx_fifo2_map
+0x43f6 mem_tx_fifo2_ptr
+0x43f8 mem_tx_fifo3
+0x43f8 mem_tx_fifo3_map
+0x43f9 mem_tx_fifo3_ptr
+0x43fb mem_tx_fifo_end
+0x43fb mem_l2cap_lpm_txbuf_ptr
+0x43fd mem_l2cap_xmem_end
+0x43fd mem_ccm_pcnt_tx
+0x4402 mem_ccm_pcnt_rx
+0x4407 mem_ccm_last_mic
+0x440b mem_ccm_iv
+0x440b mem_ccm_ivm
+0x440f mem_ccm_ivs
+0x4413 mem_ccm_len
+0x4415 mem_ccm_rx_ptr
+0x4417 mem_ipc_lock_bt
+0x4418 mem_ipc_lock_c51
+0x4419 mem_ipc_fifo_bt2c51
+0x4421 mem_ipc_fifo_c512bt
+0x4429 mem_ui_button_timer
+0x442a mem_ui_button_last_state
+0x442b mem_ui_timer_last_btclk
+0x442f mem_ui_state_map
+0x4431 mem_ui_button_timeout
+0x4432 mem_ui_button_gpio
+0x4433 mem_ui_led_init_state_set
+0x4434 mem_ui_led_struct_num
+0x4435 mem_ui_led_struct_ptr
+0x4437 mem_ble_v2_xbox
+0x4477 mem_ble_v2_pdu
+0x449e mem_ble_v2_customer_id
+0x449f mem_ble_v2_packet_num
+0x44a0 mem_ble_v2_subtype
+0x44a1 mem_ble_v2_maintype
+0x44a2 mem_ble_v2_addr
+0x44a6 mem_ble_v2_group_index
+0x44a7 mem_ble_v2_cmd
+0x44a9 mem_ble_v2_para
+0x44ad mem_ble_customer_id
+0x44ae mem_ble_count
+0x44af mem_ble_sub_type
+0x44b0 mem_ble_main_type
+0x44b1 mem_ble_addr
+0x44b5 mem_ble_group
+0x44b6 mem_ble_cmd
+0x44b8 mem_ble_para
+0x44bc mem_ble_rfu
+0x44bf mem_ble_relay
+0x44c0 mem_ble_is_app
+0x44c1 mem_adv_CRC_False_initValue
+0x44c3 mem_CRC16_polynomial
+0x44c5 mem_ble_pack_cb
+0x44c7 mem_ble_v2_tx_end_dummy
+0x44c7 mem_ftd_device_option
+0x44c8 mem_light_gm_tx_addr_type
+0x44c9 mem_light_gm_tx_len
+0x44ca mem_light_gm_tx_header
+0x44d7 mem_light_gm_tx
+0x44d7 mem_light_gm_tx_press_time
+0x44d8 mem_light_gm_tx_remoter_ID
+0x44d9 mem_light_gm_tx_remoter_addr
+0x44db mem_light_gm_tx_group_num
+0x44dc mem_light_gm_tx_code
+0x44dd mem_light_gm_tx_count
+0x44de mem_light_gm_tx_sum
+0x44df mem_gem_cnt_inces_timeout
+0x44e1 mem_gem_long_keypress_timeout
+0x44e3 mem_gem_long_cnt_enable
+0x44e4 mem_light_KY_tx
+0x44e4 mem_light_KY_tx_header
+0x44fb mem_light_KY_tx_len
+0x44fc mem_light_KY_tx_code1
+0x44fd mem_light_KY_tx_remoter_ID
+0x4501 mem_light_KY_tx_group_num
+0x4502 mem_light_KY_tx_code2
+0x4503 mem_light_KY_tx_sum
+0x4505 mem_light_KY_tx_CRC
+0x4507 mem_light_KY_tx_count
+0x4509 mem_light_group_num
+0x450a mem_light_JYM_whitening_header
+0x4516 mem_light_JYM_tx
+0x4516 mem_light_JYM_tx_header
+0x451e mem_light_JYM_tx_len
+0x451f mem_light_JYM_tx_cmd
+0x4520 mem_light_JYM_tx_ID
+0x4524 mem_light_JYM_tx_group
+0x4525 mem_light_JYM_tx_data
+0x4526 mem_light_JYM_tx_count
+0x4527 mem_light_JYM_tx_sum
+0x4529 mem_light_JYM_tx_CRC
+0x452b mem_light_JYM_tx_temp
+0x4550 mem_adv_cnts
+0x4551 mem_cb_light_ac_detecting
+0x4553 mem_cb_light_gradual_dimmer
+0x4555 mem_light_pwm_freq_w
+0x4557 mem_light_pwm_freq_y
+0x4559 mem_light_pwm_freq_l
+0x455b mem_light_W_aim_pcnt
+0x455d mem_light_Y_aim_pcnt
+0x455f mem_light_L_aim_pcnt
+0x4561 mem_light_gradual_step_w
+0x4562 mem_light_gradual_step_y
+0x4563 mem_light_gradual_step_l
+0x4564 mem_light_mix_change_delay_time
+0x4566 mem_temp_flag
+0x4567 mem_light_pwm_enable_flag
+0x4568 mem_light_gpio_pin_w
+0x4569 mem_light_gpio_pin_y
+0x456a mem_light_gpio_pin_l
+0x4551 mem_kscan_record_keypress
+0x4559 mem_kscan_row_nums
+0x455a mem_kscan_col_nums
+0x455b mem_kscan_row_gpio_pin
+0x4563 mem_kscan_col_gpio_pin
+0x456b mem_kscan_row_scanned
+0x456c mem_kscan_col_scanned
+0x456d mem_keypress_analysis_flag
+0x456e mem_kscan_avoid_shake_delay_time
+0x4570 mem_scan_col
+0x4571 mem_kscan_enable
+0x4572 mem_long_press_adv_timeout
+0x4574 mem_kscan_analysis_interval_timeout
+0x4576 mem_FTD_adv_raw_device_add_temp
+0x4578 mem_set_clear_code_timeout_enable
+0x4579 mem_light_lpm_enable
+0x457a mem_light_manufacture_id
+0x457b mem_light_indicator_led
+0x457c mem_groups_num
+0x457d mem_light_last_key
+0x457e mem_light_different_key_press_flag
+0x457f mem_FTD_adv_raw
+0x457f mem_FTD_adv_raw_cmd
+0x4580 mem_FTD_adv_raw_device_add
+0x4582 mem_FTD_adv_raw_data
+0x4585 mem_FTD_adv_raw_packet_num
+0x4586 mem_FTD_adv_raw_reserved
+0x4587 mem_FTD_adv_raw_encryption
+0x458f mem_long_press_timeout
+0x4591 mem_light_num_of_long_press
+0x4592 mem_light_color_switch_cnt
+0x4593 mem_light_brightness_switch_flag
+0x4594 mem_light_rgb_hand_actuated_flag
+0x4595 mem_rgb_switch
+0x4596 mem_light_rgb_auto_flag
+0x4597 mem_rgb_on_and_off
+0x4598 mem_light_group1_on_and_off_flag
+0x4599 mem_light_group2_on_and_off_flag
+0x459a mem_light_group3_on_and_off_flag
+0x459b mem_light_group4_on_and_off_flag
+0x459c mem_light_current_key
+0x459d mem_ble_light_adv_timeout
+0x459f mem_light_on_off_alternant
+0x45a0 mem_fan_speed
+0x45a1 mem_fan_direction_alternant
+0x45a2 mem_fan_on_off_flag
+0x45a3 mem_ble_xboxes
+0x4623 mem_adv_packet
+0x4623 mem_adv_packet_header
+0x463a mem_adv_packet_payload
+0x4648 mem_adv_packet_tailer
+0x464a mem_light_whitening_buffer
+0x4671 mem_light_whitening_k
+0x4673 mem_light_for_loop_cnt1
+0x4674 mem_light_for_loop_cnt2
+0x4675 mem_light_recvd_len
+0x4676 mem_light_whitening_i
+0x4677 mem_light_whitening_i1
+0x467b mem_light_whitening_i2
+0x467f mem_light_whitening_i3
+0x4683 mem_light_whitening_i4
+0x4687 mem_light_whitening_n
+0x4688 mem_light_para1
+0x468c mem_light_para2
+0x4691 mem_light_for_loop_lshift
+0x4699 mem_light_integer_1_lshift_temp
+0x46a1 mem_light_lpm_enable_timeout
+0x46a3 mem_indicator_turn_on_enable
+0x46a4 mem_indicator_led_turn_on_timeout
+0x46a6 mem_light_on_and_off_flag
+0x46a7 mem_fan_deflector_flag
+0x46a8 mem_light_aid_swtich_flag
+0x46a9 mem_light_manufacture_id2
+0x46aa mem_light_manufacture_id2_v2
+0x46ab mem_light_whitening_buffer_2
+0x46d2 mem_ble_v2_pdu_2
+0x46f9 mem_light_rgb_on_and_off_flag
+0x46fa mem_rgb_loop_on_and_off
+0x46fb mem_r_g_b_switch_flag
+0x46fc mem_adv_manufacturer_switch_flag
+0x46fd mem_adv_manufacturer_switch_flag1
+0x46fe mem_adv_manufacturer_switch_flag2
+0x46ff mem_adv_manufacturer_switch_flag3
+0x4700 mem_fan_on_and_off_flag
+0x4701 mem_light_release_adv_flag
+0x4702 mem_light_blink_state_flag
+0x4703 mem_light_indicator_led_blink_enable
+0x4704 mem_light_continuous_kps_cnt_reset_timeout
+0x4706 mem_light_key1_continuous_kps_cnt
+0x4707 mem_light_key2_continuous_kps_cnt
+0x4708 mem_light_key3_continuous_kps_cnt
+0x4709 mem_light_key4_continuous_kps_cnt
+0x470a mem_light_key5_continuous_kps_cnt
+0x470b mem_light_key6_continuous_kps_cnt
+0x470c mem_light_key7_continuous_kps_cnt
+0x470d mem_light_key8_continuous_kps_cnt
+0x470e mem_light_key9_continuous_kps_cnt
+0x470f mem_light_key10_continuous_kps_cnt
+0x4710 mem_light_key11_continuous_kps_cnt
+0x4711 mem_light_key12_continuous_kps_cnt
+0x4712 mem_light_key13_continuous_kps_cnt
+0x4713 mem_light_key14_continuous_kps_cnt
+0x4714 mem_light_key15_continuous_kps_cnt
+0x4715 mem_light_key16_continuous_kps_cnt
+0x4716 mem_16groups_on_off
+0x4718 mem_group_flag
+0x4719 mem_channel_enable
+0x471a mem_channel_num
+0x471b mem_scene_enable
+0x471c mem_special_agreemeet_enable
+0x471d mem_light_short_keypress_timeout
+0x471f mem_light_color_and_lgtness_long_press_adv_enable
+0x4720 mem_airchange_speed
+0x4721 mem_fan_tap_speed
+0x4722 mem_light_airchange_flag
+0x4723 mem_light_warm_wake_flag
+0x4724 mem_light_warm_powerful_flag
+0x4725 mem_light_fan_on_and_off
+0x4726 mem_light_bath_on_off_flag
+0x4727 mem_long_press_protect_enble_flag
+0x4728 mem_long_press_protect_cnt
+0x4729 mem_long_press_protect_start_flag
+0x472a mem_kscan_press_row_gpio
+0x4732 mem_light_fan_on_and_off_flag
+0x4733 mem_light_lpm_gpio_config_flag
+0x4737 mem_light_lpm_gpio_config_io_temp
+0x4738 mem_light_timing_of_alter_flag
+0x4739 mem_light_adv_packet
+0x4739 mem_light_adv_packet_cmd
+0x473a mem_light_adv_packet_addr
+0x473c mem_light_adv_packet_data
+0x473f mem_light_adv_packet_packetnum
+0x4740 mem_light_adv_packet_reserve
+0x4741 mem_light_adv_packet_encry
+0x4747 mem_light_adv_packet_CRC
+0x4749 mem_scene_led_timeout
+0x474b mem_scene_led_cnt
+0x474c mem_ble_rx_on_and_off
+0x474d mem_long_press_scene_timeout
+0x474e mem_le_adv_scan_channel
+0x474f mem_le_lap_addr
+0x4753 mem_le_lap_addr_temp
+0x4757 mem_le_lap_v2_addr
+0x475b mem_light_scene_mode
+0x475c mem_le_addr_change_flag
+0x475d mem_rmt_keydown_cb
+0x475f mem_rmt_released_cb
+0x4761 mem_rmt_long_press_cb
+0x4763 mem_rmt_continuous_keydown_cb
+0x4765 mem_rmt_continuous_kps_time
+0x4767 mem_light_adv_time
+0x4769 mem_claer_code_time
+0x476b mem_ble_v2_customer_id_copy
+0x476c mem_ftd_fan_cfg_catch
+0x476c mem_fan_protocol_select_flag
+0x476d mem_fan_tx_pin
+0x476e mem_fan_yc_identify_flag
+0x476f mem_customer_id
+0x4770 mem_customer_id_v2
+0x4771 mem_id_universal
+0x4772 mem_manufacture_id_temp
+0x4773 mem_light_device_flag
+0x4774 mem_ble_ch_mapped
+0x4775 mem_ble_v2_decoder
+0x4777 mem_light_speed_temp
+0x4778 mem_light_blink_count
+0x4779 mem_pairing_timeout
+0x477b mem_light_pairing_enable
+0x477c mem_light_last_packetnum
+0x477d mem_yc_fan_ble_addr
+0x4783 mem_recv_addr
+0x4789 mem_fan_tx_bits_loop
+0x478b mem_fan_opcode
+0x478c mem_fan_tx_cnt
+0x478d mem_fan_433code_packet//预留8字节
+0x4795 mem_fan_tx_loop
+0x4797 mem_fan_tx_loop2
+0x4799 mem_fan_433_opcode
+0x479a mem_fan_tx_gpio
+0x479b mem_fan_tx_gpio_reg
+0x479d mem_433_tx_cb
+0x479f mem_fan_packet_indiscriminate_cb
+0x47a1 mem_ble_parameter
+0x47a1 mem_ble_parameter_cmd
+0x47a3 mem_ble_parameter_para
+0x47a7 mem_ble_parameter_addr
+0x47a9 mem_ble_parameter_group
+0x47aa mem_fan_addr_433
+0x4437 mem_24g_lap
+0x443d mem_24g_rxbuf
+0x445f mem_24g_txbuf
+0x447f mem_24g_txpayload
+0x44a3 mem_24g_rxpayload
+0x44c3 mem_24g_rxdata_length
+0x44c4 mem_24g_pid
+0x44c5 mem_24g_no_ack
+0x44c6 mem_24g_sta_crc
+0x44c9 mem_24g_last_crc
+0x44cc mem_24g_sta_pid
+0x44cd mem_24g_last_pid
+0x44ce mem_24g_datalen
+0x44cf mem_24g_data_type
+0x44d0 mem_24g_txlen
+0x44d1 mem_24g_rx_window
+0x44d3 mem_24g_ch
+0x44d4 mem_24g_current_ch_number
+0x44d5 mem_24g_addr
+0x44d9 mem_24g_ch_map1
+0x44dd mem_24g_ch_map2
+0x44e1 mem_24g_ch_map3
+0x44e5 mem_24g_ch_map4
+0x44e9 mem_24g_tx_btclk
+0x44ed mem_24g_interval
+0x44ee mem_24g_interval_min
+0x44ef mem_24g_interval_max
+0x44f0 mem_24g_syncword
+0x44f2 mem_24g_syncword_crc8
+0x44f3 mem_24g_get_syncword_crc8
+0x44f4 mem_24g_pair_switch
+0x44f5 mem_24g_enter_hibernate
+0x44fd mem_24g_rx_phy
+0x44fe mem_24g_tx_phy
+0x44ff mem_24g_ch_map_update
+0x4500 mem_24g_ch_update_map1
+0x4504 mem_24g_ch_update_map2
+0x4508 mem_24g_ch_update_map3
+0x450c mem_24g_ch_update_map4
+0x4510 mem_24g_disable_fec1
+0x4511 mem_24g_pair_addr
+0x4515 mem_24g_pair_ch
+0x4516 mem_24g_pair_tx_power
+0x4517 mem_rssi_buff_index
+0x4518 mem_24g_device1_bind_step
+0x4519 mem_24g_device2_bind_step
+0x451a mem_24g_bind_device_status
+0x451b mem_24g_bind_payload
+0x4523 mem_cb_24g_receive_process
+0x4525 mem_cb_24g_ackpayload
+0x4527 mem_cb_24g_data_device1
+0x4529 mem_cb_24g_data_device2
+0x452b mem_24g_rxdata_temp
+0x454d mem_24g_abort_packet
+0x454e mem_24g_hop_btclk
+0x4552 mem_24g_hop_interval
+0x4553 mem_24g_pair_mode
+0x4554 mem_24g_ackpayload_enable
+0x4555 mem_24g_hop_packet
+0x4556 mem_24g_mode_switch
+0x4557 mem_24g_nodata_timer_enable
+0x4558 mem_24g_mode_init
+0x4559 mem_24g_work_mode
+0x455a mem_24g_time_slice
+0x455b mem_24g_self_last_ch
+0x455c mem_24g_self_ch_number
+0x455d mem_24g_self_config_ch_once
+0x455e mem_24g_device1_last_ch
+0x455f mem_24g_device1_ch_number
+0x4560 mem_24g_device1_config_ch_once
+0x4561 mem_24g_device2_last_ch
+0x4562 mem_24g_device2_ch_number
+0x4563 mem_24g_device2_config_ch_once
+0x4564 mem_24g_led_status
+0x4565 mem_24g_bind_mode_continue
+0x4566 mem_tx_power_temp
+0x4567 mem_24g_mode_B_S_switch
+0x4568 mem_24g_mode_B_S_switch_init
+0x4569 mem_24g_mode_B_S_switch_cnt
+0x456b mem_24g_mode_B_S_switch_exit
+0x456c mem_24g_B_S_time_slice
+0x456d mem_24g_B_S_mode_switch_disable
+0x456e mem_24g_bind_device_living
+0x456f mem_24g_transmitter_addr
+0x4573 mem_24g_device1_addr
+0x4577 mem_24g_device2_addr
+0x457b mem_rssi_noise_avg
+0x457c mem_rssi_noise_index
+0x457d mem_rssi_noise_self_avg
+0x457e mem_rssi_noise_device1_avg
+0x457f mem_rssi_noise_device2_avg
+0x4580 mem_rssi_noise_self_index
+0x4581 mem_rssi_noise_device1_index
+0x4582 mem_rssi_noise_device2_index
+0x4583 mem_rssi_noise_buffer_ptr
+0x4585 mem_rssi_noise_self_buffer_ptr
+0x4587 mem_rssi_noise_device1_buffer_ptr
+0x4589 mem_rssi_noise_device2_buffer_ptr
+0x458b mem_car_hard_soft_switch
+0x458c mem_car_queue_each_size
+0x458d mem_car__queue_length
+0x458e mem_car_queue_curr_num
+0x458f mem_car_queue_read_ptr
+0x4590 mem_car_queue_write_ptr
+0x4591 mem_car_queue_ele
+0x4609 mem_car_pop_queue_buff
+0x461d mem_car_led_num
+0x461e mem_car_led_map
+0x4628 mem_car_style1_led_type
+0x4629 mem_car_style1_blink_count
+0x462a mem_car_style1_struct_led_gpio
+0x462b mem_car_style1_on_time
+0x462d mem_car_style1_off_time
+0x462f mem_car_style1_cb_ledon
+0x4631 mem_car_style1_cb_ledoff
+0x4633 mem_car_style2_led_type
+0x4634 mem_car_style2_blink_count
+0x4635 mem_car_style2_struct_led_gpio
+0x4636 mem_car_style2_on_time
+0x4638 mem_car_style2_off_time
+0x463a mem_car_style2_cb_ledon
+0x463c mem_car_style2_cb_ledoff
+0x463e mem_le_receive_data
+0x463e mem_le_receive_packet_head
+0x4640 mem_le_receive_cmd
+0x4641 mem_le_receive_length
+0x4643 mem_le_receive_payload
+0x464d mem_le_receive_checksum
+0x464e mem_motor1_status
+0x464f mem_motor1_speed
+0x4650 mem_motor2_status
+0x4651 mem_motor2_speed
+0x4652 mem_motor3_status
+0x4653 mem_motor3_speed
+0x4654 mem_motor1_pwm_set
+0x4654 mem_motor1_pwm_pin1_set
+0x4655 mem_motor1_pwm_pin2_set
+0x4656 mem_motor1_pwm_pin_set
+0x4657 mem_motor1_pwm_channel_set
+0x4658 mem_motor1_pwm_freq_set
+0x465b mem_motor1_pwm_dute_set
+0x465c mem_motor2_pwm_set
+0x465c mem_motor2_pwm_pin1_set
+0x465d mem_motor2_pwm_pin2_set
+0x465e mem_motor2_pwm_pin_set
+0x465f mem_motor2_pwm_channel_set
+0x4660 mem_motor2_pwm_freq_set
+0x4663 mem_motor2_pwm_dute_set
+0x4664 mem_motor3_pwm_set
+0x4664 mem_motor3_pwm_pin1_set
+0x4665 mem_motor3_pwm_pin2_set
+0x4666 mem_motor3_pwm_pin_set
+0x4667 mem_motor3_pwm_channel_set
+0x4668 mem_motor3_pwm_freq_set
+0x466b mem_motor3_pwm_dute_set
+0x466c mem_motor_select_p_n
+0x466d mem_car_motor_status
+0x466e mem_car_motor_speed
+0x466f mem_motor_pwm_set
+0x466f mem_motor_pwm_pin1_set
+0x4670 mem_motor_pwm_pin2_set
+0x4671 mem_motor_pwm_pin_set
+0x4672 mem_motor_pwm_channel_set
+0x4673 mem_motor_pwm_freq_set
+0x4676 mem_motor_pwm_dute_set
+0x4677 mem_ir_rx_gpio
+0x4678 mem_ir_data
+0x467a mem_ir_rx_buf
+0x467c mem_ir_receive_clkn
+0x4680 mem_ir_notify_data
+0x4683 mem_ir_notify_data_head
+0x4688 mem_ir_notify_data_payload
+0x468a mem_ir_notify_data_check_sum
+0x468b mem_car_ir_breakdown_check_timer
+0x468c mem_car_ir_breakdown_flag
+0x468d mem_car_led_control
+0x468d mem_car_led1_status
+0x468e mem_car_led2_status
+0x468f mem_car_led3_status
+0x4690 mem_car_led4_status
+0x4691 mem_car_led5_status
+0x4692 mem_car_led6_status
+0x4693 mem_car_led7_status
+0x4694 mem_car_led8_status
+0x4695 mem_car_led_control_timer
+0x4696 mem_car_led_blink_status
+0x4697 mem_car_led_no
+0x4698 mem_car_info_request
+0x469b mem_car_info_request_head
+0x46a0 mem_car_info_request_payload
+0x46a8 mem_car_info_request_checksum
+0x46a9 mem_car_config_param
+0x46a9 mem_car_config_setting_flag
+0x46aa mem_car_config_device_select
+0x46ab mem_car_config_motor_layout
+0x46ac mem_car_config_ir_enable
+0x46ad mem_car_config_ir_rx_gpio
+0x46ae mem_car_config_pairing_led_conn_status
+0x46af mem_car_config_pairing_led_gpio
+0x46b0 mem_car_config_led_num
+0x46b1 mem_car_config_blood_led_gpio
+0x46b1 mem_car_config_blood_led1_gpio
+0x46b2 mem_car_config_blood_led2_gpio
+0x46b3 mem_car_config_blood_led3_gpio
+0x46b4 mem_car_config_blood_led4_gpio
+0x46b5 mem_car_config_blood_led5_gpio
+0x46b6 mem_car_config_blood_led6_gpio
+0x46b7 mem_car_config_blood_led7_gpio
+0x46b8 mem_car_config_blood_led8_gpio
+0x46b9 mem_car_config_bat_notify_enable
+0x46ba mem_car_config_low_voltage_led_gpio
+0x46bb mem_car_config_low_voltage_percent
+0x46bc mem_car_config_soft_switch_enable
+0x46bd mem_car_config_soft_switch_gpio
+0x46be mem_car_notify_vdd_count
+0x46bf mem_car_notify_vdd_timer
+0x46c0 mem_car_notify_vdd_value_last
+0x46c1 mem_car_notify_vdd_percent
+0x46c2 mem_car_working_flag
+0x46c3 mem_low_bat_flag
+0x46c4 mem_notify_bat_packet
+0x46c7 mem_notify_bat_head
+0x46cc mem_notify_bat_payload
+0x46cd mem_notify_bat_check_sum
+0x46ce mem_vdd_notify_flag
+0x46cf mem_car_current_vdd_value_temp
+0x46d1 mem_car_last_vdd_value
+0x46d3 mem_vdd_calculate_set
+0x46d3 mem_vdd_full_vol
+0x46d5 mem_vdd_empty_vol
+0x46d7 mem_vdd_low_vol
+0x46d9 mem_vdd_now_vol
+0x46db mem_car_24g_status
+0x46dc mem_car_24g_no_data_timeout_count
+0x46de mem_car_24g_no_data_timeout_timer
+0x46e0 mem_car_24g_ir_receive_attack_count
+0x46e1 mem_car_24g_go_die_flag
+0x46e2 mem_car_attack_shake_timer
+0x46e3 mem_car_attack_shake_flag
+0x46e4 mem_car_soft_power
+0x46e4 mem_car_power_state
+0x46e5 mem_car_power_timer
+0x46e6 mem_car_power_off_timeout
+0x46e7 mem_car_power_starting_timeout
+0x46e8 mem_car_power_off_cb
+0x46ea mem_car_power_starting_cb
+0x46ec mem_car_power_standby_cb
+0x46ee mem_car_ui_button_up_cb
+0x46f0 mem_car_le_att_list
+0x48e4 mem_car_moto1_blank_timer
+0x48e5 mem_car_moto2_blank_timer
+0x48e6 mem_car_moto3_blank_timer
+0x48e7 mem_car_motor_gpio_num
+0x48e8 mem_car_motor_gpio_map
+0x48e8 mem_car_motor_left_gpio
+0x48e9 mem_car_motor_right_gpio
+0x48ea mem_car_motor_front_gpio
+0x48eb mem_car_motor_back_gpio
+0x48ec mem_car_gpio
+0x48ed mem_car_app_send_speed
+0x48ee mem_rssi_sum
+0x48f0 mem_check_rssi_high_count
+0x48f2 mem_rssi_data
+0x48fa mem_car_24g_received_pac
+0x48fb mem_car_24g_bind_enable_delay_count
+0x48fc mem_car_keyscan
+0x48fc mem_car_key_num
+0x48fd mem_cb_car_keyscan
+0x48ff mem_car_enter_lpm_timer_count
+0x4901 mem_car_enter_lpm_timer
+0x4903 mem_car_enter_lpm_flag
+0x4904 mem_car_24g_ch_polling
+0x4905 mem_car_rssi_noise_buffer
+0x490d mem_car_rssi_noise_car_buffer
+0x4915 mem_car_rssi_noise_remote_buffer
+0x491d mem_car_24g_commom_addr
+0x4921 mem_car_24g_commom_addr_temp
+0x4925 mem_car_24g_commom_addr_read
+0x4929 mem_car_save_addr_flag
+0x492a mem_ble_att_list
+0x458b mem_dg_kb_bind_flag
+0x458c mem_dg_kb_data_sta_data
+0x4594 mem_dg_kb_data_last_data
+0x459c mem_dg_kb_multikey_sta_data
+0x459f mem_dg_kb_multikey_last_data
+0x45a2 mem_dg_kb_system_sta_data
+0x45a5 mem_dg_kb_system_last_data
+0x45a8 mem_dg_kb_blank_data_enable
+0x45a9 mem_dg_kb_mul_blank_data_enable
+0x45aa mem_dg_ms_blank_data_enable
+0x45ab mem_dg_sys_config
+0x45ac mem_dg_usb_vid_pid
+0x45b5 mem_dg_usb_tx_interval
+0x45b6 mem_dg_usb_device_name
+0x45d4 mem_dg_kb_bind_success
+0x45d5 mem_dg_pc_sleep_flag
+0x45d6 mem_dg_24g_tx_power_default
+0x45d7 mem_24g_device1_bind_disable
+0x45d8 mem_24g_device2_bind_disable
+0x4518 mem_rssi_hex_received
+0x4519 mem_24g_pair_sm
+0x451a mem_24g_pair_no_ack
+0x451b mem_24g_pair_timeout_init
+0x451d mem_24g_pair_timeout
+0x451f mem_24g_reconn_timeout_init
+0x4521 mem_24g_reconn_timeout
+0x4523 mem_24g_reconn_count
+0x4525 mem_24g_reconn_type
+0x4526 mem_24g_fast_conn_enable
+0x4527 mem_24g_fast_conn_addr
+0x452b mem_24g_receiver_addr
+0x452f mem_24g_fast_conn_temp_ch
+0x4530 mem_24g_receiver_temp_ch
+0x4531 mem_24g_device_temp_ch
+0x4532 mem_rssi_signal_index
+0x4533 mem_rssi_signal_buf_ptr
+0x4535 mem_cb_24g_transmit_data
+0x4537 mem_cb_24g_search_receiver
+0x4539 mem_cb_24g_lpm_before
+0x453b mem_24g_conn_sm
+0x453c mem_24g_ensure
+0x453d mem_24g_txfail_cnt
+0x453f mem_24g_attempt_fail_flag
+0x4540 mem_24g_retry
+0x4541 mem_24g_abort_pac
+0x4542 mem_24g_max_retry
+0x4543 mem_24g_device_addr
+0x4547 mem_24g_short_sleep_set
+0x454a mem_24g_long_sleep_set
+0x4552 mem_24g_long_sleep_set1
+0x4556 mem_24g_pac_index
+0x4557 mem_24g_transmit_by_interrupt
+0x4558 mem_24g_transmit_by_interrupt_exit_count
+0x455a mem_24g_transmit_by_interrupt_exit_count_init
+0x455c mem_24g_long_sleep_param_update_timer_init
+0x455e mem_24g_long_sleep_param_update_timer
+0x4560 mem_24g_fast_hop_count
+0x4561 mem_rssi_avg_received
+0x4562 mem_power_ctrl_level
+0x4563 mem_power_ctrl_pac_succ_cnt
+0x4564 mem_power_ctrl_pac_succ_cnt_init
+0x4565 mem_rssi_dis_min_24g
+0x4566 mem_rssi_dis_max_24g
+0x4567 mem_rssi_hex_received_max_value
+0x4568 mem_rssi_dis_min_ble
+0x4569 mem_rssi_dis_max_ble
+0x456a mem_mouse_key
+0x456b mem_mouse_x
+0x456d mem_mouse_y
+0x456f mem_mouse_z
+0x4570 mem_mouse_tz
+0x4571 mem_mouse_xy_h
+0x4572 mem_mouse_key_last
+0x4573 mem_wheel_tb_old_pinlevel
+0x4574 mem_wheel_tb_new_pinlevel
+0x4575 mem_wheel_tog
+0x4576 mem_mouse_tz_data
+0x4577 mem_mwheel_b_old_pinlevel
+0x4578 mem_mwheel_b_new_pinlevel
+0x4579 mem_mwheel_tog
+0x457a mem_mouse_z_data
+0x457b mem_mouse_wheel_trigger
+0x457c mem_mouse_wheel_trigger_timer
+0x457d mem_mouse_vdd_calculate_set
+0x457d mem_mouse_vdd_full_vol
+0x457f mem_mouse_vdd_empty_vol
+0x4581 mem_mouse_vdd_low_vol
+0x4583 mem_mouse_vdd_now_vol
+0x4585 mem_mouse_vdd_button_press_vol
+0x4587 mem_mouse_vdd_switch_gnd_24g_vol
+0x4589 mem_mouse_vdd_switch_gnd_full_vol
+0x458b mem_mouse_vdd_switch_gnd_shutdown_voltage
+0x458d mem_mouse_vdd_switch_gnd_low_voltage
+0x458f mem_adc_mux_status
+0x4590 mem_adc_read_timer
+0x4591 mem_adc_read_time_init
+0x4592 mem_adc_low_volatage_led_timer_count
+0x4593 mem_adc_low_volatage_led_blink_enable
+0x4594 mem_mouse_adc_last_low_voltage_flag
+0x4595 mem_mouse_adc_button_press_flag
+0x4596 mem_adc_channel_gpio
+0x4597 mem_adc_config_flag_init
+0x4598 mem_mouse_discovery_timeout
+0x459a mem_mouse_24g_pair_timeout_init
+0x459c mem_mouse_direct_timeout
+0x459d mem_mouse_24g_reconn_timeout_init
+0x459e mem_mouse_24g_pair_tx_power
+0x459f mem_rssi_dis_min_24g_init
+0x45a0 mem_rssi_dis_max_24g_init
+0x45a1 mem_rssi_hex_received_max_value_init
+0x45a2 mem_rssi_dis_min_ble_init
+0x45a3 mem_rssi_dis_max_ble_init
+0x45a4 mem_mouse_enable_flag
+0x45a5 mem_mouse_param_config
+0x45a5 mem_lbutton_gpio
+0x45a6 mem_mbutton_gpio
+0x45a7 mem_rbutton_gpio
+0x45a8 mem_bk_button_gpio
+0x45a9 mem_fw_button_gpio
+0x45aa mem_dpi_button_gpio
+0x45ab mem_whee_a_data_gpio
+0x45ac mem_whee_b_data_gpio
+0x45ad mem_mouse_sensor_sclk_gpio
+0x45ae mem_mouse_sensor_sdio_gpio
+0x45af mem_select_sensor_angle_gpio
+0x45b0 mem_sensor_angle_default
+0x45b1 mem_sensor_angle_switch
+0x45b2 mem_config_sensor_dpi
+0x45b3 mem_whee_ta_data_gpio
+0x45b4 mem_whee_tb_data_gpio
+0x45b5 mem_matrix_public_gpio
+0x45b6 mem_config_select_device_button_gpio
+0x45b7 mem_customer_key_gpio
+0x45b8 mem_sensor_motion_gpio
+0x45b9 mem_device_switch_gpio
+0x45ba mem_mouse_reuse_2ice_gpio
+0x45bb mem_config_low_voltage_alarm_gpio
+0x45bc mem_config_device_24g_led_gpio
+0x45bd mem_config_device_bt1_led_gpio
+0x45be mem_config_device_bt2_led_gpio
+0x45bf mem_dpi_led_gpio
+0x45c0 mem_mouse_param_config_end
+0x45c0 mem_config_sensor_type
+0x45c1 mem_config_sensor_angle
+0x45c2 mem_wire_usb_interval
+0x45c3 mem_usb_addr
+0x45c4 mem_mouse_usb_vdd_status
+0x45c5 mem_mouse_usb_keyboard_flag
+0x45c6 mem_mouse_led_type
+0x45c7 mem_mouse_blink_count
+0x45c8 mem_mouse_struct_led_gpio
+0x45c9 mem_mouse_on_time
+0x45cb mem_mouse_off_time
+0x45cd mem_mouse_cb_ledon
+0x45cf mem_mouse_cb_ledoff
+0x45d1 mem_mouse_information_start
+0x45d1 mem_device_flag
+0x45d2 mem_device1_type
+0x45d3 mem_device1_addr
+0x45d9 mem_device1_link_key
+0x45e9 mem_device1_locall_addr
+0x45ef mem_device2_type
+0x45f0 mem_device2_addr
+0x45f6 mem_device2_link_key
+0x4606 mem_device2_locall_addr
+0x460c mem_device3_type
+0x460d mem_mouse_compare_addr_ff
+0x460d mem_device3_addr
+0x4613 mem_device3_link_key
+0x4623 mem_device3_locall_addr
+0x4629 mem_store_flag
+0x462b mem_mouse_dpi
+0x462c mem_mouse_24g_addr
+0x4630 mem_random_addr_increase_count
+0x4632 mem_mouse_retention
+0x4651 mem_mouse_information_end
+0x4651 mem_flash_base
+0x4654 mem_write_flash_head_temp
+0x4658 mem_store_information_delay_timer
+0x4659 mem_store_information_delay_timer_init
+0x465a mem_sensor_id1
+0x465b mem_sensor_id2
+0x465c mem_sensor_shutter_hi
+0x465d mem_sensor_shutter_lo
+0x465e mem_sensor_smart_flag
+0x465f mem_sensor_squal_reg
+0x4660 mem_sensor_iqc
+0x4661 mem_mouse_move_flag
+0x4662 mem_mouse_asm_flag
+0x4663 mem_mouse_x_pre
+0x4665 mem_mouse_y_pre
+0x4667 mem_mouse_data_xtemp
+0x4668 mem_mouse_data_ytemp
+0x4669 mem_mouse_dpi_seting
+0x4669 mem_320x_dpi_0
+0x466a mem_320x_dpi_1
+0x466b mem_320x_dpi_2
+0x466c mem_320x_dpi_3
+0x466d mem_3212_dpi_0
+0x466e mem_3212_dpi_1
+0x466f mem_3212_dpi_2
+0x4670 mem_3212_dpi_3
+0x4671 mem_ka8g2_dpi_0
+0x4672 mem_ka8g2_dpi_1
+0x4673 mem_ka8g2_dpi_2
+0x4674 mem_ka8g2_dpi_3
+0x4675 mem_mouse_cpi_count
+0x4676 mem_mouse_dpi_button_state
+0x4677 mem_mouse_dpi_long_press_flag
+0x4678 mem_sensor_3212_init
+0x4682 mem_sensor_3204_init
+0x468c mem_sensor_3205_init
+0x4696 mem_sensor_32xx_init
+0x46b0 mem_sensor_32xx_init_1
+0x46d2 mem_sensor_8650_init
+0x46f8 mem_sensor_ka8ul_init
+0x4716 mem_sensor_8009_init
+0x4726 mem_sensor_ka8g2_init
+0x4736 mem_sensor_p6520_init
+0x4742 mem_sensor_poweron_init
+0x474a mem_mouse_clear_sensor_data_flag
+0x474b mem_bluetooth_125hz_cnt
+0x474c mem_mouse_long_mult_flag
+0x474d mem_mouse_current_mult_timer
+0x474e mem_reconn_times
+0x474f mem_reconn_times_init
+0x4750 mem_mouse_no_data_timer
+0x4752 mem_device_flag_temp
+0x4753 mem_mouse_rssi_signal_buf
+0x475b mem_btclk_sensor
+0x475f mem_mouse_bluetooth_fast_conn_flag
+0x4760 mem_mouse_discovery_timer
+0x4762 mem_mouse_bluetooth_reconnect_timeout
+0x4763 mem_mouse_need_soft_reset
+0x4764 mem_mouse_le_bb_connected_flag
+0x4765 mem_mouse_le_reconnect_flag
+0x4766 mem_mouse_send_secutiry_request_timer
+0x4767 mem_mouse_le_lap_temp
+0x476a mem_le_adv_ind
+0x476d mem_le_adv_direct_ind
+0x4770 mem_le_adv_swift_pair
+0x4784 mem_le_data_len
+0x4785 mem_le_keyboard_handle
+0x4787 mem_le_multimedia_handle
+0x4789 mem_le_systemctrl_handle
+0x478b mem_le_battery_level_handle
+0x478d mem_le_battery_level_percentage
+0x478e mem_le_battery_level_updata_timer_init
+0x4790 mem_le_battery_level_updata_timer
+0x4792 mem_mouse_le_conn_param_reject
+0x4793 mem_le_tx_buffer0_omemalloc
+0x47b3 mem_le_tx_buffer1_omemalloc
+0x47d3 mem_le_tx_buffer2_omemalloc
+0x47f3 mem_le_tx_buffer3_omemalloc
+0x4813 mem_le_connect_status_flag
+0x4814 mem_le_start_encrypt_timer
+0x4815 mem_mouse_direct_timer
+0x4816 mem_device_addr_temp
+0x481d mem_mouse_bt_boot_mode
+0x481e mem_mouse_bt_boot_data
+0x4823 mem_bt_send_max_slot_req_accept_after_switch
+0x4824 mem_mouse_bt_send_first_package_timer
+0x4825 mem_mouse_bt_send_first_package_flag
+0x4826 mem_lmi_opcode_temp
+0x4827 mem_lpm_mult_init
+0x4828 mem_customer_key
+0x4829 mem_customer_data_trigger
+0x482a mem_customer_data_trigger_last
+0x482b mem_mouse_lkey_press_status
+0x482c mem_mouse_rkey_press_status
+0x482d mem_mouse_mkey_press_status
+0x482e mem_mouse_bkkey_press_status
+0x482f mem_mouse_fwkey_press_status
+0x4830 mem_mouse_dpikey_press_status
+0x4831 mem_mouse_pbkey_press_status
+0x4832 mem_mouse_customerkey_press_status
+0x4833 mem_mouse_key_temp
+0x4834 mem_mouse_key_status
+0x4835 mem_mouse_matrix_key_cow_count
+0x4836 mem_mouse_matrix_key_row_count
+0x4837 mem_mouse_ghost_flag
+0x4838 mem_bt_discovery_count
+0x4839 mem_select_device_count
+0x483a mem_mouse_commbination_key
+0x483b mem_select_device_button_statue
+0x483c mem_commbination_key_statue
+0x483d mem_combination_ui_button_count
+0x483e mem_mouse_search_dongle_interval
+0x483f mem_mouse_search_dongle_ch
+0x4840 mem_mouse_search_dongle_count
+0x4841 mem_mouse_search_dongle_action
+0x4842 mem_24g_enter_lpm_timer
+0x4843 mem_mouse_24g_enter_lpm_enable
+0x4844 mem_mouse_device_poweron_timer_count
+0x4845 mem_mouse_dpi_led_delay_count
+0x4846 mem_mouse_led_off_4_led
+0x4847 mem_24g_device_led_status
+0x4848 mem_mouse_flag
+0x4850 mem_device_number
+0x4851 mem_mouse_page_to
+0x4853 mem_mouse_fast_direct_timeout
+0x4854 mem_mouse_fast_page_to
+0x4856 mem_mouse_24g_power_on_fast_conn_timer
+0x4858 mem_mouse_24g_search_dongle_time_init
+0x485a mem_mouse_no_data_timeout
+0x485c mem_mouse_device_poweron_timer_count_init
+0x485d mem_mouse_dpi_led_delay_count_init
+0x485e mem_mouse_dpi_led_blink_time
+0x4860 mem_mouse_disconvey_led_blink_time
+0x4862 mem_mouse_low_v_led_blink_time
+0x4864 mem_adc_low_volatage_led_blink_timer
+0x4866 mem_mouse_commbination_key_bt
+0x4867 mem_mouse_commbination_key_24g
+0x4868 mem_customer_key_press
+0x4871 mem_customer_key_release
+0x487a mem_mouse_set_high_impedance_bit_set
+0x487d mem_sensor_shutdown_flag
+0x487e mem_24g_long_sleep_set_level
+0x456a mem_remote_car_hard_soft_switch
+0x456b mem_remote_car_queue_each_size
+0x456c mem_remote_car_queue_length
+0x456d mem_remote_car_queue_curr_num
+0x456e mem_remote_car_queue_read_ptr
+0x456f mem_remote_car_queue_write_ptr
+0x4570 mem_remote_car_queue_ele
+0x45ca mem_remote_style_led_type
+0x45cb mem_remote_style_blink_count
+0x45cc mem_remote_style_struct_led_gpio
+0x45cd mem_remote_style_on_time
+0x45cf mem_remote_style_off_time
+0x45d1 mem_remote_style_cb_ledon
+0x45d3 mem_remote_style_cb_ledoff
+0x45d5 mem_remote_car_led_num
+0x45d6 mem_remote_car_led_map
+0x45de mem_remote_car_keyscan
+0x45de mem_remote_car_key_num
+0x45df mem_cb_remote_car_keyscan
+0x45e1 mem_remote_car_key_conf0
+0x45e1 mem_remote_car_key_conf0_pin
+0x45e2 mem_remote_car_key_conf1
+0x45e2 mem_remote_car_key_conf1_pin
+0x45e3 mem_remote_car_key_conf2
+0x45e3 mem_remote_car_key_conf2_pin
+0x45e4 mem_remote_car_key_conf3
+0x45e4 mem_remote_car_key_conf3_pin
+0x45e5 mem_remote_car_key_conf4
+0x45e5 mem_remote_car_key_conf4_pin
+0x45e6 mem_remote_car_key_conf5
+0x45e6 mem_remote_car_key_conf5_pin
+0x45e7 mem_remote_car_key_conf6
+0x45e7 mem_remote_car_key_conf6_pin
+0x45e8 mem_rocker_negative_flag
+0x45e9 mem_rocker_work_status
+0x45ea mem_current_vdd_value_default_mid_x
+0x45ec mem_current_vdd_value_default_mid_y
+0x45ee mem_current_vdd_value_default_mid_temp
+0x45f0 mem_current_vdd_default_range
+0x45f2 mem_rocker_last_status
+0x45f4 mem_rocker_status
+0x45f4 mem_rocker_x_status
+0x45f5 mem_rocker_y_status
+0x45f6 mem_remote_car_config_param
+0x45f6 mem_remote_car_config_setting_flag
+0x45f7 mem_remote_car_config_key_map
+0x45f8 mem_remote_car_config_layout
+0x45f9 mem_remote_car_config_connect_led_gpio
+0x45fa mem_remote_car_config_check_way
+0x45fb mem_remote_car_config_soft_switch_enable
+0x45fc mem_remote_car_config_soft_switch_gpio
+0x45fd mem_remote_car_config_timeout_shutdown_enable
+0x45fe mem_remote_car_24g_motor_packet
+0x45fe mem_remote_car_24g_motor_packet_lenght
+0x45ff mem_remote_car_24g_motor_send_packet_head
+0x4601 mem_remote_car_24g_motor_send_cmd
+0x4602 mem_remote_car_24g_motor_send_length
+0x4604 mem_remote_car_24g_motor_send_payload
+0x4604 mem_remote_car_24g_motor1_payload
+0x4606 mem_remote_car_24g_motor2_payload
+0x4608 mem_remote_car_24g_motor3_payload
+0x460a mem_remote_car_24g_motor_send_checksum
+0x460b mem_remote_car_24g_fire_packet
+0x460b mem_remote_car_24g_fire_packet_lenght
+0x460c mem_remote_car_24g_fire_send_packet_head
+0x460e mem_remote_car_24g_fire_send_cmd
+0x460f mem_remote_car_24g_fire_send_length
+0x4611 mem_remote_car_24g_fire_send_payload
+0x4613 mem_remote_car_24g_fire_send_checksum
+0x4614 mem_remote_car_24g_tx_temp
+0x4623 mem_remote_car_no_data_timeout
+0x4625 mem_remote_car_no_data_timer
+0x4627 mem_remote_car_soft_power
+0x4627 mem_remote_car_power_state
+0x4628 mem_remote_car_power_timer
+0x4629 mem_remote_car_power_off_timeout
+0x462a mem_remote_car_power_starting_timeout
+0x462b mem_remote_car_power_off_cb
+0x462d mem_remote_car_power_starting_cb
+0x462f mem_remote_car_power_standby_cb
+0x4631 mem_remote_key_status
+0x4632 mem_remote_car_24g_status
+0x4633 mem_remote_car_24g_auto_work_step
+0x4634 mem_remote_car_24g_pair_success_flag
+0x4635 mem_remote_car_empty_packet
+0x4636 mem_remote_car_motor1_key0_press_state
+0x4637 mem_remote_car_motor1_key1_press_state
+0x4638 mem_remote_car_motor2_key2_press_state
+0x4639 mem_remote_car_motor2_key3_press_state
+0x463a mem_remote_car_motor1_rel_state
+0x463b mem_remote_car_motor2_rel_state
+0x463c mem_remote_car_no_data_check
+0x463d mem_remote_24g_commom_addr
+0x4641 mem_remote_24g_commom_addr_temp
+0x4645 mem_remote_24g_commom_addr_read
+0x4649 mem_remote_save_addr_flag
+0x4437 mem_hci_uart_tx_gpio
+0x4438 mem_hci_uart_rx_gpio
+0x4439 mem_hci_uart_rts_gpio
+0x443a mem_hci_uart_cts_gpio
+0x443b mem_hci_pwm_12mhz_gpio
+0x4437 mem_soft_version_num
+0x4439 mem_module_wake_up_gpio
+0x443a mem_module_state_gpio
+0x443b mem_module_connect_state_gpio
+0x443c mem_current_packet_length
+0x443e mem_module_state
+0x443f mem_module_mcu_wake_pin
+0x4440 mem_module_mcu_wake_delay_us
+0x4444 mem_module_le_lpm_mult
+0x4445 mem_module_bluetooth_stauts_by_command
+0x4446 mem_module_uart_rx_buffer
+0x4448 mem_module_uart_rx_buffer_end
+0x444a mem_module_uart_tx_buffer
+0x444c mem_module_uart_tx_buffer_end
+0x444e mem_module_uarta_baud_rate
+0x4450 mem_module_read_vdd_flag
+0x4451 mem_module_read_vdd_count
+0x4452 mem_module_vdd_quotient
+0x4453 mem_module_vdd_remainder
+0x4454 mem_module_ble_data_uart_max_length
+0x4455 mem_module_flag
+0x4457 mem_module_hci_notify_len
+0x4458 mem_module_hci_notify_handle
+0x445a mem_module_hci_nofiy_addr
+0x445c mem_module_hci_notify_type
+0x445d mem_module_le_att_list
+0x46b5 mem_module_le_att_list_end
+0x46b5 mem_module_nv_data
+0x46b5 mem_module_nv_data0
+0x46d7 mem_module_nv_data1
+0x46f9 mem_module_nv_data2
+0x471b mem_module_nv_data3
+0x473d mem_module_nv_data4
+0x475f mem_module_nv_data_end
+0x4437 mem_shutter_bluetooth_type
+0x4438 mem_shutter_config_eeprom_offset_addr
+0x443a mem_shutter_config_eeprom_start_flag
+0x443c mem_shutter_config_user_size
+0x443d mem_shutter_config_label
+0x443e mem_shutter_config_otp_addr
+0x4440 mem_classic_shutter_random_mac_offset_addr
+0x4442 mem_ble_shutter_enable_notify
+0x4443 mem_ble_shutter_reconn_adv_interval
+0x4445 mem_ble_shutter_discovery_adv_interval
+0x4447 mem_ble_shutter_reconn_timeout
+0x4449 mem_ble_shutter_reconn_timer
+0x444b mem_ble_shutter_reconn_blink_on_time
+0x444d mem_ble_shutter_reconn_blink_off_time
+0x444f mem_ble_shutter_discovery_blink_on_time
+0x4451 mem_ble_shutter_discovery_blink_off_time
+0x4453 mem_ble_shutter_interval_min
+0x4455 mem_ble_shutter_interval_max
+0x4457 mem_ble_shutter_latency
+0x4459 mem_ble_shutter_timeout
+0x445b mem_ble_shutter_interval_min_new
+0x445d mem_ble_shutter_interval_max_new
+0x445f mem_ble_shutter_latency_new
+0x4461 mem_ble_shutter_timeout_new
+0x4463 mem_classic_shutter_discovery_timeout
+0x4465 mem_classic_shutter_connect_timeout
+0x4467 mem_ble_shutter_discovery_timeout
+0x4469 mem_ble_shutter_connect_timeout
+0x446b mem_shutter_sleep_timeout
+0x446d mem_shutter_sleep_timer
+0x446f mem_shutter_hard_soft_switch_case
+0x4470 mem_shutter_soft_switch_button_gpio
+0x4471 mem_shutter_soft_switch_power_state
+0x4472 mem_shutter_soft_switch_poweron_time
+0x4473 mem_shutter_soft_switch_poweroff_time
+0x4474 mem_shutter_soft_switch_poweron_callback_function
+0x4476 mem_shutter_soft_switch_poweroff_callback_function
+0x4478 mem_shutter_keyscan
+0x4478 mem_shutter_key_num
+0x4479 mem_cb_shutter_keycan
+0x447b mem_shutter_key_conf0
+0x447c mem_shutter_key_conf1
+0x447d mem_shutter_key_conf2
+0x447e mem_shutter_key_conf3
+0x447f mem_shutter_key_conf4
+0x4480 mem_shutter_key_conf5
+0x4481 mem_shutter_key_conf6
+0x4482 mem_shutter_key_conf7
+0x4483 mem_key0_press
+0x4488 mem_key1_press
+0x448d mem_key2_press
+0x4492 mem_key3_press
+0x4497 mem_key4_press
+0x449c mem_key5_press
+0x44a1 mem_key6_press
+0x44a6 mem_key7_press
+0x44ab mem_key0_release
+0x44b0 mem_key1_release
+0x44b5 mem_key2_release
+0x44ba mem_key3_release
+0x44bf mem_key4_release
+0x44c4 mem_key5_release
+0x44c9 mem_key6_release
+0x44ce mem_key7_release
+0x44d3 mem_ble_data_buffer1
+0x44d8 mem_ble_data_buffer2
+0x44dd mem_ble_data_buffer3
+0x44e2 mem_ble_data_buffer4
+0x44e7 mem_ble_data_buffer5
+0x44ec mem_ble_data_buffer6
+0x44f1 mem_ble_data_buffer7
+0x44f6 mem_ble_data_buffer8
+0x44fb mem_ble_data_buffer9_58
+0x452d mem_classic_data_buffer
+0x4532 mem_classic_data_buffer1
+0x4537 mem_classic_data_buffer2
+0x453c mem_classic_data_buffer3
+0x4541 mem_classic_data_buffer4
+0x4546 mem_classic_data_buffer5
+0x454b mem_classic_data_buffer6
+0x4550 mem_classic_data_buffer7
+0x4555 mem_classic_data_buffer8
+0x455a mem_classic_data_buffer9_58
+0x458c mem_queue_each_size
+0x458d mem_queue_length
+0x458e mem_queue_curr_num
+0x458f mem_queue_read_ptr
+0x4590 mem_queue_write_ptr
+0x4591 mem_queue_ele
+0x45b1 mem_shutter_nv_data
+0x465b mem_shutter_led_struct_app_led
+0x465b mem_shutter_led_struct_app_led_type
+0x465c mem_shutter_led_struct_app_led_blink_count
+0x465d mem_shutter_led_struct_app_led_gpio
+0x465e mem_shutter_led_struct_app_led_on_time
+0x4660 mem_shutter_led_struct_app_led_off_time
+0x4662 mem_shutter_led_struct_app_led_on_callback
+0x4664 mem_shutter_led_struct_app_led_off_callback
+0x4666 mem_shutter_power_off_led_style
+0x4666 mem_shutter_power_off_led_style_type
+0x4667 mem_shutter_power_off_led_style_blink_count
+0x4668 mem_shutter_power_off_led_style_gpio
+0x4669 mem_shutter_power_off_led_style_on_time
+0x466b mem_shutter_power_off_led_style_off_time
+0x466d mem_shutter_power_off_led_style_on_callback
+0x466f mem_shutter_power_off_led_style_off_callback
+0x4671 mem_shutter_soft_swtich_botton_down
+0x4672 mem_shutter_soft_swtich_led_struct_temp
+0x467d mem_shutter_power_off_timeout
+0x467e mem_shutter_power_off_timer
+0x467f mem_shutter_key_conf0_temp
+0x4681 mem_shutter_led_struct_app_led_gpio_temp
+0x4682 mem_shutter_hard_soft_switch_case_temp
+0x4683 mem_shutter_soft_switch_button_gpio_temp
+0x4684 mem_shutter_soft_switch_first_power_on
+
Index: output/otp.dat
===================================================================
--- /branch/usb/usb_public_base/output/otp.dat	(revision 0)
+++ /branch/usb/usb_public_base/output/otp.dat	(working copy)
@@ -0,0 +1,8 @@
+00
+02
+aa
+55
+00
+00
+b3
+23
Index: output/program.lis
===================================================================
--- /branch/usb/usb_public_base/output/program.lis	(revision 0)
+++ /branch/usb/usb_public_base/output/program.lis	(working copy)
@@ -0,0 +1,25073 @@
+              include "bt_format "
+              org 0x0000
+0000 c284000d bbit1 8 ,pf_patch_ext 
+0001 c0000010 beq patch00_0 ,p_soft_reset 
+0002 c0018085 beq patch00_3 ,p_connection_incontext 
+0003 c00bb9ff beq patch02_7 ,set_tx_power_10db 
+0004 c01b001e beq patch06_6 ,p_dongle_usb_dispatch 
+0005 c0310015 beq patch0c_2 ,p_app_init 
+0006 c04a80a2 beq patch12_5 ,p_enable_adc 
+0007 c05c8020 beq patch17_1 ,p_usb_init 
+0008 c06a8068 beq patch1a_5 ,p_le_enable_phy_by_pdata 
+0009 c06f006d beq patch1b_6 ,p_le_receive_rxon 
+000a c0710088 beq patch1c_2 ,p_le_crc_fail_tx 
+000b c0740092 beq patch1d_0 ,p_le_transmit 
+000c 20203aba branch assert 
+
+pf_patch_ext:
+000d c17f8000 rtneq patch3f_7 
+000e c01d8031 beq patch27_3 ,p_g24_bind_data_parse_next 
+000f 20203aba branch assert 
+
+p_soft_reset:
+0010 2035b802 branch soft_reset + 1 ,wake 
+0011 6fe240cc fetch 4 ,mem_lpm_ctrl3 
+0012 67f2004c store 4 ,core_lpm_reg 
+0013 20403c49 call lpm_write_ctrl3 
+0014 20203802 branch soft_reset + 1 
+
+p_app_init:
+0015 6fe0c095 fetch 1 ,mem_device_option 
+0016 203a4d9b branch app_init ,blank 
+
+p_dongle_init:
+0017 20758000 rtn wake 
+0018 7040cc3a jam hvin_vin_greater_than_4v2 ,mem_lpm_ctrl3 
+0019 20403c41 call lpm_write_sel_vdd 
+001a 20405249 call dongle_init 
+001b 20406dee call wdt_set_enable 
+
+p_wdt_kick:
+001c 58000010 setarg 16 
+001d 20206de1 branch wdt_init_config 
+
+p_dongle_usb_dispatch:
+001e 2040001c call p_wdt_kick 
+001f 202052ee branch dongle_usb_dispatch + 1 
+
+p_usb_init:
+0020 20406fd3 call enable_authrom 
+0021 204071a1 call usb_init_param 
+0022 70061003 jam 0x03 ,mem_devicedesc + 17 
+0023 708c0000 jam 0x00 ,core_usb_config 
+0024 20002710 nop 10000 
+0025 708c1800 jam 0x00 ,core_usb_trig 
+0026 6ff10050 fetch 2 ,core_clkoff 
+0027 793ffe0a set0 clock_off_usb ,pdata 
+0028 67f10050 store 2 ,core_clkoff 
+0029 708c1100 jam 0x0 ,core_usb_hmode 
+002a 708c003c jam 0x3c ,core_usb_config 
+002b 58000bb3 setarg mem_usb_rxbuf_new 
+002c 67f10c03 store 2 ,core_usb_rx_saddr 
+002d 67f10c07 store 2 ,core_usb_rxptr 
+002e 58000bf7 setarg mem_usb_rxbuf_new_end 
+002f 67f10c05 store 2 ,core_usb_rx_eaddr 
+0030 20207192 branch usb_init + 16 
+
+p_g24_bind_data_parse_next:
+0031 6fe0c52d fetch 1 ,mem_24g_rxdata_temp + 2 
+0032 c0550036 beq datatype_bind ,p_g24_bind_first_step 
+0033 c02a8040 beq datatype_config ,p_g24_bind_second_step 
+0034 c0110050 beq datatype_ok ,p_g24_bind_third_step 
+0035 202049c8 branch g24_bind_data_parse_next + 4 
+
+p_g24_bind_first_step:
+0036 6fe0c52e fetch 1 ,mem_24g_rxdata_temp + 3 
+0037 c000803a beq datatype_device1 ,p_g24_bind_first_step_device1 
+0038 c001003d beq datatype_device2 ,p_g24_bind_first_step_device2 
+0039 20600000 rtn 
+
+p_g24_bind_first_step_device1:
+003a 6fe0c5d7 fetch 1 ,mem_24g_device1_bind_disable 
+003b 247a0000 nrtn blank 
+003c 202049ce branch g24_bind_first_step_device1 
+
+p_g24_bind_first_step_device2:
+003d 6fe0c5d8 fetch 1 ,mem_24g_device2_bind_disable 
+003e 247a0000 nrtn blank 
+003f 202049d4 branch g24_bind_first_step_device2 
+
+p_g24_bind_second_step:
+0040 6fe0c4f4 fetch 1 ,mem_24g_pair_switch 
+0041 203a0046 branch p_g24_bind_second_step_skip ,blank 
+0042 6fe2452f fetch 4 ,mem_24g_rxdata_temp + 4 
+0043 684a4437 fetcht 4 ,mem_24g_lap 
+0044 98467c00 isub temp ,null 
+0045 24628000 nrtn zero 
+
+p_g24_bind_second_step_skip:
+0046 6fe0c52e fetch 1 ,mem_24g_rxdata_temp + 3 
+0047 c000804a beq datatype_device1 ,p_g24_bind_second_step_device1 
+0048 c001004d beq datatype_device2 ,p_g24_bind_second_step_device2 
+0049 20600000 rtn 
+
+p_g24_bind_second_step_device1:
+004a 6fe0c5d7 fetch 1 ,mem_24g_device1_bind_disable 
+004b 247a0000 nrtn blank 
+004c 202049e1 branch g24_bind_second_step_device1 
+
+p_g24_bind_second_step_device2:
+004d 6fe0c5d8 fetch 1 ,mem_24g_device2_bind_disable 
+004e 247a0000 nrtn blank 
+004f 202049ec branch g24_bind_second_step_device2 
+
+p_g24_bind_third_step:
+0050 6fe0c4f4 fetch 1 ,mem_24g_pair_switch 
+0051 203a0056 branch p_g24_bind_third_step_skip ,blank 
+0052 6fe2452f fetch 4 ,mem_24g_rxdata_temp + 4 
+0053 684a456f fetcht 4 ,mem_24g_transmitter_addr 
+0054 98467c00 isub temp ,null 
+0055 24628000 nrtn zero 
+
+p_g24_bind_third_step_skip:
+0056 6fe0c52e fetch 1 ,mem_24g_rxdata_temp + 3 
+0057 c000805a beq datatype_device1 ,p_g24_bind_third_step_device1 
+0058 c0010061 beq datatype_device2 ,p_g24_bind_third_step_device2 
+0059 20600000 rtn 
+
+p_g24_bind_third_step_device1:
+005a 6fe0c5d7 fetch 1 ,mem_24g_device1_bind_disable 
+005b 247a0000 nrtn blank 
+005c 6fe0c518 fetch 1 ,mem_24g_device1_bind_step 
+005d c001005f beq 2 ,p_g24_bind_dvc1_step_success 
+005e 20600000 rtn 
+
+p_g24_bind_dvc1_step_success:
+005f 7045d701 jam 1 ,mem_24g_device1_bind_disable 
+0060 20204a01 branch g24_bind_dvc1_step_success 
+
+p_g24_bind_third_step_device2:
+0061 6fe0c5d8 fetch 1 ,mem_24g_device2_bind_disable 
+0062 247a0000 nrtn blank 
+0063 6fe0c519 fetch 1 ,mem_24g_device2_bind_step 
+0064 c0800066 bne 0 ,p_g24_bind_dvc2_step_success 
+0065 20600000 rtn 
+
+p_g24_bind_dvc2_step_success:
+0066 7045d801 jam 1 ,mem_24g_device2_bind_disable 
+0067 20204a0c branch g24_bind_dvc2_step_success 
+
+p_le_enable_phy_by_pdata:
+0068 18427e00 copy temp ,pdata 
+0069 c280806b bbit1 bit_le_2m_phy ,p_le_enable_2m 
+006a 20203d19 branch le_enable_phy_by_pdata + 3 
+
+p_le_enable_2m:
+006b 708a6d89 jam 0x89 ,core_rx_bq_cfg0 
+006c 20203d1f branch le_enable_2m 
+
+p_le_receive_rxon:
+006d 20403d3c call le_prep 
+006e c5978073 bmark0 mark_ble_lr ,p_le_receive_nolr 
+006f 783cfc00 pulse dewhiten_code_calc 
+0070 2000001e nop 30 
+0071 20403d3c call le_prep 
+0072 19699600 lshift3 timeup ,timeup 
+
+p_le_receive_nolr:
+0073 7856fc00 disable match 
+0074 7826fc00 enable decode_fec0 
+0075 7830fc00 enable is_rx 
+0076 78507c00 disable is_tx 
+0077 19623600 copy timeup ,stop_watch 
+0078 37c18400 correlate null ,timeout 
+0079 2037007c branch p_le_receive_on_attempt ,attempt 
+007a 1b420400 copy clke ,temp 
+007b 604b000f storet 6 ,mem_sync_clke 
+
+p_le_receive_on_attempt:
+007c 242c3e75 nbranch le_unsync_end ,sync 
+007d 78287c00 enable swfine 
+007e db604eab arg param_t_ifs_150us + param_20ms_init + param_sync_time_difference ,stop_watch 
+007f 6fe0c11d fetch 1 ,mem_system_clk 
+0080 9b6f8400 imul32 stop_watch ,temp 
+0081 9840b600 iadd temp ,stop_watch 
+0082 20203de9 branch le_receive_on_attempt + 6 
+
+p_connection_nosniff:
+0083 70000600 jam 0 ,mem_current_context 
+0084 20203822 branch connection_nosniff 
+
+p_connection_incontext:
+0085 20403863 call context_search_insniff 
+0086 24228083 nbranch p_connection_nosniff ,zero 
+0087 2020381d branch connection_incontext + 3 
+
+p_le_crc_fail_tx:
+0088 20406f09 call ccm_ctrl_clr 
+0089 6fe08198 fetch 1 ,mem_le_rx_phy 
+008a 7d3e7e07 nsetflag ble_coded_info ,bit_le_coded_phy_s8 ,pdata 
+008b 67e08198 store 1 ,mem_le_rx_phy 
+008c 7846fc00 disable decode_fec0 
+008d 20403925 call set_sync_on 
+008e 708a3d12 jam 0x12 ,core_syn_top_ctrl 
+008f 68488008 fetcht 1 ,mem_last_freq 
+0090 1840a202 add temp ,2 ,rega 
+0091 2020398e branch rf_tx_write_freq 
+
+p_le_transmit:
+0092 20403d3c call le_prep 
+0093 20403d4b call le_tx_setfreq 
+0094 20406451 call rf_debug_tx_on_line 
+0095 79202a00 set1 txgfsk ,radio_ctrl 
+0096 782efc00 enable encode_fec0 
+0097 78307c00 enable is_tx 
+0098 7850fc00 disable is_rx 
+0099 20403dc2 call le_wait_tx 
+009a 785d7c00 disable lr_s2en 
+009b c517beff bmark1 mark_ble_lr ,le_transmit_lr 
+009c c516809e bmark1 mark_ble_2m ,p_le_transmit_2m 
+009d 20203ec8 branch le_transmit + 12 
+
+p_le_transmit_2m:
+009e 6f20c11d fetchr loopcnt ,1 ,mem_system_clk 
+
+p_le_transmit_2m_dealy:
+009f 20000001 nop 1 
+00a0 c200009f loop p_le_transmit_2m_dealy 
+00a1 20203f15 branch le_transmit_2m_dealy + 2 
+
+p_enable_adc:
+00a2 6a508a12 fetchr regb ,1 ,core_rf_ldo_cfg6 
+00a3 708a123d jam 0x3d ,core_rf_ldo_cfg6 
+00a4 708a11aa jam 0xaa ,core_rf_ldo_cfg5 
+00a5 708a0a0c jam 0x0c ,core_rf_ldo_en0 
+00a6 6ff08a09 fetch 1 ,core_clkpll_cfg6 
+00a7 79207e07 set1 7 ,pdata 
+00a8 67f08a09 store 1 ,core_clkpll_cfg6 
+00a9 708a0b04 jam 0x04 ,core_rf_ldo_en1 
+00aa 2000003c nop 60 
+00ab 708a1600 jam 0 ,core_syn_en 
+00ac 708a1706 jam 6 ,core_rx_en0 
+00ad 20406cb4 call read_adc_mode 
+00ae 67f08a97 store 1 ,core_gpadc_ctrl 
+00af 20206ca7 branch enable_adc + 15 
+              org 0x3800
+
+start:
+3800 20403af8 call lpmstate 
+
+soft_reset:
+3801 44804000 bpatch patch00_0 ,mem_patch00 
+3802 20800000 clear_stack 
+3803 20404da6 call app_param_init 
+3804 20403a0e call initialize_radio 
+3805 20406a00 call iic_init_360khz 
+3806 20403ac3 call init_param 
+3807 20406635 call l2cap_init 
+3808 4480c000 bpatch patch00_1 ,mem_patch00 
+3809 20406fdb call ui_init 
+380a 20403ae9 call ldo_abb_en_init 
+380b 20404d9b call app_init 
+380c 2055bb9a call lpm_recover_clk ,wake 
+
+main_loop:
+380d 44814000 bpatch patch00_2 ,mem_patch00 
+380e 2040421c call le_advertising_dispatch 
+380f 20403826 call idle_dispatch 
+3810 20404dae call app_process_idle 
+3811 20403815 call connection_dispatch 
+3812 204047c4 call g24_dispatch 
+3813 20403bc2 call lpm_dispatch 
+3814 2020380d branch main_loop 
+
+connection_dispatch:
+3815 2040381a call connection_incontext 
+3816 c6848000 rtnmark0 mark_context 
+3817 793f8009 set0 mark_context ,mark 
+3818 2040383d call context_save 
+3819 20203d36 branch le_disable 
+
+connection_incontext:
+381a 4481c000 bpatch patch00_3 ,mem_patch00 
+381b 20403863 call context_search_insniff 
+381c 2422b822 nbranch connection_nosniff ,zero 
+381d 20403832 call context_load 
+381e 1a208c01 add rega ,coffset_mode ,contr 
+381f efe08006 ifetch 1 ,contr 
+3820 c2803cac bbit1 mode_le ,le_conn_dispatch 
+3821 20600000 rtn 
+
+connection_nosniff:
+3822 20403843 call context_get_next 
+3823 1f227c00 copy loopcnt ,null 
+3824 20628000 rtn zero 
+3825 20203aba branch assert 
+
+idle_dispatch:
+3826 6fe0c10d fetch 1 ,mem_hci_cmd 
+3827 207a0000 rtn blank 
+3828 c00db82f beq hci_cmd_le_create_conn ,idle_le_create_conn 
+3829 2040385c call context_search_conn_handle 
+382a 20628000 rtn zero 
+382b 2040385f call context_search_plap 
+382c 20628000 rtn zero 
+
+idle_exit:
+382d 70410d00 jam 0 ,mem_hci_cmd 
+382e 20600000 rtn 
+
+idle_le_create_conn:
+382f 7001b71b jam hci_cmd_le_create_conn ,mem_cmd_le_create_conn 
+3830 70410d00 jam 0 ,mem_hci_cmd 
+3831 20600000 rtn 
+
+context_load:
+3832 44824000 bpatch patch00_4 ,mem_patch00 
+3833 79200009 set1 mark_context ,mark 
+3834 1a227e00 deposit rega 
+3835 67e1000a store 2 ,mem_context_ptr 
+3836 18007253 force context_size ,loopcnt 
+3837 d8a00163 arg mem_le_state ,contw 
+3838 1a208c01 add rega ,coffset_mode ,contr 
+3839 efe08006 ifetch 1 ,contr 
+383a 1a220c00 copy rega ,contr 
+383b c2807548 bbit1 mode_le ,memcpy 
+383c 20600000 rtn 
+
+context_save:
+383d 4482c000 bpatch patch00_5 ,mem_patch00 
+383e 6fe1000a fetch 2 ,mem_context_ptr 
+383f 98000a00 iforce contw 
+3840 18007253 force context_size ,loopcnt 
+3841 d8c00163 arg mem_le_state ,contr 
+3842 20207548 branch memcpy 
+
+context_get_next:
+3843 df200001 arg context_num ,loopcnt 
+3844 68488006 fetcht 1 ,mem_current_context 
+
+context_get_next_loop:
+3845 18408401 increase 1 ,temp 
+3846 2841fe01 compare context_num ,temp ,0xff 
+3847 2420b849 nbranch context_get_next_cont ,true 
+3848 d8400000 arg 0 ,temp 
+
+context_get_next_cont:
+3849 60488006 storet 1 ,mem_current_context 
+384a 184ffe53 mul32 temp ,context_size ,pdata 
+384b da204040 arg mem_context ,rega 
+384c 9a20a200 iadd rega ,rega 
+384d efe08011 ifetch 1 ,rega 
+384e c280b850 bbit1 state_insniff ,context_get_next_sniff 
+384f c3800000 rtnbit1 state_inconn 
+
+context_get_next_sniff:
+3850 c2003845 loop context_get_next_loop 
+3851 20600000 rtn 
+
+context_new:
+3852 44834000 bpatch patch00_6 ,mem_patch00 
+3853 da603870 arg context_search_empty ,regc 
+3854 20403866 call context_search 
+3855 24628000 nrtn zero 
+3856 1a227e00 deposit rega 
+3857 67e1000a store 2 ,mem_context_ptr 
+3858 18007c00 force 0 ,null 
+3859 20600000 rtn 
+
+context_check_idle:
+385a da6038a7 arg context_check_inconn ,regc 
+385b 20203866 branch context_search 
+
+context_search_conn_handle:
+385c 6848c10e fetcht 1 ,mem_hci_conn_handle 
+
+context_search_conn_handle2:
+385d da603879 arg context_search_handle ,regc 
+385e 20203866 branch context_search 
+
+context_search_plap:
+385f 4483c000 bpatch patch00_7 ,mem_patch00 
+3860 684b410f fetcht 6 ,mem_hci_plap 
+
+context_search_plap2:
+3861 da603873 arg context_search_lap ,regc 
+3862 20203866 branch context_search 
+
+context_search_insniff:
+3863 da60387f arg context_search_sniff ,regc 
+3864 20203866 branch context_search 
+
+context_search_sniff_window:
+3865 da6038c2 arg context_search_window ,regc 
+
+context_search:
+3866 44844001 bpatch patch01_0 ,mem_patch01 
+3867 da204040 arg mem_context ,rega 
+3868 df200001 arg context_num ,loopcnt 
+
+context_search_loop:
+3869 efe08011 ifetch 1 ,rega 
+386a 1a627a00 copy regc ,pc 
+
+context_search_next:
+386b 4484c001 bpatch patch01_1 ,mem_patch01 
+386c 1a20a253 increase context_size ,rega 
+386d c2003869 loop context_search_loop 
+386e 18007c01 force 1 ,null 
+386f 20600000 rtn 
+
+context_search_empty:
+3870 c280386b bbit1 state_inconn ,context_search_next 
+3871 18007c00 force 0 ,null 
+3872 20600000 rtn 
+
+context_search_lap:
+3873 c300386b bbit0 state_inconn ,context_search_next 
+
+context_search_lap_cont:
+3874 1a208c10 add rega ,coffset_plap ,contr 
+3875 efe30006 ifetch 6 ,contr 
+3876 98467c00 isub temp ,null 
+3877 20628000 rtn zero 
+3878 2020386b branch context_search_next 
+
+context_search_handle:
+3879 c300386b bbit0 state_inconn ,context_search_next 
+387a 1a208c16 add rega ,coffset_conn_handle ,contr 
+387b efe08006 ifetch 1 ,contr 
+387c 98467c00 isub temp ,null 
+387d 20628000 rtn zero 
+387e 2020386b branch context_search_next 
+
+context_search_sniff:
+387f c300b86b bbit0 state_insniff ,context_search_next 
+
+context_search_sniff_loop:
+3880 204038af call context_get_anchor 
+3881 20403897 call sign_pdata_temp 
+3882 98467e00 isub temp ,pdata 
+3883 1fe0fe01 increase 1 ,pdata 
+3884 20213891 branch context_search_sniff_miss ,positive 
+3885 18c22400 copy contr ,regb 
+3886 67e484cc store 9 ,mem_temp 
+3887 44854001 bpatch patch01_2 ,mem_patch01 
+3888 6fe484cc fetch 9 ,mem_temp 
+3889 1a420c00 copy regb ,contr 
+388a 1fe0fe05 increase 5 ,pdata 
+388b 2020388c branch context_search_meet1 
+
+context_search_meet1:
+388c 2421386b nbranch context_search_next ,positive 
+
+context_search_meet:
+388d 18424200 copy temp ,bt_clk 
+388e 204038bb call context_next_anchor 
+388f 18007c00 force 0 ,null 
+3890 20600000 rtn 
+
+context_search_sniff_miss:
+3891 98002400 iforce regb 
+3892 1a208c02 add rega ,coffset_tsniff ,contr 
+3893 efe10006 ifetch 2 ,contr 
+3894 203a388d branch context_search_meet ,blank 
+3895 204038bb call context_next_anchor 
+3896 20203880 branch context_search_sniff_loop 
+
+sign_pdata_temp:
+3897 1ff11600 rshift16 pdata ,timeup 
+3898 196c9600 rshift8 timeup ,timeup 
+3899 2022b8a1 branch sign_pdata_temp_p0 ,zero 
+389a 29601e0f compare 0xf ,timeup ,0xf 
+389b 24608000 nrtn true 
+389c 18511600 rshift16 temp ,timeup 
+389d 196c9600 rshift8 timeup ,timeup 
+389e 24628000 nrtn zero 
+389f 7920041c set1 28 ,temp 
+38a0 20600000 rtn 
+
+sign_pdata_temp_p0:
+38a1 18511600 rshift16 temp ,timeup 
+38a2 196c9600 rshift8 timeup ,timeup 
+38a3 29601e0f compare 0xf ,timeup ,0xf 
+38a4 24608000 nrtn true 
+38a5 79207e1c set1 28 ,pdata 
+38a6 20600000 rtn 
+
+context_check_inconn:
+38a7 c300386b bbit0 state_inconn ,context_search_next 
+38a8 18007c00 force 0 ,null 
+38a9 20600000 rtn 
+
+context_check_a_wack:
+38aa c300386b bbit0 state_inconn ,context_search_next 
+38ab 1a208c01 add rega ,coffset_mode ,contr 
+38ac efe08006 ifetch 1 ,contr 
+38ad c280386b bbit1 mode_le ,context_search_next 
+38ae 20600000 rtn 
+
+context_get_anchor:
+38af 1a208c01 add rega ,coffset_mode ,contr 
+38b0 e8408006 ifetcht 1 ,contr 
+38b1 1c427e00 deposit clkn_bt 
+38b2 284ffe01 isolate1 mode_master ,temp 
+38b3 1a208c04 add rega ,coffset_sniff_anchor ,contr 
+38b4 e8420006 ifetcht 4 ,contr 
+38b5 20608000 rtn true 
+38b6 1a208c08 add rega ,coffset_clk_offset ,contr 
+38b7 efe30006 ifetch 6 ,contr 
+38b8 20403905 call calc_clke2 
+38b9 1d027e00 deposit clke_bt 
+38ba 20600000 rtn 
+
+context_next_anchor:
+38bb 1a208c02 add rega ,coffset_tsniff ,contr 
+38bc 1a208a04 add rega ,coffset_sniff_anchor ,contw 
+38bd efe10006 ifetch 2 ,contr 
+38be 98409600 iadd temp ,timeup 
+38bf 19627e00 deposit timeup 
+38c0 e7e20005 istore 4 ,contw 
+38c1 20203d83 branch le_context_nextevent 
+
+context_search_window:
+38c2 c300b86b bbit0 state_insniff ,context_search_next 
+38c3 204038af call context_get_anchor 
+38c4 9b60fe00 iadd stop_watch ,pdata 
+38c5 9b60fe00 iadd stop_watch ,pdata 
+38c6 98e0fe00 iadd queue ,pdata 
+38c7 98467c00 isub temp ,null 
+38c8 2421386b nbranch context_search_next ,positive 
+38c9 18007c00 force 0 ,null 
+38ca 20600000 rtn 
+
+end_of_packet:
+38cb 4485c001 bpatch patch01_3 ,mem_patch01 
+38cc 784efc00 disable encode_fec0 
+38cd 784e7c00 disable encode_fec2 
+38ce 7846fc00 disable decode_fec0 
+38cf 78467c00 disable decode_fec2 
+38d0 7844fc00 disable enable_crc 
+38d1 78477c00 disable encrypt 
+38d2 7843fc00 disable enable_white 
+38d3 2030b913 branch shutdown_radio ,is_rx 
+38d4 37d38200 until null ,tx_clear 
+38d5 20000064 nop 100 
+38d6 20203913 branch shutdown_radio 
+
+sniff_check_window:
+38d7 44864001 bpatch patch01_4 ,mem_patch01 
+38d8 78487c00 disable swfine 
+38d9 18423600 copy temp ,stop_watch 
+38da 20403865 call context_search_sniff_window 
+38db 78547c00 disable user 
+38dc 24628000 nrtn zero 
+38dd 18003600 force 0 ,stop_watch 
+38de 78347c00 enable user 
+38df 20600000 rtn 
+
+calc_slot_offset:
+38e0 4486c001 bpatch patch01_5 ,mem_patch01 
+38e1 37d10200 until null ,halfslot 
+38e2 1b427e00 deposit clke 
+38e3 98000c00 iforce contr 
+38e4 1ff17e00 rshift16 ,pdata ,pdata 
+38e5 9c467200 isub clkn_bt ,loopcnt 
+38e6 1f217203 and_into 3 ,loopcnt 
+38e7 2422b8ea nbranch calc_bt_portion ,zero 
+38e8 18007e00 force 0 ,pdata 
+38e9 202038ee branch calc_skip_bt 
+
+calc_bt_portion:
+38ea 6849003f fetcht 2 ,mem_param_rt_rthalfslot 
+38eb 18007e00 force 0 ,pdata 
+
+calc_slot_offset_loop:
+38ec 9840fe00 iadd temp ,pdata 
+38ed c20038ec loop calc_slot_offset_loop 
+
+calc_skip_bt:
+38ee 98c0fe00 iadd contr ,pdata 
+38ef 1fe6fc0c div pdata ,12 
+38f0 204075cd call get_div_result 
+38f1 67e1002a store 2 ,mem_slot_offset 
+38f2 20600000 rtn 
+
+calc_clke_offset:
+38f3 44874001 bpatch patch01_6 ,mem_patch01 
+38f4 1b427e00 deposit clke 
+38f5 1b220400 copy clkn ,temp 
+38f6 98467c00 isub temp ,null 
+38f7 7d217e2c nsetflag positive ,44 ,pdata 
+38f8 98460400 isub temp ,temp 
+38f9 6fe1003f fetch 2 ,mem_param_rt_rthalfslot 
+38fa 284c000f isolate0 15 ,temp 
+38fb 2020b901 branch calc_clke_pos ,true 
+38fc 18426000 copy temp ,alarm 
+38fd d8410000 arg 0x10000 ,temp 
+38fe 6fe1003f fetch 2 ,mem_param_rt_rthalfslot 
+38ff 98467e00 isub temp ,pdata 
+3900 9e008400 iadd alarm ,temp 
+
+calc_clke_pos:
+3901 604b016b storet 6 ,mem_le_clk_offset 
+3902 20600000 rtn 
+
+calc_clke:
+3903 78587c00 disable clknt 
+3904 6fe3016b fetch 6 ,mem_le_clk_offset 
+
+calc_clke2:
+3905 9b20e000 iadd clkn ,alarm 
+3906 1e00e00a increase 10 ,alarm 
+3907 6fe1003f fetch 2 ,mem_param_rt_rthalfslot 
+3908 9e067e00 isub alarm ,pdata 
+3909 2fec000f isolate0 15 ,pdata 
+390a 2020b911 branch calc_clke_pos_adj ,true 
+390b 58010000 setarg 0x10000 
+390c 6b01003f fetchr regd ,2 ,mem_param_rt_rthalfslot 
+390d 9b067e00 isub regd ,pdata 
+390e 9e00e000 iadd alarm ,alarm 
+
+calc_clke_pos2:
+390f 1e023400 copy alarm ,clke 
+3910 20600000 rtn 
+
+calc_clke_pos_adj:
+3911 18007c00 force 0 ,null 
+3912 2020390f branch calc_clke_pos2 
+
+shutdown_radio:
+3913 4487c001 bpatch patch01_7 ,mem_patch01 
+3914 20406449 call rf_debug_shutdown_radio_line 
+3915 18002a08 force 0x08 ,radio_ctrl 
+3916 18002a00 force 0 ,radio_ctrl 
+3917 7850fc00 disable is_rx 
+3918 78507c00 disable is_tx 
+3919 782f7c00 pulse packet_end 
+391a 70890005 jam 0x5 ,modem_en 
+391b 20000002 nop 2 
+391c 70890000 jam 0x0 ,modem_en 
+391d 20403925 call set_sync_on 
+391e 708a1600 jam 0 ,core_syn_en 
+391f 708a0a80 jam 0x80 ,core_rf_ldo_en0 
+3920 6ff08a09 fetch 1 ,core_clkpll_cfg6 
+3921 793ffe07 set0 7 ,pdata 
+3922 67f08a09 store 1 ,core_clkpll_cfg6 
+3923 708a0b00 jam 0 ,core_rf_ldo_en1 
+3924 20203a6b branch gain_control 
+
+set_sync_on:
+3925 44884002 bpatch patch02_0 ,mem_patch02 
+3926 70890005 jam 0x5 ,modem_en 
+3927 20000002 nop 2 
+3928 70890000 jam 0x0 ,modem_en 
+3929 6fe0c09a fetch 1 ,mem_fcomp_div 
+392a c00c392c beq xtal_24m ,set_sync_on_24m 
+392b c0043941 beq xtal_16m ,set_sync_on_16m 
+
+set_sync_on_24m:
+392c 708a10aa jam 0xaa ,core_rf_ldo_cfg4 
+392d 708a11aa jam 0xaa ,core_rf_ldo_cfg5 
+392e 708a1215 jam 0x15 ,core_rf_ldo_cfg6 
+392f 708a0a78 jam 0x78 ,core_rf_ldo_en0 
+3930 6ff08a09 fetch 1 ,core_clkpll_cfg6 
+3931 79207e07 set1 7 ,pdata 
+3932 67f08a09 store 1 ,core_clkpll_cfg6 
+3933 708a0b04 jam 0x04 ,core_rf_ldo_en1 
+3934 2000003c nop 60 
+3935 708a167a jam 0x7a ,core_syn_en 
+3936 708a1700 jam 0 ,core_rx_en0 
+3937 708a1800 jam 0 ,core_rx_en1 
+3938 708a1900 jam 0 ,core_tx_en0 
+3939 708a1a00 jam 0 ,core_tx_en1 
+393a 708a112a jam 0x2a ,core_rf_ldo_cfg5 
+393b 708a0a78 jam 0x78 ,core_rf_ldo_en0 
+
+set_sync_on_next:
+393c 6ff08a09 fetch 1 ,core_clkpll_cfg6 
+393d 793ffe07 set0 7 ,pdata 
+393e 67f08a09 store 1 ,core_clkpll_cfg6 
+393f 708a4300 jam 0 ,core_syn_cal_ctrl 
+3940 20600000 rtn 
+
+set_sync_on_16m:
+3941 708a8729 jam 0x29 ,core_syn_afc_cfg1 
+3942 708a8be6 jam 0xe6 ,core_syn_aac_cfg1 
+3943 708a10aa jam 0xaa ,core_rf_ldo_cfg4 
+3944 708a11aa jam 0xaa ,core_rf_ldo_cfg5 
+3945 708a1215 jam 0x15 ,core_rf_ldo_cfg6 
+3946 708a0a78 jam 0x78 ,core_rf_ldo_en0 
+3947 6ff08a09 fetch 1 ,core_clkpll_cfg6 
+3948 79207e07 set1 7 ,pdata 
+3949 67f08a09 store 1 ,core_clkpll_cfg6 
+394a 708a0b04 jam 0x04 ,core_rf_ldo_en1 
+394b 2000003c nop 60 
+394c 708a163a jam 0x3a ,core_syn_en 
+394d 708a1700 jam 0 ,core_rx_en0 
+394e 708a1800 jam 0 ,core_rx_en1 
+394f 708a1900 jam 0 ,core_tx_en0 
+3950 708a1a00 jam 0 ,core_tx_en1 
+3951 708a112a jam 0x2a ,core_rf_ldo_cfg5 
+3952 708a0a38 jam 0x38 ,core_rf_ldo_en0 
+3953 2020393c branch set_sync_on_next 
+
+set_freq_rx:
+3954 4488c002 bpatch patch02_1 ,mem_patch02 
+3955 6fe0c09a fetch 1 ,mem_fcomp_div 
+3956 1fe67c18 sub pdata ,xtal_24m ,null 
+3957 2042b95e call rf_rx_write_freq_24m ,zero 
+3958 2442b964 ncall rf_rx_write_freq_16m ,zero 
+3959 60488008 storet 1 ,mem_last_freq 
+395a 1840fe00 add temp ,0 ,pdata 
+395b c516b95d bmark1 mark_ble_2m ,set_rxfreq_2m_offset 
+395c 1840fe01 add temp ,1 ,pdata 
+
+set_rxfreq_2m_offset:
+395d 20203989 branch rf_rx_write_freq 
+
+rf_rx_write_freq_24m:
+395e 708a4300 jam 0 ,core_syn_cal_ctrl 
+395f 708a3d04 jam 0x04 ,core_syn_top_ctrl 
+3960 708a3e00 jam 0 ,core_syn_mmd_cp_ctrl 
+3961 708a8403 jam 0x03 ,core_syn_cp_lpf_cfg 
+3962 708a8940 jam 0x40 ,core_syn_afc_cfg3 
+3963 20600000 rtn 
+
+rf_rx_write_freq_16m:
+3964 708a4330 jam 0x30 ,core_syn_cal_ctrl 
+3965 708a3d06 jam 0x06 ,core_syn_top_ctrl 
+3966 708a3e00 jam 0 ,core_syn_mmd_cp_ctrl 
+3967 708a8420 jam 0x20 ,core_syn_cp_lpf_cfg 
+3968 708a8915 jam 0x15 ,core_syn_afc_cfg3 
+3969 20600000 rtn 
+
+rf_rx_enable:
+396a 44894002 bpatch patch02_2 ,mem_patch02 
+396b 20406443 call rf_debug_rx_gpio_high 
+396c 6fe0c118 fetch 1 ,mem_gain_fix 
+396d c07fb973 beq 0xff ,rf_rx_enable_no_soft_agc 
+396e d8c04119 arg mem_gain_table ,contr 
+396f 98c08c00 iadd contr ,contr 
+3970 efe08006 ifetch 1 ,contr 
+3971 67f08961 store 1 ,core_rf_rx_gain_fix 
+3972 70896027 jam 0x27 ,core_rf_rx_agc_ctrl 
+
+rf_rx_enable_no_soft_agc:
+3973 6848c11c fetcht 1 ,mem_gain_second_agc_en 
+3974 6ff08960 fetch 1 ,core_rf_rx_agc_ctrl 
+3975 9841fe00 ior temp ,pdata 
+3976 67f08960 store 1 ,core_rf_rx_agc_ctrl 
+3977 708a10aa jam 0xaa ,core_rf_ldo_cfg4 
+3978 708a112a jam 0x2a ,core_rf_ldo_cfg5 
+3979 708a1213 jam 0x13 ,core_rf_ldo_cfg6 
+397a 708a0a7f jam 0x7f ,core_rf_ldo_en0 
+397b 6ff08a09 fetch 1 ,core_clkpll_cfg6 
+397c 793ffe07 set0 7 ,pdata 
+397d 67f08a09 store 1 ,core_clkpll_cfg6 
+397e 2000003c nop 60 
+397f 708a171f jam 0x1f ,core_rx_en0 
+3980 708a18f8 jam 0xf8 ,core_rx_en1 
+3981 708a1918 jam 0x18 ,core_tx_en0 
+3982 708a1000 jam 0x00 ,core_rf_ldo_cfg4 
+3983 708a1120 jam 0x20 ,core_rf_ldo_cfg5 
+3984 2000000a nop 10 
+3985 70890004 jam 0x04 ,modem_en 
+3986 20000002 nop 2 
+3987 7089000c jam 0x0c ,modem_en 
+3988 20600000 rtn 
+
+rf_rx_write_freq:
+3989 4489c002 bpatch patch02_3 ,mem_patch02 
+398a d8c00960 arg 2400 ,contr 
+398b 98c0fe00 iadd contr ,pdata 
+398c 6848c09a fetcht 1 ,mem_fcomp_div 
+398d 20203998 branch rf_write_freq_calc 
+
+rf_tx_write_freq:
+398e 448a4002 bpatch patch02_4 ,mem_patch02 
+398f 6fe0c09a fetch 1 ,mem_fcomp_div 
+3990 1fe67c18 sub pdata ,xtal_24m ,null 
+3991 2042b9bb call rf_tx_write_freq_24m ,zero 
+3992 2442b9c2 ncall rf_tx_write_freq_16m ,zero 
+3993 58000960 setarg 2400 
+3994 9a20fe00 iadd rega ,pdata 
+3995 1fe3fe00 lshift pdata ,pdata 
+3996 6848c09a fetcht 1 ,mem_fcomp_div 
+3997 184f8403 mul32 temp ,0x03 ,temp 
+
+rf_write_freq_calc:
+3998 18438400 lshift temp ,temp 
+3999 9846fc00 idiv temp 
+399a 204075d0 call wait_div_end 
+399b 1807fe00 quotient pdata 
+399c 67f08a3f store 1 ,core_syn_divr_int 
+399d 18077e00 remainder pdata 
+399e 1ff07e00 lshift16 pdata ,pdata 
+399f 1fed7e00 lshift8 pdata ,pdata 
+39a0 9846fc00 idiv temp 
+39a1 204075d0 call wait_div_end 
+39a2 1807fe00 quotient pdata 
+39a3 67f08a42 store 1 ,core_syn_divr_int + 3 
+39a4 1fecfe00 rshift8 pdata ,pdata 
+39a5 67f08a41 store 1 ,core_syn_divr_int + 2 
+39a6 1fecfe00 rshift8 pdata ,pdata 
+39a7 67f08a40 store 1 ,core_syn_divr_int + 1 
+39a8 68588a43 fetcht 1 ,core_syn_cal_ctrl 
+39a9 184104f0 and_into 0xf0 ,temp 
+39aa 60588a43 storet 1 ,core_syn_cal_ctrl 
+39ab 2000000c nop 12 
+39ac 6fe0c09a fetch 1 ,mem_fcomp_div 
+39ad c00c39af beq xtal_24m ,rf_write_freq_calc_24m 
+39ae c00439b5 beq xtal_16m ,rf_write_freq_calc_16m 
+
+rf_write_freq_calc_24m:
+39af 1841840c or_into 0x0c ,temp 
+39b0 60588a43 storet 1 ,core_syn_cal_ctrl 
+39b1 2000000c nop 12 
+39b2 18418403 or_into 0x03 ,temp 
+39b3 60588a43 storet 1 ,core_syn_cal_ctrl 
+39b4 20600000 rtn 
+
+rf_write_freq_calc_16m:
+39b5 1841843c or_into 0x3c ,temp 
+39b6 60588a43 storet 1 ,core_syn_cal_ctrl 
+39b7 2000000c nop 12 
+39b8 18418433 or_into 0x33 ,temp 
+39b9 60588a43 storet 1 ,core_syn_cal_ctrl 
+39ba 20600000 rtn 
+
+rf_tx_write_freq_24m:
+39bb 708a4300 jam 0 ,core_syn_cal_ctrl 
+39bc 708a3d12 jam 0x12 ,core_syn_top_ctrl 
+39bd 708a3e00 jam 0 ,core_syn_mmd_cp_ctrl 
+39be 708a8403 jam 0x03 ,core_syn_cp_lpf_cfg 
+39bf 708a8ba6 jam 0xa6 ,core_syn_aac_cfg1 
+39c0 708a8940 jam 0x40 ,core_syn_afc_cfg3 
+39c1 20600000 rtn 
+
+rf_tx_write_freq_16m:
+39c2 708a4330 jam 0x30 ,core_syn_cal_ctrl 
+39c3 708a3d15 jam 0x15 ,core_syn_top_ctrl 
+39c4 708a3e00 jam 0 ,core_syn_mmd_cp_ctrl 
+39c5 708a8420 jam 0x20 ,core_syn_cp_lpf_cfg 
+39c6 708a8ba6 jam 0xa6 ,core_syn_aac_cfg1 
+39c7 708a8915 jam 0x15 ,core_syn_afc_cfg3 
+39c8 20600000 rtn 
+
+set_freq_tx:
+39c9 448ac002 bpatch patch02_5 ,mem_patch02 
+39ca 708a3d12 jam 0x12 ,core_syn_top_ctrl 
+39cb 60488008 storet 1 ,mem_last_freq 
+39cc 1840a202 add temp ,2 ,rega 
+39cd 2040398e call rf_tx_write_freq 
+39ce 200003c0 nop 0x3c0 
+
+txon:
+39cf 448b4002 bpatch patch02_6 ,mem_patch02 
+39d0 708a10aa jam 0xaa ,core_rf_ldo_cfg4 
+39d1 708a112a jam 0x2a ,core_rf_ldo_cfg5 
+39d2 708a1210 jam 0x10 ,core_rf_ldo_cfg6 
+39d3 708a0a7f jam 0x7f ,core_rf_ldo_en0 
+39d4 6ff08a09 fetch 1 ,core_clkpll_cfg6 
+39d5 793ffe07 set0 7 ,pdata 
+39d6 67f08a09 store 1 ,core_clkpll_cfg6 
+39d7 708a0b07 jam 0x07 ,core_rf_ldo_en1 
+39d8 2000003c nop 60 
+39d9 708a190d jam 0x0d ,core_tx_en0 
+39da 708a1af9 jam 0xf9 ,core_tx_en1 
+39db 708a1000 jam 0x00 ,core_rf_ldo_cfg4 
+39dc 708a1120 jam 0x20 ,core_rf_ldo_cfg5 
+39dd 2000000a nop 10 
+39de 70890001 jam 0x01 ,modem_en 
+39df 20000002 nop 2 
+39e0 70890003 jam 0x03 ,modem_en 
+39e1 448bc002 bpatch patch02_7 ,mem_patch02 
+39e2 6fe0c116 fetch 1 ,mem_tx_power 
+39e3 c001b9f1 beq tx_power_3db ,set_tx_power_3db 
+39e4 c002b9f6 beq tx_power_5db ,set_tx_power_5db 
+39e5 c00339f9 beq tx_power_6db ,set_tx_power_6db 
+39e6 c003b9fc beq tx_power_7db ,set_tx_power_7db 
+39e7 c00539ff beq tx_power_10db ,set_tx_power_10db 
+39e8 c041ba02 beq tx_power_f3db ,set_tx_power_f3db 
+39e9 c042ba05 beq tx_power_f5db ,set_tx_power_f5db 
+39ea c04a3a08 beq tx_power_f20db ,set_tx_power_f20db 
+39eb c04f3a0b beq tx_power_f30db ,set_tx_power_f30db 
+
+set_tx_power_0db:
+39ec 708a396a jam 0x6a ,core_tx_pwr_ctrl0 
+39ed 708a3a07 jam 0x07 ,core_tx_pwr_ctrl1 
+
+set_rf_ldo_cfg89:
+39ee 708a14a3 jam 0xa3 ,core_rf_ldo_cfg8 
+39ef 708a1507 jam 0x07 ,core_rf_ldo_cfg9 
+39f0 20600000 rtn 
+
+set_tx_power_3db:
+39f1 708a3966 jam 0x66 ,core_tx_pwr_ctrl0 
+39f2 708a3a0b jam 0x0b ,core_tx_pwr_ctrl1 
+
+set_rf_ldo_cfg89_2:
+39f3 708a14aa jam 0xaa ,core_rf_ldo_cfg8 
+39f4 708a150a jam 0x0a ,core_rf_ldo_cfg9 
+39f5 20600000 rtn 
+
+set_tx_power_5db:
+39f6 708a396c jam 0x6c ,core_tx_pwr_ctrl0 
+39f7 708a3a0d jam 0x0d ,core_tx_pwr_ctrl1 
+39f8 202039f3 branch set_rf_ldo_cfg89_2 
+
+set_tx_power_6db:
+39f9 708a396b jam 0x6b ,core_tx_pwr_ctrl0 
+39fa 708a3a0f jam 0x0f ,core_tx_pwr_ctrl1 
+39fb 202039f3 branch set_rf_ldo_cfg89_2 
+
+set_tx_power_7db:
+39fc 708a39a7 jam 0xa7 ,core_tx_pwr_ctrl0 
+39fd 708a3a0f jam 0x0f ,core_tx_pwr_ctrl1 
+39fe 202039f3 branch set_rf_ldo_cfg89_2 
+
+set_tx_power_10db:
+39ff 708a39b6 jam 0xb6 ,core_tx_pwr_ctrl0 
+3a00 708a3a0f jam 0x0f ,core_tx_pwr_ctrl1 
+3a01 202039f3 branch set_rf_ldo_cfg89_2 
+
+set_tx_power_f3db:
+3a02 708a3968 jam 0x68 ,core_tx_pwr_ctrl0 
+3a03 708a3a05 jam 0x05 ,core_tx_pwr_ctrl1 
+3a04 202039ee branch set_rf_ldo_cfg89 
+
+set_tx_power_f5db:
+3a05 708a3960 jam 0x60 ,core_tx_pwr_ctrl0 
+3a06 708a3a05 jam 0x05 ,core_tx_pwr_ctrl1 
+3a07 202039ee branch set_rf_ldo_cfg89 
+
+set_tx_power_f20db:
+3a08 708a3953 jam 0x53 ,core_tx_pwr_ctrl0 
+3a09 708a3a01 jam 0x01 ,core_tx_pwr_ctrl1 
+3a0a 202039ee branch set_rf_ldo_cfg89 
+
+set_tx_power_f30db:
+3a0b 708a394c jam 0x4c ,core_tx_pwr_ctrl0 
+3a0c 708a3a00 jam 0x00 ,core_tx_pwr_ctrl1 
+3a0d 202039ee branch set_rf_ldo_cfg89 
+
+initialize_radio:
+3a0e 70804206 jam clksel_rc ,core_clksel 
+
+initialize_radio_wait:
+3a0f 6fe1409d fetch 2 ,mem_rf_init_ptr 
+3a10 c3073a0f bbit0 14 ,initialize_radio_wait 
+3a11 98000c00 iforce contr 
+3a12 d8408a00 arg 0x8a00 ,temp 
+
+initialize_radio_loop:
+3a13 efe08006 ifetch 1 ,contr 
+3a14 c07fba19 beq 0xff ,initialize_radio_cont 
+3a15 98418a00 ior temp ,contw 
+3a16 efe08006 ifetch 1 ,contr 
+3a17 e7e08005 istore 1 ,contw 
+3a18 20203a13 branch initialize_radio_loop 
+
+initialize_radio_cont:
+3a19 448c4003 bpatch patch03_0 ,mem_patch03 
+3a1a 6fe0c3eb fetch 1 ,mem_wdt_always_work 
+3a1b 205a6df0 call wdt_set_disable ,blank 
+3a1c 708a0305 jam 0x05 ,core_clkpll_cfg0 
+3a1d 708a7a94 jam 0x94 ,core_rx_iqadc_cfg 
+3a1e 20403a40 call initialize_rc_cal 
+3a1f 20403a3b call initialize_rf_ldo_cfg1 
+3a20 20403a36 call initialize_syn_afc_cfg1 
+3a21 708a8be6 jam 0xe6 ,core_syn_aac_cfg1 
+3a22 708a8390 jam 0x90 ,core_syn_pfd_lkd_cfg 
+3a23 708a0e0b jam 0x0b ,core_rf_ldo_cfg2 
+3a24 708a0f05 jam 0x05 ,core_rf_ldo_cfg3 
+3a25 70896876 jam 0x76 ,core_agc_wb_sat_th 
+3a26 70896976 jam 0x76 ,core_agc_nb_sat_th 
+3a27 6fe0c09a fetch 1 ,mem_fcomp_div 
+3a28 c0843a2a bne xtal_16m ,initialize_radio_cont_next 
+3a29 708a0834 jam 0x34 ,core_clkpll_cfg5 
+
+initialize_radio_cont_next:
+3a2a 708a01ff jam 0xff ,core_clkpll_ctrl1 
+3a2b 20000064 nop 100 
+3a2c 708a020e jam 0x0e ,core_clkpll_ctrl2 
+3a2d 708a0003 jam 0x03 ,core_clkpll_ctrl0 
+3a2e 204039ec call set_tx_power_0db 
+3a2f 708a9a2b jam 0x2b ,core_tx_mixer_cfg1 
+3a30 708a9b13 jam 0x13 ,core_tx_mixer_cfg2 
+3a31 20403aa1 call init_lpm_ctrl 
+3a32 20000064 nop 100 
+3a33 70804205 jam clksel_dpll ,core_clksel 
+3a34 70411d0c jam system_clk_12m ,mem_system_clk 
+3a35 20203d36 branch le_disable 
+
+initialize_syn_afc_cfg1:
+3a36 6fe0c3e7 fetch 1 ,mem_syn_afc_cfg1 
+3a37 243a3a39 nbranch initialize_syn_afc_cfg1_set ,blank 
+3a38 58000029 setarg 0x29 
+
+initialize_syn_afc_cfg1_set:
+3a39 67f08a87 store 1 ,core_syn_afc_cfg1 
+3a3a 20600000 rtn 
+
+initialize_rf_ldo_cfg1:
+3a3b 6fe0c3e8 fetch 1 ,mem_rf_ldo_cfg1 
+3a3c 243a3a3e nbranch initialize_rf_ldo_cfg1_set ,blank 
+3a3d 58000000 setarg 0x00 
+
+initialize_rf_ldo_cfg1_set:
+3a3e 67f08a0d store 1 ,core_rf_ldo_cfg1 
+3a3f 20600000 rtn 
+
+initialize_rc_cal:
+3a40 6fe0c3e9 fetch 1 ,mem_rc_cal 
+3a41 203a3a43 branch initialize_rc_cal_set ,blank 
+3a42 580000d3 setarg 0xd3 
+
+initialize_rc_cal_set:
+3a43 67f08a6c store 1 ,core_rx_bq_bw_cal 
+3a44 20600000 rtn 
+
+save_rssi:
+3a45 448cc003 bpatch patch03_1 ,mem_patch03 
+3a46 6ff089a2 fetch 1 ,modem_nb_pow 
+3a47 2feffe06 isolate1 6 ,pdata 
+3a48 7920fe07 setflag true ,7 ,pdata 
+3a49 67e0c117 store 1 ,mem_modem_rssi 
+3a4a 6ff089a3 fetch 1 ,modem_gain 
+3a4b 1fe1040f and pdata ,0x0f ,temp 
+3a4c 18438400 lshift temp ,temp 
+3a4d 1ff1fe00 rshift4 pdata ,pdata 
+3a4e 98408400 iadd temp ,temp 
+3a4f 184fa203 mul32 temp ,3 ,rega 
+3a50 6fe0c117 fetch 1 ,mem_modem_rssi 
+3a51 20403a5b call byte_sign_extern 
+3a52 1fe67e00 sub pdata ,0 ,pdata 
+3a53 9a20fe00 iadd rega ,pdata 
+3a54 1fe0fff7 increase -9 ,pdata 
+3a55 1fe17fff and pdata ,0x1ff ,pdata 
+3a56 2feffe08 isolate1 8 ,pdata 
+3a57 2420ba59 nbranch save_rssi_store ,true 
+3a58 58000000 setarg 0 
+
+save_rssi_store:
+3a59 67e08030 store 1 ,mem_rssi_hex 
+3a5a 20203a60 branch rssi_hex2dec 
+
+byte_sign_extern:
+3a5b 2feffe07 isolate1 7 ,pdata 
+3a5c 24608000 nrtn true 
+3a5d d840ff00 arg 0xff00 ,temp 
+3a5e 9841fe00 ior temp ,pdata 
+3a5f 20600000 rtn 
+
+rssi_hex2dec:
+3a60 6fe08030 fetch 1 ,mem_rssi_hex 
+3a61 20403a64 call bcd 
+3a62 67e08009 store 1 ,mem_rssi 
+3a63 20600000 rtn 
+
+bcd:
+3a64 1fe17eff and_into 0xff ,pdata 
+3a65 1fe6fc0a div pdata ,10 
+3a66 204075cd call get_div_result 
+3a67 1ff27e00 lshift4 pdata ,pdata 
+3a68 18070400 remainder temp 
+3a69 9841fe00 ior temp ,pdata 
+3a6a 20600000 rtn 
+
+gain_control:
+3a6b 448d4003 bpatch patch03_2 ,mem_patch03 
+3a6c 6fe0c118 fetch 1 ,mem_gain_fix 
+3a6d c17f8000 rtneq 0xff 
+3a6e 242c3a92 nbranch gain_increase ,sync 
+3a6f 6fe0c117 fetch 1 ,mem_modem_rssi 
+3a70 1fe67cf0 sub pdata ,0xf0 ,null 
+3a71 24213a96 nbranch gain_descend ,positive 
+3a72 1fe67c7f sub pdata ,0x7f ,null 
+3a73 20213a96 branch gain_descend ,positive 
+3a74 6a308961 fetchr rega ,1 ,core_rf_rx_gain_fix 
+3a75 6fe0c118 fetch 1 ,mem_gain_fix 
+3a76 c1000000 rtneq 0 
+3a77 d8c04119 arg mem_gain_table ,contr 
+3a78 98c08c00 iadd contr ,contr 
+3a79 efe08006 ifetch 1 ,contr 
+3a7a 9a267c00 isub rega ,null 
+3a7b 24628000 nrtn zero 
+3a7c 18c08dfe increase -2 ,contr 
+3a7d e8408006 ifetcht 1 ,contr 
+3a7e 1851fe00 rshift4 temp ,pdata 
+3a7f 1a31a400 rshift4 rega ,regb 
+3a80 9a462400 isub regb ,regb 
+3a81 18417e0f and temp ,0xf ,pdata 
+3a82 1a21220f and rega ,0xf ,rega 
+3a83 9a262200 isub rega ,rega 
+3a84 1a23fe00 lshift rega ,pdata 
+3a85 9a40a400 iadd regb ,regb 
+3a86 1a4fa403 mul32 regb ,3 ,regb 
+3a87 6848c117 fetcht 1 ,mem_modem_rssi 
+3a88 18417e80 and temp ,0x80 ,pdata 
+3a89 207a0000 rtn blank 
+
+add_negative:
+3a8a 58000100 setarg 0x100 
+3a8b 98460400 isub temp ,temp 
+3a8c 1a427e00 copy regb ,pdata 
+3a8d 98467e00 isub temp ,pdata 
+3a8e 20610000 rtn positive 
+3a8f 1fe17eff and pdata ,0xff ,pdata 
+3a90 c17f8000 rtneq 0xff 
+3a91 c17f0000 rtneq 0xfe 
+
+gain_increase:
+3a92 6fe0c118 fetch 1 ,mem_gain_fix 
+3a93 c000ba9b beq 1 ,set_rx_gain0 
+3a94 c0013a9d beq 2 ,set_rx_gain1 
+3a95 20203a9b branch set_rx_gain0 
+
+gain_descend:
+3a96 6fe0c118 fetch 1 ,mem_gain_fix 
+3a97 c0003a9d beq 0 ,set_rx_gain1 
+3a98 c000ba99 beq 1 ,set_rx_gain2 
+
+set_rx_gain2:
+3a99 70411802 jam 2 ,mem_gain_fix 
+3a9a 20600000 rtn 
+
+set_rx_gain0:
+3a9b 70411800 jam 0 ,mem_gain_fix 
+3a9c 20600000 rtn 
+
+set_rx_gain1:
+3a9d 70411801 jam 1 ,mem_gain_fix 
+3a9e 20600000 rtn 
+
+xtal_fast_wake:
+3a9f 58000f0f setarg 0xf0f 
+3aa0 20203c2e branch lpm_write_config 
+
+init_lpm_ctrl:
+3aa1 5800080f setarg 0x80f 
+3aa2 20203c2e branch lpm_write_config 
+
+ahead_window:
+3aa3 1fe20400 copy pdata ,temp 
+3aa4 448dc003 bpatch patch03_3 ,mem_patch03 
+3aa5 18427e00 copy temp ,pdata 
+3aa6 2040759a call clk2bt 
+3aa7 1c307e00 lshift16 bt_clk ,pdata 
+3aa8 79207e2c set1 44 ,pdata 
+3aa9 20407580 call clk_diff 
+3aaa 793ffe2c set0 44 ,pdata 
+3aab 20403ab2 call get_clk 
+3aac 20407580 call clk_diff 
+3aad 20740000 rtn user 
+3aae 2040758d call clk2rt 
+3aaf 98003600 iforce stop_watch 
+3ab0 37c18200 until null ,timeout 
+3ab1 20600000 rtn 
+
+get_clk:
+3ab2 1b220400 copy clkn ,temp 
+3ab3 20748000 rtn master 
+3ab4 1b420400 copy clke ,temp 
+3ab5 20600000 rtn 
+
+get_clkbt:
+3ab6 1c427e00 deposit clkn_bt 
+3ab7 20748000 rtn master 
+3ab8 1d027e00 deposit clke_bt 
+3ab9 20600000 rtn 
+
+assert:
+3aba 448e4003 bpatch patch03_4 ,mem_patch03 
+3abb 20203aba branch assert 
+
+sleep:
+3abc 207a0000 rtn blank 
+3abd 1fe37e00 rshift pdata ,pdata 
+3abe 1fe0fffd increase -3 ,pdata 
+
+sleep_loop:
+3abf 1fe0ffff increase -1 ,pdata 
+3ac0 2422babf nbranch sleep_loop ,zero 
+3ac1 18007e00 force 0 ,pdata 
+3ac2 20600000 rtn 
+
+init_param:
+3ac3 58000000 setarg 0 
+3ac4 67e30000 store 6 ,mem_le_adv_transmit 
+3ac5 d8a00163 arg mem_le_state ,contw 
+3ac6 df20000a arg 10 ,loopcnt 
+3ac7 20407500 call memset0 
+3ac8 7004c300 jam 0 ,mem_fifo_temp 
+3ac9 7001b600 jam 0 ,mem_le_testtype 
+3aca 58000e43 setarg param_tx_setup 
+3acb 67e10031 store 2 ,mem_param_tx_setup 
+3acc 58000600 setarg param_rf_setup 
+3acd 67e10033 store 2 ,mem_param_rf_setup 
+3ace 58000600 setarg param_conn_access 
+3acf 67e10035 store 2 ,mem_param_conn_access 
+3ad0 58000d00 setarg param_rx_setup 
+3ad1 67e1003b store 2 ,mem_param_rx_setup 
+3ad2 580003bb setarg param_clke_cal 
+3ad3 67e10037 store 2 ,mem_param_clke_cal 
+3ad4 58000500 setarg param_pll_setup 
+3ad5 67e10039 store 2 ,mem_param_pll_setup 
+3ad6 580007d0 setarg param_dpll_start_delay 
+3ad7 67e1003d store 2 ,mem_param_dpll_start_delay 
+3ad8 58000ea6 setarg param_rt_rthalfslot 
+3ad9 67e1003f store 2 ,mem_param_rt_rthalfslot 
+3ada 580001e0 setarg param_clke_cal_le_1m 
+3adb 67e10041 store 2 ,mem_param_clke_cal_le_1m 
+3adc 58000120 setarg param_clke_cal_le_2m 
+3add 67e10043 store 2 ,mem_param_clke_cal_le_2m 
+3ade 5800011a setarg param_clke_cal_le_coded 
+3adf 67e10045 store 2 ,mem_param_clke_cal_le_coded 
+3ae0 448ec003 bpatch patch03_5 ,mem_patch03 
+3ae1 20758000 rtn wake 
+3ae2 58000d00 setarg mem_ble_tx_buff0 
+3ae3 67e14312 store 2 ,mem_ble_l2cap_tx_buff0_ptr 
+3ae4 58000060 setarg mem_ble_l2cap_tx_buff_size 
+3ae5 67e14314 store 2 ,mem_ble_l2cap_tx_buff_size_ptr 
+3ae6 1c437e00 rshift clkn_bt ,pdata 
+3ae7 67e24096 store 4 ,mem_last_clkn 
+3ae8 20600000 rtn 
+
+ldo_abb_en_init:
+3ae9 20758000 rtn wake 
+3aea 448f4003 bpatch patch03_6 ,mem_patch03 
+3aeb 6ff08a0a fetch 1 ,core_rf_ldo_en0 
+3aec 79207e03 set1 3 ,pdata 
+3aed 67f08a0a store 1 ,core_rf_ldo_en0 
+3aee 200004b0 nop 1200 
+3aef 793ffe03 set0 3 ,pdata 
+3af0 67f08a0a store 1 ,core_rf_ldo_en0 
+3af1 20600000 rtn 
+
+clk24m_init:
+3af2 70804206 jam 6 ,core_clksel 
+3af3 70804201 jam 1 ,core_clksel 
+3af4 2000000a nop 10 
+3af5 58001d4a setarg 7498 
+3af6 67f10040 store 2 ,core_halfslot 
+3af7 20600000 rtn 
+
+lpmstate:
+3af8 5800ee21 setarg 0xee21 
+3af9 67f10050 store 2 ,core_clkoff 
+3afa 6ff2011c fetch 4 ,core_gpio_in 
+3afb 67e204f2 store 4 ,mem_saved_gpio_in 
+3afc 70804783 jam 0x83 ,core_otp_ctrl 
+3afd 6ff08133 fetch 1 ,core_lpm_ctrl + 3 
+3afe 67e084f1 store 1 ,mem_wakup_from_power_flag 
+3aff 6ff08136 fetch 1 ,core_lpm_ldocnt 
+3b00 c301e79d bbit0 gpio_latch ,loadcode 
+3b01 7835fc00 enable wake 
+3b02 c303bb0a bbit0 cold_wake ,lpmwake 
+3b03 7855fc00 disable wake 
+3b04 1ce27e00 deposit auxcnt 
+3b05 243a3b0a nbranch lpmwake ,blank 
+3b06 6ff08133 fetch 1 ,core_lpm_ctrl + 3 
+3b07 c2813b0a bbit1 reload_code ,lpmwake 
+3b08 d85fffff arg param_hibernate_clks ,temp 
+3b09 20203b95 branch lpm_enter_sleep 
+
+lpmwake:
+3b0a 6ff20138 fetch 4 ,core_lpm_ctrl2 
+3b0b 67f2004c store 4 ,core_lpm_reg 
+3b0c 6ff08139 fetch 1 ,core_lpm_ctrl2 + 1 
+3b0d 1fe17ee0 and_into 0xe0 ,pdata 
+3b0e 67f0804d store 1 ,core_lpm_reg + 1 
+3b0f 20403c49 call lpm_write_ctrl3 
+3b10 6ff18134 fetch 3 ,core_lpm_xtalcnt 
+3b11 67f1804c store 3 ,core_lpm_reg 
+3b12 efe08006 ifetch 1 ,contr 
+3b13 1fe1feef or_into isogate_mask ,pdata 
+3b14 e7e08005 istore 1 ,contw 
+3b15 20403c3a call lpm_write_ctrl2 
+3b16 6ff0804f fetch 1 ,core_lpm_isogate 
+3b17 79207e04 set1 enable_retmem ,pdata 
+3b18 67f0804f store 1 ,core_lpm_isogate 
+3b19 20403c3a call lpm_write_ctrl2 
+3b1a 2055bb37 call lpm_load_context ,wake 
+3b1b 6ff0804e fetch 1 ,core_lpm_reg + 2 
+3b1c 793ffe03 set0 gpio_latch ,pdata 
+3b1d 67f0804e store 1 ,core_lpm_reg + 2 
+3b1e 20403c3a call lpm_write_ctrl2 
+3b1f 2435e79d nbranch loadcode ,wake 
+3b20 c6958000 rtnmark0 mark_otp_encrypt 
+3b21 70800608 jam lock_otp ,core_misc_ctrl 
+3b22 20600000 rtn 
+
+lpm_ctrl3_cfg_dig_vsel:
+3b23 6fe0c3e6 fetch 1 ,mem_dig_aon_vsel 
+3b24 c000bb2b beq 1 ,lpm_ctrl3_cfg_vsel_108 
+3b25 c0013b2f beq 2 ,lpm_ctrl3_cfg_vsel_096 
+3b26 c001bb33 beq 3 ,lpm_ctrl3_cfg_vsel_084 
+
+lpm_ctrl3_cfg_vsel_120:
+3b27 6fe0c0cd fetch 1 ,mem_lpm_ctrl3_aon_vsel 
+3b28 1fe17ee0 and_into 0xe0 ,pdata 
+
+lpm_ctrl3_cfg_vsel_store:
+3b29 67e0c0cd store 1 ,mem_lpm_ctrl3_aon_vsel 
+3b2a 20600000 rtn 
+
+lpm_ctrl3_cfg_vsel_108:
+3b2b 6fe0c0cd fetch 1 ,mem_lpm_ctrl3_aon_vsel 
+3b2c 1fe17ee0 and_into 0xe0 ,pdata 
+3b2d 1fe1fe1d or_into 0x1d ,pdata 
+3b2e 20203b29 branch lpm_ctrl3_cfg_vsel_store 
+
+lpm_ctrl3_cfg_vsel_096:
+3b2f 6fe0c0cd fetch 1 ,mem_lpm_ctrl3_aon_vsel 
+3b30 1fe17ee0 and_into 0xe0 ,pdata 
+3b31 1fe1fe1b or_into 0x1b ,pdata 
+3b32 20203b29 branch lpm_ctrl3_cfg_vsel_store 
+
+lpm_ctrl3_cfg_vsel_084:
+3b33 6fe0c0cd fetch 1 ,mem_lpm_ctrl3_aon_vsel 
+3b34 1fe17ee0 and_into 0xe0 ,pdata 
+3b35 1fe1fe17 or_into 0x17 ,pdata 
+3b36 20203b29 branch lpm_ctrl3_cfg_vsel_store 
+
+lpm_load_context:
+3b37 6fe0c0e8 fetch 1 ,mem_saved_spidctrl 
+3b38 67f08080 store 1 ,core_spid_ctrl 
+3b39 d8c040d0 arg mem_saved_gpio ,contr 
+3b3a d8a08070 arg core_gpio_conf ,contw 
+3b3b df20000d arg gpio_number ,loopcnt 
+3b3c 20407548 call memcpy 
+3b3d 6fe440e0 fetch 8 ,mem_saved_mark 
+3b3e 98000000 iforce mark 
+3b3f 6ff4013c fetch 8 ,core_gpio_wakeup_low 
+3b40 67e40016 store 8 ,mem_gpio_wakeup_low 
+3b41 2020682c branch load_ucode 
+
+lpm_save_context:
+3b42 18027e00 deposit mark 
+3b43 67e440e0 store 8 ,mem_saved_mark 
+3b44 d8c08070 arg core_gpio_conf ,contr 
+3b45 d8a040d0 arg mem_saved_gpio ,contw 
+3b46 df20000d arg gpio_number ,loopcnt 
+3b47 20407548 call memcpy 
+3b48 6ff08080 fetch 1 ,core_spid_ctrl 
+3b49 67e0c0e8 store 1 ,mem_saved_spidctrl 
+3b4a 20203c4b branch lpm_write_gpio_wakeup 
+
+lpo_calibration:
+3b4b 6ff0806f fetch 1 ,core_aes_en 
+3b4c 1feb7e00 rshift2 pdata ,pdata 
+3b4d 1fe17e0f and pdata ,0xf ,pdata 
+3b4e 243a3b55 nbranch lpo_cal_inited ,blank 
+3b4f 6fe1c0be fetch 3 ,mem_clks_per_lpo 
+3b50 247a0000 nrtn blank 
+3b51 6ff0806f fetch 1 ,core_aes_en 
+3b52 1fe1fe30 or_into 0x30 ,pdata 
+3b53 67f0806f store 1 ,core_aes_en 
+3b54 70800680 jam ccnt_start ,core_misc_ctrl 
+
+lpo_cal_inited:
+3b55 6ff08129 fetch 1 ,core_perf_status 
+3b56 c4008000 rtnbit0 1 
+3b57 6ff18145 fetch 3 ,core_clk_counter 
+3b58 67e1c0be store 3 ,mem_clks_per_lpo 
+3b59 20600000 rtn 
+
+lpm_adjust_clk:
+3b5a 448fc003 bpatch patch03_7 ,mem_patch03 
+3b5b 1b427e00 deposit clke 
+3b5c 2040757e call clk_diff_rt 
+3b5d 684a40ae fetcht 4 ,mem_sleep_counter_all 
+3b5e 18467cff sub temp ,0xff ,null 
+3b5f 20610000 rtn positive 
+3b60 1fed7e00 lshift8 pdata ,pdata 
+3b61 1ff27e00 lshift4 pdata ,pdata 
+3b62 9846fc00 idiv temp 
+3b63 204075cd call get_div_result 
+3b64 d84000c8 arg param_lpm_adjmax ,temp 
+3b65 204075db call ceiling 
+3b66 67e0800e store 1 ,mem_lpm_adjust 
+3b67 24343b69 nbranch lpm_adjust_positive ,user 
+3b68 1fe67e00 sub pdata ,0 ,pdata 
+
+lpm_adjust_positive:
+3b69 6849c0be fetcht 3 ,mem_clks_per_lpo 
+3b6a 9840fe00 iadd temp ,pdata 
+3b6b 67e1c0be store 3 ,mem_clks_per_lpo 
+
+lpm_clear_counter:
+3b6c 58000000 setarg 0 
+3b6d 67e240ae store 4 ,mem_sleep_counter_all 
+3b6e 20600000 rtn 
+
+lpm_hibernate:
+3b6f d85fffff arg param_hibernate_clks ,temp 
+3b70 6fe0c0c5 fetch 1 ,mem_lpm_config + 1 
+3b71 793ffe07 set0 7 ,pdata 
+3b72 67e0c0c5 store 1 ,mem_lpm_config + 1 
+
+lpm_hibernate_normal:
+3b73 44904004 bpatch patch04_0 ,mem_patch04 
+3b74 20403c4b call lpm_write_gpio_wakeup 
+3b75 6fe0c0a8 fetch 1 ,mem_lpm_hibernate_switch 
+3b76 67e0c0cb store 1 ,mem_lpm_xtalcnt + 4 
+3b77 6fe0c0c9 fetch 1 ,mem_lpm_xtalcnt + 2 
+3b78 79207e07 set1 cold_wake ,pdata 
+3b79 67e0c0c9 store 1 ,mem_lpm_xtalcnt + 2 
+
+lpm_sleep:
+3b7a 4490c004 bpatch patch04_1 ,mem_patch04 
+3b7b 20403a9f call xtal_fast_wake 
+3b7c 6fe1439e fetch 2 ,mem_cb_before_lpm_sleep 
+3b7d 204075e6 call callback_func 
+
+lpm_sleep_skip_cb_function:
+3b7e 6fe240ae fetch 4 ,mem_sleep_counter_all 
+3b7f 9840fe00 iadd temp ,pdata 
+3b80 67e240ae store 4 ,mem_sleep_counter_all 
+3b81 20403b42 call lpm_save_context 
+3b82 20403b23 call lpm_ctrl3_cfg_dig_vsel 
+3b83 6fe240cc fetch 4 ,mem_lpm_ctrl3 
+3b84 1fe22400 copy pdata ,regb 
+3b85 6fe2c0c7 fetch 5 ,mem_lpm_xtalcnt 
+3b86 67f2004c store 4 ,core_lpm_reg 
+3b87 1fef2200 rshift32 pdata ,rega 
+3b88 37d98200 until null ,lpo_edge 
+3b89 1b227e00 deposit clkn 
+3b8a 67e340b2 store 6 ,mem_sleep_clkn 
+3b8b 70800502 jam lpmreg_sel_ctrl2 ,core_lpm_wr 
+3b8c 37d98200 until null ,lpo_edge 
+3b8d 37d98200 until null ,lpo_edge 
+3b8e 1a227e00 deposit rega 
+3b8f 67f0804f store 1 ,core_lpm_isogate 
+3b90 70800502 jam lpmreg_sel_ctrl2 ,core_lpm_wr 
+3b91 37d98200 until null ,lpo_edge 
+3b92 37d98200 until null ,lpo_edge 
+3b93 6252004c storer regb ,4 ,core_lpm_reg 
+3b94 70800520 jam lpmreg_sel_ctrl3 ,core_lpm_wr 
+
+lpm_enter_sleep:
+3b95 37d98200 until null ,lpo_edge 
+3b96 37d98200 until null ,lpo_edge 
+3b97 605a004c storet 4 ,core_lpm_reg 
+3b98 70800510 jam lpmreg_sel_counter ,core_lpm_wr 
+3b99 37df8200 until null ,never 
+
+lpm_recover_clk:
+3b9a 44914004 bpatch patch04_2 ,mem_patch04 
+3b9b 58000000 setarg 0 
+3b9c 1ce27c00 copy auxcnt ,null 
+3b9d 2022bba5 branch lpm_recover_timeout ,zero 
+3b9e 6ff08134 fetch 1 ,core_lpm_xtalcnt 
+3b9f 68588135 fetcht 1 ,core_lpm_buckcnt 
+3ba0 98467c00 isub temp ,null 
+3ba1 20213ba3 branch lpm_recover_xtal ,positive 
+3ba2 18427e00 deposit temp 
+
+lpm_recover_xtal:
+3ba3 9ce67e00 isub auxcnt ,pdata 
+3ba4 1fe0fe01 increase 1 ,pdata 
+
+lpm_recover_timeout:
+3ba5 1fe0fe0a increase 10 ,pdata 
+3ba6 37d98200 until null ,lpo_edge 
+3ba7 9e20fe00 iadd lpo_time ,pdata 
+3ba8 684a40aa fetcht 4 ,mem_sleep_counter 
+3ba9 9840fe00 iadd temp ,pdata 
+3baa 6849c0be fetcht 3 ,mem_clks_per_lpo 
+3bab 984ffe00 imul32 temp ,pdata 
+3bac 1fecfe00 rshift8 pdata ,pdata 
+3bad 1ff1fe00 rshift4 pdata ,pdata 
+3bae 1fe0fe6e increase param_lpm_fix ,pdata 
+3baf 6849003f fetcht 2 ,mem_param_rt_rthalfslot 
+3bb0 9846fc00 idiv temp 
+3bb1 204075cd call get_div_result 
+3bb2 1ff07e00 lshift16 pdata ,pdata 
+3bb3 18070400 remainder temp 
+3bb4 9841fe00 ior temp ,pdata 
+3bb5 684b40b2 fetcht 6 ,mem_sleep_clkn 
+3bb6 20407573 call clk_add 
+3bb7 18423200 copy temp ,clkn 
+3bb8 6fe34048 fetch 6 ,mem_context + coffset_clk_offset 
+3bb9 20403905 call calc_clke2 
+3bba 1b427e00 deposit clke 
+3bbb 67e304c4 store 6 ,mem_pdatatemp 
+3bbc 1ce27e00 deposit auxcnt 
+3bbd e7e08005 istore 1 ,contw 
+3bbe 6ff0811d fetch 1 ,core_gpio_in1 
+3bbf 1fe1fef0 or_into 0xf0 ,pdata 
+3bc0 e7e08005 istore 1 ,contw 
+3bc1 20600000 rtn 
+
+lpm_dispatch:
+3bc2 4491c004 bpatch patch04_3 ,mem_patch04 
+3bc3 20403b4b call lpo_calibration 
+3bc4 6fe1c0be fetch 3 ,mem_clks_per_lpo 
+3bc5 207a0000 rtn blank 
+3bc6 6fe0c094 fetch 1 ,mem_lpm_mode 
+3bc7 207a0000 rtn blank 
+3bc8 da6038aa arg context_check_a_wack ,regc 
+3bc9 20403866 call context_search 
+3bca 20628000 rtn zero 
+3bcb 20403c5c call lpm_check_wake_lock 
+3bcc 247a0000 nrtn blank 
+3bcd 2040385a call context_check_idle 
+3bce 2422bbed nbranch lpm_dispatch_unconn ,zero 
+3bcf 20758000 rtn wake 
+3bd0 44924004 bpatch patch04_4 ,mem_patch04 
+3bd1 68488015 fetcht 1 ,mem_lpm_current_mult 
+3bd2 6fe14042 fetch 2 ,mem_context + coffset_tsniff 
+3bd3 984ffe00 imul32 temp ,pdata 
+3bd4 18518400 rshift4 temp ,temp 
+3bd5 184b0400 rshift2 temp ,temp 
+3bd6 98467e00 isub temp ,pdata 
+3bd7 684a4044 fetcht 4 ,mem_context + coffset_sniff_anchor 
+3bd8 9840fe00 iadd temp ,pdata 
+3bd9 6848c0a7 fetcht 1 ,mem_lpm_overhead 
+3bda 98467e00 isub temp ,pdata 
+3bdb 1ff06000 lshift16 pdata ,alarm 
+3bdc 6fe1404e fetch 2 ,mem_context + coffset_rx_window 
+3bdd 1fe37e00 rshift pdata ,pdata 
+3bde 2040759a call clk2bt 
+3bdf 1e027e00 deposit alarm 
+3be0 20407580 call clk_diff 
+3be1 1b420400 copy clke ,temp 
+3be2 2040757e call clk_diff_rt 
+3be3 20740000 rtn user 
+
+lpm_dispatch_sleep:
+3be4 20407593 call clk2lpo 
+
+lpm_dispatch_lpo:
+3be5 4492c004 bpatch patch04_5 ,mem_patch04 
+3be6 6fe0c0c7 fetch 1 ,mem_lpm_xtalcnt 
+3be7 98467c00 isub temp ,null 
+3be8 20213b6c branch lpm_clear_counter ,positive 
+3be9 604a40aa storet 4 ,mem_sleep_counter 
+3bea 20404dc6 call app_will_enter_lpm 
+3beb 684a40aa fetcht 4 ,mem_sleep_counter 
+3bec 20203b7a branch lpm_sleep 
+
+lpm_dispatch_unconn:
+3bed 44934004 bpatch patch04_6 ,mem_patch04 
+3bee 6fe0c35b fetch 1 ,mem_le_adv_enable 
+3bef 243a3bf1 nbranch lpm_unconn_cont ,blank 
+3bf0 20600000 rtn 
+
+lpm_unconn_cont:
+3bf1 6fe140a5 fetch 2 ,mem_lpm_interval 
+3bf2 207a0000 rtn blank 
+
+lpm_sleep_btclk:
+3bf3 6848c0a7 fetcht 1 ,mem_lpm_overhead 
+3bf4 98467e00 isub temp ,pdata 
+3bf5 d8401d4c arg 7500 ,temp 
+3bf6 984ffe00 imul32 temp ,pdata 
+3bf7 20203be4 branch lpm_dispatch_sleep 
+
+lpm_mult_wait_timeout:
+3bf8 6fe1439a fetch 2 ,mem_cb_bt_set_mult 
+3bf9 204075e6 call callback_func 
+3bfa 243a3c10 nbranch lpm_mult_short ,blank 
+3bfb 70001500 jam 0 ,mem_lpm_current_mult 
+3bfc c586bc10 bmark0 mark_lpm_mult_enable ,lpm_mult_short 
+3bfd 6fe0c0c3 fetch 1 ,mem_lpm_mult_cnt 
+3bfe 203a3c14 branch lpm_mult_long ,blank 
+3bff 1fe0ffff increase -1 ,pdata 
+3c00 67e0c0c3 store 1 ,mem_lpm_mult_cnt 
+3c01 20600000 rtn 
+
+lpm_match:
+3c02 7040a900 jam 0 ,mem_sniff_unint_lost 
+3c03 6fe1c0b8 fetch 3 ,mem_sniff_rcv 
+3c04 1fe0fe01 increase 1 ,pdata 
+3c05 67e1c0b8 store 3 ,mem_sniff_rcv 
+3c06 20600000 rtn 
+
+lpm_lost:
+3c07 4493c004 bpatch patch04_7 ,mem_patch04 
+3c08 70001500 jam 0 ,mem_lpm_current_mult 
+3c09 6fe1c0bb fetch 3 ,mem_sniff_lost 
+3c0a 1fe0fe01 increase 1 ,pdata 
+3c0b 67e1c0bb store 3 ,mem_sniff_lost 
+3c0c 6fe0c0a9 fetch 1 ,mem_sniff_unint_lost 
+3c0d 1fe0fe01 increase 1 ,pdata 
+3c0e 67e0c0a9 store 1 ,mem_sniff_unint_lost 
+3c0f 20600000 rtn 
+
+lpm_mult_short:
+3c10 70001500 jam 0 ,mem_lpm_current_mult 
+3c11 6fe0c0c2 fetch 1 ,mem_lpm_mult_timeout 
+3c12 67e0c0c3 store 1 ,mem_lpm_mult_cnt 
+3c13 20600000 rtn 
+
+lpm_mult_long:
+3c14 6848c0c1 fetcht 1 ,mem_lpm_mult 
+3c15 60488015 storet 1 ,mem_lpm_current_mult 
+3c16 20600000 rtn 
+
+lpm_cal_xtal_startup:
+3c17 6fe0c0c7 fetch 1 ,mem_lpm_xtalcnt 
+3c18 247a0000 nrtn blank 
+3c19 70804206 jam clksel_rc ,core_clksel 
+3c1a 58000f0c setarg 0xf0c 
+3c1b 20403c2e call lpm_write_config 
+3c1c 58030d40 setarg 200000 
+3c1d 20403abc call sleep 
+3c1e 37d98200 until null ,lpo_edge 
+3c1f 1e226000 copy lpo_time ,alarm 
+3c20 20403a9f call xtal_fast_wake 
+3c21 70804204 jam clksel_xtal ,core_clksel 
+3c22 2000000a nop 10 
+3c23 37d98200 until null ,lpo_edge 
+3c24 1e227e00 deposit lpo_time 
+3c25 9e067e00 isub alarm ,pdata 
+3c26 1fe0fe30 increase 0x30 ,pdata 
+3c27 d84000ff arg 0xff ,temp 
+3c28 204075db call ceiling 
+3c29 67e0c0c7 store 1 ,mem_lpm_xtalcnt 
+3c2a 20007530 nop 30000 
+3c2b 20007530 nop 30000 
+3c2c 20007530 nop 30000 
+3c2d 20600000 rtn 
+
+lpm_write_config:
+3c2e d8a00fff arg 0xfff ,contw 
+3c2f 98a10a00 iand contw ,contw 
+3c30 6fe0c0c4 fetch 1 ,mem_lpm_config 
+3c31 1fe17ef0 and_into 0xf0 ,pdata 
+3c32 1fed7e00 lshift8 pdata ,pdata 
+3c33 98a1fe00 ior contw ,pdata 
+3c34 67f1004c store 2 ,core_lpm_reg 
+3c35 efe10006 ifetch 2 ,contr 
+3c36 e7e10005 istore 2 ,contw 
+
+lpm_write_ctrl:
+3c37 44944005 bpatch patch05_0 ,mem_patch05 
+3c38 58000001 setarg lpmreg_sel_ctrl 
+3c39 20203c3c branch lpm_write 
+
+lpm_write_ctrl2:
+3c3a 4494c005 bpatch patch05_1 ,mem_patch05 
+3c3b 58000002 setarg lpmreg_sel_ctrl2 
+
+lpm_write:
+3c3c 37d98200 until null ,lpo_edge 
+3c3d 67f08005 store 1 ,core_lpm_wr 
+3c3e 37d98200 until null ,lpo_edge 
+3c3f 37d98200 until null ,lpo_edge 
+3c40 20600000 rtn 
+
+lpm_write_sel_vdd:
+3c41 44954005 bpatch patch05_2 ,mem_patch05 
+3c42 6ff20138 fetch 4 ,core_lpm_ctrl2 
+3c43 67f2004c store 4 ,core_lpm_reg 
+3c44 6ff08138 fetch 1 ,core_lpm_ctrl2 
+3c45 1fe17e41 and_into 0x41 ,pdata 
+3c46 6848c0cc fetcht 1 ,mem_lpm_ctrl3_app_vsel 
+3c47 9841fe00 ior temp ,pdata 
+3c48 67f0804c store 1 ,core_lpm_reg 
+
+lpm_write_ctrl3:
+3c49 58000020 setarg lpmreg_sel_ctrl3 
+3c4a 20203c3c branch lpm_write 
+
+lpm_write_gpio_wakeup:
+3c4b 4495c005 bpatch patch05_3 ,mem_patch05 
+3c4c 6fe20016 fetch 4 ,mem_gpio_wakeup_low 
+3c4d 67f2004c store 4 ,core_lpm_reg 
+3c4e 58000004 setarg lpmreg_sel_gpiolow 
+3c4f 20403c3c call lpm_write 
+3c50 6fe2001a fetch 4 ,mem_gpio_wakeup_high 
+3c51 67f2004c store 4 ,core_lpm_reg 
+3c52 58000008 setarg lpmreg_sel_gpiohigh 
+3c53 20203c3c branch lpm_write 
+
+lpm_get_wake_lock:
+3c54 6fe140a3 fetch 2 ,mem_lpm_wake_lock 
+3c55 f9207e00 qset1 pdata 
+3c56 67e140a3 store 2 ,mem_lpm_wake_lock 
+3c57 20600000 rtn 
+
+lpm_put_wake_lock:
+3c58 6fe140a3 fetch 2 ,mem_lpm_wake_lock 
+3c59 f93ffe00 qset0 pdata 
+3c5a 67e140a3 store 2 ,mem_lpm_wake_lock 
+3c5b 20600000 rtn 
+
+lpm_check_wake_lock:
+3c5c 44964005 bpatch patch05_4 ,mem_patch05 
+3c5d 20404dc4 call app_check_wake_lock 
+3c5e 6fe140a3 fetch 2 ,mem_lpm_wake_lock 
+3c5f 1fe22200 copy pdata ,rega 
+3c60 6fe1c3f8 fetch 3 ,mem_tx_fifo3 
+3c61 7d3a2201 nsetflag blank ,wake_lock_ble_tx ,rega 
+3c62 6fe44419 fetch util_fifo_len ,mem_ipc_fifo_bt2c51 
+3c63 7d3a220f nsetflag blank ,wake_lock_ipc_bt2c51 ,rega 
+3c64 6fe44421 fetch util_fifo_len ,mem_ipc_fifo_c512bt 
+3c65 7d3a220e nsetflag blank ,wake_lock_ipc_c512bt ,rega 
+3c66 6fe0c10d fetch 1 ,mem_hci_cmd 
+3c67 7d3a2208 nsetflag blank ,wake_lock_cmd ,rega 
+3c68 6fe0c095 fetch 1 ,mem_device_option 
+3c69 2fe1fe0a compare dvc_op_module ,pdata ,0xff 
+3c6a 2040bc6e call lpm_uart_wake_lock ,true 
+3c6b 1a227e00 copy rega ,pdata 
+3c6c 67e140a3 store 2 ,mem_lpm_wake_lock 
+3c6d 20600000 rtn 
+
+lpm_uart_wake_lock:
+3c6e 6ff10112 fetch 2 ,core_uart_rxitems 
+3c6f 7d3a2206 nsetflag blank ,wake_lock_uart_rx ,rega 
+3c70 6ff1010e fetch 2 ,core_uart_txitems 
+3c71 7d3a2205 nsetflag blank ,wake_lock_uart_tx ,rega 
+3c72 20600000 rtn 
+
+lpm_shut_down:
+3c73 6ff20130 fetch 4 ,core_lpm_ctrl 
+3c74 793ffe1b set0 27 ,pdata 
+3c75 67f2004c store 4 ,core_lpm_reg 
+3c76 20403c37 call lpm_write_ctrl 
+3c77 20203aba branch assert 
+
+lpm_disable_exen_output:
+3c78 6ff20134 fetch 4 ,core_lpm_xtalcnt 
+3c79 793ffe14 set0 20 ,pdata 
+3c7a 67f2004c store 4 ,core_lpm_reg 
+3c7b 20203c3a branch lpm_write_ctrl2 
+
+le_init_conn:
+3c7c 44e44019 bpatch patch19_0 ,mem_patch19 
+3c7d 7855fc00 disable wake 
+3c7e 70017901 jam 1 ,mem_le_conn_handle 
+3c7f 70016303 jam 3 ,mem_le_state 
+3c80 70017a01 jam 1 ,mem_le_arq 
+3c81 5fffffff setarg -1 
+3c82 67e1017d store 2 ,mem_le_event_count 
+3c83 18007e00 force 0 ,pdata 
+3c84 67e0817b store 1 ,mem_le_ch 
+3c85 67e08186 store 1 ,mem_le_op 
+3c86 67e1c0b8 store 3 ,mem_sniff_rcv 
+3c87 67e1c0bb store 3 ,mem_sniff_lost 
+3c88 20403fd8 call le_clear_enc 
+3c89 70412901 jam 1 ,mem_le_txheader 
+3c8a 70412a00 jam 0 ,mem_le_txlen 
+3c8b 70019801 jam fun_rx_ll_1m_phy ,mem_le_rx_phy 
+3c8c 70019901 jam fun_tx_ll_1m_phy ,mem_le_tx_phy 
+3c8d 70436900 jam 0 ,mem_le_l2cap_att_states 
+3c8e 202040b4 branch le_supervision_flush 
+
+le_init_master:
+3c8f 44e4c019 bpatch patch19_1 ,mem_patch19 
+3c90 7834fc00 enable master 
+3c91 70016403 jam lemode_master ,mem_le_mode 
+3c92 70436b01 jam 1 ,mem_le_att_handle 
+3c93 70050601 jam 1 ,mem_le_search_handle_start 
+3c94 5800ffff setarg 0xffff 
+3c95 67e10508 store 2 ,mem_le_search_handle_end 
+3c96 18007e00 force 0 ,pdata 
+3c97 67e2c402 store 5 ,mem_ccm_pcnt_rx 
+3c98 79207e27 set1 le_ccm_directionbit ,pdata 
+3c99 67e2c3fd store 5 ,mem_ccm_pcnt_tx 
+3c9a 20203c7c branch le_init_conn 
+
+le_init_slave:
+3c9b 44e54019 bpatch patch19_2 ,mem_patch19 
+3c9c 7854fc00 disable master 
+3c9d 58000017 setarg 0x17 
+3c9e 67e142b6 store 2 ,mem_le_remote_mtu 
+3c9f 1fe0fe04 increase 4 ,pdata 
+3ca0 67e14378 store 2 ,mem_remote_rx_max_octets 
+3ca1 70016401 jam lemode_slave ,mem_le_mode 
+3ca2 70435b00 jam 0 ,mem_le_adv_enable 
+3ca3 70001500 jam 0 ,mem_lpm_current_mult 
+3ca4 20403d05 call le_clear_pairing_state 
+3ca5 6fe10191 fetch 2 ,mem_le_superto 
+3ca6 67e142c8 store 2 ,mem_le_init_superto 
+3ca7 6fe10165 fetch 2 ,mem_le_tsniff 
+3ca8 1feffe05 mul32 pdata ,5 ,pdata 
+3ca9 1ff1fe00 rshift4 pdata ,pdata 
+3caa 67e10191 store 2 ,mem_le_superto 
+3cab 20203c7c branch le_init_conn 
+
+le_conn_dispatch:
+3cac 44e5c019 bpatch patch19_3 ,mem_patch19 
+3cad 20403d2f call le_enable 
+3cae 6fe08163 fetch 1 ,mem_le_state 
+3caf 2feffe04 isolate1 lestate_encryption ,pdata 
+3cb0 79208032 setflag true ,mark_ble_encryption ,mark 
+3cb1 20404db3 call app_process_ble 
+3cb2 6fe08164 fetch 1 ,mem_le_mode 
+3cb3 c280bcb5 bbit1 mode_master ,le_master_dispatch 
+3cb4 20203cc7 branch le_slave_dispatch 
+
+le_master_dispatch:
+3cb5 44e64019 bpatch patch19_4 ,mem_patch19 
+3cb6 7834fc00 enable master 
+3cb7 204040aa call le_supervision_update 
+3cb8 20213cc4 branch le_master_disconn ,positive 
+3cb9 20403d75 call le_setup 
+3cba 20403fed call le_prepare_tx 
+3cbb 7856fc00 disable match 
+3cbc 20403eab call le_transmit_receive_sifs 
+3cbd 24768000 nrtn match 
+3cbe 6fe08005 fetch 1 ,mem_le_conn_rcv 
+3cbf 1fe0fe01 increase 1 ,pdata 
+3cc0 67e08005 store 1 ,mem_le_conn_rcv 
+3cc1 20403f9e call le_acknowledge 
+3cc2 7854fc00 disable master 
+3cc3 20600000 rtn 
+
+le_master_disconn:
+3cc4 20403cfa call le_disconnect 
+3cc5 7854fc00 disable master 
+3cc6 20600000 rtn 
+
+le_slave_dispatch:
+3cc7 44e6c019 bpatch patch19_5 ,mem_patch19 
+3cc8 70431100 jam 0 ,mem_le_md_count 
+3cc9 793f8030 set0 mark_ble_crc_fail ,mark 
+3cca 78577c00 disable attempt 
+3ccb 204040aa call le_supervision_update 
+3ccc 20213cfa branch le_slave_disconn ,positive 
+3ccd 6fe08198 fetch 1 ,mem_le_rx_phy 
+3cce 20403d16 call le_enable_phy_by_pdata 
+3ccf 20403d75 call le_setup 
+3cd0 20403dcc call le_receive_slave 
+3cd1 242c3ceb nbranch le_slave_unsync ,sync 
+3cd2 20403d09 call le_got_first_packet 
+3cd3 2036bcd6 branch le_slave_match ,match 
+3cd4 c5183cd6 bmark1 mark_ble_crc_fail ,le_slave_crc_fail 
+3cd5 20203ce5 branch le_slave_cont 
+
+le_slave_crc_fail:
+
+le_slave_match:
+3cd6 44e74019 bpatch patch19_6 ,mem_patch19 
+3cd7 6fe0c311 fetch 1 ,mem_le_md_count 
+3cd8 1fe0fe01 pincrease 1 
+3cd9 67e0c311 store 1 ,mem_le_md_count 
+3cda c0063ce5 beq le_md_max_count ,le_slave_cont 
+3cdb 20403f9e call le_acknowledge 
+3cdc 20403fed call le_prepare_tx 
+3cdd 6fe08199 fetch 1 ,mem_le_tx_phy 
+3cde 20403d16 call le_enable_phy_by_pdata 
+3cdf 20403ebc call le_transmit 
+3ce0 20404050 call le_parse 
+3ce1 6fe14396 fetch 2 ,mem_cb_ble_transmit 
+3ce2 204075e6 call callback_func 
+3ce3 20403cef call le_check_md 
+3ce4 20343cf4 branch le_slave_more_data ,user 
+
+le_slave_cont:
+3ce5 44e7c019 bpatch patch19_7 ,mem_patch19 
+3ce6 204046c1 call le_pairing_sm 
+3ce7 204046b8 call le_check_paring_time 
+3ce8 204070b1 call check_51cmd 
+3ce9 6fe08186 fetch 1 ,mem_le_op 
+3cea c281bcfa bbit1 op_disconn ,le_slave_disconn 
+
+le_slave_unsync:
+3ceb 44e8401a bpatch patch1a_0 ,mem_patch1a 
+3cec 204038cb call end_of_packet 
+3ced 2040417e call le_lpm_set_mult 
+3cee 202038f3 branch calc_clke_offset 
+
+le_check_md:
+3cef 78547c00 disable user 
+3cf0 c5157636 bmark1 mark_ble_rx_md ,enable_user 
+3cf1 c514f636 bmark1 mark_ble_tx_md ,enable_user 
+3cf2 c5187636 bmark1 mark_ble_crc_fail ,enable_user 
+3cf3 20600000 rtn 
+
+le_slave_more_data:
+3cf4 44e8c01a bpatch patch1a_1 ,mem_patch1a 
+3cf5 78377c00 enable attempt 
+3cf6 20403eaf call le_transmit_receive_sifs_notx 
+3cf7 2036bcd6 branch le_slave_match ,match 
+3cf8 c5183cd6 bmark1 mark_ble_crc_fail ,le_slave_crc_fail 
+3cf9 20203ce5 branch le_slave_cont 
+
+le_slave_disconn:
+
+le_disconnect:
+3cfa 44e9401a bpatch patch1a_2 ,mem_patch1a 
+3cfb 20403d00 call le_clear_connection_info 
+3cfc 20404e03 call app_disconn_reason_collect_ble 
+3cfd 20403d05 call le_clear_pairing_state 
+3cfe 7004c315 jam bt_evt_le_disconnected ,mem_fifo_temp 
+3cff 2020709b branch ui_ipc_send_event 
+
+le_clear_connection_info:
+3d00 d8a043ee arg mem_used_map ,contw 
+3d01 20407504 call memset0_16 
+3d02 70017900 jam 0 ,mem_le_conn_handle 
+3d03 70016400 jam lemode_idle ,mem_le_mode 
+3d04 70016300 jam 0 ,mem_le_state 
+
+le_clear_pairing_state:
+3d05 44e9c01a bpatch patch1a_3 ,mem_patch1a 
+3d06 7042d000 jam flag_le_enc_null ,mem_le_enc_state 
+3d07 7042cf00 jam flag_le_pairing_null ,mem_le_pairing_state 
+3d08 20600000 rtn 
+
+le_got_first_packet:
+3d09 44ea401a bpatch patch1a_4 ,mem_patch1a 
+3d0a 6fe08005 fetch 1 ,mem_le_conn_rcv 
+3d0b 1fe0fe01 increase 1 ,pdata 
+3d0c 67e08005 store 1 ,mem_le_conn_rcv 
+3d0d 6fe08163 fetch 1 ,mem_le_state 
+3d0e c3818000 rtnbit1 lestate_got_first_packet 
+3d0f 79207e03 set1 lestate_got_first_packet ,pdata 
+3d10 67e08163 store 1 ,mem_le_state 
+3d11 6fe142c8 fetch 2 ,mem_le_init_superto 
+3d12 67e10191 store 2 ,mem_le_superto 
+3d13 58000000 setarg 0 
+3d14 67e242f0 store 4 ,mem_le_transmit_window 
+3d15 20600000 rtn 
+
+le_enable_phy_by_pdata:
+3d16 1fe20400 copy pdata ,temp 
+3d17 44eac01a bpatch patch1a_5 ,mem_patch1a 
+3d18 18427e00 copy temp ,pdata 
+3d19 c2803d2f bbit1 bit_le_1m_phy ,le_enable 
+3d1a c280bd1f bbit1 bit_le_2m_phy ,le_enable_2m 
+3d1b c3013d2f bbit0 bit_le_coded_phy ,le_enable 
+3d1c c283bd2c bbit1 bit_le_coded_phy_s8 ,le_enable_coded_s8 
+3d1d c2813d25 bbit1 bit_le_coded_phy_s2 ,le_enable_coded_s2 
+3d1e 20203d2f branch le_enable 
+
+le_enable_2m:
+3d1f 20403d2f call le_enable 
+3d20 7920002d set1 mark_ble_2m ,mark 
+3d21 793f802f set0 mark_ble_lr ,mark 
+3d22 70890103 jam 0x03 ,0x8901 
+3d23 70892084 jam 0x84 ,0x8920 
+3d24 20600000 rtn 
+
+le_enable_coded_s2:
+
+le_enable_coded:
+3d25 20403d2f call le_enable 
+3d26 7920002f set1 mark_ble_lr ,mark 
+3d27 793f802e set0 mark_ble_lr_s8 ,mark 
+3d28 70890105 jam 0x05 ,0x8901 
+3d29 70892080 jam 0x80 ,0x8920 
+3d2a 70893020 jam 0x20 ,0x8930 
+3d2b 20600000 rtn 
+
+le_enable_coded_s8:
+3d2c 20403d25 call le_enable_coded 
+3d2d 7920002e set1 mark_ble_lr_s8 ,mark 
+3d2e 20600000 rtn 
+
+le_enable:
+3d2f 44eb401a bpatch patch1a_6 ,mem_patch1a 
+3d30 793f802d set0 mark_ble_2m ,mark 
+3d31 793f802f set0 mark_ble_lr ,mark 
+3d32 70890101 jam 0x01 ,0x8901 
+3d33 70892080 jam 0x80 ,0x8920 
+3d34 70893003 jam 0x03 ,0x8930 
+3d35 20600000 rtn 
+
+le_disable:
+3d36 44ebc01a bpatch patch1a_7 ,mem_patch1a 
+3d37 793f8032 set0 mark_ble_encryption ,mark 
+3d38 70890101 jam 0x01 ,0x8901 
+3d39 70892080 jam 0x80 ,0x8920 
+3d3a 70893003 jam 0x03 ,0x8930 
+3d3b 20600000 rtn 
+
+le_prep:
+3d3c 44ec401b bpatch patch1b_0 ,mem_patch1b 
+3d3d 7844fc00 disable enable_crc 
+3d3e 7843fc00 disable enable_white 
+3d3f 6fe1818b fetch 3 ,mem_le_crcinit 
+3d40 98001e00 iforce crc24_init 
+3d41 6fe08007 fetch 1 ,mem_le_ch_mapped 
+
+le_prep_next:
+3d42 1fed8400 reverse pdata ,temp 
+3d43 79200401 set1 1 ,temp 
+3d44 18431c00 rshift temp ,white_init 
+3d45 20600000 rtn 
+
+le_rx_setfreq:
+3d46 20403d4f call le_setfreq 
+
+le_rf_rx_enable:
+3d47 20403954 call set_freq_rx 
+3d48 6fe10039 fetch 2 ,mem_param_pll_setup 
+3d49 20403abc call sleep 
+3d4a 2020396a branch rf_rx_enable 
+
+le_tx_setfreq:
+3d4b 2036b9cf branch txon ,match 
+3d4c c51839cf bmark1 mark_ble_crc_fail ,txon 
+
+le_tx_setfreq0:
+3d4d 20403d4f call le_setfreq 
+3d4e 202039c9 branch set_freq_tx 
+
+le_setfreq:
+3d4f 44ecc01b bpatch patch1b_1 ,mem_patch1b 
+3d50 20403925 call set_sync_on 
+3d51 6fe081b6 fetch 1 ,mem_le_testtype 
+3d52 243a3d62 nbranch le_ctf_test ,blank 
+3d53 6fe08007 fetch 1 ,mem_le_ch_mapped 
+3d54 1fe67c24 sub pdata ,36 ,null 
+3d55 20213d5c branch le_ctf_normal ,positive 
+3d56 18000400 force 0 ,temp 
+3d57 c1128000 rtneq 37 
+3d58 18000418 force 24 ,temp 
+3d59 c1130000 rtneq 38 
+3d5a 1800044e force 78 ,temp 
+3d5b 20600000 rtn 
+
+le_ctf_normal:
+3d5c 1fe67c0a sub pdata ,10 ,null 
+3d5d 20213d5f branch le_ctf_low ,positive 
+3d5e 1fe0fe01 increase 1 ,pdata 
+
+le_ctf_low:
+3d5f 1fe3fe00 lshift pdata ,pdata 
+3d60 1fe08402 add pdata ,2 ,temp 
+3d61 20600000 rtn 
+
+le_ctf_test:
+3d62 6fe08007 fetch 1 ,mem_le_ch_mapped 
+3d63 1fe38400 lshift pdata ,temp 
+3d64 20600000 rtn 
+
+le_sca_map:
+3d65 d84001f4 arg 500 ,temp 
+3d66 207a0000 rtn blank 
+3d67 d84000fa arg 250 ,temp 
+3d68 c1008000 rtneq 1 
+3d69 d8400096 arg 150 ,temp 
+3d6a c1010000 rtneq 2 
+3d6b d8400064 arg 100 ,temp 
+3d6c c1018000 rtneq 3 
+3d6d d840004b arg 75 ,temp 
+3d6e c1020000 rtneq 4 
+3d6f d8400032 arg 50 ,temp 
+3d70 c1028000 rtneq 5 
+3d71 d8400028 arg 40 ,temp 
+3d72 c1030000 rtneq 6 
+3d73 d8400014 arg 20 ,temp 
+3d74 20600000 rtn 
+
+le_setup:
+3d75 44ed401b bpatch patch1b_2 ,mem_patch1b 
+3d76 78287c00 enable swfine 
+3d77 6fe20187 fetch 4 ,mem_le_access 
+3d78 98001200 iforce access 
+3d79 20403daa call le_map_channel 
+3d7a 58000200 setarg 0x200 
+3d7b 2034bd7e branch le_setup_master ,master 
+3d7c 6fe10171 fetch 2 ,mem_le_receive_window 
+3d7d 1fe37e00 rshift pdata ,pdata 
+
+le_setup_master:
+3d7e 68490039 fetcht 2 ,mem_param_pll_setup 
+3d7f 9840fe00 iadd temp ,pdata 
+3d80 20403aa3 call ahead_window 
+3d81 1b427e00 deposit clke 
+3d82 20600000 rtn 
+
+le_context_nextevent:
+3d83 44edc01b bpatch patch1b_3 ,mem_patch1b 
+3d84 204074b7 call push_stack_rega_b_c 
+3d85 672104ef storer loopcnt ,2 ,mem_loopcnt 
+3d86 1a208c01 add rega ,coffset_mode ,contr 
+3d87 efe08006 ifetch 1 ,contr 
+3d88 c4000000 rtnbit0 mode_le 
+3d89 1a208a1a add rega ,coffset_le_event_cnt ,contw 
+3d8a efe10005 ifetch 2 ,contw 
+3d8b 1fe0fe01 increase 1 ,pdata 
+3d8c e7e10005 istore 2 ,contw 
+3d8d 20403f1d call le_update_param 
+3d8e 20403f3f call le_update_channel_map 
+3d8f 20403f48 call le_update_phy 
+3d90 20403d94 call le_context_nexthop 
+3d91 204074c6 call pop_stack_rega_b_c 
+3d92 6f2104ef fetchr loopcnt ,2 ,mem_loopcnt 
+3d93 20600000 rtn 
+
+le_context_nexthop:
+3d94 1a208c19 add rega ,coffset_le_hop ,contr 
+3d95 efe08006 ifetch 1 ,contr 
+3d96 1a208a18 add rega ,coffset_le_ch ,contw 
+3d97 e8408005 ifetcht 1 ,contw 
+3d98 9840fe00 iadd temp ,pdata 
+3d99 1fe67c24 sub pdata ,36 ,null 
+3d9a 20213d9c branch le_nexthop_nowrap ,positive 
+3d9b 1fe0ffdb increase -37 ,pdata 
+
+le_nexthop_nowrap:
+3d9c e7e08005 istore 1 ,contw 
+3d9d 20600000 rtn 
+
+le_calc_channel_map:
+3d9e 1a208c30 add rega ,coffset_le_channel_map ,contr 
+3d9f efe28006 ifetch 5 ,contr 
+3da0 18000400 force 0 ,temp 
+3da1 18007225 force 37 ,loopcnt 
+
+le_count_channels_loop:
+3da2 c3003da4 bbit0 0 ,le_count_channels_notused 
+3da3 18408401 increase 1 ,temp 
+
+le_count_channels_notused:
+3da4 1fe37e00 rshift pdata ,pdata 
+3da5 c2003da2 loop le_count_channels_loop 
+3da6 1840ffff add temp ,-1 ,pdata 
+3da7 1a208a22 add rega ,coffset_le_channels ,contw 
+3da8 e7e08005 istore 1 ,contw 
+3da9 20600000 rtn 
+
+le_map_channel:
+3daa 44ee401b bpatch patch1b_4 ,mem_patch1b 
+3dab 6fe0817b fetch 1 ,mem_le_ch 
+3dac 98000e00 iforce queue 
+3dad 684a8193 fetcht 5 ,mem_le_channel_map 
+3dae a84fffff qisolate1 temp 
+3daf 2020bdbf branch le_map_channel_end ,true 
+
+le_map_channel_next:
+3db0 6fe08185 fetch 1 ,mem_le_channels 
+3db1 98e67e00 isub queue ,pdata 
+3db2 20213db5 branch le_map_channel_cont ,positive 
+3db3 1fe60fff sub pdata ,-1 ,queue 
+3db4 20203db0 branch le_map_channel_next 
+
+le_map_channel_cont:
+3db5 18e27200 copy queue ,loopcnt 
+3db6 18000e00 force 0 ,queue 
+
+le_map_channel_loop:
+3db7 a84fffff qisolate1 temp 
+3db8 2020bdba branch le_map_channel_skip ,true 
+3db9 1f20f201 increase 1 ,loopcnt 
+
+le_map_channel_skip:
+3dba 1f227e00 deposit loopcnt 
+3dbb 203a3dbf branch le_map_channel_end ,blank 
+3dbc 18e08e01 increase 1 ,queue 
+3dbd 1f20f3ff increase -1 ,loopcnt 
+3dbe 20203db7 branch le_map_channel_loop 
+
+le_map_channel_end:
+3dbf 18e27e00 deposit queue 
+3dc0 67e08007 store 1 ,mem_le_ch_mapped 
+3dc1 20600000 rtn 
+
+le_wait_tx:
+3dc2 2034bdc5 branch le_wait_master ,master 
+3dc3 37c18200 until null ,timeout 
+3dc4 20600000 rtn 
+
+le_wait_master:
+3dc5 d9600ea0 arg 0xea0 ,timeup 
+3dc6 34730200 until clkn_rt ,meet 
+3dc7 20600000 rtn 
+
+le_receive_adv:
+3dc8 78487c00 disable swfine 
+3dc9 6fe14319 fetch 2 ,mem_le_scan_window 
+3dca 1fe21600 copy pdata ,timeup 
+3dcb 20203dd2 branch le_receive_packet 
+
+le_receive_slave:
+3dcc 44eec01b bpatch patch1b_5 ,mem_patch1b 
+3dcd 20403e39 call le_dec_init 
+3dce 78287c00 enable swfine 
+3dcf 6fe10171 fetch 2 ,mem_le_receive_window 
+3dd0 684a42f0 fetcht 4 ,mem_le_transmit_window 
+3dd1 98409600 iadd temp ,timeup 
+
+le_receive_packet:
+3dd2 20403d46 call le_rx_setfreq 
+
+le_receive_rxon:
+3dd3 44ef401b bpatch patch1b_6 ,mem_patch1b 
+3dd4 20403d3c call le_prep 
+3dd5 c597bdda bmark0 mark_ble_lr ,le_receive_nolr 
+3dd6 783cfc00 pulse dewhiten_code_calc 
+3dd7 2000001e nop 30 
+3dd8 20403d3c call le_prep 
+3dd9 19699600 lshift3 timeup ,timeup 
+
+le_receive_nolr:
+3dda 7856fc00 disable match 
+3ddb 7826fc00 enable decode_fec0 
+3ddc 7830fc00 enable is_rx 
+3ddd 78507c00 disable is_tx 
+3dde 19623600 copy timeup ,stop_watch 
+3ddf 37c18400 correlate null ,timeout 
+3de0 20373de3 branch le_receive_on_attempt ,attempt 
+3de1 1b420400 copy clke ,temp 
+3de2 604b000f storet 6 ,mem_sync_clke 
+
+le_receive_on_attempt:
+3de3 242c3e75 nbranch le_unsync_end ,sync 
+3de4 44efc01b bpatch patch1b_7 ,mem_patch1b 
+3de5 78287c00 enable swfine 
+3de6 db604eab arg param_t_ifs_150us + param_20ms_init + param_sync_time_difference ,stop_watch 
+3de7 6fe0c11d fetch 1 ,mem_system_clk 
+3de8 9b6fb600 imul32 stop_watch ,stop_watch 
+3de9 2040644b call rf_debug_rx_sync_line 
+3dea 20373df0 branch le_receive_skip ,attempt 
+3deb 20403e7a call calc_clke_all_modem 
+3dec 6fe08163 fetch 1 ,mem_le_state 
+3ded c301bdf0 bbit0 lestate_got_first_packet ,le_receive_skip 
+3dee 684b000f fetcht 6 ,mem_sync_clke 
+3def 2055bb5a call lpm_adjust_clk ,wake 
+
+le_receive_skip:
+3df0 20403a45 call save_rssi 
+3df1 7823fc00 enable enable_white 
+3df2 7824fc00 enable enable_crc 
+3df3 09800008 parse demod ,bucket ,8 
+3df4 19897e00 rshift3 pwindow ,pdata 
+3df5 67e08047 store 1 ,mem_le_rxbuf_data_header 
+3df6 09800008 parse demod ,bucket ,8 
+3df7 19897e00 rshift3 pwindow ,pdata 
+3df8 67e08048 store 1 ,mem_le_rxbuf_data_length 
+3df9 1fe27200 copy pdata ,loopcnt 
+3dfa 2022be16 branch le_rx_nopayload ,zero 
+3dfb c5193e01 bmark1 mark_ble_encryption ,le_rx_dec 
+
+le_rx_loop:
+3dfc 09800008 parse demod ,bucket ,8 
+3dfd 19897e00 rshift3 pwindow ,pdata 
+3dfe e7e08005 istore 1 ,contw 
+3dff c2003dfc loop le_rx_loop 
+3e00 20203e16 branch le_rx_nopayload 
+
+le_rx_dec:
+3e01 18a22400 copy contw ,regb 
+3e02 44f0401c bpatch patch1c_0 ,mem_patch1c 
+3e03 20403f97 call le_check_retransmit 
+3e04 6a208048 fetchr rega ,1 ,mem_le_rxbuf_data_length 
+3e05 1a20a3fc increase -4 ,rega 
+3e06 24213e6d nbranch le_mic_error ,positive 
+3e07 20403e3e call le_dec_start 
+3e08 1a420a00 copy regb ,contw 
+3e09 d8400000 arg 0 ,temp 
+3e0a 6f208048 fetchr loopcnt ,1 ,mem_le_rxbuf_data_length 
+3e0b 1f20f3fc increase -4 ,loopcnt 
+3e0c 2022be14 branch le_rx_dec_loop_end ,zero 
+
+le_rx_dec_loop:
+3e0d 09800008 parse demod ,bucket ,8 
+3e0e 19897e00 rshift3 pwindow ,pdata 
+3e0f e7e08005 istore 1 ,contw 
+3e10 18408401 increase 1 ,temp 
+3e11 18417c0f and temp ,0xf ,null 
+3e12 2042be5c call le_dec ,zero 
+3e13 c2003e0d loop le_rx_dec_loop 
+
+le_rx_dec_loop_end:
+3e14 20403e64 call le_dec_end 
+3e15 1a420a00 copy regb ,contw 
+
+le_rx_nopayload:
+3e16 44f0c01c bpatch patch1c_1 ,mem_patch1c 
+3e17 09800018 parse demod ,bucket ,24 
+3e18 1fef7e00 rshift32 pdata ,pdata 
+3e19 1ff17e00 rshift16 pdata ,pdata 
+3e1a e7e18005 istore 3 ,contw 
+3e1b 78287c00 enable swfine 
+3e1c 20403e88 call le_set_until_tx_timer 
+3e1d 20233e71 branch le_crc_fail ,crc_failed 
+3e1e c5993e28 bmark0 mark_ble_encryption ,le_rx_match 
+3e1f 6fe08048 fetch 1 ,mem_le_rxbuf_data_length 
+3e20 203a3e28 branch le_rx_match ,blank 
+3e21 1fe0fffc increase -4 ,pdata 
+3e22 67e08048 store 1 ,mem_le_rxbuf_data_length 
+3e23 20406f07 call wait_ccm_done 
+3e24 6ff08108 fetch 1 ,core_misc_status 
+3e25 c303be6d bbit0 7 ,le_mic_error 
+3e26 1800700c force regidx_result ,regext_index 
+3e27 65e2014f storer regext ,4 ,mem_le_peer_mic 
+
+le_rx_match:
+3e28 2040644a call rf_debug_rx_crc_line 
+3e29 7836fc00 enable match 
+3e2a 793f8030 set0 mark_ble_crc_fail ,mark 
+
+le_crc_fail_tx:
+3e2b 44f1401c bpatch patch1c_2 ,mem_patch1c 
+3e2c 20406f09 call ccm_ctrl_clr 
+3e2d 6fe08198 fetch 1 ,mem_le_rx_phy 
+3e2e 7d3e7e07 nsetflag ble_coded_info ,bit_le_coded_phy_s8 ,pdata 
+3e2f 67e08198 store 1 ,mem_le_rx_phy 
+3e30 20403e33 call le_match_set_txfreq 
+
+le_match_set_sync_on:
+3e31 7846fc00 disable decode_fec0 
+3e32 20203925 branch set_sync_on 
+
+le_match_set_txfreq:
+3e33 44f1c01c bpatch patch1c_3 ,mem_patch1c 
+3e34 68488008 fetcht 1 ,mem_last_freq 
+3e35 1840a202 add temp ,2 ,rega 
+3e36 c516b98e bmark1 mark_ble_2m ,rf_tx_write_freq 
+3e37 1840a201 add temp ,1 ,rega 
+3e38 2020398e branch rf_tx_write_freq 
+
+le_dec_init:
+3e39 c6990000 rtnmark0 mark_ble_encryption 
+3e3a 20406fa4 call load_sk 
+3e3b 1800700c force regidx_result ,regext_index 
+3e3c 20406fac call aes_clear 
+3e3d 20206fab branch aes_clear_data 
+
+le_dec_start:
+3e3e 44f2401c bpatch patch1c_4 ,mem_patch1c 
+3e3f 70806c00 jam 0 ,core_ccm_aad0 
+3e40 70806d01 jam 1 ,core_ccm_aad1 
+3e41 6fe08047 fetch 1 ,mem_le_rxbuf_data_header 
+3e42 1fe17e03 and_into 0x3 ,pdata 
+3e43 67f0806e store 1 ,core_ccm_aad2 
+3e44 58000049 setarg mem_le_rxbuf_data_payload 
+3e45 67f10068 store 2 ,core_ccm_input_playload_addr 
+3e46 67f1006a store 2 ,core_ccm_output_playload_addr 
+3e47 6a208048 fetchr rega ,1 ,mem_le_rxbuf_data_length 
+3e48 1a20a3fc increase -4 ,rega 
+3e49 684ac402 fetcht 5 ,mem_ccm_pcnt_rx 
+3e4a 280ffe0f isolate1 mark_old_packet ,mark 
+3e4b 2040be52 call le_pcnt_rx_sub1 ,true 
+3e4c 20406e74 call ccm_b0 
+3e4d 58000000 setarg 0 
+3e4e 67f100c1 store 2 ,core_ccm_inptr 
+3e4f 70800a06 jam 6 ,core_ccm_ctrl 
+3e50 70800a07 jam 7 ,core_ccm_ctrl 
+3e51 20600000 rtn 
+
+le_pcnt_rx_sub1:
+3e52 18467c00 sub temp ,0 ,null 
+3e53 2022be57 branch le_pcnt_rx_sub1_0 ,zero 
+3e54 184085ff increase -1 ,temp 
+3e55 79200427 set1 le_ccm_directionbit ,temp 
+3e56 20600000 rtn 
+
+le_pcnt_rx_sub1_0:
+3e57 58ffffff setarg 0xffffff 
+3e58 1ff07e00 lshift16 pdata ,pdata 
+3e59 d840ffff arg 0xffff ,temp 
+3e5a 98418400 ior temp ,temp 
+3e5b 20600000 rtn 
+
+le_dec:
+3e5c 18a22400 copy contw ,regb 
+3e5d 6fe08048 fetch 1 ,mem_le_rxbuf_data_length 
+3e5e 1fe0fffc increase -4 ,pdata 
+3e5f 98467c00 isub temp ,null 
+3e60 20628000 rtn zero 
+3e61 605900c1 storet 2 ,core_ccm_inptr 
+3e62 1a420a00 copy regb ,contw 
+3e63 20600000 rtn 
+
+le_dec_end:
+3e64 09800020 parse demod ,bucket ,32 
+3e65 1fef7e00 rshift32 pdata ,pdata 
+3e66 1fecfe00 rshift8 pdata ,pdata 
+3e67 e7e20005 istore 4 ,contw 
+3e68 18a22400 copy contw ,regb 
+3e69 18007000 force regidx_data ,regext_index 
+3e6a 1fe25e00 copy pdata ,regext 
+3e6b 605900c1 storet 2 ,core_ccm_inptr 
+3e6c 20600000 rtn 
+
+le_mic_error:
+3e6d 20203e77 branch le_end_of_packet 
+
+le_retransmit_end_of_packet:
+3e6e 20403e88 call le_set_until_tx_timer 
+3e6f 204038cb call end_of_packet 
+3e70 20203e28 branch le_rx_match 
+
+le_crc_fail:
+3e71 2040644c call rf_debug_rx_crc_fail_line 
+3e72 c5183e75 bmark1 mark_ble_crc_fail ,le_crc_fail_consecutive 
+3e73 79200030 set1 mark_ble_crc_fail ,mark 
+3e74 20203e2b branch le_crc_fail_tx 
+
+le_unsync_end:
+
+le_crc_fail_consecutive:
+3e75 793f8030 set0 mark_ble_crc_fail ,mark 
+3e76 20203e77 branch le_end_of_packet 
+
+le_end_of_packet:
+3e77 44f2c01c bpatch patch1c_5 ,mem_patch1c 
+3e78 20406f09 call ccm_ctrl_clr 
+3e79 202038cb branch end_of_packet 
+
+calc_clke_all_modem:
+3e7a c517be80 bmark1 mark_ble_lr ,calc_clke_modem_coded 
+3e7b c516be84 bmark1 mark_ble_2m ,calc_clke_modem_2m 
+3e7c 6fe10041 fetch 2 ,mem_param_clke_cal_le_1m 
+3e7d 1fe25200 copy pdata ,clke_rt 
+3e7e 1c225000 copy bt_clk ,clke_bt 
+3e7f 20600000 rtn 
+
+calc_clke_modem_coded:
+3e80 6fe10045 fetch 2 ,mem_param_clke_cal_le_coded 
+3e81 1fe25200 copy pdata ,clke_rt 
+3e82 1c20d001 add bt_clk ,1 ,clke_bt 
+3e83 20600000 rtn 
+
+calc_clke_modem_2m:
+3e84 6fe10043 fetch 2 ,mem_param_clke_cal_le_2m 
+3e85 1fe25200 copy pdata ,clke_rt 
+3e86 1c225000 copy bt_clk ,clke_bt 
+3e87 20600000 rtn 
+
+le_set_until_tx_timer:
+3e88 6fe08048 fetch 1 ,mem_le_rxbuf_data_length 
+3e89 1fe08405 add pdata ,5 ,temp 
+3e8a 18498400 lshift3 temp ,temp 
+3e8b 6fe08198 fetch 1 ,mem_le_rx_phy 
+3e8c c517be8f bmark1 mark_ble_lr ,le_set_until_tx_timer_rx_lr 
+3e8d c2803e91 bbit1 bit_le_1m_phy ,le_set_until_tx_timer_rx_1m 
+3e8e c280be92 bbit1 bit_le_2m_phy ,le_set_until_tx_timer_rx_2m 
+
+le_set_until_tx_timer_rx_lr:
+3e8f 203e3e94 branch le_set_until_tx_timer_rx_coded_s2 ,ble_coded_info 
+3e90 20203e97 branch le_set_until_tx_timer_rx_coded_s8 
+
+le_set_until_tx_timer_rx_1m:
+3e91 20203e9c branch le_calc_stop_watch 
+
+le_set_until_tx_timer_rx_2m:
+3e92 18430400 rshift temp ,temp 
+3e93 20203e9c branch le_calc_stop_watch 
+
+le_set_until_tx_timer_rx_coded_s2:
+3e94 18408403 add temp ,3 ,temp 
+3e95 18438400 lshift temp ,temp 
+3e96 20203e99 branch le_set_until_tx_timer_rx_coded 
+
+le_set_until_tx_timer_rx_coded_s8:
+3e97 18408403 add temp ,3 ,temp 
+3e98 18498400 lshift3 temp ,temp 
+
+le_set_until_tx_timer_rx_coded:
+3e99 58000028 setarg param_coded_c1_term1_time_40us 
+3e9a 98408400 iadd temp ,temp 
+3e9b 20203e9c branch le_calc_stop_watch 
+
+le_calc_stop_watch:
+3e9c 6fe0c11d fetch 1 ,mem_system_clk 
+3e9d 984f8400 imul32 temp ,temp 
+3e9e da204e20 arg param_20ms_init ,rega 
+3e9f 9a2ffe00 imul32 rega ,pdata 
+3ea0 98460400 isub temp ,temp 
+3ea1 1b627e00 copy stop_watch ,pdata 
+3ea2 98463600 isub temp ,stop_watch 
+3ea3 20600000 rtn 
+
+le_transmit_receive_sifs_without_change_mode:
+3ea4 20403ebc call le_transmit 
+3ea5 68488008 fetcht 1 ,mem_last_freq 
+3ea6 20403954 call set_freq_rx 
+3ea7 2040396a call rf_rx_enable 
+3ea8 78287c00 enable swfine 
+3ea9 d960157c arg 5500 ,timeup 
+3eaa 20203dd3 branch le_receive_rxon 
+
+le_transmit_receive_sifs:
+3eab 44f3401c bpatch patch1c_6 ,mem_patch1c 
+3eac 6fe08199 fetch 1 ,mem_le_tx_phy 
+3ead 20403d16 call le_enable_phy_by_pdata 
+3eae 20403ebc call le_transmit 
+
+le_transmit_receive_sifs_notx:
+3eaf 6fe08198 fetch 1 ,mem_le_rx_phy 
+3eb0 20403d16 call le_enable_phy_by_pdata 
+3eb1 68488008 fetcht 1 ,mem_last_freq 
+3eb2 20403954 call set_freq_rx 
+3eb3 2040396a call rf_rx_enable 
+3eb4 78287c00 enable swfine 
+3eb5 d960157c arg 5500 ,timeup 
+3eb6 c597bdd3 bmark0 mark_ble_lr ,le_receive_rxon 
+3eb7 d9602134 arg 8500 ,timeup 
+3eb8 20203dd3 branch le_receive_rxon 
+
+le_transmit_norx:
+3eb9 44f3c01c bpatch patch1c_7 ,mem_patch1c 
+3eba 20403ebc call le_transmit 
+3ebb 202038cb branch end_of_packet 
+
+le_transmit:
+3ebc 44f4401d bpatch patch1d_0 ,mem_patch1d 
+3ebd 20403d3c call le_prep 
+3ebe 20403d4b call le_tx_setfreq 
+3ebf 20406451 call rf_debug_tx_on_line 
+3ec0 79202a00 set1 txgfsk ,radio_ctrl 
+3ec1 782efc00 enable encode_fec0 
+3ec2 78307c00 enable is_tx 
+3ec3 7850fc00 disable is_rx 
+3ec4 20403dc2 call le_wait_tx 
+3ec5 785d7c00 disable lr_s2en 
+3ec6 c517beff bmark1 mark_ble_lr ,le_transmit_lr 
+3ec7 c516bf11 bmark1 mark_ble_2m ,le_transmit_2m 
+3ec8 19317e00 rshift16 access ,pdata 
+3ec9 1fecfe00 rshift8 pdata ,pdata 
+3eca 1ff1fe00 rshift4 pdata ,pdata 
+3ecb 08008628 inject mod ,40 
+
+le_transmit_packet:
+3ecc 7823fc00 enable enable_white 
+3ecd 7824fc00 enable enable_crc 
+3ece 44f4c01d bpatch patch1d_1 ,mem_patch1d 
+3ecf 6fe0c129 fetch 1 ,mem_le_txheader 
+3ed0 08008608 inject mod ,8 
+3ed1 efe08006 ifetch 1 ,contr 
+3ed2 1fe27200 copy pdata ,loopcnt 
+3ed3 08008608 inject mod ,8 
+3ed4 1f267c00 sub loopcnt ,0 ,null 
+3ed5 2022bedd branch le_tr_nopayload ,zero 
+3ed6 6ff0800a fetch 1 ,core_ccm_ctrl 
+3ed7 203a3ed9 branch le_transmit_packet_not_enc ,blank 
+3ed8 c5193ef4 bmark1 mark_ble_encryption ,le_transmit_packet_enc 
+
+le_transmit_packet_not_enc:
+3ed9 d8c0412b arg mem_le_txpayload ,contr 
+
+le_tr_loop:
+3eda efe08006 ifetch 1 ,contr 
+3edb 08008608 inject mod ,8 
+3edc c2003eda loop le_tr_loop 
+
+le_tr_nopayload:
+3edd 78247c00 enable enable_parity 
+3ede 08008618 inject mod ,24 
+3edf 78447c00 disable enable_parity 
+3ee0 c597bee4 bmark0 mark_ble_lr ,le_transmit_skip 
+3ee1 7843fc00 disable enable_white 
+3ee2 58000000 setarg 0 
+3ee3 08008603 inject mod ,3 
+
+le_transmit_skip:
+3ee4 37d38200 until null ,tx_clear 
+3ee5 20000064 nop 100 
+3ee6 44f5401d bpatch patch1d_2 ,mem_patch1d 
+3ee7 784efc00 disable encode_fec0 
+3ee8 785c7c00 disable encode_fec3 
+3ee9 20403925 call set_sync_on 
+3eea 2040644f call rf_debug_tx_off_line 
+
+le_check_start_pause_enc:
+3eeb 6fe0c129 fetch 1 ,mem_le_txheader 
+3eec 1fe17e03 and pdata ,llid_le_ll ,pdata 
+3eed c1818000 rtnne llid_le_ll 
+3eee 6fe0c2d0 fetch 1 ,mem_le_enc_state 
+3eef c0013fd8 beq flag_le_enc_pause ,le_clear_enc 
+3ef0 c1828000 rtnne flag_le_send_start_enc_req 
+3ef1 6fe0c12b fetch 1 ,mem_le_txpayload 
+3ef2 c002bfd3 beq ll_start_enc_req ,le_set_enc 
+3ef3 20600000 rtn 
+
+le_transmit_packet_enc:
+3ef4 1f20f3fc increase -4 ,loopcnt 
+3ef5 1f220400 copy loopcnt ,temp 
+3ef6 20406ef4 call ccm_wait_enc 
+3ef7 d8c0412b arg mem_le_txpayload ,contr 
+
+le_transmit_packet_enc_loop:
+3ef8 efe08006 ifetch 1 ,contr 
+3ef9 08008608 inject mod ,8 
+3efa c2003ef8 loop le_transmit_packet_enc_loop 
+3efb 20406ef9 call ccm_check_enc_done 
+3efc 1de27e00 copy regext ,pdata 
+3efd 08008620 inject mod ,32 
+3efe 20203edd branch le_tr_nopayload 
+
+le_transmit_lr:
+3eff df20000a arg 10 ,loopcnt 
+
+le_transmit_lr_preamble_loop:
+3f00 5800003c setarg 0x3c 
+3f01 08008608 inject mod ,8 
+3f02 c2003f00 loop le_transmit_lr_preamble_loop 
+3f03 784efc00 disable encode_fec0 
+3f04 783c7c00 enable encode_fec3 
+3f05 19317e00 rshift16 access ,pdata 
+3f06 1ff17e00 rshift16 pdata ,pdata 
+3f07 1ff1fe00 rshift4 pdata ,pdata 
+3f08 08008620 inject mod ,32 
+3f09 c5173f0e bmark1 mark_ble_lr_s8 ,le_transmit_lr_s8 
+
+le_transmit_lr_s2:
+3f0a 58000001 setarg 1 
+3f0b 08008605 inject mod ,5 
+3f0c 783d7c00 enable lr_s2en 
+3f0d 20203ecc branch le_transmit_packet 
+
+le_transmit_lr_s8:
+3f0e 58000000 setarg 0 
+3f0f 08008605 inject mod ,5 
+3f10 20203ecc branch le_transmit_packet 
+
+le_transmit_2m:
+3f11 6fe0c11d fetch 1 ,mem_system_clk 
+3f12 1fe37200 rshift pdata ,loopcnt 
+
+le_transmit_2m_dealy:
+3f13 20000002 nop 2 
+3f14 c2003f13 loop le_transmit_2m_dealy 
+3f15 19317e00 rshift16 access ,pdata 
+3f16 1fecfe00 rshift8 pdata ,pdata 
+3f17 1ff18400 rshift4 pdata ,temp 
+3f18 18427e00 copy temp ,pdata 
+3f19 08008608 inject mod ,8 
+3f1a 18427e00 copy temp ,pdata 
+3f1b 08008628 inject mod ,40 
+3f1c 20203ecc branch le_transmit_packet 
+
+le_update_param:
+3f1d da603f21 arg le_update_param_ahead1_cb ,regc 
+3f1e da403f37 arg le_update_param_cb ,regb 
+3f1f d8e00005 arg lestate_update_param ,queue 
+3f20 20203f76 branch le_check_update_flag 
+
+le_update_param_ahead1_cb:
+3f21 1a208c04 add rega ,coffset_sniff_anchor ,contr 
+3f22 e8420006 ifetcht 4 ,contr 
+3f23 1a208c37 add rega ,coffest_le_new_transmitwindowsize ,contr 
+3f24 efe08006 ifetch 1 ,contr 
+3f25 1a208a2b add rega ,coffset_le_window_size ,contw 
+3f26 e7e08005 istore 1 ,contw 
+3f27 efe10006 ifetch 2 ,contr 
+3f28 1febfe00 lshift2 pdata ,pdata 
+3f29 98409600 iadd temp ,timeup 
+3f2a 1a208a04 add rega ,coffset_sniff_anchor ,contw 
+3f2b 19627e00 deposit timeup 
+3f2c e7e20005 istore 4 ,contw 
+3f2d efe10006 ifetch 2 ,contr 
+3f2e 1febfe00 lshift2 pdata ,pdata 
+3f2f 1a208a02 add rega ,coffset_tsniff ,contw 
+3f30 e7e10005 istore 2 ,contw 
+3f31 efe10006 ifetch 2 ,contr 
+3f32 1a208a2c add rega ,coffset_le_slave_latency ,contw 
+3f33 e7e10005 istore 2 ,contw 
+3f34 efe10006 ifetch 2 ,contr 
+3f35 67e142c8 store 2 ,mem_le_init_superto 
+3f36 202040b7 branch le_receive_window_size 
+
+le_update_param_cb:
+3f37 efe08011 ifetch 1 ,rega 
+3f38 793ffe03 set0 lestate_got_first_packet ,pdata 
+3f39 e7e08011 istore 1 ,rega 
+3f3a 622104d8 storer rega ,2 ,mem_rega 
+3f3b 7004c344 jam bt_evt_le_parse_conn_param_accepted ,mem_fifo_temp 
+3f3c 2040709b call ui_ipc_send_event 
+3f3d 6a2104d8 fetchr rega ,2 ,mem_rega 
+3f3e 20600000 rtn 
+
+le_update_channel_map:
+3f3f da600000 arg 0 ,regc 
+3f40 da403f43 arg le_update_channel_map_cb ,regb 
+3f41 d8e00006 arg lestate_update_map ,queue 
+3f42 20203f76 branch le_check_update_flag 
+
+le_update_channel_map_cb:
+3f43 1a208c37 add rega ,coffset_le_new_map ,contr 
+3f44 efe28006 ifetch 5 ,contr 
+3f45 1a208a30 add rega ,coffset_le_channel_map ,contw 
+3f46 e7e28005 istore 5 ,contw 
+3f47 20203d9e branch le_calc_channel_map 
+
+le_update_phy:
+3f48 da600000 arg 0 ,regc 
+3f49 da403f4c arg le_update_phy_cb ,regb 
+3f4a d8e00007 arg lestate_update_phy ,queue 
+3f4b 20203f76 branch le_check_update_flag 
+
+le_update_phy_cb:
+3f4c 1a208c37 add rega ,coffset_le_new_m2s_phy ,contr 
+3f4d efe08006 ifetch 1 ,contr 
+3f4e 20403f59 call le_update_phy_cb_m2s 
+3f4f e7e08005 istore 1 ,contw 
+3f50 1a208c38 add rega ,coffset_le_new_s2m_phy ,contr 
+3f51 efe08006 ifetch 1 ,contr 
+3f52 20403f67 call le_update_phy_cb_s2m 
+3f53 e7e08005 istore 1 ,contw 
+3f54 622104d8 storer rega ,2 ,mem_rega 
+3f55 7004c342 jam bt_evt_le_update_phy ,mem_fifo_temp 
+3f56 2040709b call ui_ipc_send_event 
+3f57 6a2104d8 fetchr rega ,2 ,mem_rega 
+3f58 20600000 rtn 
+
+le_update_phy_cb_m2s:
+3f59 205a3f61 call le_update_phy_cb_m2s_no_change ,blank 
+3f5a 1a208a35 add rega ,coffset_le_rx_phy ,contw 
+3f5b 24748000 nrtn master 
+3f5c 6848c376 fetcht 1 ,mem_le_tx_phys 
+3f5d 284ffe07 isolate1 bit_le_coded_phy_s8 ,temp 
+3f5e 7920fe07 setflag true ,bit_le_coded_phy_s8 ,pdata 
+3f5f 1a208a36 add rega ,coffset_le_tx_phy ,contw 
+3f60 20600000 rtn 
+
+le_update_phy_cb_m2s_no_change:
+3f61 1a208c35 add rega ,coffset_le_rx_phy ,contr 
+3f62 efe08006 ifetch 1 ,contr 
+3f63 24748000 nrtn master 
+3f64 1a208c36 add rega ,coffset_le_tx_phy ,contr 
+3f65 efe08006 ifetch 1 ,contr 
+3f66 20600000 rtn 
+
+le_update_phy_cb_s2m:
+3f67 205a3f70 call le_update_phy_cb_s2m_no_change ,blank 
+3f68 6848c376 fetcht 1 ,mem_le_tx_phys 
+3f69 284ffe07 isolate1 bit_le_coded_phy_s8 ,temp 
+3f6a 7920fe07 setflag true ,bit_le_coded_phy_s8 ,pdata 
+3f6b 1a208a36 add rega ,coffset_le_tx_phy ,contw 
+3f6c 24748000 nrtn master 
+3f6d 793ffe07 set0 bit_le_coded_phy_s8 ,pdata 
+3f6e 1a208a35 add rega ,coffset_le_rx_phy ,contw 
+3f6f 20600000 rtn 
+
+le_update_phy_cb_s2m_no_change:
+3f70 1a208c36 add rega ,coffset_le_tx_phy ,contr 
+3f71 efe08006 ifetch 1 ,contr 
+3f72 24748000 nrtn master 
+3f73 1a208c35 add rega ,coffset_le_rx_phy ,contr 
+3f74 efe08006 ifetch 1 ,contr 
+3f75 20600000 rtn 
+
+le_check_update_flag:
+3f76 44f5c01d bpatch patch1d_3 ,mem_patch1d 
+3f77 efe08011 ifetch 1 ,rega 
+3f78 afec0000 qisolate0 pdata 
+3f79 20608000 rtn true 
+3f7a 1a208c1a add rega ,coffset_le_event_cnt ,contr 
+3f7b e8410006 ifetcht 2 ,contr 
+3f7c 1a208c20 add rega ,coffset_le_instant ,contr 
+3f7d efe10006 ifetch 2 ,contr 
+3f7e 98467e00 isub temp ,pdata 
+3f7f 2022bf86 branch le_update ,zero 
+3f80 24213f8b nbranch le_check_update_small ,positive 
+3f81 1fe67c01 sub pdata ,1 ,null 
+3f82 2022bf84 branch le_update_ahead1 ,zero 
+3f83 20600000 rtn 
+
+le_update_ahead1:
+3f84 1a627e00 copy regc ,pdata 
+3f85 202075e6 branch callback_func 
+
+le_update:
+3f86 efe08011 ifetch 1 ,rega 
+3f87 f93ffe00 qset0 pdata 
+3f88 e7e08011 istore 1 ,rega 
+3f89 1a427e00 copy regb ,pdata 
+3f8a 202075e6 branch callback_func 
+
+le_check_update_small:
+3f8b 1a208c1a add rega ,coffset_le_event_cnt ,contr 
+3f8c efe10006 ifetch 2 ,contr 
+3f8d 1a208c20 add rega ,coffset_le_instant ,contr 
+3f8e efe10006 ifetch 2 ,contr 
+3f8f 98467e00 isub temp ,pdata 
+3f90 d840ffff arg 0xffff ,temp 
+3f91 98467c00 isub temp ,null 
+3f92 2022bf86 branch le_update ,zero 
+3f93 d840f000 arg 0xf000 ,temp 
+3f94 98467c00 isub temp ,null 
+3f95 24213f86 nbranch le_update ,positive 
+3f96 20600000 rtn 
+
+le_check_retransmit:
+3f97 6848817a fetcht 1 ,mem_le_arq 
+3f98 6fe08047 fetch 1 ,mem_le_rxbuf_data_header 
+3f99 1fe37e00 rshift pdata ,pdata 
+3f9a 9842fe00 ixor temp ,pdata 
+3f9b 2feffe02 isolate1 nesn ,pdata 
+3f9c 7920800f setflag true ,mark_old_packet ,mark 
+3f9d 20600000 rtn 
+
+le_acknowledge:
+3f9e 44f6401d bpatch patch1d_4 ,mem_patch1d 
+3f9f 204040b4 call le_supervision_flush 
+3fa0 c6180000 rtnmark1 mark_ble_crc_fail 
+3fa1 20403fc5 call le_check_wak 
+3fa2 6fe08047 fetch 1 ,mem_le_rxbuf_data_header 
+3fa3 2feffe04 isolate1 md ,pdata 
+3fa4 7920802a setflag true ,mark_ble_rx_md ,mark 
+3fa5 1fe37e00 rshift pdata ,pdata 
+3fa6 9842fe00 ixor temp ,pdata 
+3fa7 2feffe02 isolate1 nesn ,pdata 
+3fa8 7920800f setflag true ,mark_old_packet ,mark 
+3fa9 c6078000 rtnmark1 mark_old_packet 
+3faa 6fe08048 fetch 1 ,mem_le_rxbuf_data_length 
+3fab 203a3fb7 branch le_ack_unenc ,blank 
+3fac 6fe08163 fetch 1 ,mem_le_state 
+3fad c3023fb7 bbit0 lestate_encryption ,le_ack_unenc 
+3fae 684a014f fetcht 4 ,mem_le_peer_mic 
+3faf 6fe24407 fetch 4 ,mem_ccm_last_mic 
+3fb0 98467c00 isub temp ,null 
+3fb1 2022baba branch assert ,zero 
+3fb2 604a4407 storet 4 ,mem_ccm_last_mic 
+3fb3 6fe2c402 fetch 5 ,mem_ccm_pcnt_rx 
+3fb4 1fe0fe01 increase 1 ,pdata 
+3fb5 79207e27 set1 le_ccm_directionbit ,pdata 
+3fb6 67e2c402 store 5 ,mem_ccm_pcnt_rx 
+
+le_ack_unenc:
+3fb7 6848817a fetcht 1 ,mem_le_arq 
+3fb8 79400402 setflip nesn ,temp 
+3fb9 6048817a storet 1 ,mem_le_arq 
+3fba 6fe0c2f4 fetch 1 ,mem_le_configuration 
+3fbb c4030000 rtnbit0 bit_ble_deal_bb_packet 
+3fbc 44f6c01d bpatch patch1d_5 ,mem_patch1d 
+3fbd 6fe08048 fetch 1 ,mem_le_rxbuf_data_length 
+3fbe 207a0000 rtn blank 
+3fbf 6fe08047 fetch 1 ,mem_le_rxbuf_data_header 
+3fc0 2fe00601 compare llid_continue ,pdata ,3 
+3fc1 2020c5c5 branch le_parse_writing_attribute_continue ,true 
+3fc2 2fe00602 compare llid_start ,pdata ,3 
+3fc3 2020c5b3 branch le_parse_writing_attribute_start ,true 
+3fc4 20600000 rtn 
+
+le_check_wak:
+3fc5 44f7401d bpatch patch1d_6 ,mem_patch1d 
+3fc6 6848817a fetcht 1 ,mem_le_arq 
+3fc7 284c0005 isolate0 wak ,temp 
+3fc8 20608000 rtn true 
+3fc9 6fe08047 fetch 1 ,mem_le_rxbuf_data_header 
+3fca 1fe3fe00 lshift pdata ,pdata 
+3fcb 9842fe00 ixor temp ,pdata 
+3fcc c4018000 rtnbit0 sn 
+3fcd 793f8405 set0 wak ,temp 
+3fce 79400403 setflip sn ,temp 
+3fcf 6048817a storet 1 ,mem_le_arq 
+3fd0 28400603 compare 3 ,temp ,3 
+3fd1 24608000 nrtn true 
+3fd2 20600000 rtn 
+
+le_set_enc:
+3fd3 6fe08163 fetch 1 ,mem_le_state 
+3fd4 79207e04 set1 lestate_encryption ,pdata 
+3fd5 67e08163 store 1 ,mem_le_state 
+3fd6 79200032 set1 mark_ble_encryption ,mark 
+3fd7 20600000 rtn 
+
+le_clear_enc:
+3fd8 44f7c01d bpatch patch1d_7 ,mem_patch1d 
+3fd9 7042d000 jam flag_le_enc_null ,mem_le_enc_state 
+3fda dfe00000 arg 0 ,pdata 
+3fdb 67e24407 store 4 ,mem_ccm_last_mic 
+3fdc 67e2c3fd store 5 ,mem_ccm_pcnt_tx 
+3fdd 79207e27 set1 le_ccm_directionbit ,pdata 
+3fde 67e2c402 store 5 ,mem_ccm_pcnt_rx 
+3fdf 6fe08163 fetch 1 ,mem_le_state 
+3fe0 793ffe04 set0 lestate_encryption ,pdata 
+3fe1 67e08163 store 1 ,mem_le_state 
+3fe2 793f8032 set0 mark_ble_encryption ,mark 
+3fe3 20600000 rtn 
+
+le_scan_check_sender_addr_type:
+3fe4 da200001 arg 1 ,rega 
+3fe5 6fe08047 fetch 1 ,mem_le_rxbuf_adv_connect_ind_header 
+3fe6 c3830000 rtnbit1 le_sender_addr_bit 
+3fe7 da200000 arg 0 ,rega 
+3fe8 20600000 rtn 
+
+le_get_master_rx_max:
+3fe9 18c20a00 copy contr ,contw 
+3fea 68494378 fetcht 2 ,mem_remote_rx_max_octets 
+3feb 18a20c00 copy contw ,contr 
+3fec 20600000 rtn 
+
+le_prepare_tx:
+3fed 44f8401e bpatch patch1e_0 ,mem_patch1e 
+3fee 6fe0817a fetch 1 ,mem_le_arq 
+3fef c3828000 rtnbit1 wak 
+3ff0 2040400e call le_check_tx_md 
+3ff1 204041eb call le_fifo_get_first_tx_ptr 
+3ff2 203a4032 branch le_send_empty ,blank 
+3ff3 efe10006 ifetch 2 ,contr 
+3ff4 e8410006 ifetcht 2 ,contr 
+3ff5 18422200 copy temp ,rega 
+3ff6 9a267e00 isub rega ,pdata 
+3ff7 20403fe9 call le_get_master_rx_max 
+3ff8 2040762c call not_greater_than 
+3ff9 1fe20400 copy pdata ,temp 
+3ffa e8208006 ifetchr type ,1 ,contr 
+3ffb 1a227e00 copy rega ,pdata 
+3ffc 98c0fe00 iadd contr ,pdata 
+3ffd 67e104e3 store 2 ,mem_contr 
+3ffe 20404022 call le_update_tx_type 
+3fff 20404034 call le_send_packet 
+4000 204041eb call le_fifo_get_first_tx_ptr 
+4001 efe10006 ifetch 2 ,contr 
+4002 1fe22200 copy pdata ,rega 
+4003 18c22600 copy contr ,regc 
+4004 e8410006 ifetcht 2 ,contr 
+4005 18422400 copy temp ,regb 
+4006 9a467e00 isub regb ,pdata 
+4007 20403fe9 call le_get_master_rx_max 
+4008 2040762c call not_greater_than 
+4009 9a40fe00 iadd regb ,pdata 
+400a e7e10013 istore 2 ,regc 
+400b 9a267c00 isub rega ,null 
+400c 24628000 nrtn zero 
+400d 20204205 branch le_fifo_release_first_node 
+
+le_check_tx_md:
+400e 20404015 call le_check_continue 
+400f c6148000 rtnmark1 mark_ble_tx_md 
+4010 6fe0c2f4 fetch 1 ,mem_le_configuration 
+4011 c3014020 bbit0 bit_ble_transmit_packet_by_md ,le_clear_md 
+4012 204041ef call le_fifo_get_second_tx_ptr 
+4013 203a4020 branch le_clear_md ,blank 
+4014 2020401e branch le_set_md 
+
+le_check_continue:
+4015 204041eb call le_fifo_get_first_tx_ptr 
+4016 203a4020 branch le_clear_md ,blank 
+4017 efe10006 ifetch 2 ,contr 
+4018 e8410006 ifetcht 2 ,contr 
+4019 98462200 isub temp ,rega 
+401a 20403fe9 call le_get_master_rx_max 
+401b 18427e00 copy temp ,pdata 
+401c 9a267c00 isub rega ,null 
+401d 20214020 branch le_clear_md ,positive 
+
+le_set_md:
+401e 79200029 set1 mark_ble_tx_md ,mark 
+401f 20600000 rtn 
+
+le_clear_md:
+4020 793f8029 set0 mark_ble_tx_md ,mark 
+4021 20600000 rtn 
+
+le_update_tx_type:
+4022 1a227e00 copy rega ,pdata 
+4023 207a0000 rtn blank 
+4024 d8200001 arg llid_continue ,type 
+4025 20600000 rtn 
+
+le_att_check_notification_enable:
+4026 44f8c01e bpatch patch1e_1 ,mem_patch1e 
+4027 18408401 increase 1 ,temp 
+4028 204040e6 call le_att_get_handle_ptr 
+4029 18c08dfe increase -2 ,contr 
+402a efe10006 ifetch 2 ,contr 
+402b d8402902 arg client_charactertic_configuration ,temp 
+402c 98467c00 isub temp ,null 
+402d 24628000 nrtn zero 
+402e 18c08c01 increase 1 ,contr 
+402f 18c22200 copy contr ,rega 
+4030 efe08006 ifetch 1 ,contr 
+4031 20600000 rtn 
+
+le_send_empty:
+4032 18000400 force 0 ,temp 
+4033 18000201 force 1 ,type 
+
+le_send_packet:
+4034 44f9401e bpatch patch1e_2 ,mem_patch1e 
+4035 6048c12a storet 1 ,mem_le_txlen 
+4036 6848817a fetcht 1 ,mem_le_arq 
+4037 79200405 set1 wak ,temp 
+4038 18417efc and temp ,0xfc ,pdata 
+4039 9821fe00 ior type ,pdata 
+403a 67e0817a store 1 ,mem_le_arq 
+403b 1fe17e1f and_into 0x1f ,pdata 
+403c 280ffe29 isolate1 mark_ble_tx_md ,mark 
+403d 7920fe04 setflag true ,md ,pdata 
+403e 67e0c129 store 1 ,mem_le_txheader 
+403f 6fe0c129 fetch 1 ,mem_le_txheader 
+4040 28200601 compare 1 ,type ,3 
+4041 2420c044 nbranch le_send_no_txlen ,true 
+4042 6fe0c12a fetch 1 ,mem_le_txlen 
+4043 207a0000 rtn blank 
+
+le_send_no_txlen:
+4044 c519404a bmark1 mark_ble_encryption ,le_send_packet_enc 
+4045 6f20c12a fetchr loopcnt ,1 ,mem_le_txlen 
+4046 6fe104e3 fetch 2 ,mem_contr 
+4047 1fe20c00 copy pdata ,contr 
+4048 d8a0412b arg mem_le_txpayload ,contw 
+4049 2020753b branch memcpy_fast 
+
+le_send_packet_enc:
+404a 20406fa4 call load_sk 
+404b 20206edb branch le_encrypt_new_start 
+
+get_lpm_wake_ble_rx_lock:
+404c d8e00000 arg wake_lock_ble_rx ,queue 
+404d 20203c54 branch lpm_get_wake_lock 
+
+put_lpm_wake_ble_rx_lock:
+404e d8e00000 arg wake_lock_ble_rx ,queue 
+404f 20203c58 branch lpm_put_wake_lock 
+
+le_parse:
+4050 44f9c01e bpatch patch1e_3 ,mem_patch1e 
+4051 c6078000 rtnmark1 mark_old_packet 
+4052 c6180000 rtnmark1 mark_ble_crc_fail 
+4053 6fe08047 fetch 1 ,mem_le_rxbuf_data_header 
+4054 1fe17e03 and pdata ,0x3 ,pdata 
+4055 67e0c307 store 1 ,mem_le_packet_llid 
+4056 6fe08048 fetch 1 ,mem_le_rxbuf_data_length 
+4057 207a0000 rtn blank 
+4058 58000049 setarg mem_le_rxbuf_data_payload 
+4059 67e1430c store 2 ,mem_le_payload_ptr 
+405a 44fa401e bpatch patch1e_4 ,mem_patch1e 
+405b 6fe0c307 fetch 1 ,mem_le_packet_llid 
+405c c001c6ff beq llid_le_ll ,le_parse_ll 
+
+le_parse_l2cap:
+405d 2040406a call le_check_l2cap_complete 
+405e 2434404c nbranch get_lpm_wake_ble_rx_lock ,user 
+405f 2040404e call put_lpm_wake_ble_rx_lock 
+4060 58000000 setarg 0 
+4061 67e1430a store 2 ,mem_le_packet_len_recved 
+4062 6fe1430c fetch 2 ,mem_le_payload_ptr 
+4063 1fe08c02 add pdata ,2 ,contr 
+4064 44fac01e bpatch patch1e_5 ,mem_patch1e 
+4065 efe10006 ifetch 2 ,contr 
+4066 c0024362 beq le_l2cap_cid_att ,le_parse_att 
+4067 c0034616 beq le_l2cap_cid_smp ,le_parse_smp 
+4068 c002c5ea beq le_l2cap_cid_signal ,le_parse_signaling 
+4069 20600000 rtn 
+
+le_check_l2cap_complete:
+406a 6fe0c307 fetch 1 ,mem_le_packet_llid 
+406b c0014079 beq llid_start ,le_check_l2cap_llid_start 
+406c c000c090 beq llid_continue ,le_check_l2cap_llid_continue 
+406d 20600000 rtn 
+
+le_check_l2cap_cid_legal:
+406e 20407636 call enable_user 
+406f d8400004 arg le_l2cap_cid_att ,temp 
+4070 9fe67c00 isub pdata ,null 
+4071 20628000 rtn zero 
+4072 d8400005 arg le_l2cap_cid_signal ,temp 
+4073 9fe67c00 isub pdata ,null 
+4074 20628000 rtn zero 
+4075 d8400006 arg le_l2cap_cid_smp ,temp 
+4076 9fe67c00 isub pdata ,null 
+4077 20628000 rtn zero 
+4078 20207638 branch disable_user 
+
+le_check_l2cap_llid_start:
+4079 6fe1430c fetch 2 ,mem_le_payload_ptr 
+407a 1fe20c00 copy pdata ,contr 
+407b efe10006 ifetch 2 ,contr 
+407c 67e14308 store 2 ,mem_le_l2cap_size 
+407d efe10006 ifetch 2 ,contr 
+407e 2040406e call le_check_l2cap_cid_legal 
+407f 24740000 nrtn user 
+4080 68488048 fetcht 1 ,mem_le_rxbuf_data_length 
+4081 6049430a storet 2 ,mem_le_packet_len_recved 
+4082 6fe14308 fetch 2 ,mem_le_l2cap_size 
+4083 1fe0fe04 increase 4 ,pdata 
+4084 98467c00 isub temp ,null 
+4085 2022f636 branch enable_user ,zero 
+4086 6f208048 fetchr loopcnt ,1 ,mem_le_rxbuf_data_length 
+4087 d8a00f00 arg mem_le_l2cap_buf ,contw 
+4088 6fe1430c fetch 2 ,mem_le_payload_ptr 
+4089 1fe20c00 copy pdata ,contr 
+408a 2040753b call memcpy_fast 
+408b 20207638 branch disable_user 
+
+le_check_l2cap_continue_legal:
+408c 20407636 call enable_user 
+408d 6fe1430a fetch 2 ,mem_le_packet_len_recved 
+408e 247a0000 nrtn blank 
+408f 20207638 branch disable_user 
+
+le_check_l2cap_llid_continue:
+4090 2040408c call le_check_l2cap_continue_legal 
+4091 24740000 nrtn user 
+4092 6fe1430a fetch 2 ,mem_le_packet_len_recved 
+4093 d8a00f00 arg mem_le_l2cap_buf ,contw 
+4094 98a0a200 iadd contw ,rega 
+4095 68488048 fetcht 1 ,mem_le_rxbuf_data_length 
+4096 9840fe00 iadd temp ,pdata 
+4097 67e1430a store 2 ,mem_le_packet_len_recved 
+4098 6f208048 fetchr loopcnt ,1 ,mem_le_rxbuf_data_length 
+4099 1a220a00 copy rega ,contw 
+409a 6fe1430c fetch 2 ,mem_le_payload_ptr 
+409b 1fe20c00 copy pdata ,contr 
+409c 2040753b call memcpy_fast 
+409d 58000f00 setarg mem_le_l2cap_buf 
+409e 67e1430c store 2 ,mem_le_payload_ptr 
+409f 6fe14308 fetch 2 ,mem_le_l2cap_size 
+40a0 1fe0fe04 increase 4 ,pdata 
+40a1 6849430a fetcht 2 ,mem_le_packet_len_recved 
+40a2 98467c00 isub temp ,null 
+40a3 2022f636 branch enable_user ,zero 
+40a4 20207638 branch disable_user 
+
+le_get_search_att_uuid:
+40a5 204074d3 call store_contr 
+40a6 d8a0428d arg mem_le_search_uuid_length ,contw 
+40a7 202045ad branch le_get_search_common 
+
+le_writeatt_cb:
+40a8 6fe14394 fetch 2 ,mem_cb_att_write 
+40a9 202075e6 branch callback_func 
+
+le_supervision_update:
+40aa 44fb401e bpatch patch1e_6 ,mem_patch1e 
+40ab 684a017f fetcht 4 ,mem_le_supervision_timer 
+40ac 20403ab6 call get_clkbt 
+40ad 98461600 isub temp ,timeup 
+40ae 19627e00 deposit timeup 
+40af 68490191 fetcht 2 ,mem_le_superto 
+40b0 18520400 lshift4 temp ,temp 
+40b1 18438400 lshift temp ,temp 
+40b2 98467e00 isub temp ,pdata 
+40b3 20600000 rtn 
+
+le_supervision_flush:
+40b4 20403ab6 call get_clkbt 
+40b5 67e2017f store 4 ,mem_le_supervision_timer 
+40b6 20600000 rtn 
+
+le_receive_window_size:
+40b7 44fbc01e bpatch patch1e_7 ,mem_patch1e 
+40b8 1a208c50 add rega ,coffset_le_peer_sca ,contr 
+40b9 efe08006 ifetch 1 ,contr 
+40ba 20403d65 call le_sca_map 
+40bb 1a208c02 add rega ,coffset_tsniff ,contr 
+40bc efe10006 ifetch 2 ,contr 
+40bd 984ffe00 imul32 temp ,pdata 
+40be 6849003f fetcht 2 ,mem_param_rt_rthalfslot 
+40bf 984ffe00 imul32 temp ,pdata 
+40c0 d84f4240 arg 1000000 ,temp 
+40c1 9846fc00 idiv temp 
+40c2 d8400682 arg param_windown_size ,temp 
+40c3 6fe0c11d fetch 1 ,mem_system_clk 
+40c4 984f8400 imul32 temp ,temp 
+40c5 1a208c2b add rega ,coffset_le_window_size ,contr 
+40c6 efe08006 ifetch 1 ,contr 
+40c7 984ffe00 imul32 temp ,pdata 
+40c8 9840fe00 iadd temp ,pdata 
+40c9 67e242f0 store 4 ,mem_le_transmit_window 
+40ca 6fe1409b fetch 2 ,mem_rx_window_sniff 
+40cb 204075d0 call wait_div_end 
+40cc 18078400 quotient temp 
+40cd 9840fe00 iadd temp ,pdata 
+40ce 1a208a0e add rega ,coffset_rx_window ,contw 
+40cf e7e10005 istore 2 ,contw 
+40d0 20600000 rtn 
+
+le_init_attlist_search:
+40d1 44fc401f bpatch patch1f_0 ,mem_patch1f 
+40d2 6fe10506 fetch 2 ,mem_le_search_handle_start 
+40d3 98002400 iforce regb 
+40d4 6fe10508 fetch 2 ,mem_le_search_handle_end 
+40d5 98002600 iforce regc 
+40d6 6fe142ca fetch 2 ,mem_ui_le_uuid_table 
+40d7 98000c00 iforce contr 
+40d8 78347c00 enable user 
+40d9 20600000 rtn 
+
+le_att_handle_inrange:
+40da efe10006 ifetch 2 ,contr 
+40db 1fe17eff and_into 0xff ,pdata 
+40dc 207a0000 rtn blank 
+40dd 9a467c00 isub regb ,null 
+40de 24610000 nrtn positive 
+40df 9a667c00 isub regc ,null 
+40e0 20628000 rtn zero 
+40e1 202140e4 branch le_att_handle_blank ,positive 
+40e2 18007c01 force 1 ,null 
+40e3 20600000 rtn 
+
+le_att_handle_blank:
+40e4 18007e00 force 0 ,pdata 
+40e5 20600000 rtn 
+
+le_att_get_handle_ptr:
+40e6 204040e9 call le_att_get_handle_ptr2 
+40e7 2022c0f6 branch le_att_get_handle_ptr_found ,zero 
+40e8 20600000 rtn 
+
+le_att_get_handle_ptr2:
+40e9 44fcc01f bpatch patch1f_1 ,mem_patch1f 
+40ea 6fe142ca fetch 2 ,mem_ui_le_uuid_table 
+40eb 98000c00 iforce contr 
+
+le_att_get_handle_loop1:
+40ec efe10006 ifetch 2 ,contr 
+40ed 1fe17eff and_into 0xff ,pdata 
+40ee 207a0000 rtn blank 
+40ef 98467c00 isub temp ,null 
+40f0 20628000 rtn zero 
+40f1 efe08006 ifetch 1 ,contr 
+40f2 98c08c00 iadd contr ,contr 
+40f3 efe08006 ifetch 1 ,contr 
+40f4 98c08c00 iadd contr ,contr 
+40f5 202040ec branch le_att_get_handle_loop1 
+
+le_att_get_handle_ptr_found:
+40f6 efe08006 ifetch 1 ,contr 
+40f7 98c08c00 iadd contr ,contr 
+40f8 20600000 rtn 
+
+le_att_get_short_uuid_ptr:
+40f9 44fd401f bpatch patch1f_2 ,mem_patch1f 
+40fa 6fe142ca fetch 2 ,mem_ui_le_uuid_table 
+40fb 98000c00 iforce contr 
+
+le_att_get_short_uuid_loop:
+40fc efe10006 ifetch 2 ,contr 
+40fd 1fe17eff and_into 0xff ,pdata 
+40fe 207a0000 rtn blank 
+40ff efe08006 ifetch 1 ,contr 
+4100 98c08c00 iadd contr ,contr 
+4101 18c08dfe increase -2 ,contr 
+4102 efe10006 ifetch 2 ,contr 
+4103 98467c00 isub temp ,null 
+4104 20628000 rtn zero 
+4105 efe08006 ifetch 1 ,contr 
+4106 98c08c00 iadd contr ,contr 
+4107 202040fc branch le_att_get_short_uuid_loop 
+
+le_att_get_last_handle:
+4108 6fe142ca fetch 2 ,mem_ui_le_uuid_table 
+4109 98000c00 iforce contr 
+
+le_att_get_last_handle_loop:
+410a efe10006 ifetch 2 ,contr 
+410b 1fe17eff and_into 0xff ,pdata 
+410c 207a0000 rtn blank 
+410d 1fe08401 add pdata ,1 ,temp 
+410e efe08006 ifetch 1 ,contr 
+410f 98c08c00 iadd contr ,contr 
+4110 efe08006 ifetch 1 ,contr 
+4111 98c08c00 iadd contr ,contr 
+4112 18c20a00 copy contr ,contw 
+4113 2020410a branch le_att_get_last_handle_loop 
+
+le_att_get_handle_info_from_ptr:
+4114 6fe1051c fetch 2 ,mem_le_cur_attlist_start_ptr 
+4115 20204118 branch le_att_get_handle_info_fast 
+
+le_att_get_handle_info:
+4116 44fdc01f bpatch patch1f_3 ,mem_patch1f 
+4117 6fe142ca fetch 2 ,mem_ui_le_uuid_table 
+
+le_att_get_handle_info_fast:
+4118 98000c00 iforce contr 
+
+le_att_get_handle_loop:
+4119 efe10006 ifetch 2 ,contr 
+411a 1fe17eff and_into 0xff ,pdata 
+411b 203a4123 branch le_att_unfind_handle ,blank 
+411c 98467c00 isub temp ,null 
+411d 2022c124 branch le_att_finded_handle ,zero 
+411e efe08006 ifetch 1 ,contr 
+411f 98c08c00 iadd contr ,contr 
+4120 efe08006 ifetch 1 ,contr 
+4121 98c08c00 iadd contr ,contr 
+4122 20204119 branch le_att_get_handle_loop 
+
+le_att_unfind_handle:
+4123 20207644 branch disable_blank 
+
+le_att_finded_handle:
+4124 efe08006 ifetch 1 ,contr 
+4125 67e08522 store 1 ,mem_le_cur_uuid_length 
+4126 1fe27200 copy pdata ,loopcnt 
+4127 d8a00523 arg mem_le_cur_uuid ,contw 
+4128 2040753b call memcpy_fast 
+4129 efe08006 ifetch 1 ,contr 
+412a 67e0851b store 1 ,mem_le_curr_att_len 
+412b 204074d3 call store_contr 
+412c 20207646 branch enable_blank 
+
+le_modified_name:
+412d 44fe401f bpatch patch1f_4 ,mem_patch1f 
+412e 20404130 call le_modified_name_att_list 
+412f 20204142 branch le_modified_name_adv 
+
+le_modified_name_att_list:
+4130 d8402a00 arg uuid_chrctr_device_name ,temp 
+4131 204040f9 call le_att_get_short_uuid_ptr 
+4132 207a0000 rtn blank 
+4133 efe08006 ifetch 1 ,contr 
+4134 18c20a00 copy contr ,contw 
+4135 6848c22b fetcht 1 ,mem_le_name_len 
+4136 18427200 copy temp ,loopcnt 
+4137 98467c00 isub temp ,null 
+4138 2421413f nbranch le_name_length_longer_than_att ,positive 
+4139 98460400 isub temp ,temp 
+413a d8c0422c arg mem_le_name ,contr 
+413b 2040753b call memcpy_fast 
+413c 18427200 copy temp ,loopcnt 
+413d 2442c17a ncall memcpy_empty ,zero 
+413e 20600000 rtn 
+
+le_name_length_longer_than_att:
+413f 1fe27200 copy pdata ,loopcnt 
+4140 d8c0422c arg mem_le_name ,contr 
+4141 2020753b branch memcpy_fast 
+
+le_modified_name_adv:
+4142 da60433b arg mem_le_adv_data_len + 32 ,regc 
+4143 da20431c arg mem_le_adv_data ,rega 
+4144 2040414f call le_modified_name_adv_and_scan 
+4145 58000000 setarg 0 
+4146 79347e00 setflag user ,0 ,pdata 
+4147 67e084c4 store 1 ,mem_pdatatemp 
+4148 da60435b arg mem_le_scan_data_len + 32 ,regc 
+4149 da20433c arg mem_le_scan_data ,rega 
+414a 2040414f call le_modified_name_adv_and_scan 
+414b 20740000 rtn user 
+414c 6fe084c4 fetch 1 ,mem_pdatatemp 
+414d 203a3aba branch assert ,blank 
+414e 20600000 rtn 
+
+le_modified_name_adv_and_scan:
+414f 44fec01f bpatch patch1f_5 ,mem_patch1f 
+4150 20407636 call enable_user 
+4151 20407515 call clear_temp_block 
+4152 da400000 arg 0 ,regb 
+4153 d8a004f7 arg mem_le_data_temp ,contw 
+4154 20404169 call le_modified_name_adv_loop 
+4155 6fe0c22b fetch 1 ,mem_le_name_len 
+4156 1fe08401 add pdata ,1 ,temp 
+4157 9a40a200 iadd regb ,rega 
+4158 1a20a202 increase 2 ,rega 
+4159 1a267c1f sub rega ,0x1f ,null 
+415a 24214167 nbranch le_modified_name_adv_and_scan_name_overflow ,positive 
+415b e0408005 istoret 1 ,contw 
+415c d8400009 arg gap_adtype_local_name_complete ,temp 
+415d e0408005 istoret 1 ,contw 
+415e 98007200 iforce loopcnt 
+415f 2040753b call memcpy_fast 
+4160 1a222400 copy rega ,regb 
+
+le_modified_name_adv_and_scan_store_data:
+4161 1a427e00 deposit regb 
+4162 67e084f6 store 1 ,mem_le_data_len_temp 
+4163 d8c004f6 arg mem_le_data_len_temp ,contr 
+4164 5fffffe0 setarg -32 
+4165 9a608a00 iadd regc ,contw 
+4166 202074f3 branch memcpy32 
+
+le_modified_name_adv_and_scan_name_overflow:
+4167 20407638 call disable_user 
+4168 20204161 branch le_modified_name_adv_and_scan_store_data 
+
+le_modified_name_adv_loop:
+4169 efe08011 ifetch 1 ,rega 
+416a 207a0000 rtn blank 
+416b 1fe0fe01 pincrease 1 
+416c e8408006 ifetcht 1 ,contr 
+416d 18467c09 sub temp ,gap_adtype_local_name_complete ,null 
+416e 2022c178 branch le_modified_name_adv_found_name ,zero 
+416f 9a40a400 iadd regb ,regb 
+4170 1a220c00 copy rega ,contr 
+4171 98007200 iforce loopcnt 
+4172 2040753b call memcpy_fast 
+4173 18c22200 copy contr ,rega 
+
+le_modified_name_adv_loop2:
+4174 1a227e00 deposit rega 
+4175 9a667c00 isub regc ,null 
+4176 20610000 rtn positive 
+4177 20204169 branch le_modified_name_adv_loop 
+
+le_modified_name_adv_found_name:
+4178 9a20a200 iadd rega ,rega 
+4179 20204174 branch le_modified_name_adv_loop2 
+
+memcpy_empty:
+417a 58000020 setarg space 
+417b e7e08005 istore 1 ,contw 
+417c c200417a loop memcpy_empty 
+417d 20600000 rtn 
+
+le_lpm_set_mult:
+417e 44ff401f bpatch patch1f_6 ,mem_patch1f 
+417f 7855fc00 disable wake 
+4180 20374182 branch le_lpm_set_mult_attempt ,attempt 
+4181 2436c191 nbranch le_lpm_lost ,match 
+
+le_lpm_set_mult_attempt:
+4182 20403c02 call lpm_match 
+4183 6fe1409b fetch 2 ,mem_rx_window_sniff 
+4184 67e10171 store 2 ,mem_le_receive_window 
+4185 6fe0c2f4 fetch 1 ,mem_le_configuration 
+4186 c282bc10 bbit1 bit_ble_short_mult ,lpm_mult_short 
+4187 c507bc10 bmark1 mark_old_packet ,lpm_mult_short 
+4188 6fe08048 fetch 1 ,mem_le_rxbuf_data_length 
+4189 243a3c10 nbranch lpm_mult_short ,blank 
+418a 6fe0c12a fetch 1 ,mem_le_txlen 
+418b 243a3c10 nbranch lpm_mult_short ,blank 
+418c 6fe08163 fetch 1 ,mem_le_state 
+418d c282bc10 bbit1 lestate_update_param ,lpm_mult_short 
+418e c283bc10 bbit1 lestate_update_phy ,lpm_mult_short 
+418f c2833c10 bbit1 lestate_update_map ,lpm_mult_short 
+4190 20203bf8 branch lpm_mult_wait_timeout 
+
+le_lpm_lost:
+4191 6fe0c0a9 fetch 1 ,mem_sniff_unint_lost 
+4192 1fe67c1e sub pdata ,30 ,null 
+4193 24213c07 nbranch lpm_lost ,positive 
+4194 6849409b fetcht 2 ,mem_rx_window_sniff 
+4195 18430400 rshift temp ,temp 
+4196 6fe10171 fetch 2 ,mem_le_receive_window 
+4197 9840fe00 iadd temp ,pdata 
+4198 67e10171 store 2 ,mem_le_receive_window 
+4199 20203c07 branch lpm_lost 
+
+le_set_config_fixed_tk:
+419a d8e00000 arg bit_ble_passkey_fixed_key ,queue 
+419b 202041b2 branch le_set_config 
+
+le_clr_config_fixed_tk:
+419c d8e00000 arg bit_ble_passkey_fixed_key ,queue 
+419d 202041b6 branch le_clr_config 
+
+le_set_config_fixed_ltk:
+419e d8e00001 arg bit_ble_pairing_fixed_ltk ,queue 
+419f 202041b2 branch le_set_config 
+
+le_clr_config_fixed_ltk:
+41a0 d8e00001 arg bit_ble_pairing_fixed_ltk ,queue 
+41a1 202041b6 branch le_clr_config 
+
+le_set_config_more_data:
+41a2 d8e00002 arg bit_ble_transmit_packet_by_md ,queue 
+41a3 202041b2 branch le_set_config 
+
+le_clr_config_more_data:
+41a4 d8e00002 arg bit_ble_transmit_packet_by_md ,queue 
+41a5 202041b6 branch le_clr_config 
+
+le_set_config_read_authentication:
+41a6 d8e00003 arg bit_ble_read_auth ,queue 
+41a7 202041b2 branch le_set_config 
+
+le_clr_config_read_authentication:
+41a8 d8e00003 arg bit_ble_read_auth ,queue 
+41a9 202041b6 branch le_clr_config 
+
+le_set_config_write_authentication:
+41aa d8e00004 arg bit_ble_write_auth ,queue 
+41ab 202041b2 branch le_set_config 
+
+le_clr_config_write_authentication:
+41ac d8e00004 arg bit_ble_write_auth ,queue 
+41ad 202041b6 branch le_clr_config 
+
+le_set_config_short_mult:
+41ae d8e00005 arg bit_ble_short_mult ,queue 
+41af 202041b2 branch le_set_config 
+
+le_clr_config_short_mult:
+41b0 d8e00005 arg bit_ble_short_mult ,queue 
+41b1 202041b6 branch le_clr_config 
+
+le_set_config:
+41b2 6fe0c2f4 fetch 1 ,mem_le_configuration 
+41b3 f9207e00 qset1 pdata 
+41b4 67e0c2f4 store 1 ,mem_le_configuration 
+41b5 20600000 rtn 
+
+le_clr_config:
+41b6 6fe0c2f4 fetch 1 ,mem_le_configuration 
+41b7 f93ffe00 qset0 pdata 
+41b8 67e0c2f4 store 1 ,mem_le_configuration 
+41b9 20600000 rtn 
+
+le_set_fixed_ltk:
+41ba 58112233 setarg 0x112233 
+41bb 67e1c2f5 store 3 ,mem_le_fixed_ltk 
+41bc 58445566 setarg 0x445566 
+41bd e7e18005 istore 3 ,contw 
+41be 58778899 setarg 0x778899 
+41bf e7e18005 istore 3 ,contw 
+41c0 58001122 setarg 0x001122 
+41c1 e7e18005 istore 3 ,contw 
+41c2 58334455 setarg 0x334455 
+41c3 e7e18005 istore 3 ,contw 
+41c4 58000066 setarg 0x66 
+41c5 e7e08005 istore 1 ,contw 
+41c6 20600000 rtn 
+
+le_set_justwork:
+41c7 59000302 setarg 0x01000302 
+41c8 67e24284 store 4 ,mem_le_pres 
+41c9 58010010 setarg 0x010010 
+41ca 67e1c288 store 3 ,mem_le_pres_max_keysize 
+41cb 7042d101 jam 1 ,mem_le_pairing_mode 
+41cc 20600000 rtn 
+
+le_fifo_malloc_tx_empty:
+41cd da200000 arg 0 ,rega 
+41ce d8200001 arg llid_empty ,type 
+41cf 202041e0 branch le_fifo_malloc_tx 
+
+le_fifo_malloc_tx_ll:
+41d0 44ffc01f bpatch patch1f_7 ,mem_patch1f 
+41d1 d8200003 arg llid_le_ll ,type 
+41d2 204041e0 call le_fifo_malloc_tx 
+41d3 1a427e00 copy regb ,pdata 
+41d4 e7e08005 istore 1 ,contw 
+41d5 20600000 rtn 
+
+le_fifo_malloc_tx_l2cap:
+41d6 47004020 bpatchx patch20_0 ,mem_patch20 
+41d7 18000202 force llid_start ,type 
+41d8 1a20a204 increase 4 ,rega 
+41d9 204041e0 call le_fifo_malloc_tx 
+41da 1a20a3fc increase -4 ,rega 
+41db 1a227e00 copy rega ,pdata 
+41dc e7e10005 istore 2 ,contw 
+41dd 1a427e00 copy regb ,pdata 
+41de e7e10005 istore 2 ,contw 
+41df 20600000 rtn 
+
+le_fifo_malloc_tx:
+41e0 4700c020 bpatchx patch20_1 ,mem_patch20 
+41e1 1a20a205 increase 5 ,rega 
+41e2 20406654 call ble_l2cap_malloc 
+41e3 1a20a3fb increase -5 ,rega 
+41e4 1a227e00 copy rega ,pdata 
+41e5 e7e10005 istore 2 ,contw 
+41e6 58000000 setarg 0 
+41e7 e7e10005 istore 2 ,contw 
+41e8 18227e00 copy type ,pdata 
+41e9 e7e08005 istore 1 ,contw 
+41ea 20600000 rtn 
+
+le_fifo_get_first_tx_ptr:
+41eb 47014020 bpatchx patch20_2 ,mem_patch20 
+41ec 2040668e call l2cap_malloc_fifo_out 
+41ed 1fe20c00 copy pdata ,contr 
+41ee 20600000 rtn 
+
+le_fifo_get_second_tx_ptr:
+41ef 6fe143f6 fetch 2 ,mem_tx_fifo2_ptr 
+41f0 20600000 rtn 
+
+le_fifo_get_last_tx_ptr:
+41f1 204041f4 call le_fifo_get_last_tx_ptr0 
+41f2 1fe20c00 copy pdata ,contr 
+41f3 20600000 rtn 
+
+le_fifo_get_last_tx_ptr0:
+41f4 6fe143f9 fetch 2 ,mem_tx_fifo3_ptr 
+41f5 20600000 rtn 
+
+le_fifo_get_first_l2cap_ptr:
+41f6 204041eb call le_fifo_get_first_tx_ptr 
+41f7 18c08c05 increase 5 ,contr 
+41f8 20600000 rtn 
+
+le_fifo_get_first_att_ptr:
+41f9 204041eb call le_fifo_get_first_tx_ptr 
+41fa 18c08c09 increase 9 ,contr 
+41fb 20600000 rtn 
+
+le_fifo_get_last_att_ptr:
+41fc 204041f1 call le_fifo_get_last_tx_ptr 
+41fd 18c08c09 increase 9 ,contr 
+41fe 20600000 rtn 
+
+le_fifo_get_last_l2cap_ptr:
+41ff 204041f1 call le_fifo_get_last_tx_ptr 
+4200 18c08c05 increase 5 ,contr 
+4201 20600000 rtn 
+
+le_fifo_check_full:
+4202 202066a4 branch l2cap_malloc_is_fifo_full 
+
+le_fifo_check_nearly_full:
+4203 202066a7 branch l2cap_malloc_is_fifo_nearly_full 
+
+le_fifo_check_empty:
+4204 202066aa branch l2cap_malloc_is_fifo_empty 
+
+le_fifo_release_first_node:
+4205 20206693 branch l2cap_malloc_free 
+
+le_set_dle:
+4206 67e44380 store 8 ,mem_local_rx_max_octets 
+4207 20204217 branch le_set_feature_data_packet_length_extension 
+
+le_set_phys:
+4208 184122ff and temp ,0xff ,rega 
+4209 2040420d call le_set_tx_phy 
+420a 184ca200 rshift8 temp ,rega 
+
+le_set_rx_phy:
+420b 6220c377 storer rega ,1 ,mem_le_rx_phys 
+420c 2020420e branch le_set_phy_common 
+
+le_set_tx_phy:
+420d 6220c376 storer rega ,1 ,mem_le_tx_phys 
+
+le_set_phy_common:
+420e 2a2ffe01 isolate1 bit_le_2m_phy ,rega 
+420f 2040c213 call le_set_feature_2m_phy ,true 
+4210 2a2ffe02 isolate1 bit_le_coded_phy ,rega 
+4211 2040c215 call le_set_feature_coded_phy ,true 
+4212 20600000 rtn 
+
+le_set_feature_2m_phy:
+4213 d8e00008 arg bit_ll_feature_le_2m_phy ,queue 
+4214 20204218 branch le_set_feature 
+
+le_set_feature_coded_phy:
+4215 d8e0000b arg bit_ll_feature_le_coded_phy ,queue 
+4216 20204218 branch le_set_feature 
+
+le_set_feature_data_packet_length_extension:
+4217 d8e00005 arg bit_ll_feature_le_data_packet_length_extension ,queue 
+
+le_set_feature:
+4218 6fe4436e fetch 8 ,mem_le_local_feature 
+4219 f9207e00 qset1 pdata 
+421a 67e4436e store 8 ,mem_le_local_feature 
+421b 20600000 rtn 
+
+le_advertising_dispatch:
+421c 70019801 jam fun_rx_ll_1m_phy ,mem_le_rx_phy 
+421d 70019901 jam fun_tx_ll_1m_phy ,mem_le_tx_phy 
+421e 20403d2f call le_enable 
+421f 20404222 call le_scan 
+4220 2040429f call le_adv 
+4221 20203d36 branch le_disable 
+
+le_scan:
+4222 4701c020 bpatchx patch20_3 ,mem_patch20 
+4223 6fe0c316 fetch 1 ,mem_le_scan_enable 
+4224 c1808000 rtnne le_scan_enable 
+4225 d8e00002 arg le_scan_interval_timer ,queue 
+4226 2040755d call timer_check 
+4227 247a0000 nrtn blank 
+4228 6fe14317 fetch 2 ,mem_le_scan_interval 
+4229 68494319 fetcht 2 ,mem_le_scan_window 
+422a 98467e00 isub temp ,pdata 
+422b d8e00002 arg le_scan_interval_timer ,queue 
+422c 2040754f call timer_init 
+422d 7854fc00 disable master 
+422e 204042c9 call le_init_adv 
+422f 20404241 call le_wait_adv 
+4230 24768000 nrtn match 
+4231 47024020 bpatchx patch20_4 ,mem_patch20 
+4232 6fe30049 fetch 6 ,mem_le_rxbuf + 2 
+4233 67e30173 store 6 ,mem_le_plap 
+4234 6fe08002 fetch 1 ,mem_le_adv_rcv 
+4235 1fe0fe01 increase 1 ,pdata 
+4236 67e08002 store 1 ,mem_le_adv_rcv 
+4237 20404248 call le_create_conn 
+4238 20748000 rtn master 
+4239 204042f0 call le_send_scan_request 
+423a 24768000 nrtn match 
+423b 6fe08004 fetch 1 ,mem_le_scanrsp_rcv 
+423c 1fe0fe01 increase 1 ,pdata 
+423d 67e08004 store 1 ,mem_le_scanrsp_rcv 
+423e 6fe4804f fetch 9 ,mem_le_rxbuf + 8 
+423f 67e484f6 store 9 ,mem_temp_block0 
+4240 20600000 rtn 
+
+le_wait_adv:
+4241 4702c020 bpatchx patch20_5 ,mem_patch20 
+4242 2040433b call le_next_adv_channel 
+4243 20403dc8 call le_receive_adv 
+4244 6fe08001 fetch 1 ,mem_le_adv_waitcnt 
+4245 1fe0fe01 increase 1 ,pdata 
+4246 67e08001 store 1 ,mem_le_adv_waitcnt 
+4247 20600000 rtn 
+
+le_create_conn:
+4248 47034020 bpatchx patch20_6 ,mem_patch20 
+4249 6fe081b7 fetch 1 ,mem_cmd_le_create_conn 
+424a c18d8000 rtnne hci_cmd_le_create_conn 
+424b 6fe30173 fetch 6 ,mem_le_plap 
+424c 684b429f fetcht 6 ,mem_le_conn_peer_addr 
+424d 98467c00 isub temp ,null 
+424e 24628000 nrtn zero 
+424f 20403852 call context_new 
+4250 24628000 nrtn zero 
+4251 20404258 call le_connect_request 
+4252 20403c8f call le_init_master 
+4253 70410d00 jam 0 ,mem_hci_cmd 
+4254 7001b300 jam 0 ,mem_le_peer_sca 
+4255 70431600 jam 0 ,mem_le_scan_enable 
+4256 7001b700 jam 0 ,mem_cmd_le_create_conn 
+4257 2020383d branch context_save 
+
+le_connect_request:
+4258 4703c020 bpatchx patch20_7 ,mem_patch20 
+4259 18007fff force -1 ,pdata 
+425a 38080001 setsect 2 ,1 
+425b 67e28193 store 5 ,mem_le_channel_map 
+425c da200163 arg mem_le_state ,rega 
+425d 20403d9e call le_calc_channel_map 
+425e 18007204 force 4 ,loopcnt 
+425f d8a00187 arg mem_le_access ,contw 
+4260 20407662 call generate_random_loop 
+4261 6fe142ac fetch 2 ,mem_le_timeout 
+4262 67e10191 store 2 ,mem_le_superto 
+
+le_con_req_hop_retry:
+4263 180a7e00 random pdata 
+4264 1fe17e0f and_into 0xf ,pdata 
+4265 1fe67c04 sub pdata ,4 ,null 
+4266 20214263 branch le_con_req_hop_retry ,positive 
+4267 67e0817c store 1 ,mem_le_hop 
+4268 47044021 bpatchx patch21_0 ,mem_patch21 
+4269 68494127 fetcht 2 ,mem_le_conn_interval 
+426a 60490165 storet 2 ,mem_le_tsniff 
+426b 18422600 copy temp ,regc 
+426c 1c40fe07 add clkn_bt ,7 ,pdata 
+426d 9a66fc00 idiv regc 
+426e 204075d0 call wait_div_end 
+426f 18072200 remainder rega 
+4270 9a267e00 isub rega ,pdata 
+4271 9a60fe00 iadd regc ,pdata 
+4272 68494125 fetcht 2 ,mem_le_dsniff 
+4273 9840fe00 iadd temp ,pdata 
+4274 67e20167 store 4 ,mem_le_anchor 
+4275 9c462200 isub clkn_bt ,rega 
+4276 1a20a3fa increase -6 ,rega 
+4277 da402205 arg 0x2205 ,regb 
+4278 6fe0c2a5 fetch 1 ,mem_le_conn_own_addr_type 
+4279 7d3a2406 nsetflag blank ,le_sender_addr_bit ,regb 
+427a 6fe0c29e fetch 1 ,mem_le_conn_peer_addr_type 
+427b 7d3a2407 nsetflag blank ,le_receiver_addr_bit ,regb 
+427c 1a427e00 copy regb ,pdata 
+427d 67e14129 store 2 ,mem_le_txheader 
+427e 6fe342ae fetch 6 ,mem_le_lap 
+427f e7e30005 istore 6 ,contw 
+4280 6fe30173 fetch 6 ,mem_le_plap 
+4281 e7e30005 istore 6 ,contw 
+4282 6fe20187 fetch 4 ,mem_le_access 
+4283 e7e20005 istore 4 ,contw 
+4284 180a7e00 random pdata 
+4285 e7e10005 istore 2 ,contw 
+4286 180a7e00 random pdata 
+4287 e7e08005 istore 1 ,contw 
+4288 18007e02 force 2 ,pdata 
+4289 e7e08005 istore 1 ,contw 
+428a 1a2b7e00 rshift2 rega ,pdata 
+428b e7e10005 istore 2 ,contw 
+428c 1a6b7e00 rshift2 regc ,pdata 
+428d e7e10005 istore 2 ,contw 
+428e 4704c021 bpatchx patch21_1 ,mem_patch21 
+428f 58000000 setarg 0 
+4290 e7e10005 istore 2 ,contw 
+4291 6fe142ac fetch 2 ,mem_le_timeout 
+4292 e7e10005 istore 2 ,contw 
+4293 6fe28193 fetch 5 ,mem_le_channel_map 
+4294 e7e28005 istore 5 ,contw 
+4295 6fe0817c fetch 1 ,mem_le_hop 
+4296 d84000a0 arg param_le_sca ,temp 
+4297 9841fe00 ior temp ,pdata 
+4298 e7e08005 istore 1 ,contw 
+4299 20403eb9 call le_transmit_norx 
+429a 58004129 setarg mem_le_txheader 
+429b 1fe08c12 add pdata ,18 ,contr 
+429c efe18006 ifetch 3 ,contr 
+429d 67e1818b store 3 ,mem_le_crcinit 
+429e 20600000 rtn 
+
+le_adv:
+429f 70000724 jam 36 ,mem_le_ch_mapped 
+42a0 7004f600 jam 0 ,mem_le_adv_channel_map_temp 
+42a1 204042c3 call le_send_adv_protect_txbuf 
+42a2 204042a4 call le_adv_loop 
+42a3 202042c6 branch le_send_adv_recover_txbuf 
+
+le_adv_loop:
+42a4 47054021 bpatchx patch21_2 ,mem_patch21 
+42a5 6fe0c35b fetch 1 ,mem_le_adv_enable 
+42a6 207a0000 rtn blank 
+42a7 d8e00000 arg le_adv_interval_timer ,queue 
+42a8 2040755d call timer_check 
+42a9 247a0000 nrtn blank 
+42aa 78287c00 enable swfine 
+42ab 204042c9 call le_init_adv 
+42ac 2040433b call le_next_adv_channel 
+42ad 204042d2 call le_send_adv_ind 
+42ae 2436c2b6 nbranch le_adv_not_match ,match 
+42af 6fe08003 fetch 1 ,mem_le_req_rcv 
+42b0 1fe0fe01 increase 1 ,pdata 
+42b1 67e08003 store 1 ,mem_le_req_rcv 
+42b2 6fe08047 fetch 1 ,mem_le_rxbuf_adv_header 
+42b3 1fe17e0f and pdata ,0x0f ,pdata 
+42b4 c001c301 beq scan_req ,le_send_scan_response 
+42b5 c002c313 beq connect_req ,le_parse_connect_req 
+
+le_adv_not_match:
+42b6 4705c021 bpatchx patch21_3 ,mem_patch21 
+42b7 6fe084f6 fetch 1 ,mem_le_adv_channel_map_temp 
+42b8 6848c366 fetcht 1 ,mem_le_adv_channel_map 
+42b9 98467c00 isub temp ,null 
+42ba 2422c2a4 nbranch le_adv_loop ,zero 
+42bb 180a7e00 random pdata 
+42bc d84001ff arg 0x1ff ,temp 
+42bd 98417e00 iand temp ,pdata 
+42be 1fe0fefa add pdata ,250 ,pdata 
+42bf 204074f7 call delay 
+42c0 d8e00000 arg le_adv_interval_timer ,queue 
+42c1 6fe1435c fetch 2 ,mem_le_adv_interval 
+42c2 2020754f branch timer_init 
+
+le_send_adv_protect_txbuf:
+42c3 d8a00506 arg mem_le_tx_buf_temp ,contw 
+42c4 d8c04129 arg mem_le_txheader ,contr 
+42c5 202074f2 branch memcpy48 
+
+le_send_adv_recover_txbuf:
+42c6 d8c00506 arg mem_le_tx_buf_temp ,contr 
+42c7 d8a04129 arg mem_le_txheader ,contw 
+42c8 202074f2 branch memcpy48 
+
+le_init_adv:
+42c9 47064021 bpatchx patch21_4 ,mem_patch21 
+42ca 7854fc00 disable master 
+
+le_adv_access:
+42cb 588e89be setarg 0x8e89be 
+42cc 1fed7e00 lshift8 pdata ,pdata 
+42cd 1fe1fed6 or_into 0xd6 ,pdata 
+42ce 98001200 iforce access 
+42cf 58555555 setarg 0x555555 
+42d0 67e1818b store 3 ,mem_le_crcinit 
+42d1 20600000 rtn 
+
+le_send_adv_ind:
+42d2 4706c021 bpatchx patch21_5 ,mem_patch21 
+42d3 6fe0c35e fetch 1 ,mem_le_adv_type 
+42d4 6848c35f fetcht 1 ,mem_le_adv_own_addr_type 
+42d5 18520400 lshift4 temp ,temp 
+42d6 184b8400 lshift2 temp ,temp 
+42d7 98408400 iadd temp ,temp 
+42d8 6048c129 storet 1 ,mem_le_txheader 
+42d9 c000c2e3 beq adv_direct_ind ,le_send_adv_direct_ind 
+42da 6848c31b fetcht 1 ,mem_le_adv_data_len 
+42db 1840fe06 add temp ,6 ,pdata 
+42dc 67e0c12a store 1 ,mem_le_txlen 
+42dd 6fe342ae fetch 6 ,mem_le_lap 
+42de 67e3412b store 6 ,mem_le_txpayload 
+42df 18427200 copy temp ,loopcnt 
+42e0 d8c0431c arg mem_le_adv_data ,contr 
+42e1 2040753b call memcpy_fast 
+42e2 202042e9 branch le_send_adv_transmit 
+
+le_send_adv_direct_ind:
+42e3 5800000c setarg 12 
+42e4 67e0c12a store 1 ,mem_le_txlen 
+42e5 6fe342ae fetch 6 ,mem_le_lap 
+42e6 67e3412b store 6 ,mem_le_txpayload 
+42e7 6fe3410f fetch 6 ,mem_hci_plap 
+42e8 e7e30005 istore 6 ,contw 
+
+le_send_adv_transmit:
+42e9 47074021 bpatchx patch21_6 ,mem_patch21 
+42ea 6fe08000 fetch 1 ,mem_le_adv_transmit 
+42eb 1fe0fe01 increase 1 ,pdata 
+42ec 67e08000 store 1 ,mem_le_adv_transmit 
+42ed db600708 arg 1800 ,stop_watch 
+42ee 7856fc00 disable match 
+42ef 20203ea4 branch le_transmit_receive_sifs_without_change_mode 
+
+le_send_scan_request:
+42f0 4707c021 bpatchx patch21_7 ,mem_patch21 
+42f1 6fe0c367 fetch 1 ,mem_le_scan_type 
+42f2 c1808000 rtnne le_scan_type_active 
+42f3 6fe08000 fetch 1 ,mem_le_adv_transmit 
+42f4 1fe0fe01 increase 1 ,pdata 
+42f5 67e08000 store 1 ,mem_le_adv_transmit 
+42f6 d8400c03 arg 0x0c03 ,temp 
+42f7 6fe0c368 fetch 1 ,mem_le_scan_own_addr_type 
+42f8 7d3a0406 nsetflag blank ,le_sender_addr_bit ,temp 
+42f9 1a227e00 copy rega ,pdata 
+42fa 7d3a0407 nsetflag blank ,le_receiver_addr_bit ,temp 
+42fb 60494129 storet 2 ,mem_le_txheader 
+42fc 6fe342ae fetch 6 ,mem_le_lap 
+42fd e7e30005 istore 6 ,contw 
+42fe 6fe30173 fetch 6 ,mem_le_plap 
+42ff e7e30005 istore 6 ,contw 
+4300 20203ea4 branch le_transmit_receive_sifs_without_change_mode 
+
+le_send_scan_response:
+4301 6fe3004f fetch 6 ,mem_le_rxbuf_adv_scan_req_adv_address 
+4302 684b42ae fetcht 6 ,mem_le_lap 
+4303 98467c00 isub temp ,null 
+4304 24628000 nrtn zero 
+4305 d8400004 arg scan_rsp ,temp 
+4306 6fe0c35f fetch 1 ,mem_le_adv_own_addr_type 
+4307 7d3a0406 nsetflag blank ,le_sender_addr_bit ,temp 
+4308 6048c129 storet 1 ,mem_le_txheader 
+4309 6848c33b fetcht 1 ,mem_le_scan_data_len 
+430a 1840fe06 add temp ,6 ,pdata 
+430b 67e0c12a store 1 ,mem_le_txlen 
+430c 6fe342ae fetch 6 ,mem_le_lap 
+430d 67e3412b store 6 ,mem_le_txpayload 
+430e d8c0433c arg mem_le_scan_data ,contr 
+430f 18427200 copy temp ,loopcnt 
+4310 2040753b call memcpy_fast 
+4311 20403eb9 call le_transmit_norx 
+4312 202042b6 branch le_adv_not_match 
+
+le_parse_connect_req:
+4313 6fe3004f fetch 6 ,mem_le_rxbuf_adv_connect_ind_adv_address 
+4314 684b42ae fetcht 6 ,mem_le_lap 
+4315 98467c00 isub temp ,null 
+4316 24628000 nrtn zero 
+4317 20403fe4 call le_scan_check_sender_addr_type 
+4318 6220c29e storer rega ,1 ,mem_le_conn_peer_addr_type 
+4319 6fe30049 fetch 6 ,mem_le_rxbuf_adv_connect_ind_init_address 
+431a 67e30173 store 6 ,mem_le_plap 
+431b 6fe40055 fetch 8 ,mem_le_rxbuf_adv_connect_ind_access_address 
+431c 67e40187 store 8 ,mem_le_access 
+431d 6849005d fetcht 2 ,mem_le_rxbuf_adv_connect_ind_win_offset 
+431e 47084022 bpatchx patch22_0 ,mem_patch22 
+431f 184b8400 lshift2 temp ,temp 
+4320 6fe1005f fetch 2 ,mem_le_rxbuf_adv_connect_ind_interval 
+4321 1febfe00 lshift2 pdata ,pdata 
+4322 67e10165 store 2 ,mem_le_tsniff 
+4323 67e20167 store 4 ,mem_le_anchor 
+4324 98467e00 isub temp ,pdata 
+4325 1fe0d1fe add pdata ,-2 ,clke_bt 
+4326 6fe48061 fetch 9 ,mem_le_rxbuf_adv_connect_ind_latency 
+4327 67e4818f store 9 ,mem_le_slave_latency 
+4328 6fe0806a fetch 1 ,mem_le_rxbuf_adv_connect_ind_hop_and_sca 
+4329 1fe1041f and pdata ,0x1f ,temp 
+432a 6048817c storet 1 ,mem_le_hop 
+432b 1ff18400 rshift4 pdata ,temp 
+432c 18430400 rshift temp ,temp 
+432d 604881b3 storet 1 ,mem_le_peer_sca 
+432e da200163 arg mem_le_state ,rega 
+432f 204040b7 call le_receive_window_size 
+4330 da200163 arg mem_le_state ,rega 
+4331 20403d9e call le_calc_channel_map 
+4332 20403c9b call le_init_slave 
+4333 20403852 call context_new 
+4334 24628000 nrtn zero 
+4335 4708c022 bpatchx patch22_1 ,mem_patch22 
+4336 204038f3 call calc_clke_offset 
+4337 20404607 call le_l2cap_reset_signaling_identifier 
+4338 7004c314 jam bt_evt_le_connected ,mem_fifo_temp 
+4339 2040709b call ui_ipc_send_event 
+433a 2020383d branch context_save 
+
+le_next_adv_channel:
+433b 47094022 bpatchx patch22_2 ,mem_patch22 
+433c 6fe08007 fetch 1 ,mem_le_ch_mapped 
+433d c012c341 beq 37 ,le_next_adv_channel_curr_channel_37 
+433e c0134347 beq 38 ,le_next_adv_channel_curr_channel_38 
+433f c013c34d beq 39 ,le_next_adv_channel_curr_channel_39 
+4340 2020434d branch le_next_adv_channel_curr_channel_39 
+
+le_next_adv_channel_curr_channel_37:
+4341 6848c366 fetcht 1 ,mem_le_adv_channel_map 
+4342 284ffe01 isolate1 bit_adv_channel_map_38 ,temp 
+4343 2020c358 branch set_le_next_adv_channel_38 ,true 
+4344 284ffe02 isolate1 bit_adv_channel_map_39 ,temp 
+4345 2020c35d branch set_le_next_adv_channel_39 ,true 
+4346 20204353 branch set_le_next_adv_channel_37 
+
+le_next_adv_channel_curr_channel_38:
+4347 6848c366 fetcht 1 ,mem_le_adv_channel_map 
+4348 284ffe02 isolate1 bit_adv_channel_map_39 ,temp 
+4349 2020c35d branch set_le_next_adv_channel_39 ,true 
+434a 284ffe00 isolate1 bit_adv_channel_map_37 ,temp 
+434b 2020c353 branch set_le_next_adv_channel_37 ,true 
+434c 20204358 branch set_le_next_adv_channel_38 
+
+le_next_adv_channel_curr_channel_39:
+434d 6848c366 fetcht 1 ,mem_le_adv_channel_map 
+434e 284ffe00 isolate1 bit_adv_channel_map_37 ,temp 
+434f 2020c353 branch set_le_next_adv_channel_37 ,true 
+4350 284ffe01 isolate1 bit_adv_channel_map_38 ,temp 
+4351 2020c358 branch set_le_next_adv_channel_38 ,true 
+4352 2020435d branch set_le_next_adv_channel_39 
+
+set_le_next_adv_channel_37:
+4353 70000725 jam 37 ,mem_le_ch_mapped 
+4354 6fe084f6 fetch 1 ,mem_le_adv_channel_map_temp 
+4355 79207e00 set1 bit_adv_channel_map_37 ,pdata 
+4356 67e084f6 store 1 ,mem_le_adv_channel_map_temp 
+4357 20600000 rtn 
+
+set_le_next_adv_channel_38:
+4358 70000726 jam 38 ,mem_le_ch_mapped 
+4359 6fe084f6 fetch 1 ,mem_le_adv_channel_map_temp 
+435a 79207e01 set1 bit_adv_channel_map_38 ,pdata 
+435b 67e084f6 store 1 ,mem_le_adv_channel_map_temp 
+435c 20600000 rtn 
+
+set_le_next_adv_channel_39:
+435d 70000727 jam 39 ,mem_le_ch_mapped 
+435e 6fe084f6 fetch 1 ,mem_le_adv_channel_map_temp 
+435f 79207e02 set1 bit_adv_channel_map_39 ,pdata 
+4360 67e084f6 store 1 ,mem_le_adv_channel_map_temp 
+4361 20600000 rtn 
+
+le_parse_att:
+4362 efe18006 ifetch 3 ,contr 
+4363 67e1c36a store 3 ,mem_le_att_opcode 
+4364 c0014379 beq attop_exchange_mtu_request ,le_parse_att_exchange_mtu_request 
+4365 c001c381 beq attop_exchange_mtu_response ,le_parse_att_exchange_mtu_response 
+4366 c0024384 beq attop_find_information_request ,le_parse_att_find_information_request 
+4367 c00343ad beq attop_find_by_type_value_request ,le_parse_att_find_by_type_value_request 
+4368 c00443fa beq attop_read_by_type_request ,le_parse_att_read_by_type_request 
+4369 c0054478 beq attop_read_request ,le_parse_att_read_request 
+436a c00644a7 beq attop_read_blob_request ,le_parse_att_read_blob_request 
+436b c00844bd beq attop_read_by_group_type_request ,le_parse_att_read_by_group_type_request 
+436c c0094500 beq attop_write_request ,le_parse_att_write_request 
+436d c00b4526 beq attop_prepare_write_request ,le_parse_att_prepare_write_request 
+436e c00c4539 beq attop_execute_write_request ,le_parse_att_execute_write_request 
+436f c00f453e beq attop_handle_value_confirmation ,le_parse_handle_value_confirmation 
+4370 c0294542 beq attop_write_command ,le_parse_att_write_command 
+4371 20600000 rtn 
+
+le_send_att_exchange_mtu_requset:
+4372 18002203 force 3 ,rega 
+4373 20404568 call le_fifo_malloc_tx_l2cap_gatt 
+4374 58000002 setarg attop_exchange_mtu_request 
+4375 e7e08005 istore 1 ,contw 
+4376 6fe142b4 fetch 2 ,mem_le_local_mtu 
+4377 e7e10005 istore 2 ,contw 
+4378 20600000 rtn 
+
+le_parse_att_exchange_mtu_request:
+4379 20404381 call le_parse_att_exchange_mtu_response 
+
+le_send_att_exchange_mtu_response:
+437a 18002203 force 3 ,rega 
+437b 20404568 call le_fifo_malloc_tx_l2cap_gatt 
+437c 58000003 setarg attop_exchange_mtu_response 
+437d e7e08005 istore 1 ,contw 
+437e 6fe142b4 fetch 2 ,mem_le_local_mtu 
+437f e7e10005 istore 2 ,contw 
+4380 20600000 rtn 
+
+le_parse_att_exchange_mtu_response:
+4381 1fecfe00 rshift8 pdata ,pdata 
+4382 67e142b6 store 2 ,mem_le_remote_mtu 
+4383 20600000 rtn 
+
+le_parse_att_find_information_request:
+4384 2040459c call le_get_search_handle_start_end_common 
+4385 20407636 call enable_user 
+4386 20204387 branch le_send_att_find_information_response 
+
+le_send_att_find_information_response:
+4387 d9600003 arg 3 ,timeup 
+4388 204040d1 call le_init_attlist_search 
+
+le_send_att_find_information_res_loop:
+4389 204040da call le_att_handle_inrange 
+438a 203a43ab branch le_send_att_find_information_res_end ,blank 
+438b 242143a8 nbranch le_send_att_find_information_res_next ,positive 
+438c 18c08dfe increase -2 ,contr 
+438d 204074d3 call store_contr 
+438e 204074ca call get_contw 
+438f 2434439b nbranch le_send_att_find_information_res_store_info ,user 
+4390 204074b7 call push_stack_rega_b_c 
+4391 20407638 call disable_user 
+4392 616204d4 storer timeup ,4 ,mem_timeup 
+4393 18002214 force 20 ,rega 
+4394 20404568 call le_fifo_malloc_tx_l2cap_gatt 
+4395 696204d4 fetchr timeup ,4 ,mem_timeup 
+4396 204074c6 call pop_stack_rega_b_c 
+4397 58000005 setarg attop_find_information_response 
+4398 e7e08005 istore 1 ,contw 
+4399 58000001 setarg uuid_size_16bit 
+439a e7e08005 istore 1 ,contw 
+
+le_send_att_find_information_res_store_info:
+439b 204074cd call get_contr 
+439c efe10006 ifetch 2 ,contr 
+439d 1fe17eff and_into 0xff ,pdata 
+439e e7e10005 istore 2 ,contw 
+439f efe08006 ifetch 1 ,contr 
+43a0 1fe27200 copy pdata ,loopcnt 
+43a1 20407548 call memcpy 
+43a2 204074d0 call store_contw 
+43a3 196097ff increase -1 ,timeup 
+43a4 2022c3ab branch le_send_att_find_information_res_end ,zero 
+
+le_send_att_find_information_res_cont:
+43a5 efe08006 ifetch 1 ,contr 
+43a6 98c08c00 iadd contr ,contr 
+43a7 20204389 branch le_send_att_find_information_res_loop 
+
+le_send_att_find_information_res_next:
+43a8 efe08006 ifetch 1 ,contr 
+43a9 98c08c00 iadd contr ,contr 
+43aa 202043a5 branch le_send_att_find_information_res_cont 
+
+le_send_att_find_information_res_end:
+43ab 2034455b branch le_send_att_error_response_notfound ,user 
+43ac 2020458f branch le_send_auto_len_by_mem 
+
+le_parse_att_find_by_type_value_request:
+43ad 2040459c call le_get_search_handle_start_end_common 
+43ae efe10006 ifetch 2 ,contr 
+43af 67e1428e store 2 ,mem_le_search_uuid 
+43b0 204074d3 call store_contr 
+43b1 d8a0050a arg mem_le_search_att_type_length ,contw 
+43b2 6fe14308 fetch 2 ,mem_le_l2cap_size 
+43b3 1fe0fff9 increase -7 ,pdata 
+43b4 204045af call le_get_search_common2 
+43b5 202043c0 branch le_send_att_find_by_type_value_response 
+
+le_start_end_handle_check_1:
+43b6 78547c00 disable user 
+43b7 68490506 fetcht 2 ,mem_le_search_handle_start 
+43b8 6fe10508 fetch 2 ,mem_le_search_handle_end 
+43b9 98467c00 isub temp ,null 
+43ba 242143bd nbranch le_start_end_handle_check_1_fail ,positive 
+43bb 18427e00 deposit temp 
+43bc c1800000 rtnne 0 
+
+le_start_end_handle_check_1_fail:
+43bd 78347c00 enable user 
+43be 7001b401 jam att_err_invalid_handle ,mem_le_err_code 
+43bf 2020455d branch le_send_att_error_response 
+
+le_send_att_find_by_type_value_response:
+43c0 204043b6 call le_start_end_handle_check_1 
+43c1 20740000 rtn user 
+43c2 6849428e fetcht 2 ,mem_le_search_uuid 
+43c3 58002800 setarg uuid_gatt_primary_service 
+43c4 98467c00 isub temp ,null 
+43c5 2022c3c7 branch le_send_att_find_by_type_value_res_primary ,zero 
+43c6 2020455b branch le_send_att_error_response_notfound 
+
+le_send_att_find_by_type_value_res_primary:
+43c7 70436d00 jam le_find_by_type_val_res_not_found ,mem_le_search_res 
+43c8 68490506 fetcht 2 ,mem_le_search_handle_start 
+43c9 604904cc storet 2 ,mem_temp 
+43ca 20404116 call le_att_get_handle_info 
+43cb 243a455b nbranch le_send_att_error_response_notfound ,blank 
+
+le_send_att_find_primary_search_loop:
+43cc 684904cc fetcht 2 ,mem_temp 
+43cd 20404116 call le_att_get_handle_info 
+43ce 243a43e0 nbranch le_send_att_error_response_notfound2 ,blank 
+43cf 18c22200 copy contr ,rega 
+43d0 6fe0851b fetch 1 ,mem_le_curr_att_len 
+43d1 1fe27200 copy pdata ,loopcnt 
+43d2 6848850a fetcht 1 ,mem_le_search_att_type_length 
+43d3 98467c00 isub temp ,null 
+43d4 2422c3dc nbranch le_send_att_find_primary_search_loop1 ,zero 
+43d5 da40050b arg mem_le_search_att_type ,regb 
+43d6 204075d2 call string_compare 
+43d7 2022c3e3 branch le_send_att_find_primary_search_end_start_handle_found ,zero 
+43d8 6fe10523 fetch 2 ,mem_le_cur_uuid 
+43d9 6849428e fetcht 2 ,mem_le_search_uuid 
+43da 98467c00 isub temp ,null 
+43db 2022c3eb branch le_send_att_find_primary_search_end_ending_handle_found ,zero 
+
+le_send_att_find_primary_search_loop1:
+43dc 6fe104cc fetch 2 ,mem_temp 
+43dd 1fe0fe01 increase 1 ,pdata 
+43de 67e104cc store 2 ,mem_temp 
+43df 202043cc branch le_send_att_find_primary_search_loop 
+
+le_send_att_error_response_notfound2:
+43e0 6fe0c36d fetch 1 ,mem_le_search_res 
+43e1 c000c3eb beq le_find_by_type_val_res_found_starting_handle ,le_send_att_find_primary_search_end_ending_handle_found 
+43e2 2020455b branch le_send_att_error_response_notfound 
+
+le_send_att_find_primary_search_end_start_handle_found:
+43e3 6fe10523 fetch 2 ,mem_le_cur_uuid 
+43e4 6849428e fetcht 2 ,mem_le_search_uuid 
+43e5 98467c00 isub temp ,null 
+43e6 2422c3dc nbranch le_send_att_find_primary_search_loop1 ,zero 
+43e7 70436d01 jam le_find_by_type_val_res_found_starting_handle ,mem_le_search_res 
+43e8 684904cc fetcht 2 ,mem_temp 
+43e9 6049051e storet 2 ,mem_le_cur_handle_start 
+43ea 202043dc branch le_send_att_find_primary_search_loop1 
+
+le_send_att_find_primary_search_end_ending_handle_found:
+43eb 6fe0c36d fetch 1 ,mem_le_search_res 
+43ec c00043dc beq le_find_by_type_val_res_not_found ,le_send_att_find_primary_search_loop1 
+43ed 70436d02 jam le_find_by_type_val_res_found_ending_handle ,mem_le_search_res 
+43ee 684904cc fetcht 2 ,mem_temp 
+43ef 184085ff increase -1 ,temp 
+43f0 60490520 storet 2 ,mem_le_cur_handle_end 
+
+le_send_att_find_primary_search_end:
+43f1 da200005 arg 5 ,rega 
+43f2 20404568 call le_fifo_malloc_tx_l2cap_gatt 
+43f3 58000007 setarg attop_find_by_type_value_response 
+43f4 e7e08005 istore 1 ,contw 
+43f5 6fe1051e fetch 2 ,mem_le_cur_handle_start 
+43f6 e7e10005 istore 2 ,contw 
+43f7 6fe10520 fetch 2 ,mem_le_cur_handle_end 
+43f8 e7e10005 istore 2 ,contw 
+43f9 20600000 rtn 
+
+le_parse_att_read_by_type_request:
+43fa 2040459c call le_get_search_handle_start_end_common 
+43fb 204045aa call le_get_search_att_type 
+43fc 202043fd branch le_send_att_read_by_type_response 
+
+le_send_att_read_by_type_response:
+43fd 68490506 fetcht 2 ,mem_le_search_handle_start 
+43fe 604904cc storet 2 ,mem_temp 
+43ff 204040d1 call le_init_attlist_search 
+4400 204040e9 call le_att_get_handle_ptr2 
+4401 18c08dfe increase -2 ,contr 
+4402 18c27e00 copy contr ,pdata 
+4403 67e1051c store 2 ,mem_le_cur_attlist_start_ptr 
+4404 6849050b fetcht 2 ,mem_le_search_att_type 
+4405 58002a00 setarg uuid_chrctr_device_name 
+4406 98467c00 isub temp ,null 
+4407 2022c464 branch le_send_att_read_by_type_res_device_name ,zero 
+4408 58002803 setarg uuid_gatt_characteristic 
+4409 98467c00 isub temp ,null 
+440a 2422c450 nbranch le_send_att_read_by_type_res_not_characteristic ,zero 
+440b d9600002 arg 2 ,timeup 
+
+le_send_att_read_by_type_response_loop:
+440c 2040456f call le_att_check_handle_end 
+440d 2421442d nbranch le_send_att_read_by_type_response_end ,positive 
+440e 684904cc fetcht 2 ,mem_temp 
+440f 20404114 call le_att_get_handle_info_from_ptr 
+4410 243a442d nbranch le_send_att_read_by_type_response_end ,blank 
+4411 20404573 call le_att_same_type 
+4412 2422c42b nbranch le_send_att_read_by_type_response_next_handle ,zero 
+4413 2434442f nbranch le_send_att_read_by_type_res_found_next ,user 
+4414 78547c00 disable user 
+4415 da200014 arg 20 ,rega 
+4416 20404568 call le_fifo_malloc_tx_l2cap_gatt 
+4417 58000009 setarg attop_read_by_type_response 
+4418 e7e08005 istore 1 ,contw 
+4419 18a26000 copy contw ,alarm 
+441a 18a08a01 increase 1 ,contw 
+441b 2040443d call le_send_att_read_by_type_write_properties 
+441c 2040456b call le_att_next_handle 
+441d 20404114 call le_att_get_handle_info_from_ptr 
+441e 20404444 call le_send_att_read_by_type_write_uuid 
+441f 6fe08522 fetch 1 ,mem_le_cur_uuid_length 
+4420 1fe0a205 add pdata ,5 ,rega 
+4421 e2208030 istorer rega ,1 ,alarm 
+4422 1a267c07 sub rega ,7 ,null 
+4423 2442f63a ncall enable_user2 ,zero 
+4424 2042f63c call disable_user2 ,zero 
+4425 204045a1 call le_get_search_max_mtu_data 
+4426 9a26fc00 idiv rega 
+4427 204075d0 call wait_div_end 
+4428 18079600 quotient timeup 
+4429 196097ff increase -1 ,timeup 
+442a 2022c42d branch le_send_att_read_by_type_response_end ,zero 
+
+le_send_att_read_by_type_response_next_handle:
+442b 2040456b call le_att_next_handle 
+442c 2020440c branch le_send_att_read_by_type_response_loop 
+
+le_send_att_read_by_type_response_end:
+442d 2034455b branch le_send_att_error_response_notfound ,user 
+442e 2020458f branch le_send_auto_len_by_mem 
+
+le_send_att_read_by_type_res_found_next:
+442f 2040457f call le_store_att_record 
+4430 2040456b call le_att_next_handle 
+4431 20404114 call le_att_get_handle_info_from_ptr 
+4432 204044ee call le_send_att_read_by_type_res_check_pair_length_type 
+4433 243a442d nbranch le_send_att_read_by_type_response_end ,blank 
+4434 204074ca call get_contw 
+4435 6fe104cc fetch 2 ,mem_temp 
+4436 1fe0ffff increase -1 ,pdata 
+4437 e7e10005 istore 2 ,contw 
+4438 2040458b call le_write_att_record_common 
+4439 20404444 call le_send_att_read_by_type_write_uuid 
+443a 196097ff increase -1 ,timeup 
+443b 2022c42d branch le_send_att_read_by_type_response_end ,zero 
+443c 2020442b branch le_send_att_read_by_type_response_next_handle 
+
+le_send_att_read_by_type_write_properties:
+443d 6fe104cc fetch 2 ,mem_temp 
+443e e7e10005 istore 2 ,contw 
+443f 6fe0851b fetch 1 ,mem_le_curr_att_len 
+4440 1fe27200 copy pdata ,loopcnt 
+4441 204074cd call get_contr 
+4442 2040753b call memcpy_fast 
+4443 202074d0 branch store_contw 
+
+le_send_att_read_by_type_write_uuid:
+4444 204074ca call get_contw 
+4445 6fe104cc fetch 2 ,mem_temp 
+4446 e7e10005 istore 2 ,contw 
+4447 204074d0 call store_contw 
+4448 6fe08522 fetch 1 ,mem_le_cur_uuid_length 
+4449 1fe27200 copy pdata ,loopcnt 
+444a 204074ca call get_contw 
+444b 204074cd call get_contr 
+444c 9f260c00 isub loopcnt ,contr 
+444d 18c08dff increase -1 ,contr 
+444e 2040753b call memcpy_fast 
+444f 202074d0 branch store_contw 
+
+le_send_att_read_by_type_res_not_characteristic:
+4450 204040f9 call le_att_get_short_uuid_ptr 
+4451 203a455b branch le_send_att_error_response_notfound ,blank 
+4452 18c22600 copy contr ,regc 
+4453 18c08dfb increase -5 ,contr 
+4454 efe10006 ifetch 2 ,contr 
+4455 67e104cc store 2 ,mem_temp 
+4456 da200014 arg 20 ,rega 
+4457 20404568 call le_fifo_malloc_tx_l2cap_gatt 
+4458 58000009 setarg attop_read_by_type_response 
+4459 e7e08005 istore 1 ,contw 
+445a efe08013 ifetch 1 ,regc 
+445b 1fe27200 copy pdata ,loopcnt 
+445c 1fe0fe02 increase 2 ,pdata 
+445d e7e08005 istore 1 ,contw 
+445e 6fe104cc fetch 2 ,mem_temp 
+445f e7e10005 istore 2 ,contw 
+4460 1a608c01 add regc ,1 ,contr 
+4461 2040753b call memcpy_fast 
+4462 204074d0 call store_contw 
+4463 2020458f branch le_send_auto_len_by_mem 
+
+le_send_att_read_by_type_res_device_name:
+4464 d8402a00 arg uuid_chrctr_device_name ,temp 
+4465 204040f9 call le_att_get_short_uuid_ptr 
+4466 207a0000 rtn blank 
+4467 18c08dfb increase -5 ,contr 
+4468 efe10006 ifetch 2 ,contr 
+4469 67e104cc store 2 ,mem_temp 
+446a da200014 arg 20 ,rega 
+446b 20404568 call le_fifo_malloc_tx_l2cap_gatt 
+446c 58000009 setarg attop_read_by_type_response 
+446d e7e08005 istore 1 ,contw 
+446e 6fe0c22b fetch 1 ,mem_le_name_len 
+446f 1fe27200 copy pdata ,loopcnt 
+4470 1fe0fe02 increase 2 ,pdata 
+4471 e7e08005 istore 1 ,contw 
+4472 6fe104cc fetch 2 ,mem_temp 
+4473 e7e10005 istore 2 ,contw 
+4474 d8c0422c arg mem_le_name ,contr 
+4475 2040753b call memcpy_fast 
+4476 204074d0 call store_contw 
+4477 2020458f branch le_send_auto_len_by_mem 
+
+le_parse_att_read_request:
+4478 2040451f call le_check_encrypt_state 
+4479 6849436b fetcht 2 ,mem_le_att_handle 
+447a 6fe0c2f4 fetch 1 ,mem_le_configuration 
+447b c281c49d bbit1 bit_ble_read_auth ,le_send_att_read_response_check_auth 
+
+le_send_att_read_response:
+447c 204040e9 call le_att_get_handle_ptr2 
+447d 2422c55b nbranch le_send_att_error_response_notfound ,zero 
+447e 205444a3 call le_send_att_read_response_check_handle ,user 
+447f 20740000 rtn user 
+4480 204040f6 call le_att_get_handle_ptr_found 
+4481 18c08dfe increase -2 ,contr 
+4482 efe10006 ifetch 2 ,contr 
+4483 d8402a00 arg uuid_chrctr_device_name ,temp 
+4484 98467c00 isub temp ,null 
+4485 2022c493 branch le_send_device_name ,zero 
+4486 efe08006 ifetch 1 ,contr 
+4487 1fe67c16 sub pdata ,22 ,null 
+4488 2021448a branch le_send_att_read_response_less ,positive 
+4489 18007e16 force 22 ,pdata 
+
+le_send_att_read_response_less:
+448a 1fe22600 copy pdata ,regc 
+448b 204074d3 call store_contr 
+448c 1a60a201 add regc ,1 ,rega 
+448d 20404568 call le_fifo_malloc_tx_l2cap_gatt 
+448e 5800000b setarg attop_read_response 
+448f e7e08005 istore 1 ,contw 
+4490 1a627200 copy regc ,loopcnt 
+4491 204074cd call get_contr 
+4492 20207548 branch memcpy 
+
+le_send_device_name:
+4493 204074d3 call store_contr 
+4494 6fe0c22b fetch 1 ,mem_le_name_len 
+4495 1fe0a201 add pdata ,1 ,rega 
+4496 20404568 call le_fifo_malloc_tx_l2cap_gatt 
+4497 5800000b setarg attop_read_response 
+4498 e7e08005 istore 1 ,contw 
+4499 6fe0c22b fetch 1 ,mem_le_name_len 
+449a 1fe27200 copy pdata ,loopcnt 
+449b d8c0422c arg mem_le_name ,contr 
+449c 20207548 branch memcpy 
+
+le_send_att_read_response_check_auth:
+449d 6fe14305 fetch 2 ,mem_le_pairing_handle 
+449e 98467c00 isub temp ,null 
+449f 2422c47c nbranch le_send_att_read_response ,zero 
+44a0 2434447c nbranch le_send_att_read_response ,user 
+
+le_send_att_read_response_error_insufficient_auth:
+44a1 7001b405 jam att_err_insufficient_authentication ,mem_le_err_code 
+44a2 2020455d branch le_send_att_error_response 
+
+le_send_att_read_response_check_handle:
+44a3 18c08dfe increase -2 ,contr 
+44a4 efe10006 ifetch 2 ,contr 
+44a5 c28744a1 bbit1 bit_of_att_handle_read_authenticated ,le_send_att_read_response_error_insufficient_auth 
+44a6 20207638 branch disable_user 
+
+le_parse_att_read_blob_request:
+44a7 efe10006 ifetch 2 ,contr 
+44a8 67e1050a store 2 ,mem_le_att_offset 
+
+le_send_att_read_blob_response:
+44a9 da200014 arg 20 ,rega 
+44aa 20404568 call le_fifo_malloc_tx_l2cap_gatt 
+44ab 5800000d setarg attop_read_blob_response 
+44ac e7e08005 istore 1 ,contw 
+44ad 6fe1050a fetch 2 ,mem_le_att_offset 
+44ae 98002200 iforce rega 
+44af 6849436b fetcht 2 ,mem_le_att_handle 
+44b0 204040e6 call le_att_get_handle_ptr 
+44b1 203a455b branch le_send_att_error_response_notfound ,blank 
+44b2 efe08006 ifetch 1 ,contr 
+44b3 9a267200 isub rega ,loopcnt 
+44b4 2421455b nbranch le_send_att_error_response_notfound ,positive 
+44b5 1f267c16 sub loopcnt ,22 ,null 
+44b6 202144b8 branch le_send_att_read_blob_response_less ,positive 
+44b7 18007216 force 22 ,loopcnt 
+
+le_send_att_read_blob_response_less:
+44b8 1a227e00 deposit rega 
+44b9 98c08c00 iadd contr ,contr 
+44ba 2040753b call memcpy_fast 
+44bb 204074d0 call store_contw 
+44bc 2020458f branch le_send_auto_len_by_mem 
+
+le_parse_att_read_by_group_type_request:
+44bd 2040459c call le_get_search_handle_start_end_common 
+44be 204045aa call le_get_search_att_type 
+44bf 202044c0 branch le_send_att_read_by_group_type_response 
+
+le_send_att_read_by_group_type_response:
+44c0 d9600002 arg 2 ,timeup 
+44c1 68490506 fetcht 2 ,mem_le_search_handle_start 
+44c2 604904cc storet 2 ,mem_temp 
+44c3 204040e9 call le_att_get_handle_ptr2 
+44c4 18c08dfe increase -2 ,contr 
+44c5 18c27e00 copy contr ,pdata 
+44c6 67e1051c store 2 ,mem_le_cur_attlist_start_ptr 
+
+le_send_att_read_by_group_type_response_loop:
+44c7 2040456f call le_att_check_handle_end 
+44c8 242144f6 nbranch le_send_att_read_by_group_type_end0 ,positive 
+44c9 684904cc fetcht 2 ,mem_temp 
+44ca 20404114 call le_att_get_handle_info_from_ptr 
+44cb 243a44f9 nbranch le_send_att_read_by_group_type_end1 ,blank 
+44cc 20404573 call le_att_same_type 
+44cd 2422c4ec nbranch le_send_att_read_by_group_type_next_handle ,zero 
+44ce 19627e00 copy timeup ,pdata 
+44cf c00044f9 beq 0 ,le_send_att_read_by_group_type_end1 
+44d0 243444e2 nbranch le_send_att_read_by_group_type_store_write_record ,user 
+44d1 78547c00 disable user 
+44d2 da200014 arg 20 ,rega 
+44d3 20404568 call le_fifo_malloc_tx_l2cap_gatt 
+44d4 58000011 setarg attop_read_by_group_type_response 
+44d5 e7e08005 istore 1 ,contw 
+44d6 6fe0851b fetch 1 ,mem_le_curr_att_len 
+44d7 1fe0a204 add pdata ,4 ,rega 
+44d8 e2208005 istorer rega ,1 ,contw 
+44d9 204074d0 call store_contw 
+44da 1a267c06 sub rega ,6 ,null 
+44db 2442f63a ncall enable_user2 ,zero 
+44dc 2042f63c call disable_user2 ,zero 
+44dd 204045a1 call le_get_search_max_mtu_data 
+44de 9a26fc00 idiv rega 
+44df 204075d0 call wait_div_end 
+44e0 18079600 quotient timeup 
+44e1 202044e8 branch le_send_att_read_by_group_type_store_record 
+
+le_send_att_read_by_group_type_store_write_record:
+44e2 204044f0 call le_send_att_read_by_group_type_check_pair_length_type 
+44e3 243a44f9 nbranch le_send_att_read_by_group_type_end1 ,blank 
+44e4 6fe104cc fetch 2 ,mem_temp 
+44e5 1fe0ffff increase -1 ,pdata 
+44e6 67e10520 store 2 ,mem_le_cur_handle_end 
+44e7 20404585 call le_write_att_record 
+
+le_send_att_read_by_group_type_store_record:
+44e8 6fe104cc fetch 2 ,mem_temp 
+44e9 67e1051e store 2 ,mem_le_cur_handle_start 
+44ea 2040457f call le_store_att_record 
+44eb 196097ff increase -1 ,timeup 
+
+le_send_att_read_by_group_type_next_handle:
+44ec 2040456b call le_att_next_handle 
+44ed 202044c7 branch le_send_att_read_by_group_type_response_loop 
+
+le_send_att_read_by_type_res_check_pair_length_type:
+44ee 6fe08522 fetch 1 ,mem_le_cur_uuid_length 
+44ef 202044f1 branch le_send_att_read_by_group_type_check_pair_length_type + 1 
+
+le_send_att_read_by_group_type_check_pair_length_type:
+44f0 6fe0851b fetch 1 ,mem_le_curr_att_len 
+44f1 203644f4 branch le_send_att_read_by_group_type_check_pair_length_type_16byte ,user2 
+44f2 1fe0fffe increase -2 ,pdata 
+44f3 20600000 rtn 
+
+le_send_att_read_by_group_type_check_pair_length_type_16byte:
+44f4 1fe0fff0 increase -16 ,pdata 
+44f5 20600000 rtn 
+
+le_send_att_read_by_group_type_end0:
+44f6 6fe104cc fetch 2 ,mem_temp 
+44f7 67e10520 store 2 ,mem_le_cur_handle_end 
+44f8 202044fd branch le_send_att_read_by_group_type_end_common 
+
+le_send_att_read_by_group_type_end1:
+44f9 6fe104cc fetch 2 ,mem_temp 
+44fa 1fe0ffff increase -1 ,pdata 
+44fb 67e10520 store 2 ,mem_le_cur_handle_end 
+44fc 202044fd branch le_send_att_read_by_group_type_end_common 
+
+le_send_att_read_by_group_type_end_common:
+44fd 2034455b branch le_send_att_error_response_notfound ,user 
+44fe 20404585 call le_write_att_record 
+44ff 2020458f branch le_send_auto_len_by_mem 
+
+le_parse_att_write_request:
+4500 18c22200 copy contr ,rega 
+4501 6fe14308 fetch 2 ,mem_le_l2cap_size 
+4502 1fe0a5fd add pdata ,-3 ,regb 
+4503 204040a8 call le_writeatt_cb 
+
+le_send_att_write_response_check_auth:
+4504 4709c022 bpatchx patch22_3 ,mem_patch22 
+4505 2040451f call le_check_encrypt_state 
+4506 6849436b fetcht 2 ,mem_le_att_handle 
+4507 204040e9 call le_att_get_handle_ptr2 
+4508 2422c51d nbranch le_send_att_write_response_error_invalid_handle ,zero 
+4509 20544519 call le_send_att_write_response_check_handle ,user 
+450a 20740000 rtn user 
+450b 6fe0c2f4 fetch 1 ,mem_le_configuration 
+450c c3024514 bbit0 bit_ble_write_auth ,le_send_att_write_response 
+450d 6849436b fetcht 2 ,mem_le_att_handle 
+450e 6fe14305 fetch 2 ,mem_le_pairing_handle 
+450f 98467c00 isub temp ,null 
+4510 2422c514 nbranch le_send_att_write_response ,zero 
+4511 2040451f call le_check_encrypt_state 
+4512 24344514 nbranch le_send_att_write_response ,user 
+4513 202044a1 branch le_send_att_read_response_error_insufficient_auth 
+
+le_send_att_write_response:
+4514 18002201 force 1 ,rega 
+4515 20404568 call le_fifo_malloc_tx_l2cap_gatt 
+4516 58000013 setarg attop_write_response 
+4517 e7e08005 istore 1 ,contw 
+4518 20600000 rtn 
+
+le_send_att_write_response_check_handle:
+4519 18c08dfe increase -2 ,contr 
+451a efe10006 ifetch 2 ,contr 
+451b c287c4a1 bbit1 bit_of_att_handle_write_authenticated ,le_send_att_read_response_error_insufficient_auth 
+451c 20207638 branch disable_user 
+
+le_send_att_write_response_error_invalid_handle:
+451d 7001b401 jam att_err_invalid_handle ,mem_le_err_code 
+451e 2020455d branch le_send_att_error_response 
+
+le_check_encrypt_state:
+451f 470a4022 bpatchx patch22_4 ,mem_patch22 
+4520 20407638 call disable_user 
+4521 6fe0c2d1 fetch 1 ,mem_le_pairing_mode 
+4522 c1000000 rtneq le_pairing_mode_none 
+4523 6fe0c040 fetch 1 ,mem_context 
+4524 c3820000 rtnbit1 lestate_encryption 
+4525 20207636 branch enable_user 
+
+le_parse_att_prepare_write_request:
+4526 18c0a202 add contr ,2 ,rega 
+4527 6fe14308 fetch 2 ,mem_le_l2cap_size 
+4528 1fe0a5fb add pdata ,-5 ,regb 
+4529 204040a8 call le_writeatt_cb 
+452a 2020452b branch le_send_att_prepare_write_response 
+
+le_send_att_prepare_write_response:
+452b 6fe14308 fetch 2 ,mem_le_l2cap_size 
+452c 1fe22200 copy pdata ,rega 
+452d 20404568 call le_fifo_malloc_tx_l2cap_gatt 
+452e 58000017 setarg attop_prepare_write_response 
+452f e7e08005 istore 1 ,contw 
+4530 6fe1436b fetch 2 ,mem_le_att_handle 
+4531 e7e10005 istore 2 ,contw 
+4532 6fe14308 fetch 2 ,mem_le_l2cap_size 
+4533 1fe0f3fb add pdata ,-5 ,loopcnt 
+4534 6fe1430c fetch 2 ,mem_le_payload_ptr 
+4535 1fe08c07 add pdata ,7 ,contr 
+4536 efe10006 ifetch 2 ,contr 
+4537 e7e10005 istore 2 ,contw 
+4538 2020753b branch memcpy_fast 
+
+le_parse_att_execute_write_request:
+
+le_send_att_execute_write_response:
+4539 18002201 force 1 ,rega 
+453a 20404568 call le_fifo_malloc_tx_l2cap_gatt 
+453b 58000019 setarg attop_execute_write_response 
+453c e7e08005 istore 1 ,contw 
+453d 20600000 rtn 
+
+le_parse_handle_value_confirmation:
+453e 6fe0c369 fetch 1 ,mem_le_l2cap_att_states 
+453f 793ffe00 set0 ble_l2cap_recv_confirmation_packet ,pdata 
+4540 67e0c369 store 1 ,mem_le_l2cap_att_states 
+4541 20600000 rtn 
+
+le_parse_att_write_command:
+4542 18c22200 copy contr ,rega 
+4543 6fe14308 fetch 2 ,mem_le_l2cap_size 
+4544 1fe0a5fd add pdata ,-3 ,regb 
+4545 202040a8 branch le_writeatt_cb 
+
+le_att_malloc_tx_notify:
+4546 18422600 copy temp ,regc 
+4547 1a20a203 increase 3 ,rega 
+4548 20404568 call le_fifo_malloc_tx_l2cap_gatt 
+4549 1a20a3fd increase -3 ,rega 
+454a 5800001b setarg attop_handle_value_notification 
+454b e7e08005 istore 1 ,contw 
+454c 1a620400 copy regc ,temp 
+454d e0410005 istoret 2 ,contw 
+454e 20600000 rtn 
+
+le_att_malloc_tx_indication:
+454f 6fe0c369 fetch 1 ,mem_le_l2cap_att_states 
+4550 79207e00 set1 ble_l2cap_send_indication_packet ,pdata 
+4551 67e0c369 store 1 ,mem_le_l2cap_att_states 
+4552 18422600 copy temp ,regc 
+4553 1a20a203 increase 3 ,rega 
+4554 20404568 call le_fifo_malloc_tx_l2cap_gatt 
+4555 1a20a3fd increase -3 ,rega 
+4556 5800001d setarg attop_handle_value_indication 
+4557 e7e08005 istore 1 ,contw 
+4558 1a620400 copy regc ,temp 
+4559 e0410005 istoret 2 ,contw 
+455a 20600000 rtn 
+
+le_send_att_error_response_notfound:
+455b 470ac022 bpatchx patch22_5 ,mem_patch22 
+455c 7001b40a jam att_err_attribute_not_found ,mem_le_err_code 
+
+le_send_att_error_response:
+455d 18002205 force 5 ,rega 
+455e 20404568 call le_fifo_malloc_tx_l2cap_gatt 
+455f 58000001 setarg attop_error_response 
+4560 e7e08005 istore 1 ,contw 
+4561 6fe0c36a fetch 1 ,mem_le_att_opcode 
+4562 e7e08005 istore 1 ,contw 
+4563 6fe1436b fetch 2 ,mem_le_att_handle 
+4564 e7e10005 istore 2 ,contw 
+4565 6fe081b4 fetch 1 ,mem_le_err_code 
+4566 e7e08005 istore 1 ,contw 
+4567 20600000 rtn 
+
+le_fifo_malloc_tx_l2cap_gatt:
+4568 470b4022 bpatchx patch22_6 ,mem_patch22 
+4569 18002404 force le_l2cap_cid_att ,regb 
+456a 202041d6 branch le_fifo_malloc_tx_l2cap 
+
+le_att_next_handle:
+456b 684904cc fetcht 2 ,mem_temp 
+456c 18408401 increase 1 ,temp 
+456d 604904cc storet 2 ,mem_temp 
+456e 20600000 rtn 
+
+le_att_check_handle_end:
+456f 684904cc fetcht 2 ,mem_temp 
+4570 6fe10508 fetch 2 ,mem_le_search_handle_end 
+4571 98467c00 isub temp ,null 
+4572 20600000 rtn 
+
+le_att_same_type:
+4573 470bc022 bpatchx patch22_7 ,mem_patch22 
+4574 6848850a fetcht 1 ,mem_le_search_att_type_length 
+4575 da20050b arg mem_le_search_att_type ,rega 
+
+le_att_check_same_common:
+4576 6fe08522 fetch 1 ,mem_le_cur_uuid_length 
+4577 1fe27200 copy pdata ,loopcnt 
+4578 98467c00 isub temp ,null 
+4579 24628000 nrtn zero 
+457a da400523 arg mem_le_cur_uuid ,regb 
+457b 202075d2 branch string_compare 
+
+le_att_same_uuid:
+457c 6848c28d fetcht 1 ,mem_le_search_uuid_length 
+457d da20428e arg mem_le_search_uuid ,rega 
+457e 20204576 branch le_att_check_same_common 
+
+le_store_att_record:
+457f 470c4023 bpatchx patch23_0 ,mem_patch23 
+4580 6fe0851b fetch 1 ,mem_le_curr_att_len 
+4581 67e084f6 store 1 ,mem_temp_block0 
+4582 1fe27200 copy pdata ,loopcnt 
+4583 204074cd call get_contr 
+4584 2020753b branch memcpy_fast 
+
+le_write_att_record:
+4585 470cc023 bpatchx patch23_1 ,mem_patch23 
+4586 204074ca call get_contw 
+4587 6fe1051e fetch 2 ,mem_le_cur_handle_start 
+4588 e7e10005 istore 2 ,contw 
+4589 6fe10520 fetch 2 ,mem_le_cur_handle_end 
+458a e7e10005 istore 2 ,contw 
+
+le_write_att_record_common:
+458b 6fe084f6 fetch 1 ,mem_temp_block0 
+458c 1fe27200 copy pdata ,loopcnt 
+458d 2040753b call memcpy_fast 
+458e 202074d0 branch store_contw 
+
+le_send_auto_len_by_mem:
+458f 470d4023 bpatchx patch23_2 ,mem_patch23 
+4590 204074ca call get_contw 
+4591 204041fc call le_fifo_get_last_att_ptr 
+4592 18a27e00 copy contw ,pdata 
+4593 98c62200 isub contr ,rega 
+4594 204041ff call le_fifo_get_last_l2cap_ptr 
+4595 1a227e00 copy rega ,pdata 
+4596 e7e10006 istore 2 ,contr 
+4597 1a20a204 increase 4 ,rega 
+4598 204041f1 call le_fifo_get_last_tx_ptr 
+4599 1a227e00 copy rega ,pdata 
+459a e7e08006 istore 1 ,contr 
+459b 20600000 rtn 
+
+le_get_search_handle_start_end_common:
+459c 1fecfe00 rshift8 pdata ,pdata 
+459d 67e10506 store 2 ,mem_le_search_handle_start 
+459e efe10006 ifetch 2 ,contr 
+459f 67e10508 store 2 ,mem_le_search_handle_end 
+45a0 20600000 rtn 
+
+le_get_search_max_mtu_data:
+45a1 470dc023 bpatchx patch23_3 ,mem_patch23 
+45a2 6fe142b6 fetch 2 ,mem_le_remote_mtu 
+45a3 1fe0fffe increase -2 ,pdata 
+45a4 684942b4 fetcht 2 ,mem_le_local_mtu 
+45a5 184085fe increase -2 ,temp 
+45a6 2040762c call not_greater_than 
+45a7 d84000f0 arg 240 ,temp 
+45a8 2040762c call not_greater_than 
+45a9 20600000 rtn 
+
+le_get_search_att_type:
+45aa 470e4023 bpatchx patch23_4 ,mem_patch23 
+45ab 204074d3 call store_contr 
+45ac d8a0050a arg mem_le_search_att_type_length ,contw 
+
+le_get_search_common:
+45ad 6fe14308 fetch 2 ,mem_le_l2cap_size 
+45ae 1fe0fffb increase -5 ,pdata 
+
+le_get_search_common2:
+45af e7e08005 istore 1 ,contw 
+45b0 1fe27200 copy pdata ,loopcnt 
+45b1 204074cd call get_contr 
+45b2 2020753b branch memcpy_fast 
+
+le_parse_writing_attribute_start:
+45b3 6fe1004b fetch 2 ,mem_le_rxbuf_data_att_cid 
+45b4 c1820000 rtnne le_l2cap_cid_att 
+45b5 6fe0c369 fetch 1 ,mem_le_l2cap_att_states 
+45b6 79207e01 set1 ble_l2cap_deal_with_continue_packet ,pdata 
+45b7 67e0c369 store 1 ,mem_le_l2cap_att_states 
+45b8 6fe1804d fetch 3 ,mem_le_rxbuf_data_att_opcode 
+45b9 67e1c36a store 3 ,mem_le_att_opcode 
+45ba 7920000f set1 mark_old_packet ,mark 
+45bb c00945ce beq attop_write_request ,le_parse_attribute_write_request 
+45bc c02945d3 beq attop_write_command ,le_parse_attribute_write_command 
+45bd c00c4539 beq attop_execute_write_request ,le_parse_att_execute_write_request 
+45be c0014379 beq attop_exchange_mtu_request ,le_parse_att_exchange_mtu_request 
+45bf c00f453e beq attop_handle_value_confirmation ,le_parse_handle_value_confirmation 
+45c0 793f800f set0 mark_old_packet ,mark 
+
+le_clear_l2cap_att_states_deal_with_contiune_packet:
+45c1 6fe0c369 fetch 1 ,mem_le_l2cap_att_states 
+45c2 793ffe01 set0 ble_l2cap_deal_with_continue_packet ,pdata 
+45c3 67e0c369 store 1 ,mem_le_l2cap_att_states 
+45c4 20600000 rtn 
+
+le_parse_writing_attribute_continue:
+45c5 6fe0c369 fetch 1 ,mem_le_l2cap_att_states 
+45c6 c4008000 rtnbit0 ble_l2cap_deal_with_continue_packet 
+45c7 7920000f set1 mark_old_packet ,mark 
+45c8 204045de call le_parse_l2cap_continue_common 
+45c9 204045e4 call le_parse_attribute_check_complete_packet 
+45ca 205445c1 call le_clear_l2cap_att_states_deal_with_contiune_packet ,user 
+45cb 6fe0c36a fetch 1 ,mem_le_att_opcode 
+45cc c0094504 beq attop_write_request ,le_send_att_write_response_check_auth 
+45cd 20600000 rtn 
+
+le_parse_attribute_write_request:
+45ce 204045d3 call le_parse_attribute_write_command 
+45cf 202045d0 branch le_send_attribute_write_response_check_auth 
+
+le_send_attribute_write_response_check_auth:
+45d0 204045e4 call le_parse_attribute_check_complete_packet 
+45d1 24740000 nrtn user 
+45d2 20204504 branch le_send_att_write_response_check_auth 
+
+le_parse_attribute_write_command:
+45d3 470ec023 bpatchx patch23_5 ,mem_patch23 
+45d4 204045d7 call le_parse_attribute_check_complete_packet_init 
+45d5 da200050 arg mem_le_rxbuf_data_att_write_payload ,rega 
+45d6 202040a8 branch le_writeatt_cb 
+
+le_parse_attribute_check_complete_packet_init:
+45d7 6fe08048 fetch 1 ,mem_le_rxbuf_data_att_write_length 
+45d8 1fe0a5f9 add pdata ,-7 ,regb 
+45d9 1fe0fffc increase -4 ,pdata 
+45da 67e1430a store 2 ,mem_le_packet_len_recved 
+45db 68490049 fetcht 2 ,mem_le_rxbuf_data_att_write_l2cap_length 
+45dc 60494308 storet 2 ,mem_le_l2cap_size 
+45dd 20600000 rtn 
+
+le_parse_l2cap_continue_common:
+45de 6a408048 fetchr regb ,1 ,mem_le_rxbuf_data_continue_length 
+45df 6fe1430a fetch 2 ,mem_le_packet_len_recved 
+45e0 9a408400 iadd regb ,temp 
+45e1 6049430a storet 2 ,mem_le_packet_len_recved 
+45e2 da200049 arg mem_le_rxbuf_data_continue_payload ,rega 
+45e3 202040a8 branch le_writeatt_cb 
+
+le_parse_attribute_check_complete_packet:
+45e4 20407638 call disable_user 
+45e5 6fe1430a fetch 2 ,mem_le_packet_len_recved 
+45e6 68494308 fetcht 2 ,mem_le_l2cap_size 
+45e7 98467c00 isub temp ,null 
+45e8 24628000 nrtn zero 
+45e9 20207636 branch enable_user 
+
+le_parse_signaling:
+45ea efe08006 ifetch 1 ,contr 
+45eb e8408006 ifetcht 1 ,contr 
+45ec e8410006 ifetcht 2 ,contr 
+45ed c009c5ef beq l2cap_connection_parameter_update_response ,le_l2cap_parse_conn_parameter_update_rsp 
+45ee 20600000 rtn 
+
+le_l2cap_parse_conn_parameter_update_rsp:
+45ef efe10006 ifetch 2 ,contr 
+45f0 67e1430f store 2 ,mem_le_l2cap_signaling_conn_param_update_rsp_result 
+45f1 7004c340 jam bt_evt_le_parse_conn_papa_update_rsp ,mem_fifo_temp 
+45f2 2020709b branch ui_ipc_send_event 
+
+le_l2cap_tx_update_req:
+45f3 da20000c arg 0x0c ,rega 
+45f4 da600012 arg l2cap_connection_parameter_update_request ,regc 
+45f5 204045fb call le_fifo_malloc_tx_l2cap_signaling 
+45f6 58000008 setarg 0x08 
+45f7 e7e10005 istore 2 ,contw 
+45f8 6fe442a6 fetch 8 ,mem_le_interval_min 
+45f9 e7e40005 istore 8 ,contw 
+45fa 20600000 rtn 
+
+le_fifo_malloc_tx_l2cap_signaling:
+45fb 20404603 call le_l2cap_update_signaling_identifier 
+45fc da400005 arg le_l2cap_cid_signal ,regb 
+45fd 204041d6 call le_fifo_malloc_tx_l2cap 
+45fe 1a627e00 copy regc ,pdata 
+45ff e7e08005 istore 1 ,contw 
+4600 6fe0c30e fetch 1 ,mem_le_signaling_identifier 
+4601 e7e08005 istore 1 ,contw 
+4602 20600000 rtn 
+
+le_l2cap_update_signaling_identifier:
+4603 6fe0c30e fetch 1 ,mem_le_signaling_identifier 
+4604 1fe0fe01 pincrease 1 
+4605 67e0c30e store 1 ,mem_le_signaling_identifier 
+4606 c1800000 rtnne 0 
+
+le_l2cap_reset_signaling_identifier:
+4607 70430e01 jam 1 ,mem_le_signaling_identifier 
+4608 20600000 rtn 
+
+le_pairing_mode_init:
+4609 6fe0c2d1 fetch 1 ,mem_le_pairing_mode 
+460a c000460e beq le_pairing_mode_none ,le_set_no_pairing 
+460b c000c611 beq le_pairing_mode_lagacy_justwork ,le_set_pairing_mode_lagacy_just_work 
+460c c0014613 beq le_pairing_mode_lagacy_passkey ,le_set_pairing_mode_lagacy_passkey 
+460d 20600000 rtn 
+
+le_set_no_pairing:
+460e 70428700 jam flag_le_no_bonding_no_mitm ,mem_le_pres_auth 
+
+le_set_noinputnooutput:
+460f 70428503 jam flag_iocap_noinputnooutput ,mem_le_pres_iocap 
+4610 20600000 rtn 
+
+le_set_pairing_mode_lagacy_just_work:
+4611 70428705 jam flag_le_bonding_mitm ,mem_le_pres_auth 
+4612 2020460f branch le_set_noinputnooutput 
+
+le_set_pairing_mode_lagacy_passkey:
+4613 70428705 jam flag_le_bonding_mitm ,mem_le_pres_auth 
+
+le_set_displayonly:
+4614 70428500 jam flag_iocap_displayonly ,mem_le_pres_iocap 
+4615 20600000 rtn 
+
+le_parse_smp:
+4616 efe08006 ifetch 1 ,contr 
+4617 c000c628 beq smp_pairing_request ,le_parse_smp_pairing_request 
+4618 c001c649 beq smp_pairing_confirm ,le_parse_smp_pairing_confirm 
+4619 c0024658 beq smp_pairing_random ,le_parse_smp_pairing_random 
+461a c002c663 beq smp_pairing_failed ,le_parse_smp_pairing_failed 
+461b c003c6b7 beq smp_master_identification ,le_parse_smp_master_identification 
+461c c00446a3 beq smp_identity_information ,le_parse_smp_identity_information 
+461d c004c6b3 beq smp_identity_address_information ,le_parse_smp_identity_address_information 
+461e c00546b7 beq smp_signing_information ,le_parse_smp_signing_information 
+461f c005c6b7 beq smp_security_request ,le_parse_smp_security_request 
+4620 20600000 rtn 
+
+le_send_smp_security_request:
+4621 18002202 force 2 ,rega 
+4622 204046fc call le_fifo_malloc_tx_l2cap_smp 
+4623 5800000b setarg smp_security_request 
+4624 e7e08005 istore 1 ,contw 
+4625 6fe0c287 fetch 1 ,mem_le_pres_auth 
+4626 e7e08005 istore 1 ,contw 
+4627 20600000 rtn 
+
+le_parse_smp_pairing_request:
+4628 67e0c27d store 1 ,mem_le_preq 
+4629 efe30006 ifetch 6 ,contr 
+462a e7e30005 istore 6 ,contw 
+462b 6fe0c2d1 fetch 1 ,mem_le_pairing_mode 
+462c c0004669 beq le_pairing_mode_none ,le_smp_pairing_fail_reason_not_support_pairing 
+462d 20404644 call le_send_smp_pairing_response 
+
+le_parse_smp_pairing_request2:
+462e 7042cf03 jam flag_le_pairing_rcv_pairing_req ,mem_le_pairing_state 
+462f 6fe0c27e fetch 1 ,mem_le_preq_iocap 
+4630 c0004636 beq flag_iocap_displayonly ,le_set_tk_0 
+4631 c000c636 beq flag_iocap_displayyesno ,le_set_tk_0 
+4632 c001c636 beq flag_iocap_noinputnooutput ,le_set_tk_0 
+4633 6fe0c2d1 fetch 1 ,mem_le_pairing_mode 
+4634 c0014639 beq le_pairing_mode_lagacy_passkey ,le_parse_smp_pairing_req_passkey 
+4635 c1418000 rtneq le_pairing_mode_secure_connect_passkey 
+
+le_set_tk_0:
+4636 dfe00000 arg 0 ,pdata 
+4637 67e242d2 store 4 ,mem_le_tk 
+4638 20600000 rtn 
+
+le_parse_smp_pairing_req_passkey:
+4639 6fe0c2f4 fetch 1 ,mem_le_configuration 
+463a c2804642 bbit1 bit_ble_passkey_fixed_key ,le_parse_smp_pairing_req_fixed_passkey 
+
+le_genernate_tk:
+463b da2042d2 arg mem_le_tk ,rega 
+463c 1a220a00 copy rega ,contw 
+463d df200003 arg 3 ,loopcnt 
+463e 20407662 call generate_random_loop 
+463f 6fe142d4 fetch 2 ,mem_le_tk + 2 
+4640 1fe17e07 and_into 0x7 ,pdata 
+4641 67e142d4 store 2 ,mem_le_tk + 2 
+
+le_parse_smp_pairing_req_fixed_passkey:
+4642 7004c334 jam bt_evt_le_tk_generate ,mem_fifo_temp 
+4643 2020709b branch ui_ipc_send_event 
+
+le_send_smp_pairing_response:
+4644 18002207 force 7 ,rega 
+4645 204046fc call le_fifo_malloc_tx_l2cap_smp 
+4646 6fe3c284 fetch 7 ,mem_le_pres 
+4647 e7e38005 istore 7 ,contw 
+4648 20600000 rtn 
+
+le_parse_smp_pairing_confirm:
+4649 7042cf05 jam flag_le_pairing_receive_pairing_confirm ,mem_le_pairing_state 
+464a d8a0425b arg mem_le_rconfirm ,contw 
+464b 204074f5 call memcpy16 
+464c 6fe0c2d1 fetch 1 ,mem_le_pairing_mode 
+464d c002464f beq le_pairing_mode_lagacy_passkey_res_input ,le_parse_smp_pairing_confirm_passkey_res_input 
+464e 20204651 branch le_send_smp_pairing_confirm 
+
+le_parse_smp_pairing_confirm_passkey_res_input:
+464f 7004c343 jam bt_evt_le_get_passkey ,mem_fifo_temp 
+4650 2020709b branch ui_ipc_send_event 
+
+le_send_smp_pairing_confirm:
+4651 7042cf06 jam flag_le_pairing_send_pairing_confirm ,mem_le_pairing_state 
+4652 20406e65 call generate_confirm 
+4653 18002211 force 17 ,rega 
+4654 204046fc call le_fifo_malloc_tx_l2cap_smp 
+4655 58000003 setarg smp_pairing_confirm 
+4656 e7e08005 istore 1 ,contw 
+4657 20206fb1 branch store_aes_result 
+
+le_parse_smp_pairing_random:
+4658 18c22200 copy contr ,rega 
+4659 1a220c00 copy rega ,contr 
+465a 20406e5d call authenticate_rconfirm 
+465b 2022c66b branch le_parse_smp_pairing_random_success ,zero 
+
+le_send_pairing_confirm_value_failed:
+465c 7001b504 jam pairing_failed_confirm_value_failed ,mem_le_ll_pairing_fail_reason 
+
+le_send_pairing_failed:
+465d 18002202 force 2 ,rega 
+465e 204046fc call le_fifo_malloc_tx_l2cap_smp 
+465f 58000005 setarg smp_pairing_failed 
+4660 e7e08005 istore 1 ,contw 
+4661 6fe081b5 fetch 1 ,mem_le_ll_pairing_fail_reason 
+4662 e7e08005 istore 1 ,contw 
+
+le_parse_smp_pairing_failed:
+4663 470f4023 bpatchx patch23_6 ,mem_patch23 
+4664 18000e07 force smp_pairing_timer ,queue 
+4665 2040754e call timer_stop 
+4666 7042cf00 jam flag_le_pairing_null ,mem_le_pairing_state 
+4667 7004c330 jam bt_evt_le_pairing_fail ,mem_fifo_temp 
+4668 2020709b branch ui_ipc_send_event 
+
+le_smp_pairing_fail_reason_not_support_pairing:
+4669 7001b505 jam pairing_failed_pairing_not_supported ,mem_le_ll_pairing_fail_reason 
+466a 2020465d branch le_send_pairing_failed 
+
+le_parse_smp_pairing_random_success:
+466b 20406e59 call generate_stk 
+466c 7004c331 jam bt_evt_le_pairing_success ,mem_fifo_temp 
+466d 2040709b call ui_ipc_send_event 
+466e 70425a01 jam 1 ,mem_ltk_exists 
+466f 7042cf09 jam flag_le_pairing_after_auth ,mem_le_pairing_state 
+
+le_send_smp_pairing_random:
+4670 18002211 force 17 ,rega 
+4671 204046fc call le_fifo_malloc_tx_l2cap_smp 
+4672 58000004 setarg smp_pairing_random 
+4673 e7e08005 istore 1 ,contw 
+4674 d8c0426b arg mem_le_srand ,contr 
+4675 202074f5 branch memcpy16 
+
+le_send_smp_encryption_information:
+4676 18002211 force 17 ,rega 
+4677 204046fc call le_fifo_malloc_tx_l2cap_smp 
+4678 58000006 setarg smp_encryption_information 
+4679 e7e08005 istore 1 ,contw 
+467a 6fe0c2f4 fetch 1 ,mem_le_configuration 
+467b c280c67e bbit1 bit_ble_pairing_fixed_ltk ,le_send_fixed_ltk 
+467c d8c0424a arg mem_le_ltk ,contr 
+467d 202074f5 branch memcpy16 
+
+le_send_fixed_ltk:
+467e d8c042f5 arg mem_le_fixed_ltk ,contr 
+467f 202074f5 branch memcpy16 
+
+le_send_smp_master_identification:
+4680 d8a042d6 arg mem_le_ediv ,contw 
+4681 1800720a force 10 ,loopcnt 
+4682 20407662 call generate_random_loop 
+4683 1800220b force 11 ,rega 
+4684 204046fc call le_fifo_malloc_tx_l2cap_smp 
+4685 58000007 setarg smp_master_identification 
+4686 e7e08005 istore 1 ,contw 
+4687 6fe142d6 fetch 2 ,mem_le_ediv 
+4688 e7e10005 istore 2 ,contw 
+4689 6fe442d8 fetch 8 ,mem_le_rand 
+468a e7e40005 istore 8 ,contw 
+468b 20600000 rtn 
+
+le_send_smp_identity_information:
+468c 18002211 force 17 ,rega 
+468d 204046fc call le_fifo_malloc_tx_l2cap_smp 
+468e 58000008 setarg smp_identity_information 
+468f e7e08005 istore 1 ,contw 
+4690 58000000 setarg 0 
+4691 e7e40005 istore 8 ,contw 
+4692 e7e40005 istore 8 ,contw 
+4693 20600000 rtn 
+
+le_send_smp_identity_address_information:
+4694 18002208 force 8 ,rega 
+4695 204046fc call le_fifo_malloc_tx_l2cap_smp 
+4696 58000009 setarg smp_identity_address_information 
+4697 e7e08005 istore 1 ,contw 
+4698 6fe0c2a5 fetch 1 ,mem_le_conn_own_addr_type 
+4699 e7e08005 istore 1 ,contw 
+469a 6fe342ae fetch 6 ,mem_le_lap 
+469b e7e30005 istore 6 ,contw 
+469c 20600000 rtn 
+
+le_send_pairing_fail_unspecified_reason:
+469d 7001b508 jam pairing_failed_unspecified_reason ,mem_le_ll_pairing_fail_reason 
+469e 2020465d branch le_send_pairing_failed 
+
+le_check_init_key_distribution:
+469f 6fe0c289 fetch 1 ,mem_le_pres_init_key_distribution 
+46a0 6848c289 fetcht 1 ,mem_le_pres_init_key_distribution 
+46a1 98417e00 iand temp ,pdata 
+46a2 20600000 rtn 
+
+le_parse_smp_identity_information:
+46a3 d8a042e0 arg mem_le_irk ,contw 
+46a4 204074f5 call memcpy16 
+46a5 2040469f call le_check_init_key_distribution 
+46a6 2fec0001 isolate0 le_initator_irk_bit ,pdata 
+46a7 2020c69d branch le_send_pairing_fail_unspecified_reason ,true 
+46a8 6fe0c095 fetch 1 ,mem_device_option 
+46a9 c1850000 rtnne dvc_op_module 
+46aa 204046ad call le_check_master_addr_type 
+46ab 24740000 nrtn user 
+46ac 20204e2a branch app_ble_store_reconn_info 
+
+le_check_master_addr_type:
+46ad 20407638 call disable_user 
+46ae 6fe0c29e fetch 1 ,mem_le_conn_peer_addr_type 
+46af c1000000 rtneq master_public_addr 
+46b0 6fe0c282 fetch 1 ,mem_le_preq_init_key_distribution 
+46b1 c4008000 rtnbit0 le_initator_irk_bit 
+46b2 20207636 branch enable_user 
+
+le_parse_smp_identity_address_information:
+46b3 2040469f call le_check_init_key_distribution 
+46b4 2fec0001 isolate0 le_initator_irk_bit ,pdata 
+46b5 2020c69d branch le_send_pairing_fail_unspecified_reason ,true 
+46b6 20600000 rtn 
+
+le_parse_smp_master_identification:
+
+le_parse_smp_signing_information:
+
+le_parse_smp_security_request:
+46b7 20600000 rtn 
+
+le_check_paring_time:
+46b8 6fe0c2cf fetch 1 ,mem_le_pairing_state 
+46b9 c17f8000 rtneq flag_le_pairing_end 
+46ba d8400003 arg flag_le_pairing_rcv_pairing_req ,temp 
+46bb 98467c00 isub temp ,null 
+46bc 24610000 nrtn positive 
+46bd d8e00007 arg smp_pairing_timer ,queue 
+46be 2040755d call timer_check 
+46bf 247a0000 nrtn blank 
+46c0 2020469d branch le_send_pairing_fail_unspecified_reason 
+
+le_pairing_sm:
+46c1 470fc023 bpatchx patch23_7 ,mem_patch23 
+46c2 20404203 call le_fifo_check_nearly_full 
+46c3 247a0000 nrtn blank 
+46c4 6fe0c2cf fetch 1 ,mem_le_pairing_state 
+46c5 c00046ce beq flag_le_pairing_null ,le_pairing_sm_null 
+46c6 c000c6d4 beq flag_le_pairing_start ,le_pairing_sm_start 
+46c7 c00146ce beq flag_le_pairing_send_recurity_req ,le_pairing_sm_send_sec_req 
+46c8 c001c6d6 beq flag_le_pairing_rcv_pairing_req ,le_pairing_sm_rcv_pairing_req 
+46c9 c004c6da beq flag_le_pairing_after_auth ,le_pairing_sm_after_auth 
+46ca c005c6ea beq flag_le_paring_send_enc_information ,le_pairng_sm_send_enc_information 
+46cb c00646ec beq flag_le_paring_send_master_identification ,le_pairng_sm_send_master_indentification 
+46cc c006c6f3 beq flag_le_paring_send_indentity_information ,le_pairng_sm_send_indentity_information 
+46cd 20600000 rtn 
+
+le_pairing_sm_null:
+
+le_pairing_sm_send_sec_req:
+46ce 6fe0c2d0 fetch 1 ,mem_le_enc_state 
+46cf c1820000 rtnne flag_le_send_start_enc_rsp 
+46d0 7042d0ff jam flag_le_enc_end ,mem_le_enc_state 
+46d1 7042cfff jam flag_le_pairing_end ,mem_le_pairing_state 
+46d2 7004c33f jam bt_evt_le_reconnect_complete ,mem_fifo_temp 
+46d3 2020709b branch ui_ipc_send_event 
+
+le_pairing_sm_start:
+46d4 7042cf02 jam flag_le_pairing_send_recurity_req ,mem_le_pairing_state 
+46d5 20204621 branch le_send_smp_security_request 
+
+le_pairing_sm_rcv_pairing_req:
+46d6 7042cf04 jam flag_le_pairing_wait_stk_generation ,mem_le_pairing_state 
+46d7 58017700 setarg timer_smp_pairing_timeout 
+46d8 d8e00007 arg smp_pairing_timer ,queue 
+46d9 2020754f branch timer_init 
+
+le_pairing_sm_after_auth:
+46da 6fe0c2d0 fetch 1 ,mem_le_enc_state 
+46db c00246dd beq flag_le_send_start_enc_rsp ,le_pairing_sm_after_auth_start_enc 
+46dc 20600000 rtn 
+
+le_pairing_sm_after_auth_start_enc:
+46dd 6fe0c2d1 fetch 1 ,mem_le_pairing_mode 
+46de c283c6e8 bbit1 le_pairing_mode_secure_connect_bit ,le_pairing_sm_after_auth_start_enc_sc 
+46df 7042cf0b jam flag_le_paring_send_enc_information ,mem_le_pairing_state 
+46e0 20404676 call le_send_smp_encryption_information 
+
+le_pairing_sm_after_auth_start_enc_common:
+46e1 7004c329 jam bt_evt_le_enc_info ,mem_fifo_temp 
+46e2 2040709b call ui_ipc_send_event 
+46e3 6fe0c095 fetch 1 ,mem_device_option 
+46e4 c1850000 rtnne dvc_op_module 
+46e5 204046ad call le_check_master_addr_type 
+46e6 20740000 rtn user 
+46e7 20204e2a branch app_ble_store_reconn_info 
+
+le_pairing_sm_after_auth_start_enc_sc:
+46e8 7042cf0c jam flag_le_paring_send_master_identification ,mem_le_pairing_state 
+46e9 202046e1 branch le_pairing_sm_after_auth_start_enc_common 
+
+le_pairng_sm_send_enc_information:
+46ea 7042cf0c jam flag_le_paring_send_master_identification ,mem_le_pairing_state 
+46eb 20204680 branch le_send_smp_master_identification 
+
+le_pairng_sm_send_master_indentification:
+46ec 6fe0c283 fetch 1 ,mem_le_preq_resp_key_distribution 
+46ed 6848c28a fetcht 1 ,mem_le_pres_resp_key_distribution 
+46ee 98417e00 iand temp ,pdata 
+46ef 2fec0001 isolate0 le_initator_irk_bit ,pdata 
+46f0 2020c6f5 branch le_parse_start_enc_rsp_after_auth_end ,true 
+46f1 7042cf0d jam flag_le_paring_send_indentity_information ,mem_le_pairing_state 
+46f2 2020468c branch le_send_smp_identity_information 
+
+le_pairng_sm_send_indentity_information:
+46f3 20404694 call le_send_smp_identity_address_information 
+46f4 202046f5 branch le_parse_start_enc_rsp_after_auth_end 
+
+le_parse_start_enc_rsp_after_auth_end:
+46f5 47104024 bpatchx patch24_0 ,mem_patch24 
+46f6 18000e07 force smp_pairing_timer ,queue 
+46f7 2040754e call timer_stop 
+46f8 7042d0ff jam flag_le_enc_end ,mem_le_enc_state 
+46f9 7042cfff jam flag_le_pairing_end ,mem_le_pairing_state 
+46fa 7004c33e jam bt_evt_le_pairing_complete ,mem_fifo_temp 
+46fb 2020709b branch ui_ipc_send_event 
+
+le_fifo_malloc_tx_l2cap_smp:
+46fc 47114024 bpatchx patch24_2 ,mem_patch24 
+46fd 18002406 force le_l2cap_cid_smp ,regb 
+46fe 202041d6 branch le_fifo_malloc_tx_l2cap 
+
+le_parse_ll:
+46ff 6fe08049 fetch 1 ,mem_le_rxbuf_data_ll_opcode 
+4700 c0004716 beq ll_connection_update_ind ,le_parse_connection_update_ind 
+4701 c000c71e beq ll_channel_map_ind ,le_parse_channel_map_ind 
+4702 c0014726 beq ll_terminate_ind ,le_parse_terminate_ind 
+4703 c001c72a beq ll_enc_req ,le_parse_enc_req 
+4704 c0024748 beq ll_enc_rsp ,le_parse_enc_rsp 
+4705 c002c74d beq ll_start_enc_req ,le_parse_start_enc_req 
+4706 c0034751 beq ll_start_enc_rsp ,le_parse_start_enc_rsp 
+4707 c003c756 beq ll_unknown_rsp ,le_parse_unknown_rsp 
+4708 c0044757 beq ll_feature_req ,le_parse_feature_req 
+4709 c004c758 beq ll_feature_rsp ,le_parse_feature_rsp 
+470a c0054759 beq ll_pause_enc_req ,le_parse_pause_enc_req 
+470b c005c75d beq ll_pause_enc_rsp ,le_parse_pause_enc_rsp 
+470c c006475e beq ll_version_ind ,le_parse_version_ind 
+470d c006c760 beq ll_reject_ind ,le_parse_reject_ind 
+470e c0094761 beq ll_ping_req ,le_parse_ping_req 
+470f c009c762 beq ll_ping_rsp ,le_parse_ping_rsp 
+4710 c00a4763 beq ll_length_req ,le_parse_length_req 
+4711 c00ac765 beq ll_length_rsp ,le_parse_length_rsp 
+4712 c00b4770 beq ll_phy_req ,le_parse_phy_req 
+4713 c00c4771 beq ll_phy_update_ind ,le_parse_phy_update_ind 
+4714 6a608049 fetchr regc ,1 ,mem_le_rxbuf_data_ll_opcode 
+4715 20204794 branch le_send_unknown_rsp 
+
+le_parse_connection_update_ind:
+4716 efe48006 ifetch 9 ,contr 
+4717 67e4819a store 9 ,mem_le_new_param 
+4718 efe10006 ifetch 2 ,contr 
+4719 67e10183 store 2 ,mem_le_instant 
+471a 6fe08163 fetch 1 ,mem_le_state 
+471b 79207e05 set1 lestate_update_param ,pdata 
+471c 67e08163 store 1 ,mem_le_state 
+471d 20600000 rtn 
+
+le_parse_channel_map_ind:
+471e efe28006 ifetch 5 ,contr 
+471f 67e2819a store 5 ,mem_le_new_map 
+4720 efe10006 ifetch 2 ,contr 
+4721 67e10183 store 2 ,mem_le_instant 
+
+le_update_map_enable:
+4722 6fe08163 fetch 1 ,mem_le_state 
+4723 79207e06 set1 lestate_update_map ,pdata 
+4724 67e08163 store 1 ,mem_le_state 
+4725 20600000 rtn 
+
+le_parse_terminate_ind:
+4726 58000014 setarg 20 
+4727 67e10191 store 2 ,mem_le_superto 
+4728 67e142c8 store 2 ,mem_le_init_superto 
+4729 20600000 rtn 
+
+le_parse_enc_req:
+472a efe40006 ifetch 8 ,contr 
+472b 67e442d8 store 8 ,mem_le_rand 
+472c efe10006 ifetch 2 ,contr 
+472d 67e142d6 store 2 ,mem_le_ediv 
+472e efe40006 ifetch 8 ,contr 
+472f 67e442b8 store 8 ,mem_le_skdm 
+4730 efe20006 ifetch 4 ,contr 
+4731 67e2440b store 4 ,mem_ccm_ivm 
+4732 20404781 call le_send_enc_rsp 
+4733 4711c024 bpatchx patch24_3 ,mem_patch24 
+4734 6fe0c2cf fetch 1 ,mem_le_pairing_state 
+4735 c004c73c beq flag_le_pairing_after_auth ,le_parse_enc_req_after_auth 
+4736 6fe0c2f4 fetch 1 ,mem_le_configuration 
+4737 c280c73f bbit1 bit_ble_pairing_fixed_ltk ,le_parse_enc_req_fixed_ltk 
+4738 6fe0c3af fetch 1 ,mem_nv_data_number 
+4739 245a6bf8 ncall load_device_list_mode_4 ,blank 
+473a 6fe0c25a fetch 1 ,mem_ltk_exists 
+473b c0004744 beq 0 ,le_ltk_lost 
+
+le_parse_enc_req_after_auth:
+473c 7042d001 jam flag_le_rcv_enc_start ,mem_le_enc_state 
+473d 2040478f call le_send_start_enc_req 
+473e 20206e6b branch generate_sk 
+
+le_parse_enc_req_fixed_ltk:
+473f 70425a01 jam 1 ,mem_ltk_exists 
+4740 d8c042f5 arg mem_le_fixed_ltk ,contr 
+4741 d8a0424a arg mem_le_ltk ,contw 
+4742 204074f5 call memcpy16 
+4743 2020473c branch le_parse_enc_req_after_auth 
+
+le_ltk_lost:
+4744 7042d000 jam flag_le_enc_null ,mem_le_enc_state 
+4745 7042cf00 jam flag_le_enc_null ,mem_le_pairing_state 
+4746 7004c341 jam bt_evt_le_ltk_lost ,mem_fifo_temp 
+4747 2020709b branch ui_ipc_send_event 
+
+le_parse_enc_rsp:
+4748 efe40006 ifetch 8 ,contr 
+4749 67e442c0 store 8 ,mem_le_skds 
+474a efe20006 ifetch 4 ,contr 
+474b 67e2440f store 4 ,mem_ccm_ivs 
+474c 20206e6b branch generate_sk 
+
+le_parse_start_enc_req:
+474d 6fe08163 fetch 1 ,mem_le_state 
+474e 79207e04 set1 lestate_encryption ,pdata 
+474f 67e08163 store 1 ,mem_le_state 
+4750 20600000 rtn 
+
+le_parse_start_enc_rsp:
+4751 20748000 rtn master 
+4752 7004c332 jam bt_evt_le_start_enc ,mem_fifo_temp 
+4753 2040709b call ui_ipc_send_event 
+4754 7042d004 jam flag_le_send_start_enc_rsp ,mem_le_enc_state 
+4755 20204792 branch le_send_start_enc_rsp 
+
+le_parse_unknown_rsp:
+4756 20600000 rtn 
+
+le_parse_feature_req:
+4757 20204799 branch le_send_feature_rsp 
+
+le_parse_feature_rsp:
+4758 20600000 rtn 
+
+le_parse_pause_enc_req:
+4759 7042d002 jam flag_le_enc_pause ,mem_le_enc_state 
+475a 204047a0 call le_send_pause_enc_rsp 
+475b 7004c333 jam bt_evt_le_pause_enc ,mem_fifo_temp 
+475c 2020709b branch ui_ipc_send_event 
+
+le_parse_pause_enc_rsp:
+475d 20600000 rtn 
+
+le_parse_version_ind:
+475e 20748000 rtn master 
+475f 202047a2 branch le_send_version_ind 
+
+le_parse_reject_ind:
+4760 20600000 rtn 
+
+le_parse_ping_req:
+4761 202047ae branch le_send_ping_rsp 
+
+le_parse_ping_rsp:
+4762 20600000 rtn 
+
+le_parse_length_req:
+4763 20404765 call le_parse_length_rsp 
+4764 202047b2 branch le_send_data_length_res 
+
+le_parse_length_rsp:
+4765 efe40006 ifetch 8 ,contr 
+4766 67e44378 store 8 ,mem_remote_rx_max_octets 
+4767 6fe14378 fetch 2 ,mem_remote_rx_max_octets 
+4768 68494384 fetcht 2 ,mem_local_tx_max_octets 
+4769 2040762c call not_greater_than 
+476a 67e14378 store 2 ,mem_remote_rx_max_octets 
+476b 6fe1437c fetch 2 ,mem_remote_tx_max_octets 
+476c 68494380 fetcht 2 ,mem_local_rx_max_octets 
+476d 2040762c call not_greater_than 
+476e 67e1437c store 2 ,mem_remote_tx_max_octets 
+476f 20600000 rtn 
+
+le_parse_phy_req:
+4770 202047b8 branch le_send_phy_rsp 
+
+le_parse_phy_update_ind:
+4771 efe10006 ifetch 2 ,contr 
+4772 67e1019a store 2 ,mem_le_new_m2s_phy 
+4773 efe10006 ifetch 2 ,contr 
+4774 67e10183 store 2 ,mem_le_instant 
+4775 207a0000 rtn blank 
+4776 6fe08163 fetch 1 ,mem_le_state 
+4777 79207e07 set1 lestate_update_phy ,pdata 
+4778 67e08163 store 1 ,mem_le_state 
+4779 20600000 rtn 
+
+le_send_terminate_ind_user_terminated:
+477a da600013 arg error_remote_user_terminated_connection ,regc 
+
+le_send_terminate_ind:
+477b da200002 arg 2 ,rega 
+477c da400002 arg ll_terminate_ind ,regb 
+477d 204041d0 call le_fifo_malloc_tx_ll 
+477e 1a627e00 copy regc ,pdata 
+477f e7e08005 istore 1 ,contw 
+4780 20600000 rtn 
+
+le_send_enc_rsp:
+4781 d8a042c0 arg mem_le_skds ,contw 
+4782 18007208 force 8 ,loopcnt 
+4783 20407662 call generate_random_loop 
+4784 d8a0440f arg mem_ccm_ivs ,contw 
+4785 18007204 force 4 ,loopcnt 
+4786 20407662 call generate_random_loop 
+4787 da20000d arg 13 ,rega 
+4788 da400004 arg ll_enc_rsp ,regb 
+4789 204041d0 call le_fifo_malloc_tx_ll 
+478a 6fe442c0 fetch 8 ,mem_le_skds 
+478b e7e40005 istore 8 ,contw 
+478c 6fe2440f fetch 4 ,mem_ccm_ivs 
+478d e7e20005 istore 4 ,contw 
+478e 20600000 rtn 
+
+le_send_start_enc_req:
+478f 7042d005 jam flag_le_send_start_enc_req ,mem_le_enc_state 
+4790 da400005 arg ll_start_enc_req ,regb 
+4791 202047c2 branch le_send_ll_one_lenth 
+
+le_send_start_enc_rsp:
+4792 da400006 arg ll_start_enc_rsp ,regb 
+4793 202047c2 branch le_send_ll_one_lenth 
+
+le_send_unknown_rsp:
+4794 da200002 arg 2 ,rega 
+4795 da400007 arg ll_unknown_rsp ,regb 
+4796 204041d0 call le_fifo_malloc_tx_ll 
+4797 e2608005 istorer regc ,1 ,contw 
+4798 20600000 rtn 
+
+le_send_feature_rsp:
+4799 da200009 arg 9 ,rega 
+479a da400009 arg ll_feature_rsp ,regb 
+479b 204041d0 call le_fifo_malloc_tx_ll 
+479c 6fe4436e fetch 8 ,mem_le_local_feature 
+479d 1fe1fe01 or pdata ,fun_ll_feature_le_encryption ,pdata 
+479e e7e40005 istore 8 ,contw 
+479f 20600000 rtn 
+
+le_send_pause_enc_rsp:
+47a0 da40000b arg ll_pause_enc_rsp ,regb 
+47a1 202047c2 branch le_send_ll_one_lenth 
+
+le_send_version_ind:
+47a2 da200006 arg 6 ,rega 
+47a3 da40000c arg ll_version_ind ,regb 
+47a4 204041d0 call le_fifo_malloc_tx_ll 
+47a5 6fe2c120 fetch 5 ,mem_version 
+47a6 e7e28005 istore 5 ,contw 
+47a7 20600000 rtn 
+
+le_send_reject_ind:
+47a8 da200002 arg 2 ,rega 
+47a9 da40000d arg ll_reject_ind ,regb 
+47aa 204041d0 call le_fifo_malloc_tx_ll 
+47ab 58000006 setarg le_err_pin_or_key_missing 
+47ac e7e08005 istore 1 ,contw 
+47ad 20600000 rtn 
+
+le_send_ping_rsp:
+47ae da400013 arg ll_ping_rsp ,regb 
+47af 202047c2 branch le_send_ll_one_lenth 
+
+le_send_data_length_req:
+47b0 da400014 arg ll_length_req ,regb 
+47b1 202047b3 branch le_send_data_length 
+
+le_send_data_length_res:
+47b2 da400015 arg ll_length_rsp ,regb 
+
+le_send_data_length:
+47b3 da200009 arg 9 ,rega 
+47b4 204041d0 call le_fifo_malloc_tx_ll 
+47b5 6fe44380 fetch 8 ,mem_local_rx_max_octets 
+47b6 e7e40005 istore 8 ,contw 
+47b7 20600000 rtn 
+
+le_send_phy_rsp:
+47b8 da200003 arg 3 ,rega 
+47b9 da400017 arg ll_phy_rsp ,regb 
+47ba 204041d0 call le_fifo_malloc_tx_ll 
+47bb 6fe0c376 fetch 1 ,mem_le_tx_phys 
+47bc 1fe17e07 and pdata ,0x07 ,pdata 
+47bd e7e08005 istore 1 ,contw 
+47be 6fe0c377 fetch 1 ,mem_le_rx_phys 
+47bf 1fe17e07 and pdata ,0x07 ,pdata 
+47c0 e7e08005 istore 1 ,contw 
+47c1 20600000 rtn 
+
+le_send_ll_one_lenth:
+47c2 da200001 arg 1 ,rega 
+47c3 202041d0 branch le_fifo_malloc_tx_ll 
+
+g24_dispatch:
+47c4 47124024 bpatchx patch24_4 ,mem_patch24 
+47c5 c513ca39 bmark1 mark_24g_rxmode ,g24_receive_dispatch 
+47c6 20204c86 branch g24_transmit_dispatch 
+
+g24_prep:
+47c7 4712c024 bpatchx patch24_5 ,mem_patch24 
+47c8 7844fc00 disable enable_crc 
+47c9 7843fc00 disable enable_white 
+47ca 58555555 setarg 0x555555 
+47cb 98001e00 iforce crc24_init 
+47cc 6fe0c4d3 fetch 1 ,mem_24g_ch 
+47cd 20203d42 branch le_prep_next 
+
+g24_receive_packet:
+47ce 47134024 bpatchx patch24_6 ,mem_patch24 
+47cf 6fe0c4fd fetch 1 ,mem_24g_rx_phy 
+47d0 20403d16 call le_enable_phy_by_pdata 
+47d1 6fe244d5 fetch 4 ,mem_24g_addr 
+47d2 98001200 iforce access 
+47d3 20403925 call set_sync_on 
+47d4 6848c4d3 fetcht 1 ,mem_24g_ch 
+47d5 20403d47 call le_rf_rx_enable 
+
+g24_receive_rxon:
+47d6 204047c7 call g24_prep 
+47d7 c597c7db bmark0 mark_ble_lr ,g24_receive_nolr 
+47d8 783cfc00 pulse dewhiten_code_calc 
+47d9 2000001e nop 30 
+47da 204047c7 call g24_prep 
+
+g24_receive_nolr:
+47db 7857fc00 disable user3 
+47dc 7826fc00 enable decode_fec0 
+47dd 7830fc00 enable is_rx 
+47de 78507c00 disable is_tx 
+47df 78287c00 enable swfine 
+47e0 6fe144d1 fetch 2 ,mem_24g_rx_window 
+47e1 98003600 iforce stop_watch 
+47e2 37c18400 correlate null ,timeout 
+47e3 242c4835 nbranch g24_sync_timeout ,sync 
+47e4 2040644b call rf_debug_rx_sync_line 
+47e5 c517c7ea bmark1 mark_ble_lr ,g24_receive_skip_fec1 
+47e6 6fe0c510 fetch 1 ,mem_24g_disable_fec1 
+47e7 243a47ea nbranch g24_receive_skip_fec1 ,blank 
+47e8 7846fc00 disable decode_fec0 
+47e9 7825fc00 enable decode_fec1 
+
+g24_receive_skip_fec1:
+47ea 7823fc00 enable enable_white 
+47eb 7824fc00 enable enable_crc 
+47ec 20404832 call g24_receive_byte 
+47ed 67e0c4f3 store 1 ,mem_24g_get_syncword_crc8 
+47ee 6848c4f2 fetcht 1 ,mem_24g_syncword_crc8 
+47ef 98467c00 isub temp ,null 
+47f0 2422c837 nbranch g24_end_of_packet ,zero 
+47f1 4713c024 bpatchx patch24_7 ,mem_patch24 
+47f2 7858fc00 disable user7 
+47f3 280ffe2f isolate1 mark_ble_lr ,mark 
+47f4 2040c824 call g24_lr_receive_pdu_len ,true 
+47f5 2038c837 branch g24_end_of_packet ,user7 
+47f6 20404832 call g24_receive_byte 
+47f7 67e0c43d store 1 ,mem_24g_rxbuf 
+47f8 c513c7fd bmark1 mark_24g_rxmode ,g24_receive_skip 
+47f9 6fe0c43d fetch 1 ,mem_24g_rxbuf 
+47fa 6848c4cf fetcht 1 ,mem_24g_data_type 
+47fb a8400e00 icompare bits_data ,temp 
+47fc 2420c837 nbranch g24_end_of_packet ,true 
+
+g24_receive_skip:
+47fd 20404832 call g24_receive_byte 
+47fe 280ffe2f isolate1 mark_ble_lr ,mark 
+47ff 2040c82d call g24_lr_receive_payload_len ,true 
+4800 e7e08005 istore 1 ,contw 
+4801 1fe97e00 rshift3 pdata ,pdata 
+4802 1fe67c1f sub pdata ,0x1f ,null 
+4803 24214837 nbranch g24_end_of_packet ,positive 
+4804 1fe27200 copy pdata ,loopcnt 
+4805 2022c809 branch g24rx_nopayload ,zero 
+
+g24rx_loop:
+4806 20404832 call g24_receive_byte 
+4807 e7e08005 istore 1 ,contw 
+4808 c2004806 loop g24rx_loop 
+
+g24rx_nopayload:
+4809 c513c80e bmark1 mark_24g_rxmode ,g24_receive_skip_rssi 
+480a 18a22200 copy contw ,rega 
+480b 20404832 call g24_receive_byte 
+480c 67e0c518 store 1 ,mem_rssi_hex_received 
+480d 1a220a00 copy rega ,contw 
+
+g24_receive_skip_rssi:
+480e 09800018 parse demod ,bucket ,24 
+480f 1fef7e00 rshift32 pdata ,pdata 
+4810 1ff17e00 rshift16 pdata ,pdata 
+4811 e7e18005 istore 3 ,contw 
+4812 6fe0c510 fetch 1 ,mem_24g_disable_fec1 
+4813 243a4822 nbranch g24_receive_skip_disable_fec1 ,blank 
+4814 7845fc00 disable decode_fec1 
+
+g24_receive_skip_next:
+4815 280ffe27 isolate1 mark_24g_rxmode ,mark 
+4816 2040cc49 call save_rssi_dec ,true 
+4817 20234837 branch g24_end_of_packet ,crc_failed 
+4818 2040644a call rf_debug_rx_crc_line 
+4819 7837fc00 enable user3 
+481a 20403e33 call le_match_set_txfreq 
+481b 47144025 bpatchx patch25_0 ,mem_patch25 
+481c c6138000 rtnmark1 mark_24g_rxmode 
+481d 6fe0c518 fetch 1 ,mem_rssi_hex_received 
+481e 6848c567 fetcht 1 ,mem_rssi_hex_received_max_value 
+481f 98467c00 isub temp ,null 
+4820 2041762e call copy_temp2pdata ,positive 
+4821 20204c4d branch rssi_signal 
+
+g24_receive_skip_disable_fec1:
+4822 7846fc00 disable decode_fec0 
+4823 20204815 branch g24_receive_skip_next 
+
+g24_lr_receive_pdu_len:
+4824 20404832 call g24_receive_byte 
+4825 1fe67c01 sub pdata ,1 ,null 
+4826 2021763e branch enable_user7 ,positive 
+4827 1fe0fffe increase -2 ,pdata 
+4828 c513c82b bmark1 mark_24g_rxmode ,g24_lr_receive_pdu_norssi 
+4829 203a763e branch enable_user7 ,blank 
+482a 1fe0ffff increase -1 ,pdata 
+
+g24_lr_receive_pdu_norssi:
+482b 67e084cc store 1 ,mem_temp 
+482c 20600000 rtn 
+
+g24_lr_receive_payload_len:
+482d 1fe17e07 and_into 0x07 ,pdata 
+482e 684884cc fetcht 1 ,mem_temp 
+482f 18498400 lshift3 temp ,temp 
+4830 9841fe00 ior temp ,pdata 
+4831 20600000 rtn 
+
+g24_receive_byte:
+4832 09800008 parse demod ,bucket ,8 
+4833 19897e00 rshift3 pwindow ,pdata 
+4834 20600000 rtn 
+
+g24_sync_timeout:
+4835 280ffe27 isolate1 mark_24g_rxmode ,mark 
+4836 2040cc65 call rssi_noise ,true 
+
+g24_end_of_packet:
+4837 4714c025 bpatchx patch25_1 ,mem_patch25 
+4838 20403d36 call le_disable 
+4839 784dfc00 disable encode_fec1 
+483a 7845fc00 disable decode_fec1 
+483b 202038cb branch end_of_packet 
+
+g24_set_freq_tx:
+483c 20403925 call set_sync_on 
+483d 6848c4d3 fetcht 1 ,mem_24g_ch 
+483e 202039c9 branch set_freq_tx 
+
+g24_transmit:
+483f 47154025 bpatchx patch25_2 ,mem_patch25 
+4840 6fe0c4fe fetch 1 ,mem_24g_tx_phy 
+4841 20403d16 call le_enable_phy_by_pdata 
+4842 6fe244d5 fetch 4 ,mem_24g_addr 
+4843 98001200 iforce access 
+4844 204047c7 call g24_prep 
+4845 2040483c call g24_set_freq_tx 
+4846 79202a00 set1 txgfsk ,radio_ctrl 
+4847 782efc00 enable encode_fec0 
+4848 78307c00 enable is_tx 
+4849 7850fc00 disable is_rx 
+484a 20406451 call rf_debug_tx_on_line 
+484b 785d7c00 disable lr_s2en 
+484c c517c871 bmark1 mark_ble_lr ,g24_transmit_lr 
+484d c516c883 bmark1 mark_ble_2m ,g24_transmit_2m 
+484e 19317e00 rshift16 access ,pdata 
+484f 1fecfe00 rshift8 pdata ,pdata 
+4850 1ff1fe00 rshift4 pdata ,pdata 
+4851 08008628 inject mod ,40 
+
+g24_transmit_packet:
+4852 4715c025 bpatchx patch25_3 ,mem_patch25 
+4853 c517c858 bmark1 mark_ble_lr ,g24_transmit_nolr 
+4854 6fe0c510 fetch 1 ,mem_24g_disable_fec1 
+4855 243a4858 nbranch g24_transmit_nolr ,blank 
+4856 784efc00 disable encode_fec0 
+4857 782dfc00 enable encode_fec1 
+
+g24_transmit_nolr:
+4858 7823fc00 enable enable_white 
+4859 7824fc00 enable enable_crc 
+485a 6fe0c4d0 fetch 1 ,mem_24g_txlen 
+485b 98007200 iforce loopcnt 
+485c d8c0447f arg mem_24g_txpayload ,contr 
+
+g24tr_loop:
+485d efe08006 ifetch 1 ,contr 
+485e 08008608 inject mod ,8 
+485f c200485d loop g24tr_loop 
+4860 78247c00 enable enable_parity 
+4861 08008618 inject mod ,24 
+4862 78447c00 disable enable_parity 
+4863 c597c867 bmark0 mark_ble_lr ,g24_transmit_skip 
+4864 7843fc00 disable enable_white 
+4865 58000000 setarg 0 
+4866 08008603 inject mod ,3 
+
+g24_transmit_skip:
+4867 37d38200 until null ,tx_clear 
+4868 20000064 nop 100 
+4869 785d7c00 disable lr_s2en 
+486a 784efc00 disable encode_fec0 
+486b 6fe0c510 fetch 1 ,mem_24g_disable_fec1 
+486c 243a486e nbranch g24_transmit_skip_disable_fec1 ,blank 
+486d 784dfc00 disable encode_fec1 
+
+g24_transmit_skip_disable_fec1:
+486e 785c7c00 disable encode_fec3 
+486f 20403925 call set_sync_on 
+4870 2020644f branch rf_debug_tx_off_line 
+
+g24_transmit_lr:
+4871 df20000a arg 10 ,loopcnt 
+
+g24_transmit_lr_preamble_loop:
+4872 5800003c setarg 0x3c 
+4873 08008608 inject mod ,8 
+4874 c2004872 loop g24_transmit_lr_preamble_loop 
+4875 784efc00 disable encode_fec0 
+4876 783c7c00 enable encode_fec3 
+4877 19317e00 rshift16 access ,pdata 
+4878 1ff17e00 rshift16 pdata ,pdata 
+4879 1ff1fe00 rshift4 pdata ,pdata 
+487a 08008620 inject mod ,32 
+487b c5174880 bmark1 mark_ble_lr_s8 ,g24_transmit_lr_s8 
+
+g24_transmit_lr_s2:
+487c 58000001 setarg 1 
+487d 08008605 inject mod ,5 
+487e 783d7c00 enable lr_s2en 
+487f 20204852 branch g24_transmit_packet 
+
+g24_transmit_lr_s8:
+4880 58000000 setarg 0 
+4881 08008605 inject mod ,5 
+4882 20204852 branch g24_transmit_packet 
+
+g24_transmit_2m:
+4883 6fe0c11d fetch 1 ,mem_system_clk 
+4884 1fe37200 rshift pdata ,loopcnt 
+
+g24_transmit_2m_dealy:
+4885 20000002 nop 2 
+4886 c2004885 loop g24_transmit_2m_dealy 
+4887 19317e00 rshift16 access ,pdata 
+4888 1fecfe00 rshift8 pdata ,pdata 
+4889 1ff18400 rshift4 pdata ,temp 
+488a 18427e00 copy temp ,pdata 
+488b 08008608 inject mod ,8 
+488c 18427e00 copy temp ,pdata 
+488d 08008628 inject mod ,40 
+488e 20204852 branch g24_transmit_packet 
+
+g24_transmit_prep:
+488f 47164025 bpatchx patch25_4 ,mem_patch25 
+4890 6fe0c4fe fetch 1 ,mem_24g_tx_phy 
+4891 c28148b0 bbit1 bit_le_coded_phy ,g24_lr_transmit_prep 
+4892 6fe0c4ce fetch 1 ,mem_24g_datalen 
+4893 1fe0fe03 increase 3 ,pdata 
+4894 67e0c4d0 store 1 ,mem_24g_txlen 
+4895 6fe0c4f2 fetch 1 ,mem_24g_syncword_crc8 
+4896 67e0c47f store 1 ,mem_24g_txpayload 
+4897 6fe0c4cf fetch 1 ,mem_24g_data_type 
+4898 e7e08005 istore 1 ,contw 
+4899 6fe0c4ce fetch 1 ,mem_24g_datalen 
+
+g24_transmit_prep_pdu:
+489a 1fe9fe00 lshift3 pdata ,pdata 
+489b 6848c4c4 fetcht 1 ,mem_24g_pid 
+489c 18410403 and temp ,0x03 ,temp 
+489d 18438400 lshift temp ,temp 
+489e 9841fe00 ior temp ,pdata 
+489f 6848c4c5 fetcht 1 ,mem_24g_no_ack 
+48a0 9840fe00 iadd temp ,pdata 
+48a1 e7e08005 istore 1 ,contw 
+48a2 6fe0c4ce fetch 1 ,mem_24g_datalen 
+48a3 98007200 iforce loopcnt 
+48a4 d8c0445f arg mem_24g_txbuf ,contr 
+48a5 20407548 call memcpy 
+48a6 4716c025 bpatchx patch25_5 ,mem_patch25 
+48a7 c6938000 rtnmark0 mark_24g_rxmode 
+48a8 6fe08030 fetch 1 ,mem_rssi_hex 
+48a9 e7e08005 istore 1 ,contw 
+48aa 6fe0c4fe fetch 1 ,mem_24g_tx_phy 
+48ab c3810000 rtnbit1 bit_le_coded_phy 
+48ac 6fe0c4d0 fetch 1 ,mem_24g_txlen 
+48ad 1fe0fe01 increase 1 ,pdata 
+48ae 67e0c4d0 store 1 ,mem_24g_txlen 
+48af 20600000 rtn 
+
+g24_lr_transmit_prep:
+48b0 6fe0c4ce fetch 1 ,mem_24g_datalen 
+48b1 1fe0fe04 increase 4 ,pdata 
+48b2 c593c8b4 bmark0 mark_24g_rxmode ,g24_lr_transmit_prep_skip 
+48b3 1fe0fe01 increase 1 ,pdata 
+
+g24_lr_transmit_prep_skip:
+48b4 67e0c4d0 store 1 ,mem_24g_txlen 
+48b5 6fe0c4f2 fetch 1 ,mem_24g_syncword_crc8 
+48b6 67e0c47f store 1 ,mem_24g_txpayload 
+48b7 6fe0c4d0 fetch 1 ,mem_24g_txlen 
+48b8 1fe0fffe increase -2 ,pdata 
+48b9 e7e08005 istore 1 ,contw 
+48ba 6fe0c4cf fetch 1 ,mem_24g_data_type 
+48bb e7e08005 istore 1 ,contw 
+48bc 58000000 setarg 0 
+48bd 2020489a branch g24_transmit_prep_pdu 
+
+g24_read_len_pid_crc:
+48be 47174025 bpatchx patch25_6 ,mem_patch25 
+48bf 6fe0c43e fetch 1 ,mem_24g_rxbuf + 1 
+48c0 1fe97e00 rshift3 pdata ,pdata 
+48c1 67e0c4c3 store 1 ,mem_24g_rxdata_length 
+48c2 1fe0fe01 increase 1 ,pdata 
+48c3 d8c0443e arg mem_24g_rxbuf + 1 ,contr 
+48c4 98c08c00 iadd contr ,contr 
+48c5 efe18006 ifetch 3 ,contr 
+48c6 67e1c4c6 store 3 ,mem_24g_sta_crc 
+48c7 6fe0c43e fetch 1 ,mem_24g_rxbuf + 1 
+48c8 1fe37e00 rshift pdata ,pdata 
+48c9 1fe17e03 and pdata ,0x03 ,pdata 
+48ca 67e0c4cc store 1 ,mem_24g_sta_pid 
+48cb 20600000 rtn 
+
+g24_ch:
+48cc 4717c025 bpatchx patch25_7 ,mem_patch25 
+48cd 6848c4d4 fetcht 1 ,mem_24g_current_ch_number 
+48ce 204048d1 call g24_ch_map_size 
+48cf 6048c4d4 storet 1 ,mem_24g_current_ch_number 
+48d0 20600000 rtn 
+
+g24_ch_map_size:
+48d1 47184026 bpatchx patch26_0 ,mem_patch26 
+48d2 204048d6 call g24_ch_calc 
+48d3 18408401 increase 1 ,temp 
+48d4 18410403 and_into 3 ,temp 
+48d5 20600000 rtn 
+
+g24_ch_calc:
+48d6 4718c026 bpatchx patch26_1 ,mem_patch26 
+48d7 6fe0c4d5 fetch 1 ,mem_24g_addr 
+48d8 1fe17e03 and_into 0x03 ,pdata 
+48d9 1fefa204 mul32 pdata ,4 ,rega 
+48da 580044d9 setarg mem_24g_ch_map1 
+48db 9a20fe00 iadd rega ,pdata 
+48dc 98408c00 iadd temp ,contr 
+48dd efe08006 ifetch 1 ,contr 
+48de 67e0c4d3 store 1 ,mem_24g_ch 
+48df 20600000 rtn 
+
+g24_update_addr_and_synccrc8:
+48e0 67e244d5 store 4 ,mem_24g_addr 
+48e1 47194026 bpatchx patch26_2 ,mem_patch26 
+
+g24_syncword_crc8:
+48e2 da200000 arg 0 ,rega 
+48e3 df200004 arg 4 ,loopcnt 
+48e4 d8c044d5 arg mem_24g_addr ,contr 
+
+g24_syncword_crc8_loop:
+48e5 efe08006 ifetch 1 ,contr 
+48e6 9a20a200 iadd rega ,rega 
+48e7 c20048e5 loop g24_syncword_crc8_loop 
+48e8 1a227e00 copy rega ,pdata 
+48e9 67e144f0 store 2 ,mem_24g_syncword 
+48ea 6fe0c4f0 fetch 1 ,mem_24g_syncword 
+48eb 6848c4f1 fetcht 1 ,mem_24g_syncword + 1 
+48ec 9840fe00 iadd temp ,pdata 
+48ed 67e0c4f2 store 1 ,mem_24g_syncword_crc8 
+48ee 20600000 rtn 
+
+g24_timer_check:
+48ef 4719c026 bpatchx patch26_3 ,mem_patch26 
+48f0 20407638 call disable_user 
+48f1 684a44e9 fetcht 4 ,mem_24g_tx_btclk 
+48f2 1c427e00 copy clkn_bt ,pdata 
+48f3 98467c00 isub temp ,null 
+48f4 244148ff ncall g24_timer_timeout ,positive 
+48f5 1fe22400 copy pdata ,regb 
+48f6 6fe244e9 fetch 4 ,mem_24g_tx_btclk 
+48f7 6848c4ed fetcht 1 ,mem_24g_interval 
+48f8 98408400 iadd temp ,temp 
+48f9 1a427e00 copy regb ,pdata 
+48fa 98467c00 isub temp ,null 
+48fb 24610000 nrtn positive 
+48fc 793ffe1c set0 28 ,pdata 
+48fd 67e244e9 store 4 ,mem_24g_tx_btclk 
+48fe 20207636 branch enable_user 
+
+g24_timer_timeout:
+48ff 20628000 rtn zero 
+4900 79207e1c set1 28 ,pdata 
+4901 20600000 rtn 
+
+g24_timer_init:
+4902 58000000 setarg 0 
+4903 67e244e9 store 4 ,mem_24g_tx_btclk 
+4904 20600000 rtn 
+
+g24_chmap_param_init:
+4905 471a4026 bpatchx patch26_4 ,mem_patch26 
+4906 38001300 setsect 0 ,0x1300 
+4907 3805908b setsect 1 ,0x1908b 
+4908 380b6150 setsect 2 ,0x36150 
+4909 380c3d20 setsect 3 ,0x3d20 
+490a 67e4c4d9 store 9 ,mem_24g_ch_map1 
+490b 38003a1a setsect 0 ,0x3a1a 
+490c 3804c453 setsect 1 ,0xc453 
+490d 3808d312 setsect 2 ,0xd312 
+490e 380c0001 setsect 3 ,0x1 
+490f e7e38005 istore 7 ,contw 
+4910 6fe0c4ff fetch 1 ,mem_24g_ch_map_update 
+4911 207a0000 rtn blank 
+4912 d8c04500 arg mem_24g_ch_update_map1 ,contr 
+4913 d8a044d9 arg mem_24g_ch_map1 ,contw 
+4914 202074f5 branch memcpy16 
+
+g24_chamap_param_update:
+4915 471ac026 bpatchx patch26_5 ,mem_patch26 
+4916 584e001e setarg 0x4e001e 
+4917 67e1c501 store 3 ,mem_24g_ch_update_map1 + 1 
+4918 58032303 setarg 0x032303 
+4919 e7e18005 istore 3 ,contw 
+491a 58250642 setarg 0x250642 
+491b e7e18005 istore 3 ,contw 
+491c 58094c06 setarg 0x094c06 
+491d e7e18005 istore 3 ,contw 
+491e 583c0927 setarg 0x3c0927 
+491f e7e18005 istore 3 ,contw 
+4920 7044ff01 jam 1 ,mem_24g_ch_map_update 
+4921 20600000 rtn 
+
+g24_rx_window_init:
+4922 471b4026 bpatchx patch26_6 ,mem_patch26 
+4923 d8406978 arg 0x6978 ,temp 
+4924 c513c929 bmark1 mark_24g_rxmode ,g24_rx_window_store 
+4925 d84012c0 arg 0x12c0 ,temp 
+4926 6fe0c4fd fetch 1 ,mem_24g_rx_phy 
+4927 c3014929 bbit0 2 ,g24_rx_window_store 
+4928 d8402ee0 arg 0x2ee0 ,temp 
+
+g24_rx_window_store:
+4929 604944d1 storet 2 ,mem_24g_rx_window 
+492a 20600000 rtn 
+
+g24_enable_1m:
+492b 7044fd01 jam 0x01 ,mem_24g_rx_phy 
+492c 7044fe01 jam 0x01 ,mem_24g_tx_phy 
+492d 20600000 rtn 
+
+g24_enable_2m:
+492e 7044fd02 jam 0x02 ,mem_24g_rx_phy 
+492f 7044fe02 jam 0x02 ,mem_24g_tx_phy 
+4930 20600000 rtn 
+
+g24_pair_param_init:
+4931 471bc026 bpatchx patch26_7 ,mem_patch26 
+4932 7045154e jam 0x4e ,mem_24g_pair_ch 
+4933 58101520 setarg 0x101520 
+4934 67e1c511 store 3 ,mem_24g_pair_addr 
+4935 58000005 setarg 0x05 
+4936 e7e08005 istore 1 ,contw 
+4937 20600000 rtn 
+
+g24_pair_timeout_timer:
+4938 da60451d arg mem_24g_pair_timeout ,regc 
+4939 da404ceb arg g24_stop_24g_mode ,regb 
+493a 20204de8 branch timer_single_step_2b 
+
+g24_pair_start:
+493b 79200026 set1 mark_24g ,mark 
+493c 6fe0c53b fetch 1 ,mem_24g_conn_sm 
+493d 793ffe02 set0 state_24g_reconn ,pdata 
+493e 79207e01 set1 state_24g_pair ,pdata 
+493f 67e0c53b store 1 ,mem_24g_conn_sm 
+4940 58000000 setarg 0 
+4941 67e14521 store 2 ,mem_24g_reconn_timeout 
+4942 6fe1451b fetch 2 ,mem_24g_pair_timeout_init 
+4943 67e1451d store 2 ,mem_24g_pair_timeout 
+4944 70451a00 jam 0 ,mem_24g_pair_no_ack 
+4945 20404979 call g24_pair_sm_reinit 
+
+g24_pair_init_param:
+4946 7044c400 jam 0 ,mem_24g_pid 
+4947 6fe0c515 fetch 1 ,mem_24g_pair_ch 
+4948 67e0c4d3 store 1 ,mem_24g_ch 
+4949 6fe0c516 fetch 1 ,mem_24g_pair_tx_power 
+494a 67e0c116 store 1 ,mem_tx_power 
+494b 6fe24511 fetch 4 ,mem_24g_pair_addr 
+494c 202048e0 branch g24_update_addr_and_synccrc8 
+
+g24_pair_dispatch:
+494d 471c4027 bpatchx patch27_0 ,mem_patch27 
+494e 6fe0c519 fetch 1 ,mem_24g_pair_sm 
+494f c07fc99b beq state_24g_pairing_success ,g24_pair_exit 
+4950 c000c955 beq state_24g_pairing_1 ,g24_pair_sm_1 
+4951 c0014957 beq state_24g_pairing_2 ,g24_pair_sm_2 
+4952 c001c95d beq state_24g_pairing_3 ,g24_pair_sm_3 
+4953 c0024963 beq state_24g_pairing_4 ,g24_pair_sm_4 
+4954 20600000 rtn 
+
+g24_pair_sm_1:
+4955 70445fff jam datatype_attemp ,mem_24g_txbuf 
+4956 20204964 branch g24_pair_sm_prep 
+
+g24_pair_sm_2:
+4957 6fe0c4f4 fetch 1 ,mem_24g_pair_switch 
+4958 203a495b branch g24_pair_sm_2_skip ,blank 
+4959 6fe24543 fetch 4 ,mem_24g_device_addr 
+495a 204048e0 call g24_update_addr_and_synccrc8 
+
+g24_pair_sm_2_skip:
+495b 70445faa jam datatype_bind ,mem_24g_txbuf 
+495c 20204964 branch g24_pair_sm_prep 
+
+g24_pair_sm_3:
+495d 70445f55 jam datatype_config ,mem_24g_txbuf 
+495e 6fe0c4f4 fetch 1 ,mem_24g_pair_switch 
+495f 203a4964 branch g24_pair_sm_prep ,blank 
+4960 6fe2452b fetch 4 ,mem_24g_receiver_addr 
+4961 67e24461 store 4 ,mem_24g_txbuf + 2 
+4962 20204966 branch g24_pair_sm_common 
+
+g24_pair_sm_4:
+4963 70445f22 jam datatype_ok ,mem_24g_txbuf 
+
+g24_pair_sm_prep:
+4964 6fe24543 fetch 4 ,mem_24g_device_addr 
+4965 67e24461 store 4 ,mem_24g_txbuf + 2 
+
+g24_pair_sm_common:
+4966 6fe0c4cf fetch 1 ,mem_24g_data_type 
+4967 1fe17e07 and_into bits_data ,pdata 
+4968 67e0c460 store 1 ,mem_24g_txbuf + 1 
+4969 70446500 jam 0 ,mem_24g_txbuf + 6 
+496a 7044ce07 jam 7 ,mem_24g_datalen 
+496b 2040488f call g24_transmit_prep 
+496c 20404cc8 call g24_transmit_receive_ack 
+496d 246c0000 nrtn sync 
+496e 24778000 nrtn user3 
+496f 20404c01 call g24_txbuf_clear 
+4970 20404cdf call g24_ackpayload_parse 
+4971 471cc027 bpatchx patch27_1 ,mem_patch27 
+4972 6fe0c519 fetch 1 ,mem_24g_pair_sm 
+4973 c17f8000 rtneq state_24g_pairing_success 
+4974 c000c97e beq state_24g_pairing_1 ,g24_pair_sm_1_waiting_ack 
+4975 c0014980 beq state_24g_pairing_2 ,g24_pair_sm_2_waiting_ack 
+4976 c001c986 beq state_24g_pairing_3 ,g24_pair_sm_3_waiting_ack 
+4977 c002498e beq state_24g_pairing_4 ,g24_pair_sm_4_waiting_ack 
+4978 20600000 rtn 
+
+g24_pair_sm_reinit:
+4979 70451902 jam state_24g_pairing_2 ,mem_24g_pair_sm 
+497a 6fe0c4f4 fetch 1 ,mem_24g_pair_switch 
+497b 207a0000 rtn blank 
+497c 70451901 jam state_24g_pairing_1 ,mem_24g_pair_sm 
+497d 20600000 rtn 
+
+g24_pair_sm_1_waiting_ack:
+497e 70451902 jam state_24g_pairing_2 ,mem_24g_pair_sm 
+497f 20204cc3 branch g24_transmit_abandon 
+
+g24_pair_sm_2_waiting_ack:
+4980 6fe0c4f4 fetch 1 ,mem_24g_pair_switch 
+4981 203a4984 branch g24_pair_sm_2_waiting_ack_skip ,blank 
+4982 6fe244a5 fetch 4 ,mem_24g_rxpayload + 2 
+4983 67e2452b store 4 ,mem_24g_receiver_addr 
+
+g24_pair_sm_2_waiting_ack_skip:
+4984 70451903 jam state_24g_pairing_3 ,mem_24g_pair_sm 
+4985 20204cc3 branch g24_transmit_abandon 
+
+g24_pair_sm_3_waiting_ack:
+4986 6fe0c4f4 fetch 1 ,mem_24g_pair_switch 
+4987 203a498c branch g24_pair_sm_3_waiting_ack_skip ,blank 
+4988 6fe244a5 fetch 4 ,mem_24g_rxpayload + 2 
+4989 684a4543 fetcht 4 ,mem_24g_device_addr 
+498a 98467c00 isub temp ,null 
+498b 24628000 nrtn zero 
+
+g24_pair_sm_3_waiting_ack_skip:
+498c 70451904 jam state_24g_pairing_4 ,mem_24g_pair_sm 
+498d 20204cc3 branch g24_transmit_abandon 
+
+g24_pair_sm_4_waiting_ack:
+498e 6fe0c4f4 fetch 1 ,mem_24g_pair_switch 
+498f 203a4994 branch g24_pair_sm_4_waiting_ack_skip ,blank 
+4990 6fe244a5 fetch 4 ,mem_24g_rxpayload + 2 
+4991 684a452b fetcht 4 ,mem_24g_receiver_addr 
+4992 98467c00 isub temp ,null 
+4993 24628000 nrtn zero 
+
+g24_pair_sm_4_waiting_ack_skip:
+4994 704519ff jam state_24g_pairing_success ,mem_24g_pair_sm 
+4995 7004c339 jam bt_evt_24g_pairing_complete ,mem_fifo_temp 
+4996 2040709b call ui_ipc_send_event 
+4997 58000000 setarg 0 
+4998 67e1451d store 2 ,mem_24g_pair_timeout 
+4999 6fe244a5 fetch 4 ,mem_24g_rxpayload + 2 
+499a 204048e0 call g24_update_addr_and_synccrc8 
+
+g24_pair_exit:
+499b 6fe0c53b fetch 1 ,mem_24g_conn_sm 
+499c 793ffe01 set0 state_24g_pair ,pdata 
+499d 67e0c53b store 1 ,mem_24g_conn_sm 
+499e 20204cc3 branch g24_transmit_abandon 
+
+g24_bind_mode_enable:
+499f 70455901 jam dongle_bind ,mem_24g_work_mode 
+49a0 70455800 jam clear_init ,mem_24g_mode_init 
+49a1 20600000 rtn 
+
+g24_bind_init:
+49a2 6fe0c558 fetch 1 ,mem_24g_mode_init 
+49a3 c3808000 rtnbit1 dongle_bind 
+49a4 79207e01 set1 dongle_bind ,pdata 
+49a5 67e0c558 store 1 ,mem_24g_mode_init 
+49a6 58000000 setarg 0 
+49a7 67e1c518 store 3 ,mem_24g_device1_bind_step 
+49a8 67e2456f store 4 ,mem_24g_transmitter_addr 
+49a9 70455401 jam 1 ,mem_24g_ackpayload_enable 
+49aa 20204946 branch g24_pair_init_param 
+
+g24_bind_ackpayload_prep:
+49ab 70455401 jam 1 ,mem_24g_ackpayload_enable 
+49ac 7044ce08 jam 0x08 ,mem_24g_datalen 
+49ad d8c0451b arg mem_24g_bind_payload ,contr 
+49ae d8a0445f arg mem_24g_txbuf ,contw 
+49af 202074ef branch memcpy8 
+
+g24_bind_data_process:
+49b0 471d4027 bpatchx patch27_2 ,mem_patch27 
+49b1 20404a54 call g24_rx_interrupt_clear 
+49b2 204047ce call g24_receive_packet 
+49b3 2437ca54 nbranch g24_rx_interrupt_clear ,user3 
+49b4 204049bf call g24_bind_data_parse 
+49b5 20404a87 call g24_transmit_ack 
+49b6 20404a2e call g24_bind_device_status_check 
+49b7 204053c3 call dongle_kb_bind_soft_reset 
+49b8 6fe0c4f4 fetch 1 ,mem_24g_pair_switch 
+49b9 207a0000 rtn blank 
+49ba 6fe2456f fetch 4 ,mem_24g_transmitter_addr 
+49bb 207a0000 rtn blank 
+49bc 202048e0 branch g24_update_addr_and_synccrc8 
+
+g24_bind_data_error:
+49bd 20404a54 call g24_rx_interrupt_clear 
+49be 20204837 branch g24_end_of_packet 
+
+g24_bind_data_parse:
+49bf 70456505 jam bind_mode_continue ,mem_24g_bind_mode_continue 
+49c0 d8c0443d arg mem_24g_rxbuf ,contr 
+49c1 d8a0452b arg mem_24g_rxdata_temp ,contw 
+49c2 204074ef call memcpy8 
+49c3 471dc027 bpatchx patch27_3 ,mem_patch27 
+
+g24_bind_data_parse_next:
+49c4 6fe0c52d fetch 1 ,mem_24g_rxdata_temp + 2 
+49c5 c05549ca beq datatype_bind ,g24_bind_first_step 
+49c6 c02ac9d7 beq datatype_config ,g24_bind_second_step 
+49c7 c01149f4 beq datatype_ok ,g24_bind_third_step 
+49c8 c07fcc20 beq datatype_attemp ,g24_data_attemp 
+49c9 20600000 rtn 
+
+g24_bind_first_step:
+49ca 6fe0c52e fetch 1 ,mem_24g_rxdata_temp + 3 
+49cb c000c9ce beq datatype_device1 ,g24_bind_first_step_device1 
+49cc c00149d4 beq datatype_device2 ,g24_bind_first_step_device2 
+49cd 20600000 rtn 
+
+g24_bind_first_step_device1:
+49ce 70451801 jam 1 ,mem_24g_device1_bind_step 
+
+g24_bind_dvc1_payload_cfg:
+49cf 70451b01 jam datatype_device1 ,mem_24g_bind_payload 
+
+g24_bind_payload_cfg:
+49d0 70451c80 jam 0x80 ,mem_24g_bind_payload + 1 
+49d1 6fe34437 fetch 6 ,mem_24g_lap 
+49d2 67e3451d store 6 ,mem_24g_bind_payload + 2 
+49d3 20600000 rtn 
+
+g24_bind_first_step_device2:
+49d4 70451901 jam 1 ,mem_24g_device2_bind_step 
+
+g24_bind_dvc2_payload_cfg:
+49d5 70451b02 jam datatype_device2 ,mem_24g_bind_payload 
+49d6 202049d0 branch g24_bind_payload_cfg 
+
+g24_bind_second_step:
+49d7 6fe0c4f4 fetch 1 ,mem_24g_pair_switch 
+49d8 203a49dd branch g24_bind_second_step_skip ,blank 
+49d9 6fe2452f fetch 4 ,mem_24g_rxdata_temp + 4 
+49da 684a4437 fetcht 4 ,mem_24g_lap 
+49db 98467c00 isub temp ,null 
+49dc 24628000 nrtn zero 
+
+g24_bind_second_step_skip:
+49dd 6fe0c52e fetch 1 ,mem_24g_rxdata_temp + 3 
+49de c000c9e1 beq datatype_device1 ,g24_bind_second_step_device1 
+49df c00149ec beq datatype_device2 ,g24_bind_second_step_device2 
+49e0 20600000 rtn 
+
+g24_bind_second_step_device1:
+49e1 6fe0c518 fetch 1 ,mem_24g_device1_bind_step 
+49e2 c000c9e4 beq 1 ,g24_bind_dvc1_step_set2 
+49e3 20600000 rtn 
+
+g24_bind_dvc1_step_set2:
+49e4 70451802 jam 2 ,mem_24g_device1_bind_step 
+49e5 6fe0c4f4 fetch 1 ,mem_24g_pair_switch 
+49e6 203a49cf branch g24_bind_dvc1_payload_cfg ,blank 
+
+g24_bind_dvc1_payload_cfg_transmitter_addr:
+49e7 70451b01 jam datatype_device1 ,mem_24g_bind_payload 
+
+g24_bind_payload_cfg_transmitter_addr:
+49e8 70451c80 jam 0x80 ,mem_24g_bind_payload + 1 
+49e9 6fe2456f fetch 4 ,mem_24g_transmitter_addr 
+49ea 67e2451d store 4 ,mem_24g_bind_payload + 2 
+49eb 20207636 branch enable_user 
+
+g24_bind_second_step_device2:
+49ec 6fe0c519 fetch 1 ,mem_24g_device2_bind_step 
+49ed c000c9ef beq 1 ,g24_bind_dvc2_step_set2 
+49ee 20600000 rtn 
+
+g24_bind_dvc2_step_set2:
+49ef 70451902 jam 2 ,mem_24g_device2_bind_step 
+49f0 6fe0c4f4 fetch 1 ,mem_24g_pair_switch 
+49f1 203a49d5 branch g24_bind_dvc2_payload_cfg ,blank 
+49f2 70451b02 jam datatype_device2 ,mem_24g_bind_payload 
+49f3 202049e8 branch g24_bind_payload_cfg_transmitter_addr 
+
+g24_bind_third_step:
+49f4 6fe0c4f4 fetch 1 ,mem_24g_pair_switch 
+49f5 203a49fa branch g24_bind_third_step_skip ,blank 
+49f6 6fe2452f fetch 4 ,mem_24g_rxdata_temp + 4 
+49f7 684a456f fetcht 4 ,mem_24g_transmitter_addr 
+49f8 98467c00 isub temp ,null 
+49f9 24628000 nrtn zero 
+
+g24_bind_third_step_skip:
+49fa 6fe0c52e fetch 1 ,mem_24g_rxdata_temp + 3 
+49fb c000c9fe beq datatype_device1 ,g24_bind_third_step_device1 
+49fc c0014a09 beq datatype_device2 ,g24_bind_third_step_device2 
+49fd 20600000 rtn 
+
+g24_bind_third_step_device1:
+49fe 6fe0c518 fetch 1 ,mem_24g_device1_bind_step 
+49ff c0014a01 beq 2 ,g24_bind_dvc1_step_success 
+4a00 20600000 rtn 
+
+g24_bind_dvc1_step_success:
+4a01 20404a22 call g24_binding_dvc1_living 
+4a02 204049cf call g24_bind_dvc1_payload_cfg 
+4a03 6fe0c51a fetch 1 ,mem_24g_bind_device_status 
+4a04 1fe1fe01 or_into 0x01 ,pdata 
+4a05 67e0c51a store 1 ,mem_24g_bind_device_status 
+
+g24_bind_exit:
+4a06 58000000 setarg 0 
+4a07 67e14518 store 2 ,mem_24g_device1_bind_step 
+4a08 20600000 rtn 
+
+g24_bind_third_step_device2:
+4a09 6fe0c519 fetch 1 ,mem_24g_device2_bind_step 
+4a0a c0804a0c bne 0 ,g24_bind_dvc2_step_success 
+4a0b 20600000 rtn 
+
+g24_bind_dvc2_step_success:
+4a0c 20404a28 call g24_binding_dvc2_living 
+4a0d 204049d5 call g24_bind_dvc2_payload_cfg 
+4a0e 6fe0c51a fetch 1 ,mem_24g_bind_device_status 
+4a0f 1fe1fe02 or_into 0x02 ,pdata 
+4a10 67e0c51a store 1 ,mem_24g_bind_device_status 
+4a11 20404a06 call g24_bind_exit 
+4a12 202053bd branch dongle_g24_store_dvc2_bind_flag 
+
+g24_binding_device_check:
+4a13 6fe0c559 fetch 1 ,mem_24g_work_mode 
+4a14 c1808000 rtnne dongle_bind 
+4a15 6fe0c553 fetch 1 ,mem_24g_pair_mode 
+4a16 247a0000 nrtn blank 
+4a17 6fe0c440 fetch 1 ,mem_24g_rxbuf + 3 
+4a18 c000ca1b beq datatype_device1 ,g24_binding_dvc1_status 
+4a19 c0014a1f beq datatype_device2 ,g24_binding_dvc2_status 
+4a1a 20600000 rtn 
+
+g24_binding_dvc1_status:
+4a1b 6fe0c56e fetch 1 ,mem_24g_bind_device_living 
+4a1c c4000000 rtnbit0 0 
+
+disable_user3:
+4a1d 7857fc00 disable user3 
+4a1e 20600000 rtn 
+
+g24_binding_dvc2_status:
+4a1f 6fe0c56e fetch 1 ,mem_24g_bind_device_living 
+4a20 c4008000 rtnbit0 1 
+4a21 20204a1d branch disable_user3 
+
+g24_binding_dvc1_living:
+4a22 6fe0c553 fetch 1 ,mem_24g_pair_mode 
+4a23 247a0000 nrtn blank 
+4a24 6fe0c56e fetch 1 ,mem_24g_bind_device_living 
+4a25 1fe1fe01 or_into 0x01 ,pdata 
+4a26 67e0c56e store 1 ,mem_24g_bind_device_living 
+4a27 20600000 rtn 
+
+g24_binding_dvc2_living:
+4a28 6fe0c553 fetch 1 ,mem_24g_pair_mode 
+4a29 247a0000 nrtn blank 
+4a2a 6fe0c56e fetch 1 ,mem_24g_bind_device_living 
+4a2b 1fe1fe02 or_into 0x02 ,pdata 
+4a2c 67e0c56e store 1 ,mem_24g_bind_device_living 
+4a2d 20600000 rtn 
+
+g24_bind_device_status_check:
+4a2e 6fe0c51a fetch 1 ,mem_24g_bind_device_status 
+4a2f 207a0000 rtn blank 
+
+g24_bind_device_status:
+4a30 6fe0c52e fetch 1 ,mem_24g_rxdata_temp + 3 
+4a31 c000ca22 beq datatype_device1 ,g24_binding_dvc1_living 
+4a32 c0014a28 beq datatype_device2 ,g24_binding_dvc2_living 
+4a33 20600000 rtn 
+
+g24_receive_init:
+4a34 79200027 set1 mark_24g_rxmode ,mark 
+4a35 6fe0c116 fetch 1 ,mem_tx_power 
+4a36 67e0c566 store 1 ,mem_tx_power_temp 
+4a37 20404922 call g24_rx_window_init 
+4a38 20204c58 branch rssi_receiver_buff_init 
+
+g24_receive_dispatch:
+4a39 6fe14523 fetch 2 ,mem_cb_24g_receive_process 
+4a3a 202075e6 branch callback_func 
+
+g24_ackpayload_prep:
+4a3b 471e4027 bpatchx patch27_4 ,mem_patch27 
+4a3c 7044ce00 jam 0 ,mem_24g_datalen 
+4a3d 6fe0c554 fetch 1 ,mem_24g_ackpayload_enable 
+4a3e 207a0000 rtn blank 
+4a3f 6fe14525 fetch 2 ,mem_cb_24g_ackpayload 
+4a40 202075e6 branch callback_func 
+
+g24_receive_packet_start:
+4a41 20404a84 call g24_receive_transmit_ack 
+4a42 2437ca54 nbranch g24_rx_interrupt_clear ,user3 
+
+g24_receive_packet_parse:
+4a43 20404a76 call g24_receive_packet_parse_pid_crc 
+4a44 24344a54 nbranch g24_rx_interrupt_clear ,user 
+4a45 6fe0c4c3 fetch 1 ,mem_24g_rxdata_length 
+4a46 203a4a54 branch g24_rx_interrupt_clear ,blank 
+4a47 1fe0fe02 increase 2 ,pdata 
+4a48 98007200 iforce loopcnt 
+4a49 d8c0443d arg mem_24g_rxbuf ,contr 
+4a4a d8a0452b arg mem_24g_rxdata_temp ,contw 
+4a4b 20407548 call memcpy 
+4a4c 70455600 jam 0 ,mem_24g_mode_switch 
+4a4d 6fe0c553 fetch 1 ,mem_24g_pair_mode 
+4a4e 205a4a91 call g24_enable_nodata_timer ,blank 
+4a4f 471ec027 bpatchx patch27_5 ,mem_patch27 
+4a50 6fe0c52d fetch 1 ,mem_24g_rxdata_temp + 2 
+4a51 c000ca5a beq datatype_device1 ,g24_data_device1 
+4a52 c0014a69 beq datatype_device2 ,g24_data_device2 
+4a53 c07fca58 beq datatype_attemp ,g24_data_receive_attemp 
+
+g24_rx_interrupt_clear:
+4a54 471f4027 bpatchx patch27_6 ,mem_patch27 
+4a55 d8a0443d arg mem_24g_rxbuf ,contw 
+4a56 df200042 arg 66 ,loopcnt 
+4a57 2020750f branch clear_mem 
+
+g24_data_receive_attemp:
+4a58 20404a30 call g24_bind_device_status 
+4a59 20204c20 branch g24_data_attemp 
+
+g24_data_device1:
+4a5a 20404a22 call g24_binding_dvc1_living 
+4a5b 20404bbd call g24_ch_timer_reinit 
+4a5c 6fe0c54d fetch 1 ,mem_24g_abort_packet 
+4a5d 6848c52b fetcht 1 ,mem_24g_rxdata_temp 
+4a5e 284ffe03 isolate1 bit_abort ,temp 
+4a5f 7920fe00 setflag true ,0 ,pdata 
+4a60 67e0c54d store 1 ,mem_24g_abort_packet 
+4a61 c000ca6f beq 1 ,g24_data_attemp_device1_abort 
+4a62 6fe0c555 fetch 1 ,mem_24g_hop_packet 
+4a63 6848c52b fetcht 1 ,mem_24g_rxdata_temp 
+4a64 284ffe04 isolate1 bit_hop ,temp 
+4a65 7920fe00 setflag true ,0 ,pdata 
+4a66 67e0c555 store 1 ,mem_24g_hop_packet 
+4a67 6fe14527 fetch 2 ,mem_cb_24g_data_device1 
+4a68 202075e6 branch callback_func 
+
+g24_data_device2:
+4a69 20404a28 call g24_binding_dvc2_living 
+4a6a 6848c52b fetcht 1 ,mem_24g_rxdata_temp 
+4a6b 284ffe03 isolate1 bit_abort ,temp 
+4a6c 2020ca74 branch g24_data_attemp_device2_abort ,true 
+4a6d 6fe14529 fetch 2 ,mem_cb_24g_data_device2 
+4a6e 202075e6 branch callback_func 
+
+g24_data_attemp_device1_abort:
+4a6f 6fe0c095 fetch 1 ,mem_device_option 
+4a70 1fe67c0e sub pdata ,dvc_op_car ,null 
+4a71 2042cf01 call car_stop_blink ,zero 
+4a72 6fe24535 fetch 4 ,mem_24g_rxdata_temp + 10 
+4a73 20204c26 branch g24_store_device1_addr 
+
+g24_data_attemp_device2_abort:
+4a74 6fe24535 fetch 4 ,mem_24g_rxdata_temp + 10 
+4a75 20204c2a branch g24_store_device2_addr 
+
+g24_receive_packet_parse_pid_crc:
+4a76 20407638 call disable_user 
+4a77 6fe0c4cc fetch 1 ,mem_24g_sta_pid 
+4a78 6848c4cd fetcht 1 ,mem_24g_last_pid 
+4a79 98467c00 isub temp ,null 
+4a7a 2442f636 ncall enable_user ,zero 
+4a7b 6fe0c4cc fetch 1 ,mem_24g_sta_pid 
+4a7c 67e0c4cd store 1 ,mem_24g_last_pid 
+4a7d 6fe1c4c6 fetch 3 ,mem_24g_sta_crc 
+4a7e 6849c4c9 fetcht 3 ,mem_24g_last_crc 
+4a7f 98467c00 isub temp ,null 
+4a80 2442f636 ncall enable_user ,zero 
+4a81 6fe1c4c6 fetch 3 ,mem_24g_sta_crc 
+4a82 67e1c4c9 store 3 ,mem_24g_last_crc 
+4a83 20600000 rtn 
+
+g24_receive_transmit_ack:
+4a84 20404a54 call g24_rx_interrupt_clear 
+4a85 204047ce call g24_receive_packet 
+4a86 24778000 nrtn user3 
+
+g24_transmit_ack:
+4a87 6fe0c43d fetch 1 ,mem_24g_rxbuf 
+4a88 67e0c4cf store 1 ,mem_24g_data_type 
+4a89 204048be call g24_read_len_pid_crc 
+4a8a 6fe0c43e fetch 1 ,mem_24g_rxbuf + 1 
+4a8b 2feffe00 isolate1 bit_ack_24g ,pdata 
+4a8c 2020ca90 branch g24tx_no_ack ,true 
+
+g24tx_with_ack:
+4a8d 20404a3b call g24_ackpayload_prep 
+4a8e 2040488f call g24_transmit_prep 
+4a8f 2040483f call g24_transmit 
+
+g24tx_no_ack:
+4a90 20204837 branch g24_end_of_packet 
+
+g24_enable_nodata_timer:
+4a91 70455701 jam 1 ,mem_24g_nodata_timer_enable 
+
+g24_enable_nodata_timer_init:
+4a92 58000280 setarg timer_nodata_delay 
+4a93 d8e00008 arg g24_timer_nodata ,queue 
+4a94 2020754f branch timer_init 
+
+g24_mode_switch_init:
+4a95 471fc027 bpatchx patch27_7 ,mem_patch27 
+4a96 70455601 jam 1 ,mem_24g_mode_switch 
+4a97 70455a00 jam 0 ,mem_24g_time_slice 
+4a98 7044edff jam 0xff ,mem_24g_interval 
+4a99 20204902 branch g24_timer_init 
+
+g24_mode_switch_bind_work:
+4a9a 47204028 bpatchx patch28_0 ,mem_patch28 
+4a9b 6fe0c556 fetch 1 ,mem_24g_mode_switch 
+4a9c 207a0000 rtn blank 
+4a9d 204048ef call g24_timer_check 
+4a9e 24740000 nrtn user 
+4a9f 20404aa7 call g24_bind_mode_continue 
+4aa0 6fe0c55a fetch 1 ,mem_24g_time_slice 
+4aa1 1fe0fe01 increase 1 ,pdata 
+4aa2 1fe17e01 and_into 1 ,pdata 
+4aa3 67e0c55a store 1 ,mem_24g_time_slice 
+4aa4 c0004aac beq 0 ,g24_work_mode_switch 
+4aa5 c000caaf beq 1 ,g24_bind_mode_switch 
+4aa6 20600000 rtn 
+
+g24_bind_mode_continue:
+4aa7 6fe0c565 fetch 1 ,mem_24g_bind_mode_continue 
+4aa8 207a0000 rtn blank 
+4aa9 1fe0ffff increase -1 ,pdata 
+4aaa 67e0c565 store 1 ,mem_24g_bind_mode_continue 
+4aab 20600000 rtn 
+
+g24_work_mode_switch:
+4aac 6fe0c565 fetch 1 ,mem_24g_bind_mode_continue 
+4aad 247a0000 nrtn blank 
+4aae 20204af1 branch g24_switch_work_mode 
+
+g24_bind_mode_switch:
+4aaf 6fe0c565 fetch 1 ,mem_24g_bind_mode_continue 
+4ab0 247a0000 nrtn blank 
+4ab1 2020499f branch g24_bind_mode_enable 
+
+g24_mode_b_s_switch_init:
+4ab2 6fe0c56d fetch 1 ,mem_24g_b_s_mode_switch_disable 
+4ab3 247a0000 nrtn blank 
+4ab4 6fe0c56b fetch 1 ,mem_24g_mode_b_s_switch_exit 
+4ab5 205a4ae0 call g24_mode_b_s_switch_start ,blank 
+4ab6 6fe0c568 fetch 1 ,mem_24g_mode_b_s_switch_init 
+4ab7 c3800000 rtnbit1 0 
+4ab8 79207e00 set1 0 ,pdata 
+4ab9 67e0c568 store 1 ,mem_24g_mode_b_s_switch_init 
+4aba 70456701 jam 1 ,mem_24g_mode_b_s_switch 
+4abb 70456c00 jam 0 ,mem_24g_b_s_time_slice 
+4abc 58000000 setarg 0 
+4abd 67e14569 store 2 ,mem_24g_mode_b_s_switch_cnt 
+4abe 7044ed60 jam 0x60 ,mem_24g_interval 
+4abf 20204902 branch g24_timer_init 
+
+g24_mode_switch_bind_search:
+4ac0 4720c028 bpatchx patch28_1 ,mem_patch28 
+4ac1 6fe0c559 fetch 1 ,mem_24g_work_mode 
+4ac2 c1000000 rtneq dongle_work 
+4ac3 6fe0c56d fetch 1 ,mem_24g_b_s_mode_switch_disable 
+4ac4 247a0000 nrtn blank 
+4ac5 6fe0c56b fetch 1 ,mem_24g_mode_b_s_switch_exit 
+4ac6 247a0000 nrtn blank 
+4ac7 6fe0c567 fetch 1 ,mem_24g_mode_b_s_switch 
+4ac8 207a0000 rtn blank 
+4ac9 204048ef call g24_timer_check 
+4aca 24740000 nrtn user 
+4acb 6fe14569 fetch 2 ,mem_24g_mode_b_s_switch_cnt 
+4acc 1fe0fe01 increase 1 ,pdata 
+4acd 67e14569 store 2 ,mem_24g_mode_b_s_switch_cnt 
+4ace d84007d0 arg 0x7d0 ,temp 
+4acf 98467c00 isub temp ,null 
+4ad0 20214adc branch g24_mode_b_s_switch_exit ,positive 
+4ad1 20404aa7 call g24_bind_mode_continue 
+4ad2 6fe0c56c fetch 1 ,mem_24g_b_s_time_slice 
+4ad3 1fe0fe01 increase 1 ,pdata 
+4ad4 1fe17e01 and_into 1 ,pdata 
+4ad5 67e0c56c store 1 ,mem_24g_b_s_time_slice 
+4ad6 c0004ad9 beq 0 ,g24_mode_switch_search 
+4ad7 c000c99f beq 1 ,g24_bind_mode_enable 
+4ad8 20600000 rtn 
+
+g24_mode_switch_search:
+4ad9 6fe0c565 fetch 1 ,mem_24g_bind_mode_continue 
+4ada 243a499f nbranch g24_bind_mode_enable ,blank 
+4adb 20204ba3 branch g24_search_mode_enable 
+
+g24_mode_b_s_switch_exit:
+4adc 70456b01 jam 1 ,mem_24g_mode_b_s_switch_exit 
+4add 20204ba3 branch g24_search_mode_enable 
+
+g24_mode_b_s_switch_stop:
+4ade 70456700 jam 0 ,mem_24g_mode_b_s_switch 
+4adf 20600000 rtn 
+
+g24_mode_b_s_switch_start:
+4ae0 70456701 jam 1 ,mem_24g_mode_b_s_switch 
+4ae1 20600000 rtn 
+
+g24_work_init:
+4ae2 47214028 bpatchx patch28_2 ,mem_patch28 
+4ae3 6fe0c558 fetch 1 ,mem_24g_mode_init 
+4ae4 c3800000 rtnbit1 dongle_work 
+4ae5 79207e00 set1 dongle_work ,pdata 
+4ae6 67e0c558 store 1 ,mem_24g_mode_init 
+4ae7 6fe0c566 fetch 1 ,mem_tx_power_temp 
+4ae8 67e0c116 store 1 ,mem_tx_power 
+4ae9 70455400 jam 0 ,mem_24g_ackpayload_enable 
+4aea 70076100 jam 0 ,mem_usb_tx_enable 
+4aeb 70454d01 jam 1 ,mem_24g_abort_packet 
+4aec 7044c400 jam 0 ,mem_24g_pid 
+4aed 6fe24437 fetch 4 ,mem_24g_lap 
+4aee 204048e0 call g24_update_addr_and_synccrc8 
+4aef 204048cc call g24_ch 
+4af0 20204a54 branch g24_rx_interrupt_clear 
+
+g24_switch_work_mode:
+4af1 70455400 jam 0 ,mem_24g_ackpayload_enable 
+
+g24_work_mode_enable:
+4af2 70455900 jam dongle_work ,mem_24g_work_mode 
+4af3 70455800 jam clear_init ,mem_24g_mode_init 
+4af4 20600000 rtn 
+
+g24_work_mode_start:
+4af5 6fe0c559 fetch 1 ,mem_24g_work_mode 
+4af6 c1800000 rtnne dongle_work 
+4af7 20404ae2 call g24_work_init 
+4af8 20404ba7 call g24_ch_process 
+4af9 20204a41 branch g24_receive_packet_start 
+
+g24_bind_mode_auto:
+4afa 4721c028 bpatchx patch28_3 ,mem_patch28 
+4afb 6fe0c559 fetch 1 ,mem_24g_work_mode 
+4afc c1808000 rtnne dongle_bind 
+4afd 204049a2 call g24_bind_init 
+4afe 204049b0 call g24_bind_data_process 
+4aff 6fe0c553 fetch 1 ,mem_24g_pair_mode 
+4b00 247a0000 nrtn blank 
+4b01 6fe0c51a fetch 1 ,mem_24g_bind_device_status 
+4b02 207a0000 rtn blank 
+4b03 70455600 jam 0 ,mem_24g_mode_switch 
+4b04 20404af1 call g24_switch_work_mode 
+4b05 20404a91 call g24_enable_nodata_timer 
+4b06 20204902 branch g24_timer_init 
+
+g24_search_mode_init:
+4b07 6fe0c558 fetch 1 ,mem_24g_mode_init 
+4b08 c3838000 rtnbit1 dongle_search 
+4b09 79207e07 set1 dongle_search ,pdata 
+4b0a 67e0c558 store 1 ,mem_24g_mode_init 
+4b0b 70455a00 jam 0 ,mem_24g_time_slice 
+4b0c 70455401 jam 1 ,mem_24g_ackpayload_enable 
+4b0d 58000000 setarg 0 
+4b0e 67e1c580 store 3 ,mem_rssi_noise_self_index 
+4b0f 67e3c55d store 7 ,mem_24g_self_config_ch_once 
+4b10 20404b95 call g24_receiver_addr_check 
+4b11 24628000 nrtn zero 
+4b12 6fe0c4d4 fetch 1 ,mem_24g_current_ch_number 
+4b13 67e0c55c store 1 ,mem_24g_self_ch_number 
+4b14 6fe0c4d3 fetch 1 ,mem_24g_ch 
+4b15 67e0c55b store 1 ,mem_24g_self_last_ch 
+4b16 20600000 rtn 
+
+g24_search_mode_auto:
+4b17 47224028 bpatchx patch28_4 ,mem_patch28 
+4b18 6fe0c559 fetch 1 ,mem_24g_work_mode 
+4b19 c1838000 rtnne dongle_search 
+4b1a 20404b07 call g24_search_mode_init 
+4b1b 20404b3d call g24_auto_addr_ch_search 
+4b1c 20404a84 call g24_receive_transmit_ack 
+4b1d 2437ca54 nbranch g24_rx_interrupt_clear ,user3 
+4b1e 20404b95 call g24_receiver_addr_check 
+4b1f 2042ca43 call g24_receive_packet_parse ,zero 
+4b20 6fe0c54d fetch 1 ,mem_24g_abort_packet 
+4b21 205a4ade call g24_mode_b_s_switch_stop ,blank 
+4b22 70455900 jam dongle_work ,mem_24g_work_mode 
+4b23 6fe0c558 fetch 1 ,mem_24g_mode_init 
+4b24 79207e00 set1 dongle_work ,pdata 
+4b25 67e0c558 store 1 ,mem_24g_mode_init 
+4b26 6fe0c554 fetch 1 ,mem_24g_ackpayload_enable 
+4b27 1fe67c02 sub pdata ,2 ,null 
+4b28 2442cb93 ncall g24_ackpayload_disable ,zero 
+4b29 20404a54 call g24_rx_interrupt_clear 
+4b2a 20404a91 call g24_enable_nodata_timer 
+4b2b 20404b95 call g24_receiver_addr_check 
+4b2c 2022cb36 branch g24_self_ch_num_reinit ,zero 
+4b2d 6fe244d5 fetch 4 ,mem_24g_addr 
+4b2e 684a4577 fetcht 4 ,mem_24g_device2_addr 
+4b2f 98467c00 isub temp ,null 
+4b30 2022cb39 branch g24_device2_ch_num_reinit ,zero 
+4b31 6fe244d5 fetch 4 ,mem_24g_addr 
+4b32 684a4573 fetcht 4 ,mem_24g_device1_addr 
+4b33 98467c00 isub temp ,null 
+4b34 2022cb3b branch g24_device1_ch_num_reinit ,zero 
+4b35 20600000 rtn 
+
+g24_self_ch_num_reinit:
+4b36 6fe0c55c fetch 1 ,mem_24g_self_ch_number 
+
+g24_current_ch_num_reinit:
+4b37 67e0c4d4 store 1 ,mem_24g_current_ch_number 
+4b38 20600000 rtn 
+
+g24_device2_ch_num_reinit:
+4b39 6fe0c562 fetch 1 ,mem_24g_device2_ch_number 
+4b3a 20204b37 branch g24_current_ch_num_reinit 
+
+g24_device1_ch_num_reinit:
+4b3b 6fe0c55f fetch 1 ,mem_24g_device1_ch_number 
+4b3c 20204b37 branch g24_current_ch_num_reinit 
+
+g24_auto_addr_ch_search:
+4b3d 4722c028 bpatchx patch28_5 ,mem_patch28 
+4b3e 6fe0c55a fetch 1 ,mem_24g_time_slice 
+4b3f 1fe0fe01 increase 1 ,pdata 
+4b40 1fe17e03 and_into 3 ,pdata 
+4b41 67e0c55a store 1 ,mem_24g_time_slice 
+4b42 c0004b61 beq 0 ,g24_auto_bind_config_device2 
+4b43 c000cb7b beq 1 ,g24_auto_bind_config_self 
+4b44 c0014b47 beq 2 ,g24_auto_bind_config_device1 
+4b45 c001cb7b beq 3 ,g24_auto_bind_config_self 
+4b46 20600000 rtn 
+
+g24_auto_bind_config_device1:
+4b47 204049cf call g24_bind_dvc1_payload_cfg 
+4b48 6fe24573 fetch 4 ,mem_24g_device1_addr 
+4b49 203a4b3d branch g24_auto_addr_ch_search ,blank 
+4b4a 204048e0 call g24_update_addr_and_synccrc8 
+4b4b 6fe0c560 fetch 1 ,mem_24g_device1_config_ch_once 
+4b4c 205a4b5c call g24_device1_config_ch_once ,blank 
+4b4d 6fe0c55e fetch 1 ,mem_24g_device1_last_ch 
+4b4e 67e0c4d3 store 1 ,mem_24g_ch 
+4b4f 6848c581 fetcht 1 ,mem_rssi_noise_device1_index 
+4b50 6a214587 fetchr rega ,2 ,mem_rssi_noise_device1_buffer_ptr 
+4b51 20404c2c call rssi_store 
+4b52 6048c581 storet 1 ,mem_rssi_noise_device1_index 
+4b53 20404c35 call rssi_average 
+4b54 6048c57e storet 1 ,mem_rssi_noise_device1_avg 
+4b55 18467c50 sub temp ,rssi_thresh_noise ,null 
+4b56 24610000 nrtn positive 
+4b57 6848c55f fetcht 1 ,mem_24g_device1_ch_number 
+4b58 204048d1 call g24_ch_map_size 
+4b59 6048c55f storet 1 ,mem_24g_device1_ch_number 
+4b5a 67e0c55e store 1 ,mem_24g_device1_last_ch 
+4b5b 20600000 rtn 
+
+g24_device1_config_ch_once:
+4b5c 70456001 jam 1 ,mem_24g_device1_config_ch_once 
+4b5d d8400000 arg 0 ,temp 
+4b5e 204048d6 call g24_ch_calc 
+4b5f 67e0c55e store 1 ,mem_24g_device1_last_ch 
+4b60 20600000 rtn 
+
+g24_auto_bind_config_device2:
+4b61 204049d5 call g24_bind_dvc2_payload_cfg 
+4b62 6fe24577 fetch 4 ,mem_24g_device2_addr 
+4b63 203a4b3d branch g24_auto_addr_ch_search ,blank 
+4b64 204048e0 call g24_update_addr_and_synccrc8 
+4b65 6fe0c563 fetch 1 ,mem_24g_device2_config_ch_once 
+4b66 205a4b76 call g24_device2_config_ch_once ,blank 
+4b67 6fe0c561 fetch 1 ,mem_24g_device2_last_ch 
+4b68 67e0c4d3 store 1 ,mem_24g_ch 
+4b69 6848c582 fetcht 1 ,mem_rssi_noise_device2_index 
+4b6a 6a214589 fetchr rega ,2 ,mem_rssi_noise_device2_buffer_ptr 
+4b6b 20404c2c call rssi_store 
+4b6c 6048c582 storet 1 ,mem_rssi_noise_device2_index 
+4b6d 20404c35 call rssi_average 
+4b6e 6048c57f storet 1 ,mem_rssi_noise_device2_avg 
+4b6f 18467c50 sub temp ,rssi_thresh_noise ,null 
+4b70 24610000 nrtn positive 
+4b71 6848c562 fetcht 1 ,mem_24g_device2_ch_number 
+4b72 204048d1 call g24_ch_map_size 
+4b73 6048c562 storet 1 ,mem_24g_device2_ch_number 
+4b74 67e0c561 store 1 ,mem_24g_device2_last_ch 
+4b75 20600000 rtn 
+
+g24_device2_config_ch_once:
+4b76 70456301 jam 1 ,mem_24g_device2_config_ch_once 
+4b77 d8400000 arg 0 ,temp 
+4b78 204048d6 call g24_ch_calc 
+4b79 67e0c561 store 1 ,mem_24g_device2_last_ch 
+4b7a 20600000 rtn 
+
+g24_auto_bind_config_self:
+4b7b 204049cf call g24_bind_dvc1_payload_cfg 
+4b7c 6fe24437 fetch 4 ,mem_24g_lap 
+4b7d 204048e0 call g24_update_addr_and_synccrc8 
+4b7e 6fe0c55d fetch 1 ,mem_24g_self_config_ch_once 
+4b7f 205a4b8f call g24_self_config_ch_once ,blank 
+4b80 6fe0c55b fetch 1 ,mem_24g_self_last_ch 
+4b81 67e0c4d3 store 1 ,mem_24g_ch 
+4b82 6848c580 fetcht 1 ,mem_rssi_noise_self_index 
+4b83 6a214585 fetchr rega ,2 ,mem_rssi_noise_self_buffer_ptr 
+4b84 20404c2c call rssi_store 
+4b85 6048c580 storet 1 ,mem_rssi_noise_self_index 
+4b86 20404c35 call rssi_average 
+4b87 6048c57d storet 1 ,mem_rssi_noise_self_avg 
+4b88 18467c50 sub temp ,rssi_thresh_noise ,null 
+4b89 24610000 nrtn positive 
+4b8a 6848c55c fetcht 1 ,mem_24g_self_ch_number 
+4b8b 204048d1 call g24_ch_map_size 
+4b8c 6048c55c storet 1 ,mem_24g_self_ch_number 
+4b8d 67e0c55b store 1 ,mem_24g_self_last_ch 
+4b8e 20600000 rtn 
+
+g24_self_config_ch_once:
+4b8f 70455d01 jam 1 ,mem_24g_self_config_ch_once 
+4b90 6fe0c55b fetch 1 ,mem_24g_self_last_ch 
+4b91 67e0c4d3 store 1 ,mem_24g_ch 
+4b92 20600000 rtn 
+
+g24_ackpayload_disable:
+4b93 70455400 jam 0 ,mem_24g_ackpayload_enable 
+4b94 20600000 rtn 
+
+g24_receiver_addr_check:
+4b95 6fe244d5 fetch 4 ,mem_24g_addr 
+4b96 684a4437 fetcht 4 ,mem_24g_lap 
+4b97 98467c00 isub temp ,null 
+4b98 20600000 rtn 
+
+g24_nodata_process:
+4b99 6fe0c554 fetch 1 ,mem_24g_ackpayload_enable 
+4b9a c1010000 rtneq 2 
+4b9b 6fe0c557 fetch 1 ,mem_24g_nodata_timer_enable 
+4b9c 207a0000 rtn blank 
+4b9d d8e00008 arg g24_timer_nodata ,queue 
+4b9e 2040755d call timer_check 
+4b9f 247a0000 nrtn blank 
+4ba0 70455700 jam 0 ,mem_24g_nodata_timer_enable 
+4ba1 70456500 jam 0 ,mem_24g_bind_mode_continue 
+4ba2 20404ab2 call g24_mode_b_s_switch_init 
+
+g24_search_mode_enable:
+4ba3 47234028 bpatchx patch28_6 ,mem_patch28 
+4ba4 70455907 jam dongle_search ,mem_24g_work_mode 
+4ba5 70455800 jam clear_init ,mem_24g_mode_init 
+4ba6 20204a54 branch g24_rx_interrupt_clear 
+
+g24_ch_process:
+4ba7 4723c028 bpatchx patch28_7 ,mem_patch28 
+4ba8 6fe0c54d fetch 1 ,mem_24g_abort_packet 
+4ba9 c000cc6c beq 1 ,rssi_noise_monitor 
+4baa 6fe0c555 fetch 1 ,mem_24g_hop_packet 
+4bab c000cbbb beq 1 ,g24_ch_receive_hop_pac 
+4bac 684a454e fetcht 4 ,mem_24g_hop_btclk 
+4bad 1c427e00 copy clkn_bt ,pdata 
+4bae 98467c00 isub temp ,null 
+4baf 244148ff ncall g24_timer_timeout ,positive 
+4bb0 1fe22400 copy pdata ,regb 
+4bb1 6fe2454e fetch 4 ,mem_24g_hop_btclk 
+4bb2 6848c552 fetcht 1 ,mem_24g_hop_interval 
+4bb3 98408400 iadd temp ,temp 
+4bb4 1a427e00 copy regb ,pdata 
+4bb5 98467c00 isub temp ,null 
+4bb6 24610000 nrtn positive 
+4bb7 793ffe1c set0 28 ,pdata 
+4bb8 67e2454e store 4 ,mem_24g_hop_btclk 
+4bb9 70454d01 jam 1 ,mem_24g_abort_packet 
+4bba 202048cc branch g24_ch 
+
+g24_ch_receive_hop_pac:
+4bbb 70455500 jam 0 ,mem_24g_hop_packet 
+4bbc 202048cc branch g24_ch 
+
+g24_ch_timer_reinit:
+4bbd 1c427e00 copy clkn_bt ,pdata 
+4bbe 67e2454e store 4 ,mem_24g_hop_btclk 
+4bbf 20600000 rtn 
+
+g24_reconn_timeout_timer:
+4bc0 da604521 arg mem_24g_reconn_timeout ,regc 
+4bc1 da404ceb arg g24_stop_24g_mode ,regb 
+4bc2 20204de8 branch timer_single_step_2b 
+
+g24_reconn_start:
+4bc3 47244029 bpatchx patch29_0 ,mem_patch29 
+4bc4 79200026 set1 mark_24g ,mark 
+4bc5 6fe0c53b fetch 1 ,mem_24g_conn_sm 
+4bc6 793ffe01 set0 state_24g_pair ,pdata 
+4bc7 79207e02 set1 state_24g_reconn ,pdata 
+4bc8 67e0c53b store 1 ,mem_24g_conn_sm 
+4bc9 6fe0c526 fetch 1 ,mem_24g_fast_conn_enable 
+4bca 203a4bd8 branch g24_reconn_receiver_addr ,blank 
+4bcb 6fe0c525 fetch 1 ,mem_24g_reconn_type 
+4bcc c000cbd0 beq fast_conn_and_receiver ,g24_reconn_fast_conn 
+4bcd c0014bd0 beq fast_conn_and_3_0_addr ,g24_reconn_fast_conn 
+4bce c001cbdf beq receiver_and_3_0_addr ,g24_reconn_device_3_0_addr 
+4bcf c0024bdf beq pair_and_3_0_addr ,g24_reconn_device_3_0_addr 
+
+g24_reconn_fast_conn:
+4bd0 6fe0c516 fetch 1 ,mem_24g_pair_tx_power 
+4bd1 67e0c116 store 1 ,mem_tx_power 
+4bd2 6848c52f fetcht 1 ,mem_24g_fast_conn_temp_ch 
+4bd3 6048c4d4 storet 1 ,mem_24g_current_ch_number 
+4bd4 6fe24527 fetch 4 ,mem_24g_fast_conn_addr 
+4bd5 20404be8 call g24_ch_syncword_crc8_init 
+4bd6 6048c52f storet 1 ,mem_24g_fast_conn_temp_ch 
+4bd7 20600000 rtn 
+
+g24_reconn_receiver_addr:
+4bd8 70411603 jam tx_power_3db ,mem_tx_power 
+4bd9 6848c530 fetcht 1 ,mem_24g_receiver_temp_ch 
+4bda 6048c4d4 storet 1 ,mem_24g_current_ch_number 
+4bdb 6fe2452b fetch 4 ,mem_24g_receiver_addr 
+4bdc 20404be8 call g24_ch_syncword_crc8_init 
+4bdd 6048c530 storet 1 ,mem_24g_receiver_temp_ch 
+4bde 20600000 rtn 
+
+g24_reconn_device_3_0_addr:
+4bdf 70411603 jam tx_power_3db ,mem_tx_power 
+4be0 6848c531 fetcht 1 ,mem_24g_device_temp_ch 
+4be1 6048c4d4 storet 1 ,mem_24g_current_ch_number 
+4be2 6fe24543 fetch 4 ,mem_24g_device_addr 
+4be3 20404be8 call g24_ch_syncword_crc8_init 
+4be4 6048c531 storet 1 ,mem_24g_device_temp_ch 
+4be5 20600000 rtn 
+
+g24_store_receiver_addr:
+4be6 6fe244a5 fetch 4 ,mem_24g_rxpayload + 2 
+4be7 67e2452b store 4 ,mem_24g_receiver_addr 
+
+g24_ch_syncword_crc8_init:
+4be8 204048e0 call g24_update_addr_and_synccrc8 
+4be9 202048cc branch g24_ch 
+
+g24_reconn_dispatch:
+4bea 4724c029 bpatchx patch29_1 ,mem_patch29 
+4beb 20404c05 call g24_reconn_data_prep 
+4bec 20404cc8 call g24_transmit_receive_ack 
+4bed 242c4c0c nbranch g24_reconn_device_fail ,sync 
+4bee 2437cc0c nbranch g24_reconn_device_fail ,user3 
+4bef 20404cdf call g24_ackpayload_parse 
+
+g24_reconn_receiver_succ:
+4bf0 6fe0c53b fetch 1 ,mem_24g_conn_sm 
+4bf1 793ffe02 set0 state_24g_reconn ,pdata 
+4bf2 67e0c53b store 1 ,mem_24g_conn_sm 
+4bf3 58000000 setarg 0 
+4bf4 67e1451d store 2 ,mem_24g_pair_timeout 
+4bf5 67e14523 store 2 ,mem_24g_reconn_count 
+4bf6 67e14521 store 2 ,mem_24g_reconn_timeout 
+4bf7 6fe24511 fetch 4 ,mem_24g_pair_addr 
+4bf8 684a44d5 fetcht 4 ,mem_24g_addr 
+4bf9 98467c00 isub temp ,null 
+4bfa 2022c93b branch g24_pair_start ,zero 
+4bfb 6fe24543 fetch 4 ,mem_24g_device_addr 
+4bfc 684a44d5 fetcht 4 ,mem_24g_addr 
+4bfd 98467c00 isub temp ,null 
+4bfe 2042cbe6 call g24_store_receiver_addr ,zero 
+4bff 7004c33c jam bt_evt_24g_attempt_success ,mem_fifo_temp 
+4c00 2040709b call ui_ipc_send_event 
+
+g24_txbuf_clear:
+4c01 47254029 bpatchx patch29_2 ,mem_patch29 
+4c02 df200004 arg 4 ,loopcnt 
+4c03 d8a0445f arg mem_24g_txbuf ,contw 
+4c04 20207500 branch memset0 
+
+g24_reconn_data_prep:
+4c05 70445fff jam datatype_attemp ,mem_24g_txbuf 
+4c06 6fe0c4cf fetch 1 ,mem_24g_data_type 
+4c07 67e0c460 store 1 ,mem_24g_txbuf + 1 
+4c08 6fe24543 fetch 4 ,mem_24g_device_addr 
+4c09 67e24461 store 4 ,mem_24g_txbuf + 2 
+4c0a 7044ce06 jam 6 ,mem_24g_datalen 
+4c0b 2020488f branch g24_transmit_prep 
+
+g24_reconn_device_fail:
+4c0c 6fe0c526 fetch 1 ,mem_24g_fast_conn_enable 
+4c0d 203a48cc branch g24_ch ,blank 
+4c0e 6fe14523 fetch 2 ,mem_24g_reconn_count 
+4c0f 1fe0fe01 increase 1 ,pdata 
+4c10 67e14523 store 2 ,mem_24g_reconn_count 
+4c11 2feffe03 isolate1 3 ,pdata 
+4c12 6fe0c525 fetch 1 ,mem_24g_reconn_type 
+4c13 c000cc18 beq fast_conn_and_receiver ,g24_reconn_fast_conn_and_receiver 
+4c14 c0014c1a beq fast_conn_and_3_0_addr ,g24_reconn_fast_conn_and_3_0 
+4c15 c001cc1c beq receiver_and_3_0_addr ,g24_reconn_receiver_and_3_0 
+4c16 c0024c1e beq pair_and_3_0_addr ,g24_reconn_pair_and_3_0 
+4c17 20204bd8 branch g24_reconn_receiver_addr 
+
+g24_reconn_fast_conn_and_receiver:
+4c18 2020cbd8 branch g24_reconn_receiver_addr ,true 
+4c19 20204bd0 branch g24_reconn_fast_conn 
+
+g24_reconn_fast_conn_and_3_0:
+4c1a 2020cbdf branch g24_reconn_device_3_0_addr ,true 
+4c1b 20204bd0 branch g24_reconn_fast_conn 
+
+g24_reconn_receiver_and_3_0:
+4c1c 2020cbdf branch g24_reconn_device_3_0_addr ,true 
+4c1d 20204bd8 branch g24_reconn_receiver_addr 
+
+g24_reconn_pair_and_3_0:
+4c1e 2020c946 branch g24_pair_init_param ,true 
+4c1f 20204bdf branch g24_reconn_device_3_0_addr 
+
+g24_data_attemp:
+4c20 6fe0c52e fetch 1 ,mem_24g_rxdata_temp + 3 
+4c21 c000cc24 beq datatype_device1 ,g24_data_attemp_device1 
+4c22 c0014c28 beq datatype_device2 ,g24_data_attemp_device2 
+4c23 20600000 rtn 
+
+g24_data_attemp_device1:
+4c24 6fe2452f fetch 4 ,mem_24g_rxdata_temp + 4 
+4c25 67e2456f store 4 ,mem_24g_transmitter_addr 
+
+g24_store_device1_addr:
+4c26 67e24573 store 4 ,mem_24g_device1_addr 
+4c27 20600000 rtn 
+
+g24_data_attemp_device2:
+4c28 6fe2452f fetch 4 ,mem_24g_rxdata_temp + 4 
+4c29 67e2456f store 4 ,mem_24g_transmitter_addr 
+
+g24_store_device2_addr:
+4c2a 67e24577 store 4 ,mem_24g_device2_addr 
+4c2b 20600000 rtn 
+
+rssi_store:
+4c2c 4725c029 bpatchx patch29_3 ,mem_patch29 
+4c2d 1a227e00 copy rega ,pdata 
+4c2e 98408a00 iadd temp ,contw 
+4c2f 6fe08009 fetch 1 ,mem_rssi 
+4c30 e7e08005 istore 1 ,contw 
+4c31 18408401 increase 1 ,temp 
+4c32 6fe0c517 fetch 1 ,mem_rssi_buff_index 
+4c33 98410400 iand temp ,temp 
+4c34 20600000 rtn 
+
+rssi_average:
+4c35 47264029 bpatchx patch29_4 ,mem_patch29 
+4c36 6fe0c517 fetch 1 ,mem_rssi_buff_index 
+4c37 1fe0fe01 increase 1 ,pdata 
+4c38 67e104ef store 2 ,mem_loopcnt 
+4c39 1fe27200 copy pdata ,loopcnt 
+4c3a 1a220c00 copy rega ,contr 
+4c3b dfe00000 arg 0 ,pdata 
+
+rssi_average_loop:
+4c3c e8408006 ifetcht 1 ,contr 
+4c3d 9840fe00 iadd temp ,pdata 
+4c3e c2004c3c loop rssi_average_loop 
+4c3f 684904ef fetcht 2 ,mem_loopcnt 
+4c40 9846fc00 idiv temp 
+4c41 204075d0 call wait_div_end 
+4c42 18078400 quotient temp 
+4c43 c6138000 rtnmark1 mark_24g_rxmode 
+4c44 18427e00 copy temp ,pdata 
+4c45 c6930000 rtnmark0 mark_24g 
+4c46 20403a64 call bcd 
+4c47 1fe20400 copy pdata ,temp 
+4c48 20600000 rtn 
+
+save_rssi_dec:
+4c49 20403a45 call save_rssi 
+4c4a 20203a60 branch rssi_hex2dec 
+
+rssi_transmitter_buff_init:
+4c4b 6fe14533 fetch 2 ,mem_rssi_signal_buf_ptr 
+4c4c 20204c5f branch rssi_buff_clear 
+
+rssi_signal:
+4c4d 1fe22200 copy pdata ,rega 
+4c4e 6848c532 fetcht 1 ,mem_rssi_signal_index 
+4c4f 6fe14533 fetch 2 ,mem_rssi_signal_buf_ptr 
+4c50 98408a00 iadd temp ,contw 
+4c51 1a227e00 copy rega ,pdata 
+4c52 e7e08005 istore 1 ,contw 
+4c53 18408401 increase 1 ,temp 
+4c54 6fe0c517 fetch 1 ,mem_rssi_buff_index 
+4c55 98410400 iand temp ,temp 
+4c56 6048c532 storet 1 ,mem_rssi_signal_index 
+4c57 20600000 rtn 
+
+rssi_receiver_buff_init:
+4c58 6fe14583 fetch 2 ,mem_rssi_noise_buffer_ptr 
+4c59 20404c5f call rssi_buff_clear 
+4c5a 6fe14585 fetch 2 ,mem_rssi_noise_self_buffer_ptr 
+4c5b 20404c5f call rssi_buff_clear 
+4c5c 6fe14587 fetch 2 ,mem_rssi_noise_device1_buffer_ptr 
+4c5d 20404c5f call rssi_buff_clear 
+4c5e 6fe14589 fetch 2 ,mem_rssi_noise_device2_buffer_ptr 
+
+rssi_buff_clear:
+4c5f 207a0000 rtn blank 
+4c60 1fe20a00 copy pdata ,contw 
+4c61 6fe0c517 fetch 1 ,mem_rssi_buff_index 
+4c62 1fe0fe01 increase 1 ,pdata 
+4c63 1fe27200 copy pdata ,loopcnt 
+4c64 2020750f branch clear_mem 
+
+rssi_noise:
+4c65 20404c49 call save_rssi_dec 
+4c66 207a0000 rtn blank 
+4c67 6848c57c fetcht 1 ,mem_rssi_noise_index 
+4c68 6a214583 fetchr rega ,2 ,mem_rssi_noise_buffer_ptr 
+4c69 20404c2c call rssi_store 
+4c6a 6048c57c storet 1 ,mem_rssi_noise_index 
+4c6b 20600000 rtn 
+
+rssi_noise_monitor:
+4c6c 6a214583 fetchr rega ,2 ,mem_rssi_noise_buffer_ptr 
+4c6d 20404c35 call rssi_average 
+4c6e 6048c57b storet 1 ,mem_rssi_noise_avg 
+4c6f 18467c50 sub temp ,rssi_thresh_noise ,null 
+4c70 24610000 nrtn positive 
+4c71 202048cc branch g24_ch 
+
+g24_transmit_init:
+4c72 6fe24437 fetch 4 ,mem_24g_lap 
+4c73 67e24543 store 4 ,mem_24g_device_addr 
+4c74 20404922 call g24_rx_window_init 
+4c75 20204c4b branch rssi_transmitter_buff_init 
+
+g24_interval_param_4ms:
+4c76 58002fb2 setarg g24_4ms_interval_param 
+4c77 67e1c547 store 3 ,mem_24g_short_sleep_set 
+4c78 58100c0c setarg 0x100c0c 
+4c79 67e1c4ed store 3 ,mem_24g_interval 
+4c7a 5800bb80 setarg 0x00bb80 
+4c7b 67e1c54a store 3 ,mem_24g_long_sleep_set 
+4c7c 70456005 jam 5 ,mem_24g_fast_hop_count 
+4c7d 20600000 rtn 
+
+g24_interval_param_8ms:
+4c7e 5800f80c setarg g24_8ms_interval_param 
+4c7f 67e1c547 store 3 ,mem_24g_short_sleep_set 
+4c80 581c1919 setarg 0x1c1919 
+4c81 67e1c4ed store 3 ,mem_24g_interval 
+4c82 58017700 setarg 0x017700 
+4c83 67e1c54a store 3 ,mem_24g_long_sleep_set 
+4c84 7045600b jam 11 ,mem_24g_fast_hop_count 
+4c85 20600000 rtn 
+
+g24_transmit_dispatch:
+4c86 c6930000 rtnmark0 mark_24g 
+4c87 6fe0c53b fetch 1 ,mem_24g_conn_sm 
+4c88 c280c94d bbit1 state_24g_pair ,g24_pair_dispatch 
+4c89 c2814bea bbit1 state_24g_reconn ,g24_reconn_dispatch 
+4c8a 6fe0c557 fetch 1 ,mem_24g_transmit_by_interrupt 
+4c8b c000cd35 beq g24_tx_timer_int_enable ,g24_transmit_by_interrupt 
+
+g24_transmit_no_interrupt:
+4c8c 4726c029 bpatchx patch29_5 ,mem_patch29 
+4c8d 20404c9d call g24_txdata_prep 
+4c8e 24344d10 nbranch g24_nodata_transmit ,user 
+
+g24_transmit_start:
+4c8f 20404cb2 call g24_transmit_process 
+4c90 20404d5d call power_ctrl_start 
+4c91 6fe0c095 fetch 1 ,mem_device_option 
+4c92 c00460b1 beq dvc_op_mouse ,mouse_24g_transmit_start 
+
+g24_transmit_start_next:
+4c93 6fe4454a fetch 8 ,mem_24g_long_sleep_set 
+4c94 67e444f5 store 8 ,mem_24g_enter_hibernate 
+4c95 6fe1455c fetch 2 ,mem_24g_long_sleep_param_update_timer_init 
+4c96 67e1455e store 2 ,mem_24g_long_sleep_param_update_timer 
+
+g24_short_sleep:
+4c97 47274029 bpatchx patch29_6 ,mem_patch29 
+4c98 20404d2c call g24_lpm_wait 
+4c99 24740000 nrtn user 
+4c9a 2040765e call clear_wake 
+4c9b 6fe1c547 fetch 3 ,mem_24g_short_sleep_set 
+4c9c 20204d29 branch g24_long_seep2 
+
+g24_txdata_prep:
+4c9d 20404ca0 call g24_package_data 
+4c9e 24740000 nrtn user 
+4c9f 2020488f branch g24_transmit_prep 
+
+g24_package_data:
+4ca0 6fe14535 fetch 2 ,mem_cb_24g_transmit_data 
+4ca1 204075e6 call callback_func 
+4ca2 20344ca6 branch g24_accumulate_data ,user 
+4ca3 6fe3c460 fetch 7 ,mem_24g_txbuf + 1 
+4ca4 207a0000 rtn blank 
+4ca5 20207636 branch enable_user 
+
+g24_accumulate_data:
+4ca6 70454100 jam 0 ,mem_24g_abort_pac 
+4ca7 1a20fe01 add rega ,1 ,pdata 
+4ca8 67e0c4ce store 1 ,mem_24g_datalen 
+4ca9 20404cae call g24_transmit_rf_ctrl_clear 
+4caa 67e0c45f store 1 ,mem_24g_txbuf 
+4cab 1a420c00 copy regb ,contr 
+4cac 1a227200 copy rega ,loopcnt 
+4cad 20207548 branch memcpy 
+
+g24_transmit_rf_ctrl_clear:
+4cae 6fe0c4cf fetch 1 ,mem_24g_data_type 
+4caf 1fe17e07 and_into bits_data ,pdata 
+4cb0 67e0c4cf store 1 ,mem_24g_data_type 
+4cb1 20600000 rtn 
+
+g24_transmit_process:
+4cb2 70454000 jam 0 ,mem_24g_retry 
+
+g24_transmit_loop:
+4cb3 6961003b fetchr timeup ,2 ,mem_param_rx_setup 
+4cb4 34730200 until clkn_rt ,meet 
+4cb5 20404cc8 call g24_transmit_receive_ack 
+4cb6 6fe0c4c5 fetch 1 ,mem_24g_no_ack 
+4cb7 c000ccbd beq no_ack_24g ,g24_transmit_no_ack 
+4cb8 242c4cd6 nbranch g24_retransmit ,sync 
+4cb9 2437ccd6 nbranch g24_retransmit ,user3 
+4cba 20404cdf call g24_ackpayload_parse 
+4cbb 6fe0c095 fetch 1 ,mem_device_option 
+4cbc c00460a4 beq dvc_op_mouse ,mouse_wakeup_24g 
+
+g24_transmit_no_ack:
+4cbd 20404d8d call power_ctrl_pac_succ_incrs 
+
+g24_transmit_next_packet:
+4cbe 20404c01 call g24_txbuf_clear 
+4cbf 6fe0c4c4 fetch 1 ,mem_24g_pid 
+4cc0 1fe0fe01 increase 1 ,pdata 
+4cc1 67e0c4c4 store 1 ,mem_24g_pid 
+4cc2 20404d03 call g24_hop_enable_packet 
+
+g24_transmit_abandon:
+4cc3 4727c029 bpatchx patch29_7 ,mem_patch29 
+4cc4 58000000 setarg 0 
+4cc5 67e0c53c store 1 ,mem_24g_ensure 
+4cc6 67e1453d store 2 ,mem_24g_txfail_cnt 
+4cc7 20600000 rtn 
+
+g24_transmit_receive_ack:
+4cc8 4728402a bpatchx patch2a_0 ,mem_patch2a 
+4cc9 7857fc00 disable user3 
+4cca 2040483f call g24_transmit 
+4ccb 6fe0c4c5 fetch 1 ,mem_24g_no_ack 
+4ccc c000c837 beq no_ack_24g ,g24_end_of_packet 
+4ccd 18002a00 force 0 ,radio_ctrl 
+4cce 6fe244d5 fetch 4 ,mem_24g_addr 
+4ccf 98001200 iforce access 
+4cd0 68488008 fetcht 1 ,mem_last_freq 
+4cd1 20403954 call set_freq_rx 
+4cd2 2040396a call rf_rx_enable 
+4cd3 204047d6 call g24_receive_rxon 
+4cd4 2057c837 call g24_end_of_packet ,user3 
+4cd5 20600000 rtn 
+
+g24_retransmit:
+4cd6 6fe0c541 fetch 1 ,mem_24g_abort_pac 
+4cd7 247a0000 nrtn blank 
+4cd8 6fe1453d fetch 2 ,mem_24g_txfail_cnt 
+4cd9 1fe0fe01 increase 1 ,pdata 
+4cda 67e1453d store 2 ,mem_24g_txfail_cnt 
+4cdb 6fe0c53e fetch 1 ,mem_24g_txfail_cnt + 1 
+4cdc c2824ce7 bbit1 4 ,g24_tx_attempt_fail 
+4cdd 20404ced call g24_transmit_hop_process 
+4cde 20204cb3 branch g24_transmit_loop 
+
+g24_ackpayload_parse:
+4cdf 4728c02a bpatchx patch2a_1 ,mem_patch2a 
+4ce0 204048be call g24_read_len_pid_crc 
+4ce1 6fe0c4c3 fetch 1 ,mem_24g_rxdata_length 
+4ce2 207a0000 rtn blank 
+4ce3 98007200 iforce loopcnt 
+4ce4 d8c0443f arg mem_24g_rxbuf + 2 ,contr 
+4ce5 d8a044a3 arg mem_24g_rxpayload ,contw 
+4ce6 20207548 branch memcpy 
+
+g24_tx_attempt_fail:
+4ce7 4729402a bpatchx patch2a_2 ,mem_patch2a 
+4ce8 58000000 setarg 0 
+4ce9 67e1453d store 2 ,mem_24g_txfail_cnt 
+4cea 70453f01 jam 1 ,mem_24g_attempt_fail_flag 
+
+g24_stop_24g_mode:
+4ceb 7004c33a jam bt_evt_24g_attempt_fail ,mem_fifo_temp 
+4cec 2020709b branch ui_ipc_send_event 
+
+g24_transmit_hop_process:
+4ced 4729c02a bpatchx patch2a_3 ,mem_patch2a 
+4cee 6848c540 fetcht 1 ,mem_24g_retry 
+4cef 6fe0c560 fetch 1 ,mem_24g_fast_hop_count 
+4cf0 98467c00 isub temp ,null 
+4cf1 24214d0b nbranch g24_tx_fast_hop ,positive 
+4cf2 18408401 increase 1 ,temp 
+4cf3 6048c540 storet 1 ,mem_24g_retry 
+4cf4 6fe0c560 fetch 1 ,mem_24g_fast_hop_count 
+4cf5 c002ccfa beq 5 ,g24_transmit_hop_process_4ms 
+4cf6 6fe0c540 fetch 1 ,mem_24g_retry 
+4cf7 c0034d05 beq 6 ,g24_hop_ch_disable 
+4cf8 c0064d05 beq 12 ,g24_hop_ch_disable 
+4cf9 20600000 rtn 
+
+g24_transmit_hop_process_4ms:
+4cfa 6fe0c540 fetch 1 ,mem_24g_retry 
+4cfb c001cd05 beq 3 ,g24_hop_ch_disable 
+4cfc c0034d05 beq 6 ,g24_hop_ch_disable 
+4cfd 20600000 rtn 
+
+g24_hop_ch_enable:
+
+g24_txpayload_type_update:
+4cfe c517cd01 bmark1 mark_ble_lr ,g24_lr_type_update 
+4cff 67e0c480 store 1 ,mem_24g_txpayload + offset_data_type 
+4d00 20600000 rtn 
+
+g24_lr_type_update:
+4d01 67e0c481 store 1 ,mem_24g_txpayload + offset_lr_data_type 
+4d02 20600000 rtn 
+
+g24_hop_enable_packet:
+4d03 6fe0c4cf fetch 1 ,mem_24g_data_type 
+4d04 c4020000 rtnbit0 bit_hop 
+
+g24_hop_ch_disable:
+4d05 6fe0c4cf fetch 1 ,mem_24g_data_type 
+4d06 793ffe04 set0 bit_hop ,pdata 
+4d07 67e0c4cf store 1 ,mem_24g_data_type 
+4d08 20404cfe call g24_txpayload_type_update 
+4d09 20404d91 call power_ctrl_pac_succ_decrs 
+4d0a 202048cc branch g24_ch 
+
+g24_tx_fast_hop:
+4d0b 20404d81 call power_ctrl_txpower_incrs 
+4d0c 20404d91 call power_ctrl_pac_succ_decrs 
+4d0d 202048cc branch g24_ch 
+
+g24_search_receiver:
+4d0e 6fe14537 fetch 2 ,mem_cb_24g_search_receiver 
+4d0f 202075e6 branch callback_func 
+
+g24_nodata_transmit:
+4d10 6fe0c541 fetch 1 ,mem_24g_abort_pac 
+4d11 205a4d15 call g24_send_abort_packet ,blank 
+4d12 20404d3f call g24_transmit_by_interrupt_exit 
+4d13 20404d0e call g24_search_receiver 
+4d14 20204d23 branch g24_long_sleep 
+
+g24_send_abort_packet:
+4d15 7044cf01 jam type_ms ,mem_24g_data_type 
+4d16 70454101 jam 1 ,mem_24g_abort_pac 
+4d17 20404cae call g24_transmit_rf_ctrl_clear 
+4d18 67e0c45f store 1 ,mem_24g_txbuf 
+4d19 58000000 setarg 0 
+4d1a 67e3c460 store 7 ,mem_24g_txbuf + 1 
+4d1b 6fe24543 fetch 4 ,mem_24g_device_addr 
+4d1c 67e24467 store 4 ,mem_24g_txbuf + 8 
+4d1d 7044ce0c jam 12 ,mem_24g_datalen 
+4d1e 6fe0c4cf fetch 1 ,mem_24g_data_type 
+4d1f 79207e03 set1 bit_abort ,pdata 
+4d20 67e0c4cf store 1 ,mem_24g_data_type 
+4d21 2040488f call g24_transmit_prep 
+4d22 20204c8f branch g24_transmit_start 
+
+g24_long_sleep:
+4d23 472a402a bpatchx patch2a_4 ,mem_patch2a 
+4d24 20404d2c call g24_lpm_wait 
+4d25 24740000 nrtn user 
+4d26 6fe0c095 fetch 1 ,mem_device_option 
+4d27 c00460a0 beq dvc_op_mouse ,mouse_24g_long_sleep 
+4d28 6fe444f5 fetch 8 ,mem_24g_enter_hibernate 
+
+g24_long_seep2:
+4d29 20407593 call clk2lpo 
+4d2a 604a40aa storet 4 ,mem_sleep_counter 
+4d2b 20203b7a branch lpm_sleep 
+
+g24_lpm_wait:
+4d2c 472ac02a bpatchx patch2a_5 ,mem_patch2a 
+4d2d 78347c00 enable user 
+4d2e 20403b4b call lpo_calibration 
+4d2f 6fe1c0be fetch 3 ,mem_clks_per_lpo 
+4d30 203a7638 branch disable_user ,blank 
+4d31 6fe0c094 fetch 1 ,mem_lpm_mode 
+4d32 203a7638 branch disable_user ,blank 
+
+g24_setgpio_lpm_before:
+4d33 6fe14539 fetch 2 ,mem_cb_24g_lpm_before 
+4d34 202075e6 branch callback_func 
+
+g24_transmit_by_interrupt:
+4d35 204048ef call g24_timer_check 
+4d36 24740000 nrtn user 
+4d37 20404d4a call g24_interval_calibrate 
+4d38 6fe14558 fetch 2 ,mem_24g_transmit_by_interrupt_exit_count 
+4d39 1fe0fe01 increase 1 ,pdata 
+4d3a 67e14558 store 2 ,mem_24g_transmit_by_interrupt_exit_count 
+4d3b 6849455a fetcht 2 ,mem_24g_transmit_by_interrupt_exit_count_init 
+4d3c 98467c00 isub temp ,null 
+4d3d 2042cd3f call g24_transmit_by_interrupt_exit ,zero 
+4d3e 20204c8c branch g24_transmit_no_interrupt 
+
+g24_transmit_by_interrupt_exit:
+4d3f 70455700 jam g24_tx_timer_int_disable ,mem_24g_transmit_by_interrupt 
+4d40 58000000 setarg 0 
+4d41 67e14558 store 2 ,mem_24g_transmit_by_interrupt_exit_count 
+4d42 58000064 setarg 100 
+4d43 67e1455a store 2 ,mem_24g_transmit_by_interrupt_exit_count_init 
+
+g24_interval_min:
+4d44 70455600 jam 0 ,mem_24g_pac_index 
+4d45 6fe0c4ee fetch 1 ,mem_24g_interval_min 
+
+g24_interval_store:
+4d46 67e0c4ed store 1 ,mem_24g_interval 
+4d47 20600000 rtn 
+
+g24_interval_max:
+4d48 6fe0c4ef fetch 1 ,mem_24g_interval_max 
+4d49 20204d46 branch g24_interval_store 
+
+g24_interval_calibrate:
+4d4a 6fe0c556 fetch 1 ,mem_24g_pac_index 
+4d4b 1fe0fe01 increase 1 ,pdata 
+4d4c 67e0c556 store 1 ,mem_24g_pac_index 
+4d4d c0024d48 beq 4 ,g24_interval_max 
+4d4e c002cd44 beq 5 ,g24_interval_min 
+4d4f 20600000 rtn 
+
+g24_transmit_by_interrupt_enable:
+4d50 70455701 jam g24_tx_timer_int_enable ,mem_24g_transmit_by_interrupt 
+4d51 58000000 setarg 0 
+4d52 67e14558 store 2 ,mem_24g_transmit_by_interrupt_exit_count 
+4d53 20600000 rtn 
+
+g24_factory_check:
+4d54 df200002 arg 2 ,loopcnt 
+4d55 d8c044d5 arg mem_24g_addr ,contr 
+
+pdata_0xff_check:
+4d56 20407636 call enable_user 
+4d57 5800ffff setarg 0xffff 
+
+pdata_0xff_check_loop:
+4d58 e8410006 ifetcht 2 ,contr 
+4d59 98467c00 isub temp ,null 
+4d5a 2442f638 ncall disable_user ,zero 
+4d5b c2004d58 loop pdata_0xff_check_loop 
+4d5c 20600000 rtn 
+
+power_ctrl_start:
+4d5d 472b402a bpatchx patch2a_6 ,mem_patch2a 
+4d5e 6fe1442f fetch 2 ,mem_ui_state_map 
+4d5f c3858000 rtnbit1 ui_state_ble_adv 
+4d60 6a214533 fetchr rega ,2 ,mem_rssi_signal_buf_ptr 
+4d61 20404c35 call rssi_average 
+4d62 6048c561 storet 1 ,mem_rssi_avg_received 
+4d63 6fe0c566 fetch 1 ,mem_rssi_dis_max_24g 
+4d64 c5134d66 bmark1 mark_24g ,power_ctrl_start_next 
+4d65 6fe0c569 fetch 1 ,mem_rssi_dis_max_ble 
+
+power_ctrl_start_next:
+4d66 98467c00 isub temp ,null 
+4d67 24214d80 nbranch power_ctrl_txpower_incrs_force ,positive 
+4d68 6fe0c563 fetch 1 ,mem_power_ctrl_pac_succ_cnt 
+4d69 1fe67c02 sub pdata ,2 ,null 
+4d6a 24214d6e nbranch power_ctrl_txpower_decrs_check ,positive 
+4d6b 6fe0c563 fetch 1 ,mem_power_ctrl_pac_succ_cnt 
+4d6c c0004d81 beq 0 ,power_ctrl_txpower_incrs 
+4d6d 20600000 rtn 
+
+power_ctrl_txpower_decrs_check:
+4d6e 6fe0c563 fetch 1 ,mem_power_ctrl_pac_succ_cnt 
+4d6f 6848c564 fetcht 1 ,mem_power_ctrl_pac_succ_cnt_init 
+4d70 98467c00 isub temp ,null 
+4d71 24628000 nrtn zero 
+4d72 70456300 jam 0 ,mem_power_ctrl_pac_succ_cnt 
+
+power_ctrl_txpower_decrs:
+4d73 6848c561 fetcht 1 ,mem_rssi_avg_received 
+4d74 6fe0c565 fetch 1 ,mem_rssi_dis_min_24g 
+4d75 c5134d77 bmark1 mark_24g ,power_ctrl_txpower_decrs_next 
+4d76 6fe0c568 fetch 1 ,mem_rssi_dis_min_ble 
+
+power_ctrl_txpower_decrs_next:
+4d77 98467c00 isub temp ,null 
+4d78 24610000 nrtn positive 
+4d79 6fe0c562 fetch 1 ,mem_power_ctrl_level 
+4d7a c0004d88 beq 0 ,power_ctrl_decrs_level0 
+4d7b 1fe0ffff increase -1 ,pdata 
+4d7c 67e0c562 store 1 ,mem_power_ctrl_level 
+4d7d c0004d88 beq 0 ,power_ctrl_decrs_level0 
+
+power_ctrl_decrs_level1:
+
+power_ctrl_incrs_level1:
+4d7e 70411600 jam tx_power_0db ,mem_tx_power 
+4d7f 20600000 rtn 
+
+power_ctrl_txpower_incrs_force:
+4d80 70456300 jam 0 ,mem_power_ctrl_pac_succ_cnt 
+
+power_ctrl_txpower_incrs:
+4d81 6fe0c562 fetch 1 ,mem_power_ctrl_level 
+4d82 c0014d86 beq 2 ,power_ctrl_incrs_level2 
+4d83 1fe0fe01 increase 1 ,pdata 
+4d84 67e0c562 store 1 ,mem_power_ctrl_level 
+4d85 c000cd7e beq 1 ,power_ctrl_incrs_level1 
+
+power_ctrl_incrs_level2:
+4d86 70411606 jam tx_power_6db ,mem_tx_power 
+4d87 20600000 rtn 
+
+power_ctrl_decrs_level0:
+4d88 70411685 jam tx_power_f5db ,mem_tx_power 
+4d89 20600000 rtn 
+
+power_ctrl_pac_succ_cnt_init:
+4d8a 70456201 jam 1 ,mem_power_ctrl_level 
+4d8b 70456300 jam 0 ,mem_power_ctrl_pac_succ_cnt 
+4d8c 20600000 rtn 
+
+power_ctrl_pac_succ_incrs:
+4d8d 6fe0c563 fetch 1 ,mem_power_ctrl_pac_succ_cnt 
+4d8e 1fe0fe01 increase 1 ,pdata 
+4d8f 67e0c563 store 1 ,mem_power_ctrl_pac_succ_cnt 
+4d90 20600000 rtn 
+
+power_ctrl_pac_succ_decrs:
+4d91 6fe0c563 fetch 1 ,mem_power_ctrl_pac_succ_cnt 
+4d92 1fe67c02 sub pdata ,2 ,null 
+4d93 24414d99 ncall power_ctrl_pac_succ_cnt_reinit ,positive 
+4d94 6fe0c563 fetch 1 ,mem_power_ctrl_pac_succ_cnt 
+4d95 c1000000 rtneq 0 
+4d96 1fe0ffff increase -1 ,pdata 
+4d97 67e0c563 store 1 ,mem_power_ctrl_pac_succ_cnt 
+4d98 20600000 rtn 
+
+power_ctrl_pac_succ_cnt_reinit:
+4d99 70456303 jam 3 ,mem_power_ctrl_pac_succ_cnt 
+4d9a 20600000 rtn 
+
+app_init:
+4d9b 44b1400c bpatch patch0c_2 ,mem_patch0c 
+4d9c 6fe0c095 fetch 1 ,mem_device_option 
+4d9d 203a4d9b branch app_init ,blank 
+4d9e c0025249 beq dvc_op_dongle ,dongle_init 
+4d9f c004e295 beq dvc_op_shutter ,shutter_init 
+4da0 c00553d2 beq dvc_op_module ,module_init 
+4da1 c0074e4d beq dvc_op_car ,car_init 
+4da2 c006d102 beq dvc_op_remote_car ,remote_car_init 
+4da3 c0066506 beq dvc_op_hci_boot ,hci_init 
+4da4 c00456ed beq dvc_op_mouse ,mouse_init 
+4da5 20600000 rtn 
+
+app_param_init:
+4da6 20758000 rtn wake 
+4da7 20406c88 call adc_init_data 
+4da8 6fe0c095 fetch 1 ,mem_device_option 
+4da9 c004e3d3 beq dvc_op_shutter ,shutter_default_init 
+4daa c0025254 beq dvc_op_dongle ,dongle_default_init 
+4dab c004572e beq dvc_op_mouse ,mouse_default_init 
+4dac c006d204 beq dvc_op_remote_car ,remote_car_default_init 
+4dad 20600000 rtn 
+
+app_process_idle:
+4dae 20406fe0 call ui_dispatch 
+4daf 204070b1 call check_51cmd 
+4db0 20404db5 call app_process_bb_event 
+4db1 6fe14390 fetch 2 ,mem_cb_idle_process 
+4db2 202075e6 branch callback_func 
+
+app_process_ble:
+4db3 6fe1438e fetch 2 ,mem_cb_le_process 
+4db4 202075e6 branch callback_func 
+
+app_process_bb_event:
+4db5 44b1c00c bpatch patch0c_3 ,mem_patch0c 
+4db6 da204419 arg mem_ipc_fifo_bt2c51 ,rega 
+4db7 20407613 call fifo_out 
+4db8 207a0000 rtn blank 
+4db9 1fe22600 copy pdata ,regc 
+4dba 20404dbe call app_event_normal_process 
+4dbb 20204dc2 branch app_process_bb_event_priority 
+
+app_discard_event:
+4dbc da600000 arg 0 ,regc 
+4dbd 20600000 rtn 
+
+app_event_normal_process:
+4dbe c0084dd1 beq bt_evt_button_long_pressed ,app_evt_button_long_pressed 
+4dbf c00a4dc8 beq bt_evt_le_connected ,app_le_event_bb_connected 
+4dc0 c00acdcc beq bt_evt_le_disconnected ,app_le_event_bb_disconn 
+4dc1 20600000 rtn 
+
+app_process_bb_event_priority:
+4dc2 6fe14392 fetch 2 ,mem_cb_bb_event_process 
+4dc3 202075e6 branch callback_func 
+
+app_check_wake_lock:
+4dc4 6fe14388 fetch 2 ,mem_cb_check_wakelock 
+4dc5 202075e6 branch callback_func 
+
+app_will_enter_lpm:
+4dc6 6fe1438c fetch 2 ,mem_cb_before_lpm 
+4dc7 202075e6 branch callback_func 
+
+app_le_event_bb_connected:
+4dc8 6fe1442f fetch 2 ,mem_ui_state_map 
+4dc9 79207e09 set1 ui_state_ble_connected ,pdata 
+4dca 67e1442f store 2 ,mem_ui_state_map 
+4dcb 20600000 rtn 
+
+app_le_event_bb_disconn:
+4dcc 70436900 jam 0 ,mem_le_l2cap_att_states 
+4dcd 6fe1442f fetch 2 ,mem_ui_state_map 
+4dce 793ffe09 set0 ui_state_ble_connected ,pdata 
+4dcf 67e1442f store 2 ,mem_ui_state_map 
+4dd0 20204e2e branch app_lpm_mult_disable 
+
+app_evt_button_long_pressed:
+4dd1 6fe143a6 fetch app_disc_rsn_size ,mem_app_disconn_reason_flag 
+4dd2 79207e00 set1 app_disc_by_button ,pdata 
+4dd3 67e143a6 store app_disc_rsn_size ,mem_app_disconn_reason_flag 
+4dd4 20600000 rtn 
+
+app_evt_timer:
+4dd5 67e081dc store 1 ,mem_app_evt_timer_count 
+
+app_evt_100ms_loop:
+4dd6 44b2400c bpatch patch0c_4 ,mem_patch0c 
+4dd7 6fe081dc fetch 1 ,mem_app_evt_timer_count 
+4dd8 207a0000 rtn blank 
+4dd9 1fe0ffff increase -1 ,pdata 
+4dda 67e081dc store 1 ,mem_app_evt_timer_count 
+4ddb 20406fec call ui_button_polling 
+4ddc 20404e0f call app_lpm_wake_auto_lock_timer 
+4ddd 20406944 call flash_write_spi_sm_timer 
+4dde 6fe14398 fetch 2 ,mem_cb_event_timer 
+4ddf 204075e6 call callback_func 
+4de0 20204dd6 branch app_evt_100ms_loop 
+
+timer_single_step:
+4de1 efe08013 ifetch 1 ,regc 
+4de2 207a0000 rtn blank 
+4de3 1fe0ffff pincrease -1 
+4de4 e7e08013 istore 1 ,regc 
+4de5 247a0000 nrtn blank 
+4de6 1a427e00 copy regb ,pdata 
+4de7 202075e6 branch callback_func 
+
+timer_single_step_2b:
+4de8 efe10013 ifetch 2 ,regc 
+4de9 207a0000 rtn blank 
+4dea 1fe0ffff pincrease -1 
+4deb e7e10013 istore 2 ,regc 
+4dec 247a0000 nrtn blank 
+4ded 1a427e00 copy regb ,pdata 
+4dee 202075e6 branch callback_func 
+
+app_power_timer:
+4def 684943de fetcht 2 ,mem_power_param_ptr 
+4df0 1840a601 add temp ,power_timer_offset ,regc 
+4df1 da404df3 arg app_power_timer_timeout ,regb 
+4df2 20204de1 branch timer_single_step 
+
+app_power_timer_timeout:
+4df3 20404e44 call app_got_power_state_common 
+4df4 c000cdf6 beq power_starting ,app_enter_power_stanby_state 
+
+app_enter_power_off_state:
+4df5 20204e28 branch app_enter_hibernate 
+
+app_enter_power_stanby_state:
+4df6 58000002 setarg power_standby 
+4df7 e7e08013 istore 1 ,regc 
+4df8 1840a408 add temp ,power_standby_cb_offset ,regb 
+
+app_power_cb_common:
+4df9 efe10012 ifetch 2 ,regb 
+4dfa 202075e6 branch callback_func 
+
+app_bb_hibernate:
+4dfb 20404dfd call app_disconn_reason_clear 
+4dfc 20204e28 branch app_enter_hibernate 
+
+app_disconn_reason_clear:
+4dfd 58000000 setarg 0 
+4dfe 67e143a4 store app_disc_rsn_size ,mem_app_disconn_reason 
+4dff 20600000 rtn 
+
+app_disconn_reason_flag_clear:
+4e00 58000000 setarg 0 
+4e01 67e143a6 store app_disc_rsn_size ,mem_app_disconn_reason_flag 
+4e02 20600000 rtn 
+
+app_disconn_reason_collect_ble:
+4e03 6fe143a6 fetch app_disc_rsn_size ,mem_app_disconn_reason_flag 
+4e04 79207e07 set1 app_disc_ble ,pdata 
+4e05 67e143a4 store app_disc_rsn_size ,mem_app_disconn_reason 
+4e06 58000000 setarg 0 
+4e07 67e143a6 store app_disc_rsn_size ,mem_app_disconn_reason_flag 
+4e08 20600000 rtn 
+
+app_get_lpm_wake_lock:
+4e09 d8e00009 arg wake_lock_app ,queue 
+4e0a 20203c54 branch lpm_get_wake_lock 
+
+app_put_lpm_wake_lock:
+4e0b d8e00009 arg wake_lock_app ,queue 
+4e0c 20203c58 branch lpm_put_wake_lock 
+
+app_lpm_wake_auto_lock:
+4e0d 7043a205 jam lpm_wake_up_delay_timer ,mem_wake_up_delay_timer 
+4e0e 20204e09 branch app_get_lpm_wake_lock 
+
+app_lpm_wake_auto_lock_timer:
+4e0f da6043a2 arg mem_wake_up_delay_timer ,regc 
+4e10 da404e0b arg app_put_lpm_wake_lock ,regb 
+4e11 20204de1 branch timer_single_step 
+
+app_ble_start_direct_adv:
+4e12 7004c30f jam bt_cmd_start_direct_adv ,mem_fifo_temp 
+4e13 202070a4 branch ui_ipc_send_cmd 
+
+app_ble_stop_direct_adv:
+4e14 7004c310 jam bt_cmd_stop_direct_adv ,mem_fifo_temp 
+4e15 202070a4 branch ui_ipc_send_cmd 
+
+app_ble_stop_adv:
+4e16 7004c30e jam bt_cmd_stop_adv ,mem_fifo_temp 
+4e17 202070a4 branch ui_ipc_send_cmd 
+
+app_ble_start_adv:
+4e18 7004c30d jam bt_cmd_start_adv ,mem_fifo_temp 
+4e19 202070a4 branch ui_ipc_send_cmd 
+
+app_ble_start_scan:
+4e1a 7004c317 jam bt_cmd_le_start_scan ,mem_fifo_temp 
+4e1b 202070a4 branch ui_ipc_send_cmd 
+
+app_ble_stop_scan:
+4e1c 7004c318 jam bt_cmd_le_stop_scan ,mem_fifo_temp 
+4e1d 202070a4 branch ui_ipc_send_cmd 
+
+app_ble_start_conn:
+4e1e 7004c316 jam bt_cmd_le_start_conn ,mem_fifo_temp 
+4e1f 202070a4 branch ui_ipc_send_cmd 
+
+app_ble_disconnect:
+4e20 7004c311 jam bt_cmd_le_disconnect ,mem_fifo_temp 
+4e21 202070a4 branch ui_ipc_send_cmd 
+
+app_led_start_blink:
+4e22 7004c315 jam bt_cmd_led_blink ,mem_fifo_temp 
+4e23 202070a4 branch ui_ipc_send_cmd 
+
+app_led_on:
+4e24 7004c314 jam bt_cmd_led_on ,mem_fifo_temp 
+4e25 202070a4 branch ui_ipc_send_cmd 
+
+app_led_stop_blink:
+
+app_led_off:
+4e26 7004c313 jam bt_cmd_led_off ,mem_fifo_temp 
+4e27 202070a4 branch ui_ipc_send_cmd 
+
+app_enter_hibernate:
+4e28 7004c319 jam bt_cmd_enter_hibernate ,mem_fifo_temp 
+4e29 202070a4 branch ui_ipc_send_cmd 
+
+app_ble_store_reconn_info:
+4e2a 7004c31f jam bt_cmd_store_reconn_info_le ,mem_fifo_temp 
+4e2b 202070a4 branch ui_ipc_send_cmd 
+
+app_lpm_mult_enable:
+4e2c 7920000d set1 mark_lpm_mult_enable ,mark 
+4e2d 20600000 rtn 
+
+app_lpm_mult_disable:
+4e2e 793f800d set0 mark_lpm_mult_enable ,mark 
+4e2f 20600000 rtn 
+
+app_button_long_pressed:
+4e30 20404e44 call app_got_power_state_common 
+4e31 c0014e3a beq power_standby ,app_power_shutting_down 
+
+app_power_starting:
+4e32 58000001 setarg power_starting 
+4e33 e7e08013 istore 1 ,regc 
+4e34 1840a203 add temp ,power_starting_timeout_offset ,rega 
+4e35 1840a406 add temp ,power_starting_cb_offset ,regb 
+
+app_power_common:
+4e36 e8408011 ifetcht 1 ,rega 
+4e37 1a60a601 increase 1 ,regc 
+4e38 e0408013 istoret 1 ,regc 
+4e39 20204df9 branch app_power_cb_common 
+
+app_power_shutting_down:
+4e3a 58000000 setarg power_off 
+4e3b e7e08013 istore 1 ,regc 
+4e3c 6fe1442f fetch 2 ,mem_ui_state_map 
+4e3d c304ce40 bbit0 ui_state_ble_connected ,app_power_off_end 
+4e3e 2040477a call le_send_terminate_ind_user_terminated 
+4e3f 20404e20 call app_ble_disconnect 
+
+app_power_off_end:
+4e40 684943de fetcht 2 ,mem_power_param_ptr 
+4e41 1840a202 add temp ,power_off_timeout_offset ,rega 
+4e42 1840a404 add temp ,power_off_cb_offset ,regb 
+4e43 20204e36 branch app_power_common 
+
+app_got_power_state_common:
+4e44 684943de fetcht 2 ,mem_power_param_ptr 
+4e45 1840a600 add temp ,power_state_offset ,regc 
+4e46 efe08013 ifetch 1 ,regc 
+4e47 20600000 rtn 
+
+app_event_button_up:
+4e48 20404e44 call app_got_power_state_common 
+4e49 c0804e4b bne power_off ,app_power_release 
+4e4a 20204e28 branch app_enter_hibernate 
+
+app_power_release:
+4e4b 1840a40a add temp ,ui_butten_up_cb_offset ,regb 
+4e4c 20204df9 branch app_power_cb_common 
+
+car_init:
+4e4d 20406fd3 call enable_authrom 
+4e4e 20758000 rtn wake 
+4e4f 58005056 setarg car_g24_receive_process 
+4e50 67e14523 store 2 ,mem_cb_24g_receive_process 
+4e51 580049ab setarg g24_bind_ackpayload_prep 
+4e52 67e14525 store 2 ,mem_cb_24g_ackpayload 
+4e53 580050ee setarg car_g24_cb_data_device1 
+4e54 67e14527 store 2 ,mem_cb_24g_data_device1 
+4e55 58004eca setarg car_le_before_hibernate 
+4e56 67e1438a store 2 ,mem_cb_before_hibernate 
+4e57 58004ecc setarg car_le_process_lpm_before 
+4e58 67e1438c store 2 ,mem_cb_before_lpm 
+4e59 58004eed setarg car_scale_process_idle 
+4e5a 67e14390 store 2 ,mem_cb_idle_process 
+4e5b 58004f0e setarg car_scale_process_bb_event 
+4e5c 67e14392 store 2 ,mem_cb_bb_event_process 
+4e5d 58004e09 setarg app_get_lpm_wake_lock 
+4e5e 67e14388 store 2 ,mem_cb_check_wakelock 
+4e5f 58004f69 setarg car_le_receive_data 
+4e60 67e14394 store 2 ,mem_cb_att_write 
+4e61 58004f2c setarg car_le_bb_event_timer 
+4e62 67e14398 store 2 ,mem_cb_event_timer 
+4e63 4496c005 bpatch patch05_5 ,mem_patch05 
+4e64 20404eae call car_init_environment 
+4e65 20404efb call car_lpm_timer_enable 
+4e66 2040711d call queue_init 
+4e67 7040c102 jam 2 ,mem_lpm_mult 
+4e68 7048fa00 jam power_on ,mem_car_24g_received_pac 
+4e69 6fe0c6bc fetch 1 ,mem_car_config_soft_switch_enable 
+4e6a 67e0c58b store 1 ,mem_car_hard_soft_switch 
+4e6b c0004e77 beq hard_switch ,car_hard_switch_power_on_signal 
+4e6c 6fe0c6bd fetch 1 ,mem_car_config_soft_switch_gpio 
+4e6d 67e0c432 store 1 ,mem_ui_button_gpio 
+4e6e 70435b00 jam off ,mem_le_adv_enable 
+
+car_soft_switch_power_on_init:
+4e6f 20406fe2 call ui_button_init 
+4e70 20406fec call ui_button_polling 
+4e71 7046e401 jam power_starting ,mem_car_power_state 
+4e72 6fe1442f fetch 2 ,mem_ui_state_map 
+4e73 c3860000 rtnbit1 ui_state_btn_down 
+4e74 20204e28 branch app_enter_hibernate 
+
+car_default_init:
+4e75 20600000 rtn 
+
+car_power_off_signal:
+4e76 20204e95 branch car_ui_led_init 
+
+car_hard_switch_power_on_signal:
+4e77 7046e402 jam power_standby ,mem_car_power_state 
+
+car_soft_switch_power_on_signal:
+4e78 70435b01 jam on ,mem_le_adv_enable 
+4e79 58000020 setarg fast_adv_interval_value_car 
+4e7a 204063c7 call shutter_ble_adv_interval_set 
+
+car_le_modified_name_adv:
+4e7b d8a04233 arg mem_le_name + 7 ,contw 
+4e7c 6fe0c2ae fetch 1 ,mem_le_lap 
+
+car_name_loop:
+4e7d 1fe104f0 and pdata ,0xF0 ,temp 
+4e7e 18518400 rshift4 temp ,temp 
+4e7f 20404e8f call car_hex_to_ascii 
+4e80 e0408005 istoret 1 ,contw 
+4e81 1fe1040f and pdata ,0x0F ,temp 
+4e82 20404e8f call car_hex_to_ascii 
+4e83 e0408005 istoret 1 ,contw 
+4e84 20404130 call le_modified_name_att_list 
+4e85 6848c22b fetcht 1 ,mem_le_name_len 
+4e86 18427200 copy temp ,loopcnt 
+4e87 d8a0431e arg mem_le_adv_data + 2 ,contw 
+4e88 d8c0422c arg mem_le_name ,contr 
+4e89 20407548 call memcpy 
+
+car_le_modified_name_scan:
+4e8a 6848c22b fetcht 1 ,mem_le_name_len 
+4e8b 18427200 copy temp ,loopcnt 
+4e8c d8a0433e arg mem_le_scan_data + 2 ,contw 
+4e8d d8c0422c arg mem_le_name ,contr 
+4e8e 20207548 branch memcpy 
+
+car_hex_to_ascii:
+4e8f 18467c09 sub temp ,9 ,null 
+4e90 20214e93 branch car_hex_num ,positive 
+4e91 18408437 add temp ,55 ,temp 
+4e92 20600000 rtn 
+
+car_hex_num:
+4e93 18408430 add temp ,48 ,temp 
+4e94 20600000 rtn 
+
+car_ui_led_init:
+4e95 6fe0c6b1 fetch 1 ,mem_car_config_blood_led1_gpio 
+4e96 c0ffcea7 bne invalid_pin_num ,car_blood_led_gpio_set 
+
+car_ui_led_init_1:
+4e97 6fe0c6af fetch 1 ,mem_car_config_pairing_led_gpio 
+4e98 c0ffceaa bne invalid_pin_num ,car_pairing_led_gpio_set 
+
+car_ui_led_init_2:
+4e99 6fe0c6ba fetch 1 ,mem_car_config_low_voltage_led_gpio 
+4e9a c0ffceac bne invalid_pin_num ,car_low_voltage_led_gpio_set 
+
+car_ui_led_init_3:
+4e9b 6fe0c61d fetch 1 ,mem_car_led_num 
+4e9c 1fe27200 copy pdata ,loopcnt 
+4e9d 5800461e setarg mem_car_led_map 
+4e9e 1fe22200 copy pdata ,rega 
+
+car_in_lp1:
+4e9f 1a220c00 copy rega ,contr 
+4ea0 efe08006 ifetch 1 ,contr 
+4ea1 18c22200 copy contr ,rega 
+4ea2 c07fcea5 beq invalid_pin_num ,car_in_lp1_end 
+4ea3 1fe20400 copy pdata ,temp 
+4ea4 20406c43 call gpio_config_output 
+
+car_in_lp1_end:
+4ea5 c2004e9f loop car_in_lp1 
+
+car_ui_led_init_end:
+4ea6 20600000 rtn 
+
+car_blood_led_gpio_set:
+4ea7 6fe446b1 fetch 8 ,mem_car_config_blood_led1_gpio 
+4ea8 67e44620 store 8 ,mem_car_led_map + 2 
+4ea9 20204e97 branch car_ui_led_init_1 
+
+car_pairing_led_gpio_set:
+4eaa 67e0c61e store 1 ,mem_car_led_map 
+4eab 20204e99 branch car_ui_led_init_2 
+
+car_low_voltage_led_gpio_set:
+4eac 67e0c61f store 1 ,mem_car_led_map + 1 
+4ead 20204e9b branch car_ui_led_init_3 
+
+car_init_environment:
+4eae 20405052 call car_g24_init 
+4eaf 204050d0 call car_g24_load_commom_addr 
+4eb0 da200000 arg 0 ,rega 
+4eb1 20406d6e call pwm_init 
+4eb2 20404e95 call car_ui_led_init 
+4eb3 20404f03 call car_start_blink 
+4eb4 20404ec8 call car_init_adc_hvin 
+4eb5 20204eb7 branch car_motor_init 
+
+car_read_otp_addr:
+4eb6 20600000 rtn 
+
+car_motor_init:
+4eb7 6fe0c8e7 fetch 1 ,mem_car_motor_gpio_num 
+4eb8 1fe27200 copy pdata ,loopcnt 
+4eb9 580048e8 setarg mem_car_motor_gpio_map 
+4eba 1fe22200 copy pdata ,rega 
+
+p_in_lp1:
+4ebb 1a220c00 copy rega ,contr 
+4ebc efe08006 ifetch 1 ,contr 
+4ebd 18c22200 copy contr ,rega 
+4ebe c07fcec2 beq invalid_pin_num ,p_in_lp1_end 
+4ebf 1fe20400 copy pdata ,temp 
+4ec0 67e0c8ec store 1 ,mem_car_gpio 
+4ec1 20404ec4 call car_ui_gpio_init 
+
+p_in_lp1_end:
+4ec2 c2004ebb loop p_in_lp1 
+
+p_car_ui_led_init_end:
+4ec3 20600000 rtn 
+
+car_ui_gpio_init:
+4ec4 6fe0c8ec fetch 1 ,mem_car_gpio 
+4ec5 c17f8000 rtneq ui_button_gpio_disable 
+4ec6 98000400 iforce temp 
+4ec7 20206c43 branch gpio_config_output 
+
+car_init_adc_hvin:
+4ec8 7046c064 jam 100 ,mem_car_notify_vdd_value_last 
+4ec9 20600000 rtn 
+
+car_le_before_hibernate:
+4eca 20404ecd call car_gpio_set_before_hibernate 
+4ecb 2040765e call clear_wake 
+
+car_le_process_lpm_before:
+4ecc 20206d34 branch keyscan_process_lpm_before 
+
+car_gpio_set_before_hibernate:
+4ecd 204070fb call check_51cmd_led_off 
+
+car_gpio_set_before_lpm_common:
+4ece df200014 arg 20 ,loopcnt 
+4ecf d8c08070 arg core_gpio_conf ,contr 
+
+car_setgpio_loop:
+4ed0 18c20a00 copy contr ,contw 
+4ed1 efe08006 ifetch 1 ,contr 
+4ed2 c00fcedd beq gpcfg_spid_miso ,car_setgpio_pullup 
+4ed3 c0104edd beq gpcfg_spid_ncs ,car_setgpio_pullup 
+4ed4 c010cedd beq gpcfg_spid_sck ,car_setgpio_pullup 
+4ed5 c0114edd beq gpcfg_spid_mosi ,car_setgpio_pullup 
+4ed6 c011cedd beq gpcfg_spid_sdio ,car_setgpio_pullup 
+4ed7 c0164edd beq gpcfg_iic_scl ,car_setgpio_pullup 
+4ed8 c016cedd beq gpcfg_iic_sda ,car_setgpio_pullup 
+4ed9 c0004edd beq gpcfg_input ,car_setgpio_pullup 
+
+car_setgpio_loop_end:
+4eda c2004ed0 loop car_setgpio_loop 
+4edb 20404ee3 call car_motor_setgpio 
+4edc 20600000 rtn 
+
+car_setgpio_pullup:
+4edd 58000040 setarg gpcfg_pullup 
+4ede e7e08005 istore 1 ,contw 
+4edf 20204eda branch car_setgpio_loop_end 
+
+car_setgpio_pulldown:
+4ee0 58000080 setarg gpcfg_pulldown 
+4ee1 e7e08005 istore 1 ,contw 
+4ee2 20204eda branch car_setgpio_loop_end 
+
+car_motor_setgpio:
+4ee3 6fe0c8e7 fetch 1 ,mem_car_motor_gpio_num 
+4ee4 1fe27200 copy pdata ,loopcnt 
+4ee5 d8c048e8 arg mem_car_motor_gpio_map ,contr 
+
+car_motor_setgpio_loop:
+4ee6 efe08006 ifetch 1 ,contr 
+4ee7 79207e07 set1 7 ,pdata 
+4ee8 d840003e arg gpcfg_output_low ,temp 
+4ee9 20406c67 call gpio_config_function 
+4eea c2004ee6 loop car_motor_setgpio_loop 
+4eeb 20600000 rtn 
+
+car_key_scan_process:
+4eec 20206d40 branch keyscan_key_process 
+
+car_scale_process_idle:
+4eed 20404f05 call car_le_send_packet 
+4eee 20404ef0 call car_g24_status_process 
+4eef 20204eec branch car_key_scan_process 
+
+car_g24_status_process:
+4ef0 6fe1442f fetch 2 ,mem_ui_state_map 
+4ef1 c3848000 rtnbit1 ui_state_ble_connected 
+4ef2 6fe0c8fa fetch 1 ,mem_car_24g_received_pac 
+4ef3 c000cef5 beq work_paired ,car_g24_connected_event 
+4ef4 20600000 rtn 
+
+car_g24_connected_event:
+4ef5 6fe0c6db fetch 1 ,mem_car_24g_status 
+4ef6 c1008000 rtneq work_paired 
+4ef7 7046db01 jam work_paired ,mem_car_24g_status 
+4ef8 20404eff call car_lpm_timer_disable 
+4ef9 20404f01 call car_stop_blink 
+4efa 20204f18 branch car_g24_connected 
+
+car_lpm_timer_enable:
+4efb 6fe148ff fetch 2 ,mem_car_enter_lpm_timer_count 
+4efc 67e14901 store 2 ,mem_car_enter_lpm_timer 
+4efd 70490300 jam 0 ,mem_car_enter_lpm_flag 
+4efe 20600000 rtn 
+
+car_lpm_timer_disable:
+4eff 58000000 setarg 0 
+4f00 20204efc branch car_lpm_timer_enable + 1 
+
+car_stop_blink:
+4f01 da200000 arg 0 ,rega 
+4f02 2020702b branch ui_led_blink_stop_global 
+
+car_start_blink:
+4f03 da200000 arg 0 ,rega 
+4f04 20207030 branch ui_led_blink_start_global 
+
+car_le_send_packet:
+4f05 6fe1442f fetch 2 ,mem_ui_state_map 
+4f06 c4048000 rtnbit0 ui_state_ble_connected 
+4f07 20404203 call le_fifo_check_nearly_full 
+4f08 247a0000 nrtn blank 
+4f09 da204609 arg mem_car_pop_queue_buff ,rega 
+4f0a 2040713a call queue_pop 
+4f0b 24740000 nrtn user 
+4f0c d8c04609 arg mem_car_pop_queue_buff ,contr 
+4f0d 202063cb branch le_send_notify_from_list 
+
+car_scale_process_bb_event:
+4f0e 1a627e00 copy regc ,pdata 
+4f0f c016ce48 beq bt_evt_button_up ,app_event_button_up 
+4f10 c0084e30 beq bt_evt_button_long_pressed ,app_button_long_pressed 
+4f11 c00a4f14 beq bt_evt_le_connected ,car_scale_event_le_conn 
+4f12 c00acf1e beq bt_evt_le_disconnected ,car_scale_event_le_discon 
+4f13 20600000 rtn 
+
+car_scale_event_le_conn:
+4f14 20404eff call car_lpm_timer_disable 
+4f15 20404f01 call car_stop_blink 
+4f16 793f8027 set0 mark_24g_rxmode ,mark 
+4f17 20204f1a branch car_scale_process_conn 
+
+car_g24_connected:
+4f18 6fe146dc fetch 2 ,mem_car_24g_no_data_timeout_count 
+4f19 67e146de store 2 ,mem_car_24g_no_data_timeout_timer 
+
+car_scale_process_conn:
+4f1a 7046bf14 jam 0x14 ,mem_car_notify_vdd_timer 
+4f1b 70409400 jam 0 ,mem_lpm_mode 
+4f1c 20404e16 call app_ble_stop_adv 
+4f1d 20204e2c branch app_lpm_mult_enable 
+
+car_scale_event_le_discon:
+4f1e 79200027 set1 mark_24g_rxmode ,mark 
+4f1f 20404efb call car_lpm_timer_enable 
+4f20 20405006 call car_fb_motor_stop 
+4f21 20404ffa call car_lr_motor_stop 
+
+car_g24_disconnect:
+4f22 58000000 setarg 0 
+4f23 67e2c68d store 5 ,mem_car_led_control 
+4f24 2040711d call queue_init 
+4f25 70464f0a jam 10 ,mem_motor1_speed 
+4f26 7046510a jam 10 ,mem_motor2_speed 
+4f27 7046530a jam 10 ,mem_motor3_speed 
+4f28 7040c102 jam 2 ,mem_lpm_mult 
+4f29 58000020 setarg fast_adv_interval_value_car 
+4f2a 204063c7 call shutter_ble_adv_interval_set 
+4f2b 20204e18 branch app_ble_start_adv 
+
+car_le_bb_event_timer:
+4f2c 20404fa7 call car_moto1_blank_data_timer 
+4f2d 20404faa call car_moto2_blank_data_timer 
+4f2e 20404fad call car_moto3_blank_data_timer 
+4f2f 20404f39 call car_24g_no_data_timeout_timer 
+4f30 20204f31 branch car_24g_bind_enable_timer 
+
+car_24g_bind_enable_timer:
+4f31 da6048fb arg mem_car_24g_bind_enable_delay_count ,regc 
+4f32 da400000 arg 0 ,regb 
+4f33 20204de1 branch timer_single_step 
+
+car_enter_lpm_timer:
+4f34 da604901 arg mem_car_enter_lpm_timer ,regc 
+4f35 da404f37 arg car_enter_lpm_enable ,regb 
+4f36 20204de8 branch timer_single_step_2b 
+
+car_enter_lpm_enable:
+4f37 70490301 jam 1 ,mem_car_enter_lpm_flag 
+4f38 20600000 rtn 
+
+car_24g_no_data_timeout_timer:
+4f39 da6046de arg mem_car_24g_no_data_timeout_timer ,regc 
+4f3a da404f3c arg car_24g_no_data_timer_timeout ,regb 
+4f3b 20204de8 branch timer_single_step_2b 
+
+car_24g_no_data_timer_timeout:
+4f3c 7046db02 jam work_search ,mem_car_24g_status 
+4f3d 7048fa00 jam power_on ,mem_car_24g_received_pac 
+4f3e 20204f22 branch car_g24_disconnect 
+
+car_notify_vdd_timer:
+4f3f 6fe0c6b9 fetch 1 ,mem_car_config_bat_notify_enable 
+4f40 207a0000 rtn blank 
+4f41 da6046bf arg mem_car_notify_vdd_timer ,regc 
+4f42 da404f44 arg car_notify_vdd ,regb 
+4f43 20204de1 branch timer_single_step 
+
+car_notify_vdd:
+4f44 6fe0c6be fetch 1 ,mem_car_notify_vdd_count 
+4f45 67e0c6bf store 1 ,mem_car_notify_vdd_timer 
+4f46 6fe0c6c2 fetch 1 ,mem_car_working_flag 
+4f47 247a0000 nrtn blank 
+
+car_read_hvin:
+4f48 20406cc0 call vdd_calculate_by_mode 
+4f49 67e146d9 store 2 ,mem_vdd_now_vol 
+4f4a da2046d3 arg mem_vdd_calculate_set ,rega 
+4f4b 20406cef call adc_bat_percent_lowpower_out 
+4f4c 6848c6c0 fetcht 1 ,mem_car_notify_vdd_value_last 
+4f4d 98467c00 isub temp ,null 
+4f4e 20214f51 branch car_notify_vdd_next2 ,positive 
+4f4f 67e0c6c0 store 1 ,mem_car_notify_vdd_value_last 
+4f50 1fe20400 copy pdata ,temp 
+
+car_notify_vdd_next2:
+4f51 6048c6c1 storet 1 ,mem_car_notify_vdd_percent 
+4f52 6fe0c6bb fetch 1 ,mem_car_config_low_voltage_percent 
+4f53 98467c00 isub temp ,null 
+4f54 20414f5c call car_enter_low_bat ,positive 
+4f55 6048c6cc storet 1 ,mem_notify_bat_payload 
+4f56 df200006 arg 6 ,loopcnt 
+4f57 d8c046c7 arg mem_notify_bat_head ,contr 
+4f58 20404f63 call calc_check_sum_start 
+4f59 67e0c6cd store 1 ,mem_notify_bat_check_sum 
+4f5a da2046c4 arg mem_notify_bat_packet ,rega 
+4f5b 20207122 branch queue_push 
+
+car_enter_low_bat:
+4f5c 6fe0c6c3 fetch 1 ,mem_low_bat_flag 
+4f5d 247a0000 nrtn blank 
+4f5e 7046c301 jam 1 ,mem_low_bat_flag 
+4f5f da200001 arg 1 ,rega 
+4f60 20207030 branch ui_led_blink_start_global 
+
+car_low_bat_led_off:
+4f61 da200001 arg 1 ,rega 
+4f62 2020702b branch ui_led_blink_stop_global 
+
+calc_check_sum_start:
+4f63 da200000 arg 0 ,rega 
+
+calc_check_sum_loop:
+4f64 efe08006 ifetch 1 ,contr 
+4f65 9a20a200 iadd rega ,rega 
+4f66 c2004f64 loop calc_check_sum_loop 
+
+calc_check_sum_and:
+4f67 1a217eff and rega ,0xff ,pdata 
+4f68 20600000 rtn 
+
+car_le_receive_data:
+4f69 6fe0c36a fetch 1 ,mem_le_att_opcode 
+4f6a c0094f6c beq attop_write_request ,car_le_parse_att_write_request 
+4f6b 20600000 rtn 
+
+car_le_parse_att_write_request:
+4f6c 6fe1436b fetch 2 ,mem_le_att_handle 
+4f6d c00ccf83 beq att_car_control_handle ,car_control_le_receive 
+4f6e 20600000 rtn 
+
+le_app_receive_data:
+4f6f 44974005 bpatch patch05_6 ,mem_patch05 
+4f70 efe28011 ifetch 5 ,rega 
+4f71 67e28546 store 5 ,mem_app_receive_temp 
+4f72 6fe10546 fetch 2 ,mem_app_receive_temp 
+4f73 d8406b5a arg le_receive_packet_head ,temp 
+4f74 98467c00 isub temp ,null 
+4f75 24628000 nrtn zero 
+4f76 6fe10549 fetch 2 ,mem_app_receive_temp + 3 
+4f77 1ff0fe00 byteswap pdata ,pdata 
+4f78 67e10549 store 2 ,mem_app_receive_temp + 3 
+4f79 1fe27200 copy pdata ,loopcnt 
+4f7a 1a20a205 increase 5 ,rega 
+4f7b 1a220c00 copy rega ,contr 
+4f7c d8a0054b arg mem_app_receive_temp + 5 ,contw 
+4f7d 20407548 call memcpy 
+4f7e efe08006 ifetch 1 ,contr 
+4f7f 67e08555 store 1 ,mem_app_receive_temp + 15 
+4f80 da200548 arg mem_app_receive_temp + 2 ,rega 
+4f81 da40054b arg mem_app_receive_temp + 5 ,regb 
+4f82 20600000 rtn 
+
+car_control_le_receive:
+4f83 58000000 setarg 0 
+4f84 67e2c643 store 5 ,mem_le_receive_payload 
+4f85 67e2c648 store 5 ,mem_le_receive_payload + 5 
+4f86 20404f6f call le_app_receive_data 
+4f87 1a420c00 copy regb ,contr 
+4f88 d8a04643 arg mem_le_receive_payload ,contw 
+4f89 df20000a arg 10 ,loopcnt 
+4f8a 20407548 call memcpy 
+
+car_receive_cmd_select:
+4f8b 4497c005 bpatch patch05_7 ,mem_patch05 
+4f8c efe08011 ifetch 1 ,rega 
+4f8d c0014fb6 beq car_cmd_old_car_control ,car_drive_old 
+4f8e c001cfcb beq car_cmd_old_speed_control ,car_speed_set_old 
+4f8f c0024fd2 beq car_cmd_l_r_motor_control ,car_motor_control 
+4f90 c002cfd2 beq car_cmd_f_b_motor_control ,car_motor_control 
+4f91 c0035042 beq car_cmd_ir_control ,car_ir_data_rx_from_app 
+4f92 c003d043 beq car_cmd_led_control ,car_led_control_receive 
+4f93 c0045046 beq car_cmd_device_info ,car_info_request 
+4f94 20600000 rtn 
+
+car_24g_receive_data:
+4f95 20404f83 call car_control_le_receive 
+4f96 6fe08548 fetch 1 ,mem_app_receive_temp + 2 
+4f97 c0024f9a beq car_cmd_l_r_motor_control ,car_24g_receive_data_next 
+4f98 c002cf9a beq car_cmd_f_b_motor_control ,car_24g_receive_data_next 
+4f99 20600000 rtn 
+
+car_24g_receive_data_next:
+4f9a 6fe0c643 fetch 1 ,mem_le_receive_payload 
+4f9b 245a4fa1 ncall car_moto1_enable_blank_data_timer ,blank 
+4f9c 6fe0c645 fetch 1 ,mem_le_receive_payload + 2 
+4f9d 245a4fa3 ncall car_moto2_enable_blank_data_timer ,blank 
+4f9e 6fe0c647 fetch 1 ,mem_le_receive_payload + 4 
+4f9f 245a4fa5 ncall car_moto3_enable_blank_data_timer ,blank 
+4fa0 20600000 rtn 
+
+car_moto1_enable_blank_data_timer:
+4fa1 7048e405 jam 5 ,mem_car_moto1_blank_timer 
+4fa2 20600000 rtn 
+
+car_moto2_enable_blank_data_timer:
+4fa3 7048e505 jam 5 ,mem_car_moto2_blank_timer 
+4fa4 20600000 rtn 
+
+car_moto3_enable_blank_data_timer:
+4fa5 7048e605 jam 5 ,mem_car_moto3_blank_timer 
+4fa6 20600000 rtn 
+
+car_moto1_blank_data_timer:
+4fa7 da6048e4 arg mem_car_moto1_blank_timer ,regc 
+4fa8 da404fb0 arg car_moto1_blank_data ,regb 
+4fa9 20204de1 branch timer_single_step 
+
+car_moto2_blank_data_timer:
+4faa da6048e5 arg mem_car_moto2_blank_timer ,regc 
+4fab da404fb2 arg car_moto2_blank_data ,regb 
+4fac 20204de1 branch timer_single_step 
+
+car_moto3_blank_data_timer:
+4fad da6048e6 arg mem_car_moto3_blank_timer ,regc 
+4fae da404fb4 arg car_moto3_blank_data ,regb 
+4faf 20204de1 branch timer_single_step 
+
+car_moto1_blank_data:
+4fb0 70464300 jam 0 ,mem_le_receive_payload 
+4fb1 20204fd2 branch car_motor_control 
+
+car_moto2_blank_data:
+4fb2 70464500 jam 0 ,mem_le_receive_payload + 2 
+4fb3 20204fd2 branch car_motor_control 
+
+car_moto3_blank_data:
+4fb4 70464700 jam 0 ,mem_le_receive_payload + 4 
+4fb5 20204fd2 branch car_motor_control 
+
+car_drive_old:
+4fb6 6fe0c643 fetch 1 ,mem_le_receive_payload 
+4fb7 67e0c64e store 1 ,mem_motor1_status 
+4fb8 6fe0c644 fetch 1 ,mem_le_receive_payload + 1 
+4fb9 67e0c650 store 1 ,mem_motor2_status 
+4fba 20204fdc branch car_motor_control_common 
+
+car_left_right_control_old:
+4fbb 6fe0c643 fetch 1 ,mem_le_receive_payload 
+4fbc 67e0c650 store 1 ,mem_motor2_status 
+4fbd 20204fea branch car_motor2_control 
+
+car_front_back_control_old:
+4fbe 6fe0c64f fetch 1 ,mem_motor1_speed 
+4fbf 20404fc3 call car_reset_old_speed 
+4fc0 6fe0c644 fetch 1 ,mem_le_receive_payload + 1 
+4fc1 67e0c64e store 1 ,mem_motor1_status 
+4fc2 20204fe8 branch car_motor1_control 
+
+car_reset_old_speed:
+4fc3 c0014fc7 beq speed_level_2 ,car_reset_old_speed2 
+4fc4 c001cfc9 beq speed_level_3 ,car_reset_old_speed3 
+4fc5 67e0c64f store 1 ,mem_motor1_speed 
+4fc6 20600000 rtn 
+
+car_reset_old_speed2:
+4fc7 70464f05 jam speed_level_5 ,mem_motor1_speed 
+4fc8 20600000 rtn 
+
+car_reset_old_speed3:
+4fc9 70464f0a jam speed_level_10 ,mem_motor1_speed 
+4fca 20600000 rtn 
+
+car_speed_set_old:
+4fcb 6fe0c643 fetch 1 ,mem_le_receive_payload 
+4fcc 20404fc3 call car_reset_old_speed 
+4fcd 6fe0c64f fetch 1 ,mem_motor1_speed 
+4fce 20405036 call car_motor_speed_duty_setting 
+4fcf 20405039 call car_motor_speed_duty_transform 
+4fd0 7004c500 jam 0x00 ,mem_pdatatemp + 1 
+4fd1 20206d93 branch pwm_duty_cycle_set 
+
+car_motor_control:
+4fd2 6fe0c6e1 fetch 1 ,mem_car_24g_go_die_flag 
+4fd3 247a0000 nrtn blank 
+4fd4 6fe34643 fetch 6 ,mem_le_receive_payload 
+4fd5 67e3464e store 6 ,mem_motor1_status 
+4fd6 6fe0c64f fetch 1 ,mem_motor1_speed 
+4fd7 6848c651 fetcht 1 ,mem_motor2_speed 
+4fd8 98417e00 iand temp ,pdata 
+4fd9 6848c653 fetcht 1 ,mem_motor3_speed 
+4fda 98417e00 iand temp ,pdata 
+4fdb 205a4fee call car_motor_working_flag ,blank 
+
+car_motor_control_common:
+4fdc 44984006 bpatch patch06_0 ,mem_patch06 
+4fdd 6fe1442f fetch 2 ,mem_ui_state_map 
+4fde 2feffe09 isolate1 ui_state_ble_connected ,pdata 
+4fdf 2440cefb ncall car_lpm_timer_enable ,true 
+4fe0 20404fe8 call car_motor1_control 
+4fe1 20404fea call car_motor2_control 
+4fe2 20204fe3 branch car_conn_led_state 
+
+car_conn_led_state:
+4fe3 6fe0c64e fetch 1 ,mem_motor1_status 
+4fe4 6848c650 fetcht 1 ,mem_motor2_status 
+4fe5 9840fe00 iadd temp ,pdata 
+4fe6 243a70fd nbranch check_51cmd_led_on ,blank 
+4fe7 202070fb branch check_51cmd_led_off 
+
+car_motor1_control:
+4fe8 d8c0464e arg mem_motor1_status ,contr 
+4fe9 20204ff0 branch car_motor1_status_select 
+
+car_motor2_control:
+4fea d8c04650 arg mem_motor2_status ,contr 
+4feb 20204ff5 branch car_motor2_status_select 
+
+car_motor3_control:
+4fec d8c04652 arg mem_motor3_status ,contr 
+4fed 20205012 branch car_motor_status_select 
+
+car_motor_working_flag:
+4fee 7046c200 jam 0 ,mem_car_working_flag 
+4fef 20600000 rtn 
+
+car_motor1_status_select:
+4ff0 efe08006 ifetch 1 ,contr 
+4ff1 c0004ffa beq turn_front ,car_lr_motor_stop 
+4ff2 c000cffe beq turn_left ,car_lr_motor_left 
+4ff3 c0015002 beq turn_right ,car_lr_motor_right 
+4ff4 20600000 rtn 
+
+car_motor2_status_select:
+4ff5 efe08006 ifetch 1 ,contr 
+4ff6 c0005006 beq motor_stop ,car_fb_motor_stop 
+4ff7 c001500a beq go_back ,car_fb_motor_front 
+4ff8 c000d00e beq go_front ,car_fb_motor_back 
+4ff9 20600000 rtn 
+
+car_lr_motor_stop:
+4ffa 6848c8e8 fetcht 1 ,mem_car_motor_left_gpio 
+4ffb 20406c3f call gpio_out_inactive 
+4ffc 6848c8e9 fetcht 1 ,mem_car_motor_right_gpio 
+4ffd 20206c3f branch gpio_out_inactive 
+
+car_lr_motor_left:
+4ffe 6848c8e8 fetcht 1 ,mem_car_motor_left_gpio 
+4fff 20406c43 call gpio_out_active 
+5000 6848c8e9 fetcht 1 ,mem_car_motor_right_gpio 
+5001 20206c3f branch gpio_out_inactive 
+
+car_lr_motor_right:
+5002 6848c8e8 fetcht 1 ,mem_car_motor_left_gpio 
+5003 20406c3f call gpio_out_inactive 
+5004 6848c8e9 fetcht 1 ,mem_car_motor_right_gpio 
+5005 20206c43 branch gpio_out_active 
+
+car_fb_motor_stop:
+5006 6848c8ea fetcht 1 ,mem_car_motor_front_gpio 
+5007 20406c3f call gpio_out_inactive 
+5008 6848c8eb fetcht 1 ,mem_car_motor_back_gpio 
+5009 20206c3f branch gpio_out_inactive 
+
+car_fb_motor_front:
+500a 6848c8ea fetcht 1 ,mem_car_motor_front_gpio 
+500b 20406c43 call gpio_out_active 
+500c 6848c8eb fetcht 1 ,mem_car_motor_back_gpio 
+500d 20206c3f branch gpio_out_inactive 
+
+car_fb_motor_back:
+500e 6848c8ea fetcht 1 ,mem_car_motor_front_gpio 
+500f 20406c3f call gpio_out_inactive 
+5010 6848c8eb fetcht 1 ,mem_car_motor_back_gpio 
+5011 20206c43 branch gpio_out_active 
+
+car_motor_status_select:
+5012 4498c006 bpatch patch06_1 ,mem_patch06 
+5013 efe08006 ifetch 1 ,contr 
+5014 c000501f beq motor_stop ,car_motor_stop 
+5015 c000d018 beq go_front ,car_motor_positive 
+5016 c001501a beq go_back ,car_motor_negative 
+5017 20600000 rtn 
+
+car_motor_positive:
+5018 70466c00 jam 0 ,mem_motor_select_p_n 
+5019 2020501b branch car_motor_negative + 1 
+
+car_motor_negative:
+501a 70466c01 jam 1 ,mem_motor_select_p_n 
+501b efe08006 ifetch 1 ,contr 
+501c 67e0c66e store 1 ,mem_car_motor_speed 
+501d efe40012 ifetch 8 ,regb 
+501e 20205024 branch car_motor_work 
+
+car_motor_stop:
+501f efe08012 ifetch 1 ,regb 
+5020 20406dd6 call pwm_disable 
+5021 1a40a401 increase 1 ,regb 
+5022 efe08012 ifetch 1 ,regb 
+5023 20206dd6 branch pwm_disable 
+
+car_motor_work:
+5024 67e4466f store 8 ,mem_motor_pwm_pin1_set 
+5025 7046c201 jam 1 ,mem_car_working_flag 
+5026 6fe0c66c fetch 1 ,mem_motor_select_p_n 
+5027 c0005032 beq 0 ,car_motor_select_positive 
+
+car_motor_select_negative:
+5028 6fe0c670 fetch 1 ,mem_motor_pwm_pin2_set 
+5029 67e0c671 store 1 ,mem_motor_pwm_pin_set 
+502a 6fe0c66f fetch 1 ,mem_motor_pwm_pin1_set 
+
+car_motor_work_next:
+502b 20406dd6 call pwm_disable 
+502c 6fe0c66e fetch 1 ,mem_car_motor_speed 
+502d 20405036 call car_motor_speed_duty_setting 
+502e 67e0c676 store 1 ,mem_motor_pwm_dute_set 
+502f 6fe34671 fetch 6 ,mem_motor_pwm_pin_set 
+5030 67e304c4 store 6 ,mem_pdatatemp 
+5031 20206d7f branch pwm_out_set 
+
+car_motor_select_positive:
+5032 6fe0c66f fetch 1 ,mem_motor_pwm_pin1_set 
+5033 67e0c671 store 1 ,mem_motor_pwm_pin_set 
+5034 6fe0c670 fetch 1 ,mem_motor_pwm_pin2_set 
+5035 2020502b branch car_motor_work_next 
+
+car_motor_speed_duty_setting:
+5036 1feffe05 mul32 pdata ,5 ,pdata 
+5037 1fe0fe32 add pdata ,50 ,pdata 
+5038 20600000 rtn 
+
+car_motor_speed_duty_transform:
+5039 d8402ee0 arg 12000 ,temp 
+503a 984ffe00 imul32 temp ,pdata 
+503b 1fe6fc64 div pdata ,100 
+503c 204075d0 call wait_div_end 
+503d 18078400 quotient temp 
+503e 18422200 copy temp ,rega 
+503f 58002ee0 setarg 12000 
+5040 98462400 isub temp ,regb 
+5041 20600000 rtn 
+
+car_ir_data_rx_from_app:
+5042 20600000 rtn 
+
+car_led_control_receive:
+5043 6fe44643 fetch 8 ,mem_le_receive_payload 
+5044 67e4468d store 8 ,mem_car_led_control 
+5045 20600000 rtn 
+
+car_info_request:
+5046 6fe0c6aa fetch 1 ,mem_car_config_device_select 
+5047 67e0c6a0 store 1 ,mem_car_info_request_payload 
+5048 6fe0c6ab fetch 1 ,mem_car_config_motor_layout 
+5049 67e0c6a1 store 1 ,mem_car_info_request_payload + 1 
+504a 6fe0c6ac fetch 1 ,mem_car_config_ir_enable 
+504b 67e0c6a2 store 1 ,mem_car_info_request_payload + 2 
+504c df20000d arg 13 ,loopcnt 
+504d d8c0469b arg mem_car_info_request_head ,contr 
+504e 20404f63 call calc_check_sum_start 
+504f 67e0c6a8 store 1 ,mem_car_info_request_checksum 
+5050 da204698 arg mem_car_info_request ,rega 
+5051 20207122 branch queue_push 
+
+car_g24_init:
+5052 58000000 setarg 0 
+5053 67e4451b store 8 ,mem_24g_bind_payload 
+5054 20404a34 call g24_receive_init 
+5055 20204a95 branch g24_mode_switch_init 
+
+car_g24_receive_process:
+5056 2040505a call car_g24_mode_switch 
+5057 20405062 call car_g24_work_mode 
+5058 204050a3 call car_g24_bind_mode 
+5059 202050f5 branch car_g24_lpm_dipatch 
+
+car_g24_mode_switch:
+505a 20404a9a call g24_mode_switch_bind_work 
+
+car_g24_bind_mode_enable:
+505b 6fe0c559 fetch 1 ,mem_24g_work_mode 
+505c c1808000 rtnne dongle_bind 
+505d 6fe0c8fb fetch 1 ,mem_car_24g_bind_enable_delay_count 
+505e 243a4af1 nbranch g24_switch_work_mode ,blank 
+505f 6fe0c6db fetch 1 ,mem_car_24g_status 
+5060 c0014af1 beq work_search ,g24_switch_work_mode 
+5061 20600000 rtn 
+
+car_g24_work_mode:
+5062 6fe0c559 fetch 1 ,mem_24g_work_mode 
+5063 c1800000 rtnne dongle_work 
+5064 20405071 call car_g24_work_mode_start 
+5065 2037d06f branch car_g24_ch_polling_clear ,user3 
+
+car_g24_receive_ch_polling:
+5066 6fe0c903 fetch 1 ,mem_car_enter_lpm_flag 
+5067 207a0000 rtn blank 
+5068 6fe0c904 fetch 1 ,mem_car_24g_ch_polling 
+5069 1fe0fe01 increase 1 ,pdata 
+506a 67e0c904 store 1 ,mem_car_24g_ch_polling 
+506b c002506f beq 4 ,car_g24_ch_polling_clear 
+506c 204048cc call g24_ch 
+506d 20405082 call car_g24_receive_packet_start 
+506e 2437d066 nbranch car_g24_receive_ch_polling ,user3 
+
+car_g24_ch_polling_clear:
+506f 70490400 jam 0 ,mem_car_24g_ch_polling 
+5070 20600000 rtn 
+
+car_g24_work_mode_start:
+5071 6fe0c559 fetch 1 ,mem_24g_work_mode 
+5072 c1800000 rtnne dongle_work 
+5073 20405076 call car_g24_work_init 
+5074 20404ba7 call g24_ch_process 
+5075 20205082 branch car_g24_receive_packet_start 
+
+car_g24_work_init:
+5076 6fe0c558 fetch 1 ,mem_24g_mode_init 
+5077 c3800000 rtnbit1 dongle_work 
+5078 79207e00 set1 dongle_work ,pdata 
+5079 67e0c558 store 1 ,mem_24g_mode_init 
+507a 6fe0c566 fetch 1 ,mem_tx_power_temp 
+507b 67e0c116 store 1 ,mem_tx_power 
+507c 70455400 jam 0 ,mem_24g_ackpayload_enable 
+507d 70076100 jam 0 ,mem_usb_tx_enable 
+507e 70454d01 jam 1 ,mem_24g_abort_packet 
+507f 7044c400 jam 0 ,mem_24g_pid 
+5080 6fe2491d fetch 4 ,mem_car_24g_commom_addr 
+5081 20204aed branch g24_work_init + 11 
+
+car_g24_receive_packet_start:
+5082 20404a84 call g24_receive_transmit_ack 
+5083 2437ca54 nbranch g24_rx_interrupt_clear ,user3 
+
+p_g24_receive_packet_parse:
+5084 20404a76 call g24_receive_packet_parse_pid_crc 
+5085 24344a54 nbranch g24_rx_interrupt_clear ,user 
+5086 6fe0c4c3 fetch 1 ,mem_24g_rxdata_length 
+5087 203a4a54 branch g24_rx_interrupt_clear ,blank 
+5088 1fe0fe02 increase 2 ,pdata 
+5089 98007200 iforce loopcnt 
+508a d8c0443d arg mem_24g_rxbuf ,contr 
+508b d8a0452b arg mem_24g_rxdata_temp ,contw 
+508c 20407548 call memcpy 
+508d 70455600 jam 0 ,mem_24g_mode_switch 
+508e 6fe0c553 fetch 1 ,mem_24g_pair_mode 
+508f 205a4a91 call g24_enable_nodata_timer ,blank 
+5090 6fe0c52d fetch 1 ,mem_24g_rxdata_temp + 2 
+5091 c07fd094 beq datatype_attemp ,car_g24_data_attemp 
+5092 c000d096 beq datatype_device1 ,car_g24_data_device1 
+5093 20204a51 branch g24_receive_packet_parse + 14 
+
+car_g24_data_attemp:
+5094 204070fd call check_51cmd_led_on 
+5095 20204c20 branch g24_data_attemp 
+
+car_g24_data_device1:
+5096 20404bbd call g24_ch_timer_reinit 
+5097 6fe0c54d fetch 1 ,mem_24g_abort_packet 
+5098 6848c52b fetcht 1 ,mem_24g_rxdata_temp 
+5099 284ffe03 isolate1 bit_abort ,temp 
+509a 7920fe00 setflag true ,0 ,pdata 
+509b 67e0c54d store 1 ,mem_24g_abort_packet 
+509c c000d09e beq 1 ,car_g24_data_attemp_device1_abort 
+509d 20204a61 branch g24_data_device1 + 7 
+
+car_g24_data_attemp_device1_abort:
+509e 6fe0c095 fetch 1 ,mem_device_option 
+509f 1fe67c0e sub pdata ,dvc_op_car ,null 
+50a0 2042f0fd call check_51cmd_led_on ,zero 
+50a1 6fe24535 fetch 4 ,mem_24g_rxdata_temp + 10 
+50a2 20204c26 branch g24_store_device1_addr 
+
+car_g24_bind_mode:
+50a3 6fe0c559 fetch 1 ,mem_24g_work_mode 
+50a4 c1808000 rtnne dongle_bind 
+50a5 204049a2 call g24_bind_init 
+50a6 204050eb call car_g24_bind_device_addr 
+50a7 204049b0 call g24_bind_data_process 
+50a8 6fe0c51a fetch 1 ,mem_24g_bind_device_status 
+50a9 243a50b0 nbranch car_g24_bind_mode_exit ,blank 
+50aa 20404b99 call g24_nodata_process 
+50ab 6fe0c557 fetch 1 ,mem_24g_nodata_timer_enable 
+50ac 207a0000 rtn blank 
+50ad 58000000 setarg 0 
+50ae 67e24573 store 4 ,mem_24g_device1_addr 
+50af 20600000 rtn 
+
+car_g24_bind_mode_exit:
+50b0 70455600 jam 0 ,mem_24g_mode_switch 
+50b1 da200000 arg 0 ,rega 
+50b2 204070fd call check_51cmd_led_on 
+50b3 20404af1 call g24_switch_work_mode 
+50b4 20404902 call g24_timer_init 
+50b5 6fe24437 fetch 4 ,mem_24g_lap 
+50b6 67e2491d store 4 ,mem_car_24g_commom_addr 
+50b7 6fe0c929 fetch 1 ,mem_car_save_addr_flag 
+50b8 245a50bb ncall car_g24_save_commom_addr ,blank 
+50b9 6fe2491d fetch 4 ,mem_car_24g_commom_addr 
+50ba 202048e0 branch g24_update_addr_and_synccrc8 
+
+car_g24_save_commom_addr:
+50bb 6fe0c929 fetch 1 ,mem_car_save_addr_flag 
+50bc 207a0000 rtn blank 
+50bd 6fe0c570 fetch 1 ,mem_24g_transmitter_addr + 1 
+50be 67e0c920 store 1 ,mem_car_24g_commom_addr + 3 
+50bf 6fe0c438 fetch 1 ,mem_24g_lap + 1 
+50c0 67e0c91f store 1 ,mem_car_24g_commom_addr + 2 
+50c1 6fe0c56f fetch 1 ,mem_24g_transmitter_addr 
+50c2 67e0c91e store 1 ,mem_car_24g_commom_addr + 1 
+50c3 6fe0c437 fetch 1 ,mem_24g_lap 
+50c4 67e0c91d store 1 ,mem_car_24g_commom_addr 
+50c5 20600000 rtn 
+50c6 204050da call car_g24_search_commom_addr 
+50c7 6fe2491d fetch 4 ,mem_car_24g_commom_addr 
+50c8 684a4921 fetcht 4 ,mem_car_24g_commom_addr_temp 
+50c9 98467c00 isub temp ,null 
+50ca 20628000 rtn zero 
+50cb 1a627e00 copy regc ,pdata 
+50cc da20491d arg mem_car_24g_commom_addr ,rega 
+50cd df200004 arg 4 ,loopcnt 
+50ce 2040686a call otp_write 
+50cf 20600000 rtn 
+
+car_g24_load_commom_addr:
+50d0 6fe24437 fetch 4 ,mem_24g_lap 
+50d1 67e2491d store 4 ,mem_car_24g_commom_addr 
+50d2 6fe0c929 fetch 1 ,mem_car_save_addr_flag 
+50d3 207a0000 rtn blank 
+50d4 20600000 rtn 
+50d5 204050da call car_g24_search_commom_addr 
+50d6 6fe24921 fetch 4 ,mem_car_24g_commom_addr_temp 
+50d7 207a0000 rtn blank 
+50d8 67e2491d store 4 ,mem_car_24g_commom_addr 
+50d9 20600000 rtn 
+
+car_g24_search_commom_addr:
+50da 20600000 rtn 
+50db 6fe0c929 fetch 1 ,mem_car_save_addr_flag 
+50dc 207a0000 rtn blank 
+50dd da600700 arg otp_offset_car_commom_start_addr ,regc 
+
+car_g24_search_commom_addr_loop:
+50de 1a627e00 copy regc ,pdata 
+50df da204921 arg mem_car_24g_commom_addr_temp ,rega 
+50e0 d8400004 arg 4 ,temp 
+50e1 204068ac call otpd_read_data_with_pwr_operation 
+50e2 6fe24925 fetch 4 ,mem_car_24g_commom_addr_read 
+50e3 207a0000 rtn blank 
+50e4 67e24921 store 4 ,mem_car_24g_commom_addr_temp 
+50e5 1a627e00 copy regc ,pdata 
+50e6 d84007cc arg otp_offset_car_commom_end_addr ,temp 
+50e7 98467c00 isub temp ,null 
+50e8 20610000 rtn positive 
+50e9 1a60a604 increase 4 ,regc 
+50ea 202050de branch car_g24_search_commom_addr_loop 
+
+car_g24_bind_device_addr:
+50eb 6fe24573 fetch 4 ,mem_24g_device1_addr 
+50ec 207a0000 rtn blank 
+50ed 202048e0 branch g24_update_addr_and_synccrc8 
+
+car_g24_cb_data_device1:
+50ee 6fe1442f fetch 2 ,mem_ui_state_map 
+50ef c3848000 rtnbit1 ui_state_ble_connected 
+50f0 6fe146dc fetch 2 ,mem_car_24g_no_data_timeout_count 
+50f1 67e146de store 2 ,mem_car_24g_no_data_timeout_timer 
+50f2 7048fa01 jam work_paired ,mem_car_24g_received_pac 
+50f3 da20452e arg mem_24g_rxdata_temp + 3 ,rega 
+50f4 20204f95 branch car_24g_receive_data 
+
+car_g24_lpm_dipatch:
+50f5 6fe0c903 fetch 1 ,mem_car_enter_lpm_flag 
+50f6 207a0000 rtn blank 
+50f7 204050fd call car_g24_lpm_wait 
+50f8 24740000 nrtn user 
+50f9 6fe1c4f5 fetch 3 ,mem_24g_enter_hibernate 
+50fa 20407593 call clk2lpo 
+50fb 604a40aa storet 4 ,mem_sleep_counter 
+50fc 20203b7a branch lpm_sleep 
+
+car_g24_lpm_wait:
+50fd 78347c00 enable user 
+50fe 20403b4b call lpo_calibration 
+50ff 6fe1c0be fetch 3 ,mem_clks_per_lpo 
+5100 203a7638 branch disable_user ,blank 
+5101 20204ecc branch car_le_process_lpm_before 
+
+remote_car_init:
+5102 20758000 rtn wake 
+5103 20405204 call remote_car_default_init 
+5104 20406d0f call keyscan_key_init 
+5105 580051e8 setarg remote_car_g24_package_data 
+5106 67e14535 store 2 ,mem_cb_24g_transmit_data 
+5107 58005146 setarg remote_car_process_lpm_before 
+5108 67e14539 store 2 ,mem_cb_24g_lpm_before 
+5109 58005141 setarg remote_car_le_before_hibernate 
+510a 67e1438a store 2 ,mem_cb_before_hibernate 
+510b 58005181 setarg remote_car_scale_process_idle 
+510c 67e14390 store 2 ,mem_cb_idle_process 
+510d 58005183 setarg remote_car_scale_process_bb_event 
+510e 67e14392 store 2 ,mem_cb_bb_event_process 
+510f 580051cd setarg remote_car_event_timer 
+5110 67e14398 store 2 ,mem_cb_event_timer 
+5111 58005136 setarg remote_car_power_off_signal 
+5112 67e1462b store 2 ,mem_remote_car_power_off_cb 
+5113 58005126 setarg remote_car_soft_switch_power_on_signal 
+5114 67e1462f store 2 ,mem_remote_car_power_standby_cb 
+5115 44994006 bpatch patch06_2 ,mem_patch06 
+5116 20406a26 call set_eeprom_size_2k 
+5117 2040513d call remote_car_init_environment 
+5118 2040711d call queue_init 
+5119 6fe0c5fb fetch 1 ,mem_remote_car_config_soft_switch_enable 
+511a 67e0c56a store 1 ,mem_remote_car_hard_soft_switch 
+511b c0005125 beq hard_switch ,remote_car_hard_switch_power_on_signal 
+511c 6fe0c5fc fetch 1 ,mem_remote_car_config_soft_switch_gpio 
+511d 67e0c432 store 1 ,mem_ui_button_gpio 
+
+remote_car_soft_switch_power_on_init:
+511e 20405136 call remote_car_ui_led_init 
+511f 20406fe2 call ui_button_init 
+5120 20406fec call ui_button_polling 
+5121 70462701 jam power_starting ,mem_remote_car_power_state 
+5122 6fe1442f fetch 2 ,mem_ui_state_map 
+5123 c3860000 rtnbit1 ui_state_btn_down 
+5124 20204e28 branch app_enter_hibernate 
+
+remote_car_hard_switch_power_on_signal:
+5125 70462702 jam power_standby ,mem_remote_car_power_state 
+
+remote_car_soft_switch_power_on_signal:
+5126 20405136 call remote_car_ui_led_init 
+5127 da200000 arg 0 ,rega 
+5128 20407030 call ui_led_blink_start_global 
+5129 204051ab call remote_car_g24_load_commom_addr 
+512a 6fe2463d fetch 4 ,mem_remote_24g_commom_addr 
+512b 67e244d5 store 4 ,mem_24g_addr 
+512c 203a493b branch g24_pair_start ,blank 
+512d 6fe244d5 fetch 4 ,mem_24g_addr 
+512e 67e2452b store 4 ,mem_24g_receiver_addr 
+512f 6fe1451f fetch 2 ,mem_24g_reconn_timeout_init 
+5130 67e14521 store 2 ,mem_24g_reconn_timeout 
+5131 20204bc3 branch g24_reconn_start 
+
+remote_car_set_24g_addr_eeprom:
+5132 d8400004 arg 4 ,temp 
+5133 da2044d5 arg mem_24g_addr ,rega 
+5134 da400000 arg remote_info_eeprom_offect ,regb 
+5135 20600000 rtn 
+
+remote_car_power_off_signal:
+
+remote_car_ui_led_init:
+5136 4499c006 bpatch patch06_3 ,mem_patch06 
+5137 6fe0c5f9 fetch 1 ,mem_remote_car_config_connect_led_gpio 
+5138 c0ffd13b bne invalid_pin_num ,remote_car_pairing_led_gpio_set 
+
+remote_car_ui_led_init_1:
+5139 6848c5d6 fetcht 1 ,mem_remote_car_led_map 
+513a 20206c43 branch gpio_config_output 
+
+remote_car_pairing_led_gpio_set:
+513b 67e0c5d6 store 1 ,mem_remote_car_led_map 
+513c 20205139 branch remote_car_ui_led_init_1 
+
+remote_car_init_environment:
+513d 20404c72 call g24_transmit_init 
+
+remote_no_data_timer_init:
+513e 6fe14623 fetch 2 ,mem_remote_car_no_data_timeout 
+513f 67e14625 store 2 ,mem_remote_car_no_data_timer 
+5140 20600000 rtn 
+
+remote_car_le_before_hibernate:
+5141 20405146 call remote_car_process_lpm_before 
+
+remote_gpio_set_before_hibernate:
+5142 6fe0c5cc fetch 1 ,mem_remote_style_struct_led_gpio 
+5143 79207e07 set1 7 ,pdata 
+5144 d840003f arg gpcfg_output_high ,temp 
+5145 20206c67 branch gpio_config_function 
+
+remote_car_process_lpm_before:
+5146 20406c74 call gpio_set_before_lpm 
+5147 20206d34 branch keyscan_process_lpm_before 
+
+remote_car_key_scan_process:
+5148 20406d40 call keyscan_key_process 
+5149 20405159 call get_remote_key_state 
+514a 2040514c call remote_conn_led_state 
+514b 20205167 branch send_data 
+
+remote_conn_led_state:
+514c 6fe0c632 fetch 1 ,mem_remote_car_24g_status 
+514d c1808000 rtnne work_paired 
+514e 6fe24636 fetch 4 ,mem_remote_car_motor1_key0_press_state 
+514f 203a5153 branch remote_car_stop_state ,blank 
+5150 70463c00 jam 0 ,mem_remote_car_no_data_check 
+5151 78347c00 enable user 
+5152 202070fd branch check_51cmd_led_on 
+
+remote_car_stop_state:
+5153 6fe0c63c fetch 1 ,mem_remote_car_no_data_check 
+5154 c17f8000 rtneq 0xff 
+5155 1fe0fe01 pincrease 1 
+5156 67e0c63c store 1 ,mem_remote_car_no_data_check 
+5157 78547c00 disable user 
+5158 202070fb branch check_51cmd_led_off 
+
+get_remote_key_state:
+5159 684943dc fetcht 2 ,mem_key_value_retention 
+515a 18417e01 and temp ,0x01 ,pdata 
+515b 18430400 rshift temp ,temp 
+515c 67e0c636 store 1 ,mem_remote_car_motor1_key0_press_state 
+515d 18417e01 and temp ,0x01 ,pdata 
+515e 18430400 rshift temp ,temp 
+515f 67e0c637 store 1 ,mem_remote_car_motor1_key1_press_state 
+5160 18417e01 and temp ,0x01 ,pdata 
+5161 18430400 rshift temp ,temp 
+5162 67e0c638 store 1 ,mem_remote_car_motor2_key2_press_state 
+5163 18417e01 and temp ,0x01 ,pdata 
+5164 18430400 rshift temp ,temp 
+5165 67e0c639 store 1 ,mem_remote_car_motor2_key3_press_state 
+5166 20600000 rtn 
+
+send_data:
+5167 449a4006 bpatch patch06_4 ,mem_patch06 
+5168 20405177 call remote_car_fb_check 
+5169 2040517c call remote_car_lr_check 
+516a 2040516d call remote_car_no_data_timeout_check 
+516b 24740000 nrtn user 
+516c 202051e4 branch remote_car_send_key 
+
+remote_car_no_data_timeout_check:
+516d 6fe0c632 fetch 1 ,mem_remote_car_24g_status 
+516e c1808000 rtnne work_paired 
+516f 6fe0c63c fetch 1 ,mem_remote_car_no_data_check 
+5170 207a0000 rtn blank 
+5171 1fe67c01 sub pdata ,1 ,null 
+5172 24610000 nrtn positive 
+5173 6fe1451f fetch 2 ,mem_24g_reconn_timeout_init 
+5174 67e14521 store 2 ,mem_24g_reconn_timeout 
+5175 78347c00 enable user 
+5176 20600000 rtn 
+
+remote_car_fb_check:
+5177 6fe0c636 fetch 1 ,mem_remote_car_motor1_key0_press_state 
+5178 243a51d8 nbranch remote_car_send_motor1_key0_press ,blank 
+5179 6fe0c637 fetch 1 ,mem_remote_car_motor1_key1_press_state 
+517a 243a51da nbranch remote_car_send_motor1_key1_press ,blank 
+517b 202051e0 branch remote_car_send_motor1_key0_rel 
+
+remote_car_lr_check:
+517c 6fe0c638 fetch 1 ,mem_remote_car_motor2_key2_press_state 
+517d 243a51dc nbranch remote_car_send_motor2_key2_press ,blank 
+517e 6fe0c639 fetch 1 ,mem_remote_car_motor2_key3_press_state 
+517f 243a51de nbranch remote_car_send_motor2_key3_press ,blank 
+5180 202051e2 branch remote_car_send_motor2_key2_rel 
+
+remote_car_scale_process_idle:
+5181 204051c2 call remote_car_24g_status_process 
+5182 20205148 branch remote_car_key_scan_process 
+
+remote_car_scale_process_bb_event:
+5183 1a627e00 copy regc ,pdata 
+5184 c016ce48 beq bt_evt_button_up ,app_event_button_up 
+5185 c0084e30 beq bt_evt_button_long_pressed ,app_button_long_pressed 
+5186 c01cd18b beq bt_evt_24g_pairing_complete ,remote_car_24g_pairing_complete 
+5187 c01e5192 beq bt_evt_24g_attempt_success ,remote_car_24g_attempt_success 
+5188 c01d518a beq bt_evt_24g_attempt_fail ,remote_car_24g_attempt_fail 
+5189 20600000 rtn 
+
+remote_car_24g_attempt_fail:
+518a 20204c01 branch g24_txbuf_clear 
+
+remote_car_24g_pairing_complete:
+518b 449ac006 bpatch patch06_5 ,mem_patch06 
+518c 6fe2452b fetch 4 ,mem_24g_receiver_addr 
+518d 67e2463d store 4 ,mem_remote_24g_commom_addr 
+518e 6fe0c649 fetch 1 ,mem_remote_save_addr_flag 
+518f 245a5197 ncall remote_car_g24_save_commom_addr ,blank 
+5190 6fe2463d fetch 4 ,mem_remote_24g_commom_addr 
+5191 204048e0 call g24_update_addr_and_synccrc8 
+
+remote_car_24g_attempt_success:
+5192 70453b00 jam 0 ,mem_24g_conn_sm 
+5193 70463301 jam work_paired ,mem_remote_car_24g_auto_work_step 
+5194 70463401 jam work_paired ,mem_remote_car_24g_pair_success_flag 
+5195 70452100 jam 0 ,mem_24g_reconn_timeout 
+5196 20600000 rtn 
+
+remote_car_g24_save_commom_addr:
+5197 6fe0c649 fetch 1 ,mem_remote_save_addr_flag 
+5198 207a0000 rtn blank 
+5199 6fe0c438 fetch 1 ,mem_24g_lap + 1 
+519a 67e0c640 store 1 ,mem_remote_24g_commom_addr + 3 
+519b 6fe0c52c fetch 1 ,mem_24g_receiver_addr + 1 
+519c 67e0c63f store 1 ,mem_remote_24g_commom_addr + 2 
+519d 6fe0c437 fetch 1 ,mem_24g_lap 
+519e 67e0c63e store 1 ,mem_remote_24g_commom_addr + 1 
+519f 6fe0c52b fetch 1 ,mem_24g_receiver_addr 
+51a0 67e0c63d store 1 ,mem_remote_24g_commom_addr 
+51a1 204051b2 call remote_car_g24_search_commom_addr 
+51a2 6fe2463d fetch 4 ,mem_remote_24g_commom_addr 
+51a3 684a4641 fetcht 4 ,mem_remote_24g_commom_addr_temp 
+51a4 98467c00 isub temp ,null 
+51a5 20628000 rtn zero 
+51a6 1a627e00 copy regc ,pdata 
+51a7 da20463d arg mem_remote_24g_commom_addr ,rega 
+51a8 df200004 arg 4 ,loopcnt 
+51a9 2040686a call otp_write 
+51aa 20600000 rtn 
+
+remote_car_g24_load_commom_addr:
+51ab 6fe0c649 fetch 1 ,mem_remote_save_addr_flag 
+51ac 207a0000 rtn blank 
+51ad 204051b2 call remote_car_g24_search_commom_addr 
+51ae 6fe24641 fetch 4 ,mem_remote_24g_commom_addr_temp 
+51af 207a0000 rtn blank 
+51b0 67e2463d store 4 ,mem_remote_24g_commom_addr 
+51b1 20600000 rtn 
+
+remote_car_g24_search_commom_addr:
+51b2 6fe0c649 fetch 1 ,mem_remote_save_addr_flag 
+51b3 207a0000 rtn blank 
+51b4 da600700 arg otp_offset_remote_commom_start_addr ,regc 
+
+remote_car_g24_search_commom_addr_loop:
+51b5 1a627e00 copy regc ,pdata 
+51b6 da204641 arg mem_remote_24g_commom_addr_temp ,rega 
+51b7 d8400004 arg 4 ,temp 
+51b8 204068ac call otpd_read_data_with_pwr_operation 
+51b9 6fe24645 fetch 4 ,mem_remote_24g_commom_addr_read 
+51ba 207a0000 rtn blank 
+51bb 67e24641 store 4 ,mem_remote_24g_commom_addr_temp 
+51bc 1a627e00 copy regc ,pdata 
+51bd d84007cc arg otp_offset_remote_commom_end_addr ,temp 
+51be 98467c00 isub temp ,null 
+51bf 20610000 rtn positive 
+51c0 1a60a604 increase 4 ,regc 
+51c1 202051b5 branch remote_car_g24_search_commom_addr_loop 
+
+remote_car_24g_status_process:
+51c2 6fe0c633 fetch 1 ,mem_remote_car_24g_auto_work_step 
+51c3 c1000000 rtneq power_on 
+51c4 6fe0c632 fetch 1 ,mem_remote_car_24g_status 
+51c5 c1008000 rtneq work_paired 
+51c6 70463201 jam work_paired ,mem_remote_car_24g_status 
+
+remote_car_scale_process_paired:
+51c7 da200000 arg 0 ,rega 
+51c8 2020702b branch ui_led_off_global 
+
+remote_car_scale_process_shutdown:
+51c9 da200000 arg 0 ,rega 
+51ca 2040702b call ui_led_off_global 
+51cb 20405136 call remote_car_ui_led_init 
+51cc 20204e28 branch app_enter_hibernate 
+
+remote_car_event_timer:
+51cd 20404def call app_power_timer 
+51ce 20404938 call g24_pair_timeout_timer 
+51cf 20404bc0 call g24_reconn_timeout_timer 
+51d0 202051d1 branch remote_car_no_data_timer 
+
+remote_car_no_data_timer:
+51d1 6fe0c5fd fetch 1 ,mem_remote_car_config_timeout_shutdown_enable 
+51d2 207a0000 rtn blank 
+51d3 6fe0c3dc fetch 1 ,mem_key_value_retention 
+51d4 243a513e nbranch remote_no_data_timer_init ,blank 
+51d5 da604625 arg mem_remote_car_no_data_timer ,regc 
+51d6 da4051c9 arg remote_car_scale_process_shutdown ,regb 
+51d7 20204de8 branch timer_single_step_2b 
+
+remote_car_send_motor1_key0_press:
+51d8 70460401 jam motor_positive ,mem_remote_car_24g_motor1_payload 
+51d9 20600000 rtn 
+
+remote_car_send_motor1_key1_press:
+51da 70460402 jam motor_negative ,mem_remote_car_24g_motor1_payload 
+51db 20600000 rtn 
+
+remote_car_send_motor2_key2_press:
+51dc 70460601 jam motor_positive ,mem_remote_car_24g_motor2_payload 
+51dd 20600000 rtn 
+
+remote_car_send_motor2_key3_press:
+51de 70460602 jam motor_negative ,mem_remote_car_24g_motor2_payload 
+51df 20600000 rtn 
+
+remote_car_send_motor1_key0_rel:
+
+remote_car_send_motor1_key1_rel:
+51e0 70460400 jam motor_stop ,mem_remote_car_24g_motor1_payload 
+51e1 20600000 rtn 
+
+remote_car_send_motor2_key2_rel:
+
+remote_car_send_motor2_key3_rel:
+51e2 70460600 jam motor_stop ,mem_remote_car_24g_motor2_payload 
+51e3 20600000 rtn 
+
+remote_car_send_key:
+51e4 da2045fe arg mem_remote_car_24g_motor_packet ,rega 
+51e5 20207122 branch queue_push 
+
+remote_car_send_attack:
+51e6 da20460b arg mem_remote_car_24g_fire_packet ,rega 
+51e7 20207122 branch queue_push 
+
+remote_car_g24_package_data:
+51e8 6fe0c634 fetch 1 ,mem_remote_car_24g_pair_success_flag 
+51e9 c000d1f2 beq work_paired ,remote_car_g24_send_empty 
+51ea da204614 arg mem_remote_car_24g_tx_temp ,rega 
+51eb 2040713a call queue_pop 
+51ec 243451f7 nbranch remote_car_moto_data ,user 
+
+remote_car_g24_package_data_continue:
+51ed d8c04614 arg mem_remote_car_24g_tx_temp ,contr 
+51ee efe08006 ifetch 1 ,contr 
+51ef 1fe22200 copy pdata ,rega 
+51f0 da404615 arg mem_remote_car_24g_tx_temp + 1 ,regb 
+51f1 20600000 rtn 
+
+remote_car_g24_send_empty:
+51f2 70463400 jam 0 ,mem_remote_car_24g_pair_success_flag 
+51f3 78347c00 enable user 
+51f4 da200001 arg 1 ,rega 
+51f5 da404635 arg mem_remote_car_empty_packet ,regb 
+51f6 20600000 rtn 
+
+remote_car_moto_data:
+51f7 6fe0c617 fetch 1 ,mem_remote_car_24g_tx_temp + 3 
+51f8 c00251fb beq car_cmd_l_r_motor_control ,remote_car_moto_data_next 
+51f9 c002d1fb beq car_cmd_f_b_motor_control ,remote_car_moto_data_next 
+51fa 20600000 rtn 
+
+remote_car_moto_data_next:
+51fb 6fe0c61a fetch 1 ,mem_remote_car_24g_tx_temp + 6 
+51fc 243a5202 nbranch remote_car_moto_data_enable_user ,blank 
+51fd 6fe0c61c fetch 1 ,mem_remote_car_24g_tx_temp + 8 
+51fe 243a5202 nbranch remote_car_moto_data_enable_user ,blank 
+51ff 6fe0c61e fetch 1 ,mem_remote_car_24g_tx_temp + 10 
+5200 243a5202 nbranch remote_car_moto_data_enable_user ,blank 
+5201 20600000 rtn 
+
+remote_car_moto_data_enable_user:
+5202 78347c00 enable user 
+5203 202051ed branch remote_car_g24_package_data_continue 
+
+remote_car_default_init:
+5204 70443114 jam 0x14 ,mem_ui_button_timeout 
+5205 70442a01 jam 0x01 ,mem_ui_button_last_state 
+5206 5800060f setarg 0x060f 
+5207 67e1456b store 2 ,mem_remote_car_queue_each_size 
+5208 5800456b setarg mem_remote_car_queue_each_size 
+5209 67e143b0 store 2 ,mem_queue_ptr 
+520a 70409401 jam 0x01 ,mem_lpm_mode 
+520b 7040a706 jam 0x06 ,mem_lpm_overhead 
+520c 7040c202 jam 0x02 ,mem_lpm_mult_timeout 
+520d 70456a00 jam 0x00 ,mem_remote_car_hard_soft_switch 
+520e 580045ca setarg mem_remote_style_led_type 
+520f 67e14435 store 2 ,mem_ui_led_struct_ptr 
+5210 70443401 jam 0x01 ,mem_ui_led_struct_num 
+5211 7045cbff jam 0xff ,mem_remote_style_blink_count 
+5212 58000296 setarg 0x0296 
+5213 67e145cd store 2 ,mem_remote_style_on_time 
+5214 5800073a setarg 0x073a 
+5215 67e145cf store 2 ,mem_remote_style_off_time 
+5216 58004627 setarg mem_remote_car_soft_power 
+5217 67e143de store 2 ,mem_power_param_ptr 
+5218 58000c0c setarg 0x0c0c 
+5219 67e14629 store 2 ,mem_remote_car_power_off_timeout 
+521a 580045de setarg mem_remote_car_keyscan 
+521b 67e143da store 2 ,mem_keyscan_ptr 
+521c 7045fb00 jam 0x00 ,mem_remote_car_config_soft_switch_enable 
+521d 7045f9ff jam 0xff ,mem_remote_car_config_connect_led_gpio 
+521e 7045fcff jam 0xff ,mem_remote_car_config_soft_switch_gpio 
+521f 7045f700 jam 0x00 ,mem_remote_car_config_key_map 
+5220 7045f800 jam 0x00 ,mem_remote_car_config_layout 
+5221 7045fa00 jam 0x00 ,mem_remote_car_config_check_way 
+5222 7045fd01 jam 0x01 ,mem_remote_car_config_timeout_shutdown_enable 
+5223 58004e55 setarg 0x4e55 
+5224 67e145ea store 2 ,mem_current_vdd_value_default_mid_x 
+5225 67e145ec store 2 ,mem_current_vdd_value_default_mid_y 
+5226 58000007 setarg 0x0007 
+5227 67e145f0 store 2 ,mem_current_vdd_default_range 
+5228 7043c202 jam 0x02 ,mem_adc_config_flag 
+5229 38035a0c setsect 0 ,0x35a0c 
+522a 3804011a setsect 1 ,0x11a 
+522b 38080060 setsect 2 ,0x60 
+522c 380c0028 setsect 3 ,0x28 
+522d 67e4c5fe store 9 ,mem_remote_car_24g_motor_packet 
+522e 3802000a setsect 0 ,0x2000a 
+522f 38040002 setsect 1 ,0x02 
+5230 e7e20005 istore 4 ,contw 
+5231 38035a08 setsect 0 ,0x35a08 
+5232 3804019a setsect 1 ,0x19a 
+5233 38080000 setsect 2 ,0x00 
+5234 380c0000 setsect 3 ,0x00 
+5235 67e4c60b store 9 ,mem_remote_car_24g_fire_packet 
+5236 58000064 setarg 0x0064 
+5237 67e14623 store 2 ,mem_remote_car_no_data_timeout 
+5238 70411600 jam tx_power_0db ,mem_tx_power 
+5239 7044cf01 jam 0x01 ,mem_24g_data_type 
+523a 70454206 jam 0x06 ,mem_24g_max_retry 
+523b 7044f401 jam 0x01 ,mem_24g_pair_switch 
+523c 70452600 jam 0x00 ,mem_24g_fast_conn_enable 
+523d 20404922 call g24_rx_window_init 
+523e 20404c7e call g24_interval_param_8ms 
+523f 20404905 call g24_chmap_param_init 
+5240 58000708 setarg 0x0708 
+5241 67e1451b store 2 ,mem_24g_pair_timeout_init 
+5242 58000050 setarg 0x0050 
+5243 67e1451f store 2 ,mem_24g_reconn_timeout_init 
+5244 580a7700 setarg 0x0a7700 
+5245 67e1c54a store 3 ,mem_24g_long_sleep_set 
+5246 58604800 setarg 0x604800 
+5247 67e1c4f5 store 3 ,mem_24g_enter_hibernate 
+5248 20600000 rtn 
+
+dongle_init:
+5249 5800527c setarg dongle_dispatch 
+524a 67e14523 store 2 ,mem_cb_24g_receive_process 
+524b 5800535a setarg dongle_g24_mouse 
+524c 67e14527 store 2 ,mem_cb_24g_data_device1 
+524d 5800536b setarg dongle_g24_kb 
+524e 67e14529 store 2 ,mem_cb_24g_data_device2 
+524f 58005331 setarg dongle_ackpayload_prep 
+5250 67e14525 store 2 ,mem_cb_24g_ackpayload 
+5251 5800528b setarg dongle_usb_config 
+5252 67e106ad store 2 ,mem_cb_usb_config 
+5253 20207182 branch usb_init 
+
+dongle_default_init:
+5254 47404030 bpatchx patch30_0 ,mem_patch30 
+5255 20405281 call dongle_read_kb_bind_status 
+5256 20405277 call dongle_xtal_select 
+5257 6fe0c5ab fetch 1 ,mem_dg_sys_config 
+5258 2feffe05 isolate1 dg_enable_eeprom ,pdata 
+5259 2020d25d branch dongle_default_no_eeprom ,true 
+525a 6fe0c5ab fetch 1 ,mem_dg_sys_config 
+525b 2feffe06 isolate1 dg_enable_new_chmap ,pdata 
+525c 2040c915 call g24_chamap_param_update ,true 
+
+dongle_default_no_eeprom:
+525d 6fe0c5d6 fetch 1 ,mem_dg_24g_tx_power_default 
+525e 67e0c116 store 1 ,mem_tx_power 
+525f 704517ff jam 0xff ,mem_rssi_buff_index 
+5260 580007b3 setarg mem_dg_rssi_noise_buffer 
+5261 67e14583 store 2 ,mem_rssi_noise_buffer_ptr 
+5262 580008b3 setarg mem_dg_rssi_noise_dg_buffer 
+5263 67e14585 store 2 ,mem_rssi_noise_self_buffer_ptr 
+5264 580009b3 setarg mem_dg_rssi_noise_ms_buffer 
+5265 67e14587 store 2 ,mem_rssi_noise_device1_buffer_ptr 
+5266 58000ab3 setarg mem_dg_rssi_noise_kb_buffer 
+5267 67e14589 store 2 ,mem_rssi_noise_device2_buffer_ptr 
+5268 70451685 jam tx_power_f5db ,mem_24g_pair_tx_power 
+5269 7045d400 jam 0 ,mem_dg_kb_bind_success 
+526a 70456e00 jam 0 ,mem_24g_bind_device_living 
+526b 2040492b call g24_enable_1m 
+526c 6fe0c5ab fetch 1 ,mem_dg_sys_config 
+526d 2feffe03 isolate1 dg_enable_24g_2m ,pdata 
+526e 2040c92e call g24_enable_2m ,true 
+526f 20404a34 call g24_receive_init 
+5270 20404931 call g24_pair_param_init 
+5271 20404905 call g24_chmap_param_init 
+5272 6fe0c5b5 fetch 1 ,mem_dg_usb_tx_interval 
+5273 67e086af store 1 ,mem_usb_tx_interval 
+5274 6fe4c5ac fetch 9 ,mem_dg_usb_vid_pid 
+5275 67e486b0 store 9 ,mem_usb_vid_pid 
+5276 20600000 rtn 
+
+dongle_xtal_select:
+5277 70409a18 jam xtal_24m ,mem_fcomp_div 
+5278 6fe0c5ab fetch 1 ,mem_dg_sys_config 
+5279 c4038000 rtnbit0 dg_enable_xtal_24m 
+527a 70409a08 jam xtal_16m ,mem_fcomp_div 
+527b 20600000 rtn 
+
+dongle_dispatch:
+527c 6fe0c553 fetch 1 ,mem_24g_pair_mode 
+527d c0005321 beq 0x00 ,dongle_auto_bind 
+527e c000d2b4 beq 0x01 ,dongle_pc_bind 
+527f c007d2b0 beq 0x0f ,dongle_all_powerful 
+5280 20600000 rtn 
+
+dongle_read_kb_bind_status:
+5281 4740c030 bpatchx patch30_1 ,mem_patch30 
+5282 58001fdf setarg dongle_kb_bind_efuse_offect 
+5283 da20458b arg mem_dg_kb_bind_flag ,rega 
+5284 d8400001 arg 1 ,temp 
+5285 202068ac branch otpd_read_data_with_pwr_operation 
+
+dongle_write_kb_bind_status:
+5286 47414030 bpatchx patch30_2 ,mem_patch30 
+5287 df200001 arg 1 ,loopcnt 
+5288 da20458b arg mem_dg_kb_bind_flag ,rega 
+5289 dfe01fdf arg dongle_kb_bind_efuse_offect ,pdata 
+528a 2020686a branch otp_write 
+
+dongle_usb_config:
+528b 6fe0c5ab fetch 1 ,mem_dg_sys_config 
+528c c282528f bbit1 dg_enable_kb_icon ,dongle_usb_config_kb 
+528d 6fe0c58b fetch 1 ,mem_dg_kb_bind_flag 
+528e c0ad5293 bne dongle_kb_bind_success ,dongle_usb_config_param 
+
+dongle_usb_config_kb:
+528f 70458b5a jam dongle_kb_bind_success ,mem_dg_kb_bind_flag 
+5290 6ff2137a fetch 4 ,usb_devicedata_addr + 9 
+5291 79207e1d set1 29 ,pdata 
+5292 67e20608 store 4 ,mem_devicedesc + 9 
+
+dongle_usb_config_param:
+5293 204052aa call dongle_usb_device_name 
+5294 204071d5 call usb_tx_interval_config 
+5295 20405297 call dongle_usb_vid_pid_config 
+5296 202052a0 branch dongle_usb_hid_icon_config 
+
+dongle_usb_vid_pid_config:
+5297 6fe086b0 fetch 1 ,mem_usb_vid_pid 
+5298 207a0000 rtn blank 
+5299 6fe0c58b fetch 1 ,mem_dg_kb_bind_flag 
+529a c02d529e beq dongle_kb_bind_success ,dongle_usb_vid_pid_for_suit 
+
+dongle_usb_vid_pid_for_mouse_only_auto_pair:
+529b 6fe206b1 fetch 4 ,mem_usb_vid_pid + 1 
+
+dongle_usb_vid_pid_store:
+529c 67e20608 store 4 ,mem_devicedesc + 9 
+529d 20600000 rtn 
+
+dongle_usb_vid_pid_for_suit:
+529e 6fe206b5 fetch 4 ,mem_usb_vid_pid + 5 
+529f 2020529c branch dongle_usb_vid_pid_store 
+
+dongle_usb_hid_icon_config:
+52a0 6fe0c58b fetch 1 ,mem_dg_kb_bind_flag 
+52a1 c02d52a6 beq dongle_kb_bind_success ,dongle_usb_kb_hidreportdesc 
+52a2 58009272 setarg usb_kbdata_vendor_define_addr 
+52a3 67e105fb store 2 ,mem_hidreportdesc_kb 
+52a4 70062c1a jam 0x1a ,mem_confdesc + 26 
+52a5 20600000 rtn 
+
+dongle_usb_kb_hidreportdesc:
+52a6 5800928d setarg usb_kbdata_addr 
+52a7 67e105fb store 2 ,mem_hidreportdesc_kb 
+52a8 70062c3f jam 0x3f ,mem_confdesc + 26 
+52a9 20600000 rtn 
+
+dongle_usb_device_name:
+52aa 6fe0c5b6 fetch 1 ,mem_dg_usb_device_name 
+52ab 207a0000 rtn blank 
+52ac d8c045b6 arg mem_dg_usb_device_name ,contr 
+52ad d8a00671 arg mem_string2 ,contw 
+52ae df20001e arg 30 ,loopcnt 
+52af 20207548 branch memcpy 
+
+dongle_all_powerful:
+52b0 20404af1 call g24_switch_work_mode 
+
+dongle_all_powerful_loop:
+52b1 20405329 call dongle_work_mode_auto 
+52b2 204052ed call dongle_usb_dispatch 
+52b3 202052b1 branch dongle_all_powerful_loop 
+
+dongle_pc_bind:
+52b4 20404af1 call g24_switch_work_mode 
+
+dongle_pc_bind_loop:
+52b5 20405329 call dongle_work_mode_auto 
+52b6 20404afa call g24_bind_mode_auto 
+52b7 204052ed call dongle_usb_dispatch 
+52b8 202052b5 branch dongle_pc_bind_loop 
+
+dongle_g24_blank_data_process:
+52b9 204052bc call dongle_g24_ms_blank_data 
+52ba 204052cc call dongle_g24_kb_blank_data 
+52bb 202052de branch dongle_g24_kb_mul_blank_data 
+
+dongle_g24_ms_blank_data:
+52bc 4741c030 bpatchx patch30_3 ,mem_patch30 
+52bd 6fe0c5aa fetch 1 ,mem_dg_ms_blank_data_enable 
+52be 207a0000 rtn blank 
+52bf d8e0000d arg g24_timer_ms_blank ,queue 
+52c0 2040755d call timer_check 
+52c1 247a0000 nrtn blank 
+52c2 7045aa00 jam 0 ,mem_dg_ms_blank_data_enable 
+52c3 58000001 setarg ms_report_id 
+52c4 67e08767 store 1 ,mem_usb_mouse_data 
+52c5 58000000 setarg 0 
+52c6 e7e38005 istore 7 ,contw 
+
+dongle_usb_tx_ms_data:
+52c7 70076020 jam usb_ep2_ms ,mem_usb_ep2_data 
+
+dongle_usb_tx_enable_ep2:
+52c8 6fe08761 fetch 1 ,mem_usb_tx_enable 
+52c9 79207e02 set1 2 ,pdata 
+52ca 67e08761 store 1 ,mem_usb_tx_enable 
+52cb 20600000 rtn 
+
+dongle_g24_kb_blank_data:
+52cc 47424030 bpatchx patch30_4 ,mem_patch30 
+52cd 6fe0c5a8 fetch 1 ,mem_dg_kb_blank_data_enable 
+52ce 207a0000 rtn blank 
+52cf d8e0000e arg g24_timer_kb_blank ,queue 
+52d0 2040755d call timer_check 
+52d1 247a0000 nrtn blank 
+52d2 7045a800 jam 0 ,mem_dg_kb_blank_data_enable 
+52d3 d8a00777 arg mem_usb_kb_data ,contw 
+52d4 df200002 arg 2 ,loopcnt 
+52d5 20407500 call memset0 
+52d6 6fe40777 fetch 8 ,mem_usb_kb_data 
+52d7 67e44594 store 8 ,mem_dg_kb_data_last_data 
+
+dongle_usb_tx_kb_data:
+52d8 70077700 jam kb_normal_report_id ,mem_usb_kb_data 
+
+dongle_usb_tx_enable_ep1:
+52d9 70075f10 jam usb_ep1_kb ,mem_usb_ep1_data 
+52da 6fe08761 fetch 1 ,mem_usb_tx_enable 
+52db 79207e01 set1 1 ,pdata 
+52dc 67e08761 store 1 ,mem_usb_tx_enable 
+52dd 20600000 rtn 
+
+dongle_g24_kb_mul_blank_data:
+52de 4742c030 bpatchx patch30_5 ,mem_patch30 
+52df 6fe0c5a9 fetch 1 ,mem_dg_kb_mul_blank_data_enable 
+52e0 207a0000 rtn blank 
+52e1 d8e0000c arg g24_timer_kb_mul_blank ,queue 
+52e2 2040755d call timer_check 
+52e3 247a0000 nrtn blank 
+52e4 7045a900 jam 0 ,mem_dg_kb_mul_blank_data_enable 
+52e5 d8a00787 arg mem_usb_kb_multikey ,contw 
+52e6 df200002 arg 2 ,loopcnt 
+52e7 20407500 call memset0 
+52e8 70078703 jam kb_multikey_report_id ,mem_usb_kb_multikey 
+52e9 6fe18787 fetch 3 ,mem_usb_kb_multikey 
+52ea 67e1c59f store 3 ,mem_dg_kb_multikey_last_data 
+
+dongle_usb_tx_multikey_data:
+52eb 70076021 jam usb_ep2_multikey ,mem_usb_ep2_data 
+52ec 202052c8 branch dongle_usb_tx_enable_ep2 
+
+dongle_usb_dispatch:
+52ed 449b4006 bpatch patch06_6 ,mem_patch06 
+52ee 6fe08755 fetch 1 ,mem_usb_remote_wakeup 
+52ef 205a533b call dongle_clear_pc_sleep_flag ,blank 
+52f0 20407176 call usb_isr 
+52f1 6fe0874b fetch 1 ,mem_usb0_get_set_report 
+52f2 207a0000 rtn blank 
+52f3 70074b00 jam 0 ,mem_usb0_get_set_report 
+52f4 6fe10749 fetch 2 ,mem_usb_setup_bvalue_temp 
+52f5 d84002ba arg pc_set_report ,temp 
+52f6 98467c00 isub temp ,null 
+52f7 24628000 nrtn zero 
+52f8 6fe086c9 fetch 1 ,mem_usb0_set_report_data 
+52f9 c1dd0000 rtnne pc_report_id 
+52fa 6fe086ca fetch 1 ,mem_usb0_set_report_data + 1 
+52fb c0505302 beq command_mode ,dongle_dispose_cmd_mode 
+52fc c050d308 beq command_bind ,dongle_dispose_cmd_bind 
+52fd c0535314 beq command_current_project ,dongle_dispose_cmd_current_project 
+52fe c053d316 beq command_current_mode ,dongle_dispose_cmd_current_mode 
+52ff c054d31c beq command_current_fw_version ,dongle_dispose_cmd_current_fw_version 
+
+dongle_usb0_data_ready_report_set0:
+5300 70074c00 jam 0 ,mem_usb0_data_ready_report 
+5301 20600000 rtn 
+
+dongle_dispose_cmd_mode:
+5302 6fe086cb fetch 1 ,mem_usb0_set_report_data + 2 
+5303 c040d305 beq com_mode_bind ,dongle_enter_bind_mode 
+5304 20205300 branch dongle_usb0_data_ready_report_set0 
+
+dongle_enter_bind_mode:
+5305 2040499f call g24_bind_mode_enable 
+
+dongle_usb0_data_ready_report_set1:
+5306 70074c01 jam 1 ,mem_usb0_data_ready_report 
+5307 20600000 rtn 
+
+dongle_dispose_cmd_bind:
+5308 6fe086cb fetch 1 ,mem_usb0_set_report_data + 2 
+5309 c000d30d beq com_bind_get ,dongle_dispose_cmd_get_bind 
+530a c0425310 beq com_bind_exit ,dongle_dispose_cmd_exit_bind 
+530b c053d312 beq com_read_mode ,dongle_dispose_cmd_read_mode 
+530c 20205300 branch dongle_usb0_data_ready_report_set0 
+
+dongle_dispose_cmd_get_bind:
+530d 6fe0c51a fetch 1 ,mem_24g_bind_device_status 
+530e 67e0870a store 1 ,mem_usb0_get_report_data + 1 
+530f 20205306 branch dongle_usb0_data_ready_report_set1 
+
+dongle_dispose_cmd_exit_bind:
+5310 20404af2 call g24_work_mode_enable 
+5311 2020530d branch dongle_dispose_cmd_get_bind 
+
+dongle_dispose_cmd_read_mode:
+
+dongle_dispose_in_bind_mode:
+5312 70070aa1 jam command_bind ,mem_usb0_get_report_data + 1 
+5313 20205306 branch dongle_usb0_data_ready_report_set1 
+
+dongle_dispose_cmd_current_project:
+5314 70070a15 jam product_id ,mem_usb0_get_report_data + 1 
+5315 20205306 branch dongle_usb0_data_ready_report_set1 
+
+dongle_dispose_cmd_current_mode:
+5316 6fe0c559 fetch 1 ,mem_24g_work_mode 
+5317 c000531a beq dongle_work ,dongle_dispose_in_work_mode 
+5318 c000d312 beq dongle_bind ,dongle_dispose_in_bind_mode 
+5319 20600000 rtn 
+
+dongle_dispose_in_work_mode:
+531a 70070aa0 jam command_mode ,mem_usb0_get_report_data + 1 
+531b 20205306 branch dongle_usb0_data_ready_report_set1 
+
+dongle_dispose_cmd_current_fw_version:
+531c 70070a00 jam fw_version0 ,mem_usb0_get_report_data + 1 
+531d 70070b00 jam fw_version1 ,mem_usb0_get_report_data + 2 
+531e 70070c01 jam fw_version2 ,mem_usb0_get_report_data + 3 
+531f 70070d07 jam fw_version3 ,mem_usb0_get_report_data + 4 
+5320 20205306 branch dongle_usb0_data_ready_report_set1 
+
+dongle_auto_bind:
+5321 20404a95 call g24_mode_switch_init 
+
+dongle_auto_bind_loop:
+5322 20404a9a call g24_mode_switch_bind_work 
+5323 20404ac0 call g24_mode_switch_bind_search 
+5324 20405329 call dongle_work_mode_auto 
+5325 20404afa call g24_bind_mode_auto 
+5326 20404b17 call g24_search_mode_auto 
+5327 204052ed call dongle_usb_dispatch 
+5328 20205322 branch dongle_auto_bind_loop 
+
+dongle_work_mode_auto:
+5329 449bc006 bpatch patch06_7 ,mem_patch06 
+532a 6fe0c559 fetch 1 ,mem_24g_work_mode 
+532b c1800000 rtnne dongle_work 
+532c 20404af5 call g24_work_mode_start 
+532d 204052b9 call dongle_g24_blank_data_process 
+532e 6fe0c553 fetch 1 ,mem_24g_pair_mode 
+532f 247a0000 nrtn blank 
+5330 20204b99 branch g24_nodata_process 
+
+dongle_ackpayload_prep:
+5331 6fe0c4cf fetch 1 ,mem_24g_data_type 
+5332 c000d334 beq datatype_device1 ,dongle_ackpayload_prep_mouse 
+5333 c001533d beq datatype_device2 ,dongle_ackpayload_prep_keyboard 
+
+dongle_ackpayload_prep_mouse:
+5334 6fe0c5d5 fetch 1 ,mem_dg_pc_sleep_flag 
+5335 c2805343 bbit1 0 ,dongle_pc_sleep_ackpayload_prep_mouse 
+5336 2020533f branch dongle_ackpayload_prep_end 
+
+dongle_set_pc_sleep_flag:
+5337 6fe0c095 fetch 1 ,mem_device_option 
+5338 c1820000 rtnne dvc_op_dongle 
+5339 7045d503 jam 3 ,mem_dg_pc_sleep_flag 
+533a 20600000 rtn 
+
+dongle_clear_pc_sleep_flag:
+533b 7045d500 jam 0 ,mem_dg_pc_sleep_flag 
+533c 20600000 rtn 
+
+dongle_ackpayload_prep_keyboard:
+533d 6fe0c5d5 fetch 1 ,mem_dg_pc_sleep_flag 
+533e c280d347 bbit1 1 ,dongle_pc_sleep_ackpayload_prep_keyboard 
+
+dongle_ackpayload_prep_end:
+533f 6fe0c554 fetch 1 ,mem_24g_ackpayload_enable 
+5340 c000d34e beq bind_ackpayload ,dongle_g24_bind_ackpayload_prep 
+5341 c001d352 beq kb_led_ackpayload ,dongle_g24_kb_led_ackpayload_prep 
+5342 20600000 rtn 
+
+dongle_pc_sleep_ackpayload_prep_mouse:
+5343 6fe0c5d5 fetch 1 ,mem_dg_pc_sleep_flag 
+5344 793ffe00 set0 0 ,pdata 
+5345 67e0c5d5 store 1 ,mem_dg_pc_sleep_flag 
+5346 2020534a branch dongle_pc_sleep_ackpayload_prep 
+
+dongle_pc_sleep_ackpayload_prep_keyboard:
+5347 6fe0c5d5 fetch 1 ,mem_dg_pc_sleep_flag 
+5348 793ffe01 set0 1 ,pdata 
+5349 67e0c5d5 store 1 ,mem_dg_pc_sleep_flag 
+
+dongle_pc_sleep_ackpayload_prep:
+534a 7044ce01 jam 0x01 ,mem_24g_datalen 
+534b 580000ff setarg 0xff 
+534c 67e0c45f store 1 ,mem_24g_txbuf 
+534d 20600000 rtn 
+
+dongle_g24_bind_ackpayload_prep:
+534e 70455401 jam 1 ,mem_24g_ackpayload_enable 
+534f 20404a13 call g24_binding_device_check 
+5350 24778000 nrtn user3 
+5351 202049ab branch g24_bind_ackpayload_prep 
+
+dongle_g24_kb_led_ackpayload_prep:
+5352 6fe0c43f fetch 1 ,mem_24g_rxbuf + 2 
+5353 c000d34e beq datatype_device1 ,dongle_g24_bind_ackpayload_prep 
+5354 c07fd34e beq datatype_attemp ,dongle_g24_bind_ackpayload_prep 
+5355 70074d00 jam 0 ,mem_usb_tx_win_enable 
+5356 7044ce01 jam 0x01 ,mem_24g_datalen 
+5357 6fe0c564 fetch 1 ,mem_24g_led_status 
+5358 67e0c45f store 1 ,mem_24g_txbuf 
+5359 20600000 rtn 
+
+dongle_g24_mouse:
+535a 58000001 setarg ms_report_id 
+535b 67e08767 store 1 ,mem_usb_mouse_data 
+535c 6fe3c52e fetch 7 ,mem_24g_rxdata_temp + 3 
+535d e7e38005 istore 7 ,contw 
+535e 6fe0c52e fetch 1 ,mem_24g_rxdata_temp + 3 
+535f 245a5363 ncall dongle_g24_ms_enable_blank_data_forcibly ,blank 
+5360 6fe0c52e fetch 1 ,mem_24g_rxdata_temp + 3 
+5361 205a5367 call dongle_g24_ms_disable_blank_data_forcibly ,blank 
+5362 202052c7 branch dongle_usb_tx_ms_data 
+
+dongle_g24_ms_enable_blank_data_forcibly:
+5363 7045aa01 jam 1 ,mem_dg_ms_blank_data_enable 
+5364 58000180 setarg timer_ms_blank_delay 
+5365 d8e0000d arg g24_timer_ms_blank ,queue 
+5366 2020754f branch timer_init 
+
+dongle_g24_ms_disable_blank_data_forcibly:
+5367 7045aa00 jam 0 ,mem_dg_ms_blank_data_enable 
+5368 58000000 setarg 0 
+5369 d8e0000d arg g24_timer_ms_blank ,queue 
+536a 2020754f branch timer_init 
+
+dongle_g24_kb:
+536b 6fe0c52e fetch 1 ,mem_24g_rxdata_temp + 3 
+536c c0005370 beq 0 ,dongle_g24_kb_type0 
+536d c00153a3 beq 2 ,dongle_g24_kb_type2 
+536e c001d38b beq 3 ,dongle_g24_kb_type3 
+536f 20204a54 branch g24_rx_interrupt_clear 
+
+dongle_g24_kb_type0:
+5370 6fe0c530 fetch 1 ,mem_24g_rxdata_temp + 5 
+5371 67e0c554 store 1 ,mem_24g_ackpayload_enable 
+5372 70453000 jam 0 ,mem_24g_rxdata_temp + 5 
+5373 d8a00777 arg mem_usb_kb_data ,contw 
+5374 d8c0452f arg mem_24g_rxdata_temp + 4 ,contr 
+5375 df200008 arg 8 ,loopcnt 
+5376 20407548 call memcpy 
+5377 6fe40777 fetch 8 ,mem_usb_kb_data 
+5378 245a5383 ncall dongle_g24_kb_enable_blank_data_forcibly ,blank 
+5379 6fe40777 fetch 8 ,mem_usb_kb_data 
+537a 205a5387 call dongle_g24_kb_disable_blank_data_forcibly ,blank 
+537b 6fe40777 fetch 8 ,mem_usb_kb_data 
+537c 67e4458c store 8 ,mem_dg_kb_data_sta_data 
+537d 684c4594 fetcht 8 ,mem_dg_kb_data_last_data 
+537e 98467c00 isub temp ,null 
+537f 2442d2d9 ncall dongle_usb_tx_enable_ep1 ,zero 
+5380 6fe4458c fetch 8 ,mem_dg_kb_data_sta_data 
+5381 67e44594 store 8 ,mem_dg_kb_data_last_data 
+5382 20204a54 branch g24_rx_interrupt_clear 
+
+dongle_g24_kb_enable_blank_data_forcibly:
+5383 7045a801 jam 1 ,mem_dg_kb_blank_data_enable 
+5384 58000180 setarg timer_kb_blank_delay 
+5385 d8e0000e arg g24_timer_kb_blank ,queue 
+5386 2020754f branch timer_init 
+
+dongle_g24_kb_disable_blank_data_forcibly:
+5387 7045a800 jam 0 ,mem_dg_kb_blank_data_enable 
+5388 58000000 setarg 0 
+5389 d8e0000e arg g24_timer_kb_blank ,queue 
+538a 2020754f branch timer_init 
+
+dongle_g24_kb_type3:
+538b d8a00787 arg mem_usb_kb_multikey ,contw 
+538c d8c0452e arg mem_24g_rxdata_temp + 3 ,contr 
+538d df200003 arg 3 ,loopcnt 
+538e 20407548 call memcpy 
+538f 6fe10788 fetch 2 ,mem_usb_kb_multikey + 1 
+5390 245a539b ncall dongle_g24_kb_mul_enable_blank_data_forcibly ,blank 
+5391 6fe10788 fetch 2 ,mem_usb_kb_multikey + 1 
+5392 205a539f call dongle_g24_kb_mul_disable_blank_data_forcibly ,blank 
+5393 6fe18787 fetch 3 ,mem_usb_kb_multikey 
+5394 67e1c59c store 3 ,mem_dg_kb_multikey_sta_data 
+5395 6849c59f fetcht 3 ,mem_dg_kb_multikey_last_data 
+5396 98467c00 isub temp ,null 
+5397 2442d2eb ncall dongle_usb_tx_multikey_data ,zero 
+5398 6fe1c59c fetch 3 ,mem_dg_kb_multikey_sta_data 
+5399 67e1c59f store 3 ,mem_dg_kb_multikey_last_data 
+539a 20204a54 branch g24_rx_interrupt_clear 
+
+dongle_g24_kb_mul_enable_blank_data_forcibly:
+539b 7045a901 jam 1 ,mem_dg_kb_mul_blank_data_enable 
+539c 58000180 setarg timer_kb_mul_blank_delay 
+539d d8e0000c arg g24_timer_kb_mul_blank ,queue 
+539e 2020754f branch timer_init 
+
+dongle_g24_kb_mul_disable_blank_data_forcibly:
+539f 7045a900 jam 0 ,mem_dg_kb_mul_blank_data_enable 
+53a0 58000000 setarg 0 
+53a1 d8e0000c arg g24_timer_kb_mul_blank ,queue 
+53a2 2020754f branch timer_init 
+
+dongle_g24_kb_type2:
+53a3 d8a00797 arg mem_usb_kb_system ,contw 
+53a4 d8c0452e arg mem_24g_rxdata_temp + 3 ,contr 
+53a5 df200002 arg 2 ,loopcnt 
+53a6 20407548 call memcpy 
+53a7 6fe10797 fetch 2 ,mem_usb_kb_system 
+53a8 245a53b3 ncall dongle_g24_kb_sys_enable_blank_data_forcibly ,blank 
+53a9 6fe10797 fetch 2 ,mem_usb_kb_system 
+53aa 205a53b7 call dongle_g24_kb_sys_disable_blank_data_forcibly ,blank 
+53ab 6fe10797 fetch 2 ,mem_usb_kb_system 
+53ac 67e145a2 store 2 ,mem_dg_kb_system_sta_data 
+53ad 684945a5 fetcht 2 ,mem_dg_kb_system_last_data 
+53ae 98467c00 isub temp ,null 
+53af 2442d3bb ncall dongle_usb_tx_sys_data ,zero 
+53b0 6fe145a2 fetch 2 ,mem_dg_kb_system_sta_data 
+53b1 67e145a5 store 2 ,mem_dg_kb_system_last_data 
+53b2 20204a54 branch g24_rx_interrupt_clear 
+
+dongle_g24_kb_sys_enable_blank_data_forcibly:
+53b3 7045a901 jam 1 ,mem_dg_kb_mul_blank_data_enable 
+53b4 58000180 setarg timer_kb_mul_blank_delay 
+53b5 d8e0000c arg g24_timer_kb_mul_blank ,queue 
+53b6 2020754f branch timer_init 
+
+dongle_g24_kb_sys_disable_blank_data_forcibly:
+53b7 7045a900 jam 0 ,mem_dg_kb_mul_blank_data_enable 
+53b8 58000000 setarg 0 
+53b9 d8e0000c arg g24_timer_kb_mul_blank ,queue 
+53ba 2020754f branch timer_init 
+
+dongle_usb_tx_sys_data:
+53bb 70076022 jam usb_ep2_systemkey ,mem_usb_ep2_data 
+53bc 202052c8 branch dongle_usb_tx_enable_ep2 
+
+dongle_g24_store_dvc2_bind_flag:
+53bd 6fe0c095 fetch 1 ,mem_device_option 
+53be c1820000 rtnne dvc_op_dongle 
+53bf 6fe0c58b fetch 1 ,mem_dg_kb_bind_flag 
+53c0 c12d0000 rtneq dongle_kb_bind_success 
+
+dongle_prep_soft_reset:
+53c1 7045d401 jam 1 ,mem_dg_kb_bind_success 
+53c2 20600000 rtn 
+
+dongle_kb_bind_soft_reset:
+53c3 6fe0c095 fetch 1 ,mem_device_option 
+53c4 c1820000 rtnne dvc_op_dongle 
+53c5 6fe0c5d4 fetch 1 ,mem_dg_kb_bind_success 
+53c6 207a0000 rtn blank 
+53c7 7004cc00 jam 0 ,mem_temp 
+
+dongle_wirte_efuse_bind_status:
+53c8 70458b5a jam dongle_kb_bind_success ,mem_dg_kb_bind_flag 
+53c9 20405286 call dongle_write_kb_bind_status 
+53ca 20405281 call dongle_read_kb_bind_status 
+53cb 6fe084cc fetch 1 ,mem_temp 
+53cc 1fe0fe01 increase 1 ,pdata 
+53cd 67e084cc store 1 ,mem_temp 
+53ce c07fe9f6 beq 0xff ,soft_reset_chip 
+53cf 6fe0c58b fetch 1 ,mem_dg_kb_bind_flag 
+53d0 c0ad53c8 bne dongle_kb_bind_success ,dongle_wirte_efuse_bind_status 
+53d1 202069f6 branch soft_reset_chip 
+
+module_init:
+53d2 2035d3f6 branch module_lpm_init ,wake 
+53d3 2040412d call le_modified_name 
+53d4 58005400 setarg module_process_idle 
+53d5 67e14390 store 2 ,mem_cb_idle_process 
+53d6 58005403 setarg module_process_bb_event 
+53d7 67e14392 store 2 ,mem_cb_bb_event_process 
+53d8 580053fc setarg module_lpm_lock 
+53d9 67e14388 store 2 ,mem_cb_check_wakelock 
+53da 580054b7 setarg module_hci_cmd_transmit_le_notify 
+53db 67e14396 store 2 ,mem_cb_ble_transmit 
+53dc 580056c0 setarg module_le_receive_data 
+53dd 67e14394 store 2 ,mem_cb_att_write 
+53de 580056d1 setarg module_bb_event_timer 
+53df 67e14398 store 2 ,mem_cb_event_timer 
+53e0 449c4007 bpatch patch07_0 ,mem_patch07 
+53e1 204053e4 call module_lpm_uart_init 
+53e2 204053f7 call module_gpio_init 
+53e3 20205651 branch module_hci_event_enter_standby_mode 
+
+module_lpm_uart_init:
+53e4 6ff08060 fetch 1 ,core_uart_ctrl 
+53e5 793ffe00 set0 bit_uart_control_enable ,pdata 
+53e6 67f08060 store 1 ,core_uart_ctrl 
+53e7 6fe44446 fetch 8 ,mem_module_uart_rx_buffer 
+53e8 20406acd call uarta_init_dma_mem 
+53e9 6fe1444e fetch uart_baud_len ,mem_module_uarta_baud_rate 
+53ea 20406ad8 call uarta_init_baud_rate 
+53eb 20406ae7 call uart_clock_select_main_freq_crystal 
+53ec 70807508 jam gpcfg_uart_txd ,core_gpio_conf + hci_uart_tx_gpio_num 
+53ed 70807649 jam gpcfg_uart_rxd | gpcfg_pullup ,core_gpio_conf + hci_uart_rx_gpio_num 
+53ee 7080790a jam gpcfg_uart_rts ,core_gpio_conf + hci_uart_rts_gpio_num 
+53ef 70807a0b jam gpcfg_uart_cts ,core_gpio_conf + hci_uart_cts_gpio_num 
+53f0 d8400081 arg fun_uart_control_enable | fun_uart_control_setting_rate_baud ,temp 
+53f1 6fe14455 fetch 2 ,mem_module_flag 
+53f2 2feffe00 isolate1 module_flag_uart_flow_control ,pdata 
+53f3 79208404 setflag true ,bit_uart_control_flow_control ,temp 
+53f4 60588060 storet 1 ,core_uart_ctrl 
+53f5 20600000 rtn 
+
+module_lpm_init:
+53f6 202053e4 branch module_lpm_uart_init 
+
+module_gpio_init:
+53f7 6848c43b fetcht 1 ,mem_module_connect_state_gpio 
+53f8 20406c43 call gpio_config_output 
+53f9 20405425 call module_set_conn_pin_low 
+53fa 6848c439 fetcht 1 ,mem_module_wake_up_gpio 
+53fb 20206c29 branch gpio_config_input 
+
+module_lpm_lock:
+53fc 6848c439 fetcht 1 ,mem_module_wake_up_gpio 
+53fd 20406c32 call gpio_get_bit 
+53fe 2420ce0b nbranch app_put_lpm_wake_lock ,true 
+53ff 20204e09 branch app_get_lpm_wake_lock 
+
+module_process_idle:
+5400 204066a4 call l2cap_malloc_is_fifo_full 
+5401 247a0000 nrtn blank 
+5402 20205427 branch module_process_check_hci_command_complete 
+
+module_process_bb_event:
+5403 1a627e00 copy regc ,pdata 
+5404 c00a5414 beq bt_evt_le_connected ,module_process_le_conn 
+5405 c00ad410 beq bt_evt_le_disconnected ,module_process_bb_even_le_disconn 
+5406 c0185685 beq bt_evt_le_pairing_fail ,module_hci_event_le_pairing_fail 
+5407 c018d687 beq bt_evt_le_pairing_success ,module_hci_event_le_pairing_success 
+5408 c0195691 beq bt_evt_le_start_enc ,module_hci_event_start_enc 
+5409 c019d68f beq bt_evt_le_pause_enc ,module_hci_event_pause_enc 
+540a c01a567f beq bt_evt_le_tk_generate ,module_hci_event_le_tk 
+540b c01ed665 beq bt_evt_store_nvram ,module_hci_event_store_device 
+540c c020d41a beq bt_evt_le_ltk_lost ,module_process_ble_ltk_lost 
+540d c021541c beq bt_evt_le_update_phy ,module_process_ble_update_phy 
+540e c021d67d beq bt_evt_le_get_passkey ,module_hci_event_passkey_entry_mode 
+540f 20600000 rtn 
+
+module_process_bb_even_le_disconn:
+5410 204041a4 call le_clr_config_more_data 
+5411 70445700 jam 0 ,mem_module_hci_notify_len 
+5412 20405418 call module_disconn_start 
+5413 20205637 branch module_hci_event_le_disconnect 
+
+module_process_le_conn:
+5414 2040541f call module_conn_start 
+5415 6fe0c444 fetch 1 ,mem_module_le_lpm_mult 
+5416 67e0c0c1 store 1 ,mem_lpm_mult 
+5417 20205635 branch module_hci_event_le_connect 
+
+module_disconn_start:
+5418 20405480 call module_start_adv_discovery_by_command 
+5419 2020541d branch module_set_conn_pin_high 
+
+module_process_ble_ltk_lost:
+541a 204047a8 call le_send_reject_ind 
+541b 20204621 branch le_send_smp_security_request 
+
+module_process_ble_update_phy:
+541c 202056a1 branch module_hci_event_le_update_phy 
+
+module_set_conn_pin_high:
+541d 6848c43b fetcht 1 ,mem_module_connect_state_gpio 
+541e 20206c43 branch gpio_out_active 
+
+module_conn_start:
+541f 20405421 call module_stop_adv_discovery 
+5420 20205425 branch module_set_conn_pin_low 
+
+module_stop_adv_discovery:
+5421 6fe0c43e fetch 1 ,mem_module_state 
+5422 2feffe01 isolate1 moudle_state_ble_bit ,pdata 
+5423 2040ce16 call app_ble_stop_adv ,true 
+5424 20600000 rtn 
+
+module_set_conn_pin_low:
+5425 6848c43b fetcht 1 ,mem_module_connect_state_gpio 
+5426 20206c3f branch gpio_out_inactive 
+
+module_process_check_hci_command_complete:
+5427 6ff0810b fetch 1 ,core_uart_status 
+5428 c3810000 rtnbit1 uart_status_rx_fifo_empty 
+5429 20406afb call uarta_prepare_rx 
+542a efe08003 ifetch 1 ,contru 
+542b c080d43d bne 0x01 ,module_hci_in_excp 
+542c 6ff10112 fetch 2 ,core_uart_rxitems 
+542d 1fe67c02 sub pdata ,2 ,null 
+542e 20610000 rtn positive 
+542f efe08003 ifetch 1 ,contru 
+5430 67e08537 store 1 ,mem_module_uart_opcode 
+5431 e8408003 ifetcht 1 ,contru 
+5432 18622200 copy contru ,rega 
+5433 60488538 storet 1 ,mem_module_uart_len 
+5434 18408403 add temp ,3 ,temp 
+5435 6ff10112 fetch 2 ,core_uart_rxitems 
+5436 98460400 isub temp ,temp 
+5437 24610000 nrtn positive 
+5438 70053901 jam hci_discard_packet ,mem_module_temp_nl_discard_packet 
+5439 2040544b call module_hci_cmd_control 
+543a 6fe08539 fetch 1 ,mem_module_temp_nl_discard_packet 
+543b c1000000 rtneq hci_not_discard_packet 
+543c 20205446 branch module_hci_dicard_packet 
+
+module_hci_in_excp:
+543d 204074fb call delay_10ms 
+543e 2040566e call module_hci_event_invalid_packet 
+543f 20205440 branch module_hci_release_except 
+
+module_hci_release_except:
+5440 449cc007 bpatch patch07_1 ,mem_patch07 
+5441 20406afb call uarta_prepare_rx 
+5442 6ff10112 fetch 2 ,core_uart_rxitems 
+5443 207a0000 rtn blank 
+5444 98608600 iadd contru ,contru 
+5445 2020544a branch module_hci_dicard_bytes 
+
+module_hci_dicard_packet:
+5446 20406afb call uarta_prepare_rx 
+5447 18608602 increase 2 ,contu 
+5448 efe08003 ifetch 1 ,contu 
+5449 98608600 iadd contu ,contu 
+
+module_hci_dicard_bytes:
+544a 20206b01 branch uarta_rxdone 
+
+module_hci_cmd_control:
+544b 449d4007 bpatch patch07_2 ,mem_patch07 
+544c 6fe08537 fetch 1 ,mem_module_uart_opcode 
+544d c000d474 beq hci_cmd_set_le_addr_req ,module_hci_cmd_set_le_addr 
+544e c0015479 beq hci_cmd_set_visibility_req ,module_hci_cmd_set_visibility 
+544f c0025487 beq hci_cmd_set_le_name_req ,module_hci_cmd_set_le_name 
+5450 c004d48b beq hci_cmd_le_data_req ,module_hci_cmd_receive_le_data 
+5451 c005d4e2 beq hci_cmd_status_irq ,module_hci_cmd_inquire_status 
+5452 c00754e3 beq hci_cmd_set_uartcontrol_req ,module_hci_cmd_set_uart_control_mode 
+5453 c007d4eb beq hci_cmd_set_uart_baud_req ,module_hci_cmd_set_uart_baud 
+5454 c00854f3 beq hci_cmd_version_req ,module_hci_cmd_version_request 
+5455 c00954f7 beq hci_cmd_ble_disconnect ,module_hci_cmd_ble_disconnect 
+5456 c01354fb beq hci_cmd_set_nvram_req ,module_hci_cmd_set_nvram 
+5457 c0145500 beq hci_cmd_confirm_gkey ,module_hci_cmd_confirm_gkey 
+5458 c0155503 beq hci_cmd_auto_adv_scan ,module_hci_cmd_auto_adv 
+5459 c015d536 beq hci_cmd_power_req ,module_hci_cmd_power_request 
+545a c016553c beq hci_cmd_power_set ,module_hci_cmd_power_set 
+545b c0185543 beq hci_cmd_passkey_entry ,module_hci_cmd_passkey_entry 
+545c c018d548 beq hci_cmd_set_gpio ,module_hci_cmd_set_gpio 
+545d c0195559 beq hci_cmd_read_gpio ,module_hci_cmd_read_gpio 
+545e c019d564 beq hci_cmd_le_set_pairing ,module_hci_cmd_le_set_pairing_mode 
+545f c01a5579 beq hci_cmd_le_set_adv_data ,module_hci_cmd_le_set_adv_data 
+5460 c01ad57c beq hci_cmd_le_set_scan_data ,module_hci_cmd_le_set_scan_data 
+5461 c01b5585 beq hci_cmd_le_send_conn_update_req ,module_hci_cmd_le_send_conn_update_req 
+5462 c01bd58e beq hci_cmd_le_set_adv_parm ,module_hci_cmd_set_le_adv_parameter 
+5463 c01c5591 beq hci_cmd_le_start_pairing ,module_hci_cmd_le_start_pairing 
+5464 c0205599 beq hci_cmd_set_wake_gpio ,module_hci_cmd_set_wake_gpio 
+5465 c02155a3 beq hci_cmd_set_tx_power ,module_hci_cmd_set_tx_power 
+5466 c02455a8 beq hci_cmd_le_confirm_gkey ,module_hci_cmd_le_confirm_gkey 
+5467 c028d5b3 beq hci_cmd_reset_chip_req ,module_hci_cmd_reset_chip 
+5468 c030d5b7 beq hci_cmd_le_set_fixed_passkey ,module_hci_cmd_le_set_fixed_passkey 
+5469 c03b55c6 beq hci_cmd_delete_customize_service ,module_hci_cmd_delete_customize_service 
+546a c03bd5cc beq hci_cmd_add_service_uuid ,module_hci_cmd_add_service_uuid 
+546b c03c55d1 beq hci_cmd_add_characteristic_uuid ,module_hci_cmd_add_characteristic_uuid 
+546c c03d5607 beq hci_cmd_passkey_entry_input ,module_hci_cmd_le_passkey_entry_input 
+546d c0485615 beq hci_cmd_ble_set_phy ,module_hci_cmd_ble_set_phy 
+546e c048d61a beq hci_cmd_ble_read_current_phy ,module_hci_cmd_ble_read_current_phy 
+546f c049561e beq hci_cmd_ble_set_dle ,module_hci_cmd_ble_set_dle 
+5470 c049d623 beq hci_cmd_read_chip_data ,module_hci_cmd_read_chip_data 
+5471 c04a5627 beq hci_cmd_write_chip_data ,module_hci_cmd_write_chip_data 
+5472 c07fd62d beq hci_cmd_close_lpm ,module_hci_cmd_close_lpm 
+5473 2020562f branch module_hci_event_receive_invalid_cmd 
+
+module_hci_cmd_set_le_addr:
+5474 6fe08538 fetch 1 ,mem_module_uart_len 
+5475 c083562f bne 6 ,module_hci_event_receive_invalid_cmd 
+5476 efe30003 ifetch 6 ,contru 
+5477 67e342ae store 6 ,mem_le_lap 
+5478 20205632 branch module_hci_event_receive_valid_cmd 
+
+module_hci_cmd_set_visibility:
+5479 6fe08538 fetch 1 ,mem_module_uart_len 
+547a c080d62f bne 1 ,module_hci_event_receive_invalid_cmd 
+547b e8408003 ifetcht 1 ,contru 
+547c 6048c445 storet 1 ,mem_module_bluetooth_stauts_by_command 
+547d 20405632 call module_hci_event_receive_valid_cmd 
+547e 6fe1442f fetch 2 ,mem_ui_state_map 
+547f c3848000 rtnbit1 ui_state_ble_connected 
+
+module_start_adv_discovery_by_command:
+
+moudle_start_adv_by_command:
+5480 6fe0c43e fetch 1 ,mem_module_state 
+5481 2feffe01 isolate1 moudle_state_ble_bit ,pdata 
+5482 24608000 nrtn true 
+5483 6848c445 fetcht 1 ,mem_module_bluetooth_stauts_by_command 
+5484 284ffe02 isolate1 2 ,temp 
+5485 2020ce18 branch app_ble_start_adv ,true 
+5486 20204e16 branch app_ble_stop_adv 
+
+module_hci_cmd_set_le_name:
+5487 dfe0001d arg 29 ,pdata 
+5488 d8a0422b arg mem_le_name_len ,contw 
+5489 2040557f call module_hci_cmd_receive_store_mem 
+548a 2020412d branch le_modified_name 
+
+module_hci_cmd_receive_le_data:
+548b 6fe1442f fetch 2 ,mem_ui_state_map 
+548c c304d62f bbit0 ui_state_ble_connected ,module_hci_event_receive_invalid_cmd 
+548d 204054df call module_check_ble_encrypt_state 
+548e 2034562f branch module_hci_event_receive_invalid_cmd ,user 
+548f 70053900 jam hci_not_discard_packet ,mem_module_temp_nl_discard_packet 
+5490 6fe14455 fetch 2 ,mem_module_flag 
+5491 c28454b0 bbit1 module_flag_ble_data_finish ,module_hci_cmd_receive_le_data_finish 
+5492 6fe0c457 fetch 1 ,mem_module_hci_notify_len 
+5493 247a0000 nrtn blank 
+5494 70053901 jam hci_discard_packet ,mem_module_temp_nl_discard_packet 
+5495 efe10003 ifetch 2 ,contru 
+5496 67e14458 store 2 ,mem_module_hci_notify_handle 
+5497 6061445a storer contru ,2 ,mem_module_hci_nofiy_addr 
+5498 6fe08538 fetch 1 ,mem_module_uart_len 
+5499 1fe0fffe pincrease -2 
+549a 2421562f nbranch module_hci_event_receive_invalid_cmd ,positive 
+549b 2022d62f branch module_hci_event_receive_invalid_cmd ,zero 
+549c 67e0c457 store 1 ,mem_module_hci_notify_len 
+549d 68494458 fetcht 2 ,mem_module_hci_notify_handle 
+549e 184085ff increase -1 ,temp 
+549f 204040e9 call le_att_get_handle_ptr2 
+54a0 203a54b3 branch module_hci_cmd_transmit_handle_error ,blank 
+54a1 e8420006 ifetcht 4 ,contr 
+54a2 59280302 setarg 0x01280302 
+54a3 98467c00 isub temp ,null 
+54a4 2422d4b3 nbranch module_hci_cmd_transmit_handle_error ,zero 
+54a5 efe08006 ifetch 1 ,contr 
+54a6 67e0c45c store 1 ,mem_module_hci_notify_type 
+54a7 1fe17e30 and_into 0x30 ,pdata 
+54a8 203a54b3 branch module_hci_cmd_transmit_handle_error ,blank 
+54a9 70053900 jam hci_not_discard_packet ,mem_module_temp_nl_discard_packet 
+54aa 204041a2 call le_set_config_more_data 
+54ab 204054b7 call module_hci_cmd_transmit_le_notify 
+54ac 204054b7 call module_hci_cmd_transmit_le_notify 
+54ad 204054b7 call module_hci_cmd_transmit_le_notify 
+54ae 6fe14455 fetch 2 ,mem_module_flag 
+54af c4040000 rtnbit0 module_flag_ble_data_finish 
+
+module_hci_cmd_receive_le_data_finish:
+54b0 70053901 jam hci_discard_packet ,mem_module_temp_nl_discard_packet 
+54b1 204056e3 call module_clear_le_tx_data_flag 
+54b2 20205632 branch module_hci_event_receive_valid_cmd 
+
+module_hci_cmd_transmit_handle_error:
+54b3 70445700 jam 0 ,mem_module_hci_notify_len 
+54b4 70053901 jam hci_discard_packet ,mem_module_temp_nl_discard_packet 
+54b5 204056e3 call module_clear_le_tx_data_flag 
+54b6 2020562f branch module_hci_event_receive_invalid_cmd 
+
+module_hci_cmd_transmit_le_notify:
+54b7 6fe0c457 fetch 1 ,mem_module_hci_notify_len 
+54b8 207a0000 rtn blank 
+54b9 20404203 call le_fifo_check_nearly_full 
+54ba 247a0000 nrtn blank 
+54bb 204054da call module_get_le_remote_mtu 
+54bc 449dc007 bpatch patch07_3 ,mem_patch07 
+54bd 6fe142b4 fetch 2 ,mem_le_local_mtu 
+54be 2040762c call not_greater_than 
+54bf 1fe20400 copy pdata ,temp 
+54c0 6fe0c369 fetch 1 ,mem_le_l2cap_att_states 
+54c1 c3800000 rtnbit1 ble_l2cap_recv_confirmation_packet 
+54c2 1840fffd add temp ,-3 ,pdata 
+54c3 d84000fb arg 251 ,temp 
+54c4 2040762c call not_greater_than 
+54c5 6848c457 fetcht 1 ,mem_module_hci_notify_len 
+54c6 2040762c call not_greater_than 
+54c7 1fe22200 copy pdata ,rega 
+54c8 18427e00 copy temp ,pdata 
+54c9 9a267e00 isub rega ,pdata 
+54ca 67e0c457 store 1 ,mem_module_hci_notify_len 
+54cb 204054d5 call module_hci_cmd_transmit_le_notify_malloc_l2cap 
+54cc 6fe1445a fetch 2 ,mem_module_hci_nofiy_addr 
+54cd 1fe20600 copy pdata ,contru 
+54ce 1a227200 copy rega ,loopcnt 
+54cf 20406b2c call uart_copy_rx_bytes_fast 
+54d0 18627e00 copy contru ,pdata 
+54d1 67e1445a store 2 ,mem_module_hci_nofiy_addr 
+54d2 6fe0c457 fetch 1 ,mem_module_hci_notify_len 
+54d3 247a0000 nrtn blank 
+54d4 202056e1 branch module_set_le_tx_data_flag 
+
+module_hci_cmd_transmit_le_notify_malloc_l2cap:
+54d5 68494458 fetcht 2 ,mem_module_hci_notify_handle 
+54d6 6fe0c45c fetch 1 ,mem_module_hci_notify_type 
+54d7 c282c54f bbit1 bit_characteristic_indicate ,le_att_malloc_tx_indication 
+54d8 c2824546 bbit1 bit_characteristic_notify ,le_att_malloc_tx_notify 
+54d9 20600000 rtn 
+
+module_get_le_remote_mtu:
+54da d8400017 arg 0x17 ,temp 
+54db 6fe14455 fetch 2 ,mem_module_flag 
+54dc c3808000 rtnbit1 module_flag_ble_send_mtu23 
+54dd 684942b6 fetcht 2 ,mem_le_remote_mtu 
+54de 20600000 rtn 
+
+module_check_ble_encrypt_state:
+54df 6fe14455 fetch 2 ,mem_module_flag 
+54e0 c281451f bbit1 module_flag_ble_data_encrypt ,le_check_encrypt_state 
+54e1 20207638 branch disable_user 
+
+module_hci_cmd_inquire_status:
+54e2 20205655 branch module_hci_event_status_res 
+
+module_hci_cmd_set_uart_control_mode:
+54e3 efe08003 ifetch 1 ,contru 
+54e4 6848c455 fetcht 1 ,mem_module_flag 
+54e5 7d3a0400 nsetflag blank ,module_flag_uart_flow_control ,temp 
+54e6 6048c455 storet 1 ,mem_module_flag 
+54e7 68588060 fetcht 1 ,core_uart_ctrl 
+54e8 7d3a0404 nsetflag blank ,bit_uart_control_flow_control ,temp 
+54e9 60588060 storet 1 ,core_uart_ctrl 
+54ea 20205632 branch module_hci_event_receive_valid_cmd 
+
+module_hci_cmd_set_uart_baud:
+54eb 6f208538 fetchr loopcnt ,1 ,mem_module_uart_len 
+54ec 204075a1 call string2dec_from_uart 
+54ed 20406adc call uart_calc_baud_rate_config 
+54ee 67e1444e store uart_baud_len ,mem_module_uarta_baud_rate 
+54ef 20405632 call module_hci_event_receive_valid_cmd 
+54f0 204075e8 call wait_uarttx 
+54f1 6fe1444e fetch uart_baud_len ,mem_module_uarta_baud_rate 
+54f2 20206ad8 branch uarta_init_baud_rate 
+
+module_hci_cmd_version_request:
+54f3 da200002 arg 2 ,rega 
+54f4 da404437 arg mem_soft_version_num ,regb 
+54f5 d8400000 arg 0 ,temp 
+54f6 20205639 branch module_hci_event_set_cmd 
+
+module_hci_cmd_ble_disconnect:
+54f7 6fe1442f fetch 2 ,mem_ui_state_map 
+54f8 c304d62f bbit0 ui_state_ble_connected ,module_hci_event_receive_invalid_cmd 
+
+module_hci_cmd_ble_disconnect_doing:
+54f9 20405632 call module_hci_event_receive_valid_cmd 
+54fa 20204e20 branch app_ble_disconnect 
+
+module_hci_cmd_set_nvram:
+54fb 6f208538 fetchr loopcnt ,1 ,mem_module_uart_len 
+54fc 6fe143ad fetch 2 ,mem_nv_data_ptr 
+54fd 1fe20a00 icopy contw 
+54fe 20406b2c call uart_copy_rx_bytes_fast 
+54ff 20205632 branch module_hci_event_receive_valid_cmd 
+
+module_hci_cmd_confirm_gkey:
+5500 6fe1442f fetch 2 ,mem_ui_state_map 
+5501 c284d5a8 bbit1 ui_state_ble_connected ,module_hci_cmd_le_confirm_gkey 
+5502 2020562f branch module_hci_event_receive_invalid_cmd 
+
+module_hci_cmd_auto_adv:
+5503 df200040 arg 0x40 ,loopcnt 
+5504 d8a0431b arg mem_le_adv_data_len ,contw 
+5505 2040750f call clear_mem 
+5506 58000000 setarg 0 
+5507 67e084dc store 1 ,mem_regb 
+5508 1a220600 copy rega ,contru 
+
+module_hci_cmd_auto_adv_loop:
+5509 18627e00 copy contru ,pdata 
+550a 67e104e0 store 2 ,mem_regc 
+550b 20405531 call module_hci_cmd_auto_adv_adv_analys 
+550c 6fe084dc fetch 1 ,mem_regb 
+550d 684884cc fetcht 1 ,mem_temp 
+550e 18408401 increase 1 ,temp 
+550f 9840fe00 iadd temp ,pdata 
+5510 67e084dc store 1 ,mem_regb 
+5511 1fe67c1f sub pdata ,31 ,null 
+5512 2421551d nbranch module_hci_cmd_auto_adv_store_scan ,positive 
+
+module_hci_cmd_auto_adv_store_adv:
+5513 6848c31b fetcht 1 ,mem_le_adv_data_len 
+5514 5800431c setarg mem_le_adv_data 
+5515 9840fe00 iadd temp ,pdata 
+5516 67e104e5 store 2 ,mem_contw 
+5517 684884cc fetcht 1 ,mem_temp 
+5518 18408401 increase 1 ,temp 
+5519 6fe0c31b fetch 1 ,mem_le_adv_data_len 
+551a 9840fe00 iadd temp ,pdata 
+551b 67e0c31b store 1 ,mem_le_adv_data_len 
+551c 20205526 branch module_hci_cmd_auto_adv_store_common 
+
+module_hci_cmd_auto_adv_store_scan:
+551d 6848c33b fetcht 1 ,mem_le_scan_data_len 
+551e 5800433c setarg mem_le_scan_data 
+551f 9840fe00 iadd temp ,pdata 
+5520 67e104e5 store 2 ,mem_contw 
+5521 684884cc fetcht 1 ,mem_temp 
+5522 18408401 increase 1 ,temp 
+5523 6fe0c33b fetch 1 ,mem_le_scan_data_len 
+5524 9840fe00 iadd temp ,pdata 
+5525 67e0c33b store 1 ,mem_le_scan_data_len 
+
+module_hci_cmd_auto_adv_store_common:
+5526 6fe104e5 fetch 2 ,mem_contw 
+5527 1fe20a00 copy pdata ,contw 
+5528 6fe104e0 fetch 2 ,mem_regc 
+5529 1fe20600 copy pdata ,contru 
+552a 18427200 copy temp ,loopcnt 
+552b 20406b2c call uart_copy_rx_bytes_fast 
+552c 6fe08538 fetch 1 ,mem_module_uart_len 
+552d 684884dc fetcht 1 ,mem_regb 
+552e 98467c00 isub temp ,null 
+552f 2422d509 nbranch module_hci_cmd_auto_adv_loop ,zero 
+5530 20205632 branch module_hci_event_receive_valid_cmd 
+
+module_hci_cmd_auto_adv_adv_analys:
+5531 efe08003 ifetch 1 ,contru 
+5532 67e084cc store 1 ,mem_temp 
+5533 efe08003 ifetch 1 ,contru 
+5534 67e084d8 store 1 ,mem_rega 
+5535 20600000 rtn 
+
+module_hci_cmd_power_request:
+5536 d8400000 arg 0 ,temp 
+5537 da200002 arg 2 ,rega 
+5538 6fe14452 fetch 2 ,mem_module_vdd_quotient 
+5539 67e104f6 store 2 ,mem_event_cmd_response_content 
+553a da4004f6 arg mem_event_cmd_response_content ,regb 
+553b 20205639 branch module_hci_event_set_cmd 
+
+module_hci_cmd_power_set:
+553c 6fe08538 fetch 1 ,mem_module_uart_len 
+553d c080d62f bne 1 ,module_hci_event_receive_invalid_cmd 
+553e efe08003 ifetch 1 ,contru 
+553f 67e0c450 store 1 ,mem_module_read_vdd_flag 
+5540 58000000 setarg 0x00 
+5541 67e14452 store 2 ,mem_module_vdd_quotient 
+5542 20205632 branch module_hci_event_receive_valid_cmd 
+
+module_hci_cmd_passkey_entry:
+5543 6fe08538 fetch 1 ,mem_module_uart_len 
+5544 c082562f bne 4 ,module_hci_event_receive_invalid_cmd 
+5545 6fe1442f fetch 2 ,mem_ui_state_map 
+5546 c284d607 bbit1 ui_state_ble_connected ,module_hci_cmd_le_passkey_entry_input 
+5547 2020562f branch module_hci_event_receive_invalid_cmd 
+
+module_hci_cmd_set_gpio:
+5548 6fe08538 fetch 1 ,mem_module_uart_len 
+5549 c081d62f bne 3 ,module_hci_event_receive_invalid_cmd 
+554a efe08003 ifetch 1 ,contru 
+554b c000554e beq hci_cmd_config_gpio_input ,module_set_gpio_input 
+554c c000d554 beq hci_cmd_config_gpio_output ,module_set_gpio_output 
+554d 2020562f branch module_hci_event_receive_invalid_cmd 
+
+module_set_gpio_input:
+554e 20405632 call module_hci_event_receive_valid_cmd 
+554f e8408003 ifetcht 1 ,contru 
+5550 efe08003 ifetch 1 ,contru 
+5551 c0016c5b beq gpio_input_high_impedance ,gpio_set_high_impedance 
+5552 7d3a0407 nsetflag blank ,7 ,temp 
+5553 20206c29 branch gpio_config_input 
+
+module_set_gpio_output:
+5554 20405632 call module_hci_event_receive_valid_cmd 
+5555 e8408003 ifetcht 1 ,contru 
+5556 efe08003 ifetch 1 ,contru 
+5557 203a6c43 branch gpio_out_active ,blank 
+5558 20206c3f branch gpio_out_inactive 
+
+module_hci_cmd_read_gpio:
+5559 6fe08538 fetch 1 ,mem_module_uart_len 
+555a c080d62f bne 1 ,module_hci_event_receive_invalid_cmd 
+555b e8408003 ifetcht 1 ,contru 
+555c 20406c32 call gpio_get_bit 
+555d 58000000 setarg 0x0 
+555e 7d20fe00 nsetflag true ,0 ,pdata 
+555f da200001 arg 1 ,rega 
+5560 67e104f6 store 2 ,mem_event_cmd_response_content 
+5561 da4004f6 arg mem_event_cmd_response_content ,regb 
+5562 d8400000 arg 0 ,temp 
+5563 20205639 branch module_hci_event_set_cmd 
+
+module_hci_cmd_le_set_pairing_mode:
+5564 efe08003 ifetch 1 ,contru 
+5565 67e0c2d1 store 1 ,mem_le_pairing_mode 
+5566 6fe0c2d1 fetch 1 ,mem_le_pairing_mode 
+5567 c000556c beq le_pairing_mode_none ,module_le_set_no_pairing 
+5568 c000d56f beq le_pairing_mode_lagacy_justwork ,module_le_set_pairing_mode_lagacy_just_work 
+5569 c0015571 beq le_pairing_mode_lagacy_passkey ,module_le_set_pairing_mode_lagacy_passkey 
+556a c0025573 beq le_pairing_mode_lagacy_passkey_res_input ,module_le_set_pairing_mode_lagacy_passkey_res_input 
+556b 2020562f branch module_hci_event_receive_invalid_cmd 
+
+module_le_set_no_pairing:
+556c 70428700 jam flag_le_no_bonding_no_mitm ,mem_le_pres_auth 
+
+module_le_set_noinputnooutput:
+556d 70428503 jam flag_iocap_noinputnooutput ,mem_le_pres_iocap 
+556e 20205632 branch module_hci_event_receive_valid_cmd 
+
+module_le_set_pairing_mode_lagacy_just_work:
+556f 70428701 jam flag_le_bonding_no_mitm ,mem_le_pres_auth 
+5570 2020556d branch module_le_set_noinputnooutput 
+
+module_le_set_pairing_mode_lagacy_passkey:
+5571 70428705 jam flag_le_bonding_mitm ,mem_le_pres_auth 
+5572 20205577 branch module_le_set_displayonly 
+
+module_le_set_pairing_mode_lagacy_passkey_res_input:
+5573 70428705 jam flag_le_bonding_mitm ,mem_le_pres_auth 
+5574 20205575 branch module_le_set_keboadonly 
+
+module_le_set_keboadonly:
+5575 70428502 jam flag_iocap_keyboardonly ,mem_le_pres_iocap 
+5576 20205632 branch module_hci_event_receive_valid_cmd 
+
+module_le_set_displayonly:
+5577 70428500 jam flag_iocap_displayonly ,mem_le_pres_iocap 
+5578 20205632 branch module_hci_event_receive_valid_cmd 
+
+module_hci_cmd_le_set_adv_data:
+5579 dfe0001f arg 31 ,pdata 
+557a d8a0431b arg mem_le_adv_data_len ,contw 
+557b 2020557f branch module_hci_cmd_receive_store_mem 
+
+module_hci_cmd_le_set_scan_data:
+557c dfe0001f arg 31 ,pdata 
+557d d8a0433b arg mem_le_scan_data_len ,contw 
+557e 2020557f branch module_hci_cmd_receive_store_mem 
+
+module_hci_cmd_receive_store_mem:
+557f 6f208538 fetchr loopcnt ,1 ,mem_module_uart_len 
+5580 9f267c00 isub loopcnt ,null 
+5581 2421562f nbranch module_hci_event_receive_invalid_cmd ,positive 
+5582 e7208005 istorer loopcnt ,1 ,contw 
+5583 20406b2c call uart_copy_rx_bytes_fast 
+5584 20205632 branch module_hci_event_receive_valid_cmd 
+
+module_hci_cmd_le_send_conn_update_req:
+5585 6fe1442f fetch 2 ,mem_ui_state_map 
+5586 c304d62f bbit0 ui_state_ble_connected ,module_hci_event_receive_invalid_cmd 
+5587 6fe08538 fetch 1 ,mem_module_uart_len 
+5588 c084562f bne 0x08 ,module_hci_event_receive_invalid_cmd 
+5589 efe40003 ifetch 8 ,contru 
+558a 67e442a6 store 8 ,mem_le_interval_min 
+558b 7004c312 jam bt_cmd_le_update_conn ,mem_fifo_temp 
+558c 204070a4 call ui_ipc_send_cmd 
+558d 20205632 branch module_hci_event_receive_valid_cmd 
+
+module_hci_cmd_set_le_adv_parameter:
+558e efe10003 ifetch 2 ,contru 
+558f 67e1435c store 2 ,mem_le_adv_interval 
+5590 20205632 branch module_hci_event_receive_valid_cmd 
+
+module_hci_cmd_le_start_pairing:
+5591 6fe0c2d1 fetch 1 ,mem_le_pairing_mode 
+5592 203a562f branch module_hci_event_receive_invalid_cmd ,blank 
+5593 6fe0c2cf fetch 1 ,mem_le_pairing_state 
+5594 c080562f bne flag_le_pairing_null ,module_hci_event_receive_invalid_cmd 
+5595 6fe0c2d0 fetch 1 ,mem_le_enc_state 
+5596 c080562f bne flag_le_enc_null ,module_hci_event_receive_invalid_cmd 
+5597 20407119 call check_51cmd_le_smp_sec_req 
+5598 20205632 branch module_hci_event_receive_valid_cmd 
+
+module_hci_cmd_set_wake_gpio:
+5599 6fe08538 fetch 1 ,mem_module_uart_len 
+559a c082d62f bne 5 ,module_hci_event_receive_invalid_cmd 
+559b efe08003 ifetch 1 ,contru 
+559c 67e0c43f store 1 ,mem_module_mcu_wake_pin 
+559d efe20003 ifetch 4 ,contru 
+559e 67e24440 store 4 ,mem_module_mcu_wake_delay_us 
+559f 6848c43f fetcht 1 ,mem_module_mcu_wake_pin 
+55a0 20406c43 call gpio_config_output 
+55a1 204056be call module_set_mcu_wake_pin_low 
+55a2 20205632 branch module_hci_event_receive_valid_cmd 
+
+module_hci_cmd_set_tx_power:
+55a3 6fe08538 fetch 1 ,mem_module_uart_len 
+55a4 c080d62f bne 0x01 ,module_hci_event_receive_invalid_cmd 
+55a5 efe08003 ifetch 1 ,contru 
+55a6 67e0c116 store 1 ,mem_tx_power 
+55a7 20205632 branch module_hci_event_receive_valid_cmd 
+
+module_hci_cmd_le_confirm_gkey:
+55a8 efe08003 ifetch 1 ,contru 
+55a9 c000d5b1 beq 0x01 ,module_hci_cmd_le_confirm_gkey_fail 
+55aa 6fe0c2cd fetch 1 ,mem_le_secure_connect_state 
+55ab c001d5af beq le_sc_stat_send_public_key ,module_hci_cmd_le_confirm_gkey_ok 
+55ac c00355af beq le_sc_stat_receive_dhkey ,module_hci_cmd_le_confirm_gkey_ok 
+55ad c003d5af beq le_sc_stat_wait_confirm_gkey ,module_hci_cmd_le_confirm_gkey_ok 
+55ae 2020562f branch module_hci_event_receive_invalid_cmd 
+
+module_hci_cmd_le_confirm_gkey_ok:
+55af 7042ce01 jam flag_le_sc_confrim_gkey_ok ,mem_le_sc_confirm_gkey_flag 
+55b0 20205632 branch module_hci_event_receive_valid_cmd 
+
+module_hci_cmd_le_confirm_gkey_fail:
+55b1 2040465c call le_send_pairing_confirm_value_failed 
+55b2 20205632 branch module_hci_event_receive_valid_cmd 
+
+module_hci_cmd_reset_chip:
+55b3 20405632 call module_hci_event_receive_valid_cmd 
+55b4 204075e8 call wait_uarttx 
+55b5 70801001 jam 0x01 ,core_reset 
+55b6 20203aba branch assert 
+
+module_hci_cmd_le_set_fixed_passkey:
+55b7 6fe08538 fetch 1 ,mem_module_uart_len 
+55b8 c000562f beq 0 ,module_hci_event_receive_invalid_cmd 
+55b9 efe08003 ifetch 1 ,contru 
+55ba 203a55c4 branch module_hci_cmd_le_set_random_passkey ,blank 
+55bb 6fe08538 fetch 1 ,mem_module_uart_len 
+55bc c082d62f bne 5 ,module_hci_event_receive_invalid_cmd 
+55bd efe20003 ifetch 4 ,contru 
+55be d84f4240 arg 1000000 ,temp 
+55bf 98467c00 isub temp ,null 
+55c0 2021562f branch module_hci_event_receive_invalid_cmd ,positive 
+55c1 67e242d2 store 4 ,mem_le_tk 
+55c2 2040419a call le_set_config_fixed_tk 
+55c3 20205632 branch module_hci_event_receive_valid_cmd 
+
+module_hci_cmd_le_set_random_passkey:
+55c4 2040419c call le_clr_config_fixed_tk 
+55c5 20205632 branch module_hci_event_receive_valid_cmd 
+
+module_hci_cmd_delete_customize_service:
+55c6 e8410003 ifetcht 2 ,contru 
+55c7 204040e9 call le_att_get_handle_ptr2 
+55c8 18c08bfe add contr ,-2 ,contw 
+55c9 58000000 setarg 0x0000 
+55ca e7e10005 istore 2 ,contw 
+55cb 20205632 branch module_hci_event_receive_valid_cmd 
+
+module_hci_cmd_add_service_uuid:
+55cc 204055d5 call module_hci_cmd_add_service_uuid_set_uuid 
+55cd 20405603 call uart_copy_rx_bytes_len_data 
+55ce 58000000 setarg 0x0000 
+55cf e7e10005 istore 2 ,contw 
+55d0 20205698 branch module_hci_event_uuid_handle 
+
+module_hci_cmd_add_characteristic_uuid:
+55d1 efe08003 ifetch 1 ,contru 
+55d2 204055d9 call module_hci_cmd_add_characteristic_uuid_set_handle 
+55d3 204055e0 call module_hci_cmd_add_characteristic_uuid_set_uuid 
+55d4 20205698 branch module_hci_event_uuid_handle 
+
+module_hci_cmd_add_service_uuid_set_uuid:
+55d5 20405600 call le_att_creat_new_handle 
+55d6 58280002 setarg 0x280002 
+55d7 e7e18005 istore 3 ,contw 
+55d8 20600000 rtn 
+
+module_hci_cmd_add_characteristic_uuid_set_handle:
+55d9 67e084c4 store 1 ,mem_pdatatemp 
+55da 20405600 call le_att_creat_new_handle 
+55db 59280302 setarg 0x01280302 
+55dc e7e20005 istore 4 ,contw 
+55dd 6fe084c4 fetch 1 ,mem_pdatatemp 
+55de e7e18005 istore 3 ,contw 
+55df 20600000 rtn 
+
+module_hci_cmd_add_characteristic_uuid_set_uuid:
+55e0 20404108 call le_att_get_last_handle 
+55e1 efe08003 ifetch 1 ,contru 
+55e2 1fe1721f and pdata ,0x1f ,loopcnt 
+55e3 1fe22200 copy pdata ,rega 
+55e4 2a2ffe07 isolate1 bit_of_write_authenticated ,rega 
+55e5 7920840f setflag true ,bit_of_att_handle_write_authenticated ,temp 
+55e6 2a2ffe06 isolate1 bit_of_read_authenticated ,rega 
+55e7 7920840e setflag true ,bit_of_att_handle_read_authenticated ,temp 
+55e8 e0410005 istoret 2 ,contw 
+55e9 1f227e00 copy loopcnt ,pdata 
+55ea e7e08005 istore 1 ,contw 
+55eb 20406b3f call uart_copy_rx_bytes 
+55ec 20405603 call uart_copy_rx_bytes_len_data 
+55ed 58000000 setarg 0 
+55ee e7e10005 istore 2 ,contw 
+55ef 184104ff and temp ,0xff ,temp 
+55f0 184085ff increase -1 ,temp 
+55f1 204040e9 call le_att_get_handle_ptr2 
+55f2 18c08c04 add contr ,4 ,contr 
+55f3 efe08006 ifetch 1 ,contr 
+55f4 c28255f8 bbit1 bit_characteristic_notify ,module_hci_cmd_add_characteristic_uuid_set_ccc_uuid 
+55f5 c282d5f8 bbit1 bit_characteristic_indicate ,module_hci_cmd_add_characteristic_uuid_set_ccc_uuid 
+55f6 18408401 increase 1 ,temp 
+55f7 20600000 rtn 
+
+module_hci_cmd_add_characteristic_uuid_set_ccc_uuid:
+55f8 20404108 call le_att_get_last_handle 
+55f9 2a2ffe05 isolate1 bit_of_notify_authenticated ,rega 
+55fa 7920840f setflag true ,bit_of_att_handle_write_authenticated ,temp 
+55fb e0410005 istoret 2 ,contw 
+55fc 5a290202 setarg 0x02290202 
+55fd e7e40005 istore 8 ,contw 
+55fe 184085ff increase -1 ,temp 
+55ff 20600000 rtn 
+
+le_att_creat_new_handle:
+5600 20404108 call le_att_get_last_handle 
+5601 e0410005 istoret 2 ,contw 
+5602 20600000 rtn 
+
+uart_copy_rx_bytes_len_data:
+5603 efe08003 ifetch 1 ,contru 
+5604 1fe27200 copy pdata ,loopcnt 
+5605 e7e08005 istore 1 ,contw 
+5606 20206b3f branch uart_copy_rx_bytes 
+
+module_hci_cmd_le_passkey_entry_input:
+5607 6fe0c2cf fetch 1 ,mem_le_pairing_state 
+5608 c082d62f bne flag_le_pairing_receive_pairing_confirm ,module_hci_event_receive_invalid_cmd 
+5609 6fe0c2d1 fetch 1 ,mem_le_pairing_mode 
+560a c0025613 beq le_pairing_mode_lagacy_passkey_res_input ,module_hci_cmd_passkey_entry_res_input 
+560b c042560d beq le_pairing_mode_secure_connect_passkey_res_input ,module_hci_cmd_passkey_entry_sc_res_input 
+560c 2020562f branch module_hci_event_receive_invalid_cmd 
+
+module_hci_cmd_passkey_entry_sc_res_input:
+560d 7042cc02 jam le_sp_flag_commit_256 ,mem_le_secure_connect_flag 
+560e 7042cd08 jam le_sc_stat_passkey_wait_confirm ,mem_le_secure_connect_state 
+560f 20205610 branch module_hci_cmd_receive_ble_passkey 
+
+module_hci_cmd_receive_ble_passkey:
+5610 efe20003 ifetch 4 ,contru 
+5611 67e242d2 store 4 ,mem_le_tk 
+5612 20205632 branch module_hci_event_receive_valid_cmd 
+
+module_hci_cmd_passkey_entry_res_input:
+5613 20405610 call module_hci_cmd_receive_ble_passkey 
+5614 20204651 branch le_send_smp_pairing_confirm 
+
+module_hci_cmd_ble_set_phy:
+5615 6fe08538 fetch 1 ,mem_module_uart_len 
+5616 c081562f bne 2 ,module_hci_event_receive_invalid_cmd 
+5617 e8410003 ifetcht 2 ,contru 
+5618 20404208 call le_set_phys 
+5619 20205632 branch module_hci_event_receive_valid_cmd 
+
+module_hci_cmd_ble_read_current_phy:
+561a d8400000 arg 0 ,temp 
+561b da200002 arg 2 ,rega 
+561c da404075 arg mem_context + coffset_le_rx_phy ,regb 
+561d 20205639 branch module_hci_event_set_cmd 
+
+module_hci_cmd_ble_set_dle:
+561e 6fe08538 fetch 1 ,mem_module_uart_len 
+561f c084562f bne 8 ,module_hci_event_receive_invalid_cmd 
+5620 efe40003 ifetch 8 ,contru 
+5621 20404206 call le_set_dle 
+5622 20205632 branch module_hci_event_receive_valid_cmd 
+
+module_hci_cmd_read_chip_data:
+5623 ea208003 ifetchr rega ,1 ,contru 
+5624 ea410003 ifetchr regb ,2 ,contru 
+5625 d8400000 arg 0 ,temp 
+5626 20205639 branch module_hci_event_set_cmd 
+
+module_hci_cmd_write_chip_data:
+5627 6f208538 fetchr loopcnt ,1 ,mem_module_uart_len 
+5628 1f20f3fe increase -2 ,loopcnt 
+5629 efe10003 ifetch 2 ,contru 
+562a 1fe20a00 copy pdata ,contw 
+562b 20406b2c call uart_copy_rx_bytes_fast 
+562c 20205632 branch module_hci_event_receive_valid_cmd 
+
+module_hci_cmd_close_lpm:
+562d 70409400 jam 0 ,mem_lpm_mode 
+562e 20205632 branch module_hci_event_receive_valid_cmd 
+
+module_hci_event_receive_invalid_cmd:
+562f d8400001 arg 1 ,temp 
+5630 da200000 arg 0 ,rega 
+5631 20205639 branch module_hci_event_set_cmd 
+
+module_hci_event_receive_valid_cmd:
+5632 d8400000 arg 0 ,temp 
+5633 da200000 arg 0 ,rega 
+5634 20205639 branch module_hci_event_set_cmd 
+
+module_hci_event_le_connect:
+5635 70053702 jam hci_event_le_conn_rep ,mem_module_uart_opcode 
+5636 20205652 branch module_hci_event_enter_standby_mode_len0 
+
+module_hci_event_le_disconnect:
+5637 70053705 jam hci_event_le_dis_rep ,mem_module_uart_opcode 
+5638 20205652 branch module_hci_event_enter_standby_mode_len0 
+
+module_hci_event_set_cmd:
+5639 6fe08537 fetch 1 ,mem_module_uart_opcode 
+563a 1fe22600 copy pdata ,regc 
+563b 70053706 jam hci_event_cmd_res ,mem_module_uart_opcode 
+563c 58000002 setarg 2 
+563d 9a20fe00 iadd rega ,pdata 
+563e 204056a7 call module_hci_prepare_tx 
+563f 1a627e00 copy regc ,pdata 
+5640 e7e08003 istore 1 ,contwu 
+5641 e0408003 istoret 1 ,contwu 
+5642 1a227200 copy rega ,loopcnt 
+5643 1a420c00 copy regb ,contr 
+5644 20406b26 call uart_copy_tx_bytes 
+5645 202056b1 branch module_hci_transmit_tx 
+
+module_hci_event_receive_le_data:
+5646 70053708 jam hci_event_le_data_rep ,mem_module_uart_opcode 
+5647 1f20fe02 add loopcnt ,2 ,pdata 
+5648 204056a7 call module_hci_prepare_tx 
+5649 6fe10562 fetch 2 ,mem_module_le_rx_data_handle 
+564a e7e10003 istore 2 ,contwu 
+564b 6fe10560 fetch 2 ,mem_module_le_rx_data_address 
+564c 1fe20c00 icopy contr 
+564d 20406b13 call uart_copy_tx_bytes_fast 
+564e 18c27e00 copy contr ,pdata 
+564f 67e10560 store 2 ,mem_module_le_rx_data_address 
+5650 202056b1 branch module_hci_transmit_tx 
+
+module_hci_event_enter_standby_mode:
+5651 70053709 jam hci_event_standby_rep ,mem_module_uart_opcode 
+
+module_hci_event_enter_standby_mode_len0:
+5652 58000000 setarg 0 
+5653 204056a7 call module_hci_prepare_tx 
+5654 202056b1 branch module_hci_transmit_tx 
+
+module_hci_event_status_res:
+5655 7005370a jam hci_event_status_res ,mem_module_uart_opcode 
+5656 58000001 setarg 1 
+5657 204056a7 call module_hci_prepare_tx 
+5658 2040565f call module_hci_read_bt_status 
+5659 6fe1442f fetch 2 ,mem_ui_state_map 
+565a d8e00009 arg ui_state_ble_connected ,queue 
+565b afefffff qisolate1 pdata 
+565c 79208405 setflag true ,5 ,temp 
+565d e0408003 istoret 1 ,contwu 
+565e 202056b1 branch module_hci_transmit_tx 
+
+module_hci_read_bt_status:
+565f d8400000 arg 0 ,temp 
+5660 6fe0c35b fetch 1 ,mem_le_adv_enable 
+5661 d8e00000 arg 0 ,queue 
+5662 afefffff qisolate1 pdata 
+5663 79208402 setflag true ,2 ,temp 
+5664 20600000 rtn 
+
+module_hci_event_store_device:
+5665 7005370d jam hci_event_nvram_rep ,mem_module_uart_opcode 
+5666 6fe0c3af fetch 1 ,mem_nv_data_number 
+5667 1feffe22 mul32 pdata ,34 ,pdata 
+5668 1fe27200 icopy loopcnt 
+5669 204056a7 call module_hci_prepare_tx 
+566a 6fe143ad fetch 2 ,mem_nv_data_ptr 
+566b 1fe20c00 icopy contr 
+566c 20406b13 call uart_copy_tx_bytes_fast 
+566d 202056b1 branch module_hci_transmit_tx 
+
+module_hci_event_invalid_packet:
+566e 7005370f jam hci_event_invalid_packet ,mem_module_uart_opcode 
+566f 6ff10112 fetch 2 ,core_uart_rxitems 
+5670 d8400040 arg 0x40 ,temp 
+5671 2040762c call not_greater_than 
+5672 1fe22200 copy pdata ,rega 
+5673 1fe27200 copy pdata ,loopcnt 
+5674 20406afb call uarta_prepare_rx 
+5675 d8a004f6 arg mem_module_rx_error_data_buffer ,contw 
+5676 20406b2c call uart_copy_rx_bytes_fast 
+5677 1a227e00 copy rega ,pdata 
+5678 1a227200 copy rega ,loopcnt 
+5679 204056a7 call module_hci_prepare_tx 
+567a d8c004f6 arg mem_module_rx_error_data_buffer ,contr 
+567b 20406b13 call uart_copy_tx_bytes_fast 
+567c 202056b1 branch module_hci_transmit_tx 
+
+module_hci_event_passkey_entry_mode:
+567d 70053710 jam hci_event_get_passkey ,mem_module_uart_opcode 
+567e 20205652 branch module_hci_event_enter_standby_mode_len0 
+
+module_hci_event_le_tk:
+567f 70053711 jam hci_event_le_tk ,mem_module_uart_opcode 
+5680 58000004 setarg 4 
+5681 204056a7 call module_hci_prepare_tx 
+5682 6fe242d2 fetch 4 ,mem_le_tk 
+5683 e7e20003 istore 4 ,contwu 
+5684 202056b1 branch module_hci_transmit_tx 
+
+module_hci_event_le_pairing_fail:
+5685 da200180 arg flag_ble_pairing_fail ,rega 
+5686 20205689 branch module_hci_event_pairing_completed 
+
+module_hci_event_le_pairing_success:
+5687 da200080 arg flag_ble_pairing_success ,rega 
+5688 20205689 branch module_hci_event_pairing_completed 
+
+module_hci_event_pairing_completed:
+5689 70053714 jam hci_event_le_pairing_state ,mem_module_uart_opcode 
+568a 58000002 setarg 2 
+568b 204056a7 call module_hci_prepare_tx 
+568c 1a227e00 copy rega ,pdata 
+568d e7e10003 istore 2 ,contwu 
+568e 202056b1 branch module_hci_transmit_tx 
+
+module_hci_event_pause_enc:
+568f da600000 arg flag_event_pause_enc ,regc 
+5690 20205692 branch module_hci_event_enc 
+
+module_hci_event_start_enc:
+5691 da600001 arg flag_event_start_enc ,regc 
+
+module_hci_event_enc:
+5692 70053715 jam hci_event_le_encryption_state ,mem_module_uart_opcode 
+5693 58000001 setarg 1 
+5694 204056a7 call module_hci_prepare_tx 
+5695 1a627e00 copy regc ,pdata 
+5696 e7e08003 istore 1 ,contwu 
+5697 202056b1 branch module_hci_transmit_tx 
+
+module_hci_event_uuid_handle:
+5698 604904cc storet 2 ,mem_temp 
+5699 70053729 jam hci_event_uuid_handle ,mem_module_uart_opcode 
+569a 58000002 setarg 2 
+569b 204056a7 call module_hci_prepare_tx 
+569c 684904cc fetcht 2 ,mem_temp 
+569d e0410003 istoret 2 ,contwu 
+569e 202056b1 branch module_hci_transmit_tx 
+
+module_hci_event_le_input_passkey:
+569f 7005372b jam hci_event_le_input_gkey ,mem_module_uart_opcode 
+56a0 20205652 branch module_hci_event_enter_standby_mode_len0 
+
+module_hci_event_le_update_phy:
+56a1 70053740 jam hci_ble_update_phy_event ,mem_module_uart_opcode 
+56a2 58000002 setarg 2 
+56a3 204056a7 call module_hci_prepare_tx 
+56a4 6fe14075 fetch 2 ,mem_context + coffset_le_rx_phy 
+56a5 e7e10003 istore 2 ,contwu 
+56a6 202056b1 branch module_hci_transmit_tx 
+
+module_hci_prepare_tx:
+56a7 70053602 jam 0x02 ,mem_module_uart_cmd 
+56a8 67e08538 store 1 ,mem_module_uart_len 
+56a9 604c04cc storet 8 ,mem_temp 
+56aa 449e4007 bpatch patch07_4 ,mem_patch07 
+56ab 204056b3 call module_set_mcu_wake_pin_high_delay 
+56ac 684c04cc fetcht 8 ,mem_temp 
+56ad 20406b07 call uarta_prepare_tx_register_push 
+56ae 6fe18536 fetch 3 ,mem_module_uart_cmd 
+56af e7e18003 istore 3 ,contwu 
+56b0 20600000 rtn 
+
+module_hci_transmit_tx:
+56b1 449ec007 bpatch patch07_5 ,mem_patch07 
+56b2 20206b09 branch uarta_send_register_pop 
+
+module_set_mcu_wake_pin_high_delay:
+56b3 204056bc call module_check_mcu_wake_pin_high 
+56b4 20608000 rtn true 
+
+module_set_mcu_wake_pin_h_delay:
+56b5 204056ba call module_set_mcu_wake_pin_high 
+56b6 6fe24440 fetch 4 ,mem_module_mcu_wake_delay_us 
+56b7 1feb7e00 rshift2 pdata ,pdata 
+56b8 207a0000 rtn blank 
+56b9 202074f7 branch delay 
+
+module_set_mcu_wake_pin_high:
+56ba 6848c43f fetcht 1 ,mem_module_mcu_wake_pin 
+56bb 20206c43 branch gpio_out_active 
+
+module_check_mcu_wake_pin_high:
+56bc 6848c43f fetcht 1 ,mem_module_mcu_wake_pin 
+56bd 20206c4e branch gpio_check_active 
+
+module_set_mcu_wake_pin_low:
+56be 6848c43f fetcht 1 ,mem_module_mcu_wake_pin 
+56bf 20206c3f branch gpio_out_inactive 
+
+module_le_receive_data:
+56c0 62210560 storer rega ,2 ,mem_module_le_rx_data_address 
+56c1 6241055e storer regb ,2 ,mem_module_le_rx_data_len 
+56c2 6fe1436b fetch 2 ,mem_le_att_handle 
+56c3 67e10562 store 2 ,mem_module_le_rx_data_handle 
+56c4 204054df call module_check_ble_encrypt_state 
+56c5 20740000 rtn user 
+
+module_le_receive_data_ok:
+56c6 6849055e fetcht 2 ,mem_module_le_rx_data_len 
+56c7 6fe0c454 fetch 1 ,mem_module_ble_data_uart_max_length 
+56c8 2040762c call not_greater_than 
+56c9 1fe27200 copy pdata ,loopcnt 
+56ca 18427e00 copy temp ,pdata 
+56cb 9f267e00 isub loopcnt ,pdata 
+56cc 67e1055e store 2 ,mem_module_le_rx_data_len 
+56cd 20405646 call module_hci_event_receive_le_data 
+56ce 6fe1055e fetch 2 ,mem_module_le_rx_data_len 
+56cf 207a0000 rtn blank 
+56d0 202056c6 branch module_le_receive_data_ok 
+
+module_bb_event_timer:
+
+module_read_vdd_timer:
+56d1 6fe0c450 fetch 1 ,mem_module_read_vdd_flag 
+56d2 207a0000 rtn blank 
+56d3 6fe0c451 fetch 1 ,mem_module_read_vdd_count 
+56d4 207a0000 rtn blank 
+56d5 1fe0ffff increase -1 ,pdata 
+56d6 67e0c451 store 1 ,mem_module_read_vdd_count 
+56d7 247a0000 nrtn blank 
+56d8 70445105 jam flag_module_read_vdd_count ,mem_module_read_vdd_count 
+56d9 20406c98 call enable_adc 
+56da 20406cc0 call vdd_calculate_by_mode 
+56db 1fe6fc64 div pdata ,0x64 
+56dc 204075cd call get_div_result 
+56dd 18070400 remainder temp 
+56de 67e0c452 store 1 ,mem_module_vdd_quotient 
+56df 6048c453 storet 1 ,mem_module_vdd_remainder 
+56e0 20600000 rtn 
+
+module_set_le_tx_data_flag:
+56e1 d8e00008 arg module_flag_ble_data_finish ,queue 
+56e2 202056e9 branch module_set_state 
+
+module_clear_le_tx_data_flag:
+56e3 d8e00008 arg module_flag_ble_data_finish ,queue 
+56e4 202056e5 branch module_clr_state 
+
+module_clr_state:
+56e5 6fe14455 fetch 2 ,mem_module_flag 
+56e6 f93ffe00 qset0 pdata 
+56e7 67e14455 store 2 ,mem_module_flag 
+56e8 20600000 rtn 
+
+module_set_state:
+56e9 6fe14455 fetch 2 ,mem_module_flag 
+56ea f9207e00 qset1 pdata 
+56eb 67e14455 store 2 ,mem_module_flag 
+56ec 20600000 rtn 
+
+mouse_init:
+56ed 20406fd3 call enable_authrom 
+56ee 20405718 call mouse_setting_config 
+56ef 20405b64 call mouse_init_sunt 
+56f0 20758000 rtn wake 
+56f1 20405a4e call mouse_dpi_config 
+56f2 20405fdb call mouse_drawing_optima_init 
+56f3 204056f9 call mouse_cb_fuction 
+56f4 20405bf9 call mouse_sensor_powerdown 
+
+mouse_init_wireless:
+56f5 6fe1442f fetch 2 ,mem_ui_state_map 
+56f6 c2865e21 bbit1 ui_state_btn_down ,mouse_start_discovery 
+56f7 20405f53 call mouse_check_select_device_by_switch 
+56f8 2020578c branch mouse_start_work 
+
+mouse_cb_fuction:
+56f9 58006196 setarg mouse_24g_before_lpm_sleep 
+56fa 67e1439e store 2 ,mem_cb_before_lpm_sleep 
+56fb 58006134 setarg mouse_24g_package_data 
+56fc 67e14535 store 2 ,mem_cb_24g_transmit_data 
+56fd 5800615e setarg mouse_24g_search_dongle 
+56fe 67e14537 store 2 ,mem_cb_24g_search_receiver 
+56ff 58005802 setarg mouse_lpm_before_common 
+5700 67e14539 store 2 ,mem_cb_24g_lpm_before 
+5701 58005d2b setarg mouse_le 
+5702 67e1438e store 2 ,mem_cb_le_process 
+5703 580057fd setarg mouse_process_lpm_before 
+5704 67e1438c store 2 ,mem_cb_before_lpm 
+5705 58005cca setarg mouse_priority_bb_event 
+5706 67e14392 store 2 ,mem_cb_bb_event_process 
+5707 58005f00 setarg mouse_idle 
+5708 67e14390 store 2 ,mem_cb_idle_process 
+5709 580057cb setarg mouse_before_hibernate 
+570a 67e1438a store 2 ,mem_cb_before_hibernate 
+570b 58005d10 setarg mouse_le_bb_event_connect_complete 
+570c 67e14394 store 2 ,mem_cb_att_write 
+570d 58005d8d setarg mouse_bb_event_timer 
+570e 67e14398 store 2 ,mem_cb_event_timer 
+570f 5800592a setarg mouse_spi_write_flash_cb 
+5710 67e1439c store 2 ,mem_cb_spi_flash_write_complate 
+5711 580057b7 setarg mouse_lpm_check_wake_lock 
+5712 67e14388 store 2 ,mem_cb_check_wakelock 
+5713 5800628b setarg mouse_le_transmit 
+5714 67e14396 store 2 ,mem_cb_ble_transmit 
+5715 58006292 setarg mouse_set_lpm_mult 
+5716 67e1439a store 2 ,mem_cb_bt_set_mult 
+5717 20600000 rtn 
+
+mouse_setting_config:
+5718 20758000 rtn wake 
+5719 20404c72 call g24_transmit_init 
+571a 20404905 call g24_chmap_param_init 
+571b 204058de call mouse_gpio_init 
+571c 2040574f call mouse_param_init 
+571d 2040419e call le_set_config_fixed_ltk 
+571e 204041c7 call le_set_justwork 
+571f 204041ba call le_set_fixed_ltk 
+5720 204041a6 call le_set_config_read_authentication 
+5721 6fe44848 fetch mouse_flag_len ,mem_mouse_flag 
+5722 c289deea bbit1 mouse_enable_eeprom ,mouse_load_eeprom_info_check 
+5723 c2895eab bbit1 mouse_enable_flash ,mouse_load_flash_info_check 
+5724 20600000 rtn 
+
+mouse_xtal_init:
+5725 70409a08 jam 0x08 ,mem_fcomp_div 
+5726 6fe44848 fetch mouse_flag_len ,mem_mouse_flag 
+5727 c3860000 rtnbit1 mouse_enable_16m 
+5728 70409a18 jam 0x18 ,mem_fcomp_div 
+5729 20600000 rtn 
+
+mouse_24g_phy_select:
+572a 2040492b call g24_enable_1m 
+572b 6fe44848 fetch mouse_flag_len ,mem_mouse_flag 
+572c c41e8000 rtnbit0 mouse_enable_24g_2m_phy 
+572d 2020492e branch g24_enable_2m 
+
+mouse_default_init:
+572e 6fe1459a fetch 2 ,mem_mouse_24g_pair_timeout_init 
+572f 67e1451b store 2 ,mem_24g_pair_timeout_init 
+5730 6fe0c59d fetch 1 ,mem_mouse_24g_reconn_timeout_init 
+5731 67e1451f store 2 ,mem_24g_reconn_timeout_init 
+5732 6fe2c59f fetch 5 ,mem_rssi_dis_min_24g_init 
+5733 67e2c565 store 5 ,mem_rssi_dis_min_24g 
+5734 6fe0c59e fetch 1 ,mem_mouse_24g_pair_tx_power 
+5735 67e0c516 store 1 ,mem_24g_pair_tx_power 
+5736 6fe0c5a4 fetch 1 ,mem_mouse_enable_flag 
+5737 2feffe00 isolate1 mouse_adc_enable ,pdata 
+5738 2040df97 call mouse_adc_read_enable ,true 
+5739 6fe0c5a4 fetch 1 ,mem_mouse_enable_flag 
+573a 2feffe02 isolate1 mouse_24g_250hz_enable ,pdata 
+573b 2040df99 call mouse_24g_set_250hz ,true 
+573c 6fe0c5a4 fetch 1 ,mem_mouse_enable_flag 
+573d 2feffe01 isolate1 mouse_search_dongle_enable ,pdata 
+573e 2040df9b call mouse_24g_search_dongle_enable ,true 
+573f 6fe0c5a4 fetch 1 ,mem_mouse_enable_flag 
+5740 2feffe03 isolate1 mouse_clk_16m_enable ,pdata 
+5741 2040df9d call mouse_16m_enable ,true 
+5742 6fe0c5a4 fetch 1 ,mem_mouse_enable_flag 
+5743 2feffe04 isolate1 mouse_dpi_4_level_enable ,pdata 
+5744 2040df9f call mouse_dpi_4level_enable ,true 
+5745 6fe0c5a4 fetch 1 ,mem_mouse_enable_flag 
+5746 2feffe05 isolate1 mouse_keyboard_enable ,pdata 
+5747 2040dfa9 call mouse_customer_key_enable ,true 
+5748 6fe0c4ff fetch 1 ,mem_24g_ch_map_update 
+5749 245a4915 ncall g24_chamap_param_update ,blank 
+574a 20405725 call mouse_xtal_init 
+574b 2040583d call mouse_adc_vol_init 
+574c 2040572a call mouse_24g_phy_select 
+574d 20406088 call mouse_24g_long_sleep_set 
+574e 20204931 branch g24_pair_param_init 
+
+mouse_param_init:
+574f 58009000 setarg mouse_ble_att_list_addr 
+5750 67e142ca store 2 ,mem_ui_le_uuid_table 
+5751 7040c203 jam 3 ,mem_lpm_mult_timeout 
+5752 7040a708 jam 8 ,mem_lpm_overhead 
+5753 70483b00 jam dpi_button_state_up ,mem_select_device_button_statue 
+5754 70483b00 jam pb_button_state_up ,mem_select_device_button_statue 
+5755 70483c00 jam commbination_key_state_up ,mem_commbination_key_statue 
+5756 58000200 setarg 0x0200 
+5757 67e140a5 store 2 ,mem_lpm_interval 
+5758 7042b417 jam 0x17 ,mem_le_local_mtu 
+5759 7042b617 jam 0x17 ,mem_le_remote_mtu 
+575a 58000a77 setarg 0x0a77 
+575b 67e143aa store 2 ,mem_spi_init_clk 
+575c 38001224 setsect 0 ,0x1224 
+575d 38044000 setsect 1 ,0x4000 
+575e 38080000 setsect 2 ,0x0 
+575f e7e28005 istore 5 ,contw 
+5760 58004793 setarg mem_le_tx_buffer0_omemalloc 
+5761 67e14312 store 2 ,mem_ble_l2cap_tx_buff0_ptr 
+5762 58000010 setarg mouse_ble_l2cap_txbuff_size 
+5763 67e14314 store 2 ,mem_ble_l2cap_tx_buff_size_ptr 
+5764 204061ef call mouse_device_led_all_off 
+5765 204061a7 call mouse_device_poweron_timer_init 
+5766 20405850 call mouse_adc_gpio_mux_init 
+5767 6fe44848 fetch mouse_flag_len ,mem_mouse_flag 
+5768 c30dd76c bbit0 mouse_enable_bt_125hz ,mouse_param_init_intervl_end 
+5769 58000006 setarg le_interval_7_5ms 
+576a 67e142a6 store 2 ,mem_le_interval_min 
+576b 67e142a8 store 2 ,mem_le_interval_min + 2 
+
+mouse_param_init_intervl_end:
+576c 20404c7e call g24_interval_param_8ms 
+576d 6fe44848 fetch mouse_flag_len ,mem_mouse_flag 
+576e c30c5770 bbit0 mouse_enable_24g_250hz ,mouse_24g_short_sleep_set_end 
+576f 20404c76 call g24_interval_param_4ms 
+
+mouse_24g_short_sleep_set_end:
+5770 6fe0c5d1 fetch 1 ,mem_device_flag 
+5771 67e0c752 store 1 ,mem_device_flag_temp 
+5772 6fe1c2b1 fetch 3 ,mem_le_lap + 3 
+5773 67e1c767 store 3 ,mem_mouse_le_lap_temp 
+5774 6fe0c597 fetch 1 ,mem_adc_config_flag_init 
+5775 1fe17efe and pdata ,0xfe ,pdata 
+5776 67e0c597 store 1 ,mem_adc_config_flag_init 
+5777 67e0c3c2 store 1 ,mem_adc_config_flag 
+5778 58000000 setarg 0 
+5779 67e3c56a store 7 ,mem_mouse_key 
+577a 6fe0c431 fetch 1 ,mem_ui_button_timeout 
+577b 67e0c838 store 1 ,mem_bt_discovery_count 
+577c 67e0c839 store 1 ,mem_select_device_count 
+577d 20404142 call le_modified_name_adv 
+
+mouse_sensor_set_angle:
+577e 47454031 bpatchx patch31_2 ,mem_patch31 
+577f 6fe0c5b0 fetch 1 ,mem_sensor_angle_default 
+5780 67e0c5c1 store 1 ,mem_config_sensor_angle 
+5781 6fe0c5af fetch 1 ,mem_select_sensor_angle_gpio 
+5782 c17f8000 rtneq gpio_disable 
+5783 6848c5af fetcht 1 ,mem_select_sensor_angle_gpio 
+5784 20405915 call mouse_gpio_config_input_pu 
+5785 6848c5af fetcht 1 ,mem_select_sensor_angle_gpio 
+5786 20406c32 call gpio_get_bit 
+5787 2040d789 call mouse_sensor_switch_angle ,true 
+5788 20205911 branch mouse_gpio_config_input_pd 
+
+mouse_sensor_switch_angle:
+5789 6fe0c5b1 fetch 1 ,mem_sensor_angle_switch 
+578a 67e0c5c1 store 1 ,mem_config_sensor_angle 
+578b 20600000 rtn 
+
+mouse_start_work:
+578c 449f4007 bpatch patch07_6 ,mem_patch07 
+578d 6fe44848 fetch mouse_flag_len ,mem_mouse_flag 
+578e c297e0c8 bbit1 mouse_enable_24g_first_auto_pairing ,mouse_24g_first_start_auto_pair_mode 
+578f 6fe0c5d1 fetch 1 ,mem_device_flag 
+5790 c00060b8 beq mode_24g_device ,mouse_24g_start_mode 
+5791 2040579e call mouse_wakeup_from_power_check 
+5792 24345c9c nbranch mouse_buletooth_fast_conn_init ,user 
+
+mouse_start_reconnect_device:
+5793 449fc007 bpatch patch07_7 ,mem_patch07 
+5794 da2045d2 arg mem_device1_type ,rega 
+5795 6fe0c5d1 fetch 1 ,mem_device_flag 
+5796 1fe0ffff increase -1 ,pdata 
+5797 1feffe1d mul32 pdata ,29 ,pdata 
+5798 9a20a200 iadd rega ,rega 
+5799 efe08011 ifetch 1 ,rega 
+579a 67e0c3a8 store 1 ,mem_xrecord_mode 
+
+mouse_start_reconnect:
+579b 6fe0c3a8 fetch 1 ,mem_xrecord_mode 
+579c c01a57a8 beq rec_4_mode ,mouse4_0_check_reconn_target 
+579d 20205e21 branch mouse_start_discovery 
+
+mouse_wakeup_from_power_check:
+579e 44a04008 bpatch patch08_0 ,mem_patch08 
+579f 78547c00 disable user 
+57a0 6fe44848 fetch mouse_flag_len ,mem_mouse_flag 
+57a1 c305d7a5 bbit0 mouse_enable_wakeup_from_power ,mouse_wakeup_from_power 
+57a2 6fe084f1 fetch 1 ,mem_wakup_from_power_flag 
+57a3 c30157a5 bbit0 bit_power_on ,mouse_wakeup_from_power 
+57a4 78347c00 enable user 
+
+mouse_wakeup_from_power:
+57a5 6fe0c74f fetch 1 ,mem_reconn_times_init 
+57a6 67e0c74e store 1 ,mem_reconn_times 
+57a7 20600000 rtn 
+
+mouse4_0_check_reconn_target:
+57a8 70476501 jam 1 ,mem_mouse_le_reconnect_flag 
+57a9 6848c853 fetcht 1 ,mem_mouse_fast_direct_timeout 
+57aa 6fe0c75f fetch 1 ,mem_mouse_bluetooth_fast_conn_flag 
+57ab c07fd7ad beq 0xff ,mouse4_0_check_reconn_target_next 
+57ac 6848c59c fetcht 1 ,mem_mouse_direct_timeout 
+
+mouse4_0_check_reconn_target_next:
+57ad 6048c815 storet 1 ,mem_mouse_direct_timer 
+57ae 20404e2e call app_lpm_mult_disable 
+57af 6fe1c76d fetch 3 ,mem_le_adv_direct_ind 
+57b0 67e1c320 store 3 ,mem_le_adv_data + 4 
+57b1 20405d73 call mouse_le_check_adv_flag 
+57b2 58000004 setarg adv_flag_bredr_not_supported 
+57b3 e7e08006 istore 1 ,contr 
+57b4 d8c0433c arg mem_le_scan_data ,contr 
+57b5 20405d7a call mouse_le_adv_data_update 
+57b6 202070e0 branch check_51cmd_adv 
+
+mouse_lpm_check_wake_lock:
+57b7 c5134e09 bmark1 mark_24g ,app_get_lpm_wake_lock 
+57b8 6fe0c74a fetch 1 ,mem_mouse_clear_sensor_data_flag 
+57b9 203a4e09 branch app_get_lpm_wake_lock ,blank 
+57ba 6fe0c792 fetch 1 ,mem_mouse_le_conn_param_reject 
+57bb c000ce09 beq le_lpm_disable ,app_get_lpm_wake_lock 
+57bc 6fe0c57b fetch 1 ,mem_mouse_wheel_trigger 
+57bd 243a4e09 nbranch app_get_lpm_wake_lock ,blank 
+57be 20204e0b branch app_put_lpm_wake_lock 
+
+mouse_delay_enter_hibernata:
+57bf 6fe0c59c fetch 1 ,mem_mouse_direct_timeout 
+57c0 67e0c762 store 1 ,mem_mouse_bluetooth_reconnect_timeout 
+57c1 20600000 rtn 
+
+mouse_power_down:
+57c2 204061ef call mouse_device_led_all_off 
+
+mouse_app_enter_hibernate:
+57c3 44a0c008 bpatch patch08_1 ,mem_patch08 
+57c4 58000006 setarg pan_reg_config 
+57c5 20406723 call twspi_read 
+57c6 c281d7c9 bbit1 3 ,mouse_app_enter_hibernate_next 
+57c7 20405bef call mouse_sensor_reset 
+57c8 20405bf9 call mouse_sensor_powerdown 
+
+mouse_app_enter_hibernate_next:
+57c9 204057d7 call mouse_setgpio_hibernate 
+57ca 20204e28 branch app_enter_hibernate 
+
+mouse_before_hibernate:
+57cb 44a14008 bpatch patch08_2 ,mem_patch08 
+57cc 6ff20130 fetch 4 ,core_lpm_ctrl 
+57cd 79207e1a set1 26 ,pdata 
+57ce 67f2004c store 4 ,core_lpm_reg 
+57cf 20403c37 call lpm_write_ctrl 
+57d0 20406fd7 call disable_authrom 
+57d1 204061ef call mouse_device_led_all_off 
+57d2 204059d7 call mouse_before_hibernate_wheel_gpio_set 
+57d3 204057d7 call mouse_setgpio_hibernate 
+57d4 20405ee2 call mouse_flash_power_down 
+57d5 6848c5b8 fetcht 1 ,mem_sensor_motion_gpio 
+57d6 20206c1b branch gpio_clr_wake 
+
+mouse_setgpio_hibernate:
+57d7 44a1c008 bpatch patch08_3 ,mem_patch08 
+57d8 20405c9a call mouse_set_sdio_high 
+57d9 2040765e call clear_wake 
+57da 20405802 call mouse_lpm_before_common 
+57db 204057f4 call mouse_gpio_pu_idle 
+57dc 6848c5ba fetcht 1 ,mem_mouse_reuse_2ice_gpio 
+57dd 20405915 call mouse_gpio_config_input_pu 
+57de 20405919 call mouse_gpio_set_high_impedance 
+57df 204057ed call mouse_adc_gpio_set_before_hibernate 
+57e0 202057e1 branch mouse_wheel_gpio_set_before_hibernate 
+
+mouse_wheel_gpio_set_before_hibernate:
+57e1 6fe44848 fetch mouse_flag_len ,mem_mouse_flag 
+57e2 c41e0000 rtnbit0 mouse_enable_wheel_wake_up_cancel 
+
+mouse_wheel_gpio_clr_wakeup:
+57e3 6848c5ab fetcht 1 ,mem_whee_a_data_gpio 
+57e4 20406c1b call gpio_clr_wake 
+57e5 6848c5ac fetcht 1 ,mem_whee_b_data_gpio 
+57e6 20406c1b call gpio_clr_wake 
+57e7 6fe0c5ab fetch 1 ,mem_whee_a_data_gpio 
+57e8 d8400080 arg gpcfg_pulldown ,temp 
+57e9 20406c68 call gpio_config_function_int 
+57ea 6fe0c5ac fetch 1 ,mem_whee_b_data_gpio 
+57eb d8400080 arg gpcfg_pulldown ,temp 
+57ec 20206c68 branch gpio_config_function_int 
+
+mouse_adc_gpio_set_before_hibernate:
+57ed 6fe44848 fetch mouse_flag_len ,mem_mouse_flag 
+57ee c40a0000 rtnbit0 mouse_enable_adc 
+57ef 6fe0c597 fetch 1 ,mem_adc_config_flag_init 
+57f0 c1810000 rtnne adc_config_gpio 
+57f1 6fe0c596 fetch 1 ,mem_adc_channel_gpio 
+57f2 d84000c0 arg gpcfg_no_ie ,temp 
+57f3 20206c68 branch gpio_config_function_int 
+
+mouse_gpio_pu_idle:
+57f4 d8c08070 arg core_gpio_conf ,contr 
+57f5 df200013 arg 19 ,loopcnt 
+
+mouse_gpio_pu_idle_loop:
+57f6 efe08006 ifetch 1 ,contr 
+57f7 243a57fb nbranch mouse_gpio_pu_idle_configured ,blank 
+57f8 58000040 setarg 0x40 
+57f9 18c08bff add contr ,-1 ,contw 
+57fa e7e08005 istore 1 ,contw 
+
+mouse_gpio_pu_idle_configured:
+57fb c20057f6 loop mouse_gpio_pu_idle_loop 
+57fc 20600000 rtn 
+
+mouse_process_lpm_before:
+57fd c6130000 rtnmark1 mark_24g 
+57fe 20405802 call mouse_lpm_before_common 
+57ff 6fe08015 fetch 1 ,mem_lpm_current_mult 
+5800 247a0000 nrtn blank 
+5801 20206c1b branch gpio_clr_wake 
+
+mouse_lpm_before_common:
+5802 44a24008 bpatch patch08_4 ,mem_patch08 
+5803 6848c5ab fetcht 1 ,mem_whee_a_data_gpio 
+5804 20406c29 call gpio_config_input 
+5805 6848c5ac fetcht 1 ,mem_whee_b_data_gpio 
+5806 20406c29 call gpio_config_input 
+5807 2040594a call mouse_wheel_check 
+5808 6fe0c5ad fetch 1 ,mem_mouse_sensor_sclk_gpio 
+5809 d840003f arg gpcfg_output_high ,temp 
+580a 20406c68 call gpio_config_function_int 
+580b 2040671a call twspi_disable 
+580c 6848c5a5 fetcht 1 ,mem_lbutton_gpio 
+580d 20406c0f call gpio_set_wake 
+580e 6848c5a7 fetcht 1 ,mem_rbutton_gpio 
+580f 20406c0f call gpio_set_wake 
+5810 6848c5a6 fetcht 1 ,mem_mbutton_gpio 
+5811 20406c0f call gpio_set_wake 
+5812 6848c5a8 fetcht 1 ,mem_bk_button_gpio 
+5813 20406c0f call gpio_set_wake 
+5814 6848c5a9 fetcht 1 ,mem_fw_button_gpio 
+5815 20406c0f call gpio_set_wake 
+5816 6848c5aa fetcht 1 ,mem_dpi_button_gpio 
+5817 20406c0f call gpio_set_wake 
+5818 6848c5b6 fetcht 1 ,mem_config_select_device_button_gpio 
+5819 20406c0f call gpio_set_wake 
+581a 6848c5b7 fetcht 1 ,mem_customer_key_gpio 
+581b 20406c0f call gpio_set_wake 
+581c 6848c5ab fetcht 1 ,mem_whee_a_data_gpio 
+581d 20406c0b call gpio_set_wake_by_current_state 
+581e 6848c5ac fetcht 1 ,mem_whee_b_data_gpio 
+581f 20406c0b call gpio_set_wake_by_current_state 
+5820 6848c5b3 fetcht 1 ,mem_whee_ta_data_gpio 
+5821 20406c0b call gpio_set_wake_by_current_state 
+5822 6848c5b4 fetcht 1 ,mem_whee_tb_data_gpio 
+5823 20406c0b call gpio_set_wake_by_current_state 
+5824 6848c5b8 fetcht 1 ,mem_sensor_motion_gpio 
+5825 20206c0f branch gpio_set_wake 
+
+mouse_set_mult:
+5826 6fe1442f fetch 2 ,mem_ui_state_map 
+5827 c284d829 bbit1 ui_state_ble_connected ,mouse_set_ble_mult 
+5828 20600000 rtn 
+
+mouse_set_ble_mult:
+5829 1a227e00 copy rega ,pdata 
+582a 243a41ae nbranch le_set_config_short_mult ,blank 
+582b 202041b0 branch le_clr_config_short_mult 
+
+mouse_adc_gpio_set:
+582c 6fe0c3c2 fetch 1 ,mem_adc_config_flag 
+582d c1810000 rtnne adc_config_gpio 
+
+mouse_adc_gpio_check_output:
+582e 44a2c008 bpatch patch08_5 ,mem_patch08 
+582f 6848c3c3 fetcht 1 ,mem_adc_channel 
+5830 18467c03 sub temp ,3 ,null 
+5831 2021583a branch mouse_adc_gpio_4_7_set ,positive 
+5832 18408405 increase 5 ,temp 
+5833 6048c596 storet 1 ,mem_adc_channel_gpio 
+
+mouse_adc_gpio_set_next:
+5834 18422200 copy temp ,rega 
+5835 20406c6f call gpio_get_config 
+5836 c01fe237 beq gpcfg_output_high ,mouse_set_24g_led_statue 
+5837 20406235 call mouse_clear_24g_led_statue 
+5838 1a220400 copy rega ,temp 
+5839 20206c5b branch gpio_set_high_impedance 
+
+mouse_adc_gpio_4_7_set:
+583a 18408404 increase 4 ,temp 
+583b 6048c596 storet 1 ,mem_adc_channel_gpio 
+583c 20205834 branch mouse_adc_gpio_set_next 
+
+mouse_adc_vol_init:
+583d 6fe0c597 fetch 1 ,mem_adc_config_flag_init 
+583e c0015846 beq adc_config_gpio ,mouse_adc_gpio_vol_init 
+583f c000584b beq adc_config_vinlpm ,mouse_adc_gpio_vinlpm_init 
+5840 70459700 jam adc_config_vinlpm ,mem_adc_config_flag_init 
+5841 582c0172 setarg 0x2c0172 
+5842 67e1c57d store 3 ,mem_mouse_vdd_full_vol 
+5843 58014001 setarg 0x014001 
+5844 e7e18005 istore 3 ,contw 
+5845 20600000 rtn 
+
+mouse_adc_gpio_vol_init:
+5846 585d0099 setarg 0x5d0099 
+5847 67e1c57d store 3 ,mem_mouse_vdd_full_vol 
+5848 58007100 setarg 0x007100 
+5849 e7e18005 istore 3 ,contw 
+584a 20600000 rtn 
+
+mouse_adc_gpio_vinlpm_init:
+584b 58c8012c setarg 0xc8012c 
+584c 67e1c57d store 3 ,mem_mouse_vdd_full_vol 
+584d 5800dc00 setarg 0x00dc00 
+584e e7e18005 istore 3 ,contw 
+584f 20600000 rtn 
+
+mouse_adc_gpio_mux_init:
+5850 6fe44848 fetch mouse_flag_len ,mem_mouse_flag 
+5851 c40a0000 rtnbit0 mouse_enable_adc 
+5852 70458f01 jam mouse_adc_check_multiple ,mem_adc_mux_status 
+5853 c3970000 rtnbit1 mouse_enable_dpi_key_connect_adc 
+5854 c3958000 rtnbit1 mouse_enable_select_device_by_switch_adc 
+5855 70458f00 jam mouse_adc_check_battery_only ,mem_adc_mux_status 
+5856 20600000 rtn 
+
+mouse_adc_read_interval:
+5857 6fe0c590 fetch 1 ,mem_adc_read_timer 
+5858 1fe0fe01 increase 1 ,pdata 
+5859 67e0c590 store 1 ,mem_adc_read_timer 
+585a 6848c591 fetcht 1 ,mem_adc_read_time_init 
+585b 98467c00 isub temp ,null 
+585c 20600000 rtn 
+
+mouse_adc_read:
+585d 6fe44848 fetch mouse_flag_len ,mem_mouse_flag 
+585e c40a0000 rtnbit0 mouse_enable_adc 
+585f 2040582c call mouse_adc_gpio_set 
+5860 6fe0c58f fetch 1 ,mem_adc_mux_status 
+5861 203a5874 branch mouse_adc_read_battery ,blank 
+5862 6fe0c3c2 fetch 1 ,mem_adc_config_flag 
+5863 c0015869 beq adc_config_gpio ,mouse_adc_read_gpio_mux_start 
+5864 70458f03 jam mouse_adc_check_vinlpm_multiple ,mem_adc_mux_status 
+5865 20405857 call mouse_adc_read_interval 
+5866 2021586b branch mouse_adc_read_gpio ,positive 
+5867 20405870 call mouse_adc_read_vinlpm 
+5868 2020587a branch mouse_adc_read_start 
+
+mouse_adc_read_gpio_mux_start:
+5869 70458f02 jam mouse_adc_check_gpio_multiple ,mem_adc_mux_status 
+586a 2020587a branch mouse_adc_read_start 
+
+mouse_adc_read_gpio:
+586b 2040582e call mouse_adc_gpio_check_output 
+586c 7043c202 jam adc_config_gpio ,mem_adc_config_flag 
+586d 6fe0c847 fetch 1 ,mem_24g_device_led_status 
+586e 245a5870 ncall mouse_adc_read_vinlpm ,blank 
+586f 2020587a branch mouse_adc_read_start 
+
+mouse_adc_read_vinlpm:
+5870 70459000 jam 0 ,mem_adc_read_timer 
+5871 6fe0c597 fetch 1 ,mem_adc_config_flag_init 
+5872 67e0c3c2 store 1 ,mem_adc_config_flag 
+5873 20600000 rtn 
+
+mouse_adc_read_battery:
+5874 6fe0c3c2 fetch 1 ,mem_adc_config_flag 
+5875 c0815878 bne adc_config_gpio ,mouse_adc_read_battery_start 
+5876 6fe0c847 fetch 1 ,mem_24g_device_led_status 
+5877 247a0000 nrtn blank 
+
+mouse_adc_read_battery_start:
+5878 20405857 call mouse_adc_read_interval 
+5879 24610000 nrtn positive 
+
+mouse_adc_read_start:
+587a 44a34008 bpatch patch08_6 ,mem_patch08 
+587b 6fe0c847 fetch 1 ,mem_24g_device_led_status 
+587c 247a0000 nrtn blank 
+587d 70459000 jam 0 ,mem_adc_read_timer 
+587e 20406c98 call enable_adc 
+587f 20406cc0 call vdd_calculate_by_mode 
+5880 67e14583 store 2 ,mem_mouse_vdd_now_vol 
+5881 6fe0c3c2 fetch 1 ,mem_adc_config_flag 
+5882 c0815889 bne adc_config_gpio ,mouse_adc_data_process 
+5883 68494583 fetcht 2 ,mem_mouse_vdd_now_vol 
+5884 184ffe08 mul32 temp ,8 ,pdata 
+5885 1fe6fc0a div pdata ,10 
+5886 204075cd call get_div_result 
+5887 9840fe00 iadd temp ,pdata 
+5888 67e14583 store 2 ,mem_mouse_vdd_now_vol 
+
+mouse_adc_data_process:
+5889 da20457d arg mem_mouse_vdd_calculate_set ,rega 
+588a 2040589b call mouse_adc_bat_percent_lowpower_out 
+588b 6fe0c3c6 fetch 1 ,mem_adc_power_flag 
+588c c28158dc bbit1 2 ,mouse_adc_button_press 
+588d c280d7c2 bbit1 1 ,mouse_power_down 
+588e c3005893 bbit0 0 ,mouse_adc_no_low_voltage 
+588f 70459401 jam 1 ,mem_mouse_adc_last_low_voltage_flag 
+5890 20205891 branch mouse_adc_low_voltage 
+
+mouse_adc_low_voltage:
+5891 d8e00004 arg mouse_low_voltage_flag ,queue 
+5892 20205fa1 branch mouse_enable_function_flag 
+
+mouse_adc_no_low_voltage:
+5893 d8e00004 arg mouse_low_voltage_flag ,queue 
+5894 20405fa5 call mouse_disable_function_flag 
+5895 7045920c jam 12 ,mem_adc_low_volatage_led_timer_count 
+5896 6fe0c594 fetch 1 ,mem_mouse_adc_last_low_voltage_flag 
+5897 207a0000 rtn blank 
+5898 70459400 jam 0 ,mem_mouse_adc_last_low_voltage_flag 
+5899 6848c5bb fetcht 1 ,mem_config_low_voltage_alarm_gpio 
+589a 2020620c branch mouse_led_off 
+
+mouse_adc_bat_percent_lowpower_out:
+589b 44a3c008 bpatch patch08_7 ,mem_patch08 
+589c efe40011 ifetch 8 ,rega 
+589d 67e404c4 store 8 ,mem_pdatatemp 
+589e 6fe0c58f fetch 1 ,mem_adc_mux_status 
+589f c00058b2 beq mouse_adc_check_battery_only ,mouse_adc_bat_percent_lowpower_out_battery 
+58a0 c00158a2 beq mouse_adc_check_gpio_multiple ,mouse_adc_bat_percent_lowpower_out_gpio_multiple 
+58a1 c001d8d1 beq mouse_adc_check_vinlpm_multiple ,mouse_adc_bat_percent_lowpower_out_vinlpm_multiple 
+
+mouse_adc_bat_percent_lowpower_out_gpio_multiple:
+58a2 6fe44848 fetch mouse_flag_len ,mem_mouse_flag 
+58a3 c31758a8 bbit0 mouse_enable_dpi_key_connect_adc ,mouse_adc_bat_percent_lowpower_out_gpio_switch 
+58a4 6fe104ca fetch 2 ,mem_pdatatemp + 6 
+58a5 68494585 fetcht 2 ,mem_mouse_vdd_button_press_vol 
+58a6 98467c00 isub temp ,null 
+58a7 242158d4 nbranch mouse_adc_set_button_press_flag ,positive 
+
+mouse_adc_bat_percent_lowpower_out_gpio_switch:
+58a8 6fe44848 fetch mouse_flag_len ,mem_mouse_flag 
+58a9 c315d8b2 bbit0 mouse_enable_select_device_by_switch_adc ,mouse_adc_bat_percent_lowpower_out_battery 
+58aa 70459500 jam 0 ,mem_mouse_adc_button_press_flag 
+58ab 6fe104ca fetch 2 ,mem_pdatatemp + 6 
+58ac 68494587 fetcht 2 ,mem_mouse_vdd_switch_gnd_24g_vol 
+58ad 98467c00 isub temp ,null 
+58ae 242158b1 nbranch mouse_select_24gdevice ,positive 
+58af 20405f5c call mouse_select_btdevice 
+58b0 202058b2 branch mouse_adc_bat_percent_lowpower_out_battery 
+
+mouse_select_24gdevice:
+58b1 20405f60 call mouse_check_select_24gdevice 
+
+mouse_adc_bat_percent_lowpower_out_battery:
+58b2 204058d8 call mouse_adc_clear_button_press_flag 
+58b3 20406d0b call adc_clear_no_power_flag 
+58b4 20406d03 call adc_clear_low_power_flag 
+58b5 6fe104ca fetch 2 ,mem_pdatatemp + 6 
+58b6 684904c6 fetcht 2 ,mem_pdatatemp + 2 
+58b7 98467c00 isub temp ,null 
+58b8 24416d07 ncall adc_set_no_power_flag ,positive 
+58b9 684904c8 fetcht 2 ,mem_pdatatemp + 4 
+58ba 98467c00 isub temp ,null 
+58bb 24416cff ncall adc_set_low_power_flag ,positive 
+
+mouse_adc_bat_level_set:
+58bc 6fe104ca fetch 2 ,mem_pdatatemp + 6 
+58bd 684904c4 fetcht 2 ,mem_pdatatemp 
+58be 98467c00 isub temp ,null 
+58bf 202158cd branch mouse_adc_bat_level_100_percent ,positive 
+58c0 684904c6 fetcht 2 ,mem_pdatatemp + 2 
+58c1 98467e00 isub temp ,pdata 
+58c2 242158cf nbranch mouse_adc_bat_level_0_percent ,positive 
+58c3 203a58cf branch mouse_adc_bat_level_0_percent ,blank 
+58c4 1fefa264 mul32 pdata ,100 ,rega 
+58c5 6fe104c4 fetch 2 ,mem_pdatatemp 
+58c6 684904c6 fetcht 2 ,mem_pdatatemp + 2 
+58c7 98460400 isub temp ,temp 
+58c8 1a227e00 copy rega ,pdata 
+58c9 9846fc00 idiv temp 
+58ca 204075cd call get_div_result 
+58cb 67e0c78d store 1 ,mem_le_battery_level_percentage 
+58cc 20600000 rtn 
+
+mouse_adc_bat_level_100_percent:
+58cd 70478d64 jam 100 ,mem_le_battery_level_percentage 
+58ce 20600000 rtn 
+
+mouse_adc_bat_level_0_percent:
+58cf 70478d00 jam 0 ,mem_le_battery_level_percentage 
+58d0 20600000 rtn 
+
+mouse_adc_bat_percent_lowpower_out_vinlpm_multiple:
+58d1 6fe0c3c2 fetch 1 ,mem_adc_config_flag 
+58d2 c00158a2 beq adc_config_gpio ,mouse_adc_bat_percent_lowpower_out_gpio_multiple 
+58d3 202058b2 branch mouse_adc_bat_percent_lowpower_out_battery 
+
+mouse_adc_set_button_press_flag:
+58d4 6848c3c6 fetcht 1 ,mem_adc_power_flag 
+58d5 79200402 set1 2 ,temp 
+58d6 6048c3c6 storet 1 ,mem_adc_power_flag 
+58d7 20600000 rtn 
+
+mouse_adc_clear_button_press_flag:
+58d8 6848c3c6 fetcht 1 ,mem_adc_power_flag 
+58d9 793f8402 set0 2 ,temp 
+58da 6048c3c6 storet 1 ,mem_adc_power_flag 
+58db 20600000 rtn 
+
+mouse_adc_button_press:
+58dc 70459501 jam 1 ,mem_mouse_adc_button_press_flag 
+58dd 20600000 rtn 
+
+mouse_gpio_init:
+58de 6848c3d5 fetcht 1 ,mem_eeprom_wp_gpio 
+58df 20406c43 call gpio_config_output 
+58e0 20407199 call usb_offline_check_init 
+58e1 6848c5a5 fetcht 1 ,mem_lbutton_gpio 
+58e2 20405915 call mouse_gpio_config_input_pu 
+58e3 6848c5a7 fetcht 1 ,mem_rbutton_gpio 
+58e4 20405915 call mouse_gpio_config_input_pu 
+58e5 6848c5a6 fetcht 1 ,mem_mbutton_gpio 
+58e6 20405915 call mouse_gpio_config_input_pu 
+58e7 6848c5a8 fetcht 1 ,mem_bk_button_gpio 
+58e8 20405915 call mouse_gpio_config_input_pu 
+58e9 6848c5a9 fetcht 1 ,mem_fw_button_gpio 
+58ea 20405915 call mouse_gpio_config_input_pu 
+58eb 6848c5aa fetcht 1 ,mem_dpi_button_gpio 
+58ec 20405915 call mouse_gpio_config_input_pu 
+58ed 6848c5b5 fetcht 1 ,mem_matrix_public_gpio 
+58ee 20405915 call mouse_gpio_config_input_pu 
+58ef 6848c5b6 fetcht 1 ,mem_config_select_device_button_gpio 
+58f0 20405915 call mouse_gpio_config_input_pu 
+58f1 6848c5b7 fetcht 1 ,mem_customer_key_gpio 
+58f2 20405915 call mouse_gpio_config_input_pu 
+58f3 6848c5ab fetcht 1 ,mem_whee_a_data_gpio 
+58f4 20405915 call mouse_gpio_config_input_pu 
+58f5 6848c5ac fetcht 1 ,mem_whee_b_data_gpio 
+58f6 20405915 call mouse_gpio_config_input_pu 
+58f7 6848c5b3 fetcht 1 ,mem_whee_ta_data_gpio 
+58f8 20405915 call mouse_gpio_config_input_pu 
+58f9 6848c5b4 fetcht 1 ,mem_whee_tb_data_gpio 
+58fa 20405915 call mouse_gpio_config_input_pu 
+58fb 6848c5b8 fetcht 1 ,mem_sensor_motion_gpio 
+58fc 20405915 call mouse_gpio_config_input_pu 
+58fd 6848c5b9 fetcht 1 ,mem_device_switch_gpio 
+58fe 20405915 call mouse_gpio_config_input_pu 
+58ff 6848c5bb fetcht 1 ,mem_config_low_voltage_alarm_gpio 
+5900 20406c43 call gpio_config_output 
+5901 6848c5bc fetcht 1 ,mem_config_device_24g_led_gpio 
+5902 20406c43 call gpio_config_output 
+5903 6848c5bd fetcht 1 ,mem_config_device_bt1_led_gpio 
+5904 20406c43 call gpio_config_output 
+5905 6848c5be fetcht 1 ,mem_config_device_bt2_led_gpio 
+5906 20406c43 call gpio_config_output 
+5907 6848c5bf fetcht 1 ,mem_dpi_led_gpio 
+5908 20406c43 call gpio_config_output 
+5909 6848c5af fetcht 1 ,mem_select_sensor_angle_gpio 
+590a 20205915 branch mouse_gpio_config_input_pu 
+
+mouse_gpio_set_pupd_by_input:
+590b 18467cff sub temp ,ui_button_gpio_disable ,null 
+590c 20628000 rtn zero 
+590d 18410e7f and temp ,0x7f ,queue 
+590e 6ff2011c fetch 4 ,core_gpio_in 
+590f afefffff qisolate1 pdata 
+5910 2020d915 branch mouse_gpio_config_input_pu ,true 
+
+mouse_gpio_config_input_pd:
+5911 18467cff sub temp ,ui_button_gpio_disable ,null 
+5912 20628000 rtn zero 
+5913 79200407 set1 gpio_active_bit ,temp 
+5914 20206c29 branch gpio_config_input 
+
+mouse_gpio_config_input_pu:
+5915 18467cff sub temp ,ui_button_gpio_disable ,null 
+5916 20628000 rtn zero 
+5917 793f8407 set0 gpio_active_bit ,temp 
+5918 20206c29 branch gpio_config_input 
+
+mouse_gpio_set_high_impedance:
+5919 6fe1c87a fetch 3 ,mem_mouse_set_high_impedance_bit_set 
+591a 67e184c4 store 3 ,mem_pdatatemp 
+591b df20000d arg 13 ,loopcnt 
+591c d8400000 arg 0 ,temp 
+
+mouse_gpio_set_high_impedance_bit_loop:
+591d 6fe184c4 fetch 3 ,mem_pdatatemp 
+591e 2feffe00 isolate1 0 ,pdata 
+591f 2040ec5b call gpio_set_high_impedance ,true 
+5920 6fe184c4 fetch 3 ,mem_pdatatemp 
+5921 1fe3fe00 lshift pdata ,pdata 
+5922 67e184c4 store 3 ,mem_pdatatemp 
+5923 18408401 increase 1 ,temp 
+5924 c200591d loop mouse_gpio_set_high_impedance_bit_loop 
+5925 20600000 rtn 
+
+mouse_sensor_spi_init:
+5926 2040592b call mouse_spid_init_pin 
+5927 7043aa73 jam 0x73 ,mem_spi_init_clk 
+5928 2040592a call mouse_spi_init 
+5929 2020671e branch twspi_enable 
+
+mouse_spi_write_flash_cb:
+
+mouse_spi_init:
+592a 2020691f branch spid_init 
+
+mouse_spid_init_pin:
+592b 6fe0c5ad fetch 1 ,mem_mouse_sensor_sclk_gpio 
+592c d8400021 arg gpcfg_spid_sck ,temp 
+592d 20406c68 call gpio_config_function_int 
+592e 6fe0c5ae fetch 1 ,mem_mouse_sensor_sdio_gpio 
+592f d8400023 arg gpcfg_spid_sdio ,temp 
+5930 20206c68 branch gpio_config_function_int 
+
+mouse_motion:
+5931 44a44009 bpatch patch09_0 ,mem_patch09 
+5932 78547c00 disable user 
+5933 58000000 setarg 0 
+5934 67e3456b store 6 ,mem_mouse_x 
+5935 20405bfe call mouse_check_sensor_data 
+5936 20405a4e call mouse_dpi_config 
+5937 20405940 call mouse_zwheel 
+5938 20405945 call mouse_t_zwheel 
+5939 20405a9b call mouse_key 
+593a 6fe0c56a fetch 1 ,mem_mouse_key 
+593b 1fe17e1f and_into 0x1f ,pdata 
+593c 67e0c56a store 1 ,mem_mouse_key 
+593d 24345fdb nbranch mouse_drawing_optima_init ,user 
+593e 20405fca call mouse_drawing_optima 
+593f 20205e12 branch mouse_no_data_timer_init 
+
+mouse_zwheel:
+5940 6fe0c57a fetch 1 ,mem_mouse_z_data 
+5941 207a0000 rtn blank 
+5942 67e0c56f store 1 ,mem_mouse_z 
+5943 70457a00 jam 0 ,mem_mouse_z_data 
+5944 20207636 branch enable_user 
+
+mouse_t_zwheel:
+5945 6fe0c576 fetch 1 ,mem_mouse_tz_data 
+5946 207a0000 rtn blank 
+5947 67e0c570 store 1 ,mem_mouse_tz 
+5948 70457600 jam 0 ,mem_mouse_tz_data 
+5949 20207636 branch enable_user 
+
+mouse_wheel_check:
+594a 20405957 call mouse_t_wheel_scan 
+594b 20405993 call mouse_wheel_scan 
+594c 6fe0c574 fetch 1 ,mem_wheel_tb_new_pinlevel 
+594d 6848c573 fetcht 1 ,mem_wheel_tb_old_pinlevel 
+594e 67e0c573 store 1 ,mem_wheel_tb_old_pinlevel 
+594f 98467c00 isub temp ,null 
+5950 2422ce0d nbranch app_lpm_wake_auto_lock ,zero 
+5951 6fe0c578 fetch 1 ,mem_mwheel_b_new_pinlevel 
+5952 6848c577 fetcht 1 ,mem_mwheel_b_old_pinlevel 
+5953 67e0c577 store 1 ,mem_mwheel_b_old_pinlevel 
+5954 98467c00 isub temp ,null 
+5955 2422ce0d nbranch app_lpm_wake_auto_lock ,zero 
+5956 20600000 rtn 
+
+mouse_t_wheel_scan:
+5957 6fe0c5b3 fetch 1 ,mem_whee_ta_data_gpio 
+5958 c17f8000 rtneq gpio_disable 
+5959 da200000 arg 0 ,rega 
+595a 6848c5b3 fetcht 1 ,mem_whee_ta_data_gpio 
+595b 20406c32 call gpio_get_bit 
+595c 7920a200 setflag true ,0 ,rega 
+595d 6848c5b4 fetcht 1 ,mem_whee_tb_data_gpio 
+595e 20406c32 call gpio_get_bit 
+595f 7920a201 setflag true ,1 ,rega 
+5960 1a227e00 copy rega ,pdata 
+5961 67e0c574 store 1 ,mem_wheel_tb_new_pinlevel 
+5962 c000d967 beq 0x01 ,mouse_t_wheel_scan_judge1 
+5963 c001596b beq 0x02 ,mouse_t_wheel_scan_judge2 
+5964 6fe0c575 fetch 1 ,mem_wheel_tog 
+5965 c283d977 bbit1 7 ,mouse_t_wheel_scan_judge3 
+5966 20600000 rtn 
+
+mouse_t_wheel_scan_judge1:
+5967 6fe0c573 fetch 1 ,mem_wheel_tb_old_pinlevel 
+5968 c000596f beq 0 ,mouse_t_wheel_scan_judge11 
+5969 c001d971 beq 3 ,mouse_t_wheel_scan_judge12 
+596a 20600000 rtn 
+
+mouse_t_wheel_scan_judge2:
+596b 6fe0c573 fetch 1 ,mem_wheel_tb_old_pinlevel 
+596c c0005973 beq 0 ,mouse_t_wheel_scan_judge21 
+596d c001d975 beq 3 ,mouse_t_wheel_scan_judge22 
+596e 20600000 rtn 
+
+mouse_t_wheel_scan_judge11:
+596f 70457582 jam 0x82 ,mem_wheel_tog 
+5970 20600000 rtn 
+
+mouse_t_wheel_scan_judge12:
+5971 70457581 jam 0x81 ,mem_wheel_tog 
+5972 20600000 rtn 
+
+mouse_t_wheel_scan_judge21:
+5973 70457580 jam 0x80 ,mem_wheel_tog 
+5974 20600000 rtn 
+
+mouse_t_wheel_scan_judge22:
+5975 70457583 jam 0x83 ,mem_wheel_tog 
+5976 20600000 rtn 
+
+mouse_t_wheel_scan_judge3:
+5977 6fe0c575 fetch 1 ,mem_wheel_tog 
+5978 793ffe07 set0 7 ,pdata 
+5979 67e0c575 store 1 ,mem_wheel_tog 
+597a c000597f beq 0 ,mouse_t_wheel_scan_judge30 
+597b c000d982 beq 1 ,mouse_t_wheel_scan_judge31 
+597c c0015985 beq 2 ,mouse_t_wheel_scan_judge32 
+597d c001d988 beq 3 ,mouse_t_wheel_scan_judge33 
+597e 20600000 rtn 
+
+mouse_t_wheel_scan_judge30:
+597f 6fe0c574 fetch 1 ,mem_wheel_tb_new_pinlevel 
+5980 c001d98b beq 3 ,mouse_wheel_t_forward 
+5981 20600000 rtn 
+
+mouse_t_wheel_scan_judge31:
+5982 6fe0c574 fetch 1 ,mem_wheel_tb_new_pinlevel 
+5983 c000598b beq 0 ,mouse_wheel_t_forward 
+5984 20600000 rtn 
+
+mouse_t_wheel_scan_judge32:
+5985 6fe0c574 fetch 1 ,mem_wheel_tb_new_pinlevel 
+5986 c001d98f beq 3 ,mouse_wheel_t_back 
+5987 20600000 rtn 
+
+mouse_t_wheel_scan_judge33:
+5988 6fe0c574 fetch 1 ,mem_wheel_tb_new_pinlevel 
+5989 c000598f beq 0 ,mouse_wheel_t_back 
+598a 20600000 rtn 
+
+mouse_wheel_t_forward:
+598b 6fe0c576 fetch 1 ,mem_mouse_tz_data 
+598c 1fe0fe01 increase 1 ,pdata 
+598d 67e0c576 store 1 ,mem_mouse_tz_data 
+598e 20600000 rtn 
+
+mouse_wheel_t_back:
+598f 6fe0c576 fetch 1 ,mem_mouse_tz_data 
+5990 1fe0ffff increase -1 ,pdata 
+5991 67e0c576 store 1 ,mem_mouse_tz_data 
+5992 20600000 rtn 
+
+mouse_wheel_scan:
+5993 6fe0c5ab fetch 1 ,mem_whee_a_data_gpio 
+5994 c17f8000 rtneq gpio_disable 
+5995 da200000 arg 0 ,rega 
+5996 6848c5ab fetcht 1 ,mem_whee_a_data_gpio 
+5997 20406c32 call gpio_get_bit 
+5998 7920a200 setflag true ,0 ,rega 
+5999 6848c5ac fetcht 1 ,mem_whee_b_data_gpio 
+599a 20406c32 call gpio_get_bit 
+599b 7920a201 setflag true ,1 ,rega 
+599c 1a227e00 copy rega ,pdata 
+599d 67e0c578 store 1 ,mem_mwheel_b_new_pinlevel 
+599e c000d9a3 beq 0x01 ,mouse_wheel_scan_judge1 
+599f c00159a7 beq 0x02 ,mouse_wheel_scan_judge2 
+59a0 6fe0c579 fetch 1 ,mem_mwheel_tog 
+59a1 c283d9b3 bbit1 7 ,mouse_wheel_scan_judge3 
+59a2 20600000 rtn 
+
+mouse_wheel_scan_judge1:
+59a3 6fe0c577 fetch 1 ,mem_mwheel_b_old_pinlevel 
+59a4 c00059ab beq 0 ,mouse_wheel_scan_judge11 
+59a5 c001d9ad beq 3 ,mouse_wheel_scan_judge12 
+59a6 20600000 rtn 
+
+mouse_wheel_scan_judge2:
+59a7 6fe0c577 fetch 1 ,mem_mwheel_b_old_pinlevel 
+59a8 c00059af beq 0 ,mouse_wheel_scan_judge21 
+59a9 c001d9b1 beq 3 ,mouse_wheel_scan_judge22 
+59aa 20600000 rtn 
+
+mouse_wheel_scan_judge11:
+59ab 70457982 jam 0x82 ,mem_mwheel_tog 
+59ac 20600000 rtn 
+
+mouse_wheel_scan_judge12:
+59ad 70457981 jam 0x81 ,mem_mwheel_tog 
+59ae 20600000 rtn 
+
+mouse_wheel_scan_judge21:
+59af 70457980 jam 0x80 ,mem_mwheel_tog 
+59b0 20600000 rtn 
+
+mouse_wheel_scan_judge22:
+59b1 70457983 jam 0x83 ,mem_mwheel_tog 
+59b2 20600000 rtn 
+
+mouse_wheel_scan_judge3:
+59b3 6fe0c579 fetch 1 ,mem_mwheel_tog 
+59b4 793ffe07 set0 7 ,pdata 
+59b5 67e0c579 store 1 ,mem_mwheel_tog 
+59b6 c00059bb beq 0 ,mouse_wheel_scan_judge30 
+59b7 c000d9be beq 1 ,mouse_wheel_scan_judge31 
+59b8 c00159c1 beq 2 ,mouse_wheel_scan_judge32 
+59b9 c001d9c4 beq 3 ,mouse_wheel_scan_judge33 
+59ba 20600000 rtn 
+
+mouse_wheel_scan_judge30:
+59bb 6fe0c578 fetch 1 ,mem_mwheel_b_new_pinlevel 
+59bc c001d9c7 beq 3 ,mouse_wheel_forward 
+59bd 20600000 rtn 
+
+mouse_wheel_scan_judge31:
+59be 6fe0c578 fetch 1 ,mem_mwheel_b_new_pinlevel 
+59bf c00059c7 beq 0 ,mouse_wheel_forward 
+59c0 20600000 rtn 
+
+mouse_wheel_scan_judge32:
+59c1 6fe0c578 fetch 1 ,mem_mwheel_b_new_pinlevel 
+59c2 c001d9cb beq 3 ,mouse_wheel_back 
+59c3 20600000 rtn 
+
+mouse_wheel_scan_judge33:
+59c4 6fe0c578 fetch 1 ,mem_mwheel_b_new_pinlevel 
+59c5 c00059cb beq 0 ,mouse_wheel_back 
+59c6 20600000 rtn 
+
+mouse_wheel_forward:
+59c7 6fe0c57a fetch 1 ,mem_mouse_z_data 
+59c8 1fe0fe01 increase 1 ,pdata 
+59c9 67e0c57a store 1 ,mem_mouse_z_data 
+59ca 20600000 rtn 
+
+mouse_wheel_back:
+59cb 6fe0c57a fetch 1 ,mem_mouse_z_data 
+59cc 1fe0ffff increase -1 ,pdata 
+59cd 67e0c57a store 1 ,mem_mouse_z_data 
+59ce 20600000 rtn 
+
+mouse_wheel_gpio_set_wake:
+59cf 6848c5ab fetcht 1 ,mem_whee_a_data_gpio 
+59d0 20406c0b call gpio_set_wake_by_current_state 
+59d1 6848c5ac fetcht 1 ,mem_whee_b_data_gpio 
+59d2 20406c0b call gpio_set_wake_by_current_state 
+59d3 6848c5b3 fetcht 1 ,mem_whee_ta_data_gpio 
+59d4 20406c0b call gpio_set_wake_by_current_state 
+59d5 6848c5b4 fetcht 1 ,mem_whee_tb_data_gpio 
+59d6 20206c0b branch gpio_set_wake_by_current_state 
+
+mouse_before_hibernate_wheel_gpio_set:
+59d7 6848c5ab fetcht 1 ,mem_whee_a_data_gpio 
+59d8 2040590b call mouse_gpio_set_pupd_by_input 
+59d9 6848c5ac fetcht 1 ,mem_whee_b_data_gpio 
+59da 2040590b call mouse_gpio_set_pupd_by_input 
+59db 6848c5b3 fetcht 1 ,mem_whee_ta_data_gpio 
+59dc 2040590b call mouse_gpio_set_pupd_by_input 
+59dd 6848c5b4 fetcht 1 ,mem_whee_tb_data_gpio 
+59de 2020590b branch mouse_gpio_set_pupd_by_input 
+
+mouse_wheel_trigger:
+59df 6fe1456f fetch 2 ,mem_mouse_z 
+59e0 207a0000 rtn blank 
+59e1 70457b01 jam 1 ,mem_mouse_wheel_trigger 
+59e2 70457c0a jam 10 ,mem_mouse_wheel_trigger_timer 
+59e3 20600000 rtn 
+
+mouse_wheel_trigger_timer:
+59e4 da60457c arg mem_mouse_wheel_trigger_timer ,regc 
+59e5 da4059e7 arg mouse_wheel_trigger_disable ,regb 
+59e6 20204de1 branch timer_single_step 
+
+mouse_wheel_trigger_disable:
+59e7 70457b00 jam 0 ,mem_mouse_wheel_trigger 
+59e8 20600000 rtn 
+
+mouse_dpi_check:
+59e9 6fe44848 fetch mouse_flag_len ,mem_mouse_flag 
+59ea c2975a10 bbit1 mouse_enable_dpi_key_connect_adc ,mouse_dpi_check_connect_adc 
+59eb 6fe0c5aa fetch 1 ,mem_dpi_button_gpio 
+59ec c17f8000 rtneq gpio_disable 
+59ed da200000 arg 0 ,rega 
+59ee 70483305 jam mouse_dpi_key ,mem_mouse_key_temp 
+59ef 6848c5aa fetcht 1 ,mem_dpi_button_gpio 
+59f0 204059f8 call mouse_dpi_key_check 
+59f1 67e0c830 store 1 ,mem_mouse_dpikey_press_status 
+59f2 6fe0c5b5 fetch 1 ,mem_matrix_public_gpio 
+59f3 c07fda08 beq gpio_disable ,mouse_3io6key_dpi_check_end 
+59f4 20405b1e call mouse_matrix_public_gpio_reset 
+
+mouse_dpi_check_exit:
+59f5 1a227e00 copy rega ,pdata 
+59f6 c282da12 bbit1 mouse_dpi_key ,mouse_dpi_down 
+59f7 20205a19 branch mouse_dpi_up 
+
+mouse_dpi_key_check:
+59f8 6fe44848 fetch mouse_flag_len ,mem_mouse_flag 
+59f9 c2965a0e bbit1 mouse_enable_dpi_key_connect_gnd ,mouse_dpi_key_connect_gnd 
+59fa 6fe0c830 fetch 1 ,mem_mouse_dpikey_press_status 
+59fb 1fe22600 copy pdata ,regc 
+59fc 6fe0c5b5 fetch 1 ,mem_matrix_public_gpio 
+59fd c07fdb52 beq gpio_disable ,mouse_3io6key_check 
+59fe 6fe0c837 fetch 1 ,mem_mouse_ghost_flag 
+59ff 243a5a0b nbranch mouse_dpi_check_end ,blank 
+
+mouse_dpi_key_connect_matrix:
+5a00 20406c32 call gpio_get_bit 
+5a01 6848c5b5 fetcht 1 ,mem_matrix_public_gpio 
+5a02 2020da0e branch mouse_dpi_key_connect_gnd ,true 
+5a03 6848c5b5 fetcht 1 ,mem_matrix_public_gpio 
+5a04 20406c43 call gpio_out_active 
+5a05 6848c5aa fetcht 1 ,mem_dpi_button_gpio 
+5a06 6fe0c830 fetch 1 ,mem_mouse_dpikey_press_status 
+5a07 20205b46 branch mouse_check_key_connect_gnd 
+
+mouse_3io6key_dpi_check_end:
+5a08 6848c5aa fetcht 1 ,mem_dpi_button_gpio 
+5a09 20405915 call mouse_gpio_config_input_pu 
+5a0a 202059f5 branch mouse_dpi_check_exit 
+
+mouse_dpi_check_end:
+5a0b 70467600 jam dpi_button_state_up ,mem_mouse_dpi_button_state 
+5a0c 70483000 jam 0 ,mem_mouse_dpikey_press_status 
+5a0d 20600000 rtn 
+
+mouse_dpi_key_connect_gnd:
+5a0e 6fe0c830 fetch 1 ,mem_mouse_dpikey_press_status 
+5a0f 20205b46 branch mouse_check_key_connect_gnd 
+
+mouse_dpi_check_connect_adc:
+5a10 6fe0c595 fetch 1 ,mem_mouse_adc_button_press_flag 
+5a11 203a5a19 branch mouse_dpi_up ,blank 
+
+mouse_dpi_down:
+5a12 6fe0c676 fetch 1 ,mem_mouse_dpi_button_state 
+5a13 c1008000 rtneq dpi_button_state_down 
+5a14 70467601 jam dpi_button_state_down ,mem_mouse_dpi_button_state 
+5a15 6fe44848 fetch mouse_flag_len ,mem_mouse_flag 
+5a16 c3940000 rtnbit1 mouse_enable_select_device_by_dpi_button 
+5a17 c39b0000 rtnbit1 mouse_enable_dpi_key_long_press_disconvery 
+5a18 20205a29 branch mouse_dpi_process 
+
+mouse_dpi_up:
+5a19 6fe0c676 fetch 1 ,mem_mouse_dpi_button_state 
+5a1a c1000000 rtneq dpi_button_state_up 
+5a1b 70467600 jam dpi_button_state_up ,mem_mouse_dpi_button_state 
+5a1c 6fe44848 fetch mouse_flag_len ,mem_mouse_flag 
+5a1d c2945a20 bbit1 mouse_enable_select_device_by_dpi_button ,mouse_dpi_up_next 
+5a1e c29b5a20 bbit1 mouse_enable_dpi_key_long_press_disconvery ,mouse_dpi_up_next 
+5a1f 20600000 rtn 
+
+mouse_dpi_up_next:
+5a20 6fe0c677 fetch 1 ,mem_mouse_dpi_long_press_flag 
+5a21 243a5a24 nbranch mouse_dpi_up_after_long_press ,blank 
+5a22 6fe0c839 fetch 1 ,mem_select_device_count 
+5a23 245a5a29 ncall mouse_dpi_process ,blank 
+
+mouse_dpi_up_after_long_press:
+5a24 70467700 jam 0 ,mem_mouse_dpi_long_press_flag 
+5a25 6fe0c431 fetch 1 ,mem_ui_button_timeout 
+5a26 67e0c839 store 1 ,mem_select_device_count 
+5a27 67e0c838 store 1 ,mem_bt_discovery_count 
+5a28 20600000 rtn 
+
+mouse_dpi_process:
+5a29 44a4c009 bpatch patch09_1 ,mem_patch09 
+5a2a 20405a32 call mouse_dpi_ghost_check 
+5a2b 20740000 rtn user 
+5a2c 6fe0c62b fetch 1 ,mem_mouse_dpi 
+5a2d 1fe0fe01 increase 1 ,pdata 
+5a2e 1fe17e03 and pdata ,0x03 ,pdata 
+5a2f 67e0c62b store 1 ,mem_mouse_dpi 
+5a30 20405a55 call mouse_seting_dpi 
+5a31 20205ea3 branch mouse_store_device_info_delay 
+
+mouse_dpi_ghost_check:
+5a32 78547c00 disable user 
+5a33 6fe44848 fetch mouse_flag_len ,mem_mouse_flag 
+5a34 c3960000 rtnbit1 mouse_enable_dpi_key_connect_gnd 
+5a35 c3970000 rtnbit1 mouse_enable_dpi_key_connect_adc 
+5a36 6fe0c82b fetch 1 ,mem_mouse_lkey_press_status 
+5a37 207a0000 rtn blank 
+5a38 6fe0c82c fetch 1 ,mem_mouse_rkey_press_status 
+5a39 207a0000 rtn blank 
+5a3a 78347c00 enable user 
+5a3b 20600000 rtn 
+
+mouse_dpi_key_check_long_press:
+5a3c 6fe44848 fetch mouse_flag_len ,mem_mouse_flag 
+5a3d c2945a40 bbit1 mouse_enable_select_device_by_dpi_button ,mouse_select_device_by_dpi_button 
+5a3e c29b5a47 bbit1 mouse_enable_dpi_key_long_press_disconvery ,mouse_discovery_by_dpi_button 
+5a3f 20600000 rtn 
+
+mouse_select_device_by_dpi_button:
+5a40 6fe0c676 fetch 1 ,mem_mouse_dpi_button_state 
+5a41 c1808000 rtnne dpi_button_state_down 
+5a42 da604839 arg mem_select_device_count ,regc 
+5a43 da405a45 arg mouse_ready_reconnection_by_dpi_button ,regb 
+5a44 20204de1 branch timer_single_step 
+
+mouse_ready_reconnection_by_dpi_button:
+5a45 70467701 jam 1 ,mem_mouse_dpi_long_press_flag 
+5a46 20205f68 branch mouse_ready_reconnection_by_button 
+
+mouse_discovery_by_dpi_button:
+5a47 6fe0c676 fetch 1 ,mem_mouse_dpi_button_state 
+5a48 c1808000 rtnne dpi_button_state_down 
+5a49 da604838 arg mem_bt_discovery_count ,regc 
+5a4a da405a4c arg mouse_long_dpi_button_bt_discovery ,regb 
+5a4b 20204de1 branch timer_single_step 
+
+mouse_long_dpi_button_bt_discovery:
+5a4c 70467701 jam 1 ,mem_mouse_dpi_long_press_flag 
+5a4d 20205daa branch mouse_long_button_bt_discovery 
+
+mouse_dpi_config:
+5a4e 20205a58 branch mouse_seting_sensor_type 
+
+mouse_setting_dpi_4_level:
+5a4f 6fe44848 fetch mouse_flag_len ,mem_mouse_flag 
+5a50 c38e0000 rtnbit1 mouse_enable_dpi_level_4 
+5a51 6fe0c62b fetch 1 ,mem_mouse_dpi 
+5a52 c1818000 rtnne mouse_dpi_level4 
+5a53 70462b00 jam mouse_dpi_level1 ,mem_mouse_dpi 
+5a54 20600000 rtn 
+
+mouse_seting_dpi:
+5a55 44a54009 bpatch patch09_2 ,mem_patch09 
+5a56 20405a4f call mouse_setting_dpi_4_level 
+5a57 204061c2 call mouse_dpi_led_blink_delay 
+
+mouse_seting_sensor_type:
+5a58 6fe0c5c0 fetch 1 ,mem_config_sensor_type 
+5a59 c001da7a beq p3212 ,mouse_seting_3212_dpi 
+5a5a c005da8e beq ka8g2 ,mouse_seting_ka8g2_dpi 
+5a5b 6fe0c62b fetch 1 ,mem_mouse_dpi 
+5a5c c0005a62 beq mouse_dpi_level1 ,mouse_set_cpi0 
+5a5d c000da60 beq mouse_dpi_level2 ,mouse_set_cpi1 
+5a5e c0015a64 beq mouse_dpi_level3 ,mouse_set_cpi2 
+5a5f c001da66 beq mouse_dpi_level4 ,mouse_set_cpi3 
+
+mouse_set_cpi1:
+5a60 6848c66a fetcht 1 ,mem_320x_dpi_1 
+5a61 20205a67 branch mouse_dpi_store 
+
+mouse_set_cpi0:
+5a62 6848c669 fetcht 1 ,mem_320x_dpi_0 
+5a63 20205a67 branch mouse_dpi_store 
+
+mouse_set_cpi2:
+5a64 6848c66b fetcht 1 ,mem_320x_dpi_2 
+5a65 20205a67 branch mouse_dpi_store 
+
+mouse_set_cpi3:
+5a66 6848c66c fetcht 1 ,mem_320x_dpi_3 
+
+mouse_dpi_store:
+5a67 6fe0c5c0 fetch 1 ,mem_config_sensor_type 
+5a68 c0025a76 beq p3065_xy ,mouse_3065xy_set_dpi 
+5a69 c002da76 beq mx8650 ,mouse_3065xy_set_dpi 
+5a6a c0045a78 beq ka8 ,mouse_ka8_set_dpi 
+5a6b c003da78 beq p6520 ,mouse_ka8_set_dpi 
+5a6c c0035a76 beq p8009 ,mouse_3065xy_set_dpi 
+
+mouse_dpi_write:
+5a6d 6048c675 storet 1 ,mem_mouse_cpi_count 
+5a6e 58000006 setarg mouse_dpi_address 
+5a6f 20406723 call twspi_read 
+5a70 1fe104f8 and pdata ,0xf8 ,temp 
+5a71 6fe0c675 fetch 1 ,mem_mouse_cpi_count 
+5a72 9840fe00 iadd temp ,pdata 
+5a73 1fed7e00 lshift8 pdata ,pdata 
+5a74 1fe0fe06 add pdata ,mouse_dpi_address ,pdata 
+5a75 20206722 branch twspi_write 
+
+mouse_3065xy_set_dpi:
+5a76 184085ff increase -1 ,temp 
+5a77 20205a6d branch mouse_dpi_write 
+
+mouse_ka8_set_dpi:
+5a78 18408402 increase 2 ,temp 
+5a79 20205a6d branch mouse_dpi_write 
+
+mouse_seting_3212_dpi:
+5a7a 6fe0c62b fetch 1 ,mem_mouse_dpi 
+5a7b c0005a81 beq mouse_dpi_level1 ,mouse_set_p3212_cpi0 
+5a7c c000da7f beq mouse_dpi_level2 ,mouse_set_p3212_cpi1 
+5a7d c0015a83 beq mouse_dpi_level3 ,mouse_set_p3212_cpi2 
+5a7e c001da85 beq mouse_dpi_level4 ,mouse_set_p3212_cpi3 
+
+mouse_set_p3212_cpi1:
+5a7f 6fe0c66e fetch 1 ,mem_3212_dpi_1 
+5a80 20205a86 branch mouse_p3212_dpi 
+
+mouse_set_p3212_cpi0:
+5a81 6fe0c66d fetch 1 ,mem_3212_dpi_0 
+5a82 20205a86 branch mouse_p3212_dpi 
+
+mouse_set_p3212_cpi2:
+5a83 6fe0c66f fetch 1 ,mem_3212_dpi_2 
+5a84 20205a86 branch mouse_p3212_dpi 
+
+mouse_set_p3212_cpi3:
+5a85 6fe0c670 fetch 1 ,mem_3212_dpi_3 
+
+mouse_p3212_dpi:
+5a86 67e0c675 store 1 ,mem_mouse_cpi_count 
+5a87 1fed7e00 lshift8 pdata ,pdata 
+5a88 1fe22200 copy pdata ,rega 
+5a89 1fe0fe0d add pdata ,mouse_p3212_dpi_xaddress ,pdata 
+5a8a 20406722 call twspi_write 
+5a8b 1a227e00 copy rega ,pdata 
+5a8c 1fe0fe0e add pdata ,mouse_p3212_dpi_yaddress ,pdata 
+5a8d 20206722 branch twspi_write 
+
+mouse_seting_ka8g2_dpi:
+5a8e 6fe0c62b fetch 1 ,mem_mouse_dpi 
+5a8f c0005a95 beq mouse_dpi_level1 ,mouse_set_pka8g2_cpi0 
+5a90 c000da93 beq mouse_dpi_level2 ,mouse_set_pka8g2_cpi1 
+5a91 c0015a97 beq mouse_dpi_level3 ,mouse_set_pka8g2_cpi2 
+5a92 c001da99 beq mouse_dpi_level4 ,mouse_set_pka8g2_cpi3 
+
+mouse_set_pka8g2_cpi1:
+5a93 6fe0c672 fetch 1 ,mem_ka8g2_dpi_1 
+5a94 20205a86 branch mouse_p3212_dpi 
+
+mouse_set_pka8g2_cpi0:
+5a95 6fe0c671 fetch 1 ,mem_ka8g2_dpi_0 
+5a96 20205a86 branch mouse_p3212_dpi 
+
+mouse_set_pka8g2_cpi2:
+5a97 6fe0c673 fetch 1 ,mem_ka8g2_dpi_2 
+5a98 20205a86 branch mouse_p3212_dpi 
+
+mouse_set_pka8g2_cpi3:
+5a99 6fe0c674 fetch 1 ,mem_ka8g2_dpi_3 
+5a9a 20205a86 branch mouse_p3212_dpi 
+
+mouse_key:
+5a9b 20405ad4 call mouse_check_key_gpio 
+5a9c 20405aac call mouse_ghost_key_check 
+5a9d 20405826 call mouse_set_mult 
+5a9e 20405aa7 call mouse_24g_key 
+5a9f 1a227e00 copy rega ,pdata 
+5aa0 6848c572 fetcht 1 ,mem_mouse_key_last 
+5aa1 67e0c572 store 1 ,mem_mouse_key_last 
+5aa2 67e0c56a store 1 ,mem_mouse_key 
+5aa3 9842fe00 ixor temp ,pdata 
+5aa4 1fe67c00 sub pdata ,0 ,null 
+5aa5 20628000 rtn zero 
+5aa6 20207636 branch enable_user 
+
+mouse_24g_key:
+5aa7 c6930000 rtnmark0 mark_24g 
+5aa8 1a227e00 copy rega ,pdata 
+5aa9 207a0000 rtn blank 
+5aaa 67e0c56a store 1 ,mem_mouse_key 
+5aab 20207636 branch enable_user 
+
+mouse_ghost_key_check:
+5aac 70483500 jam 0 ,mem_mouse_matrix_key_cow_count 
+5aad 70483600 jam 0 ,mem_mouse_matrix_key_row_count 
+5aae 70483700 jam 0 ,mem_mouse_ghost_flag 
+5aaf 1fe20400 copy pdata ,temp 
+5ab0 20405abc call mouse_ghost_key_check_l_bk 
+5ab1 20405abf call mouse_ghost_key_check_m_fw 
+5ab2 20405ac2 call mouse_ghost_key_check_bk_fw 
+5ab3 20405ac5 call mouse_ghost_key_check_lmr 
+5ab4 6fe0c836 fetch 1 ,mem_mouse_matrix_key_row_count 
+5ab5 207a0000 rtn blank 
+5ab6 6fe0c835 fetch 1 ,mem_mouse_matrix_key_cow_count 
+5ab7 207a0000 rtn blank 
+5ab8 70483701 jam 1 ,mem_mouse_ghost_flag 
+5ab9 6fe0c572 fetch 1 ,mem_mouse_key_last 
+5aba 1fe22200 copy pdata ,rega 
+5abb 20600000 rtn 
+
+mouse_ghost_key_check_l_bk:
+5abc 18417e09 and temp ,mouse_l_bk_button ,pdata 
+5abd c004dacd beq mouse_l_bk_button ,mouse_matrix_cow_more_than_one_key 
+5abe 20600000 rtn 
+
+mouse_ghost_key_check_m_fw:
+5abf 18417e14 and temp ,mouse_m_fw_button ,pdata 
+5ac0 c00a5acd beq mouse_m_fw_button ,mouse_matrix_cow_more_than_one_key 
+5ac1 20600000 rtn 
+
+mouse_ghost_key_check_bk_fw:
+5ac2 18417e18 and temp ,mouse_bk_fw_button ,pdata 
+5ac3 c00c5acb beq mouse_bk_fw_button ,mouse_matrix_row_more_than_one_key 
+5ac4 20600000 rtn 
+
+mouse_ghost_key_check_lmr:
+5ac5 18417e07 and temp ,mouse_lmr_button ,pdata 
+5ac6 c001dacb beq mouse_lr_button ,mouse_matrix_row_more_than_one_key 
+5ac7 c002dacb beq mouse_lm_button ,mouse_matrix_row_more_than_one_key 
+5ac8 c0035acb beq mouse_rm_button ,mouse_matrix_row_more_than_one_key 
+5ac9 c003dacb beq mouse_lmr_button ,mouse_matrix_row_more_than_one_key 
+5aca 20600000 rtn 
+
+mouse_matrix_row_more_than_one_key:
+5acb 70483601 jam 1 ,mem_mouse_matrix_key_row_count 
+5acc 20600000 rtn 
+
+mouse_matrix_cow_more_than_one_key:
+5acd 70483501 jam 1 ,mem_mouse_matrix_key_cow_count 
+5ace 20600000 rtn 
+
+mouse_key_check_once:
+5acf 20405ae0 call mouse_check_key_gpio_once 
+5ad0 20405ad4 call mouse_check_key_gpio 
+5ad1 58000000 setarg 0x00 
+5ad2 67e1c82b store 3 ,mem_mouse_lkey_press_status 
+5ad3 20600000 rtn 
+
+mouse_check_key_gpio:
+5ad4 44a5c009 bpatch patch09_3 ,mem_patch09 
+5ad5 6fe0c87d fetch 1 ,mem_sensor_shutdown_flag 
+5ad6 245a5ae0 ncall mouse_check_key_gpio_once ,blank 
+5ad7 da200000 arg 0 ,rega 
+5ad8 20405ae3 call mouse_check_lkey_gpio 
+5ad9 20405ae9 call mouse_check_rkey_gpio 
+5ada 20405aef call mouse_check_mkey_gpio 
+5adb 20405af5 call mouse_check_bkkey_gpio 
+5adc 20405b0e call mouse_check_fwkey_gpio 
+5add 20405b28 call mouse_check_customerkey_gpio 
+5ade 1a227e00 copy rega ,pdata 
+5adf 20600000 rtn 
+
+mouse_check_key_gpio_once:
+5ae0 58030303 setarg 0x030303 
+5ae1 67e1c82b store 3 ,mem_mouse_lkey_press_status 
+5ae2 20600000 rtn 
+
+mouse_check_lkey_gpio:
+5ae3 70483300 jam mouse_l_key ,mem_mouse_key_temp 
+5ae4 6848c5a5 fetcht 1 ,mem_lbutton_gpio 
+5ae5 6fe0c82b fetch 1 ,mem_mouse_lkey_press_status 
+5ae6 20405b46 call mouse_check_key_connect_gnd 
+5ae7 67e0c82b store 1 ,mem_mouse_lkey_press_status 
+5ae8 20600000 rtn 
+
+mouse_check_rkey_gpio:
+5ae9 70483301 jam mouse_r_key ,mem_mouse_key_temp 
+5aea 6848c5a7 fetcht 1 ,mem_rbutton_gpio 
+5aeb 6fe0c82c fetch 1 ,mem_mouse_rkey_press_status 
+5aec 20405b46 call mouse_check_key_connect_gnd 
+5aed 67e0c82c store 1 ,mem_mouse_rkey_press_status 
+5aee 20600000 rtn 
+
+mouse_check_mkey_gpio:
+5aef 70483302 jam mouse_m_key ,mem_mouse_key_temp 
+5af0 6848c5a6 fetcht 1 ,mem_mbutton_gpio 
+5af1 6fe0c82d fetch 1 ,mem_mouse_mkey_press_status 
+5af2 20405b46 call mouse_check_key_connect_gnd 
+5af3 67e0c82d store 1 ,mem_mouse_mkey_press_status 
+5af4 20600000 rtn 
+
+mouse_check_bkkey_gpio:
+5af5 6fe0c5a8 fetch 1 ,mem_bk_button_gpio 
+5af6 c17f8000 rtneq gpio_disable 
+5af7 70483303 jam mouse_bk_key ,mem_mouse_key_temp 
+5af8 6fe0c82e fetch 1 ,mem_mouse_bkkey_press_status 
+5af9 1fe22600 copy pdata ,regc 
+5afa 6848c5a8 fetcht 1 ,mem_bk_button_gpio 
+5afb 6fe0c5b5 fetch 1 ,mem_matrix_public_gpio 
+5afc c07fdb0a beq gpio_disable ,mouse_3io6key_bk_check 
+5afd 20406c32 call gpio_get_bit 
+5afe 2020db06 branch mouse_check_bk_button_connect_gnd ,true 
+5aff 6848c5b5 fetcht 1 ,mem_matrix_public_gpio 
+5b00 20406c43 call gpio_out_active 
+5b01 6848c5a8 fetcht 1 ,mem_bk_button_gpio 
+5b02 6fe0c82e fetch 1 ,mem_mouse_bkkey_press_status 
+5b03 20405b46 call mouse_check_key_connect_gnd 
+
+mouse_check_bkkey_gpio_end:
+5b04 67e0c82e store 1 ,mem_mouse_bkkey_press_status 
+5b05 20205b1e branch mouse_matrix_public_gpio_reset 
+
+mouse_check_bk_button_connect_gnd:
+5b06 6848c5b5 fetcht 1 ,mem_matrix_public_gpio 
+5b07 6fe0c82e fetch 1 ,mem_mouse_bkkey_press_status 
+5b08 20405b46 call mouse_check_key_connect_gnd 
+5b09 20205b04 branch mouse_check_bkkey_gpio_end 
+
+mouse_3io6key_bk_check:
+5b0a 20405b52 call mouse_3io6key_check 
+5b0b 67e0c82e store 1 ,mem_mouse_bkkey_press_status 
+5b0c 6848c5a8 fetcht 1 ,mem_bk_button_gpio 
+5b0d 20205915 branch mouse_gpio_config_input_pu 
+
+mouse_check_fwkey_gpio:
+5b0e 6fe0c5a9 fetch 1 ,mem_fw_button_gpio 
+5b0f c17f8000 rtneq gpio_disable 
+5b10 70483304 jam mouse_fw_key ,mem_mouse_key_temp 
+5b11 6fe0c82f fetch 1 ,mem_mouse_fwkey_press_status 
+5b12 1fe22600 copy pdata ,regc 
+5b13 6848c5a9 fetcht 1 ,mem_fw_button_gpio 
+5b14 6fe0c5b5 fetch 1 ,mem_matrix_public_gpio 
+5b15 c07fdb24 beq gpio_disable ,mouse_3io6key_fw_check 
+5b16 20406c32 call gpio_get_bit 
+5b17 2020db20 branch mouse_check_fw_button_connect_gnd ,true 
+5b18 6848c5b5 fetcht 1 ,mem_matrix_public_gpio 
+5b19 20406c43 call gpio_out_active 
+5b1a 6848c5a9 fetcht 1 ,mem_fw_button_gpio 
+5b1b 6fe0c82f fetch 1 ,mem_mouse_fwkey_press_status 
+5b1c 20405b46 call mouse_check_key_connect_gnd 
+
+mouse_check_fwkey_gpio_end:
+5b1d 67e0c82f store 1 ,mem_mouse_fwkey_press_status 
+
+mouse_matrix_public_gpio_reset:
+5b1e 6848c5b5 fetcht 1 ,mem_matrix_public_gpio 
+5b1f 20205915 branch mouse_gpio_config_input_pu 
+
+mouse_check_fw_button_connect_gnd:
+5b20 6848c5b5 fetcht 1 ,mem_matrix_public_gpio 
+5b21 6fe0c82f fetch 1 ,mem_mouse_fwkey_press_status 
+5b22 20405b46 call mouse_check_key_connect_gnd 
+5b23 20205b1d branch mouse_check_fwkey_gpio_end 
+
+mouse_3io6key_fw_check:
+5b24 20405b52 call mouse_3io6key_check 
+5b25 67e0c82f store 1 ,mem_mouse_fwkey_press_status 
+5b26 6848c5a9 fetcht 1 ,mem_fw_button_gpio 
+5b27 20205915 branch mouse_gpio_config_input_pu 
+
+mouse_check_customerkey_gpio:
+5b28 70482800 jam 0 ,mem_customer_key 
+5b29 6fe44848 fetch mouse_flag_len ,mem_mouse_flag 
+5b2a c40a8000 rtnbit0 mouse_enable_keyboard 
+5b2b 6fe0c5b7 fetch 1 ,mem_customer_key_gpio 
+5b2c c17f8000 rtneq gpio_disable 
+5b2d 70483307 jam mouse_customer_key ,mem_mouse_key_temp 
+5b2e 6848c5b7 fetcht 1 ,mem_customer_key_gpio 
+5b2f 6fe0c832 fetch 1 ,mem_mouse_customerkey_press_status 
+5b30 20405b46 call mouse_check_key_connect_gnd 
+5b31 67e0c832 store 1 ,mem_mouse_customerkey_press_status 
+5b32 1a227e00 copy rega ,pdata 
+5b33 c283db38 bbit1 mouse_customer_key ,mouse_customerkey_press 
+5b34 20405b3b call mouse_customerkey_release 
+
+mouse_check_customerkey_gpio_exit:
+5b35 6fe0c829 fetch 1 ,mem_customer_data_trigger 
+5b36 67e0c82a store 1 ,mem_customer_data_trigger_last 
+5b37 20600000 rtn 
+
+mouse_customerkey_press:
+5b38 70482901 jam 1 ,mem_customer_data_trigger 
+5b39 20405b3e call mouse_customer_key_need_send 
+5b3a 20205b35 branch mouse_check_customerkey_gpio_exit 
+
+mouse_customerkey_release:
+5b3b 70482900 jam 0 ,mem_customer_data_trigger 
+5b3c 6fe0c82a fetch 1 ,mem_customer_data_trigger_last 
+5b3d 207a0000 rtn blank 
+
+mouse_customer_key_need_send:
+5b3e 70482801 jam 1 ,mem_customer_key 
+5b3f 20600000 rtn 
+
+mouse_check_matrix_button_connect_gnd:
+5b40 20406c32 call gpio_get_bit 
+5b41 6848c833 fetcht 1 ,mem_mouse_key_temp 
+5b42 18420e00 copy temp ,queue 
+5b43 2020db50 branch mouse_key_press ,true 
+
+mouse_key_release:
+5b44 f93fa200 qset0 rega 
+5b45 20600000 rtn 
+
+mouse_check_key_connect_gnd:
+5b46 1fe3fe00 lshift pdata ,pdata 
+5b47 1fe22400 copy pdata ,regb 
+5b48 20406c32 call gpio_get_bit 
+5b49 7920a400 setflag true ,0 ,regb 
+5b4a 1a417e07 and regb ,0x07 ,pdata 
+
+mouse_check_key_connect_gnd_next:
+5b4b 6848c833 fetcht 1 ,mem_mouse_key_temp 
+5b4c 18420e00 copy temp ,queue 
+5b4d c003db50 beq 0x07 ,mouse_key_press 
+5b4e c0005b44 beq 0x00 ,mouse_key_release 
+5b4f 20600000 rtn 
+
+mouse_key_press:
+5b50 f9202200 qset1 rega 
+5b51 20600000 rtn 
+
+mouse_3io6key_check:
+5b52 44a64009 bpatch patch09_4 ,mem_patch09 
+5b53 1a627e00 copy regc ,pdata 
+5b54 67e0c834 store 1 ,mem_mouse_key_status 
+5b55 1fe3fe00 lshift pdata ,pdata 
+5b56 1fe22400 copy pdata ,regb 
+5b57 18422600 copy temp ,regc 
+5b58 20405911 call mouse_gpio_config_input_pd 
+5b59 1a620400 copy regc ,temp 
+5b5a 20406c32 call gpio_get_bit 
+5b5b 7d20a400 nsetflag true ,0 ,regb 
+5b5c 20405b5e call mouse_check_press 
+5b5d 20205b4b branch mouse_check_key_connect_gnd_next 
+
+mouse_check_press:
+5b5e 6848c834 fetcht 1 ,mem_mouse_key_status 
+5b5f 18410401 and_into 0x01 ,temp 
+5b60 1a417e01 and regb ,0x01 ,pdata 
+5b61 98467c00 isub temp ,null 
+5b62 2422dcc5 nbranch mouse_current_mult_update ,zero 
+5b63 20600000 rtn 
+
+mouse_init_sunt:
+5b64 44a6c009 bpatch patch09_5 ,mem_patch09 
+5b65 20405926 call mouse_sensor_spi_init 
+5b66 20758000 rtn wake 
+
+mouse_init_sensor_wakeup:
+5b67 20405bf3 call mouse_sensor_poweron 
+
+mouse_init_sensor:
+5b68 44a74009 bpatch patch09_6 ,mem_patch09 
+5b69 20405b73 call mouse_read_sensor_id 
+5b6a c0185b7a beq p32xx_id1 ,mouse_init_p32xx_id2_judge 
+5b6b c018dbdb beq p3065_id1 ,mouse_init_p3065 
+5b6c c02c5be4 beq pka8g2_id1 ,mouse_ka8g2_id2_judge 
+5b6d 20405b70 call mouse_twspi_reset 
+5b6e 20001af4 nop 6900 
+5b6f 20205b68 branch mouse_init_sensor 
+
+mouse_twspi_reset:
+5b70 6fe0c5ad fetch 1 ,mem_mouse_sensor_sclk_gpio 
+5b71 2040670b call twspi_reset 
+5b72 2020592b branch mouse_spid_init_pin 
+
+mouse_read_sensor_id:
+5b73 58000001 setarg pan_reg_pid_h 
+5b74 20406723 call twspi_read 
+5b75 67e0c65b store 1 ,mem_sensor_id2 
+5b76 58000000 setarg pan_reg_pid_l 
+5b77 20406723 call twspi_read 
+5b78 67e0c65a store 1 ,mem_sensor_id1 
+5b79 20600000 rtn 
+
+mouse_init_p32xx_id2_judge:
+5b7a 6fe0c65b fetch 1 ,mem_sensor_id2 
+5b7b c02d5b83 beq p_mx8650 ,mouse_mx8650_init_param 
+5b7c c06c5b89 beq p8009_id2 ,mouse_8009_init_param 
+5b7d c068db98 beq p3205_tj3t_id2 ,mouse_3205_3t_init_param 
+5b7e c0695ba1 beq p3204_tj3l_id2 ,mouse_3204_3l_init_param 
+5b7f c0015ba8 beq p3212_id2 ,mouse_3212_init_param 
+5b80 c02a5bb1 beq pka8_id2 ,mouse_ka8_init_param_check 
+5b81 c0285bd8 beq p6520a_id2 ,mouse_p6520_init_param 
+5b82 20205b68 branch mouse_init_sensor 
+
+mouse_mx8650_init_param:
+5b83 7045c005 jam mx8650 ,mem_config_sensor_type 
+5b84 20405bef call mouse_sensor_reset 
+5b85 204074fb call delay_10ms 
+5b86 da6046d2 arg mem_sensor_8650_init ,regc 
+5b87 20405baa call mouse_sensor_wr_seq 
+5b88 20205a4e branch mouse_dpi_config 
+
+mouse_8009_init_param:
+5b89 58000016 setarg 0x16 
+5b8a 20406723 call twspi_read 
+5b8b 1fe67cbd sub pdata ,0xbd ,null 
+5b8c 2422db64 nbranch mouse_init_sunt ,zero 
+5b8d 58000019 setarg 0x19 
+5b8e 20406723 call twspi_read 
+5b8f 1fe67c55 sub pdata ,0x55 ,null 
+5b90 2422db64 nbranch mouse_init_sunt ,zero 
+5b91 5800001b setarg 0x1b 
+5b92 20406723 call twspi_read 
+5b93 1fe67c1d sub pdata ,0x1d ,null 
+5b94 2422db64 nbranch mouse_init_sunt ,zero 
+5b95 7045c006 jam p8009 ,mem_config_sensor_type 
+5b96 da604716 arg mem_sensor_8009_init ,regc 
+5b97 20205baa branch mouse_sensor_wr_seq 
+
+mouse_3205_3t_init_param:
+5b98 7045c000 jam p3205 ,mem_config_sensor_type 
+5b99 da60468c arg mem_sensor_3205_init ,regc 
+5b9a 20405baa call mouse_sensor_wr_seq 
+5b9b da604696 arg mem_sensor_32xx_init ,regc 
+5b9c 20405baa call mouse_sensor_wr_seq 
+5b9d 58000943 setarg 0x0943 
+5b9e 20406722 call twspi_write 
+5b9f da6046b0 arg mem_sensor_32xx_init_1 ,regc 
+5ba0 20205baa branch mouse_sensor_wr_seq 
+
+mouse_3204_3l_init_param:
+5ba1 7045c002 jam p3204 ,mem_config_sensor_type 
+5ba2 da604682 arg mem_sensor_3204_init ,regc 
+5ba3 20405baa call mouse_sensor_wr_seq 
+5ba4 da604696 arg mem_sensor_32xx_init ,regc 
+5ba5 20405baa call mouse_sensor_wr_seq 
+5ba6 da6046b0 arg mem_sensor_32xx_init_1 ,regc 
+5ba7 20205baa branch mouse_sensor_wr_seq 
+
+mouse_3212_init_param:
+5ba8 7045c003 jam p3212 ,mem_config_sensor_type 
+5ba9 da604678 arg mem_sensor_3212_init ,regc 
+
+mouse_sensor_wr_seq:
+5baa efe10013 ifetch 2 ,regc 
+5bab d840ffff arg 0xffff ,temp 
+5bac 98467c00 isub temp ,null 
+5bad 20628000 rtn zero 
+5bae 20406722 call twspi_write 
+5baf 1a60a602 increase 2 ,regc 
+5bb0 20205baa branch mouse_sensor_wr_seq 
+
+mouse_ka8_init_param_check:
+5bb1 20405bed call mouse_sensor_disable_wp 
+5bb2 58009a5b setarg 0x9a5b 
+5bb3 20406722 call twspi_write 
+5bb4 5800000d setarg 0x0d 
+5bb5 20406723 call twspi_read 
+5bb6 1fe67c12 sub pdata ,0x12 ,null 
+5bb7 2022dbc5 branch mouse_ka8ul_init_param ,zero 
+5bb8 1fe67c0a sub pdata ,0x0a ,null 
+5bb9 2422dbc8 nbranch mouse_ka8hd_sensor_judge ,zero 
+5bba 5800000e setarg 0x0e 
+5bbb 20406723 call twspi_read 
+5bbc 1fe67ce5 sub pdata ,0xe5 ,null 
+5bbd 2422db68 nbranch mouse_init_sensor ,zero 
+5bbe 58000010 setarg 0x10 
+5bbf 20406723 call twspi_read 
+5bc0 1fe67ca5 sub pdata ,0xa5 ,null 
+5bc1 2022dbc5 branch mouse_ka8ul_init_param ,zero 
+5bc2 20405bd5 call mouse_enable_ka8_sensor_wp 
+
+mouse_ka8_init_param:
+5bc3 7045c008 jam ka8 ,mem_config_sensor_type 
+5bc4 20600000 rtn 
+
+mouse_ka8ul_init_param:
+5bc5 7045c009 jam ka8_ul ,mem_config_sensor_type 
+5bc6 da6046f8 arg mem_sensor_ka8ul_init ,regc 
+5bc7 20205baa branch mouse_sensor_wr_seq 
+
+mouse_ka8hd_sensor_judge:
+5bc8 1fe67c10 sub pdata ,0x10 ,null 
+5bc9 2422db68 nbranch mouse_init_sensor ,zero 
+5bca 5800000e setarg 0x0e 
+5bcb 20406723 call twspi_read 
+5bcc 1fe67cc5 sub pdata ,0xc5 ,null 
+5bcd 2422db68 nbranch mouse_init_sensor ,zero 
+5bce 58000010 setarg 0x10 
+5bcf 20406723 call twspi_read 
+5bd0 1fe67c38 sub pdata ,0x38 ,null 
+5bd1 2422db68 nbranch mouse_init_sensor ,zero 
+
+mouse_ka8hd_init_param:
+5bd2 20405bd5 call mouse_enable_ka8_sensor_wp 
+5bd3 7045c00a jam ka8_hd ,mem_config_sensor_type 
+5bd4 20600000 rtn 
+
+mouse_enable_ka8_sensor_wp:
+5bd5 5800005b setarg 0x005b 
+5bd6 20406722 call twspi_write 
+5bd7 20205beb branch mouse_sensor_enable_wp 
+
+mouse_p6520_init_param:
+5bd8 7045c007 jam p6520 ,mem_config_sensor_type 
+5bd9 da604736 arg mem_sensor_p6520_init ,regc 
+5bda 20205baa branch mouse_sensor_wr_seq 
+
+mouse_init_p3065:
+5bdb 20405bf3 call mouse_sensor_poweron 
+5bdc 6fe0c65b fetch 1 ,mem_sensor_id2 
+5bdd c0385be2 beq p3065_xy_id2 ,mouse_p3065xy_init_param 
+5bde c0005be0 beq p3065_id2 ,mouse_p3065_init_param 
+5bdf 20205b68 branch mouse_init_sensor 
+
+mouse_p3065_init_param:
+5be0 7045c001 jam p3065 ,mem_config_sensor_type 
+5be1 20600000 rtn 
+
+mouse_p3065xy_init_param:
+5be2 7045c004 jam p3065_xy ,mem_config_sensor_type 
+5be3 20600000 rtn 
+
+mouse_ka8g2_id2_judge:
+5be4 20405bf3 call mouse_sensor_poweron 
+5be5 6fe0c65b fetch 1 ,mem_sensor_id2 
+5be6 c02cdbe8 beq pka8g2_id2 ,mouse_ka8g2_init_param 
+5be7 20205b7a branch mouse_init_p32xx_id2_judge 
+
+mouse_ka8g2_init_param:
+5be8 7045c00b jam ka8g2 ,mem_config_sensor_type 
+5be9 da604726 arg mem_sensor_ka8g2_init ,regc 
+5bea 20205baa branch mouse_sensor_wr_seq 
+
+mouse_sensor_enable_wp:
+5beb 58000009 setarg 0x0009 
+5bec 20206722 branch twspi_write 
+
+mouse_sensor_disable_wp:
+5bed 58005a09 setarg 0x5a09 
+5bee 20206722 branch twspi_write 
+
+mouse_sensor_reset:
+5bef 58008006 setarg 0x8006 
+5bf0 20406722 call twspi_write 
+5bf1 20002ee0 nop 12000 
+5bf2 20600000 rtn 
+
+mouse_sensor_poweron:
+5bf3 44a7c009 bpatch patch09_7 ,mem_patch09 
+5bf4 20405926 call mouse_sensor_spi_init 
+5bf5 20405bef call mouse_sensor_reset 
+5bf6 da604742 arg mem_sensor_poweron_init ,regc 
+5bf7 20405baa call mouse_sensor_wr_seq 
+5bf8 20205a4e branch mouse_dpi_config 
+
+mouse_sensor_powerdown:
+5bf9 44a8400a bpatch patch0a_0 ,mem_patch0a 
+5bfa 20405b64 call mouse_init_sunt 
+5bfb 20405926 call mouse_sensor_spi_init 
+5bfc 58000806 setarg 0x0806 
+5bfd 20206722 branch twspi_write 
+
+mouse_check_sensor_data:
+5bfe 6fe0c3ce fetch 1 ,mem_spi_write_flash_sm 
+5bff c1800000 rtnne flash_sm_no_buys 
+5c00 6fe0c5c0 fetch 1 ,mem_config_sensor_type 
+5c01 c0005c0a beq p3205 ,mouse_p32xx_sensor_motion 
+5c02 c000dc0a beq p3065 ,mouse_p32xx_sensor_motion 
+5c03 c0045c0a beq ka8 ,mouse_p32xx_sensor_motion 
+5c04 c0015c0a beq p3204 ,mouse_p32xx_sensor_motion 
+5c05 c001dc2e beq p3212 ,mouse_p3212_sensor_motion 
+5c06 c0025c0a beq p3065_xy ,mouse_p32xx_sensor_motion 
+5c07 c0035c53 beq p8009 ,mouse_p8009_sensor_motion 
+5c08 c005dc4c beq ka8g2 ,mouse_pka8g2_sensor_motion 
+5c09 20205c0a branch mouse_p32xx_sensor_motion 
+
+mouse_p32xx_sensor_motion:
+5c0a 20405c75 call mouse_clear_sensor_data 
+5c0b 78547c00 disable user 
+5c0c 6fe0c5b8 fetch 1 ,mem_sensor_motion_gpio 
+5c0d c07fdc11 beq gpio_disable ,mouse_p32xx_sensor_motion_2 
+5c0e 6848c5b8 fetcht 1 ,mem_sensor_motion_gpio 
+5c0f 20406c32 call gpio_get_bit 
+5c10 24608000 nrtn true 
+
+mouse_p32xx_sensor_motion_2:
+5c11 58000000 setarg pan_reg_pid_l 
+5c12 20406723 call twspi_read 
+5c13 c0985c24 bne p32xx_id1 ,mouse_p3065_judge 
+
+mouse_p32xx_sensor_motion_1:
+5c14 58000002 setarg pan_reg_motion_staus 
+5c15 20406723 call twspi_read 
+5c16 c4038000 rtnbit0 7 
+5c17 20405c8c call mouse_read_sensor_common 
+5c18 6fe0c56b fetch 1 ,mem_mouse_x 
+5c19 20405c84 call mouse_data_extsign 
+5c1a 67e1456b store 2 ,mem_mouse_x 
+5c1b 6fe0c56d fetch 1 ,mem_mouse_y 
+5c1c 20405c84 call mouse_data_extsign 
+5c1d 67e1456d store 2 ,mem_mouse_y 
+5c1e 6fe0c5c1 fetch 1 ,mem_config_sensor_angle 
+5c1f c0005c26 beq mouse_6clk_angle ,mouse_motion32xx_6clk_direction_selection 
+5c20 c000dc28 beq mouse_9clk_angle ,mouse_motion32xx_9clk_direction_selection 
+5c21 c0015c2a beq mouse_12clk_angle ,mouse_motion32xx_12clk_direction_selection 
+5c22 c001dc2c beq mouse_3clk_angle ,mouse_motion32xx_3clk_direction_selection 
+5c23 20600000 rtn 
+
+mouse_p3065_judge:
+5c24 c018dc14 beq p3065_id1 ,mouse_p32xx_sensor_motion_1 
+5c25 20205b70 branch mouse_twspi_reset 
+
+mouse_motion32xx_6clk_direction_selection:
+5c26 20405c5e call mouse_motion_6clk_direction_dispose 
+5c27 20205c93 branch mouse_sensor_sdio_low 
+
+mouse_motion32xx_9clk_direction_selection:
+5c28 20405c66 call mouse_motion_9clk_direction_dispose 
+5c29 20205c93 branch mouse_sensor_sdio_low 
+
+mouse_motion32xx_12clk_direction_selection:
+5c2a 20405c62 call mouse_motion_12clk_direction_dispose 
+5c2b 20205c93 branch mouse_sensor_sdio_low 
+
+mouse_motion32xx_3clk_direction_selection:
+5c2c 20405c6e call mouse_motion_3clk_direction_dispose 
+5c2d 20205c93 branch mouse_sensor_sdio_low 
+
+mouse_p3212_sensor_motion:
+5c2e 20405c75 call mouse_clear_sensor_data 
+5c2f 6fe0c5b8 fetch 1 ,mem_sensor_motion_gpio 
+5c30 c07fdc34 beq gpio_disable ,mouse_p3212_sensor_motion_1 
+5c31 6848c5b8 fetcht 1 ,mem_sensor_motion_gpio 
+5c32 20406c32 call gpio_get_bit 
+5c33 24608000 nrtn true 
+
+mouse_p3212_sensor_motion_1:
+5c34 58000000 setarg pan_reg_pid_l 
+5c35 20406723 call twspi_read 
+5c36 c0985b70 bne p32xx_id1 ,mouse_twspi_reset 
+
+mouse_p3212_sensor_motion_2:
+5c37 58000002 setarg pan_reg_motion_staus 
+5c38 20406723 call twspi_read 
+5c39 c4038000 rtnbit0 7 
+5c3a 20405c8c call mouse_read_sensor_common 
+5c3b 20405c4a call mouse_read_3212sensor_xy_high 
+5c3c 67e0c571 store 1 ,mem_mouse_xy_h 
+5c3d 1ff1fe00 rshift4 pdata ,pdata 
+5c3e 20405c88 call mouse_data_extsign_bit3 
+5c3f 67e0c56c store 1 ,mem_mouse_x + 1 
+5c40 6fe0c571 fetch 1 ,mem_mouse_xy_h 
+5c41 1fe17e0f and pdata ,0x0f ,pdata 
+5c42 20405c88 call mouse_data_extsign_bit3 
+5c43 67e0c56e store 1 ,mem_mouse_y + 1 
+5c44 6fe0c5c1 fetch 1 ,mem_config_sensor_angle 
+5c45 c0005c5e beq mouse_6clk_angle ,mouse_motion_6clk_direction_dispose 
+5c46 c000dc66 beq mouse_9clk_angle ,mouse_motion_9clk_direction_dispose 
+5c47 c0015c62 beq mouse_12clk_angle ,mouse_motion_12clk_direction_dispose 
+5c48 c001dc6e beq mouse_3clk_angle ,mouse_motion_3clk_direction_dispose 
+5c49 20600000 rtn 
+
+mouse_read_3212sensor_xy_high:
+5c4a 58000012 setarg 0x12 
+5c4b 20206723 branch twspi_read 
+
+mouse_pka8g2_sensor_motion:
+5c4c 20405c75 call mouse_clear_sensor_data 
+5c4d 6fe0c5b8 fetch 1 ,mem_sensor_motion_gpio 
+5c4e c07fdc52 beq gpio_disable ,mouse_pka8g2_sensor_motion_1 
+5c4f 6848c5b8 fetcht 1 ,mem_sensor_motion_gpio 
+5c50 20406c32 call gpio_get_bit 
+5c51 24608000 nrtn true 
+
+mouse_pka8g2_sensor_motion_1:
+5c52 20205c37 branch mouse_p3212_sensor_motion_2 
+
+mouse_p8009_sensor_motion:
+5c53 20405c75 call mouse_clear_sensor_data 
+5c54 78547c00 disable user 
+5c55 58000002 setarg pan_reg_motion_staus 
+5c56 20406723 call twspi_read 
+5c57 c4038000 rtnbit0 7 
+5c58 58000008 setarg pan_reg_opration_state 
+5c59 20406723 call twspi_read 
+5c5a 203a5c17 branch mouse_p32xx_sensor_motion_1 + 3 ,blank 
+5c5b 58000000 setarg 0 
+5c5c 67e3456b store 6 ,mem_mouse_x 
+5c5d 20600000 rtn 
+
+mouse_motion_6clk_direction_dispose:
+5c5e 6fe1456b fetch 2 ,mem_mouse_x 
+5c5f 1fe67e00 sub pdata ,0 ,pdata 
+5c60 67e1456b store 2 ,mem_mouse_x 
+5c61 20207636 branch enable_user 
+
+mouse_motion_12clk_direction_dispose:
+5c62 6fe1456d fetch 2 ,mem_mouse_y 
+5c63 1fe67e00 sub pdata ,0 ,pdata 
+5c64 67e1456d store 2 ,mem_mouse_y 
+5c65 20207636 branch enable_user 
+
+mouse_motion_9clk_direction_dispose:
+5c66 6fe1456d fetch 2 ,mem_mouse_y 
+5c67 1fe67e00 sub pdata ,0 ,pdata 
+5c68 67e1456d store 2 ,mem_mouse_y 
+5c69 6fe1456b fetch 2 ,mem_mouse_x 
+5c6a 1fe67e00 sub pdata ,0 ,pdata 
+5c6b 67e1456b store 2 ,mem_mouse_x 
+5c6c 20405c70 call mouse_sensor_data_swap_places 
+5c6d 20207636 branch enable_user 
+
+mouse_motion_3clk_direction_dispose:
+5c6e 20405c70 call mouse_sensor_data_swap_places 
+5c6f 20207636 branch enable_user 
+
+mouse_sensor_data_swap_places:
+5c70 6fe1456d fetch 2 ,mem_mouse_y 
+5c71 6849456b fetcht 2 ,mem_mouse_x 
+5c72 67e1456b store 2 ,mem_mouse_x 
+5c73 6049456d storet 2 ,mem_mouse_y 
+5c74 20600000 rtn 
+
+mouse_clear_sensor_data:
+5c75 6fe0c661 fetch 1 ,mem_mouse_move_flag 
+5c76 205a5c8c call mouse_read_sensor_common ,blank 
+5c77 70466101 jam 1 ,mem_mouse_move_flag 
+5c78 20600000 rtn 
+
+mouse_clear_sensor_data_by_reset:
+5c79 70474a01 jam 1 ,mem_mouse_clear_sensor_data_flag 
+5c7a 204041a2 call le_set_config_more_data 
+
+mouse_init_sensor_reset:
+5c7b 20205b64 branch mouse_init_sunt 
+
+mouse_data_xy_release:
+5c7c 6fe0c5b8 fetch 1 ,mem_sensor_motion_gpio 
+5c7d c1ff8000 rtnne gpio_disable 
+5c7e 6fe0c74c fetch 1 ,mem_mouse_long_mult_flag 
+5c7f c1808000 rtnne 1 
+5c80 58000000 setarg 0 
+5c81 67e0c74c store 1 ,mem_mouse_long_mult_flag 
+5c82 67e2456b store 4 ,mem_mouse_x 
+5c83 20205c7b branch mouse_init_sensor_reset 
+
+mouse_data_extsign:
+5c84 c4038000 rtnbit0 7 
+5c85 d840ff00 arg 0xff00 ,temp 
+5c86 9841fe00 ior temp ,pdata 
+5c87 20600000 rtn 
+
+mouse_data_extsign_bit3:
+5c88 c4018000 rtnbit0 3 
+5c89 d84000f0 arg 0xf0 ,temp 
+5c8a 9841fe00 ior temp ,pdata 
+5c8b 20600000 rtn 
+
+mouse_read_sensor_common:
+5c8c dfe00003 arg pan_reg_delta_x ,pdata 
+5c8d 20406723 call twspi_read 
+5c8e 67e1456b store 2 ,mem_mouse_x 
+5c8f dfe00004 arg pan_reg_delta_y ,pdata 
+5c90 20406723 call twspi_read 
+5c91 67e1456d store 2 ,mem_mouse_y 
+5c92 20600000 rtn 
+
+mouse_sensor_sdio_low:
+5c93 6848c5ae fetcht 1 ,mem_mouse_sensor_sdio_gpio 
+5c94 20406c32 call gpio_get_bit 
+5c95 20608000 rtn true 
+5c96 5800000a setarg 0x0a 
+5c97 20406723 call twspi_read 
+5c98 200003e8 nop 1000 
+5c99 20205c93 branch mouse_sensor_sdio_low 
+
+mouse_set_sdio_high:
+5c9a 58008100 setarg 0x8100 
+5c9b 20206722 branch twspi_write 
+
+mouse_buletooth_fast_conn_init:
+5c9c 70475fff jam 0xff ,mem_mouse_bluetooth_fast_conn_flag 
+
+mouse_ble_fast_conn_init:
+5c9d 7043a834 jam 0x34 ,mem_xrecord_mode 
+5c9e 580f0f0f setarg 0x0f0f0f 
+5c9f 67e1c2ae store 3 ,mem_le_lap 
+5ca0 67e1c2b1 store 3 ,mem_le_lap + 3 
+5ca1 2020579b branch mouse_start_reconnect 
+
+mouse_buletooth_fast_conn_end:
+5ca2 44a8c00a bpatch patch0a_1 ,mem_patch0a 
+5ca3 20405e78 call mouse_select_reconn_device 
+5ca4 20405cb0 call mouse_bluetooth_fast_conn_disable 
+5ca5 6fe0c5d1 fetch 1 ,mem_device_flag 
+5ca6 c000dca9 beq mode_bt_device1 ,mouse_device1_check_auto_discover 
+5ca7 c0015cab beq mode_bt_device2 ,mouse_device2_check_auto_discover 
+5ca8 20600000 rtn 
+
+mouse_device1_check_auto_discover:
+5ca9 6fe345d3 fetch 6 ,mem_device1_addr 
+5caa 20205cac branch mouse_device_check_auto_discover 
+
+mouse_device2_check_auto_discover:
+5cab 6fe345f0 fetch 6 ,mem_device2_addr 
+
+mouse_device_check_auto_discover:
+5cac 684b460d fetcht 6 ,mem_mouse_compare_addr_ff 
+5cad 98467c00 isub temp ,null 
+5cae 2022de21 branch mouse_start_discovery ,zero 
+5caf 20205793 branch mouse_start_reconnect_device 
+
+mouse_bluetooth_fast_conn_disable:
+5cb0 70475f5a jam 0x5a ,mem_mouse_bluetooth_fast_conn_flag 
+5cb1 20600000 rtn 
+
+mouse_stop_bluetooth_mode:
+5cb2 6fe1442f fetch 2 ,mem_ui_state_map 
+5cb3 c284ce20 bbit1 ui_state_ble_connected ,app_ble_disconnect 
+5cb4 20205e42 branch mouse_stop_discovery 
+
+mouse_disconnect:
+5cb5 58000000 setarg 0 
+5cb6 67e14750 store 2 ,mem_mouse_no_data_timer 
+5cb7 6fe1442f fetch 2 ,mem_ui_state_map 
+5cb8 c284ce20 bbit1 ui_state_ble_connected ,app_ble_disconnect 
+5cb9 20600000 rtn 
+
+mouse_check_125hz:
+5cba 6fe44848 fetch mouse_flag_len ,mem_mouse_flag 
+5cbb c40d8000 rtnbit0 mouse_enable_bt_125hz 
+
+mouse_bluetooth_125hz:
+5cbc 24345cc2 nbranch mouse_bluetooth_125hz_clear ,user 
+5cbd 6fe0c74b fetch 1 ,mem_bluetooth_125hz_cnt 
+5cbe 1fe0fe01 increase 1 ,pdata 
+5cbf 1fe17e0f and_into 0x0f ,pdata 
+5cc0 67e0c74b store 1 ,mem_bluetooth_125hz_cnt 
+5cc1 247a0000 nrtn blank 
+
+mouse_bluetooth_125hz_clear:
+5cc2 70474b00 jam 0 ,mem_bluetooth_125hz_cnt 
+5cc3 78547c00 disable user 
+5cc4 20600000 rtn 
+
+mouse_current_mult_update:
+5cc5 6fe0c5b8 fetch 1 ,mem_sensor_motion_gpio 
+5cc6 c1ff8000 rtnne gpio_disable 
+5cc7 7040c100 jam 0 ,mem_lpm_mult 
+5cc8 70474d1e jam 30 ,mem_mouse_current_mult_timer 
+5cc9 20600000 rtn 
+
+mouse_priority_bb_event:
+5cca 44a9400a bpatch patch0a_2 ,mem_patch0a 
+5ccb 1a627e00 copy regc ,pdata 
+5ccc c00a5cd9 beq bt_evt_le_connected ,mouse_le_bb_event_connected 
+5ccd c00adce8 beq bt_evt_le_disconnected ,mouse_le_bb_disconnected 
+5cce c0085e1c beq bt_evt_button_long_pressed ,mouse_bb_event_discovery_btn 
+5ccf c018dcf5 beq bt_evt_le_pairing_success ,mouse_le_pairing_success 
+5cd0 c014dcf7 beq bt_evt_le_enc_info ,mouse_le_enc_info 
+5cd1 c0195cf9 beq bt_evt_le_start_enc ,mouse_le_ll_start_encryt 
+5cd2 c01f4e2a beq bt_evt_le_pairing_complete ,app_ble_store_reconn_info 
+5cd3 c0205d04 beq bt_evt_le_parse_conn_papa_update_rsp ,mouse_le_conn_param_update_rsp_recieved 
+5cd4 c01ce124 beq bt_evt_24g_pairing_complete ,mouse_24g_pairing_complete 
+5cd5 c01d60f0 beq bt_evt_24g_attempt_fail ,mouse_24g_attempt_fail 
+5cd6 c01e6115 beq bt_evt_24g_attempt_success ,mouse_24g_attempt_success 
+5cd7 c0225d18 beq bt_evt_le_parse_conn_param_accepted ,mouse_le_parse_conn_param_accepted 
+5cd8 20600000 rtn 
+
+mouse_le_bb_event_connected:
+5cd9 70474c00 jam 0 ,mem_mouse_long_mult_flag 
+5cda 20405c7b call mouse_init_sensor_reset 
+5cdb 70476401 jam 1 ,mem_mouse_le_bb_connected_flag 
+5cdc 204060df call mouse_24g_first_store_reconn_info 
+5cdd 6fe0c765 fetch 1 ,mem_mouse_le_reconnect_flag 
+5cde 243a5ce0 nbranch mouse_le_bb_event_connected_next ,blank 
+5cdf 70476614 jam 0x14 ,mem_mouse_send_secutiry_request_timer 
+
+mouse_le_bb_event_connected_next:
+5ce0 6fe143a6 fetch app_disc_rsn_size ,mem_app_disconn_reason_flag 
+5ce1 793ffe00 set0 app_disc_by_button ,pdata 
+5ce2 67e143a6 store app_disc_rsn_size ,mem_app_disconn_reason_flag 
+5ce3 70481500 jam 0 ,mem_mouse_direct_timer 
+5ce4 6fe1478e fetch 2 ,mem_le_battery_level_updata_timer_init 
+5ce5 67e14790 store 2 ,mem_le_battery_level_updata_timer 
+5ce6 20405e12 call mouse_no_data_timer_init 
+5ce7 20205e42 branch mouse_stop_discovery 
+
+mouse_le_bb_disconnected:
+5ce8 58000000 setarg 0 
+5ce9 67e14790 store 2 ,mem_le_battery_level_updata_timer 
+5cea 70476400 jam 0 ,mem_mouse_le_bb_connected_flag 
+5ceb d8400006 arg le_interval_7_5ms ,temp 
+5cec 6fe44848 fetch mouse_flag_len ,mem_mouse_flag 
+5ced c28ddcef bbit1 mouse_enable_bt_125hz ,mouse_le_bb_disconnected_next 
+5cee d8400007 arg le_interval_8_75ms ,temp 
+
+mouse_le_bb_disconnected_next:
+5cef 604942a6 storet 2 ,mem_le_interval_min 
+5cf0 604942a8 storet 2 ,mem_le_interval_min + 2 
+5cf1 70479200 jam le_lpm_enable ,mem_mouse_le_conn_param_reject 
+5cf2 70474a00 jam 0 ,mem_mouse_clear_sensor_data_flag 
+5cf3 204041a4 call le_clr_config_more_data 
+5cf4 20205d7e branch mouse_bb_disconnected 
+
+mouse_le_pairing_success:
+5cf5 d8e00002 arg ll_pairing_success_flag ,queue 
+5cf6 20205d00 branch mouse_le_enable_connect_flag 
+
+mouse_le_enc_info:
+
+mouse_updata_le_param:
+5cf7 7004c312 jam bt_cmd_le_update_conn ,mem_fifo_temp 
+5cf8 202070a4 branch ui_ipc_send_cmd 
+
+mouse_le_ll_start_encryt:
+5cf9 6fe0c765 fetch 1 ,mem_mouse_le_reconnect_flag 
+5cfa c000dcfc beq 1 ,mouse_le_ll_reconn_start_encryt 
+5cfb 20205cfe branch mouse_le_ll_enable_start_enc_flag 
+
+mouse_le_ll_reconn_start_encryt:
+5cfc 20405cf7 call mouse_updata_le_param 
+5cfd 70481414 jam 20 ,mem_le_start_encrypt_timer 
+
+mouse_le_ll_enable_start_enc_flag:
+5cfe d8e00001 arg ll_start_enc_flag ,queue 
+5cff 20205d00 branch mouse_le_enable_connect_flag 
+
+mouse_le_enable_connect_flag:
+5d00 6fe0c813 fetch 1 ,mem_le_connect_status_flag 
+5d01 f9207e00 qset1 pdata 
+5d02 67e0c813 store 1 ,mem_le_connect_status_flag 
+5d03 20600000 rtn 
+
+mouse_le_conn_param_update_rsp_recieved:
+5d04 6fe1430f fetch 2 ,mem_le_l2cap_signaling_conn_param_update_rsp_result 
+5d05 c1000000 rtneq ble_signaling_connect_parameter_update_accepted 
+5d06 6fe08165 fetch 1 ,mem_le_tsniff 
+5d07 1feb7e00 rshift2 pdata ,pdata 
+5d08 1fe67c0c sub pdata ,le_interval_15ms ,null 
+5d09 20610000 rtn positive 
+5d0a 58000009 setarg le_interval_11_25ms 
+5d0b 67e142a6 store 2 ,mem_le_interval_min 
+5d0c 67e142a8 store 2 ,mem_le_interval_min + 2 
+5d0d 20405cf7 call mouse_updata_le_param 
+
+mouse_le_conn_param_lpm_disable:
+5d0e 70479201 jam le_lpm_disable ,mem_mouse_le_conn_param_reject 
+5d0f 20600000 rtn 
+
+mouse_le_bb_event_connect_complete:
+5d10 6fe0c765 fetch 1 ,mem_mouse_le_reconnect_flag 
+5d11 247a0000 nrtn blank 
+5d12 6fe0c36b fetch 1 ,mem_le_att_handle 
+5d13 1fe67e22 sub pdata ,34 ,pdata 
+5d14 24628000 nrtn zero 
+5d15 70481400 jam 0 ,mem_le_start_encrypt_timer 
+
+mouse_le_write_enable:
+5d16 d8e00000 arg write_req_enable_flag ,queue 
+5d17 20205d00 branch mouse_le_enable_connect_flag 
+
+mouse_le_parse_conn_param_accepted:
+5d18 6fe0819d fetch 1 ,mem_le_new_conninterval 
+5d19 1fe67c0c sub pdata ,le_interval_15ms ,null 
+5d1a 24215d0e nbranch mouse_le_conn_param_lpm_disable ,positive 
+5d1b 67e142a6 store 2 ,mem_le_interval_min 
+5d1c 67e142a8 store 2 ,mem_le_interval_min + 2 
+5d1d 6fe0819f fetch 1 ,mem_le_new_connslavelatency 
+5d1e 203a5d25 branch mouse_le_lpm_mult_reinit ,blank 
+5d1f 6848c827 fetcht 1 ,mem_lpm_mult_init 
+5d20 98467c00 isub temp ,null 
+5d21 20215d25 branch mouse_le_lpm_mult_reinit ,positive 
+5d22 6fe0819f fetch 1 ,mem_le_new_connslavelatency 
+5d23 67e0c0c1 store 1 ,mem_lpm_mult 
+5d24 20205d27 branch mouse_le_conn_param_lpm_enable 
+
+mouse_le_lpm_mult_reinit:
+5d25 6fe0c827 fetch 1 ,mem_lpm_mult_init 
+5d26 67e0c0c1 store 1 ,mem_lpm_mult 
+
+mouse_le_conn_param_lpm_enable:
+5d27 70479200 jam le_lpm_enable ,mem_mouse_le_conn_param_reject 
+5d28 20600000 rtn 
+
+mouse_le_clean_connect_flag:
+5d29 70481300 jam 0 ,mem_le_connect_status_flag 
+5d2a 20600000 rtn 
+
+mouse_le:
+5d2b 44a9c00a bpatch patch0a_3 ,mem_patch0a 
+5d2c 20404203 call le_fifo_check_nearly_full 
+5d2d 247a0000 nrtn blank 
+5d2e 6fe0c75f fetch 1 ,mem_mouse_bluetooth_fast_conn_flag 
+5d2f c07fdd33 beq 0xff ,mouse_le_next 
+5d30 6fe0c813 fetch 1 ,mem_le_connect_status_flag 
+5d31 1fe17e03 and pdata ,0x03 ,pdata 
+5d32 c1818000 rtnne 0x03 
+
+mouse_le_next:
+5d33 6fe0c74a fetch 1 ,mem_mouse_clear_sensor_data_flag 
+5d34 205a5c79 call mouse_clear_sensor_data_by_reset ,blank 
+5d35 6fe44848 fetch mouse_flag_len ,mem_mouse_flag 
+5d36 c280dd63 bbit1 mouse_24g_pairing_flag ,mouse_le_send_empty_packet 
+5d37 c2805d63 bbit1 mouse_select_device_flag ,mouse_le_send_empty_packet 
+5d38 c282dd63 bbit1 mouse_bt_discovery_button_down_flag ,mouse_le_send_empty_packet 
+5d39 c2835d63 bbit1 mouse_bt_discovery_button_long_down_flag ,mouse_le_send_empty_packet 
+5d3a 20405931 call mouse_motion 
+5d3b 20405cba call mouse_check_125hz 
+5d3c 24740000 nrtn user 
+5d3d 20405cc5 call mouse_current_mult_update 
+5d3e 20405c7c call mouse_data_xy_release 
+5d3f 204059df call mouse_wheel_trigger 
+5d40 6fe44848 fetch mouse_flag_len ,mem_mouse_flag 
+5d41 c30add44 bbit0 mouse_enable_keyboard ,mouse_le_send_mouse_data 
+5d42 6fe0c828 fetch 1 ,mem_customer_key 
+5d43 c000dd45 beq 1 ,mouse_le_send_keyboard_package_data 
+
+mouse_le_send_mouse_data:
+5d44 20205d65 branch mouse_fill_mouse_data_le 
+
+mouse_le_send_keyboard_package_data:
+5d45 6fe0c829 fetch 1 ,mem_customer_data_trigger 
+5d46 203a5d55 branch mouse_le_release_keyboard_data ,blank 
+5d47 6fe44869 fetch 8 ,mem_customer_key_press + 1 
+
+mouse_fill_keyboard_package_data_le:
+5d48 67e404c4 store 8 ,mem_pdatatemp 
+5d49 6fe0c868 fetch 1 ,mem_customer_key_press 
+5d4a c001dd57 beq kb_multikey_report_id ,mouse_fill_multimedia_key_data_le 
+5d4b c0015d5a beq kb_system_conctrl_report_id ,mouse_fill_systemctrl_key_data_le 
+5d4c 70478408 jam 8 ,mem_le_data_len 
+5d4d 68494785 fetcht 2 ,mem_le_keyboard_handle 
+
+mouse_fill_data_le:
+5d4e 6fe0c784 fetch 1 ,mem_le_data_len 
+5d4f 1fe22200 copy pdata ,rega 
+5d50 20404546 call le_att_malloc_tx_notify 
+5d51 6848c784 fetcht 1 ,mem_le_data_len 
+5d52 18427200 copy temp ,loopcnt 
+5d53 d8c004c4 arg mem_pdatatemp ,contr 
+5d54 20207548 branch memcpy 
+
+mouse_le_release_keyboard_data:
+5d55 6fe44872 fetch 8 ,mem_customer_key_release + 1 
+5d56 20205d48 branch mouse_fill_keyboard_package_data_le 
+
+mouse_fill_multimedia_key_data_le:
+5d57 70478403 jam 3 ,mem_le_data_len 
+5d58 68494787 fetcht 2 ,mem_le_multimedia_handle 
+5d59 20205d4e branch mouse_fill_data_le 
+
+mouse_fill_systemctrl_key_data_le:
+5d5a 70478402 jam 2 ,mem_le_data_len 
+5d5b 68494789 fetcht 2 ,mem_le_systemctrl_handle 
+5d5c 20205d4e branch mouse_fill_data_le 
+
+mouse_fill_battery_level_le:
+5d5d da200001 arg 1 ,rega 
+5d5e 6849478b fetcht 2 ,mem_le_battery_level_handle 
+5d5f 20404546 call le_att_malloc_tx_notify 
+5d60 6fe0c78d fetch 1 ,mem_le_battery_level_percentage 
+5d61 e7e08005 istore 1 ,contw 
+5d62 20600000 rtn 
+
+mouse_le_send_empty_packet:
+5d63 58000000 setarg 0 
+5d64 67e3c56a store 7 ,mem_mouse_key 
+
+mouse_fill_mouse_data_le:
+5d65 70478407 jam 7 ,mem_le_data_len 
+5d66 6fe3c56a fetch 7 ,mem_mouse_key 
+5d67 67e384c4 store 7 ,mem_pdatatemp 
+5d68 6849428b fetcht 2 ,mem_le_notify_handle 
+5d69 20205d4e branch mouse_fill_data_le 
+
+mouse_check_51cmd_adv:
+5d6a 70476500 jam 0 ,mem_mouse_le_reconnect_flag 
+5d6b 6fe1c76a fetch 3 ,mem_le_adv_ind 
+5d6c 67e1c320 store 3 ,mem_le_adv_data + 4 
+5d6d 20405d73 call mouse_le_check_adv_flag 
+5d6e 58000005 setarg adv_flag_bredr_not_supported | adv_flag_limited_discoverable 
+5d6f e7e08006 istore 1 ,contr 
+5d70 d8c04770 arg mem_le_adv_swift_pair ,contr 
+5d71 20405d7a call mouse_le_adv_data_update 
+5d72 202070e0 branch check_51cmd_adv 
+
+mouse_le_check_adv_flag:
+5d73 da20431c arg mem_le_adv_data ,rega 
+
+mouse_le_check_adv_flag_loop:
+5d74 efe08011 ifetch 1 ,rega 
+5d75 207a0000 rtn blank 
+5d76 98c0a200 iadd contr ,rega 
+5d77 efe08006 ifetch 1 ,contr 
+5d78 c1008000 rtneq 0x01 
+5d79 20205d74 branch mouse_le_check_adv_flag_loop 
+
+mouse_le_adv_data_update:
+5d7a d8a04327 arg mem_le_adv_data + 11 ,contw 
+5d7b df200013 arg 19 ,loopcnt 
+5d7c 20407548 call memcpy 
+5d7d 20204142 branch le_modified_name_adv 
+
+mouse_bb_disconnected:
+5d7e 20405d83 call mouse_bb_discon_clear_stack 
+5d7f 6fe143a4 fetch app_disc_rsn_size ,mem_app_disconn_reason 
+5d80 c283dd89 bbit1 app_disc_ble ,mouse4_0_event_bb_disconn 
+5d81 c2804dfd bbit1 app_disc_by_button ,app_disconn_reason_clear 
+5d82 20205e21 branch mouse_start_discovery 
+
+mouse_bb_discon_clear_stack:
+5d83 58000000 setarg 0 
+5d84 67e44573 store 8 ,mem_wheel_tb_old_pinlevel 
+5d85 e7e20005 istore 4 ,contw 
+5d86 70466100 jam 0 ,mem_mouse_move_flag 
+5d87 70425a00 jam 0 ,mem_ltk_exists 
+5d88 20600000 rtn 
+
+mouse4_0_event_bb_disconn:
+5d89 20405d29 call mouse_le_clean_connect_flag 
+5d8a 6fe143a4 fetch app_disc_rsn_size ,mem_app_disconn_reason 
+5d8b c2804dfd bbit1 app_disc_by_button ,app_disconn_reason_clear 
+5d8c 202057c3 branch mouse_app_enter_hibernate 
+
+mouse_bb_event_timer:
+5d8d 44aa400a bpatch patch0a_4 ,mem_patch0a 
+5d8e 2040585d call mouse_adc_read 
+5d8f 20406239 call mouse_low_voltage_led_timer 
+5d90 20404938 call g24_pair_timeout_timer 
+5d91 20404bc0 call g24_reconn_timeout_timer 
+5d92 20406081 call mouse_24g_long_sleep_param_update_timer 
+5d93 2040619f call mouse_device_poweron_timer 
+5d94 204061d0 call mouse_dpi_led_blink_delay_timer 
+5d95 20405a3c call mouse_dpi_key_check_long_press 
+5d96 20405da2 call mouse_bt_discovery_check 
+5d97 20405db2 call mouse_commbination_key_process 
+5d98 20405dd5 call mouse_check_discovery_timeout_timer 
+5d99 20405dda call mouse_check_direct_timeout_timer 
+5d9a 20405de8 call mouse_le_enable_att_list_timer 
+5d9b 20405df5 call mouse_le_battery_updata_timer 
+5d9c 20405deb call mouse_le_send_smp_security_request_timer 
+5d9d 20405e02 call mouse_check_reconnect_delay_long_sleep 
+5d9e 20405e05 call mouse_current_mult_update_timer 
+5d9f 204059e4 call mouse_wheel_trigger_timer 
+5da0 20405e15 call mouse_store_information_delay_timer 
+5da1 20205e0c branch mouse_check_no_data_timeout_timer 
+
+mouse_bt_discovery_check:
+5da2 6fe44848 fetch mouse_flag_len ,mem_mouse_flag 
+5da3 c29bdda5 bbit1 mouse_enable_pb_button_long_press_disconvery ,mouse_bt_discovery_by_pb_button 
+5da4 20600000 rtn 
+
+mouse_bt_discovery_by_pb_button:
+5da5 6fe0c83b fetch 1 ,mem_select_device_button_statue 
+5da6 c1808000 rtnne pb_button_state_down 
+5da7 da604838 arg mem_bt_discovery_count ,regc 
+5da8 da405daa arg mouse_long_button_bt_discovery ,regb 
+5da9 20204de1 branch timer_single_step 
+
+mouse_long_button_bt_discovery:
+5daa 6fe0c5d1 fetch 1 ,mem_device_flag 
+5dab c1000000 rtneq mode_24g_device 
+5dac 6fe44848 fetch mouse_flag_len ,mem_mouse_flag 
+5dad c3830000 rtnbit1 mouse_bt_discovery_button_long_down_flag 
+5dae d8e00006 arg mouse_bt_discovery_button_long_down_flag ,queue 
+5daf 20405fa1 call mouse_enable_function_flag 
+5db0 20404dd1 call app_evt_button_long_pressed 
+5db1 20205e1c branch mouse_bb_event_discovery_btn 
+
+mouse_commbination_key_process:
+5db2 6fe0c5d1 fetch 1 ,mem_device_flag 
+5db3 c0005db8 beq mode_24g_device ,mouse_24g_commbination_key_process 
+5db4 6fe44848 fetch mouse_flag_len ,mem_mouse_flag 
+5db5 c41a8000 rtnbit0 mouse_enable_commbination_key_by_bt_discovery 
+5db6 6848c866 fetcht 1 ,mem_mouse_commbination_key_bt 
+5db7 20205dbb branch mouse_commbination_key_start 
+
+mouse_24g_commbination_key_process:
+5db8 6fe44848 fetch mouse_flag_len ,mem_mouse_flag 
+5db9 c4190000 rtnbit0 mouse_enable_commbination_key_by_24g_pairing 
+5dba 6848c867 fetcht 1 ,mem_mouse_commbination_key_24g 
+
+mouse_commbination_key_start:
+5dbb 6048c83a storet 1 ,mem_mouse_commbination_key 
+5dbc 20405ad4 call mouse_check_key_gpio 
+5dbd 1fe17e07 and pdata ,0x07 ,pdata 
+5dbe 6848c83a fetcht 1 ,mem_mouse_commbination_key 
+5dbf 98467c00 isub temp ,null 
+5dc0 2022ddc7 branch mouse_commbination_key_down ,zero 
+
+mouse_commbination_key_up:
+5dc1 6fe0c431 fetch 1 ,mem_ui_button_timeout 
+5dc2 67e0c83d store 1 ,mem_combination_ui_button_count 
+5dc3 6fe0c83c fetch 1 ,mem_commbination_key_statue 
+5dc4 c1000000 rtneq commbination_key_state_up 
+5dc5 70483c00 jam commbination_key_state_up ,mem_commbination_key_statue 
+5dc6 20600000 rtn 
+
+mouse_commbination_key_down:
+5dc7 20405dcc call mouse_combination_ui_timer 
+5dc8 6fe0c83c fetch 1 ,mem_commbination_key_statue 
+5dc9 c1008000 rtneq commbination_key_state_down 
+5dca 70483c01 jam commbination_key_state_down ,mem_commbination_key_statue 
+5dcb 20600000 rtn 
+
+mouse_combination_ui_timer:
+5dcc da4060e4 arg mouse_24g_start_pair_mode ,regb 
+5dcd da60483d arg mem_combination_ui_button_count ,regc 
+5dce 6fe0c5d1 fetch 1 ,mem_device_flag 
+5dcf c0004de1 beq mode_24g_device ,timer_single_step 
+5dd0 da405daa arg mouse_long_button_bt_discovery ,regb 
+5dd1 20404de1 call timer_single_step 
+5dd2 6fe0c83d fetch 1 ,mem_combination_ui_button_count 
+5dd3 c000df93 beq 1 ,mouse_bt_discovery_button_down_enable 
+5dd4 20600000 rtn 
+
+mouse_check_discovery_timeout_timer:
+5dd5 da604760 arg mem_mouse_discovery_timer ,regc 
+5dd6 da405dd8 arg mouse_check_discovery_timeout ,regb 
+5dd7 20204de8 branch timer_single_step_2b 
+
+mouse_check_discovery_timeout:
+5dd8 20405e42 call mouse_stop_discovery 
+5dd9 202057c3 branch mouse_app_enter_hibernate 
+
+mouse_check_direct_timeout_timer:
+5dda da604815 arg mem_mouse_direct_timer ,regc 
+5ddb da405de0 arg mouse_check_direct_timeout ,regb 
+5ddc 20404de8 call timer_single_step_2b 
+5ddd 6fe0c815 fetch 1 ,mem_mouse_direct_timer 
+5dde c000ce14 beq 1 ,app_ble_stop_direct_adv 
+5ddf 20600000 rtn 
+
+mouse_check_direct_timeout:
+5de0 6fe0c75f fetch 1 ,mem_mouse_bluetooth_fast_conn_flag 
+5de1 c07fdca2 beq 0xff ,mouse_buletooth_fast_conn_end 
+5de2 6fe0c74e fetch 1 ,mem_reconn_times 
+5de3 243a5fbf nbranch mouse_polling_device ,blank 
+5de4 6fe44848 fetch mouse_flag_len ,mem_mouse_flag 
+5de5 c299de21 bbit1 mouse_enable_bt_reconnect_timeout_enter_discovery ,mouse_start_discovery 
+5de6 c297e0dc bbit1 mouse_enable_24g_first_auto_pairing ,mouse_24g_first_bb_event_reconn_timeout 
+5de7 202057c3 branch mouse_app_enter_hibernate 
+
+mouse_le_enable_att_list_timer:
+5de8 da604814 arg mem_le_start_encrypt_timer ,regc 
+5de9 da405d16 arg mouse_le_write_enable ,regb 
+5dea 20204de1 branch timer_single_step 
+
+mouse_le_send_smp_security_request_timer:
+5deb 6fe0c764 fetch 1 ,mem_mouse_le_bb_connected_flag 
+5dec 207a0000 rtn blank 
+5ded da604766 arg mem_mouse_send_secutiry_request_timer ,regc 
+5dee da405df0 arg mouse_le_pairing_sm_start_check ,regb 
+5def 20204de1 branch timer_single_step 
+
+mouse_le_pairing_sm_start_check:
+5df0 6fe0c765 fetch 1 ,mem_mouse_le_reconnect_flag 
+5df1 247a0000 nrtn blank 
+5df2 6fe0c2cf fetch 1 ,mem_le_pairing_state 
+5df3 c1800000 rtnne flag_le_pairing_null 
+5df4 202046d4 branch le_pairing_sm_start 
+
+mouse_le_battery_updata_timer:
+5df5 6fe44848 fetch mouse_flag_len ,mem_mouse_flag 
+5df6 c39d8000 rtnbit1 mouse_enable_le_battery_service_cancel 
+5df7 da604790 arg mem_le_battery_level_updata_timer ,regc 
+5df8 da405dfa arg mouse_le_battery_level_updata ,regb 
+5df9 20204de1 branch timer_single_step 
+
+mouse_le_battery_level_updata:
+5dfa 6fe1478e fetch 2 ,mem_le_battery_level_updata_timer_init 
+5dfb 67e14790 store 2 ,mem_le_battery_level_updata_timer 
+5dfc 20205d5d branch mouse_fill_battery_level_le 
+
+mouse_le_enable_att_list:
+5dfd 6fe0c813 fetch 1 ,mem_le_connect_status_flag 
+5dfe c3810000 rtnbit1 ll_pairing_success_flag 
+5dff 20405cf7 call mouse_updata_le_param 
+5e00 d8e00000 arg write_req_enable_flag ,queue 
+5e01 20205d00 branch mouse_le_enable_connect_flag 
+
+mouse_check_reconnect_delay_long_sleep:
+5e02 da604762 arg mem_mouse_bluetooth_reconnect_timeout ,regc 
+5e03 da4057c3 arg mouse_app_enter_hibernate ,regb 
+5e04 20204de1 branch timer_single_step 
+
+mouse_current_mult_update_timer:
+5e05 da60474d arg mem_mouse_current_mult_timer ,regc 
+5e06 da405e08 arg mouse_current_mult_reinit ,regb 
+5e07 20204de1 branch timer_single_step 
+
+mouse_current_mult_reinit:
+5e08 6fe0c827 fetch 1 ,mem_lpm_mult_init 
+5e09 67e0c0c1 store 1 ,mem_lpm_mult 
+5e0a 70474c01 jam 1 ,mem_mouse_long_mult_flag 
+5e0b 20600000 rtn 
+
+mouse_check_no_data_timeout_timer:
+5e0c da604750 arg mem_mouse_no_data_timer ,regc 
+5e0d da405e0f arg mouse_check_no_data_timeout ,regb 
+5e0e 20204de8 branch timer_single_step_2b 
+
+mouse_check_no_data_timeout:
+5e0f 6fe0c5d1 fetch 1 ,mem_device_flag 
+5e10 c0006096 beq mode_24g_device ,mouse_24g_hibernate_set 
+5e11 20205cb5 branch mouse_disconnect 
+
+mouse_no_data_timer_init:
+5e12 6fe1485a fetch 2 ,mem_mouse_no_data_timeout 
+5e13 67e14750 store 2 ,mem_mouse_no_data_timer 
+5e14 20600000 rtn 
+
+mouse_store_information_delay_timer:
+5e15 da604658 arg mem_store_information_delay_timer ,regc 
+5e16 da405e18 arg mouse_store_device_info_check ,regb 
+5e17 20204de1 branch timer_single_step 
+
+mouse_store_device_info_check:
+5e18 20405ea6 call mouse_store_device_info 
+5e19 6fe0c763 fetch 1 ,mem_mouse_need_soft_reset 
+5e1a 243a5f72 nbranch mouse_soft_reset ,blank 
+5e1b 20600000 rtn 
+
+mouse_bb_event_discovery_btn:
+5e1c 280ffe26 isolate1 mark_24g ,mark 
+5e1d 2040e0b4 call mouse_24g_stop ,true 
+5e1e 20405cb5 call mouse_disconnect 
+5e1f 20405d29 call mouse_le_clean_connect_flag 
+5e20 20205e21 branch mouse_start_discovery 
+
+mouse_start_discovery:
+5e21 44aac00a bpatch patch0a_5 ,mem_patch0a 
+5e22 6fe1442f fetch 2 ,mem_ui_state_map 
+5e23 2feffe0b isolate1 ui_state_ble_adv ,pdata 
+5e24 2040de48 call mouse_stop_le_adv ,true 
+5e25 20405cb0 call mouse_bluetooth_fast_conn_disable 
+5e26 6fe1442f fetch 2 ,mem_ui_state_map 
+5e27 c285de30 bbit1 ui_state_ble_adv ,mouse_start_discovery_norandom 
+5e28 6fe44848 fetch mouse_flag_len ,mem_mouse_flag 
+5e29 c3045e30 bbit0 mouse_enable_ble_random_addre ,mouse_start_discovery_norandom 
+5e2a 68494630 fetcht 2 ,mem_random_addr_increase_count 
+5e2b 18408401 increase 1 ,temp 
+5e2c 60494630 storet 2 ,mem_random_addr_increase_count 
+5e2d 604942af storet 2 ,mem_le_lap + 1 
+5e2e 180a7e00 random pdata 
+5e2f 67e0c2ae store 1 ,mem_le_lap 
+
+mouse_start_discovery_norandom:
+5e30 6fe1c767 fetch 3 ,mem_mouse_le_lap_temp 
+5e31 67e1c2b1 store 3 ,mem_le_lap + 3 
+5e32 20404e2e call app_lpm_mult_disable 
+5e33 6fe14598 fetch 2 ,mem_mouse_discovery_timeout 
+5e34 67e14760 store 2 ,mem_mouse_discovery_timer 
+5e35 58000000 setarg 0 
+5e36 67e14750 store 2 ,mem_mouse_no_data_timer 
+5e37 67e14790 store 2 ,mem_le_battery_level_updata_timer 
+5e38 67e0c815 store 1 ,mem_mouse_direct_timer 
+5e39 67e0c762 store 1 ,mem_mouse_bluetooth_reconnect_timeout 
+5e3a 67e0c844 store 1 ,mem_mouse_device_poweron_timer_count 
+5e3b 67e0c74a store 1 ,mem_mouse_clear_sensor_data_flag 
+5e3c d8e00002 arg mouse_store_eeprom_flag ,queue 
+5e3d 20405fa1 call mouse_enable_function_flag 
+5e3e 20405f95 call mouse_bt_discovery_button_down_disable 
+5e3f 20405d6a call mouse_check_51cmd_adv 
+5e40 20406271 call mouse_low_voltage_led_blink_disable 
+5e41 202061ad branch mouse_discover_setting_led_gpio 
+
+mouse_stop_discovery:
+5e42 44ab400a bpatch patch0a_6 ,mem_patch0a 
+5e43 d8e00006 arg mouse_bt_discovery_button_long_down_flag ,queue 
+5e44 20405fa5 call mouse_disable_function_flag 
+5e45 70476200 jam 0 ,mem_mouse_bluetooth_reconnect_timeout 
+5e46 20405e48 call mouse_stop_le_adv 
+5e47 202061f3 branch mouse_device_led_off 
+
+mouse_stop_le_adv:
+5e48 70481500 jam 0 ,mem_mouse_direct_timer 
+5e49 202070e6 branch check_51cmd_stop_adv 
+
+mouse_store_remote_bdaddr:
+5e4a 44abc00a bpatch patch0a_7 ,mem_patch0a 
+5e4b 6fe44848 fetch mouse_flag_len ,mem_mouse_flag 
+5e4c c4010000 rtnbit0 mouse_store_eeprom_flag 
+5e4d 204061a7 call mouse_device_poweron_timer_init 
+5e4e d8e00002 arg mouse_store_eeprom_flag ,queue 
+5e4f 20405fa5 call mouse_disable_function_flag 
+5e50 20405e53 call mouse_check_device_addr 
+
+mouse_unplug_clean_bdaddr:
+5e51 20405e62 call mouse_before_store_reconn_info 
+5e52 20205ea3 branch mouse_store_device_info_delay 
+
+mouse_check_device_addr:
+5e53 6fe0802d fetch 1 ,mem_record_bt_mode 
+5e54 c01a5e56 beq rec_4_mode ,mouse_check_le_device_addr 
+5e55 20600000 rtn 
+
+mouse_check_le_device_addr:
+5e56 67e0c816 store 1 ,mem_device_addr_temp 
+5e57 6fe30173 fetch 6 ,mem_le_plap 
+
+mouse_check_bt_device_addr_common:
+5e58 67e34817 store 6 ,mem_device_addr_temp + 1 
+5e59 6fe3c816 fetch 7 ,mem_device_addr_temp 
+5e5a d8c045d2 arg mem_device1_type ,contr 
+5e5b df200003 arg 3 ,loopcnt 
+
+mouse_check_device_addr_end:
+5e5c e8438006 ifetcht 7 ,contr 
+5e5d 98467c00 isub temp ,null 
+5e5e 2022de72 branch mouse_clean_addr ,zero 
+5e5f 18c08c16 increase 22 ,contr 
+5e60 c2005e5c loop mouse_check_device_addr_end 
+5e61 20600000 rtn 
+
+mouse_before_store_reconn_info:
+5e62 da2045d2 arg mem_device1_type ,rega 
+5e63 6fe0c5d1 fetch 1 ,mem_device_flag 
+5e64 1fe0ffff increase -1 ,pdata 
+5e65 1feffe1d mul32 pdata ,29 ,pdata 
+5e66 9a20a200 iadd rega ,rega 
+5e67 6fe0802d fetch 1 ,mem_record_bt_mode 
+5e68 e7e08011 istore 1 ,rega 
+5e69 c01a5e6b beq rec_4_mode ,mouse_store_le_device 
+5e6a 20600000 rtn 
+
+mouse_store_le_device:
+5e6b 6fe30173 fetch 6 ,mem_le_plap 
+5e6c e7e30005 istore 6 ,contw 
+5e6d d8c0424a arg mem_le_ltk ,contr 
+5e6e 204074f5 call memcpy16 
+5e6f 6fe342ae fetch 6 ,mem_le_lap 
+5e70 e7e30005 istore 6 ,contw 
+5e71 20600000 rtn 
+
+mouse_clean_addr:
+5e72 18c08dfa increase -6 ,contr 
+5e73 18c20a00 copy contr ,contw 
+5e74 684b4817 fetcht 6 ,mem_device_addr_temp + 1 
+5e75 18408403 increase 3 ,temp 
+5e76 e0430005 istoret 6 ,contw 
+5e77 20600000 rtn 
+
+mouse_select_reconn_device:
+5e78 da2045d2 arg mem_device1_type ,rega 
+5e79 6fe0c5d1 fetch 1 ,mem_device_flag 
+5e7a c1000000 rtneq mode_24g_device 
+5e7b 1fe0ffff increase -1 ,pdata 
+5e7c 1feffe1d mul32 pdata ,29 ,pdata 
+5e7d 9a20a200 iadd rega ,rega 
+5e7e efe08011 ifetch 1 ,rega 
+5e7f 67e0c3a8 store 1 ,mem_xrecord_mode 
+5e80 c01a5e82 beq rec_4_mode ,mouse_load_le_device 
+5e81 20600000 rtn 
+
+mouse_load_le_device:
+5e82 efe30006 ifetch 6 ,contr 
+
+mouse_load_le_device_end:
+5e83 67e3410f store 6 ,mem_hci_plap 
+5e84 d8a0424a arg mem_le_ltk ,contw 
+5e85 204074f5 call memcpy16 
+5e86 efe30006 ifetch 6 ,contr 
+5e87 67e342ae store 6 ,mem_le_lap 
+5e88 20600000 rtn 
+
+mouse_app_initflag_check:
+5e89 6fe14629 fetch 2 ,mem_store_flag 
+5e8a d840aa55 arg eeprom_init_flag ,temp 
+5e8b 98467c00 isub temp ,null 
+5e8c 2022de97 branch mouse_load_device_info ,zero 
+5e8d 60494629 storet 2 ,mem_store_flag 
+5e8e 20405e9c call mouse_ble_init_address 
+5e8f 6fe0c752 fetch 1 ,mem_device_flag_temp 
+5e90 67e0c5d1 store 1 ,mem_device_flag 
+5e91 6fe0c5b2 fetch 1 ,mem_config_sensor_dpi 
+5e92 67e0c62b store 1 ,mem_mouse_dpi 
+5e93 6fe24527 fetch 4 ,mem_24g_fast_conn_addr 
+5e94 67e2452b store 4 ,mem_24g_receiver_addr 
+5e95 67e244d5 store 4 ,mem_24g_addr 
+5e96 20600000 rtn 
+
+mouse_load_device_info:
+5e97 20405e78 call mouse_select_reconn_device 
+5e98 6fe2462c fetch 4 ,mem_mouse_24g_addr 
+5e99 67e2452b store 4 ,mem_24g_receiver_addr 
+5e9a 67e244d5 store 4 ,mem_24g_addr 
+5e9b 20600000 rtn 
+
+mouse_ble_init_address:
+5e9c 6fe342ae fetch 6 ,mem_le_lap 
+5e9d 67e345e9 store 6 ,mem_device1_locall_addr 
+5e9e 1fe0ff00 add pdata ,0x0100 ,pdata 
+5e9f 67e34606 store 6 ,mem_device2_locall_addr 
+5ea0 1fe0ff00 add pdata ,0x0100 ,pdata 
+5ea1 67e34623 store 6 ,mem_device3_locall_addr 
+5ea2 20600000 rtn 
+
+mouse_store_device_info_delay:
+5ea3 6fe0c659 fetch 1 ,mem_store_information_delay_timer_init 
+5ea4 67e0c658 store 1 ,mem_store_information_delay_timer 
+5ea5 20600000 rtn 
+
+mouse_store_device_info:
+5ea6 44ac400b bpatch patch0b_0 ,mem_patch0b 
+5ea7 6fe44848 fetch mouse_flag_len ,mem_mouse_flag 
+5ea8 c289def4 bbit1 mouse_enable_eeprom ,mouse_store_eeprom_device_info 
+5ea9 c2895eb8 bbit1 mouse_enable_flash ,mouse_store_flash_device_info 
+5eaa 20600000 rtn 
+
+mouse_load_flash_info_check:
+5eab 20406979 call spid_init_flash 
+5eac 20405ebf call mouse_spid_flash_release_form_powerdown 
+5ead 20405eb2 call mouse_information_flash_parameters 
+5eae 2040699d call spid_read_flash 
+5eaf 20405ec6 call mouse_spid_flash_powerdown 
+5eb0 20405e89 call mouse_app_initflag_check 
+5eb1 20205926 branch mouse_sensor_spi_init 
+
+mouse_information_flash_parameters:
+5eb2 58004651 setarg mem_mouse_information_end 
+5eb3 d84045d1 arg mem_mouse_information_start ,temp 
+5eb4 98460400 isub temp ,temp 
+5eb5 6fe1c651 fetch 3 ,mem_flash_base 
+5eb6 da2045d1 arg mem_mouse_information_start ,rega 
+5eb7 20600000 rtn 
+
+mouse_store_flash_device_info:
+5eb8 20406979 call spid_init_flash 
+5eb9 20405ebf call mouse_spid_flash_release_form_powerdown 
+5eba 20405ed4 call mouse_flash_erase_sector 
+5ebb 20405eb2 call mouse_information_flash_parameters 
+5ebc 20405ed7 call mouse_spid_write_flash 
+5ebd 20405ec6 call mouse_spid_flash_powerdown 
+5ebe 20205926 branch mouse_sensor_spi_init 
+
+mouse_spid_flash_release_form_powerdown:
+5ebf 7004ccab jam flash_command_release_from_powerdown ,mem_temp 
+
+mouse_spid_write_flash_cmd:
+5ec0 20406d74 call delay_nop100 
+5ec1 2040697f call spid_unlock_flash 
+5ec2 da204654 arg mem_write_flash_head_temp ,rega 
+5ec3 684884cc fetcht 1 ,mem_temp 
+5ec4 20405ec8 call mouse_spid_write_flash_cmd_common 
+5ec5 20206d74 branch delay_nop100 
+
+mouse_spid_flash_powerdown:
+5ec6 7004ccb9 jam flash_command_powerdown ,mem_temp 
+5ec7 20205ec0 branch mouse_spid_write_flash_cmd 
+
+mouse_spid_write_flash_cmd_common:
+5ec8 e0408011 istoret 1 ,rega 
+5ec9 1ff10400 rshift16 pdata ,temp 
+5eca e0408005 istoret 1 ,contw 
+5ecb 1fec8400 rshift8 pdata ,temp 
+5ecc e0408005 istoret 1 ,contw 
+5ecd e7e08005 istore 1 ,contw 
+5ece 1a227e00 deposit rega 
+5ecf 67f10084 store 2 ,core_spid_txaddr 
+5ed0 58000000 setarg 0 
+5ed1 67f10088 store 2 ,core_spid_rxlen 
+5ed2 70800602 jam spid_start ,core_misc_ctrl 
+5ed3 20206939 branch wait_spid_done 
+
+mouse_flash_erase_sector:
+5ed4 6fe1c651 fetch 3 ,mem_flash_base 
+5ed5 67e1c3c7 store 3 ,mem_spi_write_addr 
+5ed6 20206953 branch spid_flash_erase_sector + 2 
+
+mouse_spid_write_flash:
+5ed7 1fe22600 copy pdata ,regc 
+5ed8 1a227e00 copy rega ,pdata 
+5ed9 1fe0fffc increase -4 ,pdata 
+5eda 1fe22400 copy pdata ,regb 
+5edb efe20012 ifetch 4 ,regb 
+5edc 67e24654 store 4 ,mem_write_flash_head_temp 
+5edd 1a627e00 copy regc ,pdata 
+5ede 2040698c call spid_write_flash 
+5edf 6fe24654 fetch 4 ,mem_write_flash_head_temp 
+5ee0 e7e20012 istore 4 ,regb 
+5ee1 20600000 rtn 
+
+mouse_flash_power_down:
+5ee2 6fe44848 fetch mouse_flag_len ,mem_mouse_flag 
+5ee3 c4090000 rtnbit0 mouse_enable_flash 
+5ee4 20405ec6 call mouse_spid_flash_powerdown 
+5ee5 2040671e call twspi_enable 
+5ee6 6848c3cf fetcht 1 ,mem_spi_cs_gpio 
+5ee7 20406c3f call gpio_out_inactive 
+5ee8 6848c3d4 fetcht 1 ,mem_spi_hold_gpio 
+5ee9 20205911 branch mouse_gpio_config_input_pd 
+
+mouse_load_eeprom_info_check:
+5eea 20406a0f call iicd_read_init_pin 
+5eeb 6fe44848 fetch mouse_flag_len ,mem_mouse_flag 
+5eec 2feffe09 isolate1 mouse_enable_2k_eeprom ,pdata 
+5eed 2440ea29 ncall clear_eeprom_size_2k ,true 
+5eee 20405ef0 call mouse_eeprom_load_recon_info 
+5eef 20205e89 branch mouse_app_initflag_check 
+
+mouse_eeprom_load_recon_info:
+5ef0 d8400080 arg 128 ,temp 
+5ef1 da2045d1 arg mem_device_flag ,rega 
+5ef2 da400000 arg mouse_info_eeprom_offect ,regb 
+5ef3 20206a46 branch iicd_read_eep_data 
+
+mouse_store_eeprom_device_info:
+5ef4 d8400080 arg 128 ,temp 
+5ef5 da2045d1 arg mem_device_flag ,rega 
+5ef6 da400000 arg mouse_info_eeprom_offect ,regb 
+5ef7 20206a38 branch iicd_write_protect_eep_data 
+
+mouse_store_eerpom_dpi:
+5ef8 d8400001 arg 1 ,temp 
+5ef9 da20462b arg mem_mouse_dpi ,rega 
+5efa da40005a arg mouse_dpi_eeprom_offect ,regb 
+5efb 20206a38 branch iicd_write_protect_eep_data 
+
+mouse_load_eeprom_dpi:
+5efc d8400001 arg 1 ,temp 
+5efd da20462b arg mem_mouse_dpi ,rega 
+5efe da40005a arg mouse_dpi_eeprom_offect ,regb 
+5eff 20206a46 branch iicd_read_eep_data 
+
+mouse_idle:
+5f00 44acc00b bpatch patch0b_1 ,mem_patch0b 
+5f01 20406273 call mouse_low_voltage_led_no_enter_lpm 
+5f02 2040711a call ui_check_paring_button 
+5f03 204059e9 call mouse_dpi_check 
+5f04 20405f08 call mouse_select_device_check 
+5f05 20405f53 call mouse_check_select_device_by_switch 
+5f06 20405f88 call mouse_bt_button_check 
+5f07 2020594a branch mouse_wheel_check 
+
+mouse_select_device_check:
+5f08 6fe44848 fetch mouse_flag_len ,mem_mouse_flag 
+5f09 c294df0d bbit1 mouse_enable_select_device_by_pb_button ,mouse_select_device_by_pb_button 
+5f0a c29bdf0d bbit1 mouse_enable_pb_button_long_press_disconvery ,mouse_select_device_by_pb_button 
+5f0b 20600000 rtn 
+
+mouse_select_device_by_pb_button_check_once:
+5f0c 70483103 jam 0x03 ,mem_mouse_pbkey_press_status 
+
+mouse_select_device_by_pb_button:
+5f0d 6fe0c5b6 fetch 1 ,mem_config_select_device_button_gpio 
+5f0e c17f8000 rtneq gpio_disable 
+5f0f da200000 arg 0 ,rega 
+5f10 70483306 jam mouse_pb_key ,mem_mouse_key_temp 
+5f11 6848c5b6 fetcht 1 ,mem_config_select_device_button_gpio 
+5f12 20405f1d call mouse_pb_button_check 
+5f13 67e0c831 store 1 ,mem_mouse_pbkey_press_status 
+5f14 6fe0c5b5 fetch 1 ,mem_matrix_public_gpio 
+5f15 c07fdf1a beq gpio_disable ,mouse_3io6key_pb_button_check_end 
+5f16 20405b1e call mouse_matrix_public_gpio_reset 
+
+mouse_select_device_by_pb_button_exit:
+5f17 1a227e00 copy rega ,pdata 
+5f18 c2835f3e bbit1 mouse_pb_key ,mouse_select_device_button_down 
+5f19 20205f33 branch mouse_select_device_button_up 
+
+mouse_3io6key_pb_button_check_end:
+5f1a 6848c5b6 fetcht 1 ,mem_config_select_device_button_gpio 
+5f1b 20405915 call mouse_gpio_config_input_pu 
+5f1c 20205f17 branch mouse_select_device_by_pb_button_exit 
+
+mouse_pb_button_check:
+5f1d 6fe44848 fetch mouse_flag_len ,mem_mouse_flag 
+5f1e c296df29 bbit1 mouse_enable_pb_button_connect_gnd ,mouse_pb_button_connect_gnd 
+5f1f 6fe0c831 fetch 1 ,mem_mouse_pbkey_press_status 
+5f20 1fe22600 copy pdata ,regc 
+5f21 6fe0c5b5 fetch 1 ,mem_matrix_public_gpio 
+5f22 c07fdb52 beq gpio_disable ,mouse_3io6key_check 
+5f23 6fe0c837 fetch 1 ,mem_mouse_ghost_flag 
+5f24 243a5f26 nbranch mouse_select_device_by_pb_button_end ,blank 
+5f25 20205f2b branch mouse_pb_button_connect_matrix 
+
+mouse_select_device_by_pb_button_end:
+5f26 70483b00 jam pb_button_state_up ,mem_select_device_button_statue 
+5f27 70483100 jam 0 ,mem_mouse_pbkey_press_status 
+5f28 20600000 rtn 
+
+mouse_pb_button_connect_gnd:
+5f29 6fe0c831 fetch 1 ,mem_mouse_pbkey_press_status 
+5f2a 20205b46 branch mouse_check_key_connect_gnd 
+
+mouse_pb_button_connect_matrix:
+5f2b 20406c32 call gpio_get_bit 
+5f2c 6848c5b5 fetcht 1 ,mem_matrix_public_gpio 
+5f2d 2020df29 branch mouse_pb_button_connect_gnd ,true 
+5f2e 6848c5b5 fetcht 1 ,mem_matrix_public_gpio 
+5f2f 20406c43 call gpio_out_active 
+5f30 6848c5b6 fetcht 1 ,mem_config_select_device_button_gpio 
+5f31 6fe0c831 fetch 1 ,mem_mouse_pbkey_press_status 
+5f32 20205b46 branch mouse_check_key_connect_gnd 
+
+mouse_select_device_button_up:
+5f33 6fe0c83b fetch 1 ,mem_select_device_button_statue 
+5f34 c1000000 rtneq pb_button_state_up 
+5f35 70483b00 jam pb_button_state_up ,mem_select_device_button_statue 
+5f36 6fe44848 fetch mouse_flag_len ,mem_mouse_flag 
+5f37 c39a0000 rtnbit1 mouse_enable_pb_button_short_press_enter_discovery 
+5f38 6fe0c838 fetch 1 ,mem_bt_discovery_count 
+5f39 1fe67c14 sub pdata ,20 ,null 
+5f3a 24415f68 ncall mouse_ready_reconnection_by_button ,positive 
+5f3b 6fe0c431 fetch 1 ,mem_ui_button_timeout 
+5f3c 67e0c838 store 1 ,mem_bt_discovery_count 
+5f3d 20600000 rtn 
+
+mouse_select_device_button_down:
+5f3e 20405f4a call mouse_select_device_ghost_check 
+5f3f 20740000 rtn user 
+5f40 6fe0c83b fetch 1 ,mem_select_device_button_statue 
+5f41 c1008000 rtneq pb_button_state_down 
+5f42 70483b01 jam pb_button_state_down ,mem_select_device_button_statue 
+5f43 6fe44848 fetch mouse_flag_len ,mem_mouse_flag 
+5f44 c29a5daa bbit1 mouse_enable_pb_button_short_press_enter_discovery ,mouse_long_button_bt_discovery 
+5f45 6fe0c815 fetch 1 ,mem_mouse_direct_timer 
+5f46 207a0000 rtn blank 
+5f47 6fe0c59c fetch 1 ,mem_mouse_direct_timeout 
+5f48 67e0c815 store 1 ,mem_mouse_direct_timer 
+5f49 20600000 rtn 
+
+mouse_select_device_ghost_check:
+5f4a 78547c00 disable user 
+5f4b 6fe44848 fetch mouse_flag_len ,mem_mouse_flag 
+5f4c c3968000 rtnbit1 mouse_enable_pb_button_connect_gnd 
+5f4d 6fe0c82b fetch 1 ,mem_mouse_lkey_press_status 
+5f4e 207a0000 rtn blank 
+5f4f 6fe0c82c fetch 1 ,mem_mouse_rkey_press_status 
+5f50 207a0000 rtn blank 
+5f51 78347c00 enable user 
+5f52 20600000 rtn 
+
+mouse_check_select_device_by_switch:
+5f53 6fe44848 fetch mouse_flag_len ,mem_mouse_flag 
+5f54 c2955f57 bbit1 mouse_enable_select_device_by_switch_gpio ,mouse_check_select_device_by_switch_gpio 
+5f55 c295d85d bbit1 mouse_enable_select_device_by_switch_adc ,mouse_adc_read 
+5f56 20600000 rtn 
+
+mouse_check_select_device_by_switch_gpio:
+5f57 6848c5b9 fetcht 1 ,mem_device_switch_gpio 
+5f58 20405915 call mouse_gpio_config_input_pu 
+5f59 6848c5b9 fetcht 1 ,mem_device_switch_gpio 
+5f5a 20406c32 call gpio_get_bit 
+5f5b 2020df60 branch mouse_check_select_24gdevice ,true 
+
+mouse_select_btdevice:
+5f5c 6fe0c5d1 fetch 1 ,mem_device_flag 
+5f5d c1008000 rtneq mode_bt_device1 
+5f5e 7045d101 jam mode_bt_device1 ,mem_device_flag 
+5f5f 20205cb2 branch mouse_stop_bluetooth_mode 
+
+mouse_check_select_24gdevice:
+5f60 6fe44848 fetch mouse_flag_len ,mem_mouse_flag 
+5f61 c315df64 bbit0 mouse_enable_select_device_by_switch_adc ,mouse_check_select_24g_device 
+5f62 6fe34589 fetch 6 ,mem_mouse_vdd_switch_gnd_full_vol 
+5f63 67e3457d store 6 ,mem_mouse_vdd_calculate_set 
+
+mouse_check_select_24g_device:
+5f64 6fe0c5d1 fetch 1 ,mem_device_flag 
+5f65 c1000000 rtneq mode_24g_device 
+5f66 7045d100 jam mode_24g_device ,mem_device_flag 
+5f67 202060b4 branch mouse_24g_stop 
+
+mouse_ready_reconnection_by_button:
+5f68 44ad400b bpatch patch0b_2 ,mem_patch0b 
+5f69 6fe0c850 fetch 1 ,mem_device_number 
+5f6a c1008000 rtneq 1 
+5f6b 20405f74 call mouse_select_device_number 
+5f6c 6048c5d1 storet 1 ,mem_device_flag 
+
+mouse_store_device_number_before_reset:
+5f6d 20405f8b call mouse_select_device_enable 
+5f6e 20405cb2 call mouse_stop_bluetooth_mode 
+5f6f 20405f8d call mouse_select_device_disable 
+5f70 70476301 jam 1 ,mem_mouse_need_soft_reset 
+5f71 20205ea3 branch mouse_store_device_info_delay 
+
+mouse_soft_reset:
+5f72 20405f8b call mouse_select_device_enable 
+5f73 202069f6 branch soft_reset_chip 
+
+mouse_select_device_number:
+5f74 6848c5d1 fetcht 1 ,mem_device_flag 
+5f75 18408401 increase 1 ,temp 
+5f76 6fe44848 fetch mouse_flag_len ,mem_mouse_flag 
+5f77 c288df7b bbit1 mouse_enable_24g ,mouse_select_device_number_24g 
+5f78 18467c02 sub temp ,2 ,null 
+5f79 24415f82 ncall mouse_select_device_count_clean_bt ,positive 
+5f7a 20600000 rtn 
+
+mouse_select_device_number_24g:
+5f7b 6fe0c850 fetch 1 ,mem_device_number 
+5f7c 1fe0ffff increase -1 ,pdata 
+5f7d 98467c00 isub temp ,null 
+5f7e 24415f80 ncall mouse_select_device_count_clean_24g ,positive 
+5f7f 20600000 rtn 
+
+mouse_select_device_count_clean_24g:
+5f80 d8400000 arg 0 ,temp 
+5f81 20600000 rtn 
+
+mouse_select_device_count_clean_bt:
+5f82 d8400001 arg 1 ,temp 
+5f83 20600000 rtn 
+
+mouse_store_device_number2eeprom:
+5f84 d8400001 arg 1 ,temp 
+5f85 da2045d1 arg mem_device_flag ,rega 
+5f86 da400000 arg 0 ,regb 
+5f87 20206a38 branch iicd_write_protect_eep_data 
+
+mouse_bt_button_check:
+5f88 6fe44848 fetch mouse_flag_len ,mem_mouse_flag 
+5f89 c41a0000 rtnbit0 mouse_enable_pb_button_short_press_enter_discovery 
+5f8a 20205f0d branch mouse_select_device_by_pb_button 
+
+mouse_select_device_enable:
+5f8b d8e00000 arg mouse_select_device_flag ,queue 
+5f8c 20205fa1 branch mouse_enable_function_flag 
+
+mouse_select_device_disable:
+5f8d d8e00000 arg mouse_select_device_flag ,queue 
+5f8e 20205fa5 branch mouse_disable_function_flag 
+
+mouse_bt_cannel_reconn_enable:
+5f8f d8e00003 arg mouse_bt_cannel_reconn_flag ,queue 
+5f90 20205fa1 branch mouse_enable_function_flag 
+
+mouse_bt_cannel_reconn_disable:
+5f91 d8e00003 arg mouse_bt_cannel_reconn_flag ,queue 
+5f92 20205fa5 branch mouse_disable_function_flag 
+
+mouse_bt_discovery_button_down_enable:
+5f93 d8e00005 arg mouse_bt_discovery_button_down_flag ,queue 
+5f94 20205fa1 branch mouse_enable_function_flag 
+
+mouse_bt_discovery_button_down_disable:
+5f95 d8e00005 arg mouse_bt_discovery_button_down_flag ,queue 
+5f96 20205fa5 branch mouse_disable_function_flag 
+
+mouse_adc_read_enable:
+5f97 d8e00014 arg mouse_enable_adc ,queue 
+5f98 20205fa1 branch mouse_enable_function_flag 
+
+mouse_24g_set_250hz:
+5f99 d8e00018 arg mouse_enable_24g_250hz ,queue 
+5f9a 20205fa1 branch mouse_enable_function_flag 
+
+mouse_24g_search_dongle_enable:
+5f9b d8e00016 arg mouse_enable_24g_search_dongle ,queue 
+5f9c 20205fa1 branch mouse_enable_function_flag 
+
+mouse_16m_enable:
+5f9d d8e0000c arg mouse_enable_16m ,queue 
+5f9e 20205fa1 branch mouse_enable_function_flag 
+
+mouse_dpi_4level_enable:
+5f9f d8e0001c arg mouse_enable_dpi_level_4 ,queue 
+5fa0 20205fa1 branch mouse_enable_function_flag 
+
+mouse_enable_function_flag:
+5fa1 6fe44848 fetch mouse_flag_len ,mem_mouse_flag 
+5fa2 f9207e00 qset1 pdata 
+5fa3 67e44848 store mouse_flag_len ,mem_mouse_flag 
+5fa4 20600000 rtn 
+
+mouse_disable_function_flag:
+5fa5 6fe44848 fetch mouse_flag_len ,mem_mouse_flag 
+5fa6 f93ffe00 qset0 pdata 
+5fa7 67e44848 store mouse_flag_len ,mem_mouse_flag 
+5fa8 20600000 rtn 
+
+mouse_customer_key_enable:
+5fa9 d8e00015 arg mouse_enable_keyboard ,queue 
+5faa 20405fa1 call mouse_enable_function_flag 
+5fab 58000000 setarg 0 
+5fac 67e44868 store 8 ,mem_customer_key_press 
+5fad 67e44871 store 8 ,mem_customer_key_release 
+5fae 6fe0c5a4 fetch 1 ,mem_mouse_enable_flag 
+5faf 1fe17ec0 and pdata ,0xc0 ,pdata 
+5fb0 c0205fb6 beq 0x40 ,mouse_customer_key_ctrl_alt_a 
+5fb1 c0405fb8 beq 0x80 ,mouse_customer_ac_home 
+5fb2 c0605fbd beq 0xc0 ,mouse_customer_key_play 
+5fb3 58070008 setarg 0x070008 
+
+mouse_customer_standrad_key_set:
+5fb4 67e44869 store 8 ,mem_customer_key_press + 1 
+5fb5 20600000 rtn 
+
+mouse_customer_key_ctrl_alt_a:
+5fb6 58040005 setarg 0x040005 
+5fb7 20205fb4 branch mouse_customer_standrad_key_set 
+
+mouse_customer_ac_home:
+5fb8 58022303 setarg 0x022303 
+
+mouse_customer_media_key_set:
+5fb9 67e44868 store 8 ,mem_customer_key_press 
+5fba 58000003 setarg 0x03 
+5fbb 67e44871 store 8 ,mem_customer_key_release 
+5fbc 20600000 rtn 
+
+mouse_customer_key_play:
+5fbd 5800cd03 setarg 0x00cd03 
+5fbe 20205fb9 branch mouse_customer_media_key_set 
+
+mouse_polling_device:
+5fbf 44adc00b bpatch patch0b_3 ,mem_patch0b 
+5fc0 6fe0c74e fetch 1 ,mem_reconn_times 
+5fc1 1fe0ffff increase -1 ,pdata 
+5fc2 67e0c74e store 1 ,mem_reconn_times 
+5fc3 6848c5d1 fetcht 1 ,mem_device_flag 
+5fc4 18467c01 sub temp ,1 ,null 
+5fc5 2442df74 ncall mouse_select_device_number ,zero 
+5fc6 6048c5d1 storet 1 ,mem_device_flag 
+5fc7 20405f84 call mouse_store_device_number2eeprom 
+5fc8 20405e62 call mouse_before_store_reconn_info 
+5fc9 20205793 branch mouse_start_reconnect_device 
+
+mouse_drawing_optima:
+5fca 47434030 bpatchx patch30_6 ,mem_patch30 
+5fcb 6fe0c5c0 fetch 1 ,mem_config_sensor_type 
+5fcc c1018000 rtneq p3212 
+5fcd 6fe44848 fetch mouse_flag_len ,mem_mouse_flag 
+5fce c41c0000 rtnbit0 mouse_enable_smoother 
+5fcf 6fe2456b fetch 4 ,mem_mouse_x 
+5fd0 207a0000 rtn blank 
+5fd1 20406071 call mouse_data_abs_check 
+5fd2 58000003 setarg 0x03 
+5fd3 20406067 call mouse_pdata_greater_than_check 
+5fd4 205a6063 call mouse_disable_asm ,blank 
+5fd5 245a6065 ncall mouse_enable_asm ,blank 
+5fd6 58000002 setarg 0x02 
+5fd7 2040606c call mouse_data_less_than_check 
+5fd8 205a6063 call mouse_disable_asm ,blank 
+5fd9 6fe0c662 fetch 1 ,mem_mouse_asm_flag 
+5fda c000dfe0 beq 1 ,mouse_drawing_optima_modify 
+
+mouse_drawing_optima_init:
+5fdb 6fe44848 fetch mouse_flag_len ,mem_mouse_flag 
+5fdc c41c0000 rtnbit0 mouse_enable_smoother 
+5fdd df200005 arg 5 ,loopcnt 
+5fde d8a04662 arg mem_mouse_asm_flag ,contw 
+5fdf 2020750f branch clear_mem 
+
+mouse_drawing_optima_modify:
+5fe0 20405ff4 call mouse_drawing_optima_xy_offset_modify 
+5fe1 6fe14663 fetch 2 ,mem_mouse_x_pre 
+5fe2 67e10560 store 2 ,mem_data_pre 
+5fe3 6fe1456b fetch 2 ,mem_mouse_x 
+5fe4 67e10562 store 2 ,mem_data_current 
+5fe5 2040602d call mouse_drawing_optima_data_x 
+5fe6 6fe10560 fetch 2 ,mem_data_pre 
+5fe7 67e14663 store 2 ,mem_mouse_x_pre 
+5fe8 6fe10562 fetch 2 ,mem_data_current 
+5fe9 67e1456b store 2 ,mem_mouse_x 
+5fea 6fe14665 fetch 2 ,mem_mouse_y_pre 
+5feb 67e10560 store 2 ,mem_data_pre 
+5fec 6fe1456d fetch 2 ,mem_mouse_y 
+5fed 67e10562 store 2 ,mem_data_current 
+5fee 20406035 call mouse_drawing_optima_data_y 
+5fef 6fe10560 fetch 2 ,mem_data_pre 
+5ff0 67e14665 store 2 ,mem_mouse_y_pre 
+5ff1 6fe10562 fetch 2 ,mem_data_current 
+5ff2 67e1456d store 2 ,mem_mouse_y 
+5ff3 20600000 rtn 
+
+mouse_drawing_optima_xy_offset_modify:
+5ff4 6fe44848 fetch mouse_flag_len ,mem_mouse_flag 
+5ff5 c41c8000 rtnbit0 mouse_enable_xy_offset 
+5ff6 4744c031 bpatchx patch31_1 ,mem_patch31 
+5ff7 6fe14663 fetch 2 ,mem_mouse_x_pre 
+5ff8 67e10567 store 2 ,mem_data_value 
+5ff9 20406008 call mouse_pre_xy_data_judge 
+5ffa 67e14663 store 2 ,mem_mouse_x_pre 
+5ffb 6fe1456b fetch 2 ,mem_mouse_x 
+5ffc 67e10567 store 2 ,mem_data_value 
+5ffd 20406016 call mouse_current_xy_data_judge 
+5ffe 67e1456b store 2 ,mem_mouse_x 
+5fff 6fe14665 fetch 2 ,mem_mouse_y_pre 
+6000 67e10567 store 2 ,mem_data_value 
+6001 20406008 call mouse_pre_xy_data_judge 
+6002 67e14665 store 2 ,mem_mouse_y_pre 
+6003 6fe1456d fetch 2 ,mem_mouse_y 
+6004 67e10567 store 2 ,mem_data_value 
+6005 20406016 call mouse_current_xy_data_judge 
+6006 67e1456d store 2 ,mem_mouse_y 
+6007 20600000 rtn 
+
+mouse_pre_xy_data_judge:
+6008 6fe08568 fetch 1 ,mem_data_value + 1 
+6009 203a600b branch mouse_pre_xy_pdata_offset ,blank 
+600a 20206010 branch mouse_pre_xy_ndata_offset 
+
+mouse_pre_xy_pdata_offset:
+600b 6fe08567 fetch 1 ,mem_data_value 
+600c 20406023 call mouse_pre_xy_get_0_4_times 
+600d 67e08567 store 1 ,mem_data_value 
+
+mouse_xy_data_offset_new:
+600e 6fe10567 fetch 2 ,mem_data_value 
+600f 20600000 rtn 
+
+mouse_pre_xy_ndata_offset:
+6010 6fe08567 fetch 1 ,mem_data_value 
+6011 2040605f call mouse_pdata_invert 
+6012 20406023 call mouse_pre_xy_get_0_4_times 
+6013 205a7644 call disable_blank ,blank 
+6014 2040605b call mouse_pdata_get_new_value 
+6015 2020600e branch mouse_xy_data_offset_new 
+
+mouse_current_xy_data_judge:
+6016 6fe08568 fetch 1 ,mem_data_value + 1 
+6017 203a6019 branch mouse_current_xy_pdata_offset ,blank 
+6018 2020601d branch mouse_current_xy_ndata_offset 
+
+mouse_current_xy_pdata_offset:
+6019 6fe08567 fetch 1 ,mem_data_value 
+601a 20406028 call mouse_current_xy_get_0_6_times 
+601b 67e08567 store 1 ,mem_data_value 
+601c 2020600e branch mouse_xy_data_offset_new 
+
+mouse_current_xy_ndata_offset:
+601d 6fe08567 fetch 1 ,mem_data_value 
+601e 2040605f call mouse_pdata_invert 
+601f 20406028 call mouse_current_xy_get_0_6_times 
+6020 205a7644 call disable_blank ,blank 
+6021 2040605b call mouse_pdata_get_new_value 
+6022 2020600e branch mouse_xy_data_offset_new 
+
+mouse_pre_xy_get_0_4_times:
+6023 1feffe04 mul32 pdata ,4 ,pdata 
+6024 1fe6fc05 div pdata ,5 
+6025 204075d0 call wait_div_end 
+6026 1807fe00 quotient pdata 
+6027 20600000 rtn 
+
+mouse_current_xy_get_0_6_times:
+6028 1feffe0c mul32 pdata ,12 ,pdata 
+6029 1fe6fc0a div pdata ,10 
+602a 204075d0 call wait_div_end 
+602b 1807fe00 quotient pdata 
+602c 20600000 rtn 
+
+mouse_drawing_optima_data_x:
+602d 6fe10560 fetch 2 ,mem_data_pre 
+602e 68490562 fetcht 2 ,mem_data_current 
+602f 9840fe00 iadd temp ,pdata 
+6030 6848c667 fetcht 1 ,mem_mouse_data_xtemp 
+6031 9840fe00 iadd temp ,pdata 
+6032 1fe10401 and pdata ,0x01 ,temp 
+6033 6048c667 storet 1 ,mem_mouse_data_xtemp 
+6034 2020603d branch mouse_drawing_optima_data 
+
+mouse_drawing_optima_data_y:
+6035 6fe10560 fetch 2 ,mem_data_pre 
+6036 68490562 fetcht 2 ,mem_data_current 
+6037 9840fe00 iadd temp ,pdata 
+6038 6848c668 fetcht 1 ,mem_mouse_data_ytemp 
+6039 9840fe00 iadd temp ,pdata 
+603a 1fe10401 and pdata ,0x01 ,temp 
+603b 6048c668 storet 1 ,mem_mouse_data_ytemp 
+603c 2020603d branch mouse_drawing_optima_data 
+
+mouse_drawing_optima_data:
+603d 67e18564 store 3 ,mem_data_sum 
+603e 2feffe10 isolate1 16 ,pdata 
+603f 2020e047 branch mouse_data_sum_overflow ,true 
+6040 6fe08565 fetch 1 ,mem_data_sum + 1 
+6041 c07fe04e beq 0xff ,mouse_data_sum_n 
+6042 6fe08564 fetch 1 ,mem_data_sum 
+
+mouse_data_store_pre:
+6043 1fe37e00 rshift pdata ,pdata 
+6044 67e10560 store 2 ,mem_data_pre 
+6045 67e10562 store 2 ,mem_data_current 
+6046 20600000 rtn 
+
+mouse_data_sum_overflow:
+6047 6fe08565 fetch 1 ,mem_data_sum + 1 
+6048 c000604b beq 0 ,mouse_data_sum_overflow_p 
+6049 6fe18564 fetch 3 ,mem_data_sum 
+604a 20206043 branch mouse_data_store_pre 
+
+mouse_data_sum_overflow_p:
+604b 70056600 jam 0 ,mem_data_sum + 2 
+604c 6fe08564 fetch 1 ,mem_data_sum 
+604d 20206043 branch mouse_data_store_pre 
+
+mouse_data_sum_n:
+604e 6fe08564 fetch 1 ,mem_data_sum 
+604f 20406059 call mouse_pdata_get_half 
+6050 67e08560 store 1 ,mem_data_pre 
+6051 67e08562 store 1 ,mem_data_current 
+6052 203a6057 branch mouse_data_zero ,blank 
+6053 580000ff setarg 0xff 
+
+mouse_data_set_direction:
+6054 67e08561 store 1 ,mem_data_pre + 1 
+6055 67e08563 store 1 ,mem_data_current + 1 
+6056 20600000 rtn 
+
+mouse_data_zero:
+6057 58000000 setarg 0 
+6058 20206054 branch mouse_data_set_direction 
+
+mouse_pdata_get_half:
+6059 2040605f call mouse_pdata_invert 
+605a 1fe37e00 rshift pdata ,pdata 
+
+mouse_pdata_get_new_value:
+605b 20406060 call mouse_rega_in_out 
+605c 1fe67e00 sub pdata ,0 ,pdata 
+605d 67e08567 store 1 ,mem_data_value 
+605e 20600000 rtn 
+
+mouse_pdata_invert:
+605f 1fe67e00 sub pdata ,0 ,pdata 
+
+mouse_rega_in_out:
+6060 67e084d8 store 1 ,mem_rega 
+6061 6fe084d8 fetch 1 ,mem_rega 
+6062 20600000 rtn 
+
+mouse_disable_asm:
+6063 70466200 jam 0 ,mem_mouse_asm_flag 
+6064 20600000 rtn 
+
+mouse_enable_asm:
+6065 70466201 jam 1 ,mem_mouse_asm_flag 
+6066 20600000 rtn 
+
+mouse_pdata_greater_than_check:
+6067 9a267c00 isub rega ,null 
+6068 24217644 nbranch disable_blank ,positive 
+6069 9a467c00 isub regb ,null 
+606a 24217644 nbranch disable_blank ,positive 
+606b 20207646 branch enable_blank 
+
+mouse_data_less_than_check:
+606c 9a267c00 isub rega ,null 
+606d 24610000 nrtn positive 
+606e 9a467c00 isub regb ,null 
+606f 24610000 nrtn positive 
+6070 20207646 branch enable_blank 
+
+mouse_data_abs_check:
+6071 6fe1456b fetch 2 ,mem_mouse_x 
+6072 20406078 call mouse_data_abs 
+6073 1fe22200 copy pdata ,rega 
+6074 6fe1456d fetch 2 ,mem_mouse_y 
+6075 20406078 call mouse_data_abs 
+6076 1fe22400 copy pdata ,regb 
+6077 20600000 rtn 
+
+mouse_data_abs:
+6078 67e10562 store 2 ,mem_data_current 
+6079 6fe08563 fetch 1 ,mem_data_current + 1 
+607a c07fe07e beq 0xff ,mouse_data_reversal 
+607b 6fe08562 fetch 1 ,mem_data_current 
+
+mouse_data_abs_store:
+607c 1fe17eff and_into 0xff ,pdata 
+607d 20600000 rtn 
+
+mouse_data_reversal:
+607e 6fe10562 fetch 2 ,mem_data_current 
+607f 1fe67e00 sub pdata ,0 ,pdata 
+6080 2020607c branch mouse_data_abs_store 
+
+mouse_24g_long_sleep_param_update_timer:
+6081 da60455e arg mem_24g_long_sleep_param_update_timer ,regc 
+6082 da406084 arg mouse_24g_long_sleep_normal_param ,regb 
+6083 20204de1 branch timer_single_step 
+
+mouse_24g_long_sleep_normal_param:
+6084 6fe24552 fetch 4 ,mem_24g_long_sleep_set1 
+6085 67e244f5 store 4 ,mem_24g_enter_hibernate 
+6086 70474c01 jam 1 ,mem_mouse_long_mult_flag 
+6087 20600000 rtn 
+
+mouse_24g_long_sleep_set:
+6088 6fe0c87e fetch 1 ,mem_24g_long_sleep_set_level 
+6089 c0006090 beq 0x00 ,mouse_24g_long_sleep_set_30ms 
+608a c000e092 beq 0x01 ,mouse_24g_long_sleep_set_50ms 
+608b c001608d beq 0x02 ,mouse_24g_long_sleep_set_80ms 
+608c c001e094 beq 0x03 ,mouse_24g_long_sleep_set_100ms 
+
+mouse_24g_long_sleep_set_80ms:
+608d 580ea600 setarg 0x0ea600 
+
+mouse_24g_long_sleep_set_end:
+608e 67e24552 store 4 ,mem_24g_long_sleep_set1 
+608f 20600000 rtn 
+
+mouse_24g_long_sleep_set_30ms:
+6090 5805e740 setarg 0x05e740 
+6091 2020608e branch mouse_24g_long_sleep_set_end 
+
+mouse_24g_long_sleep_set_50ms:
+6092 580927c0 setarg 0x0927c0 
+6093 2020608e branch mouse_24g_long_sleep_set_end 
+
+mouse_24g_long_sleep_set_100ms:
+6094 58124f80 setarg 0x124f80 
+6095 2020608e branch mouse_24g_long_sleep_set_end 
+
+mouse_24g_hibernate_set:
+6096 4743c030 bpatchx patch30_7 ,mem_patch30 
+6097 70453f00 jam 0 ,mem_24g_attempt_fail_flag 
+6098 20404cbe call g24_transmit_next_packet 
+6099 5fffffff setarg -1 
+609a 67e244f5 store 4 ,mem_24g_enter_hibernate 
+609b 58000000 setarg 0 
+609c 67e3c56a store 7 ,mem_mouse_key 
+609d 70487d01 jam 1 ,mem_sensor_shutdown_flag 
+609e 20405bf9 call mouse_sensor_powerdown 
+609f 204057d7 call mouse_setgpio_hibernate 
+
+mouse_24g_long_sleep:
+60a0 6fe0c87d fetch 1 ,mem_sensor_shutdown_flag 
+60a1 245a57d7 ncall mouse_setgpio_hibernate ,blank 
+60a2 6fe444f5 fetch 8 ,mem_24g_enter_hibernate 
+60a3 20204d29 branch g24_long_seep2 
+
+mouse_wakeup_24g:
+60a4 6fe0c87d fetch 1 ,mem_sensor_shutdown_flag 
+60a5 245a60a8 ncall mouse_wakeup_24g_from_long_sleep ,blank 
+60a6 70487d00 jam 0 ,mem_sensor_shutdown_flag 
+60a7 20204cbd branch g24_transmit_no_ack 
+
+mouse_wakeup_24g_from_long_sleep:
+60a8 20405b67 call mouse_init_sensor_wakeup 
+60a9 6fe44848 fetch mouse_flag_len ,mem_mouse_flag 
+60aa c41e0000 rtnbit0 mouse_enable_wheel_wake_up_cancel 
+
+mouse_wheel_gpio_init:
+60ab 6fe0c5ab fetch 1 ,mem_whee_a_data_gpio 
+60ac d8400040 arg gpcfg_pullup ,temp 
+60ad 20406c68 call gpio_config_function_int 
+60ae 6fe0c5ac fetch 1 ,mem_whee_b_data_gpio 
+60af d8400040 arg gpcfg_pullup ,temp 
+60b0 20206c68 branch gpio_config_function_int 
+
+mouse_24g_transmit_start:
+60b1 6fe0c87d fetch 1 ,mem_sensor_shutdown_flag 
+60b2 243a4c97 nbranch g24_short_sleep ,blank 
+60b3 20204c93 branch g24_transmit_start_next 
+
+mouse_24g_stop:
+60b4 793f8026 set0 mark_24g ,mark 
+60b5 70453b00 jam state_24g_stop ,mem_24g_conn_sm 
+60b6 d8e00001 arg mouse_24g_pairing_flag ,queue 
+60b7 20205fa5 branch mouse_disable_function_flag 
+
+mouse_24g_start_mode:
+60b8 6fe44848 fetch mouse_flag_len ,mem_mouse_flag 
+60b9 c308e0c5 bbit0 mouse_enable_24g ,mouse_24g_mode_setup_error 
+60ba 2040579e call mouse_wakeup_from_power_check 
+60bb 20346107 branch mouse_24g_reconn_dongle_start ,user 
+60bc 6fe44848 fetch mouse_flag_len ,mem_mouse_flag 
+60bd c29860ca bbit1 mouse_enable_auto_24g_paring ,mouse_24g_reconn_general_dongle 
+60be c318e0ca bbit0 mouse_enable_24g_power_on_pairing ,mouse_24g_reconn_general_dongle 
+60bf 20405acf call mouse_key_check_once 
+60c0 1a217e07 and rega ,0x07 ,pdata 
+60c1 6848c867 fetcht 1 ,mem_mouse_commbination_key_24g 
+60c2 98467c00 isub temp ,null 
+60c3 2022e0e4 branch mouse_24g_start_pair_mode ,zero 
+60c4 202060ca branch mouse_24g_reconn_general_dongle 
+
+mouse_24g_mode_setup_error:
+60c5 6fe0c74e fetch 1 ,mem_reconn_times 
+60c6 243a5fbf nbranch mouse_polling_device ,blank 
+60c7 20600000 rtn 
+
+mouse_24g_first_start_auto_pair_mode:
+60c8 2040579e call mouse_wakeup_from_power_check 
+60c9 203460d4 branch mouse_24g_first_start_reconn ,user 
+
+mouse_24g_reconn_general_dongle:
+60ca 7045d100 jam mode_24g_device ,mem_device_flag 
+60cb 6fe14856 fetch 2 ,mem_mouse_24g_power_on_fast_conn_timer 
+60cc 67e14521 store 2 ,mem_24g_reconn_timeout 
+60cd 70452502 jam fast_conn_and_3_0_addr ,mem_24g_reconn_type 
+60ce 20204bc3 branch g24_reconn_start 
+
+mouse_24g_start_auto_pair:
+60cf 204061ad call mouse_discover_setting_led_gpio 
+60d0 6fe1451b fetch 2 ,mem_24g_pair_timeout_init 
+60d1 67e14521 store 2 ,mem_24g_reconn_timeout 
+60d2 70452504 jam pair_and_3_0_addr ,mem_24g_reconn_type 
+60d3 20204bc3 branch g24_reconn_start 
+
+mouse_24g_first_start_reconn:
+60d4 6fe0c5d1 fetch 1 ,mem_device_flag 
+60d5 c0006107 beq mode_24g_device ,mouse_24g_reconn_dongle_start 
+60d6 20405cb0 call mouse_bluetooth_fast_conn_disable 
+
+mouse_24g_first_bluetooth_reconnect:
+60d7 204060b4 call mouse_24g_stop 
+60d8 204061ef call mouse_device_led_all_off 
+60d9 7045d101 jam mode_bt_device1 ,mem_device_flag 
+60da 20405e78 call mouse_select_reconn_device 
+60db 20205793 branch mouse_start_reconnect_device 
+
+mouse_24g_first_bb_event_reconn_timeout:
+60dc 2040579e call mouse_wakeup_from_power_check 
+60dd 203457c3 branch mouse_app_enter_hibernate ,user 
+60de 20205e21 branch mouse_start_discovery 
+
+mouse_24g_first_store_reconn_info:
+60df 2040579e call mouse_wakeup_from_power_check 
+60e0 20740000 rtn user 
+60e1 6fe44848 fetch mouse_flag_len ,mem_mouse_flag 
+60e2 c297dea3 bbit1 mouse_enable_24g_first_auto_pairing ,mouse_store_device_info_delay 
+60e3 20600000 rtn 
+
+mouse_24g_start_pair_mode:
+60e4 d8e00001 arg mouse_24g_pairing_flag ,queue 
+60e5 20405fa1 call mouse_enable_function_flag 
+60e6 58000000 setarg 0 
+60e7 67e14521 store 2 ,mem_24g_reconn_timeout 
+60e8 20405e42 call mouse_stop_discovery 
+60e9 20406271 call mouse_low_voltage_led_blink_disable 
+60ea 204061ad call mouse_discover_setting_led_gpio 
+60eb 7044cf01 jam type_ms ,mem_24g_data_type 
+60ec 6fe44848 fetch mouse_flag_len ,mem_mouse_flag 
+60ed c30ac93b bbit0 mouse_enable_keyboard ,g24_pair_start 
+60ee 7044cf02 jam type_kb ,mem_24g_data_type 
+60ef 2020493b branch g24_pair_start 
+
+mouse_24g_attempt_fail:
+60f0 6fe0c53f fetch 1 ,mem_24g_attempt_fail_flag 
+60f1 243a6096 nbranch mouse_24g_hibernate_set ,blank 
+60f2 6fe0c525 fetch 1 ,mem_24g_reconn_type 
+60f3 c00160ff beq fast_conn_and_3_0_addr ,mouse_24g_fast_conn_attempt_fail 
+60f4 c002610b beq pair_and_3_0_addr ,mouse_24g_auto_pair_attempt_fail 
+60f5 c001e110 beq receiver_and_3_0_addr ,mouse_reconn_dongle_attempt_fail 
+
+mouse_24g_attempt_fail_enter_hibernate:
+60f6 6fe44848 fetch mouse_flag_len ,mem_mouse_flag 
+60f7 c29e6096 bbit1 mouse_enable_wheel_wake_up_cancel ,mouse_24g_hibernate_set 
+60f8 204061f3 call mouse_device_led_off 
+60f9 204060b4 call mouse_24g_stop 
+60fa 6fe0c74e fetch 1 ,mem_reconn_times 
+60fb 243a5fbf nbranch mouse_polling_device ,blank 
+60fc 6fe0c5d1 fetch 1 ,mem_device_flag 
+60fd c00057c3 beq mode_24g_device ,mouse_app_enter_hibernate 
+60fe 20600000 rtn 
+
+mouse_24g_fast_conn_attempt_fail:
+60ff 6fe44848 fetch mouse_flag_len ,mem_mouse_flag 
+6100 c297e0cf bbit1 mouse_enable_24g_first_auto_pairing ,mouse_24g_start_auto_pair 
+6101 c29860cf bbit1 mouse_enable_auto_24g_paring ,mouse_24g_start_auto_pair 
+6102 c31d6107 bbit0 mouse_enable_24g_auto_pair_nerver_been_paired ,mouse_24g_reconn_dongle_start 
+6103 6fe2462c fetch 4 ,mem_mouse_24g_addr 
+6104 684a460d fetcht 4 ,mem_mouse_compare_addr_ff 
+6105 98467c00 isub temp ,null 
+6106 2022e0e4 branch mouse_24g_start_pair_mode ,zero 
+
+mouse_24g_reconn_dongle_start:
+6107 6fe1451f fetch 2 ,mem_24g_reconn_timeout_init 
+6108 67e14521 store 2 ,mem_24g_reconn_timeout 
+6109 70452503 jam receiver_and_3_0_addr ,mem_24g_reconn_type 
+610a 20204bc3 branch g24_reconn_start 
+
+mouse_24g_auto_pair_attempt_fail:
+610b 6fe44848 fetch mouse_flag_len ,mem_mouse_flag 
+610c c317e0f6 bbit0 mouse_enable_24g_first_auto_pairing ,mouse_24g_attempt_fail_enter_hibernate 
+610d 6fe0c850 fetch 1 ,mem_device_number 
+610e c000e0f6 beq 1 ,mouse_24g_attempt_fail_enter_hibernate 
+610f 202060d7 branch mouse_24g_first_bluetooth_reconnect 
+
+mouse_reconn_dongle_attempt_fail:
+6110 6fe44848 fetch mouse_flag_len ,mem_mouse_flag 
+6111 c317e0f6 bbit0 mouse_enable_24g_first_auto_pairing ,mouse_24g_attempt_fail_enter_hibernate 
+6112 c289e0f6 bbit1 mouse_enable_eeprom ,mouse_24g_attempt_fail_enter_hibernate 
+6113 c28960f6 bbit1 mouse_enable_flash ,mouse_24g_attempt_fail_enter_hibernate 
+6114 202060d0 branch mouse_24g_start_auto_pair + 1 
+
+mouse_24g_attempt_success:
+6115 6fe244d5 fetch 4 ,mem_24g_addr 
+6116 67e2452b store 4 ,mem_24g_receiver_addr 
+6117 67e2462c store 4 ,mem_mouse_24g_addr 
+6118 20404be8 call g24_ch_syncword_crc8_init 
+6119 204061a7 call mouse_device_poweron_timer_init 
+611a 20405e12 call mouse_no_data_timer_init 
+611b 20405c7b call mouse_init_sensor_reset 
+611c 70474c00 jam 0 ,mem_mouse_long_mult_flag 
+611d 70453b00 jam 0 ,mem_24g_conn_sm 
+611e 70452500 jam 0 ,mem_24g_reconn_type 
+611f 6fe2452b fetch 4 ,mem_24g_receiver_addr 
+6120 6fe24527 fetch 4 ,mem_24g_fast_conn_addr 
+6121 98467c00 isub temp ,null 
+6122 20628000 rtn zero 
+6123 202060df branch mouse_24g_first_store_reconn_info 
+
+mouse_24g_pairing_complete:
+6124 20405e12 call mouse_no_data_timer_init 
+6125 d8e00001 arg mouse_24g_pairing_flag ,queue 
+6126 20405fa5 call mouse_disable_function_flag 
+6127 204061a7 call mouse_device_poweron_timer_init 
+6128 58000000 setarg 0 
+6129 67e1451d store 2 ,mem_24g_pair_timeout 
+612a 67e14521 store 2 ,mem_24g_reconn_timeout 
+612b 67e0c53b store 1 ,mem_24g_conn_sm 
+612c 67e0c661 store 1 ,mem_mouse_move_flag 
+612d 67e0c525 store 1 ,mem_24g_reconn_type 
+612e 20405c7b call mouse_init_sensor_reset 
+612f 20405c8c call mouse_read_sensor_common 
+6130 6fe244d5 fetch 4 ,mem_24g_addr 
+6131 67e2452b store 4 ,mem_24g_receiver_addr 
+6132 67e2462c store 4 ,mem_mouse_24g_addr 
+6133 20205ea3 branch mouse_store_device_info_delay 
+
+mouse_24g_package_data:
+6134 47444031 bpatchx patch31_0 ,mem_patch31 
+6135 c6930000 rtnmark0 mark_24g 
+6136 20405931 call mouse_motion 
+6137 24740000 nrtn user 
+6138 6fe44848 fetch mouse_flag_len ,mem_mouse_flag 
+6139 c30ae13c bbit0 mouse_enable_keyboard ,mouse_24g_mouse_package_data 
+613a 6fe0c828 fetch 1 ,mem_customer_key 
+613b 243a6153 nbranch mouse_24g_keyboard_package_data ,blank 
+
+mouse_24g_mouse_package_data:
+613c 20405c7c call mouse_data_xy_release 
+613d 6fe0c4cf fetch 1 ,mem_24g_data_type 
+613e c280e14b bbit1 1 ,mouse_24g_mouse_package_data_now 
+613f 6848c460 fetcht 1 ,mem_24g_txbuf + 1 
+6140 6fe0c56a fetch 1 ,mem_mouse_key 
+6141 9841fe00 ior temp ,pdata 
+6142 67e0c56a store 1 ,mem_mouse_key 
+6143 6848c465 fetcht 1 ,mem_24g_txbuf + 6 
+6144 6fe0c56f fetch 1 ,mem_mouse_z 
+6145 9840fe00 iadd temp ,pdata 
+6146 67e0c56f store 1 ,mem_mouse_z 
+6147 6848c466 fetcht 1 ,mem_24g_txbuf + 7 
+6148 6fe0c570 fetch 1 ,mem_mouse_tz 
+6149 9840fe00 iadd temp ,pdata 
+614a 67e0c570 store 1 ,mem_mouse_tz 
+
+mouse_24g_mouse_package_data_now:
+614b 7044cf01 jam type_ms ,mem_24g_data_type 
+614c da200007 arg 7 ,rega 
+614d da40456a arg mem_mouse_key ,regb 
+614e 6fe44848 fetch mouse_flag_len ,mem_mouse_flag 
+614f c28c4d50 bbit1 mouse_enable_24g_250hz ,g24_transmit_by_interrupt_enable 
+6150 6fe1456f fetch 2 ,mem_mouse_z 
+6151 207a0000 rtn blank 
+6152 20204d50 branch g24_transmit_by_interrupt_enable 
+
+mouse_24g_keyboard_package_data:
+6153 7044cf02 jam type_kb ,mem_24g_data_type 
+6154 da200009 arg 9 ,rega 
+6155 6fe0c829 fetch 1 ,mem_customer_data_trigger 
+6156 243a6159 nbranch mouse_customer_key_press ,blank 
+6157 da404871 arg mem_customer_key_release ,regb 
+6158 20600000 rtn 
+
+mouse_customer_key_press:
+6159 da404868 arg mem_customer_key_press ,regb 
+615a 20600000 rtn 
+
+mouse_24g_search_dongle_init:
+615b 58000000 setarg 0 
+615c 67e1c841 store 3 ,mem_mouse_search_dongle_action 
+615d 20600000 rtn 
+
+mouse_24g_search_dongle:
+615e 6fe44848 fetch mouse_flag_len ,mem_mouse_flag 
+615f c40b0000 rtnbit0 mouse_enable_24g_search_dongle 
+6160 6fe0c74c fetch 1 ,mem_mouse_long_mult_flag 
+6161 207a0000 rtn blank 
+6162 6fe0c541 fetch 1 ,mem_24g_abort_pac 
+6163 207a0000 rtn blank 
+6164 6fe0c83e fetch 1 ,mem_mouse_search_dongle_interval 
+6165 1fe0fe01 increase 1 ,pdata 
+6166 1fe17e03 and_into 3 ,pdata 
+6167 67e0c83e store 1 ,mem_mouse_search_dongle_interval 
+6168 247a0000 nrtn blank 
+6169 70483f00 jam 0 ,mem_mouse_search_dongle_ch 
+
+mouse_24g_search_dongle_loop:
+616a 44ae400b bpatch patch0b_4 ,mem_patch0b 
+616b 6fe0c83f fetch 1 ,mem_mouse_search_dongle_ch 
+616c 1fe0fe01 increase 1 ,pdata 
+616d 67e0c83f store 1 ,mem_mouse_search_dongle_ch 
+616e 1fe67c08 sub pdata ,g24_ch_number ,null 
+616f 24216176 nbranch mouse_24g_search_dongle_loop_end ,positive 
+6170 20404c05 call g24_reconn_data_prep 
+6171 20404cc8 call g24_transmit_receive_ack 
+6172 242c617c nbranch mouse_24g_search_dongle_loop_retry ,sync 
+6173 2437e17c nbranch mouse_24g_search_dongle_loop_retry ,user3 
+6174 2040618f call mouse_g24_ackpayload_parse 
+6175 20406186 call mouse_24g_search_dongle_success 
+
+mouse_24g_search_dongle_loop_end:
+6176 20404c01 call g24_txbuf_clear 
+6177 6fe0c840 fetch 1 ,mem_mouse_search_dongle_count 
+6178 1fe0fe01 increase 1 ,pdata 
+6179 67e0c840 store 1 ,mem_mouse_search_dongle_count 
+617a c008617e beq g24_ch_poll_count ,mouse_24g_search_dongle_check 
+617b 20600000 rtn 
+
+mouse_24g_search_dongle_loop_retry:
+617c 204048cc call g24_ch 
+617d 2020616a branch mouse_24g_search_dongle_loop 
+
+mouse_24g_search_dongle_check:
+617e 70484000 jam 0 ,mem_mouse_search_dongle_count 
+617f 6fe0c841 fetch 1 ,mem_mouse_search_dongle_action 
+6180 c3800000 rtnbit1 g24_disconn_state 
+6181 79207e00 set1 g24_disconn_state ,pdata 
+6182 67e0c841 store 1 ,mem_mouse_search_dongle_action 
+6183 6fe14858 fetch 2 ,mem_mouse_24g_search_dongle_time_init 
+6184 67e14750 store 2 ,mem_mouse_no_data_timer 
+6185 20205bf9 branch mouse_sensor_powerdown 
+
+mouse_24g_search_dongle_success:
+6186 6fe0c541 fetch 1 ,mem_24g_abort_pac 
+6187 203a615b branch mouse_24g_search_dongle_init ,blank 
+6188 70484000 jam 0 ,mem_mouse_search_dongle_count 
+6189 6fe0c841 fetch 1 ,mem_mouse_search_dongle_action 
+618a c4000000 rtnbit0 g24_disconn_state 
+618b 793ffe00 set0 g24_disconn_state ,pdata 
+618c 67e0c841 store 1 ,mem_mouse_search_dongle_action 
+618d 20405e12 call mouse_no_data_timer_init 
+618e 20205b67 branch mouse_init_sensor_wakeup 
+
+mouse_g24_ackpayload_parse:
+618f 20404cdf call g24_ackpayload_parse 
+6190 6fe0c43e fetch 1 ,mem_24g_rxbuf + 1 
+6191 2fe1f008 compare 0x08 ,pdata ,0xf8 
+6192 24608000 nrtn true 
+6193 6fe0c43f fetch 1 ,mem_24g_rxbuf + 2 
+6194 c07fe096 beq 0xff ,mouse_24g_hibernate_set 
+6195 20600000 rtn 
+
+mouse_24g_before_lpm_sleep:
+6196 6fe0c5d1 fetch 1 ,mem_device_flag 
+6197 c0803b7e bne mode_24g_device ,lpm_sleep_skip_cb_function 
+6198 6fe0c510 fetch 1 ,mem_24g_disable_fec1 
+6199 207a0000 rtn blank 
+
+mouse_peripheral_clock_off:
+619a 70804202 jam 2 ,core_clksel 
+619b 6ff08130 fetch 1 ,core_lpm_ctrl 
+619c 1fe17efc and pdata ,0xfc ,pdata 
+619d 67f0804c store 1 ,core_lpm_reg 
+619e 20203c37 branch lpm_write_ctrl 
+
+mouse_device_poweron_timer:
+619f 6fe44848 fetch mouse_flag_len ,mem_mouse_flag 
+61a0 c4100000 rtnbit0 mouse_enable_power_on_led 
+61a1 6fe0c844 fetch 1 ,mem_mouse_device_poweron_timer_count 
+61a2 207a0000 rtn blank 
+61a3 1fe0ffff increase -1 ,pdata 
+61a4 67e0c844 store 1 ,mem_mouse_device_poweron_timer_count 
+61a5 203a61f3 branch mouse_device_led_off ,blank 
+61a6 20206201 branch mouse_device_led_on 
+
+mouse_device_poweron_timer_init:
+61a7 6fe44848 fetch mouse_flag_len ,mem_mouse_flag 
+61a8 c4100000 rtnbit0 mouse_enable_power_on_led 
+61a9 20406271 call mouse_low_voltage_led_blink_disable 
+61aa 6fe0c85c fetch 1 ,mem_mouse_device_poweron_timer_count_init 
+61ab 67e0c844 store 1 ,mem_mouse_device_poweron_timer_count 
+61ac 20600000 rtn 
+
+mouse_discover_setting_led_gpio:
+61ad 70484400 jam 0 ,mem_mouse_device_poweron_timer_count 
+61ae 6fe14860 fetch 2 ,mem_mouse_disconvey_led_blink_time 
+61af 67e145c9 store 2 ,mem_mouse_on_time 
+61b0 67e145cb store 2 ,mem_mouse_off_time 
+
+mouse_setting_led_gpio_comman:
+61b1 6fe0c5d1 fetch 1 ,mem_device_flag 
+61b2 c00061b6 beq mode_24g_device ,mouse_device_led_24g 
+61b3 c000e1b8 beq mode_bt_device1 ,mouse_device_led_bt1 
+61b4 c00161ba beq mode_bt_device2 ,mouse_device_led_bt2 
+61b5 20600000 rtn 
+
+mouse_device_led_24g:
+61b6 6fe0c5bc fetch 1 ,mem_config_device_24g_led_gpio 
+61b7 202061bb branch mouse_led_blink 
+
+mouse_device_led_bt1:
+61b8 6fe0c5bd fetch 1 ,mem_config_device_bt1_led_gpio 
+61b9 202061bb branch mouse_led_blink 
+
+mouse_device_led_bt2:
+61ba 6fe0c5be fetch 1 ,mem_config_device_bt2_led_gpio 
+
+mouse_led_blink:
+61bb 67e084cc store 1 ,mem_temp 
+61bc 204061f3 call mouse_device_led_off 
+61bd 6fe084cc fetch 1 ,mem_temp 
+61be 67e0c5c8 store 1 ,mem_mouse_struct_led_gpio 
+61bf da200000 arg 0 ,rega 
+61c0 7045c601 jam ui_led_state_blink_start ,mem_mouse_led_type 
+61c1 20207030 branch ui_led_blink_start_global 
+
+mouse_dpi_led_blink_delay:
+61c2 6fe0c5bf fetch 1 ,mem_dpi_led_gpio 
+61c3 c17f8000 rtneq gpio_disable 
+61c4 6fe14760 fetch 2 ,mem_mouse_discovery_timer 
+61c5 247a0000 nrtn blank 
+61c6 6fe1451d fetch 2 ,mem_24g_pair_timeout 
+61c7 247a0000 nrtn blank 
+61c8 6fe14521 fetch 2 ,mem_24g_reconn_timeout 
+61c9 247a0000 nrtn blank 
+61ca 6fe0c844 fetch 1 ,mem_mouse_device_poweron_timer_count 
+61cb 247a0000 nrtn blank 
+61cc 6fe0c85d fetch 1 ,mem_mouse_dpi_led_delay_count_init 
+61cd 203a61d3 branch mouse_dpi_led_blink_init ,blank 
+61ce 67e0c845 store 1 ,mem_mouse_dpi_led_delay_count 
+61cf 20600000 rtn 
+
+mouse_dpi_led_blink_delay_timer:
+61d0 da604845 arg mem_mouse_dpi_led_delay_count ,regc 
+61d1 da4061d3 arg mouse_dpi_led_blink_init ,regb 
+61d2 20204de1 branch timer_single_step 
+
+mouse_dpi_led_blink_init:
+61d3 6fe0c5bf fetch 1 ,mem_dpi_led_gpio 
+61d4 67e0c5c8 store 1 ,mem_mouse_struct_led_gpio 
+61d5 6fe1485e fetch 2 ,mem_mouse_dpi_led_blink_time 
+61d6 67e145c9 store 2 ,mem_mouse_on_time 
+61d7 67e145cb store 2 ,mem_mouse_off_time 
+61d8 da200000 arg 0 ,rega 
+61d9 6848c62b fetcht 1 ,mem_mouse_dpi 
+61da 18408401 increase 1 ,temp 
+61db 6fe44848 fetch mouse_flag_len ,mem_mouse_flag 
+61dc c30e61e0 bbit0 mouse_enable_dpi_level_4 ,mouse_dpi_led_blink_init_end 
+61dd 18408401 increase 1 ,temp 
+61de 18467c04 sub temp ,4 ,null 
+61df 244161e3 ncall mouse_dpi_led_blink_count_clean ,positive 
+
+mouse_dpi_led_blink_init_end:
+61e0 6048c5c7 storet 1 ,mem_mouse_blink_count 
+61e1 7045c601 jam ui_led_state_blink_start ,mem_mouse_led_type 
+61e2 20600000 rtn 
+
+mouse_dpi_led_blink_count_clean:
+61e3 d8400001 arg 1 ,temp 
+61e4 20600000 rtn 
+
+mouse_check_dpi_blink:
+61e5 78547c00 disable user 
+61e6 6fe0c5bf fetch 1 ,mem_dpi_led_gpio 
+61e7 6848c5c8 fetcht 1 ,mem_mouse_struct_led_gpio 
+61e8 98467c00 isub temp ,null 
+61e9 24628000 nrtn zero 
+61ea 6fe0c5c7 fetch 1 ,mem_mouse_blink_count 
+61eb 207a0000 rtn blank 
+61ec 70459300 jam 0 ,mem_adc_low_volatage_led_blink_enable 
+61ed 78347c00 enable user 
+61ee 20600000 rtn 
+
+mouse_device_led_all_off:
+61ef 204061ff call mouse_dpi_led_off 
+61f0 204061f8 call mouse_device_24g_led_off 
+61f1 204061fb call mouse_device_bt1_led_off 
+61f2 202061fd branch mouse_device_bt2_led_off 
+
+mouse_device_led_off:
+61f3 6fe0c5d1 fetch 1 ,mem_device_flag 
+61f4 c00061f8 beq mode_24g_device ,mouse_device_24g_led_off 
+61f5 c000e1fb beq mode_bt_device1 ,mouse_device_bt1_led_off 
+61f6 c00161fd beq mode_bt_device2 ,mouse_device_bt2_led_off 
+61f7 20600000 rtn 
+
+mouse_device_24g_led_off:
+61f8 70484700 jam 0 ,mem_24g_device_led_status 
+61f9 6848c5bc fetcht 1 ,mem_config_device_24g_led_gpio 
+61fa 2020620c branch mouse_led_off 
+
+mouse_device_bt1_led_off:
+61fb 6848c5bd fetcht 1 ,mem_config_device_bt1_led_gpio 
+61fc 2020620c branch mouse_led_off 
+
+mouse_device_bt2_led_off:
+61fd 6848c5be fetcht 1 ,mem_config_device_bt2_led_gpio 
+61fe 2020620c branch mouse_led_off 
+
+mouse_dpi_led_off:
+61ff 6848c5bf fetcht 1 ,mem_dpi_led_gpio 
+6200 2020620c branch mouse_led_off 
+
+mouse_device_led_on:
+6201 6fe0c5d1 fetch 1 ,mem_device_flag 
+6202 c0006206 beq mode_24g_device ,mouse_device_24g_led_on 
+6203 c000e208 beq mode_bt_device1 ,mouse_device_bt1_led_on 
+6204 c001620a beq mode_bt_device2 ,mouse_device_bt2_led_on 
+6205 20600000 rtn 
+
+mouse_device_24g_led_on:
+6206 6848c5bc fetcht 1 ,mem_config_device_24g_led_gpio 
+6207 20206210 branch mouse_led_on 
+
+mouse_device_bt1_led_on:
+6208 6848c5bd fetcht 1 ,mem_config_device_bt1_led_gpio 
+6209 20206210 branch mouse_led_on 
+
+mouse_device_bt2_led_on:
+620a 6848c5be fetcht 1 ,mem_config_device_bt2_led_gpio 
+620b 20206210 branch mouse_led_on 
+
+mouse_led_off:
+620c 44aec00b bpatch patch0b_5 ,mem_patch0b 
+620d 6048c5c8 storet 1 ,mem_mouse_struct_led_gpio 
+620e da200000 arg 0 ,rega 
+620f 2020702b branch ui_led_off_global 
+
+mouse_led_on:
+6210 44af400b bpatch patch0b_6 ,mem_patch0b 
+6211 6048c5c8 storet 1 ,mem_mouse_struct_led_gpio 
+6212 da200000 arg 0 ,rega 
+6213 20207026 branch ui_led_on_global 
+
+mouse_ui_led_off_static:
+6214 44afc00b bpatch patch0b_7 ,mem_patch0b 
+6215 6fe0c5bc fetch 1 ,mem_config_device_24g_led_gpio 
+6216 98467c00 isub temp ,null 
+6217 2042e235 call mouse_clear_24g_led_statue ,zero 
+6218 6fe44848 fetch mouse_flag_len ,mem_mouse_flag 
+6219 c3126c3f bbit0 mouse_enable_4_led ,gpio_out_inactive 
+621a 20406226 call mouse_check_bt2_led_off 
+621b 2040622a call mouse_check_dpi_led_off 
+621c 2040622e call mouse_check_low_v_led_off 
+621d 6fe0c846 fetch 1 ,mem_mouse_led_off_4_led 
+621e 203a6c3f branch gpio_out_inactive ,blank 
+621f 70484600 jam 0 ,mem_mouse_led_off_4_led 
+6220 20206c5b branch gpio_set_high_impedance 
+
+mouse_ui_led_on_static:
+6221 44b0400c bpatch patch0c_0 ,mem_patch0c 
+6222 6fe0c5bc fetch 1 ,mem_config_device_24g_led_gpio 
+6223 98467c00 isub temp ,null 
+6224 2042e237 call mouse_set_24g_led_statue ,zero 
+6225 20206c43 branch gpio_out_active 
+
+mouse_check_bt2_led_off:
+6226 6fe44848 fetch mouse_flag_len ,mem_mouse_flag 
+6227 c4130000 rtnbit0 mouse_enable_bt2_for_4_led 
+6228 6fe0c5be fetch 1 ,mem_config_device_bt2_led_gpio 
+6229 20206231 branch mouse_check_1gpio_2led_off 
+
+mouse_check_dpi_led_off:
+622a 6fe44848 fetch mouse_flag_len ,mem_mouse_flag 
+622b c4128000 rtnbit0 mouse_enable_dpi_for_4_led 
+622c 6fe0c5bf fetch 1 ,mem_dpi_led_gpio 
+622d 20206231 branch mouse_check_1gpio_2led_off 
+
+mouse_check_low_v_led_off:
+622e 6fe44848 fetch mouse_flag_len ,mem_mouse_flag 
+622f c4138000 rtnbit0 mouse_enable_low_v_for_4_led 
+6230 6fe0c5bb fetch 1 ,mem_config_low_voltage_alarm_gpio 
+
+mouse_check_1gpio_2led_off:
+6231 98467c00 isub temp ,null 
+6232 24628000 nrtn zero 
+6233 70484601 jam 1 ,mem_mouse_led_off_4_led 
+6234 20600000 rtn 
+
+mouse_clear_24g_led_statue:
+6235 70484700 jam 0 ,mem_24g_device_led_status 
+6236 20600000 rtn 
+
+mouse_set_24g_led_statue:
+6237 70484701 jam 1 ,mem_24g_device_led_status 
+6238 20600000 rtn 
+
+mouse_low_voltage_led_timer:
+6239 6fe14760 fetch 2 ,mem_mouse_discovery_timer 
+623a 247a0000 nrtn blank 
+623b 6fe1451d fetch 2 ,mem_24g_pair_timeout 
+623c 247a0000 nrtn blank 
+623d 6fe14521 fetch 2 ,mem_24g_reconn_timeout 
+623e 247a0000 nrtn blank 
+623f 6fe0c844 fetch 1 ,mem_mouse_device_poweron_timer_count 
+6240 247a0000 nrtn blank 
+6241 204061e5 call mouse_check_dpi_blink 
+6242 20740000 rtn user 
+6243 6fe44848 fetch mouse_flag_len ,mem_mouse_flag 
+6244 c4108000 rtnbit0 mouse_enable_low_voltage_led 
+6245 c4020000 rtnbit0 mouse_low_voltage_flag 
+6246 c291e25f bbit1 mouse_enable_low_voltage_led_blink_n_second ,mouse_low_voltage_led_blink_new_data 
+6247 6fe0c592 fetch 1 ,mem_adc_low_volatage_led_timer_count 
+6248 1fe0fe01 increase 1 ,pdata 
+6249 67e0c592 store 1 ,mem_adc_low_volatage_led_timer_count 
+624a 1fe67c14 sub pdata ,20 ,null 
+624b 24416251 ncall mouse_adc_low_volatage_led_timer_count_clean ,positive 
+624c c0016253 beq 2 ,mouse_low_voltage_led_on 
+624d c0026259 beq 4 ,mouse_low_voltage_led_off 
+624e c0036253 beq 6 ,mouse_low_voltage_led_on 
+624f c0046259 beq 8 ,mouse_low_voltage_led_off 
+6250 20600000 rtn 
+
+mouse_adc_low_volatage_led_timer_count_clean:
+6251 70459201 jam 1 ,mem_adc_low_volatage_led_timer_count 
+6252 20206259 branch mouse_low_voltage_led_off 
+
+mouse_low_voltage_led_on:
+6253 6fe44848 fetch mouse_flag_len ,mem_mouse_flag 
+6254 c2916201 bbit1 mouse_enable_low_voltage_use_mode_led ,mouse_device_led_on 
+6255 6fe0c5bb fetch 1 ,mem_config_low_voltage_alarm_gpio 
+6256 c17f8000 rtneq gpio_disable 
+6257 6848c5bb fetcht 1 ,mem_config_low_voltage_alarm_gpio 
+6258 20206210 branch mouse_led_on 
+
+mouse_low_voltage_led_off:
+6259 6fe44848 fetch mouse_flag_len ,mem_mouse_flag 
+625a c29161f3 bbit1 mouse_enable_low_voltage_use_mode_led ,mouse_device_led_off 
+625b 6fe0c5bb fetch 1 ,mem_config_low_voltage_alarm_gpio 
+625c c17f8000 rtneq gpio_disable 
+625d 6848c5bb fetcht 1 ,mem_config_low_voltage_alarm_gpio 
+625e 2020620c branch mouse_led_off 
+
+mouse_low_voltage_led_blink_new_data:
+625f 6fe1485a fetch 2 ,mem_mouse_no_data_timeout 
+6260 68494750 fetcht 2 ,mem_mouse_no_data_timer 
+6261 98460400 isub temp ,temp 
+6262 6fe14864 fetch 2 ,mem_adc_low_volatage_led_blink_timer 
+6263 98467c00 isub temp ,null 
+6264 24216271 nbranch mouse_low_voltage_led_blink_disable ,positive 
+6265 6fe0c593 fetch 1 ,mem_adc_low_volatage_led_blink_enable 
+6266 247a0000 nrtn blank 
+6267 70459301 jam 1 ,mem_adc_low_volatage_led_blink_enable 
+6268 20206269 branch mouse_low_voltage_led_blink_init 
+
+mouse_low_voltage_led_blink_init:
+6269 6fe14862 fetch 2 ,mem_mouse_low_v_led_blink_time 
+626a 67e145c9 store 2 ,mem_mouse_on_time 
+626b 67e145cb store 2 ,mem_mouse_off_time 
+626c 6fe44848 fetch mouse_flag_len ,mem_mouse_flag 
+626d c29161b1 bbit1 mouse_enable_low_voltage_use_mode_led ,mouse_setting_led_gpio_comman 
+626e 6fe0c5bb fetch 1 ,mem_config_low_voltage_alarm_gpio 
+626f c17f8000 rtneq gpio_disable 
+6270 202061bb branch mouse_led_blink 
+
+mouse_low_voltage_led_blink_disable:
+6271 70459300 jam 0 ,mem_adc_low_volatage_led_blink_enable 
+6272 20206259 branch mouse_low_voltage_led_off 
+
+mouse_low_voltage_led_no_enter_lpm:
+6273 6fe44848 fetch mouse_flag_len ,mem_mouse_flag 
+6274 c4108000 rtnbit0 mouse_enable_low_voltage_led 
+6275 c4020000 rtnbit0 mouse_low_voltage_flag 
+6276 c291e285 bbit1 mouse_enable_low_voltage_led_blink_n_second ,mouse_low_voltage_led_no_enter_lpm_blink 
+6277 6fe0c592 fetch 1 ,mem_adc_low_volatage_led_timer_count 
+6278 1fe67c0a sub pdata ,10 ,null 
+6279 20216281 branch mouse_lpm_mode_clear ,positive 
+
+mouse_low_voltage_led_no_enter_lpm_next:
+627a 6fe0c5d1 fetch 1 ,mem_device_flag 
+627b c000627e beq mode_24g_device ,g24_transmit_by_interrupt_exit_check 
+627c 70409401 jam 1 ,mem_lpm_mode 
+627d 20600000 rtn 
+
+g24_transmit_by_interrupt_exit_check:
+627e 6fe44848 fetch mouse_flag_len ,mem_mouse_flag 
+627f c38c0000 rtnbit1 mouse_enable_24g_250hz 
+6280 20204d3f branch g24_transmit_by_interrupt_exit 
+
+mouse_lpm_mode_clear:
+6281 6fe0c5d1 fetch 1 ,mem_device_flag 
+6282 c0004d50 beq mode_24g_device ,g24_transmit_by_interrupt_enable 
+6283 70409400 jam 0 ,mem_lpm_mode 
+6284 20600000 rtn 
+
+mouse_low_voltage_led_no_enter_lpm_blink:
+6285 6fe0c593 fetch 1 ,mem_adc_low_volatage_led_blink_enable 
+6286 243a6281 nbranch mouse_lpm_mode_clear ,blank 
+6287 2020627a branch mouse_low_voltage_led_no_enter_lpm_next 
+
+mouse_store_signal_rssi:
+6288 20403a60 call rssi_hex2dec 
+6289 6fe08009 fetch 1 ,mem_rssi 
+628a 20204c4d branch rssi_signal 
+
+mouse_le_transmit:
+628b 20406288 call mouse_store_signal_rssi 
+628c 20204d5d branch power_ctrl_start 
+
+mouse_le_set_lpm_mult:
+628d 6fe0c813 fetch 1 ,mem_le_connect_status_flag 
+628e 2fe00603 compare 3 ,pdata ,3 
+628f 2420f644 nbranch disable_blank ,true 
+6290 20404e2c call app_lpm_mult_enable 
+6291 20207646 branch enable_blank 
+
+mouse_set_lpm_mult:
+6292 6fe1442f fetch 2 ,mem_ui_state_map 
+6293 c284e28d bbit1 ui_state_ble_connected ,mouse_le_set_lpm_mult 
+6294 20600000 rtn 
+
+shutter_init:
+6295 20406fd3 call enable_authrom 
+6296 20758000 rtn wake 
+6297 58006316 setarg shutter_le_before_hibernate 
+6298 67e1438a store 2 ,mem_cb_before_hibernate 
+6299 58006314 setarg shutter_process_lpm_before 
+629a 67e1438c store 2 ,mem_cb_before_lpm 
+629b 58006312 setarg shutter_process_idle 
+629c 67e14390 store 2 ,mem_cb_idle_process 
+629d 580062c3 setarg shutter_process_bb_event 
+629e 67e14392 store 2 ,mem_cb_bb_event_process 
+629f 580062bd setarg shutter_le_scale_lpm_lock 
+62a0 67e14388 store 2 ,mem_cb_check_wakelock 
+62a1 58006382 setarg ble_shutter_receive_data 
+62a2 67e14394 store 2 ,mem_cb_att_write 
+62a3 580062f9 setarg shutter_le_bb_event_timer 
+62a4 67e14398 store 2 ,mem_cb_event_timer 
+62a5 5800635d setarg shutter_key_change 
+62a6 67e14479 store 2 ,mem_cb_shutter_keycan 
+62a7 58006399 setarg shutter_soft_swtich_power_on 
+62a8 67e14474 store 2 ,mem_shutter_soft_switch_poweron_callback_function 
+62a9 5800639a setarg shutter_soft_swtich_power_off 
+62aa 67e14476 store 2 ,mem_shutter_soft_switch_poweroff_callback_function 
+62ab 204062b8 call shutter_set_ble_version 
+62ac 20404142 call le_modified_name_adv 
+62ad 20406385 call shutter_init_param 
+62ae 20406d0f call keyscan_key_init 
+62af 2040711d call queue_init 
+62b0 20407018 call ui_led_init_global 
+62b1 44b0c00c bpatch patch0c_1 ,mem_patch0c 
+62b2 20406392 call shutter_load_buffer_config_form_datarom 
+62b3 6fe0c46f fetch 1 ,mem_shutter_hard_soft_switch_case 
+62b4 c00062ba beq hard_switch ,shutter_hart_swtich_power_on 
+62b5 6fe0c470 fetch 1 ,mem_shutter_soft_switch_button_gpio 
+62b6 67e0c432 store 1 ,mem_ui_button_gpio 
+62b7 202063a1 branch ui_soft_swtich_init 
+
+shutter_set_ble_version:
+62b8 70412007 jam 7 ,mem_version 
+62b9 20600000 rtn 
+
+shutter_hart_swtich_power_on:
+62ba 704432ff jam ui_button_gpio_disable ,mem_ui_button_gpio 
+62bb 70447101 jam ss_state_power_on ,mem_shutter_soft_switch_power_state 
+62bc 20206331 branch shutter_start_reconnect 
+
+shutter_le_scale_lpm_lock:
+62bd 6fe0c471 fetch 1 ,mem_shutter_soft_switch_power_state 
+62be c0014e09 beq ss_state_power_off ,app_get_lpm_wake_lock 
+62bf 204066b4 call l2cap_malloc_get_full_map 
+62c0 6fe0c3ee fetch 1 ,mem_used_map 
+62c1 243a4e09 nbranch app_get_lpm_wake_lock ,blank 
+62c2 20204e0b branch app_put_lpm_wake_lock 
+
+shutter_process_bb_event:
+62c3 1a627e00 copy regc ,pdata 
+62c4 c00a62cc beq bt_evt_le_connected ,ble_shutter_process_baseband_connect 
+62c5 c00ae2d0 beq bt_evt_le_disconnected ,ble_shutter_process_baseband_disconnect 
+62c6 c01fe2d3 beq bt_evt_le_reconnect_complete ,ble_shutter_process_reconnect_complete 
+62c7 c02062d9 beq bt_evt_le_parse_conn_papa_update_rsp ,ble_shutter_process_parse_connect_parameter_update_response 
+62c8 c00862df beq bt_evt_button_long_pressed ,shutter_process_soft_swtich_button_long_press 
+62c9 c01662e0 beq bt_evt_button_down ,shutter_process_soft_swtich_button_down 
+62ca c016e2eb beq bt_evt_button_up ,shutter_process_soft_swtich_button_up 
+62cb 20600000 rtn 
+
+ble_shutter_process_baseband_connect:
+62cc 20406318 call shutter_stop_bluetooth_discovery 
+62cd 58000000 setarg 0 
+62ce 67e14449 store 2 ,mem_ble_shutter_reconn_timer 
+62cf 20204e26 branch app_led_off 
+
+ble_shutter_process_baseband_disconnect:
+62d0 2040711d call queue_init 
+62d1 70444200 jam 0 ,mem_ble_shutter_enable_notify 
+62d2 20206331 branch shutter_start_reconnect 
+
+ble_shutter_process_reconnect_complete:
+62d3 2040711d call queue_init 
+62d4 70444201 jam 1 ,mem_ble_shutter_enable_notify 
+62d5 6fe44453 fetch 8 ,mem_ble_shutter_interval_min 
+62d6 67e442a6 store 8 ,mem_le_interval_min 
+62d7 20404e2c call app_lpm_mult_enable 
+62d8 202045f3 branch le_l2cap_tx_update_req 
+
+ble_shutter_process_parse_connect_parameter_update_response:
+62d9 6fe1430f fetch 2 ,mem_le_l2cap_signaling_conn_param_update_rsp_result 
+62da c1000000 rtneq ble_signaling_connect_parameter_update_accepted 
+62db 6fe4445b fetch 8 ,mem_ble_shutter_interval_min_new 
+62dc 207a0000 rtn blank 
+62dd 67e442a6 store 8 ,mem_le_interval_min 
+62de 202045f3 branch le_l2cap_tx_update_req 
+
+shutter_process_soft_swtich_button_long_press:
+62df 202063b6 branch ui_soft_switch_botton_long_press 
+
+shutter_process_soft_swtich_button_down:
+62e0 6fe0c46f fetch 1 ,mem_shutter_hard_soft_switch_case 
+62e1 c1000000 rtneq hard_switch 
+62e2 6fe0c471 fetch 1 ,mem_shutter_soft_switch_power_state 
+62e3 c1808000 rtnne ss_state_power_on 
+62e4 204062e6 call shutter_store_currenct_led_state 
+62e5 20204e24 branch app_led_on 
+
+shutter_store_currenct_led_state:
+62e6 70467101 jam 1 ,mem_shutter_soft_swtich_botton_down 
+62e7 df20000b arg 11 ,loopcnt 
+62e8 d8a04672 arg mem_shutter_soft_swtich_led_struct_temp ,contw 
+62e9 d8c0465b arg mem_shutter_led_struct_app_led ,contr 
+62ea 20207548 branch memcpy 
+
+shutter_process_soft_swtich_button_up:
+62eb 6fe0c46f fetch 1 ,mem_shutter_hard_soft_switch_case 
+62ec c1000000 rtneq hard_switch 
+62ed 6fe0c471 fetch 1 ,mem_shutter_soft_switch_power_state 
+62ee c000e2f0 beq ss_state_power_on ,shutter_load_currenct_led_state 
+62ef 202063b2 branch ui_soft_switch_botton_up 
+
+shutter_load_currenct_led_state:
+62f0 6fe0c671 fetch 1 ,mem_shutter_soft_swtich_botton_down 
+62f1 c1808000 rtnne 1 
+62f2 70467100 jam 0 ,mem_shutter_soft_swtich_botton_down 
+62f3 6fe1442f fetch 2 ,mem_ui_state_map 
+62f4 c284ce26 bbit1 ui_state_ble_connected ,app_led_off 
+62f5 df20000b arg 11 ,loopcnt 
+62f6 d8c04672 arg mem_shutter_soft_swtich_led_struct_temp ,contr 
+62f7 d8a0465b arg mem_shutter_led_struct_app_led ,contw 
+62f8 20207548 branch memcpy 
+
+shutter_le_bb_event_timer:
+62f9 204062fc call shutter_check_sleep_timer 
+62fa 20406303 call shutter_check_power_off_timer 
+62fb 2020630d branch ble_shutter_reconn_timer 
+
+shutter_check_sleep_timer:
+62fc da60446d arg mem_shutter_sleep_timer ,regc 
+62fd da4062ff arg shutter_sleep_timeout ,regb 
+62fe 20204de8 branch timer_single_step_2b 
+
+shutter_sleep_timeout:
+62ff 70447102 jam ss_state_power_off ,mem_shutter_soft_switch_power_state 
+6300 20404e26 call app_led_off 
+6301 20406342 call shutter_disconnect_current_connection 
+6302 2020639e branch shutter_wait_power_off 
+
+shutter_check_power_off_timer:
+6303 da60467e arg mem_shutter_power_off_timer ,regc 
+6304 da406306 arg shutter_check_power_off_timeout ,regb 
+6305 20204de1 branch timer_single_step 
+
+shutter_check_power_off_timeout:
+6306 6fe1442f fetch 2 ,mem_ui_state_map 
+6307 c284e39e bbit1 ui_state_ble_connected ,shutter_wait_power_off 
+6308 6fe0c65b fetch 1 ,mem_shutter_led_struct_app_led_type 
+6309 c000e39e beq ui_led_state_blink_start ,shutter_wait_power_off 
+630a c002639e beq ui_led_state_blink_lighting ,shutter_wait_power_off 
+630b c002e39e beq ui_led_state_blink_darking ,shutter_wait_power_off 
+630c 20204e28 branch app_enter_hibernate 
+
+ble_shutter_reconn_timer:
+630d 6fe0c471 fetch 1 ,mem_shutter_soft_switch_power_state 
+630e c1808000 rtnne ss_state_power_on 
+630f da604449 arg mem_ble_shutter_reconn_timer ,regc 
+6310 da40631f arg shutter_start_bluetooth_discovery ,regb 
+6311 20204de8 branch timer_single_step_2b 
+
+shutter_process_idle:
+6312 2040636e call shutter_send_data_to_master 
+6313 20206d40 branch keyscan_key_process 
+
+shutter_process_lpm_before:
+6314 20406c74 call gpio_set_before_lpm 
+6315 20206d34 branch keyscan_process_lpm_before 
+
+shutter_le_before_hibernate:
+6316 20406c74 call gpio_set_before_lpm 
+6317 20206fd7 branch disable_authrom 
+
+shutter_stop_bluetooth_discovery:
+6318 6fe0c437 fetch 1 ,mem_shutter_bluetooth_type 
+6319 c280631b bbit1 ble_shutter ,ble_shutter_stop_bluetooth_discovery 
+631a 20600000 rtn 
+
+ble_shutter_stop_bluetooth_discovery:
+631b 6fe14469 fetch 2 ,mem_ble_shutter_connect_timeout 
+631c 67e1446b store 2 ,mem_shutter_sleep_timeout 
+631d 67e1446d store 2 ,mem_shutter_sleep_timer 
+631e 20204e16 branch app_ble_stop_adv 
+
+shutter_start_bluetooth_discovery:
+631f 6fe0c471 fetch 1 ,mem_shutter_soft_switch_power_state 
+6320 c1808000 rtnne ss_state_power_on 
+6321 6fe0c437 fetch 1 ,mem_shutter_bluetooth_type 
+6322 c2806324 bbit1 ble_shutter ,ble_shutter_start_discovery 
+6323 20600000 rtn 
+
+ble_shutter_start_discovery:
+6324 6fe1442f fetch 2 ,mem_ui_state_map 
+6325 c3848000 rtnbit1 ui_state_ble_connected 
+6326 6fe14467 fetch 2 ,mem_ble_shutter_discovery_timeout 
+6327 67e1446b store 2 ,mem_shutter_sleep_timeout 
+6328 67e1446d store 2 ,mem_shutter_sleep_timer 
+6329 6fe14445 fetch 2 ,mem_ble_shutter_discovery_adv_interval 
+632a 204063c7 call shutter_ble_adv_interval_set 
+632b 20404e22 call app_led_start_blink 
+632c 6fe2444f fetch 4 ,mem_ble_shutter_discovery_blink_on_time 
+632d 67e2465e store 4 ,mem_shutter_led_struct_app_led_on_time 
+632e 6fe1442f fetch 2 ,mem_ui_state_map 
+632f c3858000 rtnbit1 ui_state_ble_adv 
+6330 20204e18 branch app_ble_start_adv 
+
+shutter_start_reconnect:
+6331 6fe0c471 fetch 1 ,mem_shutter_soft_switch_power_state 
+6332 c1808000 rtnne ss_state_power_on 
+6333 6fe0c437 fetch 1 ,mem_shutter_bluetooth_type 
+6334 c2806336 bbit1 ble_shutter ,ble_shutter_start_reconnect 
+6335 20600000 rtn 
+
+ble_shutter_start_reconnect:
+6336 6fe14449 fetch 2 ,mem_ble_shutter_reconn_timer 
+6337 68494447 fetcht 2 ,mem_ble_shutter_reconn_timeout 
+6338 60494449 storet 2 ,mem_ble_shutter_reconn_timer 
+6339 247a0000 nrtn blank 
+633a 6fe14443 fetch 2 ,mem_ble_shutter_reconn_adv_interval 
+633b 204063c7 call shutter_ble_adv_interval_set 
+633c 20404e22 call app_led_start_blink 
+633d 6fe2444b fetch 4 ,mem_ble_shutter_reconn_blink_on_time 
+633e 67e2465e store 4 ,mem_shutter_led_struct_app_led_on_time 
+633f 6fe1442f fetch 2 ,mem_ui_state_map 
+6340 c3858000 rtnbit1 ui_state_ble_adv 
+6341 20204e18 branch app_ble_start_adv 
+
+shutter_disconnect_current_connection:
+6342 6fe1442f fetch 2 ,mem_ui_state_map 
+6343 c284ce20 bbit1 ui_state_ble_connected ,app_ble_disconnect 
+6344 20206318 branch shutter_stop_bluetooth_discovery 
+
+shutter_check_data_enable:
+6345 20407638 call disable_user 
+6346 6fe1442f fetch 2 ,mem_ui_state_map 
+6347 c284e349 bbit1 ui_state_ble_connected ,shutter_check_ble_data_enable 
+6348 20600000 rtn 
+
+shutter_check_ble_data_enable:
+6349 6fe0c442 fetch 1 ,mem_ble_shutter_enable_notify 
+634a 207a0000 rtn blank 
+634b 20207636 branch enable_user 
+
+shutter_check_bluetooth_conn:
+634c 20407638 call disable_user 
+634d 6fe1442f fetch 2 ,mem_ui_state_map 
+634e c3848000 rtnbit1 ui_state_ble_connected 
+634f 20207636 branch enable_user 
+
+shutter_change_bluetooth_status_bt_disconn:
+6350 6fe0c437 fetch 1 ,mem_shutter_bluetooth_type 
+6351 c2806353 bbit1 ble_shutter ,ble_shutter_change_bluetooth_status_bt_disconn 
+6352 20600000 rtn 
+
+ble_shutter_change_bluetooth_status_bt_disconn:
+6353 20206331 branch shutter_start_reconnect 
+
+shutter_check_send_data:
+6354 78567c00 disable user2 
+6355 6fe1446b fetch 2 ,mem_shutter_sleep_timeout 
+6356 67e1446d store 2 ,mem_shutter_sleep_timer 
+6357 2040634c call shutter_check_bluetooth_conn 
+6358 20346350 branch shutter_change_bluetooth_status_bt_disconn ,user 
+6359 20406345 call shutter_check_data_enable 
+635a 24740000 nrtn user 
+635b 78367c00 enable user2 
+635c 20600000 rtn 
+
+shutter_key_change:
+635d 20406354 call shutter_check_send_data 
+635e 24760000 nrtn user2 
+635f 1a227e00 deposit rega 
+6360 203a6364 branch shutter_key_release ,blank 
+
+shutter_key_press:
+6361 20404e24 call app_led_on 
+6362 da604483 arg mem_key0_press ,regc 
+6363 20206366 branch push_queue_press_or_release 
+
+shutter_key_release:
+6364 20404e26 call app_led_off 
+6365 da6044ab arg mem_key0_release ,regc 
+
+push_queue_press_or_release:
+6366 dfe00005 arg max_queue_num ,pdata 
+6367 98effe00 imul32 queue ,pdata 
+6368 9a60a600 iadd regc ,regc 
+
+push_buffer_in_queue:
+6369 efe08013 ifetch 1 ,regc 
+636a 207a0000 rtn blank 
+636b 2040637a call queue_push_one_byte 
+636c 1a60a601 increase 1 ,regc 
+636d 20206369 branch push_buffer_in_queue 
+
+shutter_send_data_to_master:
+636e 6fe1442f fetch 2 ,mem_ui_state_map 
+636f c284e371 bbit1 ui_state_ble_connected ,pop_queue_to_ble_data 
+6370 20600000 rtn 
+
+pop_queue_to_ble_data:
+6371 20404203 call le_fifo_check_nearly_full 
+6372 247a0000 nrtn blank 
+6373 2040637d call queue_pop_one_byte 
+6374 24740000 nrtn user 
+6375 1fe0ffff pincrease -1 
+6376 1feffe05 mul32 pdata ,shutter_ble_data_buffer ,pdata 
+6377 d84044d3 arg mem_ble_data_buffer1 ,temp 
+6378 98408c00 iadd temp ,contr 
+6379 202063cb branch le_send_notify_from_list 
+
+queue_push_one_byte:
+637a 67e084c4 store 1 ,mem_pdatatemp 
+637b da2004c4 arg mem_pdatatemp ,rega 
+637c 20207122 branch queue_push 
+
+queue_pop_one_byte:
+637d da2004c4 arg mem_pdatatemp ,rega 
+637e 2040713a call queue_pop 
+637f 24740000 nrtn user 
+6380 6fe084c4 fetch 1 ,mem_pdatatemp 
+6381 20600000 rtn 
+
+ble_shutter_receive_data:
+6382 6fe1436b fetch 2 ,mem_le_att_handle 
+6383 c00c62d3 beq gatt_keyboard_write_handle ,ble_shutter_process_reconnect_complete 
+6384 20600000 rtn 
+
+shutter_init_param:
+6385 58000002 setarg 0x02 
+6386 67e0c67d store 1 ,mem_shutter_power_off_timeout 
+6387 58200008 setarg 0x00200008 
+6388 67e24453 store 4 ,mem_ble_shutter_interval_min 
+6389 592c0005 setarg 0x012c0005 
+638a e7e20005 istore 4 ,contw 
+638b 7042b417 jam 0x17 ,mem_le_local_mtu 
+638c 5800001b setarg 0x1b 
+638d 67e14305 store 2 ,mem_le_pairing_handle 
+638e 2040419e call le_set_config_fixed_ltk 
+638f 204041ba call le_set_fixed_ltk 
+6390 204041c7 call le_set_justwork 
+6391 202041a6 branch le_set_config_read_authentication 
+
+shutter_load_buffer_config_form_datarom:
+6392 df200028 arg ble_key_value_list_size ,loopcnt 
+6393 d8a044d3 arg mem_ble_data_buffer1 ,contw 
+6394 d8c094f9 arg ble_shutter_key_value_list_addr ,contr 
+6395 2020753b branch memcpy_fast 
+
+shutter_load_ble_gatt_form_datarom:
+6396 df200139 arg ble_gatt_list_size ,loopcnt 
+6397 d8c093c0 arg ble_shutter_gatt_list_addr ,contr 
+6398 2020753b branch memcpy_fast 
+
+shutter_soft_swtich_power_on:
+6399 20206331 branch shutter_start_reconnect 
+
+shutter_soft_swtich_power_off:
+639a da200000 arg 0 ,rega 
+639b da604666 arg mem_shutter_power_off_led_style ,regc 
+639c 20407036 call ui_led_set_style_global 
+639d 20406342 call shutter_disconnect_current_connection 
+
+shutter_wait_power_off:
+639e 6fe0c67d fetch 1 ,mem_shutter_power_off_timeout 
+639f 67e0c67e store 1 ,mem_shutter_power_off_timer 
+63a0 20600000 rtn 
+
+ui_soft_swtich_init:
+63a1 58000000 setarg ss_state_power_up 
+63a2 204063ad call ui_soft_swtich_init_power_on_time 
+63a3 70442a01 jam ui_button_state_up ,mem_ui_button_last_state 
+63a4 20406fe2 call ui_button_init 
+63a5 20406fec call ui_button_polling 
+
+ui_soft_switch_first_power_on:
+63a6 6fe0c684 fetch 1 ,mem_shutter_soft_switch_first_power_on 
+63a7 203a63aa branch ui_soft_swtich_init_next ,blank 
+63a8 6fe084f1 fetch 1 ,mem_wakup_from_power_flag 
+63a9 c30163b9 bbit0 2 ,ui_soft_switch_power_on 
+
+ui_soft_swtich_init_next:
+63aa 6fe1442f fetch 2 ,mem_ui_state_map 
+63ab c3860000 rtnbit1 ui_state_btn_down 
+63ac 20204e28 branch app_enter_hibernate 
+
+ui_soft_swtich_init_power_on_time:
+63ad 684943de fetcht 2 ,mem_power_param_ptr 
+63ae e7e08002 istore 1 ,temp 
+63af efe08005 ifetch 1 ,contw 
+63b0 67e0c431 store 1 ,mem_ui_button_timeout 
+63b1 20600000 rtn 
+
+ui_soft_switch_botton_up:
+63b2 6fe143de fetch 2 ,mem_power_param_ptr 
+63b3 efe0803f ifetch 1 ,pdata 
+63b4 c1800000 rtnne ss_state_power_up 
+63b5 20204e28 branch app_enter_hibernate 
+
+ui_soft_switch_botton_long_press:
+63b6 684943de fetcht 2 ,mem_power_param_ptr 
+63b7 efe08002 ifetch 1 ,temp 
+63b8 c000e3c1 beq ss_state_power_on ,ui_soft_switch_power_off 
+
+ui_soft_switch_power_on:
+63b9 58000001 setarg ss_state_power_on 
+63ba 684943de fetcht 2 ,mem_power_param_ptr 
+63bb e7e08002 istore 1 ,temp 
+63bc 18408c02 add temp ,ss_power_off_time ,contr 
+63bd efe08006 ifetch 1 ,contr 
+63be e7e08031 istore 1 ,mem_ui_button_timeout 
+63bf efe10006 ifetch 2 ,contr 
+63c0 202075e6 branch callback_func 
+
+ui_soft_switch_power_off:
+63c1 58000002 setarg ss_state_power_off 
+63c2 204063ad call ui_soft_swtich_init_power_on_time 
+63c3 18408c05 add temp ,ss_power_off_cb ,contr 
+63c4 efe10006 ifetch 2 ,contr 
+63c5 203a4e28 branch app_enter_hibernate ,blank 
+63c6 202075e6 branch callback_func 
+
+shutter_ble_adv_interval_set:
+63c7 67e140a5 store 2 ,mem_lpm_interval 
+63c8 1fe0fffc increase -4 ,pdata 
+63c9 67e1435c store 2 ,mem_le_adv_interval 
+63ca 20600000 rtn 
+
+le_send_notify_from_list:
+63cb efe08006 ifetch 1 ,contr 
+63cc 1fe22200 copy pdata ,rega 
+63cd e8410006 ifetcht 2 ,contr 
+63ce 204074d3 call store_contr 
+63cf 20404546 call le_att_malloc_tx_notify 
+63d0 1a227200 copy rega ,loopcnt 
+63d1 204074cd call get_contr 
+63d2 20207548 branch memcpy 
+
+shutter_default_init:
+63d3 6fe1467f fetch 2 ,mem_shutter_key_conf0_temp 
+63d4 67e1447b store 2 ,mem_shutter_key_conf0 
+63d5 6fe0c681 fetch 1 ,mem_shutter_led_struct_app_led_gpio_temp 
+63d6 67e0c65d store 1 ,mem_shutter_led_struct_app_led_gpio 
+63d7 67e0c668 store 1 ,mem_shutter_power_off_led_style_gpio 
+63d8 6fe0c682 fetch 1 ,mem_shutter_hard_soft_switch_case_temp 
+63d9 67e0c46f store 1 ,mem_shutter_hard_soft_switch_case 
+63da 6fe0c683 fetch 1 ,mem_shutter_soft_switch_button_gpio_temp 
+63db 67e0c470 store 1 ,mem_shutter_soft_switch_button_gpio 
+63dc 70443701 jam 0x01 ,mem_shutter_bluetooth_type 
+63dd 58000030 setarg 0x0030 
+63de 67e14440 store 2 ,mem_classic_shutter_random_mac_offset_addr 
+63df 58000000 setarg 0x0000 
+63e0 67e14438 store 2 ,mem_shutter_config_eeprom_offset_addr 
+63e1 58000002 setarg 0x0002 
+63e2 67e14483 store 2 ,mem_key0_press 
+63e3 67e14488 store 2 ,mem_key1_press 
+63e4 58000006 setarg 0x0006 
+63e5 67e144ab store 2 ,mem_key0_release 
+63e6 67e144b0 store 2 ,mem_key1_release 
+63e7 58000007 setarg 0x0007 
+63e8 67e1448d store 2 ,mem_key2_press 
+63e9 58000008 setarg 0x0008 
+63ea 67e144b5 store 2 ,mem_key2_release 
+63eb 58004471 setarg mem_shutter_soft_switch_power_state 
+63ec 67e143de store 2 ,mem_power_param_ptr 
+63ed 58201400 setarg 0x201400 
+63ee 67e1c471 store 3 ,mem_shutter_soft_switch_power_state 
+63ef 70409401 jam 0x01 ,mem_lpm_mode 
+63f0 58000100 setarg 0x0100 
+63f1 67e140a5 store 2 ,mem_lpm_interval 
+63f2 7040a708 jam 0x08 ,mem_lpm_overhead 
+63f3 7040c105 jam 0x05 ,mem_lpm_mult 
+63f4 7040c202 jam 0x02 ,mem_lpm_mult_timeout 
+63f5 58000096 setarg 0x0096 
+63f6 67e1444b store 2 ,mem_ble_shutter_reconn_blink_on_time 
+63f7 e7e10005 istore 2 ,contw 
+63f8 58000296 setarg 0x0296 
+63f9 67e1444f store 2 ,mem_ble_shutter_discovery_blink_on_time 
+63fa e7e10005 istore 2 ,contw 
+63fb 38000010 setsect 0 ,0x10 
+63fc 38048008 setsect 1 ,0x8008 
+63fd 380ac000 setsect 2 ,0x2c000 
+63fe 380c0004 setsect 3 ,0x04 
+63ff 67e4445b store 8 ,mem_ble_shutter_interval_min_new 
+6400 70443401 jam 0x01 ,mem_ui_led_struct_num 
+6401 5800465b setarg mem_shutter_led_struct_app_led 
+6402 67e14435 store 2 ,mem_ui_led_struct_ptr 
+6403 58000000 setarg 0x0000 
+6404 67e1465b store 2 ,mem_shutter_led_struct_app_led 
+6405 380001a0 setsect 0 ,0x1a0 
+6406 38040068 setsect 1 ,0x68 
+6407 38080000 setsect 2 ,0x00 
+6408 380c0000 setsect 3 ,0x00 
+6409 67e4465e store 8 ,mem_shutter_led_struct_app_led_on_time 
+640a 58000301 setarg 0x0301 
+640b 67e14666 store 2 ,mem_shutter_power_off_led_style 
+640c 380001a0 setsect 0 ,0x1a0 
+640d 380400e8 setsect 1 ,0xe8 
+640e 38080000 setsect 2 ,0x00 
+640f 380c0000 setsect 3 ,0x00 
+6410 67e44669 store 8 ,mem_shutter_power_off_led_style_on_time 
+6411 5800000e setarg 0x000e 
+6412 67e14443 store 2 ,mem_ble_shutter_reconn_adv_interval 
+6413 58000140 setarg 0x0140 
+6414 67e14445 store 2 ,mem_ble_shutter_discovery_adv_interval 
+6415 67e1435c store 2 ,mem_le_adv_interval 
+6416 58000050 setarg 0x0050 
+6417 67e14447 store 2 ,mem_ble_shutter_reconn_timeout 
+6418 70436607 jam 0x07 ,mem_le_adv_channel_map 
+6419 70435b00 jam 0x00 ,mem_le_adv_enable 
+641a 380000fb setsect 0 ,0xfb 
+641b 3806c212 setsect 1 ,0x2c212 
+641c 3808800f setsect 2 ,0x800f 
+641d 380c0021 setsect 3 ,0x21 
+641e 67e44380 store 8 ,mem_local_rx_max_octets 
+641f 38000bb8 setsect 0 ,0x0bb8 
+6420 380402ee setsect 1 ,0x02ee 
+6421 67e24467 store 4 ,mem_ble_shutter_discovery_timeout 
+6422 5800458c setarg mem_queue_each_size 
+6423 67e143b0 store 2 ,mem_queue_ptr 
+6424 58002001 setarg 0x2001 
+6425 67e1458c store 2 ,mem_queue_each_size 
+6426 70431b1f jam 0x1f ,mem_le_adv_data_len 
+6427 38010102 setsect 0 ,0x10102 
+6428 380480c1 setsect 1 ,0x80c1 
+6429 38098120 setsect 2 ,0x18120 
+642a 380c640c setsect 3 ,0x640c 
+642b 67e4c31c store 9 ,mem_le_adv_data 
+642c 380003c1 setsect 0 ,0x3c1 
+642d e7e10005 istore 2 ,contw 
+642e 70433b1f jam 0x1f ,mem_le_scan_data_len 
+642f 3802090d setsect 0 ,0x2090d 
+6430 38074c15 setsect 1 ,0x34c15 
+6431 380a8532 setsect 2 ,0x28532 
+6432 380dd1d5 setsect 3 ,0x1d1d5 
+6433 67e4c33c store 9 ,mem_le_scan_data 
+6434 38026574 setsect 0 ,0x26574 
+6435 3804001c setsect 1 ,0x1c 
+6436 e7e18005 istore 3 ,contw 
+6437 58004478 setarg mem_shutter_keyscan 
+6438 67e143da store 2 ,mem_keyscan_ptr 
+6439 70447802 jam 0x02 ,mem_shutter_key_num 
+643a 580045b1 setarg mem_shutter_nv_data 
+643b 67e143ad store 2 ,mem_nv_data_ptr 
+643c 7043af05 jam 0x05 ,mem_nv_data_number 
+643d 580093c0 setarg ble_shutter_gatt_list_addr 
+643e 67e142ca store 2 ,mem_ui_le_uuid_table 
+643f 20600000 rtn 
+
+rf_debug_rx_gpio_low:
+6440 6fe0c3ec fetch 1 ,mem_rf_debug_rx_gpio 
+
+rf_debug_gpio_low:
+6441 d840003e arg gpcfg_output_low ,temp 
+6442 20206c67 branch gpio_config_function 
+
+rf_debug_rx_on_line:
+
+rf_debug_rx_gpio_high:
+6443 6fe0c3ec fetch 1 ,mem_rf_debug_rx_gpio 
+
+rf_debug_gpio_high:
+6444 d840003f arg gpcfg_output_high ,temp 
+6445 20206c67 branch gpio_config_function 
+
+rf_debug_rx_gpio_h_l_h:
+6446 20406443 call rf_debug_rx_gpio_high 
+
+rf_debug_rx_gpio_l_h:
+6447 20406440 call rf_debug_rx_gpio_low 
+6448 20206443 branch rf_debug_rx_gpio_high 
+
+rf_debug_rx_gpio_l_h_l:
+
+rf_debug_shutdown_radio_line:
+6449 20406447 call rf_debug_rx_gpio_l_h 
+
+rf_debug_rx_crc_line:
+644a 20206440 branch rf_debug_rx_gpio_low 
+
+rf_debug_rx_sync_line:
+644b 20206447 branch rf_debug_rx_gpio_l_h 
+
+rf_debug_rx_crc_fail_line:
+644c 20406447 call rf_debug_rx_gpio_l_h 
+644d 20206449 branch rf_debug_rx_gpio_l_h_l 
+
+rf_debug_rx_match_line:
+
+rf_debug_rx_crc_error_line:
+
+rf_debug_rx_sync_timeout_line:
+644e 20206440 branch rf_debug_rx_gpio_low 
+
+rf_debug_tx_off_line:
+
+rf_debug_tx_gpio_low:
+644f 6fe0c3ed fetch 1 ,mem_rf_debug_tx_gpio 
+6450 20206441 branch rf_debug_gpio_low 
+
+rf_debug_tx_on_line:
+
+rf_debug_tx_gpio_high:
+6451 6fe0c3ed fetch 1 ,mem_rf_debug_tx_gpio 
+6452 20206444 branch rf_debug_gpio_high 
+
+rf_debug_tx_gpio_l_h_l:
+6453 2040644f call rf_debug_tx_gpio_low 
+6454 20406451 call rf_debug_tx_gpio_high 
+6455 2020644f branch rf_debug_tx_gpio_low 
+
+fcc_auth_config:
+6456 2040649f call pp_pn9 
+6457 20206458 branch fcc_auth_procedures 
+
+fcc_auth_procedures:
+6458 44b2c00c bpatch patch0c_5 ,mem_patch0c 
+6459 7001e801 jam fcc_data_rate_1mbps ,mem_fcc_mod 
+645a 7001ea01 jam fcc_bt_mode ,mem_fcc_btble 
+645b 7001ec19 jam fcc_len_dh1 ,mem_fcc_data_length 
+645c 7001ed02 jam fcc_fixed_freq ,mem_fcc_hop 
+645d 6fe101ef fetch 2 ,mem_fcc_config_cb 
+645e 204075e6 call callback_func 
+645f 6fe401e7 fetch fcc_para_len ,mem_fcc_param 
+6460 67e401df store fcc_para_len ,mem_fcc_param_new 
+6461 6fe081ee fetch 1 ,mem_fcc_tx_power 
+6462 67e0c116 store 1 ,mem_tx_power 
+6463 6fe081e9 fetch 1 ,mem_fcc_txrx 
+6464 c000e466 beq fcc_tx ,fcc_auth_tx_start 
+6465 c00164f7 beq fcc_rx ,fcc_auth_rx_start 
+
+fcc_auth_tx_start:
+6466 684881e7 fetcht 1 ,mem_fcc_ch 
+6467 6fe081ea fetch 1 ,mem_fcc_btble 
+6468 c001646a beq fcc_ble_mode ,fcc_auth_ble_tx_on 
+6469 c000e486 beq fcc_bt_mode ,fcc_auth_bt_tx_on 
+
+fcc_auth_ble_tx_on:
+646a 44b3400c bpatch patch0c_6 ,mem_patch0c 
+646b 204064e4 call fcc_set_sync_on 
+646c 204039c9 call set_freq_tx 
+646d 204064b2 call fcc_le_enable 
+646e 79202a00 set1 txgfsk ,radio_ctrl 
+646f 782efc00 enable encode_fec0 
+6470 78307c00 enable is_tx 
+6471 7850fc00 disable is_rx 
+6472 20403dc2 call le_wait_tx 
+6473 6fe081eb fetch 1 ,mem_fcc_data 
+6474 67f0890d store 1 ,core_tx_test_mode 
+6475 20206476 branch fcc_auth_tx_data 
+
+fcc_auth_tx_data:
+6476 44b3c00c bpatch patch0c_7 ,mem_patch0c 
+6477 6fe081e8 fetch 1 ,mem_fcc_mod 
+6478 c000e479 beq fcc_data_rate_1mbps ,calculate_gfsk_modulation_length 
+
+calculate_gfsk_modulation_length:
+6479 6fe081ec fetch 1 ,mem_fcc_data_length 
+647a c00ce47d beq fcc_len_dh1 ,calculate_gfsk_modulation_length_dh1 
+647b c03c6480 beq fcc_len_dh3 ,calculate_gfsk_modulation_length_dh3 
+647c c0786483 beq fcc_len_dh5 ,calculate_gfsk_modulation_length_dh5 
+
+calculate_gfsk_modulation_length_dh1:
+647d df200035 arg 53 ,loopcnt 
+647e d8c00b00 arg mem_pn9 ,contr 
+647f 202064d5 branch pnloop_stable 
+
+calculate_gfsk_modulation_length_dh3:
+6480 df2000cb arg 203 ,loopcnt 
+6481 d8c00b00 arg mem_pn9 ,contr 
+6482 202064d5 branch pnloop_stable 
+
+calculate_gfsk_modulation_length_dh5:
+6483 df200162 arg 354 ,loopcnt 
+6484 d8c00b00 arg mem_pn9 ,contr 
+6485 202064d5 branch pnloop_stable 
+
+fcc_auth_bt_tx_on:
+6486 44b4400d bpatch patch0d_0 ,mem_patch0d 
+6487 204064e4 call fcc_set_sync_on 
+6488 204039c9 call set_freq_tx 
+6489 7843fc00 disable enable_white 
+648a 782efc00 enable encode_fec0 
+648b 78307c00 enable is_tx 
+648c 684881e8 fetcht 1 ,mem_fcc_mod 
+648d 18422a00 copy temp ,radio_ctrl 
+648e 6fe081eb fetch 1 ,mem_fcc_data 
+648f 67f0890d store 1 ,core_tx_test_mode 
+6490 c0006476 beq 0 ,fcc_auth_tx_data 
+
+test_tx_carrier_loop:
+6491 44b4c00d bpatch patch0d_1 ,mem_patch0d 
+6492 6fe081ec fetch 1 ,mem_fcc_data_length 
+6493 1fe27200 copy pdata ,loopcnt 
+6494 d8c00b00 arg mem_pn9 ,contr 
+
+pnloop_carrier:
+6495 efe08006 ifetch 1 ,contr 
+6496 08008608 inject mod ,8 
+6497 c2006495 loop pnloop_carrier 
+6498 6fe101ef fetch 2 ,mem_fcc_config_cb 
+6499 204075e6 call callback_func 
+649a 6fe401e7 fetch fcc_para_len ,mem_fcc_param 
+649b 684c01df fetcht fcc_para_len ,mem_fcc_param_new 
+649c 98467c00 isub temp ,null 
+649d 2022e491 branch test_tx_carrier_loop ,zero 
+649e 20206458 branch fcc_auth_procedures 
+
+pp_pn9:
+649f df2003fe arg mem_pn9_size ,loopcnt 
+64a0 d8a00b00 arg mem_pn9 ,contw 
+64a1 580001ff setarg 0x1ff 
+64a2 18002400 force 0 ,regb 
+
+pp_pn9_loop:
+64a3 1fe92200 rshift3 pdata ,rega 
+64a4 1a232200 rshift rega ,rega 
+64a5 9a22a200 ixor rega ,rega 
+64a6 2a2ffe00 isolate1 0 ,rega 
+64a7 7920fe09 setflag true ,9 ,pdata 
+64a8 18430400 rshift temp ,temp 
+64a9 2feffe00 isolate1 0 ,pdata 
+64aa 79208407 setflag true ,7 ,temp 
+64ab 1fe37e00 rshift pdata ,pdata 
+64ac 1a40a401 increase 1 ,regb 
+64ad 2a400e00 compare 0 ,regb ,0x7 
+64ae 2420e4a3 nbranch pp_pn9_loop ,true 
+64af e0408005 istoret 1 ,contw 
+64b0 c20064a3 loop pp_pn9_loop 
+64b1 20600000 rtn 
+
+fcc_le_enable:
+64b2 44b5400d bpatch patch0d_2 ,mem_patch0d 
+64b3 793f802f set0 mark_ble_lr ,mark 
+64b4 70890103 jam 0x03 ,0x8901 
+64b5 70892084 jam 0x84 ,0x8920 
+64b6 708925a7 jam 0xa7 ,0x8925 
+64b7 70893003 jam 0x03 ,0x8930 
+64b8 70893740 jam 0x40 ,0x8937 
+64b9 708a6d85 jam 0x85 ,0x8a6d 
+64ba 708a6d89 jam 0x89 ,core_rx_bq_cfg0 
+64bb 6fe08164 fetch 1 ,mem_le_mode 
+64bc c3968000 rtnbit1 mark_ble_2m 
+64bd 70890101 jam 0x01 ,0x8901 
+64be 70892080 jam 0x80 ,0x8920 
+64bf 708a6d05 jam 0x05 ,0x8a6d 
+64c0 708a6d09 jam 0x09 ,core_rx_bq_cfg0 
+64c1 7920002f set1 mark_ble_lr ,mark 
+64c2 70890105 jam 0x05 ,0x8901 
+64c3 70893024 jam 0x24 ,0x8930 
+64c4 7089340a jam 0x0a ,0x8934 
+64c5 20600000 rtn 
+
+fcc_shutdown_radio:
+64c6 44b5c00d bpatch patch0d_3 ,mem_patch0d 
+64c7 18002a08 force 0x08 ,radio_ctrl 
+64c8 18002a00 force 0 ,radio_ctrl 
+64c9 7850fc00 disable is_rx 
+64ca 78507c00 disable is_tx 
+64cb 782f7c00 pulse packet_end 
+64cc 70890005 jam 0x5 ,modem_en 
+64cd 20000002 nop 2 
+64ce 70890000 jam 0x0 ,modem_en 
+64cf 204064e4 call fcc_set_sync_on 
+64d0 708a1600 jam 0 ,core_syn_en 
+64d1 708a0a10 jam 0x10 ,core_rf_ldo_en0 
+64d2 708a0b00 jam 0 ,core_rf_ldo_en1 
+64d3 20600000 rtn 
+
+fcc_test_ble_bt_tx_off:
+64d4 202064c6 branch fcc_shutdown_radio 
+
+pnloop_stable:
+64d5 efe08006 ifetch 1 ,contr 
+64d6 08008608 inject mod ,8 
+64d7 c20064d5 loop pnloop_stable 
+64d8 204064d4 call fcc_test_ble_bt_tx_off 
+64d9 78287c00 enable swfine 
+64da db600350 arg 0x350 ,stop_watch 
+
+stable_stop:
+64db 2021e458 branch fcc_auth_procedures ,timeout 
+64dc 6fe101ef fetch 2 ,mem_fcc_config_cb 
+64dd 204075e6 call callback_func 
+64de 6fe401e7 fetch fcc_para_len ,mem_fcc_param 
+64df 684c01df fetcht fcc_para_len ,mem_fcc_param_new 
+64e0 98467c00 isub temp ,null 
+64e1 2022e4db branch stable_stop ,zero 
+64e2 204064d4 call fcc_test_ble_bt_tx_off 
+64e3 20206458 branch fcc_auth_procedures 
+
+fcc_set_sync_on:
+64e4 44b6400d bpatch patch0d_4 ,mem_patch0d 
+64e5 70890005 jam 0x5 ,modem_en 
+64e6 20000002 nop 2 
+64e7 70890000 jam 0x0 ,modem_en 
+64e8 708a10aa jam 0xaa ,core_rf_ldo_cfg4 
+64e9 708a11aa jam 0xaa ,core_rf_ldo_cfg5 
+64ea 708a1215 jam 0x15 ,core_rf_ldo_cfg6 
+64eb 708a0af8 jam 0xf8 ,core_rf_ldo_en0 
+64ec 708a0b04 jam 4 ,core_rf_ldo_en1 
+64ed 20000078 nop 120 
+64ee 708a167a jam 0x7a ,core_syn_en 
+64ef 708a1700 jam 0 ,core_rx_en0 
+64f0 708a1800 jam 0 ,core_rx_en1 
+64f1 708a1900 jam 0 ,core_tx_en0 
+64f2 708a1a00 jam 0 ,core_tx_en1 
+64f3 708a112a jam 0x2a ,core_rf_ldo_cfg5 
+64f4 708a0a78 jam 0x78 ,core_rf_ldo_en0 
+64f5 708a4300 jam 0 ,core_syn_cal_ctrl 
+64f6 20600000 rtn 
+
+fcc_auth_rx_start:
+64f7 20406500 call fcc_test_ble_rx_on 
+
+fcc_test_rx_loop:
+64f8 44b6c00d bpatch patch0d_5 ,mem_patch0d 
+64f9 6fe101ef fetch 2 ,mem_fcc_config_cb 
+64fa 204075e6 call callback_func 
+64fb 6fe401e7 fetch fcc_para_len ,mem_fcc_param 
+64fc 684c01df fetcht fcc_para_len ,mem_fcc_param_new 
+64fd 98467c00 isub temp ,null 
+64fe 2022e4f8 branch fcc_test_rx_loop ,zero 
+64ff 20206458 branch fcc_auth_procedures 
+
+fcc_test_ble_rx_on:
+6500 44b7400d bpatch patch0d_6 ,mem_patch0d 
+6501 204064d4 call fcc_test_ble_bt_tx_off 
+6502 20403954 call set_freq_rx 
+6503 58000500 setarg param_pll_setup 
+6504 20403abc call sleep 
+6505 2020396a branch rf_rx_enable 
+
+hci_init:
+6506 20800000 clear_stack 
+6507 20406df0 call wdt_set_disable 
+6508 20406511 call hci_init_clksel_xtal 
+6509 20406513 call hci_init_uart_default_config 
+650a 20406527 call hci_init_uart_config 
+650b 20406543 call hci_init_pwm_default_config 
+650c 20406547 call hci_init_pwm 
+650d 70056401 jam 1 ,mem_hci_command_complete_num_hci_command_packet 
+650e 70056104 jam hci_h4_type_event ,mem_hci_event_head_type 
+
+hci_process_loop:
+650f 20406552 call hci_process_check_uart_rx 
+6510 2020650f branch hci_process_loop 
+
+hci_init_clksel_xtal:
+6511 70804204 jam clksel_xtal ,core_clksel 
+6512 20600000 rtn 
+
+hci_init_uart_default_config:
+6513 20406517 call hci_init_uart_default_config_tx 
+6514 2040651b call hci_init_uart_default_config_rx 
+6515 2040651f call hci_init_uart_default_config_rts 
+6516 20206523 branch hci_init_uart_default_config_cts 
+
+hci_init_uart_default_config_tx:
+6517 6fe0c437 fetch 1 ,mem_hci_uart_tx_gpio 
+6518 247a0000 nrtn blank 
+6519 70443705 jam hci_uart_tx_gpio_num ,mem_hci_uart_tx_gpio 
+651a 20600000 rtn 
+
+hci_init_uart_default_config_rx:
+651b 6fe0c438 fetch 1 ,mem_hci_uart_rx_gpio 
+651c 247a0000 nrtn blank 
+651d 70443806 jam hci_uart_rx_gpio_num ,mem_hci_uart_rx_gpio 
+651e 20600000 rtn 
+
+hci_init_uart_default_config_rts:
+651f 6fe0c439 fetch 1 ,mem_hci_uart_rts_gpio 
+6520 247a0000 nrtn blank 
+6521 70443909 jam hci_uart_rts_gpio_num ,mem_hci_uart_rts_gpio 
+6522 20600000 rtn 
+
+hci_init_uart_default_config_cts:
+6523 6fe0c43a fetch 1 ,mem_hci_uart_cts_gpio 
+6524 247a0000 nrtn blank 
+6525 70443a0a jam hci_uart_cts_gpio_num ,mem_hci_uart_cts_gpio 
+6526 20600000 rtn 
+
+hci_init_uart_config:
+6527 58000c00 setarg mem_h5rx_buf 
+6528 67e104c4 store 2 ,mem_pdatatemp 
+6529 58000eff setarg mem_h5rx_buf_end 
+652a e7e10005 istore 2 ,contw 
+652b 58000f00 setarg mem_h5tx_buf 
+652c e7e10005 istore 2 ,contw 
+652d 58000fff setarg mem_h5tx_buf_end 
+652e e7e10005 istore 2 ,contw 
+652f 6fe404c4 fetch 8 ,mem_pdatatemp 
+6530 20406acd call uarta_init_dma_mem 
+6531 20406ae7 call uart_clock_select_main_freq_crystal 
+6532 d841c200 arg 115200 ,temp 
+6533 20406ada call uarta_calc_baud_rate_config 
+6534 6fe0c437 fetch 1 ,mem_hci_uart_tx_gpio 
+6535 d8400008 arg gpcfg_uart_txd ,temp 
+6536 20406c68 call gpio_config_function_int 
+6537 6fe0c438 fetch 1 ,mem_hci_uart_rx_gpio 
+6538 d8400049 arg gpcfg_uart_rxd | gpcfg_pullup ,temp 
+6539 20406c68 call gpio_config_function_int 
+653a 6fe0c439 fetch 1 ,mem_hci_uart_rts_gpio 
+653b d840000a arg gpcfg_uart_rts ,temp 
+653c 20406c68 call gpio_config_function_int 
+653d 6fe0c43a fetch 1 ,mem_hci_uart_cts_gpio 
+653e d840000b arg gpcfg_uart_cts ,temp 
+653f 20406c68 call gpio_config_function_int 
+6540 d8400081 arg fun_uart_control_enable | fun_uart_control_setting_rate_baud ,temp 
+6541 60588060 storet 1 ,core_uart_ctrl 
+6542 202075e3 branch clean_mem 
+
+hci_init_pwm_default_config:
+6543 6fe0c43b fetch 1 ,mem_hci_pwm_12mhz_gpio 
+6544 247a0000 nrtn blank 
+6545 70443b0c jam hci_pmw_12mhz_gpio_num ,mem_hci_pwm_12mhz_gpio 
+6546 20600000 rtn 
+
+hci_init_pwm:
+6547 6fe0c43b fetch 1 ,mem_hci_pwm_12mhz_gpio 
+6548 d8400010 arg gpcfg_pwm_out0 ,temp 
+6549 20406c68 call gpio_config_function_int 
+654a da200040 arg 0x40 ,rega 
+654b 20406d6e call pwm_init 
+654c da200000 arg 0 ,rega 
+654d da400000 arg 0 ,regb 
+654e 58000000 setarg 0 
+654f 20406d93 call pwm_duty_cycle_set 
+6550 d8e00000 arg 0 ,queue 
+6551 20206dd9 branch pwm_set_select 
+
+hci_process_check_uart_rx:
+6552 6ff10112 fetch 2 ,core_uart_rxitems 
+6553 1fe0a3fc add pdata ,-4 ,rega 
+6554 24610000 nrtn positive 
+6555 20406afb call uarta_prepare_rx 
+6556 efe08003 ifetch 1 ,contru 
+6557 c000e55a beq hci_h4_type_cmd ,hci_parse_packet_cmd 
+6558 204074fb call delay_10ms 
+6559 20206b03 branch uarta_clear_current_rx 
+
+hci_parse_packet_cmd:
+655a efe10003 ifetch 2 ,contru 
+655b 67e10565 store 2 ,mem_hci_opcode 
+655c d84003ff arg 0x3ff ,temp 
+655d 98410400 iand temp ,temp 
+655e 6049055e storet 2 ,mem_hci_opcode_ocf 
+655f 1feb7e00 rshift2 pdata ,pdata 
+6560 1fecfe00 rshift8 pdata ,pdata 
+6561 67e08560 store 1 ,mem_hci_opcode_ogf 
+6562 efe08003 ifetch 1 ,contru 
+6563 1fe0ffff pincrease -1 
+6564 9a267c00 isub rega ,null 
+6565 20610000 rtn positive 
+6566 20406568 call hci_parse_complete_packet 
+6567 202065c3 branch hci_drop_current_packet 
+
+hci_parse_complete_packet:
+6568 6fe08560 fetch 1 ,mem_hci_opcode_ogf 
+6569 c01fe56b beq hci_ogf_vendor_specific_debug ,hci_parse_packet_cmd_ogf_vendorspecific_debug 
+656a 202065af branch hci_send_event_command_complete_error_command_nuknown 
+
+hci_parse_packet_cmd_ogf_vendorspecific_debug:
+656b 44b7c00d bpatch patch0d_7 ,mem_patch0d 
+656c 6fe0855e fetch 1 ,mem_hci_opcode_ocf 
+656d c00065ae beq hci_vendor_cmd_reset ,hci_normal_reply 
+656e c000e576 beq hci_vendor_cmd_chipid ,phci_grp_vendor_chipid 
+656f c001657b beq hci_vendor_cmd_baud ,phci_grp_vendor_baud 
+6570 c001e589 beq hci_vendor_cmd_patch ,phci_grp_vendor_patch 
+6571 c0026593 beq hci_vendor_cmd_patch_done ,phci_grp_vendor_done 
+6572 c002e5ae beq hci_vendor_cmd_echo ,hci_normal_reply 
+6573 c00865a4 beq hci_vendor_cmd_mem ,phci_grp_vendor_mem 
+6574 c00a65aa beq hci_vendor_cmd_set_flow_control ,phci_grp_vendor_flow_control 
+6575 202065ae branch hci_normal_reply 
+
+phci_grp_vendor_chipid:
+6576 70056700 jam command_succeeded ,mem_hci_command_complete_return_parameter 
+6577 6ff10000 fetch 2 ,core_chipid 
+6578 67e10568 store 2 ,mem_hci_command_complete_return_parameter_chip_id 
+6579 df200003 arg 3 ,loopcnt 
+657a 202065b6 branch hci_send_event_command_complete 
+
+phci_grp_vendor_baud:
+657b efe10003 ifetch 2 ,contu 
+657c 67f10052 store 2 ,core_uart_baud 
+657d 20600000 rtn 
+
+phci_grp_vendor_patch_common:
+657e efe08003 ifetch 1 ,contu 
+657f 1fe20400 copy pdata ,temp 
+6580 67f08024 store 1 ,core_ucode_low 
+6581 efe08003 ifetch 1 ,contu 
+6582 98408400 iadd temp ,temp 
+6583 79207e07 set1 7 ,pdata 
+6584 67f08023 store 1 ,core_ucode_ctrl 
+6585 efe08003 ifetch 1 ,contu 
+6586 98408400 iadd temp ,temp 
+6587 1fe27200 copy pdata ,loopcnt 
+6588 20600000 rtn 
+
+phci_grp_vendor_patch:
+6589 2040657e call phci_grp_vendor_patch_common 
+
+phci_grp_vendor_patch_loop:
+658a efe08003 ifetch 1 ,contu 
+658b 67f08025 store 1 ,core_ucode_data 
+658c 98408400 iadd temp ,temp 
+658d c200658a loop phci_grp_vendor_patch_loop 
+
+phci_grp_vendor_patch_check_sum:
+658e 184104ff and temp ,0xff ,temp 
+658f efe08003 ifetch 1 ,contu 
+6590 98467c00 isub temp ,null 
+6591 2422e5a2 nbranch phci_grp_vendor_patch_bad ,zero 
+6592 202065ae branch hci_normal_reply 
+
+phci_grp_vendor_done:
+6593 df200020 arg 0x20 ,loopcnt 
+6594 d8a04000 arg mem_patch00 ,contw 
+6595 d8400000 arg 0 ,temp 
+
+phci_grp_vendor_done_loop:
+6596 efe08003 ifetch 1 ,contu 
+6597 e7e08005 istore 1 ,contw 
+6598 98408400 iadd temp ,temp 
+6599 c2006596 loop phci_grp_vendor_done_loop 
+659a 184104ff and temp ,0xff ,temp 
+659b efe08003 ifetch 1 ,contu 
+659c 98467c00 isub temp ,null 
+659d 2422e5a2 nbranch phci_grp_vendor_patch_bad ,zero 
+659e 70802300 jam 0 ,core_ucode_ctrl 
+659f 204065ae call hci_normal_reply 
+65a0 204075e8 call wait_uarttx 
+65a1 20203801 branch soft_reset 
+
+phci_grp_vendor_patch_bad:
+65a2 70802300 jam 0 ,core_ucode_ctrl 
+65a3 202065af branch hci_send_event_command_complete_error_command_nuknown 
+
+phci_grp_vendor_mem:
+65a4 efe08003 ifetch 1 ,contu 
+65a5 1fe27200 copy pdata ,loopcnt 
+65a6 efe10003 ifetch 2 ,contu 
+65a7 1fe20a00 copy pdata ,contw 
+65a8 20406b3f call uart_copy_rx_bytes 
+65a9 202065ae branch hci_normal_reply 
+
+phci_grp_vendor_flow_control:
+65aa 6ff08060 fetch 1 ,core_uart_ctrl 
+65ab 79207e04 set1 bit_uart_control_flow_control ,pdata 
+65ac 67f08060 store 1 ,core_uart_ctrl 
+65ad 202065ae branch hci_normal_reply 
+
+hci_normal_reply:
+65ae 202065b3 branch hci_send_event_command_complete_without_payload 
+
+hci_send_event_command_complete_error_command_nuknown:
+65af 70056701 jam command_unknown ,mem_hci_command_complete_return_parameter 
+65b0 202065b4 branch hci_send_event_command_complete_without_payload + 1 
+
+hci_send_event_command_complete_error_command_disallowed:
+65b1 7005670c jam command_disallowed ,mem_hci_command_complete_return_parameter 
+65b2 202065b4 branch hci_send_event_command_complete_without_payload + 1 
+
+hci_send_event_command_complete_without_payload:
+65b3 70056700 jam command_succeeded ,mem_hci_command_complete_return_parameter 
+65b4 df200001 arg 1 ,loopcnt 
+65b5 202065b6 branch hci_send_event_command_complete 
+
+hci_send_event_command_complete:
+65b6 7005620e jam hci_event_command_complete ,mem_hci_event_head_event_code 
+65b7 1f20fe03 add loopcnt ,3 ,pdata 
+65b8 67e08563 store 1 ,mem_hci_event_para_total_length 
+65b9 204065bf call hci_prepare_send_event 
+65ba 6fe18564 fetch 3 ,mem_hci_command_complete_num_hci_command_packet 
+65bb e7e18003 istore 3 ,contwu 
+65bc d8c00567 arg mem_hci_command_complete_return_parameter ,contr 
+65bd 20406b26 call uart_copy_tx_bytes 
+65be 20206b09 branch uarta_send_register_pop 
+
+hci_prepare_send_event:
+65bf 20406b07 call uarta_prepare_tx_register_push 
+65c0 6fe18561 fetch 3 ,mem_hci_event_head_type 
+65c1 e7e18003 istore 3 ,contwu 
+65c2 20600000 rtn 
+
+hci_drop_current_packet:
+65c3 20406afb call uarta_prepare_rx 
+65c4 18608603 increase 3 ,contru 
+65c5 efe08003 ifetch 1 ,contru 
+65c6 98608600 iadd contru ,contru 
+65c7 20206b01 branch uarta_rxdone 
+
+cmd_exit:
+65c8 70410d00 jam 0 ,mem_hci_cmd 
+65c9 20600000 rtn 
+
+kscan_init:
+65ca 6fe143d8 fetch 2 ,mem_kscan_ptr 
+65cb 1fe22600 copy pdata ,regc 
+65cc 204065e0 call kscan_row_num_select 
+65cd 202065e6 branch kscan_col_num_select 
+
+kscan_col_init:
+65ce 58000000 setarg 0 
+65cf 1a60a20b add regc ,keyscan_offect_shift_count ,rega 
+65d0 e7e08011 istore 1 ,rega 
+65d1 1a60a200 add regc ,keyscan_offect_col_num ,rega 
+65d2 efe08011 ifetch 1 ,rega 
+65d3 203a65f1 branch kscan_value_init ,blank 
+65d4 1fe27200 copy pdata ,loopcnt 
+65d5 1a60a402 add regc ,keyscan_offect_col_conf_pin ,regb 
+
+kscan_col_loop:
+65d6 e8408012 ifetcht 1 ,regb 
+65d7 20406c43 call gpio_config_output 
+65d8 e8408012 ifetcht 1 ,regb 
+65d9 20406c43 call gpio_out_active 
+65da 204065f1 call kscan_value_init 
+65db e8408012 ifetcht 1 ,regb 
+65dc 20406c29 call gpio_config_input 
+65dd 1a40a401 increase 1 ,regb 
+65de c20065d6 loop kscan_col_loop 
+65df 20600000 rtn 
+
+kscan_row_num_select:
+65e0 1a608a01 add regc ,keyscan_offect_row_num ,contw 
+65e1 efe08005 ifetch 1 ,contw 
+65e2 207a0000 rtn blank 
+65e3 1fe27200 copy pdata ,loopcnt 
+65e4 1a60a206 add regc ,keyscan_offect_row_conf_pin ,rega 
+65e5 202065ec branch kscan_ioselect_input 
+
+kscan_col_num_select:
+65e6 1a608a00 add regc ,keyscan_offect_col_num ,contw 
+65e7 efe08005 ifetch 1 ,contw 
+65e8 207a0000 rtn blank 
+65e9 1fe27200 copy pdata ,loopcnt 
+65ea 1a60a202 add regc ,keyscan_offect_col_conf_pin ,rega 
+65eb 202065ec branch kscan_ioselect_input 
+
+kscan_ioselect_input:
+65ec e8408011 ifetcht 1 ,rega 
+65ed 20406c29 call gpio_config_input 
+65ee 1a20a201 increase 1 ,rega 
+65ef c20065ec loop kscan_ioselect_input 
+65f0 20600000 rtn 
+
+kscan_value_init:
+65f1 58000000 setarg 0 
+65f2 1a60a20a add regc ,keyscan_offect_row_count ,rega 
+65f3 e7e08011 istore 1 ,rega 
+65f4 1a60a206 add regc ,keyscan_offect_row_conf_pin ,rega 
+
+kscan_save_vaule:
+65f5 e8408011 ifetcht 1 ,rega 
+65f6 20406c32 call gpio_get_bit 
+65f7 1a60840c add regc ,keyscan_offect_value_temp ,temp 
+65f8 efe10002 ifetch 2 ,temp 
+65f9 1a608c0b add regc ,keyscan_offect_shift_count ,contr 
+65fa e8408006 ifetcht 1 ,contr 
+65fb 18420e00 copy temp ,queue 
+65fc f920fe00 qsetflag true ,pdata 
+65fd 1a60840c add regc ,keyscan_offect_value_temp ,temp 
+65fe e7e10002 istore 2 ,temp 
+65ff 1a20a201 increase 1 ,rega 
+6600 1a608a0b add regc ,keyscan_offect_shift_count ,contw 
+6601 efe08005 ifetch 1 ,contw 
+6602 1fe0fe01 increase 1 ,pdata 
+6603 e7e08005 istore 1 ,contw 
+6604 1a608a0a add regc ,keyscan_offect_row_count ,contw 
+6605 e8408005 ifetcht 1 ,contw 
+6606 18408401 increase 1 ,temp 
+6607 e0408005 istoret 1 ,contw 
+6608 1a608a01 add regc ,keyscan_offect_row_num ,contw 
+6609 efe08005 ifetch 1 ,contw 
+660a 9842fc00 ixor temp ,null 
+660b 2422e5f5 nbranch kscan_save_vaule ,zero 
+660c 20600000 rtn 
+
+kscan_lpm_berfore:
+660d 6fe143d8 fetch 2 ,mem_kscan_ptr 
+660e 1fe22600 copy pdata ,regc 
+660f 1a608a01 add regc ,keyscan_offect_row_num ,contw 
+6610 efe08005 ifetch 1 ,contw 
+6611 1fe27200 copy pdata ,loopcnt 
+6612 1a60a202 add regc ,keyscan_offect_col_conf_pin ,rega 
+
+kscan_select_wake:
+6613 e8408011 ifetcht 1 ,rega 
+6614 20406c0f call gpio_set_wake 
+6615 1a20a201 increase 1 ,rega 
+6616 c2006613 loop kscan_select_wake 
+6617 20600000 rtn 
+
+kscan_clkn_bt_timer_check:
+6618 e8420011 ifetcht 4 ,rega 
+6619 1c427e00 copy clkn_bt ,pdata 
+661a 98467c00 isub temp ,null 
+661b 20610000 rtn positive 
+661c 58000000 setarg 0 
+661d e7e20011 istore 4 ,rega 
+661e 20600000 rtn 
+
+kscan_process:
+661f 6fe143d8 fetch 2 ,mem_kscan_ptr 
+6620 1fe22600 copy pdata ,regc 
+6621 1a60a212 add regc ,keyscan_offect_btclk ,rega 
+6622 20406618 call kscan_clkn_bt_timer_check 
+6623 efe20011 ifetch 4 ,rega 
+6624 1a60a416 add regc ,keyscan_offect_btclk_interval ,regb 
+6625 e8408012 ifetcht 1 ,regb 
+6626 98408400 iadd temp ,temp 
+6627 1c427e00 copy clkn_bt ,pdata 
+6628 98467c00 isub temp ,null 
+6629 24610000 nrtn positive 
+662a e7e20011 istore 4 ,rega 
+662b 204065ce call kscan_col_init 
+662c 1a60a20c add regc ,keyscan_offect_value_temp ,rega 
+662d efe10011 ifetch 2 ,rega 
+662e 1a60a20e add regc ,keyscan_offect_lasvalue ,rega 
+662f e8410011 ifetcht 2 ,rega 
+6630 e7e10011 istore 2 ,rega 
+6631 98417e00 iand temp ,pdata 
+6632 1a60a210 add regc ,keyscan_offect_value ,rega 
+6633 e7e10011 istore 2 ,rega 
+6634 20600000 rtn 
+
+l2cap_init:
+6635 2035e63a branch l2cap_init_wake ,wake 
+6636 580043fd setarg mem_l2cap_xmem_end 
+6637 d8a043ee arg mem_l2cap_xmem_start ,contw 
+6638 98a67200 isub contw ,loopcnt 
+6639 2040750f call clear_mem 
+
+l2cap_init_wake:
+663a 20600000 rtn 
+
+l2cap_check_map:
+663b 44b8400e bpatch patch0e_0 ,mem_patch0e 
+663c 204066b4 call l2cap_malloc_get_full_map 
+663d 6fe0c3ee fetch 1 ,mem_used_map 
+663e c0007646 beq 0 ,set_pdata_0 
+663f c000f646 beq 1 ,set_pdata_0 
+6640 c0017646 beq 2 ,set_pdata_0 
+6641 c001f646 beq 3 ,set_pdata_0 
+6642 c040f646 beq 0x81 ,set_pdata_0 
+6643 c0607646 beq 0xc0 ,set_pdata_0 
+6644 c0407646 beq 0x80 ,set_pdata_0 
+6645 c0207646 beq 0x40 ,set_pdata_0 
+6646 20600000 rtn 
+
+check_l2cap_map:
+6647 d8e00000 arg 0 ,queue 
+6648 da400000 arg 0 ,regb 
+
+check_l2cap_map_loop:
+6649 18e67c07 sub queue ,7 ,null 
+664a 24610000 nrtn positive 
+664b aa2fffff qisolate1 rega 
+664c 2020e64e branch check_l2cap_map_used ,true 
+664d 20206652 branch check_l2cap_map_used2 
+
+check_l2cap_map_used:
+664e 18427e00 copy temp ,pdata 
+664f 203a6652 branch check_l2cap_map_used2 ,blank 
+6650 f9202400 qset1 regb 
+6651 184085ff increase -1 ,temp 
+
+check_l2cap_map_used2:
+6652 18e08e01 increase 1 ,queue 
+6653 20206649 branch check_l2cap_map_loop 
+
+ble_l2cap_malloc:
+6654 6b014312 fetchr regd ,2 ,mem_ble_l2cap_tx_buff0_ptr 
+6655 6d614314 fetchr rege ,2 ,mem_ble_l2cap_tx_buff_size_ptr 
+6656 20407638 call disable_user 
+6657 20206658 branch host_l2cap_malloc 
+
+host_l2cap_malloc:
+6658 44b8c00e bpatch patch0e_1 ,mem_patch0e 
+6659 204066a4 call l2cap_malloc_is_fifo_full 
+665a 243a3aba nbranch assert ,blank 
+665b 204066b4 call l2cap_malloc_get_full_map 
+665c df200008 arg 8 ,loopcnt 
+
+host_l2cap_malloc_loop:
+665d 6848c3ee fetcht 1 ,mem_used_map 
+665e 1f260e08 sub loopcnt ,8 ,queue 
+665f a84fffff qisolate1 temp 
+6660 2020e665 branch host_l2cap_malloc_next_buffer ,true 
+6661 2040666c call host_l2cap_malloc_check_buffer_enough 
+6662 24216665 nbranch host_l2cap_malloc_next_buffer ,positive 
+6663 20406682 call host_l2cap_malloc_into_fifo 
+6664 20206669 branch host_l2cap_malloc_succ 
+
+host_l2cap_malloc_next_buffer:
+6665 1d627e00 copy rege ,pdata 
+6666 9b00b000 iadd regd ,regd 
+6667 c200665d loop host_l2cap_malloc_loop 
+6668 20203aba branch assert 
+
+host_l2cap_malloc_succ:
+6669 1b027e00 copy regd ,pdata 
+666a 1b020a00 copy regd ,contw 
+666b 20600000 rtn 
+
+host_l2cap_malloc_check_buffer_enough:
+666c 44b9400e bpatch patch0e_2 ,mem_patch0e 
+666d 1f260e08 sub loopcnt ,8 ,queue 
+666e d8400000 arg 0 ,temp 
+666f d9600000 arg 0 ,timeup 
+
+host_l2cap_malloc_check_buffer_enough_loop:
+6670 18e27e00 copy queue ,pdata 
+6671 c004667d beq 8 ,host_l2cap_malloc_check_buffer_enough_end 
+6672 6fe0c3ee fetch 1 ,mem_used_map 
+6673 afefffff qisolate1 pdata 
+6674 2020e67d branch host_l2cap_malloc_check_buffer_enough_end ,true 
+6675 f9201600 qset1 timeup 
+6676 1d627e00 copy rege ,pdata 
+6677 98408400 iadd temp ,temp 
+6678 18e08e01 increase 1 ,queue 
+6679 1a227e00 copy rega ,pdata 
+667a 98467c00 isub temp ,null 
+667b 2022e67d branch host_l2cap_malloc_check_buffer_enough_end ,zero 
+667c 20216670 branch host_l2cap_malloc_check_buffer_enough_loop ,positive 
+
+host_l2cap_malloc_check_buffer_enough_end:
+667d 18427e00 copy temp ,pdata 
+667e 9a267c00 isub rega ,null 
+667f 24628000 nrtn zero 
+6680 f9201600 qset1 timeup 
+6681 20600000 rtn 
+
+host_l2cap_malloc_into_fifo:
+6682 44b9c00e bpatch patch0e_3 ,mem_patch0e 
+6683 204066a4 call l2cap_malloc_is_fifo_full 
+6684 243a3aba nbranch assert ,blank 
+6685 204066aa call l2cap_malloc_is_fifo_empty 
+6686 203a668b branch host_l2cap_malloc_into_fifo_no_push ,blank 
+6687 6fe4c3f2 fetch 9 ,mem_tx_fifo1 
+6688 67e4c3ef store 9 ,mem_tx_fifo0 
+6689 58000000 setarg 0 
+668a e7e18005 istore 3 ,contw 
+
+host_l2cap_malloc_into_fifo_no_push:
+668b 6160c3f8 storer timeup ,1 ,mem_tx_fifo3_map 
+668c 630143f9 storer regd ,2 ,mem_tx_fifo3_ptr 
+668d 20600000 rtn 
+
+l2cap_malloc_fifo_out:
+668e 44ba400e bpatch patch0e_4 ,mem_patch0e 
+668f 204066ad call l2cap_malloc_fifo_get_first_ptr 
+6690 18c08c01 increase 1 ,contr 
+6691 efe10006 ifetch 2 ,contr 
+6692 20600000 rtn 
+
+l2cap_malloc_free:
+6693 44bac00e bpatch patch0e_5 ,mem_patch0e 
+6694 204066ad call l2cap_malloc_fifo_get_first_ptr 
+6695 18c20a00 copy contr ,contw 
+6696 18c20400 copy contr ,temp 
+6697 58000000 setarg 0 
+6698 e7e18005 istore 3 ,contw 
+6699 20600000 rtn 
+
+l2cap_malloc_discard:
+669a 44bb400e bpatch patch0e_6 ,mem_patch0e 
+669b 204066aa call l2cap_malloc_is_fifo_empty 
+669c 203a3aba branch assert ,blank 
+669d 6fe1c3f5 fetch 3 ,mem_tx_fifo2 
+669e 67e1c3f8 store 3 ,mem_tx_fifo3 
+669f 6fe1c3f2 fetch 3 ,mem_tx_fifo1 
+66a0 67e1c3f5 store 3 ,mem_tx_fifo2 
+66a1 6fe1c3ef fetch 3 ,mem_tx_fifo0 
+66a2 67e1c3f2 store 3 ,mem_tx_fifo1 
+66a3 20600000 rtn 
+
+l2cap_malloc_is_fifo_full:
+66a4 44bbc00e bpatch patch0e_7 ,mem_patch0e 
+66a5 6fe1c3ef fetch 3 ,mem_tx_fifo0 
+66a6 20600000 rtn 
+
+l2cap_malloc_is_fifo_nearly_full:
+66a7 44bc400f bpatch patch0f_0 ,mem_patch0f 
+66a8 6fe1c3f2 fetch 3 ,mem_tx_fifo1 
+66a9 20600000 rtn 
+
+l2cap_malloc_is_fifo_empty:
+66aa 44bcc00f bpatch patch0f_1 ,mem_patch0f 
+66ab 6fe1c3f8 fetch 3 ,mem_tx_fifo3 
+66ac 20600000 rtn 
+
+l2cap_malloc_fifo_get_first_ptr:
+66ad 204066aa call l2cap_malloc_is_fifo_empty 
+66ae 203a66b2 branch l2cap_malloc_fifo_get_first_ptr_empty ,blank 
+66af d8c043ef arg mem_tx_fifo0 ,contr 
+
+l2cap_malloc_free_loop:
+66b0 efe18006 ifetch 3 ,contr 
+66b1 203a66b0 branch l2cap_malloc_free_loop ,blank 
+
+l2cap_malloc_fifo_get_first_ptr_empty:
+66b2 18c08dfd increase -3 ,contr 
+66b3 20600000 rtn 
+
+l2cap_malloc_get_full_map:
+66b4 44bd400f bpatch patch0f_2 ,mem_patch0f 
+66b5 df200004 arg 4 ,loopcnt 
+66b6 d8c043ef arg mem_tx_fifo0_map ,contr 
+66b7 d8400000 arg 0 ,temp 
+
+l2cap_malloc_get_full_map_loop:
+66b8 efe18006 ifetch 3 ,contr 
+66b9 1fe17eff and pdata ,0xff ,pdata 
+66ba 98418400 ior temp ,temp 
+66bb c20066b8 loop l2cap_malloc_get_full_map_loop 
+66bc 6048c3ee storet 1 ,mem_used_map 
+66bd 20600000 rtn 
+
+l2cap_util_pdata_to_contw:
+66be 203a3aba branch assert ,blank 
+66bf 1fe20a00 copy pdata ,contw 
+66c0 20600000 rtn 
+
+l2cap_lpm_save_calc_len:
+66c1 44bdc00f bpatch patch0f_3 ,mem_patch0f 
+66c2 da400000 arg 0 ,regb 
+66c3 da2043ef arg mem_tx_fifo0_map ,rega 
+66c4 1a20a3fe increase -2 ,rega 
+
+l2cap_lpm_save_calc_len_loop:
+66c5 1a20a202 increase 2 ,rega 
+66c6 580043fb setarg mem_tx_fifo_end 
+66c7 9a267c00 isub rega ,null 
+66c8 2022e6d1 branch l2cap_lpm_save_calc_len_end ,zero 
+66c9 efe08011 ifetch 1 ,rega 
+66ca 1a20a201 increase 1 ,rega 
+66cb 203a66c5 branch l2cap_lpm_save_calc_len_loop ,blank 
+66cc e8410011 ifetcht 2 ,rega 
+66cd efe10002 ifetch 2 ,temp 
+66ce 9a40a400 iadd regb ,regb 
+66cf 1a40a404 increase 4 ,regb 
+66d0 202066c5 branch l2cap_lpm_save_calc_len_loop 
+
+l2cap_lpm_save_calc_len_end:
+66d1 1a427e00 copy regb ,pdata 
+66d2 20600000 rtn 
+
+l2cap_lpm_get_wake_lock:
+66d3 d8e0000c arg wake_lock_l2cap_tx ,queue 
+66d4 20203c54 branch lpm_get_wake_lock 
+
+l2cap_lpm_put_wake_lock:
+66d5 d8e0000c arg wake_lock_l2cap_tx ,queue 
+66d6 20203c58 branch lpm_put_wake_lock 
+
+l2cap_lpm_save_txbuf:
+66d7 204066b4 call l2cap_malloc_get_full_map 
+66d8 6fe0c3ee fetch 1 ,mem_used_map 
+66d9 207a0000 rtn blank 
+66da 204066c1 call l2cap_lpm_save_calc_len 
+66db d8400100 arg l2cap_lpm_txbuf_len ,temp 
+66dc 98467c00 isub temp ,null 
+66dd 202166d3 branch l2cap_lpm_get_wake_lock ,positive 
+66de 204066d5 call l2cap_lpm_put_wake_lock 
+66df 6fe143fb fetch 2 ,mem_l2cap_lpm_txbuf_ptr 
+66e0 18c20a00 copy contr ,contw 
+66e1 da2043ef arg mem_tx_fifo0 ,rega 
+
+l2cap_lpm_save_txbuf_loop:
+66e2 580043fb setarg mem_tx_fifo_end 
+66e3 9a267c00 isub rega ,null 
+66e4 20628000 rtn zero 
+66e5 efe08011 ifetch 1 ,rega 
+66e6 1a20a201 increase 1 ,rega 
+66e7 243a66eb nbranch l2cap_lpm_save_txbuf_nempty ,blank 
+66e8 e7e10005 istore 2 ,contw 
+66e9 1a20a202 increase 2 ,rega 
+66ea 202066e2 branch l2cap_lpm_save_txbuf_loop 
+
+l2cap_lpm_save_txbuf_nempty:
+66eb efe10011 ifetch 2 ,rega 
+66ec 1a20a202 increase 2 ,rega 
+66ed 1fe20c00 copy pdata ,contr 
+66ee efe10006 ifetch 2 ,contr 
+66ef e7e10005 istore 2 ,contw 
+66f0 1fe27200 copy pdata ,loopcnt 
+66f1 1f20f202 increase 2 ,loopcnt 
+66f2 20407548 call memcpy 
+66f3 202066e2 branch l2cap_lpm_save_txbuf_loop 
+
+l2cap_lpm_load_txbuf:
+66f4 204066b4 call l2cap_malloc_get_full_map 
+66f5 6fe0c3ee fetch 1 ,mem_used_map 
+66f6 207a0000 rtn blank 
+66f7 da2043f0 arg mem_tx_fifo0_ptr ,rega 
+66f8 1a20a3fd increase -3 ,rega 
+66f9 18c20a00 copy contr ,contw 
+66fa 6fe143fb fetch 2 ,mem_l2cap_lpm_txbuf_ptr 
+66fb 18a20c00 copy contw ,contr 
+
+l2cap_lpm_load_txbuf_loop:
+66fc 1a20a203 increase 3 ,rega 
+66fd 580043fc setarg mem_tx_fifo_end + 1 
+66fe 9a267c00 isub rega ,null 
+66ff 20628000 rtn zero 
+6700 efe10006 ifetch 2 ,contr 
+6701 203a66fc branch l2cap_lpm_load_txbuf_loop ,blank 
+6702 1fe0fe04 increase 4 ,pdata 
+6703 1fe27200 copy pdata ,loopcnt 
+6704 18c22400 copy contr ,regb 
+6705 efe10011 ifetch 2 ,rega 
+6706 1fe20a00 copy pdata ,contw 
+6707 1a420c00 copy regb ,contr 
+6708 18c08dfe increase -2 ,contr 
+6709 20407548 call memcpy 
+670a 202066fc branch l2cap_lpm_load_txbuf_loop 
+
+twspi_reset:
+670b 44be400f bpatch patch0f_4 ,mem_patch0f 
+670c 1fe17eff and_into 0xff ,pdata 
+670d 1fe67c0c sub pdata ,gpio_number + -1 ,null 
+670e 24213aba nbranch assert ,positive 
+670f d8a08070 arg core_gpio_conf ,contw 
+
+twspi_reset_next:
+6710 98a08a00 iadd contw ,contw 
+6711 18a22200 copy contw ,rega 
+6712 d840003e arg gpcfg_output_low ,temp 
+6713 e0408005 istoret 1 ,contw 
+6714 2040671a call twspi_disable 
+6715 2000001e nop 30 
+6716 1a220a00 copy rega ,contw 
+6717 d840003f arg gpcfg_output_high ,temp 
+6718 e0408005 istoret 1 ,contw 
+6719 2020671e branch twspi_enable 
+
+twspi_disable:
+671a 6ff08081 fetch 1 ,core_spid_delay 
+671b 1fe17e7f and_into 0x7f ,pdata 
+671c 67f08081 store 1 ,core_spid_delay 
+671d 20600000 rtn 
+
+twspi_enable:
+671e 6ff08081 fetch 1 ,core_spid_delay 
+671f 1fe1fe80 or_into 0x80 ,pdata 
+6720 67f08081 store 1 ,core_spid_delay 
+6721 20600000 rtn 
+
+twspi_write:
+6722 20206929 branch spid_write_reg 
+
+twspi_read:
+6723 20206930 branch spid_read_reg 
+
+aes_disable:
+6724 6ff0806f fetch 1 ,core_aes_en 
+6725 1fe17efd and_into 0xfd ,pdata 
+6726 67f0806f store 1 ,core_aes_en 
+6727 20600000 rtn 
+
+read_function_aes:
+6728 2434672c nbranch read_function ,user 
+6729 6ff0806f fetch 1 ,core_aes_en 
+672a 1fe1fe02 or_into 0x2 ,pdata 
+672b 67f0806f store 1 ,core_aes_en 
+
+read_function:
+672c 18427c00 copy temp ,null 
+672d 2022e72f branch read_fuction_zero ,zero 
+672e 1a627a00 copy regc ,pc 
+
+read_fuction_zero:
+672f 2fcc0000 isolate0 0 ,null 
+6730 2020681b branch set_ucode_status 
+
+get_block_header:
+6731 18000404 force 4 ,temp 
+
+get_block_header0:
+6732 da2001c4 arg mem_ucode_buf ,rega 
+6733 20406724 call aes_disable 
+6734 2040672c call read_function 
+6735 da2055aa arg 0x55aa ,rega 
+6736 6fe101c4 fetch 2 ,mem_ucode_buf 
+6737 e8410006 ifetcht 2 ,contr 
+6738 9a267c00 isub rega ,null 
+6739 20600000 rtn 
+
+read_first_block:
+673a 2054674c call load_aes_reinit ,user 
+673b d8400002 arg 2 ,temp 
+673c da2001ca arg mem_ucode_ptr ,rega 
+673d 2040672c call read_function 
+673e 6fe101ca fetch 2 ,mem_ucode_ptr 
+673f 67e101bd store 2 ,mem_addr_mi 
+6740 20546742 call get_iv ,user 
+6741 20600000 rtn 
+
+get_iv:
+6742 d8400010 arg 16 ,temp 
+6743 da2001cc arg mem_ucode_keybuf ,rega 
+6744 20406724 call aes_disable 
+6745 2040672c call read_function 
+
+set_iv:
+6746 d8c001cc arg mem_ucode_keybuf ,contr 
+6747 df200010 arg 16 ,loopcnt 
+6748 20406f8f call aes_load_data 
+6749 20406f16 call aes_init 
+674a 20406fab call aes_clear_data 
+674b 20206f10 branch do_aes_cbc 
+
+load_aes_reinit:
+674c 70802300 jam 0x0 ,core_ucode_ctrl 
+674d 20406724 call aes_disable 
+674e 20206fab branch aes_clear_data 
+
+load_storage:
+674f 58000000 setarg 0 
+6750 67e104ed store 2 ,mem_queue 
+6751 7856fc00 disable match 
+6752 20406731 call get_block_header 
+6753 24628000 nrtn zero 
+6754 7836fc00 enable match 
+6755 70802380 jam 0x80 ,core_ucode_ctrl 
+6756 70802200 jam 0 ,core_ucode_hi 
+6757 70802400 jam 0 ,core_ucode_low 
+6758 da208025 arg core_ucode_data ,rega 
+6759 20406728 call read_function_aes 
+675a 70802300 jam 0x0 ,core_ucode_ctrl 
+675b 6fe081ba fetch 1 ,mem_ucode_status 
+675c c4000000 rtnbit0 0 
+
+load_storage_loop:
+675d d8400006 arg 6 ,temp 
+675e 20406732 call get_block_header0 
+675f 2422e76e nbranch load_data_checksum_compare ,zero 
+6760 efe10006 ifetch 2 ,contr 
+6761 98002200 iforce rega 
+6762 2040672c call read_function 
+6763 20406765 call load_data_checksum_calc 
+6764 2020675d branch load_storage_loop 
+
+load_data_checksum_calc:
+6765 6fe104ed fetch 2 ,mem_queue 
+6766 df200006 arg 6 ,loopcnt 
+6767 d8c001c4 arg mem_ucode_buf ,contr 
+6768 20407648 call cal_sum 
+6769 6f2101c6 fetchr loopcnt ,2 ,mem_ucode_len 
+676a 1a220c00 copy rega ,contr 
+676b 20407648 call cal_sum 
+676c 67e104ed store 2 ,mem_queue 
+676d 20600000 rtn 
+
+load_data_checksum_compare:
+676e 6fe081de fetch 1 ,mem_load_check_sum 
+676f c02d677c beq 0x5a ,load_data_checksum_ok 
+6770 da20aa55 arg 0xaa55 ,rega 
+6771 6fe101c4 fetch 2 ,mem_ucode_buf 
+6772 9a267c00 isub rega ,null 
+6773 2422e77e nbranch load_data_checksum_compare_fail ,zero 
+6774 da2055aa arg 0x55aa ,rega 
+6775 6fe101c6 fetch 2 ,mem_ucode_len 
+6776 9a267c00 isub rega ,null 
+6777 2422e77e nbranch load_data_checksum_compare_fail ,zero 
+6778 6fe101c8 fetch 2 ,mem_sched_addr 
+6779 684904ed fetcht 2 ,mem_queue 
+677a 98467c00 isub temp ,null 
+677b 2422e77e nbranch load_data_checksum_compare_fail ,zero 
+
+load_data_checksum_ok:
+677c 7920220f set1 15 ,rega 
+677d 2020672f branch read_fuction_zero 
+
+load_data_checksum_compare_fail:
+677e 7001ba00 jam 0 ,mem_ucode_status 
+677f 20600000 rtn 
+
+reload_eeprom:
+6780 204075e3 call clean_mem 
+6781 58001000 setarg 0x1000 
+6782 67e101bd store 2 ,mem_addr_mi 
+6783 da606a4c arg iicd_read_eep ,regc 
+6784 df200002 arg 2 ,loopcnt 
+
+reload_eeprom_loop:
+6785 20406731 call get_block_header 
+6786 24628000 nrtn zero 
+6787 6fe101bd fetch 2 ,mem_addr_mi 
+6788 1ff0fe00 byteswap pdata ,pdata 
+6789 9840fe00 iadd temp ,pdata 
+678a 1ff0fe00 byteswap pdata ,pdata 
+678b 67e101bd store 2 ,mem_addr_mi 
+678c c2006785 loop reload_eeprom_loop 
+678d 2020675d branch load_storage_loop 
+
+loadcode_lock:
+678e 6ff1011e fetch 2 ,core_ucode_flag 
+678f 67e101b8 store 2 ,mem_ucode_device_flag 
+6790 793ffe0e set0 lpmreg_ice_mode_bit ,pdata 
+6791 247a0000 nrtn blank 
+6792 580007d0 setarg otp_offset_device_flag 
+6793 da2001b8 arg mem_ucode_device_flag ,rega 
+6794 d8400002 arg 2 ,temp 
+6795 204068b0 call otpd_read_data 
+6796 6fe081ca fetch 1 ,mem_ucode_ptr 
+6797 1ff18400 rshift4 pdata ,temp 
+6798 6fe081b8 fetch 1 ,mem_ucode_device_flag 
+6799 1ff27e00 lshift4 pdata ,pdata 
+679a 9841fe00 ior temp ,pdata 
+679b 67e081b8 store 1 ,mem_ucode_device_flag 
+679c 202068c6 branch app_lpm_peripheral_lock_check 
+
+loadcode:
+679d 70805025 jam 0x25 ,core_clkoff 
+679e 204075e3 call clean_mem 
+679f 78547c00 disable user 
+67a0 7001ba00 jam 0 ,mem_ucode_status 
+67a1 2040683d call otp_read_pwr_on 
+67a2 204068be call app_read_efuse_app_vsel 
+67a3 58000000 setarg otp_offset_ucode_flag 
+67a4 da2001ca arg mem_ucode_ptr ,rega 
+67a5 d8400002 arg 2 ,temp 
+67a6 204068b0 call otpd_read_data 
+67a7 2040678e call loadcode_lock 
+67a8 580007d3 setarg otp_offset_loadcode_delay 
+67a9 da2001dd arg mem_load_delay ,rega 
+67aa d8400002 arg 2 ,temp 
+67ab 204068b0 call otpd_read_data 
+67ac 6fe081b8 fetch 1 ,mem_ucode_device_flag 
+67ad c301e7b7 bbit0 otp_uflag_aes ,loadcode_otp 
+67ae 580007f0 setarg otp_offset_ucode_key 
+67af da2001cc arg mem_ucode_keybuf ,rega 
+67b0 d8400010 arg 16 ,temp 
+67b1 204068b0 call otpd_read_data 
+67b2 70800608 jam lock_otp ,core_misc_ctrl 
+67b3 7920002b set1 mark_otp_encrypt ,mark 
+67b4 d8c001cc arg mem_ucode_keybuf ,contr 
+67b5 20406f9b call load_key 
+67b6 78347c00 enable user 
+
+loadcode_otp:
+67b7 70411500 jam 0 ,mem_loadcode_times 
+
+loadcode_otp_loop:
+67b8 2040680c call loadcode_timeout 
+67b9 24216818 nbranch loadcode_error ,positive 
+67ba 2054674c call load_aes_reinit ,user 
+67bb 6fe101ca fetch 2 ,mem_ucode_ptr 
+67bc 1ff0fe00 byteswap pdata ,pdata 
+67bd d84007ff arg 0x7ff ,temp 
+67be 98417e00 iand temp ,pdata 
+67bf 2022e7c9 branch loadcode_iic ,zero 
+67c0 20406866 call otp_set_addr 
+67c1 da6068b4 arg otpd_read_code ,regc 
+67c2 20546742 call get_iv ,user 
+67c3 2040674f call load_storage 
+67c4 2436e7c9 nbranch loadcode_iic ,match 
+67c5 6fe081ba fetch 1 ,mem_ucode_status 
+67c6 2fe00603 compare 3 ,pdata ,3 
+67c7 2420e7b8 nbranch loadcode_otp_loop ,true 
+67c8 204067d7 call run_otp_code 
+
+loadcode_iic:
+67c9 2040685a call otp_pwr_off 
+67ca 70411500 jam 0 ,mem_loadcode_times 
+
+loadcode_iic_loop:
+67cb 2040680c call loadcode_timeout 
+67cc 24216818 nbranch loadcode_error ,positive 
+67cd 204067fe call iicd_load_gpio_init 
+67ce 20406a29 call clear_eeprom_size_2k 
+67cf 6fe081b8 fetch 1 ,mem_ucode_device_flag 
+67d0 c28167e3 bbit1 otp_uflag_skip_eep ,loadcode_spi 
+67d1 20406806 call loadcode_iic_by_eeprom 
+67d2 2436e7da nbranch loadcode_iic_eeprom_2k ,match 
+67d3 6fe081ba fetch 1 ,mem_ucode_status 
+67d4 2fe00603 compare 3 ,pdata ,3 
+67d5 2420e7cb nbranch loadcode_iic_loop ,true 
+67d6 202067e3 branch loadcode_spi 
+
+run_otp_code:
+67d7 580001ff setarg 0x1ff 
+67d8 dfa00000 arg 0 ,pc 
+67d9 20600000 rtn 
+
+loadcode_iic_eeprom_2k:
+67da 20406a26 call set_eeprom_size_2k 
+67db 6fe081b8 fetch 1 ,mem_ucode_device_flag 
+67dc c28167e3 bbit1 otp_uflag_skip_eep ,loadcode_spi 
+67dd 20406806 call loadcode_iic_by_eeprom 
+67de 2436e7e3 nbranch loadcode_spi ,match 
+67df 6fe081ba fetch 1 ,mem_ucode_status 
+67e0 2fe00603 compare 3 ,pdata ,3 
+67e1 2420e7cb nbranch loadcode_iic_loop ,true 
+67e2 202067f3 branch loadcode_hci 
+
+loadcode_spi:
+67e3 70411500 jam 0 ,mem_loadcode_times 
+
+loadcode_spi_loop:
+67e4 2040680c call loadcode_timeout 
+67e5 24216818 nbranch loadcode_error ,positive 
+67e6 6fe081b8 fetch 1 ,mem_ucode_device_flag 
+67e7 c280e7f3 bbit1 otp_uflag_skip_flash ,loadcode_hci 
+67e8 20406979 call spid_init_flash 
+67e9 200000c8 nop 200 
+67ea 20406988 call spid_flash_release_form_powerdown 
+67eb 20000064 nop 100 
+67ec da6069bc arg spid_load_flash ,regc 
+67ed 2040673a call read_first_block 
+67ee 2040674f call load_storage 
+67ef 2436e7f3 nbranch loadcode_hci ,match 
+67f0 6fe081ba fetch 1 ,mem_ucode_status 
+67f1 2fe00603 compare 3 ,pdata ,3 
+67f2 2420e7e4 nbranch loadcode_spi_loop ,true 
+
+loadcode_hci:
+67f3 204067f7 call clear_key_buf 
+67f4 6fe081b8 fetch 1 ,mem_ucode_device_flag 
+67f5 c4000000 rtnbit0 otp_uflag_hci 
+67f6 20206506 branch hci_init 
+
+clear_key_buf:
+67f7 58000000 setarg 0 
+67f8 67e401cc store 8 ,mem_ucode_keybuf 
+67f9 67e401d4 store 8 ,mem_ucode_keybuf + 8 
+67fa 18007004 force regidx_key ,regext_index 
+67fb 20406fac call aes_clear 
+67fc 70805021 jam 0x21 ,core_clkoff 
+67fd 20600000 rtn 
+
+iicd_load_gpio_init:
+67fe 6fe0c3d7 fetch 1 ,mem_eeprom_sda_gpio 
+67ff 6848c3d6 fetcht 1 ,mem_eeprom_scl_gpio 
+6800 98467c00 isub temp ,null 
+6801 2422ea0f nbranch iicd_read_init_pin ,zero 
+
+iicd_load_default_gpio:
+6802 7043d502 jam 2 ,mem_eeprom_wp_gpio 
+6803 7043d601 jam 1 ,mem_eeprom_scl_gpio 
+6804 7043d700 jam 0 ,mem_eeprom_sda_gpio 
+6805 20206a0f branch iicd_read_init_pin 
+
+loadcode_iic_by_eeprom:
+6806 58000000 setarg 0x0 
+6807 67e101bd store 2 ,mem_addr_mi 
+6808 da606a4c arg iicd_read_eep ,regc 
+6809 204069f8 call iic_init_600khz 
+680a 2040673a call read_first_block 
+680b 2020674f branch load_storage 
+
+loadcode_timeout:
+680c 20406812 call loadcode_error_delay 
+680d 6fe0c115 fetch 1 ,mem_loadcode_times 
+680e 1fe0fe01 increase 1 ,pdata 
+680f 1fe67c03 sub pdata ,3 ,null 
+6810 67e0c115 store 1 ,mem_loadcode_times 
+6811 20600000 rtn 
+
+loadcode_error_delay:
+6812 6fe0c115 fetch 1 ,mem_loadcode_times 
+6813 207a0000 rtn blank 
+6814 6fe081dd fetch 1 ,mem_load_delay 
+6815 207a0000 rtn blank 
+6816 1fe27200 copy pdata ,loopcnt 
+6817 202074fc branch delay_ms_wait 
+
+loadcode_error:
+6818 204067f7 call clear_key_buf 
+6819 204075ec call ice_break 
+681a 20600000 rtn 
+
+set_ucode_status:
+681b 6fe081ba fetch 1 ,mem_ucode_status 
+681c 1fe3fe00 lshift pdata ,pdata 
+681d 7920fe00 setflag true ,0 ,pdata 
+681e 2a2c000f isolate0 15 ,rega 
+681f 20608000 rtn true 
+6820 67e081ba store 1 ,mem_ucode_status 
+6821 20600000 rtn 
+
+decrypt_code:
+6822 6ff0806f fetch 1 ,core_aes_en 
+6823 c4008000 rtnbit0 1 
+6824 20206828 branch decrypt_code_skip 
+
+decrypt_code_loop:
+6825 6ff08128 fetch 1 ,core_dma_status 
+6826 afefffff qisolate1 pdata 
+6827 20608000 rtn true 
+
+decrypt_code_skip:
+6828 6ff08108 fetch 1 ,core_misc_status 
+6829 c300e825 bbit0 1 ,decrypt_code_loop 
+682a 20406f10 call do_aes_cbc 
+682b 20206825 branch decrypt_code_loop 
+
+load_ucode:
+682c 6fe140e9 fetch 2 ,mem_patch_ptr 
+682d 207a0000 rtn blank 
+682e 70802380 jam 0x80 ,core_ucode_ctrl 
+682f 70802200 jam 0 ,core_ucode_hi 
+6830 70802400 jam 0 ,core_ucode_low 
+6831 684940eb fetcht 2 ,mem_patch_len 
+6832 184bf200 lshift2 temp ,loopcnt 
+6833 98000c00 iforce contr 
+
+load_ucode_loop:
+6834 efe08006 ifetch 1 ,contr 
+6835 67f08025 store 1 ,core_ucode_data 
+6836 c2006834 loop load_ucode_loop 
+6837 70802300 jam 0x0 ,core_ucode_ctrl 
+6838 20600000 rtn 
+
+otp_prog_pwr_on:
+6839 708aa004 jam 0x4 ,rfen_chgpump 
+683a 708aa133 jam 0x33 ,rfen_chgpump_ctrl1 
+683b 708aa201 jam 0x1 ,rfen_chgpump_ctrl2 
+683c 20206840 branch otp_pwr_on 
+
+otp_read_pwr_on:
+683d 708aa00c jam 0xc ,rfen_chgpump 
+683e 708aa1fb jam 0xfb ,rfen_chgpump_ctrl1 
+683f 708aa203 jam 0x3 ,rfen_chgpump_ctrl2 
+
+otp_pwr_on:
+6840 67e104d4 store 2 ,mem_timeup 
+6841 44bec00f bpatch patch0f_5 ,mem_patch0f 
+6842 708a01ff jam 0xff ,core_clkpll_ctrl1 
+6843 6ff08a0b fetch 1 ,core_rf_ldo_en1 
+6844 67e084d6 store 1 ,mem_timeup + 2 
+6845 1fe1fe04 or_into 0x4 ,pdata 
+6846 67f08a0b store 1 ,core_rf_ldo_en1 
+6847 6ff08a13 fetch 1 ,core_rf_ldo_cfg7 
+6848 67e084d7 store 1 ,mem_timeup + 3 
+6849 708a1311 jam 0x11 ,core_rf_ldo_cfg7 
+684a 200003e8 nop 1000 
+684b 6ff08a02 fetch 1 ,core_clkpll_ctrl2 
+684c 1fe1fe01 or_into 0x1 ,pdata 
+684d 67f08a02 store 1 ,core_clkpll_ctrl2 
+684e 708a0003 jam 0x03 ,core_clkpll_ctrl0 
+684f 44bf400f bpatch patch0f_6 ,mem_patch0f 
+6850 6ff08aa0 fetch 1 ,rfen_chgpump 
+6851 1fe1fed0 or_into 0xd0 ,pdata 
+6852 67f08aa0 store 1 ,rfen_chgpump 
+6853 20001770 nop 6000 
+6854 6ff08aa0 fetch 1 ,rfen_chgpump 
+6855 1fe1fe20 or_into 0x20 ,pdata 
+6856 67f08aa0 store 1 ,rfen_chgpump 
+6857 20002ee0 nop 12000 
+6858 6fe104d4 fetch 2 ,mem_timeup 
+6859 20600000 rtn 
+
+otp_pwr_off:
+685a 44bfc00f bpatch patch0f_7 ,mem_patch0f 
+685b 708aa004 jam 0x4 ,rfen_chgpump 
+685c 708aa143 jam 0x43 ,rfen_chgpump_ctrl1 
+685d 708aa201 jam 0x1 ,rfen_chgpump_ctrl2 
+685e 6ff08a02 fetch 1 ,core_clkpll_ctrl2 
+685f 1fe17efe and_into 0xfe ,pdata 
+6860 67f08a02 store 1 ,core_clkpll_ctrl2 
+6861 6fe084d6 fetch 1 ,mem_timeup + 2 
+6862 67f08a0b store 1 ,core_rf_ldo_en1 
+6863 6fe084d7 fetch 1 ,mem_timeup + 3 
+6864 67f08a13 store 1 ,core_rf_ldo_cfg7 
+6865 20600000 rtn 
+
+otp_set_addr:
+6866 1fe9fe00 lshift3 pdata ,pdata 
+6867 67f10045 store 2 ,core_otp_addr 
+6868 70804b00 jam 0 ,core_otpd_ctrl 
+6869 20600000 rtn 
+
+otp_write:
+686a 20406839 call otp_prog_pwr_on 
+686b 20406866 call otp_set_addr 
+686c 20406898 call otp_ce 
+
+otp_program:
+686d e8408011 ifetcht 1 ,rega 
+686e 1a20a201 increase 1 ,rega 
+686f 18000e00 force 0 ,queue 
+
+otp_program_bit:
+6870 a84c0000 qisolate0 temp 
+6871 2020e88f branch otp_skip_0 ,true 
+6872 6ff08046 fetch 1 ,core_otp_din 
+6873 79207e06 set1 6 ,pdata 
+6874 79207e07 set1 7 ,pdata 
+6875 67f08046 store 1 ,core_otp_din 
+6876 70804702 jam 0x02 ,core_otp_ctrl 
+6877 70804782 jam 0x82 ,core_otp_ctrl 
+6878 793ffe07 set0 7 ,pdata 
+6879 67f08046 store 1 ,core_otp_din 
+687a 7080478a jam 0x8a ,core_otp_ctrl 
+687b 2000000b nop 11 
+687c 708047ca jam 0xca ,core_otp_ctrl 
+687d 20000021 nop 33 
+687e 7080474a jam 0x4a ,core_otp_ctrl 
+687f 2000002c nop 44 
+6880 708047ca jam 0xca ,core_otp_ctrl 
+6881 20000016 nop 22 
+6882 7080478a jam 0x8a ,core_otp_ctrl 
+6883 20000021 nop 33 
+6884 70804782 jam 0x82 ,core_otp_ctrl 
+6885 20000001 nop 1 
+6886 70804792 jam 0x92 ,core_otp_ctrl 
+6887 2000000a nop 10 
+6888 708047b2 jam 0xb2 ,core_otp_ctrl 
+6889 6ff08007 fetch 1 ,core_otp_rdata 
+688a 70804792 jam 0x92 ,core_otp_ctrl 
+688b 20000001 nop 1 
+688c 70804782 jam 0x82 ,core_otp_ctrl 
+688d afec0000 qisolate0 pdata 
+688e 2020e870 branch otp_program_bit ,true 
+
+otp_skip_0:
+688f 6ff10045 fetch 2 ,core_otp_addr 
+6890 1fe0fe01 increase 1 ,pdata 
+6891 67f10045 store 2 ,core_otp_addr 
+6892 18e08e01 increase 1 ,queue 
+6893 28e01e08 compare 8 ,queue ,0xf 
+6894 2420e870 nbranch otp_program_bit ,true 
+6895 c200686d loop otp_program 
+6896 70804783 jam 0x83 ,core_otp_ctrl 
+6897 2020685a branch otp_pwr_off 
+
+otp_ce:
+6898 70804782 jam 0x82 ,core_otp_ctrl 
+6899 2000000c nop 12 
+689a 70804780 jam 0x80 ,core_otp_ctrl 
+689b 70804782 jam 0x82 ,core_otp_ctrl 
+689c 20000096 nop 150 
+689d 20600000 rtn 
+
+otpd_read_init:
+689e 20406898 call otp_ce 
+689f 708047a2 jam 0xa2 ,core_otp_ctrl 
+68a0 1a227e00 deposit rega 
+68a1 67f10048 store 2 ,core_otpd_addr 
+68a2 7920040b set1 11 ,temp 
+68a3 2fec000f isolate0 15 ,pdata 
+68a4 7920840f setflag true ,15 ,temp 
+68a5 6059004a storet 2 ,core_otpd_len 
+68a6 70800701 jam otpd_start ,core_otp_rdata 
+68a7 20600000 rtn 
+
+otpd_wait_end:
+68a8 6ff08128 fetch 1 ,core_dma_status 
+68a9 c300e8a8 bbit0 otpd_done ,otpd_wait_end 
+68aa 70804783 jam 0x83 ,core_otp_ctrl 
+68ab 20600000 rtn 
+
+otpd_read_data_with_pwr_operation:
+68ac 44c04010 bpatch patch10_0 ,mem_patch10 
+68ad 2040683d call otp_read_pwr_on 
+68ae 204068b0 call otpd_read_data 
+68af 2020685a branch otp_pwr_off 
+
+otpd_read_data:
+68b0 20406866 call otp_set_addr 
+68b1 2040689e call otpd_read_init 
+68b2 204068a8 call otpd_wait_end 
+68b3 20600000 rtn 
+
+otpd_read_code:
+68b4 2040683d call otp_read_pwr_on 
+68b5 6ff10122 fetch 2 ,core_current_otp_addr 
+68b6 67f10045 store 2 ,core_otp_addr 
+68b7 2040689e call otpd_read_init 
+68b8 d8e00001 arg otpd_done ,queue 
+68b9 20406822 call decrypt_code 
+68ba 204068a8 call otpd_wait_end 
+68bb 2feffe00 isolate1 otpd_crcok ,pdata 
+68bc 2040681b call set_ucode_status 
+68bd 2020685a branch otp_pwr_off 
+
+app_read_efuse_app_vsel:
+68be 580007d2 setarg otp_offset_app_vdd_sel 
+68bf da2040cc arg mem_lpm_ctrl3_app_vsel ,rega 
+68c0 d8400001 arg 1 ,temp 
+68c1 204068b0 call otpd_read_data 
+68c2 6fe0c0cc fetch 1 ,mem_lpm_ctrl3_app_vsel 
+68c3 243a68c5 nbranch app_set_app_vsel ,blank 
+68c4 7040cc04 jam 0x04 ,mem_lpm_ctrl3_app_vsel 
+
+app_set_app_vsel:
+68c5 20203c41 branch lpm_write_sel_vdd 
+
+app_lpm_peripheral_lock_check:
+68c6 6fe101b8 fetch 2 ,mem_ucode_device_flag 
+68c7 1ff1fe00 rshift4 pdata ,pdata 
+68c8 207a0000 rtn blank 
+68c9 6fe081b8 fetch 1 ,mem_ucode_device_flag 
+68ca 1ff1fe00 rshift4 pdata ,pdata 
+68cb c00568d4 beq dvc_op_module ,app_lpm_peripheral_lock_module 
+68cc c00268d6 beq dvc_op_dongle ,app_lpm_peripheral_lock_dongle 
+68cd c005e8db beq dvc_op_light ,app_lpm_peripheral_lock_light 
+68ce c00468df beq dvc_op_mouse ,app_lpm_peripheral_lock_mouse 
+68cf c004e8e3 beq dvc_op_shutter ,app_lpm_peripheral_lock_shutter 
+68d0 c00668d4 beq dvc_op_hci_boot ,app_lpm_peripheral_lock_hciboot 
+68d1 c006e8e7 beq dvc_op_remote_car ,app_lpm_peripheral_lock_remote_car 
+68d2 c00768e7 beq dvc_op_car ,app_lpm_peripheral_lock_car 
+68d3 20206901 branch app_lpm_mpu_lock_24g_ble 
+
+app_lpm_peripheral_lock_module:
+
+app_lpm_peripheral_lock_hciboot:
+68d4 204068fe call app_lpm_mpu_lock_24g 
+68d5 20206906 branch lpm_write_lock 
+
+app_lpm_peripheral_lock_dongle:
+68d6 dfe053d2 arg module_init ,pdata 
+68d7 d84063c1 arg ui_soft_switch_power_off ,temp 
+68d8 204068f1 call app_mpu_s0_lock 
+68d9 20206906 branch lpm_write_lock 
+
+app_lpm_peripheral_lock_test:
+68da 20206906 branch lpm_write_lock 
+
+app_lpm_peripheral_lock_light:
+68db dfe04e4d arg car_init ,pdata 
+68dc d84063d3 arg shutter_default_init ,temp 
+68dd 204068f1 call app_mpu_s0_lock 
+68de 20206906 branch lpm_write_lock 
+
+app_lpm_peripheral_lock_mouse:
+68df dfe04e4d arg car_init ,pdata 
+68e0 d84056e9 arg module_set_state ,temp 
+68e1 204068f1 call app_mpu_s0_lock 
+68e2 20206906 branch lpm_write_lock 
+
+app_lpm_peripheral_lock_shutter:
+68e3 dfe04e4d arg car_init ,pdata 
+68e4 d8405202 arg remote_car_moto_data_enable_user ,temp 
+68e5 204068f1 call app_mpu_s0_lock 
+68e6 20206906 branch lpm_write_lock 
+
+app_lpm_peripheral_lock_remote_car:
+
+app_lpm_peripheral_lock_car:
+68e7 dfe05249 arg dongle_init ,pdata 
+68e8 d84063c1 arg ui_soft_switch_power_off ,temp 
+68e9 204068f1 call app_mpu_s0_lock 
+68ea 20206906 branch lpm_write_lock 
+
+app_lpm_peripheral_lock_antilost:
+68eb dfe04e4d arg car_init ,pdata 
+68ec d84063c1 arg ui_soft_switch_power_off ,temp 
+68ed 204068f1 call app_mpu_s0_lock 
+68ee 20206906 branch lpm_write_lock 
+
+app_lpm_mpu_lock_module:
+68ef dfe053d2 arg module_init ,pdata 
+68f0 d84056e9 arg module_set_state ,temp 
+
+app_mpu_s0_lock:
+68f1 18500400 lshift16 temp ,temp 
+68f2 9841fe00 ior temp ,pdata 
+68f3 67f2004c store 4 ,core_lpm_reg 
+68f4 2020691b branch lpm_write2_mpu_s0 
+
+app_lpm_mpu_lock_app:
+68f5 dfe04e4d arg car_init ,pdata 
+68f6 d84063c1 arg ui_soft_switch_power_off ,temp 
+68f7 202068f1 branch app_mpu_s0_lock 
+
+app_lpm_mpu_lock_ble:
+68f8 dfe04362 arg le_parse_att ,pdata 
+68f9 d84047c2 arg le_send_ll_one_lenth ,temp 
+
+app_mpu_s1_lock:
+68fa 18500400 lshift16 temp ,temp 
+68fb 9841fe00 ior temp ,pdata 
+68fc 67f2004c store 4 ,core_lpm_reg 
+68fd 2020691d branch lpm_write2_mpu_s1 
+
+app_lpm_mpu_lock_24g:
+68fe dfe047c7 arg g24_prep ,pdata 
+68ff d840492b arg g24_enable_1m ,temp 
+6900 202068fa branch app_mpu_s1_lock 
+
+app_lpm_mpu_lock_24g_ble:
+6901 204068fe call app_lpm_mpu_lock_24g 
+6902 dfe04362 arg le_parse_att ,pdata 
+6903 d84047c2 arg le_send_ll_one_lenth ,temp 
+6904 204068f1 call app_mpu_s0_lock 
+6905 20206906 branch lpm_write_lock 
+
+lpm_write_lock:
+6906 6fe101b8 fetch 2 ,mem_ucode_device_flag 
+6907 79207e0d set1 lpmreg_rom_lock_bit ,pdata 
+6908 79207e0e set1 lpmreg_ice_mode_bit ,pdata 
+6909 67f2004c store 4 ,core_lpm_reg 
+690a 2040690d call lpm_write2_ctrl_option 
+690b 70801108 jam 8 ,core_encrypt 
+690c 20600000 rtn 
+
+lpm_write2_ctrl_option:
+690d 58000002 setarg lpmreg2_sel_option 
+
+lpm_write2:
+690e 37d98200 until null ,lpo_edge 
+690f 67f08012 store 1 ,core_lpm_wr2 
+6910 37d98200 until null ,lpo_edge 
+6911 37d98200 until null ,lpo_edge 
+6912 20600000 rtn 
+
+lpm_write_ice_disable:
+6913 6ff1011e fetch 2 ,core_ucode_flag 
+6914 793ffe0e set0 lpmreg_ice_mode_bit ,pdata 
+6915 67f2004c store 4 ,core_lpm_reg 
+6916 2020690d branch lpm_write2_ctrl_option 
+
+lpm_write_ice_enable:
+6917 6ff1011e fetch 2 ,core_ucode_flag 
+6918 79207e0e set1 lpmreg_ice_mode_bit ,pdata 
+6919 67f2004c store 4 ,core_lpm_reg 
+691a 2020690d branch lpm_write2_ctrl_option 
+
+lpm_write2_mpu_s0:
+691b 58000004 setarg lpmreg2_sel_mpu_s0 
+691c 2020690e branch lpm_write2 
+
+lpm_write2_mpu_s1:
+691d 58000008 setarg lpmreg2_sel_mpu_s1 
+691e 2020690e branch lpm_write2 
+
+spid_init:
+691f 44c0c010 bpatch patch10_1 ,mem_patch10 
+
+spid_init_common:
+6920 6fe0c3aa fetch 1 ,mem_spi_init_clk 
+6921 67f08080 store 1 ,core_spid_ctrl 
+6922 6fe0c3ab fetch 1 ,mem_spi_init_delay_time 
+6923 67f08081 store 1 ,core_spid_delay 
+6924 580001bb setarg mem_spid_tbuf 
+6925 67f10084 store 2 ,core_spid_txaddr 
+6926 580001c0 setarg mem_spid_rbuf 
+6927 67f10086 store 2 ,core_spid_rxaddr 
+6928 2020671a branch twspi_disable 
+
+spid_write_reg:
+6929 79207e07 set1 7 ,pdata 
+692a 67e101bb store 2 ,mem_spid_tbuf 
+692b 44c14010 bpatch patch10_2 ,mem_patch10 
+692c 70808202 jam 2 ,core_spid_txlen 
+692d 70808800 jam 0 ,core_spid_rxlen 
+692e 70800602 jam spid_start ,core_misc_ctrl 
+692f 20206939 branch wait_spid_done 
+
+spid_read_reg:
+6930 18000401 force 1 ,temp 
+
+spid_read_regs:
+6931 67e081bb store 1 ,mem_spid_tbuf 
+6932 44c1c010 bpatch patch10_3 ,mem_patch10 
+6933 70808201 jam 1 ,core_spid_txlen 
+6934 60590088 storet 2 ,core_spid_rxlen 
+6935 70800602 jam spid_start ,core_misc_ctrl 
+6936 20406939 call wait_spid_done 
+6937 6fe081c0 fetch 1 ,mem_spid_rbuf 
+6938 20600000 rtn 
+
+wait_spid_done:
+6939 20000005 nop 5 
+693a 6ff08128 fetch 1 ,core_dma_status 
+693b c301e939 bbit0 spid_done ,wait_spid_done 
+693c 20600000 rtn 
+
+flash_write:
+693d 78547c00 disable user 
+693e 1fe22400 copy pdata ,regb 
+693f 6fe0c3ce fetch 1 ,mem_spi_write_flash_sm 
+6940 c1800000 rtnne flash_sm_no_buys 
+6941 78347c00 enable user 
+6942 1a427e00 copy regb ,pdata 
+6943 2020694b branch spid_flash_write_start 
+
+flash_write_spi_sm_timer:
+6944 6fe0c3ce fetch 1 ,mem_spi_write_flash_sm 
+6945 c000e94b beq flash_sm_start ,spid_flash_write_start 
+6946 c0016951 beq flash_sm_erase_sector ,spid_flash_erase_sector 
+6947 c001e959 beq flash_sm_wait_erase_sector ,spid_flash_wait_erase_sector 
+6948 c002695d beq flash_sm_write_data ,spid_flash_write_data 
+6949 c002e964 beq flash_sm_wait_write_data ,spid_flash_wait_write_data 
+694a 20600000 rtn 
+
+spid_flash_write_start:
+694b 67e1c3c7 store 3 ,mem_spi_write_addr 
+694c 1a227e00 copy rega ,pdata 
+694d 67e143ca store 2 ,mem_spi_write_ptr 
+694e 604943cc storet 2 ,mem_spi_write_len 
+694f 7043ce02 jam flash_sm_erase_sector ,mem_spi_write_flash_sm 
+6950 20206979 branch spid_init_flash 
+
+spid_flash_erase_sector:
+6951 20406979 call spid_init_flash 
+6952 7043ce03 jam flash_sm_wait_erase_sector ,mem_spi_write_flash_sm 
+6953 2040697f call spid_unlock_flash 
+6954 da2001bb arg mem_spid_tbuf ,rega 
+6955 70808204 jam 4 ,core_spid_txlen 
+6956 6fe1c3c7 fetch 3 ,mem_spi_write_addr 
+6957 d8400020 arg flash_command_sector_erase ,temp 
+6958 20206990 branch spid_write_flash_common 
+
+spid_flash_wait_erase_sector:
+6959 20406979 call spid_init_flash 
+695a 204069b3 call wait_spid_flash_done 
+695b 7043ce04 jam flash_sm_write_data ,mem_spi_write_flash_sm 
+695c 20600000 rtn 
+
+spid_flash_write_data:
+695d 44c24010 bpatch patch10_4 ,mem_patch10 
+695e 20406979 call spid_init_flash 
+695f 7043ce05 jam flash_sm_wait_write_data ,mem_spi_write_flash_sm 
+6960 2040697f call spid_unlock_flash 
+6961 20406971 call spid_flash_data_preserve 
+6962 2040698c call spid_write_flash 
+6963 2020696c branch spid_flash_data_recover 
+
+spid_flash_wait_write_data:
+6964 20406979 call spid_init_flash 
+6965 2040697f call spid_unlock_flash 
+6966 58000005 setarg flash_read_satus 
+6967 20406930 call spid_read_reg 
+6968 c3800000 rtnbit1 flash_status_wip 
+6969 7043ce00 jam flash_sm_no_buys ,mem_spi_write_flash_sm 
+696a 6fe1439c fetch 2 ,mem_cb_spi_flash_write_complate 
+696b 202075e6 branch callback_func 
+
+spid_flash_data_recover:
+696c 6fe204cc fetch 4 ,mem_temp 
+696d 684943ca fetcht 2 ,mem_spi_write_ptr 
+
+spid_flash_data_recover_comm:
+696e 184085fc increase -4 ,temp 
+696f e7e20002 istore 4 ,temp 
+6970 20600000 rtn 
+
+spid_flash_data_preserve:
+6971 684943ca fetcht 2 ,mem_spi_write_ptr 
+6972 18422200 copy temp ,rega 
+6973 184085fc increase -4 ,temp 
+6974 efe20002 ifetch 4 ,temp 
+6975 67e204cc store 4 ,mem_temp 
+6976 684943cc fetcht 2 ,mem_spi_write_len 
+6977 6fe1c3c7 fetch 3 ,mem_spi_write_addr 
+6978 20600000 rtn 
+
+spid_init_flash:
+6979 44c2c010 bpatch patch10_5 ,mem_patch10 
+697a 204069de call spi_gpio_init 
+697b 2040671a call twspi_disable 
+697c 58000000 setarg 0 
+697d 67e201bb store 4 ,mem_spid_tbuf 
+697e 20600000 rtn 
+
+spid_unlock_flash:
+697f 7001bb06 jam flash_command_write_enable ,mem_spid_tbuf 
+
+spid_sendcmd_common:
+6980 58000000 setarg 0 
+6981 67f10088 store 2 ,core_spid_rxlen 
+6982 58000001 setarg 1 
+6983 67f10082 store 2 ,core_spid_txlen 
+6984 580001bb setarg mem_spid_tbuf 
+6985 67f10084 store 2 ,core_spid_txaddr 
+6986 70800602 jam spid_start ,core_misc_ctrl 
+6987 20206939 branch wait_spid_done 
+
+spid_flash_release_form_powerdown:
+6988 7001bbab jam flash_command_release_from_powerdown ,mem_spid_tbuf 
+6989 20206980 branch spid_sendcmd_common 
+
+spid_flash_powerdown:
+698a 7001bbb9 jam flash_command_powerdown ,mem_spid_tbuf 
+698b 20206980 branch spid_sendcmd_common 
+
+spid_write_flash:
+698c 18408404 increase 4 ,temp 
+698d 60590082 storet 2 ,core_spid_txlen 
+698e d8400002 arg flash_command_write_data ,temp 
+698f 1a20a3fc increase -4 ,rega 
+
+spid_write_flash_common:
+6990 e0408011 istoret 1 ,rega 
+6991 1ff10400 rshift16 pdata ,temp 
+6992 e0408005 istoret 1 ,contw 
+6993 1fec8400 rshift8 pdata ,temp 
+6994 e0408005 istoret 1 ,contw 
+6995 e7e08005 istore 1 ,contw 
+6996 1a227e00 deposit rega 
+6997 67f10084 store 2 ,core_spid_txaddr 
+6998 58000000 setarg 0 
+6999 67f10088 store 2 ,core_spid_rxlen 
+699a 70800602 jam spid_start ,core_misc_ctrl 
+699b 20406939 call wait_spid_done 
+699c 202069b3 branch wait_spid_flash_done 
+
+spid_read_flash:
+699d 60590088 storet 2 ,core_spid_rxlen 
+699e 1ff10400 rshift16 pdata ,temp 
+699f 604881bc storet 1 ,mem_addr_hi 
+69a0 1fec8400 rshift8 pdata ,temp 
+69a1 604881bd storet 1 ,mem_addr_mi 
+69a2 67e081be store 1 ,mem_addr_lo 
+69a3 58000004 setarg 4 
+69a4 67f10082 store 2 ,core_spid_txlen 
+69a5 7001bb03 jam flash_command_read_data ,mem_spid_tbuf 
+69a6 580001bb setarg mem_spid_tbuf 
+69a7 67f10084 store 2 ,core_spid_txaddr 
+69a8 1a227e00 deposit rega 
+69a9 67f10086 store 2 ,core_spid_rxaddr 
+69aa 6ff08080 fetch 1 ,core_spid_ctrl 
+69ab 2a2c000f isolate0 15 ,rega 
+69ac 7920fe06 setflag true ,6 ,pdata 
+69ad 67f08080 store 1 ,core_spid_ctrl 
+69ae 70800602 jam spid_start ,core_misc_ctrl 
+
+spid_read_flash_wait:
+69af 6ff08128 fetch 1 ,core_dma_status 
+69b0 c283e9af bbit1 7 ,spid_read_flash_wait 
+69b1 d8e00003 arg spid_done ,queue 
+69b2 20206939 branch wait_spid_done 
+
+wait_spid_flash_done:
+69b3 580007d0 setarg 2000 
+69b4 20403abc call sleep 
+69b5 2040697f call spid_unlock_flash 
+69b6 580001c0 setarg mem_spid_rbuf 
+69b7 67f10086 store 2 ,core_spid_rxaddr 
+69b8 58000005 setarg flash_read_satus 
+69b9 20406930 call spid_read_reg 
+69ba c28069b3 bbit1 flash_status_wip ,wait_spid_flash_done 
+69bb 20600000 rtn 
+
+spid_load_flash:
+69bc 60590088 storet 2 ,core_spid_rxlen 
+69bd 58000004 setarg 4 
+69be 67f10082 store 2 ,core_spid_txlen 
+69bf 7001bb03 jam 3 ,mem_spid_tbuf 
+69c0 580001bb setarg mem_spid_tbuf 
+69c1 67f10084 store 2 ,core_spid_txaddr 
+69c2 1a227e00 deposit rega 
+69c3 67f10086 store 2 ,core_spid_rxaddr 
+69c4 6ff08080 fetch 1 ,core_spid_ctrl 
+69c5 2a2c000f isolate0 15 ,rega 
+69c6 7920fe06 setflag true ,6 ,pdata 
+69c7 67f08080 store 1 ,core_spid_ctrl 
+69c8 70800602 jam spid_start ,core_misc_ctrl 
+
+spi_load_flash_wait:
+69c9 6ff08128 fetch 1 ,core_dma_status 
+69ca c283e9c9 bbit1 7 ,spi_load_flash_wait 
+69cb d8e00003 arg spid_done ,queue 
+69cc 20406822 call decrypt_code 
+69cd 20406939 call wait_spid_done 
+69ce 2feffe02 isolate1 spid_crcok ,pdata 
+69cf 2040681b call set_ucode_status 
+69d0 6fe081bc fetch 1 ,mem_addr_hi 
+69d1 1ff02400 lshift16 pdata ,regb 
+69d2 6fe081bd fetch 1 ,mem_addr_mi 
+69d3 1fed7e00 lshift8 pdata ,pdata 
+69d4 9a41a400 ior regb ,regb 
+69d5 6fe081be fetch 1 ,mem_addr_lo 
+69d6 9a41fe00 ior regb ,pdata 
+69d7 9840fe00 iadd temp ,pdata 
+69d8 67e081be store 1 ,mem_addr_lo 
+69d9 1fecfe00 rshift8 pdata ,pdata 
+69da 67e081bd store 1 ,mem_addr_mi 
+69db 1fecfe00 rshift8 pdata ,pdata 
+69dc 67e081bc store 1 ,mem_addr_hi 
+69dd 20600000 rtn 
+
+spi_gpio_init:
+69de 6fe0c3cf fetch 1 ,mem_spi_cs_gpio 
+69df 6848c3d1 fetcht 1 ,mem_spi_so_gpio 
+69e0 98467c00 isub temp ,null 
+69e1 2422e9e3 nbranch spi_pin_set ,zero 
+69e2 204069ef call spi_gpio_default_init 
+
+spi_pin_set:
+69e3 6fe0c3cf fetch 1 ,mem_spi_cs_gpio 
+69e4 d8400020 arg gpcfg_spid_ncs ,temp 
+69e5 20406c68 call gpio_config_function_int 
+69e6 6fe0c3d2 fetch 1 ,mem_spi_sclk_gpio 
+69e7 d8400021 arg gpcfg_spid_sck ,temp 
+69e8 20406c68 call gpio_config_function_int 
+69e9 6fe0c3d0 fetch 1 ,mem_spi_si_gpio 
+69ea d8400022 arg gpcfg_spid_mosi ,temp 
+69eb 20406c68 call gpio_config_function_int 
+69ec 6fe0c3d1 fetch 1 ,mem_spi_so_gpio 
+69ed d840001f arg gpcfg_spid_miso ,temp 
+69ee 20206c68 branch gpio_config_function_int 
+
+spi_gpio_default_init:
+69ef 7043cf01 jam 1 ,mem_spi_cs_gpio 
+69f0 7043d003 jam 3 ,mem_spi_si_gpio 
+69f1 7043d100 jam 0 ,mem_spi_so_gpio 
+69f2 7043d202 jam 2 ,mem_spi_sclk_gpio 
+69f3 7043d30b jam 11 ,mem_spi_wp_gpio 
+69f4 7043d40a jam 10 ,mem_spi_hold_gpio 
+69f5 20600000 rtn 
+
+soft_reset_chip:
+69f6 70801001 jam 1 ,core_reset 
+69f7 20600000 rtn 
+
+iic_init_600khz:
+69f8 70808b05 jam 5 ,core_iicd_scl_low 
+69f9 70808c07 jam 7 ,core_iicd_scl_high 
+69fa 70808d07 jam 7 ,core_iicd_start_setup 
+69fb 70808e07 jam 7 ,core_iicd_start_hold 
+69fc 70808f07 jam 7 ,core_iicd_stop_setup 
+69fd 70809005 jam 5 ,core_iicd_data_setup 
+69fe 70809100 jam 0 ,core_iicd_data_hold 
+69ff 20600000 rtn 
+
+iic_init_360khz:
+6a00 70808b0c jam 12 ,core_iicd_scl_low 
+6a01 70808c0d jam 13 ,core_iicd_scl_high 
+6a02 70808d0d jam 13 ,core_iicd_start_setup 
+6a03 70808e0d jam 13 ,core_iicd_start_hold 
+6a04 70808f0d jam 13 ,core_iicd_stop_setup 
+6a05 7080900c jam 12 ,core_iicd_data_setup 
+6a06 70809100 jam 0 ,core_iicd_data_hold 
+6a07 20600000 rtn 
+
+iicd_init_pin:
+6a08 20406a3d call iicd_eeprom_write_enable 
+
+iicd_init_pin_scl_sda:
+6a09 6fe0c3d6 fetch 1 ,mem_eeprom_scl_gpio 
+6a0a d840006c arg gpcfg_iic_scl | gpcfg_pullup ,temp 
+6a0b 20406c68 call gpio_config_function_int 
+6a0c 6fe0c3d7 fetch 1 ,mem_eeprom_sda_gpio 
+6a0d d840006d arg gpcfg_iic_sda | gpcfg_pullup ,temp 
+6a0e 20206c68 branch gpio_config_function_int 
+
+iicd_read_init_pin:
+6a0f 20406a44 call iicd_eeprom_write_disable 
+6a10 20206a09 branch iicd_init_pin_scl_sda 
+
+wait_iicd_done:
+6a11 6ff08128 fetch 1 ,core_dma_status 
+6a12 c302ea11 bbit0 iicd_done ,wait_iicd_done 
+6a13 20600000 rtn 
+
+iicd_read_data:
+6a14 67e081bf store 1 ,mem_iicd_addr 
+6a15 580001bf setarg mem_iicd_addr 
+6a16 67f10094 store 2 ,core_iicd_txaddr 
+6a17 58000001 setarg 1 
+6a18 67f10092 store 2 ,core_iicd_txlen 
+6a19 60590098 storet 2 ,core_iicd_rxlen 
+6a1a 62310096 storer rega ,2 ,core_iicd_rxaddr 
+6a1b 70808a01 jam 1 ,core_iicd_ctrl 
+6a1c 70800604 jam iicd_start ,core_misc_ctrl 
+6a1d 20206a11 branch wait_iicd_done 
+
+iic_write_data:
+6a1e 58000000 setarg 0 
+6a1f 67f10098 store 2 ,core_iicd_rxlen 
+6a20 67f10096 store 2 ,core_iicd_rxaddr 
+6a21 60590092 storet 2 ,core_iicd_txlen 
+6a22 62310094 storer rega ,2 ,core_iicd_txaddr 
+6a23 70808a01 jam 1 ,core_iicd_ctrl 
+6a24 70800604 jam iicd_start ,core_misc_ctrl 
+6a25 20206a11 branch wait_iicd_done 
+
+set_eeprom_size_2k:
+6a26 79200028 set1 mark_eeprom_size ,mark 
+6a27 7043a908 jam 0x08 ,mem_eeprom_block_size 
+6a28 20600000 rtn 
+
+clear_eeprom_size_2k:
+6a29 793f8028 set0 mark_eeprom_size ,mark 
+6a2a 7043a920 jam 0x20 ,mem_eeprom_block_size 
+6a2b 20600000 rtn 
+
+iicd_read_eep_data_size_2k:
+6a2c 6fe0c3a0 fetch 1 ,mem_eeprom_base 
+6a2d 9a40fe00 iadd regb ,pdata 
+6a2e 67e081bd store 1 ,mem_addr_mi 
+6a2f 20206a33 branch iicd_read_eep_size_2k 
+
+iicd_read_eep_size_2k_lcadcode:
+6a30 6fe101bd fetch 2 ,mem_addr_mi 
+6a31 1ff0fe00 byteswap pdata ,pdata 
+6a32 67e081bd store 1 ,mem_addr_mi 
+
+iicd_read_eep_size_2k:
+6a33 58000003 setarg 3 
+6a34 67f10092 store 2 ,core_iicd_txlen 
+6a35 7001bca0 jam 0xa0 ,mem_iicd_tbuf 
+6a36 7001bea1 jam 0xa1 ,mem_iicd_tbuf + 2 
+6a37 20206a52 branch iicd_read_eep_common 
+
+iicd_write_protect_eep_data:
+6a38 604904cc storet 2 ,mem_temp 
+6a39 20406a3d call iicd_eeprom_write_enable 
+6a3a 684904cc fetcht 2 ,mem_temp 
+6a3b 20406a6c call iicd_write_eep_data 
+6a3c 20206a44 branch iicd_eeprom_write_disable 
+
+iicd_eeprom_write_enable:
+6a3d 6fe0c3d5 fetch 1 ,mem_eeprom_wp_gpio 
+6a3e c17f8000 rtneq gpio_disable 
+6a3f c3036a42 bbit0 6 ,iicd_wp_gpio_output_low 
+6a40 580249f0 setarg 150000 
+6a41 20403abc call sleep 
+
+iicd_wp_gpio_output_low:
+6a42 6848c3d5 fetcht 1 ,mem_eeprom_wp_gpio 
+6a43 20206c43 branch gpio_out_active 
+
+iicd_eeprom_write_disable:
+6a44 6848c3d5 fetcht 1 ,mem_eeprom_wp_gpio 
+6a45 20206c3f branch gpio_out_inactive 
+
+iicd_read_eep_data:
+6a46 44c34010 bpatch patch10_6 ,mem_patch10 
+6a47 c5146a2c bmark1 mark_eeprom_size ,iicd_read_eep_data_size_2k 
+6a48 6fe143a0 fetch 2 ,mem_eeprom_base 
+6a49 9a40fe00 iadd regb ,pdata 
+6a4a 1ff0fe00 byteswap pdata ,pdata 
+6a4b 67e101bd store 2 ,mem_addr_mi 
+
+iicd_read_eep:
+6a4c 44c3c010 bpatch patch10_7 ,mem_patch10 
+6a4d c5146a30 bmark1 mark_eeprom_size ,iicd_read_eep_size_2k_lcadcode 
+6a4e 58000004 setarg 4 
+6a4f 67f10092 store 2 ,core_iicd_txlen 
+6a50 7001bca0 jam 0xa0 ,mem_iicd_tbuf 
+6a51 7001bfa1 jam 0xa1 ,mem_iicd_tbuf + 3 
+
+iicd_read_eep_common:
+6a52 580001bc setarg mem_iicd_tbuf 
+6a53 67f10094 store 2 ,core_iicd_txaddr 
+6a54 60590098 storet 2 ,core_iicd_rxlen 
+6a55 62310096 storer rega ,2 ,core_iicd_rxaddr 
+6a56 58000002 setarg 2 
+6a57 2a2c000f isolate0 15 ,rega 
+6a58 7920fe00 setflag true ,0 ,pdata 
+6a59 67f0808a store 1 ,core_iicd_ctrl 
+6a5a 70800604 jam iicd_start ,core_misc_ctrl 
+6a5b d8e00005 arg iicd_done ,queue 
+6a5c 20406822 call decrypt_code 
+6a5d 20406a11 call wait_iicd_done 
+6a5e 2feffe04 isolate1 iicd_crcok ,pdata 
+6a5f 2040681b call set_ucode_status 
+6a60 c5146a67 bmark1 mark_eeprom_size ,iicd_read_eep_load_code_size_2k 
+6a61 6fe101bd fetch 2 ,mem_addr_mi 
+6a62 1ff0fe00 byteswap pdata ,pdata 
+6a63 9840fe00 iadd temp ,pdata 
+6a64 1ff0fe00 byteswap pdata ,pdata 
+6a65 67e101bd store 2 ,mem_addr_mi 
+6a66 20600000 rtn 
+
+iicd_read_eep_load_code_size_2k:
+6a67 6fe081bd fetch 1 ,mem_addr_mi 
+6a68 9840fe00 iadd temp ,pdata 
+6a69 1ff0fe00 byteswap pdata ,pdata 
+6a6a 67e101bd store 2 ,mem_addr_mi 
+6a6b 20600000 rtn 
+
+iicd_write_eep_data:
+6a6c 6fe143a0 fetch 2 ,mem_eeprom_base 
+6a6d 9a40fe00 iadd regb ,pdata 
+
+iicd_write_ota_data:
+6a6e 67e104c4 store 2 ,mem_pdatatemp 
+6a6f 44c44011 bpatch patch11_0 ,mem_patch11 
+6a70 604904cc storet 2 ,mem_temp 
+6a71 622104e3 storer rega ,2 ,mem_contr 
+
+iicd_write_eep_loop:
+6a72 20406a81 call iicd_eep_transparency 
+6a73 684904dc fetcht 2 ,mem_regb 
+6a74 6a2104e3 fetchr rega ,2 ,mem_contr 
+6a75 6fe104c4 fetch 2 ,mem_pdatatemp 
+6a76 20406aa2 call iicd_write_eep 
+6a77 6fe104dc fetch 2 ,mem_regb 
+6a78 684904e3 fetcht 2 ,mem_contr 
+6a79 98408400 iadd temp ,temp 
+6a7a 604904e3 storet 2 ,mem_contr 
+6a7b 684904c4 fetcht 2 ,mem_pdatatemp 
+6a7c 98408400 iadd temp ,temp 
+6a7d 604904c4 storet 2 ,mem_pdatatemp 
+6a7e 6fe104cc fetch 2 ,mem_temp 
+6a7f 243a6a72 nbranch iicd_write_eep_loop ,blank 
+6a80 20600000 rtn 
+
+iicd_eep_transparency:
+6a81 44c4c011 bpatch patch11_1 ,mem_patch11 
+6a82 6fe0c3a9 fetch 1 ,mem_eeprom_block_size 
+6a83 1fe0ffff increase -1 ,pdata 
+6a84 684904c4 fetcht 2 ,mem_pdatatemp 
+6a85 9841fe00 ior temp ,pdata 
+6a86 1fe0fe01 increase 1 ,pdata 
+6a87 67e184e0 store 3 ,mem_regc 
+6a88 6fe104cc fetch 2 ,mem_temp 
+6a89 9840fe00 iadd temp ,pdata 
+6a8a 684984e0 fetcht 3 ,mem_regc 
+6a8b 98467e00 isub temp ,pdata 
+6a8c 24216a93 nbranch iicd_eep_deal_short_packet ,positive 
+6a8d 67e104cc store 2 ,mem_temp 
+6a8e 6fe184e0 fetch 3 ,mem_regc 
+6a8f 684904c4 fetcht 2 ,mem_pdatatemp 
+6a90 98467e00 isub temp ,pdata 
+6a91 67e104dc store 2 ,mem_regb 
+6a92 20600000 rtn 
+
+iicd_eep_deal_short_packet:
+6a93 6fe104cc fetch 2 ,mem_temp 
+6a94 67e104dc store 2 ,mem_regb 
+6a95 58000000 setarg 0 
+6a96 67e104cc store 2 ,mem_temp 
+6a97 20600000 rtn 
+
+iicd_write_eep_size_2k:
+6a98 1a427e00 copy regb ,pdata 
+6a99 18408402 increase 2 ,temp 
+6a9a 60590092 storet 2 ,core_iicd_txlen 
+6a9b 1a20a3fe increase -2 ,rega 
+6a9c e8418011 ifetcht 3 ,rega 
+6a9d 18422400 copy temp ,regb 
+6a9e d84000a0 arg 0xa0 ,temp 
+6a9f e0408011 istoret 1 ,rega 
+6aa0 e7e08005 istore 1 ,contw 
+6aa1 20206aaf branch iicd_write_eep_common 
+
+iicd_write_eep:
+6aa2 1fe22400 copy pdata ,regb 
+6aa3 44c54011 bpatch patch11_2 ,mem_patch11 
+6aa4 c5146a98 bmark1 mark_eeprom_size ,iicd_write_eep_size_2k 
+6aa5 1a427e00 copy regb ,pdata 
+6aa6 18408403 increase 3 ,temp 
+6aa7 60590092 storet 2 ,core_iicd_txlen 
+6aa8 1a20a3fd increase -3 ,rega 
+6aa9 e8418011 ifetcht 3 ,rega 
+6aaa 18422400 copy temp ,regb 
+6aab d84000a0 arg 0xa0 ,temp 
+6aac e0408011 istoret 1 ,rega 
+6aad 1ff0fe00 byteswap pdata ,pdata 
+6aae e7e10005 istore 2 ,contw 
+
+iicd_write_eep_common:
+6aaf 62310094 storer rega ,2 ,core_iicd_txaddr 
+6ab0 58000000 setarg 0 
+6ab1 67f10098 store 2 ,core_iicd_rxlen 
+6ab2 70808a01 jam 1 ,core_iicd_ctrl 
+6ab3 70800604 jam iicd_start ,core_misc_ctrl 
+6ab4 20406a11 call wait_iicd_done 
+6ab5 e2418011 istorer regb ,3 ,rega 
+
+iic_check_eeprom_standby:
+6ab6 44c5c011 bpatch patch11_3 ,mem_patch11 
+6ab7 7001bf00 jam 0 ,mem_iicd_tbuf + 3 
+
+iic_check_eeprom_standby_wait:
+6ab8 58000001 setarg 1 
+6ab9 67f10092 store 2 ,core_iicd_txlen 
+6aba 7001bca0 jam 0xa0 ,mem_iicd_tbuf 
+6abb 580001bc setarg mem_iicd_tbuf 
+6abc 67f10094 store 2 ,core_iicd_txaddr 
+6abd 58000000 setarg 0 
+6abe 67f10098 store 2 ,core_iicd_rxlen 
+6abf 67f10096 store 2 ,core_iicd_rxaddr 
+6ac0 58000003 setarg 3 
+6ac1 67f0808a store 1 ,core_iicd_ctrl 
+6ac2 70800604 jam iicd_start ,core_misc_ctrl 
+6ac3 20406a11 call wait_iicd_done 
+6ac4 6ff08128 fetch 1 ,core_dma_status 
+6ac5 c4030000 rtnbit0 iicd_ack 
+6ac6 200005dc nop 1500 
+6ac7 6fe081bf fetch 1 ,mem_iicd_tbuf + 3 
+6ac8 1fe0fe01 increase 1 ,pdata 
+6ac9 67e081bf store 1 ,mem_iicd_tbuf + 3 
+6aca 1fe67c28 sub pdata ,40 ,null 
+6acb 24610000 nrtn positive 
+6acc 20206ab8 branch iic_check_eeprom_standby_wait 
+
+uarta_init_dma_mem:
+6acd 20407636 call enable_user 
+6ace 20206acf branch uart_init_dma_mem 
+
+uart_init_dma_mem:
+6acf 1ff10400 rshift16 pdata ,temp 
+6ad0 20546af3 call uarta_init_rx ,user 
+6ad1 1fef7e00 rshift32 pdata ,pdata 
+6ad2 1ff10400 rshift16 pdata ,temp 
+6ad3 20546aef call uarta_init_tx ,user 
+6ad4 6ff10050 fetch 2 ,core_clkoff 
+6ad5 793ffe0f set0 clock_off_uart ,pdata 
+6ad6 67f10050 store 2 ,core_clkoff 
+6ad7 20600000 rtn 
+
+uarta_init_baud_rate:
+6ad8 67f10052 store uart_baud_len ,core_uart_baud 
+6ad9 20600000 rtn 
+
+uarta_calc_baud_rate_config:
+6ada 20406adc call uart_calc_baud_rate_config 
+6adb 20206ad8 branch uarta_init_baud_rate 
+
+uart_calc_baud_rate_config:
+6adc 20406ae1 call uart_calc_baud_rate_config_choice_uart_clock 
+6add 9846fc00 idiv temp 
+6ade 204075d0 call wait_div_end 
+6adf 1807fe00 quotient pdata 
+6ae0 20600000 rtn 
+
+uart_calc_baud_rate_config_choice_uart_clock:
+6ae1 6ff08043 fetch 1 ,core_uart_clksel 
+6ae2 c3006ae5 bbit0 uart_clock_select_bit ,uart_calc_baud_rate_config_choice_uart_clock_crystal 
+6ae3 5adc6c00 setarg uart_clock_freq_48m 
+6ae4 20600000 rtn 
+
+uart_calc_baud_rate_config_choice_uart_clock_crystal:
+6ae5 596e3600 setarg uart_clock_freq_24m 
+6ae6 20600000 rtn 
+
+uart_clock_select_main_freq_crystal:
+6ae7 6ff08043 fetch 1 ,core_uart_clksel 
+6ae8 1fe17efe and pdata ,uart_clock_select_crystal ,pdata 
+6ae9 67f08043 store 1 ,core_uart_clksel 
+6aea 20600000 rtn 
+
+uart_clock_select_main_freq_dpll:
+6aeb 6ff08043 fetch 1 ,core_uart_clksel 
+6aec 1fe1fe01 or pdata ,uart_clock_select_dpll ,pdata 
+6aed 67f08043 store 1 ,core_uart_clksel 
+6aee 20600000 rtn 
+
+uarta_init_tx:
+6aef 67f1005a store 2 ,core_uart_tsaddr 
+6af0 67f1005e store 2 ,core_uart_twptr 
+6af1 6059005c storet 2 ,core_uart_teaddr 
+6af2 20600000 rtn 
+
+uarta_init_rx:
+6af3 67f10054 store 2 ,core_uart_rsaddr 
+6af4 67f10058 store 2 ,core_uart_rrptr 
+6af5 60590056 storet 2 ,core_uart_readdr 
+6af6 20600000 rtn 
+
+uarta_prepare_tx:
+6af7 6951005a fetchr contus ,2 ,core_uart_tsaddr 
+6af8 6a11005c fetchr contue ,2 ,core_uart_teaddr 
+6af9 6871005e fetchr contu ,2 ,core_uart_twptr 
+6afa 20600000 rtn 
+
+uarta_prepare_rx:
+6afb 69510054 fetchr contus ,2 ,core_uart_rsaddr 
+6afc 6a110056 fetchr contue ,2 ,core_uart_readdr 
+6afd 68710058 fetchr contu ,2 ,core_uart_rrptr 
+6afe 20600000 rtn 
+
+uarta_send:
+6aff 6071005e storer contu ,2 ,core_uart_twptr 
+6b00 20600000 rtn 
+
+uarta_rxdone:
+6b01 60710058 storer contu ,2 ,core_uart_rrptr 
+6b02 20600000 rtn 
+
+uarta_clear_current_rx:
+6b03 20406afb call uarta_prepare_rx 
+6b04 6ff10112 fetch 2 ,core_uart_rxitems 
+6b05 98608600 iadd contu ,contu 
+6b06 20206b01 branch uarta_rxdone 
+
+uarta_prepare_tx_register_push:
+6b07 20406b0b call uart_register_push 
+6b08 20206af7 branch uarta_prepare_tx 
+
+uarta_send_register_pop:
+6b09 20406aff call uarta_send 
+6b0a 20206b0f branch uart_register_pop 
+
+uart_register_push:
+6b0b 606104eb storer contu ,2 ,mem_contu 
+6b0c 614104e9 storer contus ,2 ,mem_contue 
+6b0d 620104e7 storer contue ,2 ,mem_contus 
+6b0e 20600000 rtn 
+
+uart_register_pop:
+6b0f 686104eb fetchr contu ,2 ,mem_contu 
+6b10 694104e9 fetchr contus ,2 ,mem_contue 
+6b11 6a0104e7 fetchr contue ,2 ,mem_contus 
+6b12 20600000 rtn 
+
+uart_copy_tx_bytes_fast:
+6b13 1f227e00 deposit loopcnt 
+6b14 207a0000 rtn blank 
+
+uart_copy_tx_bytes_fast_loop:
+6b15 1f20f3f8 increase -8 ,loopcnt 
+6b16 20416b20 call uart_tx_8_bytes ,positive 
+6b17 20628000 rtn zero 
+6b18 20216b15 branch uart_copy_tx_bytes_fast_loop ,positive 
+6b19 1f20f208 increase 8 ,loopcnt 
+
+uart_copy_tx_bytes_fast_loop_four:
+6b1a 1f20f3fc increase -4 ,loopcnt 
+6b1b 20416b23 call uart_tx_4_bytes ,positive 
+6b1c 20628000 rtn zero 
+6b1d 20216b1a branch uart_copy_tx_bytes_fast_loop_four ,positive 
+6b1e 1f20f204 increase 4 ,loopcnt 
+6b1f 20206b26 branch uart_copy_tx_bytes 
+
+uart_tx_8_bytes:
+6b20 efe40006 ifetch 8 ,contr 
+6b21 e7e40003 istore 8 ,contu 
+6b22 20600000 rtn 
+
+uart_tx_4_bytes:
+6b23 efe20006 ifetch 4 ,contr 
+6b24 e7e20003 istore 4 ,contu 
+6b25 20600000 rtn 
+
+uart_copy_tx_bytes:
+6b26 1f227e00 deposit loopcnt 
+6b27 207a0000 rtn blank 
+
+uart_copy_tx_bytes_loop:
+6b28 efe08006 ifetch 1 ,contr 
+6b29 e7e08003 istore 1 ,contu 
+6b2a c2006b28 loop uart_copy_tx_bytes_loop 
+6b2b 20600000 rtn 
+
+uart_copy_rx_bytes_fast:
+6b2c 1f227e00 deposit loopcnt 
+6b2d 207a0000 rtn blank 
+
+uart_copy_rx_bytes_fast_loop:
+6b2e 1f20f3f8 increase -8 ,loopcnt 
+6b2f 20416b39 call uart_rx_8_bytes ,positive 
+6b30 20628000 rtn zero 
+6b31 20216b2e branch uart_copy_rx_bytes_fast_loop ,positive 
+6b32 1f20f208 increase 8 ,loopcnt 
+
+uart_copy_rx_bytes_fast_loop_four:
+6b33 1f20f3fc increase -4 ,loopcnt 
+6b34 20416b3c call uart_rx_4_bytes ,positive 
+6b35 20628000 rtn zero 
+6b36 20216b33 branch uart_copy_rx_bytes_fast_loop_four ,positive 
+6b37 1f20f204 increase 4 ,loopcnt 
+6b38 20206b3f branch uart_copy_rx_bytes 
+
+uart_rx_8_bytes:
+6b39 efe40003 ifetch 8 ,contu 
+6b3a e7e40005 istore 8 ,contw 
+6b3b 20600000 rtn 
+
+uart_rx_4_bytes:
+6b3c efe20003 ifetch 4 ,contu 
+6b3d e7e20005 istore 4 ,contw 
+6b3e 20600000 rtn 
+
+uart_copy_rx_bytes:
+6b3f 1f227e00 deposit loopcnt 
+6b40 207a0000 rtn blank 
+
+uart_copy_rx_bytes_loop:
+6b41 efe08003 ifetch 1 ,contu 
+6b42 e7e08005 istore 1 ,contw 
+6b43 c2006b41 loop uart_copy_rx_bytes_loop 
+6b44 20600000 rtn 
+
+app_store_nvram_event:
+6b45 7004c33d jam bt_evt_store_nvram ,mem_fifo_temp 
+6b46 2020709b branch ui_ipc_send_event 
+
+check_51cmd_update_device_record:
+6b47 44c64011 bpatch patch11_4 ,mem_patch11 
+6b48 6fe0c3af fetch 1 ,mem_nv_data_number 
+6b49 207a0000 rtn blank 
+6b4a 20406be9 call check_nvram 
+6b4b 2042ebef call init_device_list ,zero 
+6b4c 2040763c call disable_user2 
+6b4d 20406b7a call nvram_find_addr_from_bd_list 
+
+write_device_record:
+6b4e 6fe0c3af fetch 1 ,mem_nv_data_number 
+6b4f 1fe22600 icopy regc 
+6b50 684943ad fetcht 2 ,mem_nv_data_ptr 
+6b51 6049002e storet 2 ,mem_list_item_ptr 
+
+write_device_loop_find:
+6b52 1a627e00 copy regc ,pdata 
+6b53 203a6b45 branch app_store_nvram_event ,blank 
+6b54 1a60a7ff increase -1 ,regc 
+6b55 18422200 copy temp ,rega 
+6b56 efe08011 ifetch 1 ,rega 
+6b57 6848802c fetcht 1 ,mem_select_list_item 
+6b58 98467c00 isub temp ,null 
+6b59 2042eb62 call set_index_finded_device ,zero 
+6b5a 20216b5e branch write_device_loop_find0 ,positive 
+6b5b efe08011 ifetch 1 ,rega 
+6b5c 1fe0fe01 increase 1 ,pdata 
+6b5d e7e08011 istore 1 ,rega 
+
+write_device_loop_find0:
+6b5e 6849002e fetcht 2 ,mem_list_item_ptr 
+6b5f 18408422 increase nv_data_len ,temp 
+6b60 6049002e storet 2 ,mem_list_item_ptr 
+6b61 20206b52 branch write_device_loop_find 
+
+set_index_finded_device:
+6b62 58000000 setarg 0 
+6b63 e7e08011 istore 1 ,rega 
+6b64 6fe0802d fetch 1 ,mem_temp_reconn_record 
+6b65 e7e08005 istore 1 ,contw 
+6b66 c099eb6f bne rec_3_mode ,set_index_finded_device_ble_mode 
+
+set_index_find_device_master_addr:
+6b67 efe30006 ifetch 6 ,contr 
+6b68 e7e40005 istore 8 ,contw 
+6b69 58000000 setarg 0 
+6b6a e7e40005 istore 8 ,contw 
+6b6b 1a420c00 copy regb ,contr 
+
+store_rec_data_common:
+6b6c 204074f5 call memcpy16 
+6b6d 18007c01 force 1 ,null 
+6b6e 20600000 rtn 
+
+set_index_finded_device_ble_mode:
+6b6f c01b6b73 beq rec_4_mode_random_resolvable_private_address ,set_index_finded_device_irk 
+6b70 c01beb77 beq rec_4_mode_random_non_resolvable_private_address ,set_index_finded_device_ediv 
+6b71 da40424a arg mem_le_ltk ,regb 
+6b72 20206b67 branch set_index_find_device_master_addr 
+
+set_index_finded_device_irk:
+6b73 d8c042e0 arg mem_le_irk ,contr 
+6b74 204074f5 call memcpy16 
+
+store_ble_rec_data_common:
+6b75 d8c0424a arg mem_le_ltk ,contr 
+6b76 20206b6c branch store_rec_data_common 
+
+set_index_finded_device_ediv:
+6b77 d8c042d8 arg mem_le_rand ,contr 
+6b78 204074f5 call memcpy16 
+6b79 20206b75 branch store_ble_rec_data_common 
+
+nvram_find_addr_from_bd_list:
+6b7a 44c6c011 bpatch patch11_5 ,mem_patch11 
+6b7b 20407638 call disable_user 
+6b7c 6fe0c3af fetch 1 ,mem_nv_data_number 
+6b7d 207a0000 rtn blank 
+6b7e 44c74011 bpatch patch11_6 ,mem_patch11 
+6b7f 6fe1442f fetch 2 ,mem_ui_state_map 
+6b80 c4048000 rtnbit0 ui_state_ble_connected 
+
+find_addr_from_bd_list_ble_mode:
+6b81 6fe0c29e fetch 1 ,mem_le_conn_peer_addr_type 
+6b82 c0006b96 beq master_public_addr ,find_addr_from_bd_list_public_device_addr 
+6b83 6fe08178 fetch 1 ,mem_le_plap + 5 
+6b84 2fe180c0 compare 0xc0 ,pdata ,0xc0 
+6b85 2020eb89 branch find_addr_from_bd_list_static_addr ,true 
+6b86 2fe18040 compare 0x40 ,pdata ,0xc0 
+6b87 2020eb9b branch find_addr_from_bd_list_random_addr ,true 
+6b88 20206b90 branch find_addr_from_bd_list_random_non_resolvable_private_address_sc_or_legacy 
+
+find_addr_from_bd_list_static_addr:
+6b89 20366b8d branch find_addr_from_bd_list_static_addr_reconnect ,user2 
+6b8a 6fe0c282 fetch 1 ,mem_le_preq_init_key_distribution 
+6b8b c300eb96 bbit0 le_initator_irk_bit ,find_addr_from_bd_list_public_device_addr 
+6b8c 20206b90 branch find_addr_from_bd_list_static_addr_sc_or_legacy 
+
+find_addr_from_bd_list_static_addr_reconnect:
+6b8d 20406b96 call find_addr_from_bd_list_public_device_addr 
+6b8e 20740000 rtn user 
+6b8f 20206b90 branch find_addr_from_bd_list_static_addr_sc_or_legacy 
+
+find_addr_from_bd_list_static_addr_sc_or_legacy:
+
+find_addr_from_bd_list_random_non_resolvable_private_address_sc_or_legacy:
+6b90 6fe0c2d1 fetch 1 ,mem_le_pairing_mode 
+6b91 c283eb93 bbit1 le_pairing_mode_secure_connect_bit ,find_addr_from_bd_list_random_non_resolvable_private_address_sc 
+6b92 20206b99 branch find_addr_from_bd_list_random_non_resolvable_private_address 
+
+find_addr_from_bd_list_static_addr_sc:
+
+find_addr_from_bd_list_random_non_resolvable_private_address_sc:
+6b93 6fe30173 fetch 6 ,mem_le_plap 
+6b94 67e442d8 store 8 ,mem_le_rand 
+6b95 20206b99 branch find_addr_from_bd_list_random_non_resolvable_private_address 
+
+find_addr_from_bd_list_public_device_addr:
+6b96 70002d35 jam rec_4_mode_static_address ,mem_temp_reconn_record 
+6b97 6fe30173 fetch 6 ,mem_le_plap 
+6b98 20206b9d branch find_addr_from_bd_list_common 
+
+find_addr_from_bd_list_random_non_resolvable_private_address:
+6b99 70002d37 jam rec_4_mode_random_non_resolvable_private_address ,mem_temp_reconn_record 
+6b9a 20206b9d branch find_addr_from_bd_list_common 
+
+find_addr_from_bd_list_random_addr:
+6b9b 70002d36 jam rec_4_mode_random_resolvable_private_address ,mem_temp_reconn_record 
+6b9c 20206b9d branch find_addr_from_bd_list_common 
+
+find_addr_from_bd_list_common:
+6b9d 44c7c011 bpatch patch11_7 ,mem_patch11 
+6b9e 6fe143ad fetch 2 ,mem_nv_data_ptr 
+6b9f e840803f ifetcht 1 ,pdata 
+6ba0 1fe0fe01 pincrease 1 
+6ba1 67e1002e store 2 ,mem_list_item_ptr 
+6ba2 6048802c storet 1 ,mem_select_list_item 
+6ba3 6fe0c3af fetch 1 ,mem_nv_data_number 
+6ba4 1fe22600 icopy regc 
+
+nvram_find_addr_from_list:
+6ba5 6fe1002e fetch 2 ,mem_list_item_ptr 
+6ba6 1fe22200 copy pdata ,rega 
+6ba7 20406bb5 call nvram_find_addr_from_list_compare 
+6ba8 20740000 rtn user 
+6ba9 6849002e fetcht 2 ,mem_list_item_ptr 
+6baa 18408422 increase nv_data_len ,temp 
+6bab 6049002e storet 2 ,mem_list_item_ptr 
+6bac 184085ff increase -1 ,temp 
+6bad efe08002 ifetch 1 ,temp 
+6bae 67e0802c store 1 ,mem_select_list_item 
+6baf 1a60a7ff increase -1 ,regc 
+6bb0 2422eba5 nbranch nvram_find_addr_from_list ,zero 
+6bb1 6fe0c3af fetch 1 ,mem_nv_data_number 
+6bb2 1fe0ffff pincrease decreased_one 
+6bb3 67e0802c store 1 ,mem_select_list_item 
+6bb4 20600000 rtn 
+
+nvram_find_addr_from_list_compare:
+6bb5 6fe0802d fetch 1 ,mem_temp_reconn_record 
+6bb6 c099ebbc bne rec_3_mode ,find_addr_from_list_compare_ble_mode 
+
+find_master_addr_from_list_compare:
+6bb7 da40002d arg mem_temp_reconn_record ,regb 
+6bb8 df200007 arg 7 ,loopcnt 
+6bb9 204075d2 call string_compare 
+6bba 2022f636 branch enable_user ,zero 
+6bbb 20600000 rtn 
+
+find_addr_from_list_compare_ble_mode:
+6bbc c01b6bbf beq rec_4_mode_random_resolvable_private_address ,find_irk_form_list_compare 
+6bbd c01bebda beq rec_4_mode_random_non_resolvable_private_address ,find_ediv_form_list_compare 
+6bbe 20206bb7 branch find_master_addr_from_list_compare 
+
+find_irk_form_list_compare:
+6bbf e8408011 ifetcht 1 ,rega 
+6bc0 98467c00 isub temp ,null 
+6bc1 24628000 nrtn zero 
+6bc2 d8a004f6 arg mem_le_prand ,contw 
+6bc3 df200010 arg 16 ,loopcnt 
+6bc4 2040750f call clear_mem 
+6bc5 6fe18176 fetch 3 ,mem_le_plap + 3 
+6bc6 67e184f6 store 3 ,mem_le_prand 
+6bc7 20406bd1 call genernate_master_macaddress 
+6bc8 6fe10513 fetch 2 ,mem_le_aes_128 + 13 
+6bc9 1ff0fe00 byteswap pdata ,pdata 
+6bca 1fed0400 lshift8 pdata ,temp 
+6bcb efe08006 ifetch 1 ,contr 
+6bcc 9840fe00 iadd temp ,pdata 
+6bcd 68498173 fetcht 3 ,mem_le_plap 
+6bce 98467c00 isub temp ,null 
+6bcf 2022f636 branch enable_user ,zero 
+6bd0 20600000 rtn 
+
+genernate_master_macaddress:
+6bd1 d8c004f6 arg mem_le_prand ,contr 
+6bd2 20406f9d call load_data128 
+6bd3 efe08011 ifetch 1 ,rega 
+6bd4 20406f9e call load_regext 
+6bd5 18006c38 force 0x38 ,aes_ctrl 
+6bd6 18006c00 force 0x0 ,aes_ctrl 
+6bd7 20406f0b call wait_aes 
+6bd8 d8a00506 arg mem_le_aes_128 ,contw 
+6bd9 20206fb1 branch store_aes_result 
+
+find_ediv_form_list_compare:
+6bda e8408011 ifetcht 1 ,rega 
+6bdb 98467c00 isub temp ,null 
+6bdc 24628000 nrtn zero 
+6bdd 18c22200 copy contr ,rega 
+6bde 18c0a608 add contr ,8 ,regc 
+6bdf da4042d8 arg mem_le_rand ,regb 
+6be0 df200008 arg 8 ,loopcnt 
+6be1 204075d2 call string_compare 
+6be2 2022f636 branch enable_user ,zero 
+6be3 1a622200 copy regc ,rega 
+6be4 da4042e0 arg mem_le_irk ,regb 
+6be5 df200008 arg 8 ,loopcnt 
+6be6 204075d2 call string_compare 
+6be7 2022f636 branch enable_user ,zero 
+6be8 20600000 rtn 
+
+check_nvram:
+6be9 6fe143ad fetch 2 ,mem_nv_data_ptr 
+6bea e840803f ifetcht 1 ,pdata 
+6beb 1fe0fe22 pincrease nv_data_len 
+6bec efe0803f ifetch 1 ,pdata 
+6bed 98467c00 isub temp ,null 
+6bee 20600000 rtn 
+
+init_device_list:
+6bef 6fe0c3af fetch 1 ,mem_nv_data_number 
+6bf0 1fe27200 icopy loopcnt 
+6bf1 684943ad fetcht 2 ,mem_nv_data_ptr 
+6bf2 58000000 setarg 0 
+
+init_device_list_loop:
+6bf3 e7e08002 istore 1 ,temp 
+6bf4 18408422 increase nv_data_len ,temp 
+6bf5 1fe0fe01 pincrease 1 
+6bf6 c2006bf3 loop init_device_list_loop 
+6bf7 20600000 rtn 
+
+load_device_list_mode_4:
+6bf8 2040763a call enable_user2 
+6bf9 20406b7a call nvram_find_addr_from_bd_list 
+6bfa 24346c03 nbranch clear_ltk_exists ,user 
+6bfb 6fe1002e fetch 2 ,mem_list_item_ptr 
+6bfc 1fe08c01 add pdata ,1 ,contr 
+6bfd d8a042e0 arg mem_le_irk ,contw 
+6bfe 204074f5 call memcpy16 
+6bff d8a0424a arg mem_le_ltk ,contw 
+6c00 204074f5 call memcpy16 
+6c01 70425a01 jam 1 ,mem_ltk_exists 
+6c02 20600000 rtn 
+
+clear_ltk_exists:
+6c03 70425a00 jam 0 ,mem_ltk_exists 
+6c04 20600000 rtn 
+
+eeprom_store_le_reconn_info:
+6c05 70002d34 jam rec_4_mode ,mem_record_bt_mode 
+6c06 20206c07 branch eeprom_store_reconn_info 
+
+eeprom_store_reconn_info:
+6c07 6fe0c095 fetch 1 ,mem_device_option 
+6c08 c0056b47 beq dvc_op_module ,check_51cmd_update_device_record 
+6c09 c0045e4a beq dvc_op_mouse ,mouse_store_remote_bdaddr 
+6c0a 20600000 rtn 
+
+gpio_set_wake_by_current_state:
+6c0b 44c84012 bpatch patch12_0 ,mem_patch12 
+6c0c 79200407 set1 gpio_active_bit ,temp 
+6c0d 20406c32 call gpio_get_bit 
+6c0e 7d208407 nsetflag true ,gpio_active_bit ,temp 
+
+gpio_set_wake:
+6c0f 44c8c012 bpatch patch12_1 ,mem_patch12 
+6c10 18467cff sub temp ,ui_button_gpio_disable ,null 
+6c11 20628000 rtn zero 
+6c12 284c0007 isolate0 gpio_active_bit ,temp 
+6c13 18410e1f and temp ,0x1f ,queue 
+6c14 6fe20016 fetch 4 ,mem_gpio_wakeup_low 
+6c15 f920fe00 qsetflag true ,pdata 
+6c16 67e20016 store 4 ,mem_gpio_wakeup_low 
+6c17 6fe2001a fetch 4 ,mem_gpio_wakeup_high 
+6c18 fd20fe00 nqsetflag true ,pdata 
+6c19 67e2001a store 4 ,mem_gpio_wakeup_high 
+6c1a 20600000 rtn 
+
+gpio_clr_wake:
+6c1b 44c94012 bpatch patch12_2 ,mem_patch12 
+6c1c 18467cff sub temp ,ui_button_gpio_disable ,null 
+6c1d 20628000 rtn zero 
+6c1e 284c0007 isolate0 gpio_active_bit ,temp 
+6c1f 18410e1f and temp ,0x1f ,queue 
+6c20 6fe20016 fetch 4 ,mem_gpio_wakeup_low 
+6c21 f93ffe00 qset0 pdata 
+6c22 67e20016 store 4 ,mem_gpio_wakeup_low 
+6c23 6fe2001a fetch 4 ,mem_gpio_wakeup_high 
+6c24 f93ffe00 qset0 pdata 
+6c25 67e2001a store 4 ,mem_gpio_wakeup_high 
+6c26 20600000 rtn 
+
+gpio_config_input_nowake:
+6c27 20406c1b call gpio_clr_wake 
+6c28 20206c2c branch gpio_config_input_without_wake 
+
+gpio_config_input:
+6c29 18467cff sub temp ,ui_button_gpio_disable ,null 
+6c2a 20628000 rtn zero 
+6c2b 2455ec0f ncall gpio_set_wake ,wake 
+
+gpio_config_input_without_wake:
+6c2c 20406c5e call gpio_addr 
+6c2d 58000000 setarg 0 
+6c2e 284ffe07 isolate1 gpio_active_bit ,temp 
+6c2f 7d20fe06 nsetflag true ,6 ,pdata 
+6c30 7920fe07 setflag true ,7 ,pdata 
+6c31 20206c59 branch gpio_write 
+
+gpio_get_bit:
+6c32 44c9c012 bpatch patch12_3 ,mem_patch12 
+6c33 d8a0811c arg core_gpio_in ,contw 
+6c34 18410e07 and temp ,0x07 ,queue 
+6c35 18497e00 rshift3 temp ,pdata 
+6c36 1fe17e03 and_into 3 ,pdata 
+6c37 98a08a00 iadd contw ,contw 
+6c38 efe08005 ifetch 1 ,contw 
+6c39 284ffe07 isolate1 gpio_active_bit ,temp 
+6c3a 2020ec3d branch gpio_get_bit_reverse ,true 
+6c3b afec0000 qisolate0 pdata 
+6c3c 20600000 rtn 
+
+gpio_get_bit_reverse:
+6c3d afefffff qisolate1 pdata 
+6c3e 20600000 rtn 
+
+gpio_out_inactive:
+6c3f 18467cff sub temp ,ui_button_gpio_disable ,null 
+6c40 20628000 rtn zero 
+6c41 2fcffe07 isolate1 gpio_active_bit ,null 
+6c42 20206c46 branch gpio_out_flag 
+
+gpio_config_output:
+
+gpio_out_active:
+6c43 18467cff sub temp ,ui_button_gpio_disable ,null 
+6c44 20628000 rtn zero 
+6c45 2fcc0007 isolate0 gpio_active_bit ,null 
+
+gpio_out_flag:
+6c46 58000000 setarg 0 
+6c47 7d20fe07 nsetflag true ,gpio_active_bit ,pdata 
+6c48 98428400 ixor temp ,temp 
+
+gpio_out:
+6c49 20406c5e call gpio_addr 
+6c4a 5800003f setarg gpcfg_output_high 
+6c4b 284ffe07 isolate1 gpio_active_bit ,temp 
+6c4c 7920fe00 setflag true ,0 ,pdata 
+6c4d 20206c59 branch gpio_write 
+
+gpio_check_active:
+6c4e 18467cff sub temp ,ui_button_gpio_disable ,null 
+6c4f 2022f640 branch disable_true ,zero 
+6c50 20406c5e call gpio_addr 
+6c51 efe08005 ifetch 1 ,contw 
+6c52 c2806c55 bbit1 0 ,gpio_check_active_high 
+6c53 284c0007 isolate0 gpio_active_bit ,temp 
+6c54 20600000 rtn 
+
+gpio_check_active_high:
+6c55 284ffe07 isolate1 gpio_active_bit ,temp 
+6c56 20600000 rtn 
+
+gpio_set_analog:
+6c57 20406c5e call gpio_addr 
+6c58 580000c0 setarg gpcfg_no_ie 
+
+gpio_write:
+6c59 e7e08005 istore 1 ,contw 
+6c5a 20600000 rtn 
+
+gpio_set_high_impedance:
+6c5b 20406c5e call gpio_addr 
+6c5c 58000000 setarg gpcfg_high_impedance 
+6c5d 20206c59 branch gpio_write 
+
+gpio_addr:
+6c5e 18417e3f and temp ,0x3f ,pdata 
+6c5f 1fe67c0c sub pdata ,gpio_number + -1 ,null 
+6c60 24213aba nbranch assert ,positive 
+6c61 d8a08070 arg core_gpio_conf ,contw 
+
+gpio_addr_next:
+6c62 98a08a00 iadd contw ,contw 
+6c63 20600000 rtn 
+
+gpio_config_param:
+6c64 1fe104ff and pdata ,0xff ,temp 
+6c65 1fecfe00 rshift8 pdata ,pdata 
+6c66 20206c68 branch gpio_config_function_int 
+
+gpio_config_function:
+6c67 c4038000 rtnbit0 gpio_active_bit 
+
+gpio_config_function_int:
+6c68 1fe17e3f and_into 0x3f ,pdata 
+6c69 1fe67c0c sub pdata ,gpio_number + -1 ,null 
+6c6a 24213aba nbranch assert ,positive 
+6c6b d8a08070 arg core_gpio_conf ,contw 
+
+gpio_config_function_int_next:
+6c6c 98a08a00 iadd contw ,contw 
+6c6d e0408005 istoret 1 ,contw 
+6c6e 20600000 rtn 
+
+gpio_get_config:
+6c6f 1841043f and_into 0x3f ,temp 
+6c70 58008070 setarg core_gpio_conf 
+6c71 98408c00 iadd temp ,contr 
+6c72 efe08006 ifetch 1 ,contr 
+6c73 20600000 rtn 
+
+gpio_set_before_lpm:
+6c74 df20000d arg gpio_number ,loopcnt 
+6c75 d8c08070 arg core_gpio_conf ,contr 
+
+setgpio_loop:
+6c76 18c20a00 copy contr ,contw 
+6c77 efe08006 ifetch 1 ,contr 
+6c78 c00fec82 beq gpcfg_spid_miso ,setgpio_pullup 
+6c79 c0106c82 beq gpcfg_spid_ncs ,setgpio_pullup 
+6c7a c010ec82 beq gpcfg_spid_sck ,setgpio_pullup 
+6c7b c0116c82 beq gpcfg_spid_mosi ,setgpio_pullup 
+6c7c c011ec82 beq gpcfg_spid_sdio ,setgpio_pullup 
+6c7d c0166c82 beq gpcfg_iic_scl ,setgpio_pullup 
+6c7e c016ec82 beq gpcfg_iic_sda ,setgpio_pullup 
+6c7f c0006c82 beq gpcfg_input ,setgpio_pullup 
+
+setgpio_loop_end:
+6c80 c2006c76 loop setgpio_loop 
+6c81 20600000 rtn 
+
+setgpio_pullup:
+6c82 58000040 setarg gpcfg_pullup 
+6c83 e7e08005 istore 1 ,contw 
+6c84 20206c80 branch setgpio_loop_end 
+
+setgpio_pulldown:
+6c85 58000080 setarg gpcfg_pulldown 
+6c86 e7e08005 istore 1 ,contw 
+6c87 20206c80 branch setgpio_loop_end 
+
+adc_init_data:
+6c88 44ca4012 bpatch patch12_4 ,mem_patch12 
+6c89 580007e0 setarg otp_offset_adc_param 
+6c8a da2043b2 arg mem_3v_adc_io_data ,rega 
+6c8b d840000c arg 12 ,temp 
+6c8c 204068ac call otpd_read_data_with_pwr_operation 
+6c8d 6fe443b2 fetch 8 ,mem_3v_adc_io_data 
+6c8e 247a0000 nrtn blank 
+
+adc_init_cal_data_default:
+6c8f 5800469a setarg 0x469a 
+6c90 67e143b2 store 2 ,mem_3v_adc_io_data 
+6c91 5800ab77 setarg 0xab77 
+6c92 67e143b8 store 2 ,mem_1v_adc_io_data 
+6c93 580073d0 setarg 0x73d0 
+6c94 67e143bc store 2 ,mem_3v_adc_vinlpm_data 
+6c95 58009658 setarg 0x9658 
+6c96 67e143b6 store 2 ,mem_2v_adc_vinlpm_data 
+6c97 20600000 rtn 
+
+enable_adc:
+6c98 44cac012 bpatch patch12_5 ,mem_patch12 
+6c99 6a508a12 fetchr regb ,1 ,core_rf_ldo_cfg6 
+6c9a 708a123d jam 0x3d ,core_rf_ldo_cfg6 
+6c9b 708a11aa jam 0xaa ,core_rf_ldo_cfg5 
+6c9c 708a0a0c jam 0x0c ,core_rf_ldo_en0 
+6c9d 6ff08a09 fetch 1 ,core_clkpll_cfg6 
+6c9e 79207e07 set1 7 ,pdata 
+6c9f 67f08a09 store 1 ,core_clkpll_cfg6 
+6ca0 708a0b04 jam 0x04 ,core_rf_ldo_en1 
+6ca1 2000003c nop 60 
+6ca2 708a1600 jam 0 ,core_syn_en 
+6ca3 708a1706 jam 6 ,core_rx_en0 
+6ca4 20406cb4 call read_adc_mode 
+6ca5 67f08a97 store 1 ,core_gpadc_ctrl 
+6ca6 7080c603 jam 0x03 ,core_sum_ctrl 
+6ca7 2000003c nop 60 
+6ca8 6ff08053 fetch 1 ,core_sum_en 
+6ca9 79207e07 set1 7 ,pdata 
+6caa 67f08053 store 1 ,core_sum_en 
+6cab 200003e8 nop 1000 
+6cac 6ff1014c fetch 2 ,core_adc_sum 
+6cad 67e143c4 store 2 ,mem_adc_current_value 
+6cae 6ff08053 fetch 1 ,core_sum_en 
+6caf 793ffe07 set0 7 ,pdata 
+6cb0 67f08053 store 1 ,core_sum_en 
+6cb1 708a9700 jam 0 ,core_gpadc_ctrl 
+6cb2 62508a12 storer regb ,1 ,core_rf_ldo_cfg6 
+6cb3 20600000 rtn 
+
+read_adc_mode:
+6cb4 44cb4012 bpatch patch12_6 ,mem_patch12 
+6cb5 6fe0c3c2 fetch 1 ,mem_adc_config_flag 
+6cb6 c0006cbc beq adc_config_vinlpm ,adc_mode_vdcdc 
+6cb7 c000ecbe beq adc_config_hvin ,adc_adc_mode_vbat 
+
+adc_check_gpio:
+6cb8 6fe0c3c3 fetch 1 ,mem_adc_channel 
+6cb9 1fe9fe00 lshift3 pdata ,pdata 
+6cba 1fe1fe07 or pdata ,7 ,pdata 
+6cbb 20600000 rtn 
+
+adc_mode_vdcdc:
+6cbc 58000057 setarg 0x57 
+6cbd 20600000 rtn 
+
+adc_adc_mode_vbat:
+6cbe 5800004f setarg 0x4f 
+6cbf 20600000 rtn 
+
+vdd_calculate_by_mode:
+6cc0 44cbc012 bpatch patch12_7 ,mem_patch12 
+6cc1 6fe0c3c2 fetch 1 ,mem_adc_config_flag 
+6cc2 c0006cc6 beq adc_config_vinlpm ,vdd_calculate_vinlpm 
+6cc3 c000eccc beq adc_config_hvin ,vdd_calculate_hvin 
+6cc4 c0016cd2 beq adc_config_gpio ,vdd_calculate_io 
+6cc5 20600000 rtn 
+
+vdd_calculate_vinlpm:
+6cc6 58000064 setarg 100 
+6cc7 67e143c0 store 2 ,mem_reference_voltage 
+6cc8 684943bc fetcht 2 ,mem_3v_adc_vinlpm_data 
+6cc9 6fe143b6 fetch 2 ,mem_2v_adc_vinlpm_data 
+6cca da60012c arg 300 ,regc 
+6ccb 20206cd7 branch vdd_calculate 
+
+vdd_calculate_hvin:
+6ccc 58000064 setarg 100 
+6ccd 67e143c0 store 2 ,mem_reference_voltage 
+6cce 684943ba fetcht 2 ,mem_3v_adc_hvin_data 
+6ccf 6fe143b4 fetch 2 ,mem_2v_adc_hvin_data 
+6cd0 da60012c arg 300 ,regc 
+6cd1 20206cd7 branch vdd_calculate 
+
+vdd_calculate_io:
+6cd2 580000c8 setarg 200 
+6cd3 67e143c0 store 2 ,mem_reference_voltage 
+6cd4 684943b2 fetcht 2 ,mem_3v_adc_io_data 
+6cd5 6fe143b8 fetch 2 ,mem_1v_adc_io_data 
+6cd6 da60012c arg 300 ,regc 
+
+vdd_calculate:
+6cd7 98462200 isub temp ,rega 
+6cd8 6fe143c4 fetch 2 ,mem_adc_current_value 
+6cd9 98467e00 isub temp ,pdata 
+6cda 24216ce6 nbranch vdd_calculate1 ,positive 
+6cdb 684943c0 fetcht 2 ,mem_reference_voltage 
+6cdc 984fa400 imul32 temp ,regb 
+6cdd 1a627e00 copy regc ,pdata 
+6cde 9a2ffe00 imul32 rega ,pdata 
+6cdf 9a467e00 isub regb ,pdata 
+6ce0 44cc4013 bpatch patch13_0 ,mem_patch13 
+6ce1 24217646 nbranch set_pdata_0 ,positive 
+
+vdd_calculate2:
+6ce2 9a26fc00 idiv rega 
+6ce3 204075d0 call wait_div_end 
+6ce4 1807fe00 quotient pdata 
+6ce5 20600000 rtn 
+
+vdd_calculate1:
+6ce6 18427e00 copy temp ,pdata 
+6ce7 684943c4 fetcht 2 ,mem_adc_current_value 
+6ce8 98467e00 isub temp ,pdata 
+6ce9 684943c0 fetcht 2 ,mem_reference_voltage 
+6cea 984fa400 imul32 temp ,regb 
+6ceb 1a627e00 copy regc ,pdata 
+6cec 9a2ffe00 imul32 rega ,pdata 
+6ced 9a40fe00 iadd regb ,pdata 
+6cee 20206ce2 branch vdd_calculate2 
+
+adc_bat_percent_lowpower_out:
+6cef efe40011 ifetch 8 ,rega 
+6cf0 67e404c4 store 8 ,mem_pdatatemp 
+6cf1 6fe104c4 fetch 2 ,mem_pdatatemp 
+6cf2 684904c6 fetcht 2 ,mem_pdatatemp + 2 
+6cf3 98462200 isub temp ,rega 
+6cf4 6fe104ca fetch 2 ,mem_pdatatemp + 6 
+6cf5 98462400 isub temp ,regb 
+6cf6 684904c8 fetcht 2 ,mem_pdatatemp + 4 
+6cf7 98467c00 isub temp ,null 
+6cf8 24416cff ncall adc_set_low_power_flag ,positive 
+6cf9 1a4ffe64 mul32 regb ,100 ,pdata 
+6cfa 9a26fc00 idiv rega 
+6cfb 204075d0 call wait_div_end 
+6cfc 1807fe00 quotient pdata 
+6cfd 205a6d07 call adc_set_no_power_flag ,blank 
+6cfe 20600000 rtn 
+
+adc_set_low_power_flag:
+6cff 6fe0c3c6 fetch 1 ,mem_adc_power_flag 
+6d00 79207e00 set1 0 ,pdata 
+6d01 67e0c3c6 store 1 ,mem_adc_power_flag 
+6d02 20600000 rtn 
+
+adc_clear_low_power_flag:
+6d03 6fe0c3c6 fetch 1 ,mem_adc_power_flag 
+6d04 793ffe00 set0 0 ,pdata 
+6d05 67e0c3c6 store 1 ,mem_adc_power_flag 
+6d06 20600000 rtn 
+
+adc_set_no_power_flag:
+6d07 6848c3c6 fetcht 1 ,mem_adc_power_flag 
+6d08 79200401 set1 1 ,temp 
+6d09 6048c3c6 storet 1 ,mem_adc_power_flag 
+6d0a 20600000 rtn 
+
+adc_clear_no_power_flag:
+6d0b 6848c3c6 fetcht 1 ,mem_adc_power_flag 
+6d0c 793f8401 set0 1 ,temp 
+6d0d 6048c3c6 storet 1 ,mem_adc_power_flag 
+6d0e 20600000 rtn 
+
+keyscan_key_init:
+6d0f 6fe143da fetch 2 ,mem_key_num_ptr 
+6d10 efe0803f ifetch 1 ,pdata 
+
+keyscan_key_init_next:
+6d11 207a0000 rtn blank 
+6d12 1fe27200 copy pdata ,loopcnt 
+6d13 6fe143da fetch 2 ,mem_keyscan_ptr 
+6d14 1fe0fe03 increase 3 ,pdata 
+6d15 1fe22200 copy pdata ,rega 
+
+keyscan_key_init_lp1:
+6d16 e8408011 ifetcht 1 ,rega 
+6d17 20406c29 call gpio_config_input 
+6d18 1a20a201 increase key_conf_struct_len ,rega 
+6d19 c2006d16 loop keyscan_key_init_lp1 
+
+keyscan_key_init_end:
+6d1a 20600000 rtn 
+
+keyscan_scan_key:
+6d1b 6fe143da fetch 2 ,mem_keyscan_ptr 
+6d1c 1fe0fe03 increase 3 ,pdata 
+6d1d 1fe22200 copy pdata ,rega 
+6d1e 18002400 force 0 ,regb 
+6d1f 58000000 setarg 0 
+6d20 67e10546 store 2 ,mem_key_value_temp 
+
+keyscan_scan_key_lp1:
+6d21 e8408011 ifetcht 1 ,rega 
+6d22 20406c32 call gpio_get_bit 
+6d23 44ccc013 bpatch patch13_1 ,mem_patch13 
+6d24 6fe10546 fetch 2 ,mem_key_value_temp 
+6d25 1a420e00 copy regb ,queue 
+6d26 f920fe00 qsetflag true ,pdata 
+6d27 67e10546 store 2 ,mem_key_value_temp 
+6d28 1a20a201 increase key_conf_struct_len ,rega 
+6d29 1a40a401 increase 1 ,regb 
+6d2a 6fe143da fetch 2 ,mem_key_num_ptr 
+6d2b efe0803f ifetch 1 ,pdata 
+
+keyscan_scan_key_lp1_next:
+6d2c 9a42fc00 ixor regb ,null 
+6d2d 2422ed21 nbranch keyscan_scan_key_lp1 ,zero 
+6d2e 6fe10546 fetch 2 ,mem_key_value_temp 
+6d2f 684943dc fetcht 2 ,mem_key_value_retention 
+6d30 9842fc00 ixor temp ,null 
+6d31 20628000 rtn zero 
+6d32 78347c00 enable user 
+6d33 20600000 rtn 
+
+keyscan_process_lpm_before:
+6d34 6fe143da fetch 2 ,mem_key_num_ptr 
+6d35 efe0803f ifetch 1 ,pdata 
+
+keyscan_process_lpm_before_next:
+6d36 207a0000 rtn blank 
+6d37 1fe27200 copy pdata ,loopcnt 
+6d38 6fe143da fetch 2 ,mem_keyscan_ptr 
+6d39 1fe0fe03 increase 3 ,pdata 
+6d3a 1fe22200 copy pdata ,rega 
+
+keyscan_process_lpm_before_lp1:
+6d3b e8408011 ifetcht 1 ,rega 
+6d3c 20406c0b call gpio_set_wake_by_current_state 
+6d3d 1a20a201 increase key_conf_struct_len ,rega 
+6d3e c2006d3b loop keyscan_process_lpm_before_lp1 
+
+keyscan_process_lpm_before_end:
+6d3f 20600000 rtn 
+
+keyscan_key_process:
+6d40 d8e00009 arg key_scan_timer ,queue 
+6d41 2040755d call timer_check 
+6d42 247a0000 nrtn blank 
+6d43 58000020 setarg 0x20 
+6d44 d8e00009 arg key_scan_timer ,queue 
+6d45 2040754f call timer_init 
+6d46 78547c00 disable user 
+6d47 20406d34 call keyscan_process_lpm_before 
+6d48 44cd4013 bpatch patch13_2 ,mem_patch13 
+6d49 6fe143da fetch 2 ,mem_key_num_ptr 
+6d4a efe0803f ifetch 1 ,pdata 
+
+keyscan_key_process_next:
+6d4b 207a0000 rtn blank 
+6d4c 20406d1b call keyscan_scan_key 
+6d4d 24347011 nbranch lpm_button_clean_wake_lock ,user 
+6d4e 2040700f call lpm_button_get_wake_lock 
+6d4f 78547c00 disable user 
+6d50 6fe10546 fetch 2 ,mem_key_value_temp 
+6d51 67e1054d store 2 ,mem_key_value_temp4 
+6d52 70054f00 jam 0 ,mem_key_value_temp6 
+6d53 18000e00 force 0 ,queue 
+
+keyscan_key_lp1:
+6d54 6fe143dc fetch 2 ,mem_key_value_retention 
+6d55 1fe30400 rshift pdata ,temp 
+6d56 604943dc storet 2 ,mem_key_value_retention 
+6d57 1fe17e01 and pdata ,0x01 ,pdata 
+6d58 6849054d fetcht 2 ,mem_key_value_temp4 
+6d59 18412201 and temp ,0x01 ,rega 
+6d5a 18430400 rshift temp ,temp 
+6d5b 6049054d storet 2 ,mem_key_value_temp4 
+6d5c 9a22fc00 ixor rega ,null 
+6d5d 2442ed69 ncall keyscan_send_key_data ,zero 
+6d5e 6fe143da fetch 2 ,mem_key_num_ptr 
+6d5f efe0803f ifetch 1 ,pdata 
+
+keyscan_key_lp1_next:
+6d60 6848854f fetcht 1 ,mem_key_value_temp6 
+6d61 18408401 increase 1 ,temp 
+6d62 6048854f storet 1 ,mem_key_value_temp6 
+6d63 18420e00 copy temp ,queue 
+6d64 98e2fc00 ixor queue ,null 
+6d65 2422ed54 nbranch keyscan_key_lp1 ,zero 
+6d66 6fe10546 fetch 2 ,mem_key_value_temp 
+6d67 67e143dc store 2 ,mem_key_value_retention 
+6d68 20600000 rtn 
+
+keyscan_send_key_data:
+6d69 44cdc013 bpatch patch13_3 ,mem_patch13 
+6d6a 6fe143da fetch 2 ,mem_keyscan_ptr 
+6d6b 1fe0fe01 increase 1 ,pdata 
+6d6c efe1003f ifetch 2 ,pdata 
+6d6d 202075e6 branch callback_func 
+
+pwm_init:
+6d6e 6ff08042 fetch 1 ,core_clksel 
+6d6f 9a21fe00 ior rega ,pdata 
+6d70 67f08042 store 1 ,core_clksel 
+6d71 6ff10050 fetch 2 ,core_clkoff 
+6d72 793ffe0d set0 clock_off_pwm ,pdata 
+6d73 67f10050 store 2 ,core_clkoff 
+
+delay_nop100:
+6d74 20000064 nop 100 
+6d75 20600000 rtn 
+
+pwm_clk_set:
+6d76 6ff08042 fetch 1 ,core_clksel 
+6d77 c2836d7b bbit1 6 ,pwm_24m_clk_set 
+6d78 c283ed7d bbit1 7 ,pwm_33k_clk_set 
+
+pwm_12m_clk_set:
+6d79 58b71b00 setarg pwm_12mhz 
+6d7a 20600000 rtn 
+
+pwm_24m_clk_set:
+6d7b 596e3600 setarg pwm_24mhz 
+6d7c 20600000 rtn 
+
+pwm_33k_clk_set:
+6d7d 580080e8 setarg pwm_33khz 
+6d7e 20600000 rtn 
+
+pwm_out_set:
+6d7f 684984c6 fetcht 3 ,mem_pdatatemp + 2 
+6d80 20406d76 call pwm_clk_set 
+6d81 9846fc00 idiv temp 
+6d82 204075d0 call wait_div_end 
+6d83 18078400 quotient temp 
+6d84 6fe084c9 fetch 1 ,mem_pdatatemp + 5 
+6d85 984ffe00 imul32 temp ,pdata 
+6d86 1fe6fc64 div pdata ,100 
+6d87 204075d0 call wait_div_end 
+6d88 1807a200 quotient rega 
+6d89 18427e00 copy temp ,pdata 
+6d8a 9a262400 isub rega ,regb 
+6d8b 6fe084c5 fetch 1 ,mem_pdatatemp + 1 
+6d8c 20406d93 call pwm_duty_cycle_set 
+6d8d 6fe084c4 fetch 1 ,mem_pdatatemp 
+6d8e 684884c5 fetcht 1 ,mem_pdatatemp + 1 
+6d8f 1841040f and_into 0x0f ,temp 
+6d90 184d0400 lshift8 temp ,temp 
+6d91 9841fe00 ior temp ,pdata 
+6d92 20206dd3 branch pwm_enable 
+
+pwm_duty_cycle_set:
+6d93 98000e00 iforce queue 
+6d94 20406da1 call pwm_duty_cycle_set_without_autoload 
+6d95 20206d96 branch pwm_autoload_set 
+
+pwm_autoload_set:
+6d96 6ff080c5 fetch 1 ,core_pwm_autoload 
+6d97 f9207e00 qset1 pdata 
+6d98 67f080c5 store 1 ,core_pwm_autoload 
+6d99 68588042 fetcht 1 ,core_clksel 
+6d9a 284ffe07 isolate1 7 ,temp 
+6d9b 2040ed9f call delay_1clk_of_33k ,true 
+6d9c f93ffe00 qset0 pdata 
+6d9d 67f080c5 store 1 ,core_pwm_autoload 
+6d9e 20600000 rtn 
+
+delay_1clk_of_33k:
+6d9f 200001e0 nop 480 
+6da0 20600000 rtn 
+
+pwm_duty_cycle_set_without_autoload:
+6da1 1fe17e0f and_into 0x0f ,pdata 
+6da2 d8a0809c arg core_pwm_pcnt0 ,contw 
+6da3 1feffe04 mul32 pdata ,4 ,pdata 
+6da4 98a08a00 iadd contw ,contw 
+6da5 1a227e00 copy rega ,pdata 
+6da6 e7e10005 istore 2 ,contw 
+6da7 1a427e00 copy regb ,pdata 
+6da8 e7e10005 istore 2 ,contw 
+6da9 20600000 rtn 
+
+pwm_enable_in_syncmode:
+6daa 1a4c8e00 rshift8 regb ,queue 
+6dab 20406dc8 call pwm_init_bit_set 
+6dac 1a4c8e00 rshift8 regb ,queue 
+6dad 20406dc2 call pwm_syncmode_set 
+6dae 1a2c8e00 rshift8 rega ,queue 
+6daf 7820fc00 enable true 
+6db0 20406dc3 call pwm_syncmode_set_process 
+6db1 1a227e00 deposit rega 
+6db2 20406dce call pwm_gpio_select 
+6db3 1a427e00 deposit regb 
+6db4 20206dd3 branch pwm_enable 
+
+pwm_disable_in_syncmode:
+6db5 1a227e00 deposit rega 
+6db6 20406dd6 call pwm_disable 
+6db7 1a427e00 deposit regb 
+6db8 20406dd6 call pwm_disable 
+6db9 1a2c8e00 rshift8 rega ,queue 
+6dba 7840fc00 disable true 
+6dbb 20406dc3 call pwm_syncmode_set_process 
+6dbc 1a4c8e00 rshift8 regb ,queue 
+6dbd 7840fc00 disable true 
+6dbe 20406dc9 call pwm_init_bit_set_process 
+6dbf 1a4c8e00 rshift8 regb ,queue 
+6dc0 7840fc00 disable true 
+6dc1 20206dc3 branch pwm_syncmode_set_process 
+
+pwm_syncmode_set:
+6dc2 28effe07 isolate1 7 ,queue 
+
+pwm_syncmode_set_process:
+6dc3 18e10e0f and queue ,0x0f ,queue 
+6dc4 6ff080c3 fetch 1 ,core_pwm_sync 
+6dc5 f920fe00 qsetflag true ,pdata 
+6dc6 67f080c3 store 1 ,core_pwm_sync 
+6dc7 20600000 rtn 
+
+pwm_init_bit_set:
+6dc8 28effe06 isolate1 6 ,queue 
+
+pwm_init_bit_set_process:
+6dc9 18e10e0f and queue ,0x0f ,queue 
+6dca 6ff0809b fetch 1 ,core_pwm_init 
+6dcb f920fe00 qsetflag true ,pdata 
+6dcc 67f0809b store 1 ,core_pwm_init 
+6dcd 20600000 rtn 
+
+pwm_gpio_select:
+6dce 20406dde call pwm_select_channel 
+
+pwm_gpio_select_process:
+6dcf 1fed7e00 lshift8 pdata ,pdata 
+6dd0 18e08410 add queue ,gpcfg_pwm_out0 ,temp 
+6dd1 9841fe00 ior temp ,pdata 
+6dd2 20206c64 branch gpio_config_param 
+
+pwm_enable:
+6dd3 78347c00 enable user 
+6dd4 20406dce call pwm_gpio_select 
+6dd5 20206dd9 branch pwm_set_select 
+
+pwm_disable:
+6dd6 78547c00 disable user 
+6dd7 20406dde call pwm_select_channel 
+6dd8 20206dd9 branch pwm_set_select 
+
+pwm_set_select:
+6dd9 18e10e0f and queue ,0x0f ,queue 
+6dda 6ff0809a fetch 1 ,core_pwm_en 
+6ddb f9347e00 qsetflag user ,pdata 
+6ddc 67f0809a store 1 ,core_pwm_en 
+6ddd 20600000 rtn 
+
+pwm_select_channel:
+6dde 1fec8e00 rshift8 pdata ,queue 
+6ddf 18e10e0f and queue ,0x0f ,queue 
+6de0 20600000 rtn 
+
+wdt_init_config:
+6de1 1fe20400 copy pdata ,temp 
+6de2 44ce4013 bpatch patch13_4 ,mem_patch13 
+6de3 20406dee call wdt_set_enable 
+6de4 58000800 setarg 2048 
+6de5 98467e00 isub temp ,pdata 
+6de6 1fe20400 copy pdata ,temp 
+6de7 18518400 rshift4 temp ,temp 
+6de8 60588004 storet 1 ,core_write_wdt 
+6de9 20000578 nop 1400 
+6dea 1fe20400 copy pdata ,temp 
+6deb 1841040f and_into 0x0f ,temp 
+6dec 6058800b storet 1 ,core_write_wdt2 
+6ded 20600000 rtn 
+
+wdt_set_enable:
+6dee 78367c00 enable user2 
+6def 20206df2 branch wdt_init_set 
+
+wdt_set_disable:
+6df0 44cec013 bpatch patch13_5 ,mem_patch13 
+6df1 78567c00 disable user2 
+
+wdt_init_set:
+6df2 6ff08043 fetch 1 ,core_config 
+6df3 79367e03 setflag user2 ,3 ,pdata 
+6df4 67f08043 store 1 ,core_config 
+6df5 20600000 rtn 
+
+nec61212_init:
+6df6 d8400031 arg fun_nec_enable | fun_nec_clk_divide_24 ,temp 
+
+nec_init_config:
+6df7 67f20061 store 4 ,core_nec_start_addr 
+6df8 67f10065 store 2 ,core_nec_rptr 
+6df9 60588067 storet 1 ,core_nec_control 
+6dfa 20600000 rtn 
+
+nec_check_rxbuff_size:
+6dfb 6ff1012c fetch 2 ,core_nec_rxitem 
+6dfc 20600000 rtn 
+
+nec_prepare_read:
+6dfd 68710065 fetchr contu ,2 ,core_nec_rptr 
+6dfe 69510061 fetchr contus ,2 ,core_nec_start_addr 
+6dff 6a110063 fetchr contue ,2 ,core_nec_end_addr 
+6e00 20600000 rtn 
+
+nec_read_done:
+6e01 60710065 storer contu ,2 ,core_nec_rptr 
+6e02 20600000 rtn 
+
+nec_parse_nec61212:
+6e03 20407636 call enable_user 
+6e04 dd600000 arg 0 ,rege 
+6e05 20406dfb call nec_check_rxbuff_size 
+6e06 c0016e45 beq 2 ,nec_parse_nec61212_check_timeout 
+6e07 1fe67c04 sub pdata ,4 ,null 
+6e08 20610000 rtn positive 
+6e09 20406dfd call nec_prepare_read 
+6e0a e8410003 ifetcht 2 ,contu 
+6e0b 5800a654 setarg nec61212_data2repeat_time 
+6e0c 20406e4e call nec_check_pulse_range_legal_default_deviation 
+6e0d 24216e33 nbranch nec_parse_nec61212_check_repeat_data ,positive 
+6e0e 1b020400 copy regd ,temp 
+6e0f 58017f8e setarg nec61212_repeat2repeat_time 
+6e10 20406e4e call nec_check_pulse_range_legal_default_deviation 
+6e11 24216e33 nbranch nec_parse_nec61212_check_repeat_data ,positive 
+6e12 1b020400 copy regd ,temp 
+6e13 58002328 setarg nec61212_boot_code_start_time 
+6e14 20406e4e call nec_check_pulse_range_legal_default_deviation 
+6e15 20216e2a branch nec_parse_nec61212_error_data ,positive 
+6e16 e8410003 ifetcht 2 ,contu 
+6e17 58001194 setarg nec61212_boot_code_end_time 
+6e18 20406e4e call nec_check_pulse_range_legal_default_deviation 
+6e19 20216e2a branch nec_parse_nec61212_error_data ,positive 
+6e1a 20406dfb call nec_check_rxbuff_size 
+6e1b 1fe67c85 sub pdata ,133 ,null 
+6e1c 20610000 rtn positive 
+6e1d df200020 arg 32 ,loopcnt 
+
+nec_parse_nec61212_data:
+6e1e e8410003 ifetcht 2 ,contu 
+6e1f 58000230 setarg nec61212_data_bit_1_start_time 
+6e20 20406e4e call nec_check_pulse_range_legal_default_deviation 
+6e21 20216e2a branch nec_parse_nec61212_error_data ,positive 
+6e22 e8410003 ifetcht 2 ,contu 
+6e23 5800069a setarg nec61212_data_bit_1_end_time 
+6e24 20406e4e call nec_check_pulse_range_legal_default_deviation 
+6e25 24216e2f nbranch nec_parse_nec61212_add_bit1 ,positive 
+6e26 1b020400 copy regd ,temp 
+6e27 58000230 setarg nec61212_data_bit_0_end_time 
+6e28 20406e4e call nec_check_pulse_range_legal_default_deviation 
+6e29 24216e30 nbranch nec_parse_nec61212_add_bit0 ,positive 
+
+nec_parse_nec61212_error_data:
+6e2a 1b020400 copy regd ,temp 
+6e2b 5800ffff setarg nec61212_timeout_time 
+6e2c 98467c00 isub temp ,null 
+6e2d 2022ee4a branch nec_parse_nec61212_check_timeout_cb ,zero 
+6e2e 20206e01 branch nec_read_done 
+
+nec_parse_nec61212_add_bit1:
+6e2f 79205620 set1 32 ,rege 
+
+nec_parse_nec61212_add_bit0:
+6e30 1d635600 rshift rege ,rege 
+6e31 c2006e1e loop nec_parse_nec61212_data 
+6e32 20206e3e branch nec_parse_nec61212_check_stop_bit 
+
+nec_parse_nec61212_check_repeat_data:
+6e33 20406dfb call nec_check_rxbuff_size 
+6e34 1fe67c07 sub pdata ,7 ,null 
+6e35 20610000 rtn positive 
+6e36 e8410003 ifetcht 2 ,contu 
+6e37 58002328 setarg nec61212_repeat_start_time 
+6e38 20406e4e call nec_check_pulse_range_legal_default_deviation 
+6e39 20216e2a branch nec_parse_nec61212_error_data ,positive 
+6e3a e8410003 ifetcht 2 ,contu 
+6e3b 580008ca setarg nec61212_repeat_end_time 
+6e3c 20406e4e call nec_check_pulse_range_legal_default_deviation 
+6e3d 20216e2a branch nec_parse_nec61212_error_data ,positive 
+
+nec_parse_nec61212_check_stop_bit:
+6e3e e8410003 ifetcht 2 ,contu 
+6e3f 58000230 setarg nec61212_stop_time 
+6e40 20406e4e call nec_check_pulse_range_legal_default_deviation 
+6e41 20216e2a branch nec_parse_nec61212_error_data ,positive 
+6e42 20406e01 call nec_read_done 
+6e43 1a627e00 copy regc ,pdata 
+6e44 202075e6 branch callback_func 
+
+nec_parse_nec61212_check_timeout:
+6e45 20406dfd call nec_prepare_read 
+6e46 e8410003 ifetcht 2 ,contu 
+6e47 5800ffff setarg nec61212_timeout_time 
+6e48 98467c00 isub temp ,null 
+6e49 24628000 nrtn zero 
+
+nec_parse_nec61212_check_timeout_cb:
+6e4a 20406e01 call nec_read_done 
+6e4b 20407638 call disable_user 
+6e4c 1a627e00 copy regc ,pdata 
+6e4d 202075e6 branch callback_func 
+
+nec_check_pulse_range_legal_default_deviation:
+6e4e 6a40c3ea fetchr regb ,1 ,mem_nec_decode_error_value 
+
+nec_check_pulse_range_legal:
+6e4f 18423000 copy temp ,regd 
+6e50 9a4fa400 imul32 regb ,regb 
+6e51 18438400 lshift temp ,temp 
+6e52 98462200 isub temp ,rega 
+6e53 24416e57 ncall nec_check_pulse_range_legal_data_negative ,positive 
+6e54 1a2ffe64 mul32 rega ,100 ,pdata 
+6e55 9a467c00 isub regb ,null 
+6e56 20600000 rtn 
+
+nec_check_pulse_range_legal_data_negative:
+6e57 1a262200 sub rega ,0 ,rega 
+6e58 20600000 rtn 
+
+generate_stk:
+6e59 44d24014 bpatch patch14_4 ,mem_patch14 
+6e5a 20406f42 call function_s1 
+6e5b d8a0424a arg mem_le_ltk ,contw 
+6e5c 20206fb1 branch store_aes_result 
+
+authenticate_rconfirm:
+6e5d d8a0426b arg mem_le_srand ,contw 
+6e5e 2034ee60 branch authenticate_mconfirm ,master 
+6e5f d8a00153 arg mem_le_mrand ,contw 
+
+authenticate_mconfirm:
+6e60 18c22200 copy contr ,rega 
+6e61 204074f5 call memcpy16 
+6e62 20406f57 call function_c1 
+6e63 d8c0425b arg mem_le_rconfirm ,contr 
+6e64 20206fca branch compare_res 
+
+generate_confirm:
+6e65 da200153 arg mem_le_mrand ,rega 
+6e66 2034ee68 branch generate_mrand ,master 
+6e67 da20426b arg mem_le_srand ,rega 
+
+generate_mrand:
+6e68 1a220a00 copy rega ,contw 
+6e69 20407661 call generate_random 
+6e6a 20206f57 branch function_c1 
+
+generate_sk:
+6e6b d8c042b8 arg mem_le_skdm ,contr 
+6e6c 20406f9d call load_data128 
+6e6d d8c0424a arg mem_le_ltk ,contr 
+6e6e 20406f9e call load_regext 
+6e6f 18006c38 force 0x38 ,aes_ctrl 
+6e70 18006c00 force 0x0 ,aes_ctrl 
+6e71 20406f0b call wait_aes 
+6e72 d8a001a3 arg mem_le_sk ,contw 
+6e73 20206fb1 branch store_aes_result 
+
+ccm_b0:
+6e74 18007008 force regidx_xor ,regext_index 
+6e75 18007e49 force 0x49 ,pdata 
+6e76 20206e7b branch iv_common 
+
+first_block_counter:
+6e77 18007e49 force 0x49 ,pdata 
+6e78 20206e7a branch first_block 
+
+first_block_data:
+6e79 18007e01 force 1 ,pdata 
+
+first_block:
+6e7a 18007000 force regidx_data ,regext_index 
+
+iv_common:
+6e7b 184d5e00 lshift8 temp ,regext 
+6e7c 9de1de00 ior regext ,regext 
+6e7d 1f00f001 increase 1 ,regext_index 
+6e7e 184cde00 rshift8 temp ,regext 
+6e7f 1df15e00 rshift16 regext ,regext 
+6e80 6fe1440b fetch 2 ,mem_ccm_iv 
+6e81 1ff07e00 lshift16 pdata ,pdata 
+6e82 9de1de00 ior regext ,regext 
+6e83 1f00f001 increase 1 ,regext_index 
+6e84 ede20006 ifetchr regext ,4 ,contr 
+6e85 1f00f001 increase 1 ,regext_index 
+6e86 efe10006 ifetch 2 ,contr 
+6e87 1a30de00 byteswap rega ,regext 
+6e88 1df05e00 lshift16 regext ,regext 
+6e89 9de1de00 ior regext ,regext 
+6e8a 1f00f001 increase 1 ,regext_index 
+6e8b 20600000 rtn 
+
+generate_mic:
+6e8c 1a608c01 add regc ,1 ,contr 
+6e8d efe08006 ifetch 1 ,contr 
+6e8e 98002200 iforce rega 
+6e8f 20406e77 call first_block_counter 
+6e90 20406f0d call do_aes_ocb 
+6e91 18007000 force regidx_data ,regext_index 
+6e92 efe08013 ifetch 1 ,regc 
+6e93 1fe17e03 and_into 0x3 ,pdata 
+6e94 1ff05e00 lshift16 pdata ,regext 
+6e95 79205e08 set1 8 ,regext 
+6e96 20406fa6 call clear_hidata 
+6e97 20406f10 call do_aes_cbc 
+6e98 1a227200 copy rega ,loopcnt 
+6e99 1a608c02 add regc ,2 ,contr 
+6e9a 20406f85 call padding_data 
+
+generate_mic_loop:
+6e9b 20406f8f call aes_load_data 
+6e9c 20406f10 call do_aes_cbc 
+6e9d 1f227e00 deposit loopcnt 
+6e9e 203a6ea0 branch generate_mic_end ,blank 
+6e9f 20206e9b branch generate_mic_loop 
+
+generate_mic_end:
+6ea0 1800700c force regidx_result ,regext_index 
+6ea1 1de27e00 deposit regext 
+6ea2 67e2014b store 4 ,mem_le_mic 
+6ea3 20600000 rtn 
+
+aes_crypt_data:
+6ea4 1a20a201 increase 1 ,rega 
+6ea5 20406e79 call first_block_data 
+6ea6 1a620c00 copy regc ,contr 
+6ea7 20406f99 call aes_load_xor 
+6ea8 20406f13 call do_aes_ctr 
+6ea9 20406fb8 call store_enc_data 
+6eaa 1a60a610 increase 16 ,regc 
+6eab 1a40a5f0 increase -16 ,regb 
+6eac 20216ea4 branch aes_crypt_data ,positive 
+6ead 20600000 rtn 
+
+le_decrypt_new:
+6eae 20406f00 call ccm_init_common 
+6eaf 70806c00 jam 0 ,core_ccm_aad0 
+6eb0 70806d01 jam 1 ,core_ccm_aad1 
+6eb1 6fe08047 fetch 1 ,mem_le_rxbuf_data_header 
+6eb2 1fe17e03 and_into 0x3 ,pdata 
+6eb3 67f0806e store 1 ,core_ccm_aad2 
+6eb4 58000049 setarg mem_le_rxbuf_data_payload 
+6eb5 67f10068 store 2 ,core_ccm_input_playload_addr 
+6eb6 67f1006a store 2 ,core_ccm_output_playload_addr 
+6eb7 6a208048 fetchr rega ,1 ,mem_le_rxbuf_data_length 
+6eb8 1a20a3fc increase -4 ,rega 
+6eb9 24217644 nbranch disable_blank ,positive 
+6eba 62208048 storer rega ,1 ,mem_le_rxbuf_data_length 
+6ebb 58000049 setarg mem_le_rxbuf_data_payload 
+6ebc 9a208c00 iadd rega ,contr 
+6ebd 18007000 force regidx_data ,regext_index 
+6ebe ede20006 ifetchr regext ,4 ,contr 
+6ebf 65e2014f storer regext ,4 ,mem_le_peer_mic 
+6ec0 684ac402 fetcht 5 ,mem_ccm_pcnt_rx 
+6ec1 20406e74 call ccm_b0 
+6ec2 70800a06 jam 6 ,core_ccm_ctrl 
+6ec3 70800a07 jam 7 ,core_ccm_ctrl 
+6ec4 6fe08048 fetch 1 ,mem_le_rxbuf_data_length 
+6ec5 67f100c1 store 2 ,core_ccm_inptr 
+6ec6 20406f07 call wait_ccm_done 
+6ec7 6ff08108 fetch 1 ,core_misc_status 
+6ec8 c303f644 bbit0 7 ,disable_blank 
+6ec9 684a014f fetcht 4 ,mem_le_peer_mic 
+6eca 6fe24407 fetch 4 ,mem_ccm_last_mic 
+6ecb 98467e00 isub temp ,pdata 
+6ecc 207a0000 rtn blank 
+6ecd 604a4407 storet 4 ,mem_ccm_last_mic 
+6ece 6fe2c402 fetch 5 ,mem_ccm_pcnt_rx 
+6ecf 1fe0fe01 increase 1 ,pdata 
+6ed0 79207e27 set1 le_ccm_directionbit ,pdata 
+6ed1 67e2c402 store 5 ,mem_ccm_pcnt_rx 
+6ed2 18007e00 force 0 ,pdata 
+6ed3 20600000 rtn 
+
+le_encrypt_new:
+6ed4 20406edb call le_encrypt_new_start 
+6ed5 5800412b setarg mem_le_txpayload 
+6ed6 9a20a200 iadd rega ,rega 
+6ed7 20406f07 call wait_ccm_done 
+6ed8 df00000c arg regidx_result ,regext_index 
+6ed9 e5e20011 istorer regext ,4 ,rega 
+6eda 20600000 rtn 
+
+le_encrypt_new_start:
+6edb 20406f00 call ccm_init_common 
+6edc 44d2c014 bpatch patch14_5 ,mem_patch14 
+6edd 70806c00 jam 0 ,core_ccm_aad0 
+6ede 70806d01 jam 1 ,core_ccm_aad1 
+6edf 6fe0c129 fetch 1 ,mem_le_txheader 
+6ee0 1fe17e03 and_into 0x3 ,pdata 
+6ee1 67f0806e store 1 ,core_ccm_aad2 
+6ee2 6fe104e3 fetch 2 ,mem_contr 
+6ee3 67f10068 store 2 ,core_ccm_input_playload_addr 
+6ee4 5800412b setarg mem_le_txpayload 
+6ee5 67f1006a store 2 ,core_ccm_output_playload_addr 
+6ee6 6a20c12a fetchr rega ,1 ,mem_le_txlen 
+6ee7 684ac3fd fetcht 5 ,mem_ccm_pcnt_tx 
+6ee8 20406e74 call ccm_b0 
+6ee9 70800a02 jam 2 ,core_ccm_ctrl 
+6eea 70800a03 jam 3 ,core_ccm_ctrl 
+6eeb 6fe0c12a fetch 1 ,mem_le_txlen 
+6eec 67f100c1 store 2 ,core_ccm_inptr 
+6eed 1fe0fe04 increase 4 ,pdata 
+6eee 67e0c12a store 1 ,mem_le_txlen 
+6eef 6fe2c3fd fetch 5 ,mem_ccm_pcnt_tx 
+6ef0 1fe0fe01 increase 1 ,pdata 
+6ef1 793ffe27 set0 le_ccm_directionbit ,pdata 
+6ef2 67e2c3fd store 5 ,mem_ccm_pcnt_tx 
+6ef3 20600000 rtn 
+
+ccm_wait_enc:
+6ef4 6ff1011a fetch 2 ,core_ccm_outptr 
+6ef5 98467c00 isub temp ,null 
+6ef6 20628000 rtn zero 
+6ef7 247a0000 nrtn blank 
+6ef8 20206ef4 branch ccm_wait_enc 
+
+ccm_check_enc_done:
+6ef9 6ff08108 fetch 1 ,core_misc_status 
+6efa c3033aba bbit0 6 ,assert 
+
+ccm_enc_done:
+6efb 5800412b setarg mem_le_txpayload 
+6efc 98408a00 iadd temp ,contw 
+6efd df00000c arg regidx_result ,regext_index 
+6efe e5e20005 istorer regext ,4 ,contw 
+6eff 20206f09 branch ccm_ctrl_clr 
+
+ccm_init_common:
+6f00 44d34014 bpatch patch14_6 ,mem_patch14 
+6f01 1800700c force regidx_result ,regext_index 
+6f02 20406fac call aes_clear 
+6f03 20406fab call aes_clear_data 
+6f04 58000000 setarg 0 
+6f05 67f100c1 store 2 ,core_ccm_inptr 
+6f06 20600000 rtn 
+
+wait_ccm_done:
+6f07 6ff08108 fetch 1 ,core_misc_status 
+6f08 c3036f07 bbit0 6 ,wait_ccm_done 
+
+ccm_ctrl_clr:
+6f09 70800a00 jam 0 ,core_ccm_ctrl 
+6f0a 20600000 rtn 
+
+wait_aes:
+6f0b 243bef0b nbranch wait_aes ,aes_ready 
+6f0c 20600000 rtn 
+
+do_aes_ocb:
+6f0d 18006c30 force 0x30 ,aes_ctrl 
+6f0e 18006c00 force 0x0 ,aes_ctrl 
+6f0f 20206f0b branch wait_aes 
+
+do_aes_cbc:
+6f10 18006c32 force 0x32 ,aes_ctrl 
+6f11 18006c02 force 0x2 ,aes_ctrl 
+6f12 20206f0b branch wait_aes 
+
+do_aes_ctr:
+6f13 18006c34 force 0x34 ,aes_ctrl 
+6f14 18006c04 force 0x4 ,aes_ctrl 
+6f15 20206f0b branch wait_aes 
+
+aes_init:
+6f16 18006c01 force 1 ,aes_ctrl 
+6f17 18006c00 force 0 ,aes_ctrl 
+6f18 20600000 rtn 
+
+wait_keyinit_done:
+6f19 6ff08144 fetch 1 ,core_aes_decode_key_init 
+6f1a c302ef19 bbit0 5 ,wait_keyinit_done 
+6f1b 20600000 rtn 
+
+dec_key_initial:
+6f1c 67f1007e store 2 ,core_keybuf_saddr 
+6f1d 18006cc0 force 0xc0 ,aes_ctrl 
+6f1e 18006c80 force 0x80 ,aes_ctrl 
+6f1f 20206f19 branch wait_keyinit_done 
+
+do_aes_ecb_dec:
+6f20 18007000 force regidx_data ,regext_index 
+6f21 1a420c00 copy regb ,contr 
+6f22 18007204 force 4 ,loopcnt 
+6f23 20406f2f call aes_ecb_dec_loop 
+6f24 18006d80 force 0x180 ,aes_ctrl 
+6f25 18006c80 force 0x80 ,aes_ctrl 
+6f26 20406f0b call wait_aes 
+
+ecb_dec_generate:
+6f27 1800700c force regidx_result ,regext_index 
+6f28 1a620a00 copy regc ,contw 
+6f29 18007204 force 4 ,loopcnt 
+
+ecb_dec_generate_loop:
+6f2a 1de27e00 copy regext ,pdata 
+6f2b e7e20005 istore 4 ,contw 
+6f2c 1f00f001 increase 1 ,regext_index 
+6f2d c2006f2a loop ecb_dec_generate_loop 
+6f2e 20600000 rtn 
+
+aes_ecb_dec_loop:
+6f2f efe10006 ifetch 2 ,contr 
+6f30 e8410006 ifetcht 2 ,contr 
+6f31 18500400 lshift16 temp ,temp 
+6f32 9841de00 ior temp ,regext 
+6f33 1f00f001 increase 1 ,regext_index 
+6f34 c2006f2f loop aes_ecb_dec_loop 
+6f35 20600000 rtn 
+
+do_aes_cbc_dec:
+6f36 18007008 force regidx_xor ,regext_index 
+6f37 1a220c00 copy rega ,contr 
+6f38 18007204 force 4 ,loopcnt 
+6f39 20406f2f call aes_ecb_dec_loop 
+6f3a 18007000 force regidx_data ,regext_index 
+6f3b 1a420c00 copy regb ,contr 
+6f3c 18007204 force 4 ,loopcnt 
+6f3d 20406f2f call aes_ecb_dec_loop 
+6f3e 18006d82 force 0x182 ,aes_ctrl 
+6f3f 18006c82 force 0x82 ,aes_ctrl 
+6f40 20406f0b call wait_aes 
+6f41 20206f27 branch ecb_dec_generate 
+
+function_s1:
+6f42 18007000 force regidx_data ,regext_index 
+6f43 6fe20153 fetch 4 ,mem_le_mrand 
+6f44 98005e00 iforce regext 
+6f45 1f00f001 increase 1 ,regext_index 
+6f46 efe20006 ifetch 4 ,contr 
+6f47 98005e00 iforce regext 
+6f48 1f00f001 increase 1 ,regext_index 
+6f49 6fe2426b fetch 4 ,mem_le_srand 
+6f4a 98005e00 iforce regext 
+6f4b 1f00f001 increase 1 ,regext_index 
+6f4c efe20006 ifetch 4 ,contr 
+6f4d 98005e00 iforce regext 
+6f4e 1f00f001 increase 1 ,regext_index 
+6f4f 20406fac call aes_clear 
+6f50 1f00f1fc increase -4 ,regext_index 
+6f51 6fe242d2 fetch 4 ,mem_le_tk 
+6f52 1fe25e00 copy pdata ,regext 
+6f53 1f00f004 increase 4 ,regext_index 
+6f54 18006c38 force 0x38 ,aes_ctrl 
+6f55 18006c08 force 0x8 ,aes_ctrl 
+6f56 20206f0b branch wait_aes 
+
+function_c1:
+6f57 44d3c014 bpatch patch14_7 ,mem_patch14 
+6f58 6fe342ae fetch 6 ,mem_le_lap 
+6f59 684b0173 fetcht 6 ,mem_le_plap 
+6f5a 2034ef5d branch function_c1_master ,master 
+6f5b 6fe30173 fetch 6 ,mem_le_plap 
+6f5c 684b42ae fetcht 6 ,mem_le_lap 
+
+function_c1_master:
+6f5d 18007008 force regidx_xor ,regext_index 
+6f5e 18425e00 copy temp ,regext 
+6f5f 1f00f001 increase 1 ,regext_index 
+6f60 184f5e00 rshift32 temp ,regext 
+6f61 1ff07e00 lshift16 pdata ,pdata 
+6f62 9de1de00 ior regext ,regext 
+6f63 1f00f001 increase 1 ,regext_index 
+6f64 1fef5e00 rshift32 pdata ,regext 
+6f65 1f00f001 increase 1 ,regext_index 
+6f66 18005e00 force 0 ,regext 
+6f67 18007e00 force 0 ,pdata 
+6f68 6fe0c29e fetch 1 ,mem_le_conn_peer_addr_type 
+6f69 6848c35f fetcht 1 ,mem_le_adv_own_addr_type 
+6f6a 2434ef6d nbranch function_c1_irat ,master 
+6f6b 6fe0c2a5 fetch 1 ,mem_le_conn_own_addr_type 
+6f6c 6848c29e fetcht 1 ,mem_le_conn_peer_addr_type 
+
+function_c1_irat:
+6f6d 67e0c27b store 1 ,mem_le_iat 
+6f6e 6048c27c storet 1 ,mem_le_rat 
+6f6f 18007000 force regidx_data ,regext_index 
+6f70 da40427b arg mem_le_iat ,regb 
+6f71 18007204 force 4 ,loopcnt 
+
+function_c1_loop1:
+6f72 efe20011 ifetch 4 ,rega 
+6f73 e8420012 ifetcht 4 ,regb 
+6f74 9842de00 ixor temp ,regext 
+6f75 1f00f001 increase 1 ,regext_index 
+6f76 1a20a204 increase 4 ,rega 
+6f77 1a40a404 increase 4 ,regb 
+6f78 c2006f72 loop function_c1_loop1 
+6f79 20406fac call aes_clear 
+6f7a 1f00f1fc increase -4 ,regext_index 
+6f7b 6fe242d2 fetch 4 ,mem_le_tk 
+6f7c 1fe25e00 copy pdata ,regext 
+6f7d 1f00f004 increase 4 ,regext_index 
+6f7e 18006c38 force 0x38 ,aes_ctrl 
+6f7f 18006c0c force 0xc ,aes_ctrl 
+6f80 20406f0b call wait_aes 
+6f81 20406fab call aes_clear_data 
+6f82 18006c3a force 0x3a ,aes_ctrl 
+6f83 18006c08 force 0x8 ,aes_ctrl 
+6f84 20206f0b branch wait_aes 
+
+padding_data:
+6f85 2f200600 compare 0 ,loopcnt ,3 
+6f86 20608000 rtn true 
+6f87 18c27e00 deposit contr 
+6f88 9f208a00 iadd loopcnt ,contw 
+6f89 18007e00 force 0 ,pdata 
+
+padding_loop:
+6f8a e7e08005 istore 1 ,contw 
+6f8b 1f20f201 increase 1 ,loopcnt 
+6f8c 2f200600 compare 0 ,loopcnt ,3 
+6f8d 20608000 rtn true 
+6f8e 20206f8a branch padding_loop 
+
+aes_load_data:
+6f8f 18007000 force regidx_data ,regext_index 
+
+load_data_loop:
+6f90 1f227e00 deposit loopcnt 
+6f91 203a6f94 branch load_data_padding ,blank 
+6f92 efe20006 ifetch 4 ,contr 
+6f93 1f20f3fc increase -4 ,loopcnt 
+
+load_data_padding:
+6f94 98005e00 iforce regext 
+6f95 1f00f001 increase 1 ,regext_index 
+6f96 2f001e04 compare regidx_key ,regext_index ,0xf 
+6f97 20608000 rtn true 
+6f98 20206f90 branch load_data_loop 
+
+aes_load_xor:
+6f99 18007008 force regidx_xor ,regext_index 
+6f9a 20206f9e branch load_regext 
+
+load_key:
+6f9b 18007004 force regidx_key ,regext_index 
+6f9c 20206f9e branch load_regext 
+
+load_data128:
+6f9d 18007000 force regidx_data ,regext_index 
+
+load_regext:
+6f9e 18007204 force 4 ,loopcnt 
+
+load_regext_loop:
+6f9f efe20006 ifetch 4 ,contr 
+6fa0 98005e00 iforce regext 
+6fa1 1f00f001 increase 1 ,regext_index 
+6fa2 c2006f9f loop load_regext_loop 
+6fa3 20600000 rtn 
+
+load_sk:
+6fa4 d8c001a3 arg mem_le_sk ,contr 
+6fa5 20206f9b branch load_key 
+
+clear_hidata:
+6fa6 18007204 force 4 ,loopcnt 
+6fa7 20206fae branch clear_data_rest 
+
+regext_clear:
+6fa8 18007000 force 0 ,regext_index 
+6fa9 18007210 force 16 ,loopcnt 
+6faa 20206fad branch clear_loop 
+
+aes_clear_data:
+6fab 18007000 force regidx_data ,regext_index 
+
+aes_clear:
+6fac 18007204 force 4 ,loopcnt 
+
+clear_loop:
+6fad 18005e00 force 0 ,regext 
+
+clear_data_rest:
+6fae 1f00f001 increase 1 ,regext_index 
+6faf c2006fad loop clear_loop 
+6fb0 20600000 rtn 
+
+store_aes_result:
+6fb1 1800700c force regidx_result ,regext_index 
+6fb2 18007204 force 4 ,loopcnt 
+
+send_aes_result_loop:
+6fb3 1de27e00 deposit regext 
+6fb4 e7e20005 istore 4 ,contw 
+6fb5 1f00f001 increase 1 ,regext_index 
+6fb6 c2006fb3 loop send_aes_result_loop 
+6fb7 20600000 rtn 
+
+store_enc_data:
+6fb8 1800700c force regidx_result ,regext_index 
+6fb9 1a620a00 copy regc ,contw 
+6fba 1a40f201 add regb ,1 ,loopcnt 
+6fbb 1f267c0f sub loopcnt ,15 ,null 
+6fbc 20216fbe branch store_enc_loop ,positive 
+6fbd 18007210 force 16 ,loopcnt 
+
+store_enc_loop:
+6fbe 1de27e00 deposit regext 
+6fbf 1f267c03 sub loopcnt ,3 ,null 
+6fc0 20216fc6 branch store_enc_byte ,positive 
+6fc1 e7e20005 istore 4 ,contw 
+6fc2 1f20f3fc increase -4 ,loopcnt 
+6fc3 20628000 rtn zero 
+6fc4 1f00f001 increase 1 ,regext_index 
+6fc5 20206fbe branch store_enc_loop 
+
+store_enc_byte:
+6fc6 e7e08005 istore 1 ,contw 
+6fc7 1fecfe00 rshift8 pdata ,pdata 
+6fc8 c2006fc6 loop store_enc_byte 
+6fc9 20600000 rtn 
+
+compare_res:
+6fca 1800700c force regidx_result ,regext_index 
+6fcb 18007204 force 4 ,loopcnt 
+
+compare_res_loop:
+6fcc efe20006 ifetch 4 ,contr 
+6fcd 9de67c00 isub regext ,null 
+6fce 24628000 nrtn zero 
+6fcf 1f00f001 increase 1 ,regext_index 
+6fd0 c2006fcc loop compare_res_loop 
+6fd1 18007c00 force 0 ,null 
+6fd2 20600000 rtn 
+
+enable_authrom:
+6fd3 6ff08050 fetch 1 ,core_clkoff 
+6fd4 793ffe00 set0 clock_off_auth_rom ,pdata 
+6fd5 67f08050 store 1 ,core_clkoff 
+6fd6 20600000 rtn 
+
+disable_authrom:
+6fd7 6ff08050 fetch 1 ,core_clkoff 
+6fd8 79207e00 set1 clock_off_auth_rom ,pdata 
+6fd9 67f08050 store 1 ,core_clkoff 
+6fda 20600000 rtn 
+
+ui_init:
+6fdb 20758000 rtn wake 
+6fdc 20403c78 call lpm_disable_exen_output 
+6fdd 20406fe2 call ui_button_init 
+6fde 2040708b call ui_timer_init 
+6fdf 20207018 branch ui_led_init_global 
+
+ui_dispatch:
+6fe0 2040703b call ui_led_dispatch 
+6fe1 2020707a branch ui_timer_check 
+
+ui_button_init:
+6fe2 6fe0c432 fetch 1 ,mem_ui_button_gpio 
+6fe3 c17f8000 rtneq ui_button_gpio_disable 
+6fe4 98000400 iforce temp 
+6fe5 20406c43 call gpio_config_output 
+6fe6 6848c432 fetcht 1 ,mem_ui_button_gpio 
+6fe7 20406c3f call gpio_out_inactive 
+6fe8 20000064 nop 100 
+6fe9 6848c432 fetcht 1 ,mem_ui_button_gpio 
+6fea 20406c29 call gpio_config_input 
+6feb 20206fec branch ui_button_polling 
+
+ui_button_polling:
+6fec 44d74015 bpatch patch15_6 ,mem_patch15 
+6fed 6fe0c432 fetch 1 ,mem_ui_button_gpio 
+6fee c17f8000 rtneq ui_button_gpio_disable 
+6fef 1fe20400 copy pdata ,temp 
+6ff0 20406c32 call gpio_get_bit 
+6ff1 2420effe nbranch ui_button_up ,true 
+
+ui_button_down:
+6ff2 20407008 call ui_button_check_long_press 
+6ff3 6fe1442f fetch 2 ,mem_ui_state_map 
+6ff4 79207e0c set1 ui_state_btn_down ,pdata 
+6ff5 67e1442f store 2 ,mem_ui_state_map 
+6ff6 6fe0c42a fetch 1 ,mem_ui_button_last_state 
+6ff7 c1000000 rtneq ui_button_state_down 
+6ff8 70442a00 jam ui_button_state_down ,mem_ui_button_last_state 
+6ff9 6fe0c431 fetch 1 ,mem_ui_button_timeout 
+6ffa 67e0c429 store 1 ,mem_ui_button_timer 
+6ffb 2040700f call lpm_button_get_wake_lock 
+6ffc 7004c32c jam bt_evt_button_down ,mem_fifo_temp 
+6ffd 2020709b branch ui_ipc_send_event 
+
+ui_button_up:
+6ffe 6fe1442f fetch 2 ,mem_ui_state_map 
+6fff 793ffe0c set0 ui_state_btn_down ,pdata 
+7000 67e1442f store 2 ,mem_ui_state_map 
+7001 6fe0c42a fetch 1 ,mem_ui_button_last_state 
+7002 c1008000 rtneq ui_button_state_up 
+7003 70442a01 jam ui_button_state_up ,mem_ui_button_last_state 
+7004 70442900 jam 0 ,mem_ui_button_timer 
+7005 20407011 call lpm_button_clean_wake_lock 
+7006 7004c32d jam bt_evt_button_up ,mem_fifo_temp 
+7007 2020709b branch ui_ipc_send_event 
+
+ui_button_check_long_press:
+7008 6fe0c429 fetch 1 ,mem_ui_button_timer 
+7009 207a0000 rtn blank 
+700a 1fe0ffff increase -1 ,pdata 
+700b 67e0c429 store 1 ,mem_ui_button_timer 
+700c 247a0000 nrtn blank 
+700d 7004c310 jam bt_evt_button_long_pressed ,mem_fifo_temp 
+700e 2020709b branch ui_ipc_send_event 
+
+lpm_button_get_wake_lock:
+700f d8e00007 arg wake_lock_button ,queue 
+7010 20203c54 branch lpm_get_wake_lock 
+
+lpm_button_clean_wake_lock:
+7011 d8e00007 arg wake_lock_button ,queue 
+7012 20203c58 branch lpm_put_wake_lock 
+
+calc_curr_struct_prt:
+7013 44d7c015 bpatch patch15_7 ,mem_patch15 
+7014 6fe14435 fetch 2 ,mem_ui_led_struct_ptr 
+7015 1a2fa40b mul32 rega ,led_offset_length ,regb 
+7016 9a40a400 iadd regb ,regb 
+7017 20600000 rtn 
+
+ui_led_init_global:
+7018 6fe0c434 fetch 1 ,mem_ui_led_struct_num 
+7019 207a0000 rtn blank 
+701a 1fe27200 copy pdata ,loopcnt 
+701b 6fe14435 fetch 2 ,mem_ui_led_struct_ptr 
+701c 1fe22400 copy pdata ,regb 
+
+ui_led_init_loop:
+701d 1a40a602 add regb ,led_offset_led_gpio ,regc 
+701e e8408013 ifetcht 1 ,regc 
+701f 20407023 call ui_led_init_set 
+7020 1a40a40b increase led_offset_length ,regb 
+7021 c200701d loop ui_led_init_loop 
+7022 20600000 rtn 
+
+ui_led_init_set:
+7023 6fe0c433 fetch 1 ,mem_ui_led_init_state_set 
+7024 203a6c3f branch gpio_out_inactive ,blank 
+7025 20206c43 branch gpio_out_active 
+
+ui_led_on_global:
+7026 20407013 call calc_curr_struct_prt 
+7027 58000002 setarg ui_led_state_lighting 
+7028 e7e08012 istore 1 ,regb 
+7029 20407074 call ui_led_stop_timer 
+702a 20207049 branch ui_led_on_static 
+
+ui_led_blink_stop_global:
+
+ui_led_off_global:
+702b 20407013 call calc_curr_struct_prt 
+702c 58000003 setarg ui_led_state_darking 
+702d e7e08012 istore 1 ,regb 
+702e 20407074 call ui_led_stop_timer 
+702f 20207044 branch ui_led_off_static 
+
+ui_led_blink_start_global:
+7030 20407013 call calc_curr_struct_prt 
+7031 58000001 setarg ui_led_state_blink_start 
+7032 e7e08012 istore 1 ,regb 
+7033 580000ff setarg led_infinite_flash_num 
+7034 e7e08005 istore 1 ,contw 
+7035 20207044 branch ui_led_off_static 
+
+ui_led_set_style_global:
+7036 20407013 call calc_curr_struct_prt 
+7037 df20000b arg led_offset_length ,loopcnt 
+7038 1a620c00 copy regc ,contr 
+7039 1a420a00 copy regb ,contw 
+703a 2020753b branch memcpy_fast 
+
+ui_led_dispatch:
+703b 6fe0c434 fetch 1 ,mem_ui_led_struct_num 
+703c 207a0000 rtn blank 
+703d da200000 arg 0 ,rega 
+
+ui_led_blink_polling:
+703e 2040704e call ui_led_change_style_by_type 
+703f 1a20a201 increase 1 ,rega 
+7040 6fe0c434 fetch 1 ,mem_ui_led_struct_num 
+7041 9a267c00 isub rega ,null 
+7042 20628000 rtn zero 
+7043 2020703e branch ui_led_blink_polling 
+
+ui_led_off_static:
+7044 1a40a602 add regb ,led_offset_led_gpio ,regc 
+7045 e8408013 ifetcht 1 ,regc 
+7046 6fe0c095 fetch 1 ,mem_device_option 
+7047 c0046214 beq dvc_op_mouse ,mouse_ui_led_off_static 
+7048 20206c3f branch gpio_out_inactive 
+
+ui_led_on_static:
+7049 1a40a602 add regb ,led_offset_led_gpio ,regc 
+704a e8408013 ifetcht 1 ,regc 
+704b 6fe0c095 fetch 1 ,mem_device_option 
+704c c0046221 beq dvc_op_mouse ,mouse_ui_led_on_static 
+704d 20206c43 branch gpio_out_active 
+
+ui_led_change_style_by_type:
+704e 1a208e0b add rega ,ui_led_blink ,queue 
+704f 2040755d call timer_check 
+7050 247a0000 nrtn blank 
+7051 20407013 call calc_curr_struct_prt 
+7052 efe08012 ifetch 1 ,regb 
+7053 c0017049 beq ui_led_state_lighting ,ui_led_on_static 
+7054 c001f044 beq ui_led_state_darking ,ui_led_off_static 
+7055 c0007044 beq ui_led_state_blink_stop ,ui_led_off_static 
+7056 c002f062 beq ui_led_state_blink_darking ,ui_led_blink_state_darking 
+
+ui_led_blink_state_lighting:
+7057 20407049 call ui_led_on_static 
+7058 1a40a607 add regb ,led_offset_cb_ledon ,regc 
+7059 204074af call push_stack 
+705a efe10013 ifetch 2 ,regc 
+705b 204075e6 call callback_func 
+705c 204074bb call pop_stack 
+705d 58000005 setarg ui_led_state_blink_darking 
+705e e7e08012 istore 1 ,regb 
+705f 1a40a603 add regb ,led_offset_on_time ,regc 
+7060 efe10013 ifetch 2 ,regc 
+7061 20207072 branch ui_led_blink_timer_start 
+
+ui_led_blink_state_darking:
+7062 20407044 call ui_led_off_static 
+7063 1a40a609 add regb ,led_offset_cb_ledoff ,regc 
+7064 204074af call push_stack 
+7065 efe10013 ifetch 2 ,regc 
+7066 204075e6 call callback_func 
+7067 204074bb call pop_stack 
+7068 1a40a601 add regb ,led_offset_blink_count ,regc 
+7069 efe08013 ifetch 1 ,regc 
+706a c07ff06e beq led_infinite_flash_num ,ui_led_blink_infinite 
+706b 1fe0ffff increase -1 ,pdata 
+706c e7e08013 istore 1 ,regc 
+706d 203a702b branch ui_led_blink_stop_global ,blank 
+
+ui_led_blink_infinite:
+706e 58000004 setarg ui_led_state_blink_lighting 
+706f e7e08012 istore 1 ,regb 
+7070 1a40a605 add regb ,led_offset_off_time ,regc 
+7071 efe10013 ifetch 2 ,regc 
+
+ui_led_blink_timer_start:
+7072 1a208e0b add rega ,ui_led_blink ,queue 
+7073 2020754f branch timer_init 
+
+ui_led_stop_timer:
+7074 58000000 setarg 0 
+7075 20207072 branch ui_led_blink_timer_start 
+
+ui_timer_timeout:
+7076 58001000 setarg 0x1000 
+7077 1ff07e00 lshift16 pdata ,pdata 
+7078 9a40a400 iadd regb ,regb 
+7079 20600000 rtn 
+
+ui_timer_check:
+707a 44d84016 bpatch patch16_0 ,mem_patch16 
+707b da200000 arg 0 ,rega 
+707c 684a442b fetcht 4 ,mem_ui_timer_last_btclk 
+707d 1c422400 copy clkn_bt ,regb 
+707e 1a427e00 copy regb ,pdata 
+707f 98467c00 isub temp ,null 
+7080 24417076 ncall ui_timer_timeout ,positive 
+
+ui_timer_check_loop:
+7081 1a427e00 copy regb ,pdata 
+7082 184084a0 increase 160 ,temp 
+7083 184084a0 increase 160 ,temp 
+7084 98467c00 isub temp ,null 
+7085 2421708e nbranch ui_timer_check_end ,positive 
+7086 1a20a201 increase 1 ,rega 
+7087 1a217e0f and rega ,0x0f ,pdata 
+7088 243a7081 nbranch ui_timer_check_loop ,blank 
+7089 da200000 arg 0 ,rega 
+708a 20407094 call ui_timer_check_send_evt 
+
+ui_timer_init:
+708b 1c427e00 copy clkn_bt ,pdata 
+708c 67e2442b store 4 ,mem_ui_timer_last_btclk 
+708d 20600000 rtn 
+
+ui_timer_check_end:
+708e 1a227e00 copy rega ,pdata 
+708f 207a0000 rtn blank 
+7090 18408560 increase -160 ,temp 
+7091 18408560 increase -160 ,temp 
+7092 793f841c set0 28 ,temp 
+7093 604a442b storet 4 ,mem_ui_timer_last_btclk 
+
+ui_timer_check_send_evt:
+7094 20204dd5 branch app_evt_timer 
+
+ui_ipc_get_lock:
+7095 70441701 jam 1 ,mem_ipc_lock_bt 
+
+ui_ipc_get_lock_wait:
+7096 6fe0c418 fetch 1 ,mem_ipc_lock_c51 
+7097 243a7096 nbranch ui_ipc_get_lock_wait ,blank 
+7098 20600000 rtn 
+
+ui_ipc_put_lock:
+7099 70441700 jam 0 ,mem_ipc_lock_bt 
+709a 20600000 rtn 
+
+ui_ipc_send_event:
+709b 44d8c016 bpatch patch16_1 ,mem_patch16 
+709c 20407095 call ui_ipc_get_lock 
+709d 1a227e00 copy rega ,pdata 
+709e 67e204d8 store 4 ,mem_rega 
+709f da204419 arg mem_ipc_fifo_bt2c51 ,rega 
+70a0 20407607 call fifo_in 
+70a1 6fe204d8 fetch 4 ,mem_rega 
+70a2 1fe22200 copy pdata ,rega 
+70a3 20207099 branch ui_ipc_put_lock 
+
+ui_ipc_send_cmd:
+70a4 44d94016 bpatch patch16_2 ,mem_patch16 
+70a5 20407095 call ui_ipc_get_lock 
+70a6 1a227e00 copy rega ,pdata 
+70a7 67e204d8 store 4 ,mem_rega 
+70a8 da204421 arg mem_ipc_fifo_c512bt ,rega 
+70a9 20407607 call fifo_in 
+70aa 6fe204d8 fetch 4 ,mem_rega 
+70ab 1fe22200 copy pdata ,rega 
+70ac 20207099 branch ui_ipc_put_lock 
+
+ui_ipc_clean_all_fifo:
+70ad 58000000 setarg 0 
+70ae 67e44421 store util_fifo_len ,mem_ipc_fifo_c512bt 
+70af 67e44419 store util_fifo_len ,mem_ipc_fifo_bt2c51 
+70b0 20600000 rtn 
+
+check_51cmd:
+70b1 44d9c016 bpatch patch16_3 ,mem_patch16 
+70b2 6fe0c10d fetch 1 ,mem_hci_cmd 
+70b3 247a0000 nrtn blank 
+70b4 da204421 arg mem_ipc_fifo_c512bt ,rega 
+70b5 2040761f call fifo_is_empty 
+70b6 207a0000 rtn blank 
+70b7 7004c200 jam ipc_continue_process ,mem_ipc_skip_continue_proc 
+70b8 204070bc call check_51cmd_once 
+70b9 6fe084c2 fetch 1 ,mem_ipc_skip_continue_proc 
+70ba 203a70b1 branch check_51cmd ,blank 
+70bb 20600000 rtn 
+
+check_51cmd_once:
+70bc 20407095 call ui_ipc_get_lock 
+70bd da204421 arg mem_ipc_fifo_c512bt ,rega 
+70be 20407613 call fifo_out 
+70bf 1fe20400 copy pdata ,temp 
+70c0 20407099 call ui_ipc_put_lock 
+70c1 44da4016 bpatch patch16_4 ,mem_patch16 
+70c2 18427e00 copy temp ,pdata 
+70c3 207a0000 rtn blank 
+70c4 c006f0e0 beq bt_cmd_start_adv ,check_51cmd_adv 
+70c5 c00770e6 beq bt_cmd_stop_adv ,check_51cmd_stop_adv 
+70c6 c007f0eb beq bt_cmd_start_direct_adv ,check_51cmd_direct_adv 
+70c7 c00870f1 beq bt_cmd_stop_direct_adv ,check_51cmd_stop_direct_adv 
+70c8 c009f0fb beq bt_cmd_led_off ,check_51cmd_led_off 
+70c9 c00a70fd beq bt_cmd_led_on ,check_51cmd_led_on 
+70ca c00af0ff beq bt_cmd_led_blink ,check_51cmd_led_start_blink 
+70cb c00b7109 beq bt_cmd_le_start_conn ,check_51cmd_le_start_con 
+70cc c00bf10c beq bt_cmd_le_start_scan ,check_51cmd_start_scan 
+70cd c00c710e beq bt_cmd_le_stop_scan ,check_51cmd_stop_scan 
+70ce c00cf111 beq bt_cmd_enter_hibernate ,check_51cmd_hibernate 
+70cf 67e084c3 store 1 ,mem_fifo_temp 
+
+check_51cmd_once_continue:
+70d0 6fe084c3 fetch 1 ,mem_fifo_temp 
+70d1 c584f0d9 bmark0 mark_context ,check_51cmd_check_idle 
+70d2 44dac016 bpatch patch16_5 ,mem_patch16 
+70d3 6fe084c3 fetch 1 ,mem_fifo_temp 
+70d4 c008f0f6 beq bt_cmd_le_disconnect ,check_51cmd_le_disconnect 
+70d5 c00df119 beq bt_cmd_le_smp_security_request ,check_51cmd_le_smp_sec_req 
+70d6 c00970fa beq bt_cmd_le_update_conn ,check_51cmd_ble_update_connect_param 
+70d7 c00fec05 beq bt_cmd_store_reconn_info_le ,eeprom_store_le_reconn_info 
+70d8 20600000 rtn 
+
+check_51cmd_check_idle:
+70d9 67e084c3 store 1 ,mem_fifo_temp 
+70da 2040385a call context_check_idle 
+70db 2022f0de branch check_51cmd_restore ,zero 
+70dc 2040385f call context_search_plap 
+70dd 24628000 nrtn zero 
+
+check_51cmd_restore:
+70de 7004c201 jam ipc_skip_continue_process ,mem_ipc_skip_continue_proc 
+70df 202070a4 branch ui_ipc_send_cmd 
+
+check_51cmd_adv:
+70e0 70435b01 jam on ,mem_le_adv_enable 
+70e1 70435e00 jam adv_ind ,mem_le_adv_type 
+70e2 6fe1442f fetch 2 ,mem_ui_state_map 
+70e3 79207e0b set1 ui_state_ble_adv ,pdata 
+70e4 67e1442f store 2 ,mem_ui_state_map 
+70e5 20600000 rtn 
+
+check_51cmd_stop_adv:
+70e6 6fe1442f fetch 2 ,mem_ui_state_map 
+70e7 793ffe0b set0 ui_state_ble_adv ,pdata 
+70e8 67e1442f store 2 ,mem_ui_state_map 
+70e9 70435b00 jam off ,mem_le_adv_enable 
+70ea 20600000 rtn 
+
+check_51cmd_direct_adv:
+70eb 70435b01 jam on ,mem_le_adv_enable 
+70ec 70435e01 jam adv_direct_ind ,mem_le_adv_type 
+70ed 6fe1442f fetch 2 ,mem_ui_state_map 
+70ee 79207e0b set1 ui_state_ble_adv ,pdata 
+70ef 67e1442f store 2 ,mem_ui_state_map 
+70f0 20600000 rtn 
+
+check_51cmd_stop_direct_adv:
+70f1 6fe1442f fetch 2 ,mem_ui_state_map 
+70f2 793ffe0b set0 ui_state_ble_adv ,pdata 
+70f3 67e1442f store 2 ,mem_ui_state_map 
+70f4 70435b00 jam off ,mem_le_adv_enable 
+70f5 20600000 rtn 
+
+check_51cmd_le_disconnect:
+70f6 58000014 setarg 20 
+70f7 67e10191 store 2 ,mem_le_superto 
+70f8 67e142c8 store 2 ,mem_le_init_superto 
+70f9 2020477a branch le_send_terminate_ind_user_terminated 
+
+check_51cmd_ble_update_connect_param:
+70fa 202045f3 branch le_l2cap_tx_update_req 
+
+check_51cmd_led_off:
+70fb da200000 arg 0 ,rega 
+70fc 2020702b branch ui_led_off_global 
+
+check_51cmd_led_on:
+70fd da200000 arg 0 ,rega 
+70fe 20207026 branch ui_led_on_global 
+
+check_51cmd_led_start_blink:
+70ff da200000 arg 0 ,rega 
+7100 20407013 call calc_curr_struct_prt 
+7101 efe08012 ifetch 1 ,regb 
+7102 c000f106 beq ui_led_state_blink_start ,check_51cmd_led_start_blink_in_blink 
+7103 c0027106 beq ui_led_state_blink_lighting ,check_51cmd_led_start_blink_in_blink 
+7104 c002f106 beq ui_led_state_blink_darking ,check_51cmd_led_start_blink_in_blink 
+7105 20207030 branch ui_led_blink_start_global 
+
+check_51cmd_led_start_blink_in_blink:
+7106 efe08006 ifetch 1 ,contr 
+7107 c17f8000 rtneq led_infinite_flash_num 
+7108 20207030 branch ui_led_blink_start_global 
+
+check_51cmd_le_start_con:
+7109 70431601 jam on ,mem_le_scan_enable 
+710a 70410d1b jam hci_cmd_le_create_conn ,mem_hci_cmd 
+710b 20600000 rtn 
+
+check_51cmd_start_scan:
+710c 70431601 jam on ,mem_le_scan_enable 
+710d 20600000 rtn 
+
+check_51cmd_stop_scan:
+710e 70431600 jam off ,mem_le_scan_enable 
+710f 70410d00 jam 0 ,mem_hci_cmd 
+7110 20600000 rtn 
+
+check_51cmd_hibernate:
+7111 6fe1438a fetch 2 ,mem_cb_before_hibernate 
+7112 204075e6 call callback_func 
+7113 6fe0c432 fetch 1 ,mem_ui_button_gpio 
+7114 c07ff117 beq ui_button_gpio_disable ,check_51cmd_hibernate_btn_disabled 
+7115 1fe20400 copy pdata ,temp 
+7116 20406c29 call gpio_config_input 
+
+check_51cmd_hibernate_btn_disabled:
+7117 204070ad call ui_ipc_clean_all_fifo 
+7118 20203b6f branch lpm_hibernate 
+
+check_51cmd_le_smp_sec_req:
+7119 20204621 branch le_send_smp_security_request 
+
+ui_check_paring_button:
+711a 6fe0c42f fetch 1 ,mem_ui_state_map 
+711b c4060000 rtnbit0 ui_state_btn_down 
+711c 20600000 rtn 
+
+queue_init:
+711d 6fe143b0 fetch 2 ,mem_queue_ptr 
+711e 1fe08a02 add pdata ,queue_offset_curr_num ,contw 
+711f 58000000 setarg 0 
+7120 e7e18005 istore 3 ,contw 
+7121 20600000 rtn 
+
+queue_push:
+7122 44db4016 bpatch patch16_6 ,mem_patch16 
+7123 20407638 call disable_user 
+7124 2040716e call queue_full 
+7125 207a0000 rtn blank 
+7126 6fe143b0 fetch 2 ,mem_queue_ptr 
+7127 1fe0a402 add pdata ,queue_offset_curr_num ,regb 
+7128 e8408012 ifetcht 1 ,regb 
+7129 18408401 increase 1 ,temp 
+712a e0408012 istoret 1 ,regb 
+712b e840803f ifetcht 1 ,pdata 
+712c 18427200 copy temp ,loopcnt 
+712d 1fe0a404 add pdata ,queue_offset_write_ptr ,regb 
+712e efe08012 ifetch 1 ,regb 
+712f 984ffe00 imul32 temp ,pdata 
+7130 98c08a00 iadd contr ,contw 
+7131 1a220c00 copy rega ,contr 
+
+calc_queue_next_ptr:
+7132 20407548 call memcpy 
+7133 20407172 call queue_get_size 
+7134 1fe0ffff pincrease -1 
+7135 e8408012 ifetcht 1 ,regb 
+7136 18408401 increase 1 ,temp 
+7137 98410400 iand temp ,temp 
+7138 e0408012 istoret 1 ,regb 
+7139 20207636 branch enable_user 
+
+queue_pop:
+713a 44dbc016 bpatch patch16_7 ,mem_patch16 
+713b 20407638 call disable_user 
+713c 2040716a call queue_empty 
+713d 207a0000 rtn blank 
+713e 6fe143b0 fetch 2 ,mem_queue_ptr 
+713f 1fe0a402 add pdata ,queue_offset_curr_num ,regb 
+7140 e8408012 ifetcht 1 ,regb 
+7141 184085ff increase -1 ,temp 
+7142 e0408012 istoret 1 ,regb 
+7143 e840803f ifetcht 1 ,pdata 
+7144 18427200 copy temp ,loopcnt 
+7145 1fe0a403 add pdata ,queue_offset_read_ptr ,regb 
+7146 efe08012 ifetch 1 ,regb 
+7147 984ffe00 imul32 temp ,pdata 
+7148 98c08c00 iadd contr ,contr 
+7149 18c08c01 increase 1 ,contr 
+714a 1a220a00 copy rega ,contw 
+714b 20207132 branch calc_queue_next_ptr 
+
+queue_get_new_ele:
+714c 20407638 call disable_user 
+714d 2040716a call queue_empty 
+714e 207a0000 rtn blank 
+714f 6fe143b0 fetch 2 ,mem_queue_ptr 
+7150 e840803f ifetcht 1 ,pdata 
+7151 18427200 copy temp ,loopcnt 
+7152 1fe0a403 add pdata ,queue_offset_read_ptr ,regb 
+7153 efe08012 ifetch 1 ,regb 
+7154 984ffe00 imul32 temp ,pdata 
+7155 98c08c00 iadd contr ,contr 
+7156 18c08c01 increase 1 ,contr 
+7157 18c22400 copy contr ,regb 
+7158 1a220a00 copy rega ,contw 
+7159 20407548 call memcpy 
+715a 20207636 branch enable_user 
+
+queue_store_new_ele:
+715b 20407638 call disable_user 
+715c 2040716a call queue_empty 
+715d 207a0000 rtn blank 
+715e 6fe143b0 fetch 2 ,mem_queue_ptr 
+715f e840803f ifetcht 1 ,pdata 
+7160 18427200 copy temp ,loopcnt 
+7161 1fe0a403 add pdata ,queue_offset_read_ptr ,regb 
+7162 efe08012 ifetch 1 ,regb 
+7163 984ffe00 imul32 temp ,pdata 
+7164 98c08c00 iadd contr ,contr 
+7165 18c08a02 add contr ,2 ,contw 
+7166 1a220c00 copy rega ,contr 
+7167 1f20f3ff increase -1 ,loopcnt 
+7168 20407548 call memcpy 
+7169 20207636 branch enable_user 
+
+queue_empty:
+716a 6fe143b0 fetch 2 ,mem_queue_ptr 
+716b 1fe08c02 add pdata ,queue_offset_curr_num ,contr 
+716c efe08006 ifetch 1 ,contr 
+716d 20600000 rtn 
+
+queue_full:
+716e 20407172 call queue_get_size 
+716f e8408006 ifetcht 1 ,contr 
+7170 98467e00 isub temp ,pdata 
+7171 20600000 rtn 
+
+queue_get_size:
+7172 6fe143b0 fetch 2 ,mem_queue_ptr 
+7173 1fe08c01 add pdata ,queue_offset_length ,contr 
+7174 efe08006 ifetch 1 ,contr 
+7175 20600000 rtn 
+
+usb_isr:
+7176 44dc4017 bpatch patch17_0 ,mem_patch17 
+7177 6ff08c23 fetch 1 ,core_usb_status 
+7178 2feffe03 isolate1 usb_status_reset ,pdata 
+7179 2040f182 call usb_init ,true 
+717a 6ff08c23 fetch 1 ,core_usb_status 
+717b 67f08c23 store 1 ,core_usb_status 
+717c 67e0855e store 1 ,mem_usb_status 
+717d 204071e2 call usb_nak_state_judge 
+717e 2040720a call usb_rx 
+717f 204073fd call usb0_tx 
+7180 20407445 call usb_tx 
+7181 202071da branch usb_nak_state 
+
+usb_init:
+7182 44dcc017 bpatch patch17_1 ,mem_patch17 
+7183 20406fd3 call enable_authrom 
+7184 204071a1 call usb_init_param 
+7185 708c0000 jam 0x00 ,core_usb_config 
+7186 20002710 nop 10000 
+7187 708c18c0 jam 0xc0 ,core_usb_trig 
+7188 6ff10050 fetch 2 ,core_clkoff 
+7189 793ffe0a set0 clock_off_usb ,pdata 
+718a 67f10050 store 2 ,core_clkoff 
+718b 708c1100 jam 0x0 ,core_usb_hmode 
+718c 708c003c jam 0x3c ,core_usb_config 
+718d 580005b7 setarg mem_usb_rxbuf 
+718e 67f10c03 store 2 ,core_usb_rx_saddr 
+718f 67f10c07 store 2 ,core_usb_rxptr 
+7190 580005f7 setarg mem_usb_rxbuf_end 
+7191 67f10c05 store 2 ,core_usb_rx_eaddr 
+7192 708c1104 jam 0x4 ,core_usb_hmode 
+7193 708c0200 jam 0 ,core_usb_addr 
+7194 708c23ff jam 0xff ,core_usb_status 
+7195 580007b3 setarg mem_usb_clear_mem_end 
+7196 d8a006c1 arg mem_usb_clear_mem_start ,contw 
+7197 98a67200 isub contw ,loopcnt 
+7198 2020750f branch clear_mem 
+
+usb_offline_check_init:
+7199 684886c0 fetcht 1 ,mem_usb_offline_check_gpio 
+719a 20206c29 branch gpio_config_input 
+
+usb_offline_state:
+719b 6fe08762 fetch 1 ,mem_usb_device_enumeration_endflag 
+719c 207a0000 rtn blank 
+719d 684886c0 fetcht 1 ,mem_usb_offline_check_gpio 
+719e 20406c32 call gpio_get_bit 
+719f 2020f182 branch usb_init ,true 
+71a0 20600000 rtn 
+
+usb_init_param:
+71a1 7006bf02 jam dev_default ,mem_usb0_state 
+71a2 58000000 setarg 0x0 
+71a3 67e085fa store 1 ,mem_remain 
+71a4 67e106b9 store 2 ,mem_usb_zero_packet 
+71a5 1fe0fe01 pincrease 1 
+71a6 67e106bb store 2 ,mem_usb_ones_packet 
+71a7 1fe0fe01 pincrease 1 
+71a8 67e106bd store 2 ,mem_usb_two_packet 
+71a9 d8a0064e arg mem_string0 ,contw 
+71aa 58030404 setarg 0x030404 
+71ab e7e18005 istore 3 ,contw 
+71ac 58000409 setarg 0x0409 
+71ad e7e10005 istore 2 ,contw 
+71ae d8a00653 arg mem_string1 ,contw 
+71af 38015906 setsect 0 ,0x15906 
+71b0 380610d2 setsect 1 ,0x210d2 
+71b1 38090494 setsect 2 ,0x10494 
+71b2 380c0001 setsect 3 ,0x1 
+71b3 e7e48005 istore 9 ,contw 
+71b4 d8a00671 arg mem_string2 ,contw 
+71b5 3801570f setsect 0 ,0x1570f 
+71b6 38055c9a setsect 1 ,0x15c9a 
+71b7 380a56c6 setsect 2 ,0x256c6 
+71b8 380dcdcd setsect 3 ,0x1cdcd 
+71b9 e7e48005 istore 9 ,contw 
+71ba 38014420 setsect 0 ,0x14420 
+71bb 38065d99 setsect 1 ,0x25d99 
+71bc 380a5636 setsect 2 ,0x25636 
+71bd 380c0001 setsect 3 ,0x1 
+71be e7e38005 istore 7 ,contw 
+71bf d8a0068f arg mem_string3 ,contw 
+71c0 3801620a setsect 0 ,0x1620a 
+71c1 38040c8c setsect 1 ,0xc8c 
+71c2 380b0333 setsect 2 ,0x30333 
+71c3 380cc0c0 setsect 3 ,0xc0c0 
+71c4 e7e48005 istore 9 ,contw 
+71c5 38003130 setsect 0 ,0x3130 
+71c6 e7e10005 istore 2 ,contw 
+71c7 58009272 setarg usb_kbdata_vendor_define_addr 
+71c8 67e105fb store 2 ,mem_hidreportdesc_kb 
+71c9 580092cd setarg usb_msdata_addr 
+71ca 67e105fd store 2 ,mem_hidreportdesc_m 
+71cb d8c09371 arg usb_devicedata_addr ,contr 
+71cc d8a005ff arg mem_devicedesc ,contw 
+71cd df200013 arg 19 ,loopcnt 
+71ce 20407548 call memcpy 
+71cf d8c09384 arg usb_confdata_addr ,contr 
+71d0 d8a00612 arg mem_confdesc ,contw 
+71d1 df20003c arg 60 ,loopcnt 
+71d2 20407548 call memcpy 
+
+usb_config_cb:
+71d3 6fe106ad fetch 2 ,mem_cb_usb_config 
+71d4 202075e6 branch callback_func 
+
+usb_tx_interval_config:
+71d5 6fe086af fetch 1 ,mem_usb_tx_interval 
+71d6 207a0000 rtn blank 
+71d7 67e08634 store 1 ,mem_confdesc + 34 
+71d8 67e0864d store 1 ,mem_confdesc + 59 
+71d9 20600000 rtn 
+
+usb_nak_state:
+71da d8e00001 arg usb_timer_nak ,queue 
+71db 2040755d call timer_check 
+71dc 247a0000 nrtn blank 
+71dd 6fe08763 fetch 1 ,mem_usb_wakestate_onetime_flag 
+71de 247a0000 nrtn blank 
+71df 6fe08762 fetch 1 ,mem_usb_device_enumeration_endflag 
+71e0 245a749e ncall usb_mac_wakeup_judge ,blank 
+71e1 20600000 rtn 
+
+usb_nak_state_judge:
+71e2 6fe0855e fetch 1 ,mem_usb_status 
+71e3 c28171e5 bbit1 usb_status_nak ,usb_nak_state_timer_init 
+71e4 20600000 rtn 
+
+usb_nak_state_timer_init:
+71e5 204071ea call usb0_attached_state_judge 
+71e6 2040755c call timer_reinit 
+71e7 58000280 setarg timer_nak_delay 
+71e8 d8e00001 arg usb_timer_nak ,queue 
+71e9 2020754f branch timer_init 
+
+usb0_attached_state_judge:
+71ea 6fe08754 fetch 1 ,mem_usb_state 
+71eb c08171ef bne usb_connected ,usb_clear_halt_dispose 
+71ec 70076300 jam 0 ,mem_usb_wakestate_onetime_flag 
+71ed 70076400 jam 0 ,mem_usb_mac_wakeup_trig 
+71ee 20600000 rtn 
+
+usb_clear_halt_dispose:
+71ef 6fe08766 fetch 1 ,mem_usb_clear_halt 
+71f0 207a0000 rtn blank 
+71f1 70076600 jam 0 ,mem_usb_clear_halt 
+71f2 70075402 jam usb_connected ,mem_usb_state 
+71f3 70076201 jam 1 ,mem_usb_device_enumeration_endflag 
+71f4 20600000 rtn 
+
+usb_rx_no_data:
+71f5 6fe0855e fetch 1 ,mem_usb_status 
+71f6 c2807217 bbit1 usb_status_setup ,usb_class_type 
+71f7 20600000 rtn 
+
+usb_rx_data:
+71f8 6ff08c24 fetch 1 ,core_usb_txbusy 
+71f9 c3830000 rtnbit1 usb_status_rxempty 
+71fa 69510c03 fetchr contus ,2 ,core_usb_rx_saddr 
+71fb 6a110c05 fetchr contue ,2 ,core_usb_rx_eaddr 
+71fc 68710c07 fetchr contu ,2 ,core_usb_rxptr 
+71fd efe10003 ifetch 2 ,contu 
+71fe 1fec8400 rshift8 pdata ,temp 
+71ff 18518400 rshift4 temp ,temp 
+7200 d8c00fff arg 0xfff ,contr 
+7201 98c17200 iand contr ,loopcnt 
+7202 1f222200 copy loopcnt ,rega 
+
+usb_rx_read:
+7203 efe08003 ifetch 1 ,contu 
+7204 e7e08005 istore 1 ,contw 
+7205 c2007203 loop usb_rx_read 
+7206 60710c07 storer contu ,2 ,core_usb_rxptr 
+7207 62210560 storer rega ,2 ,mem_usb_read_len 
+7208 20600000 rtn 
+
+usb_data_rx:
+7209 20600000 rtn 
+
+usb_rx:
+720a 44dd4017 bpatch patch17_2 ,mem_patch17 
+720b 6fe0855e fetch 1 ,mem_usb_status 
+720c c4028000 rtnbit0 usb_status_rxready 
+720d d8a006c1 arg mem_usb_setup ,contw 
+720e 204071f8 call usb_rx_data 
+720f 18427e00 copy temp ,pdata 
+7210 c0007212 beq 0 ,usb0_rx 
+7211 20207209 branch usb_data_rx 
+
+usb0_rx:
+7212 6fe08560 fetch 1 ,mem_usb_read_len 
+7213 c00071f5 beq 0x00 ,usb_rx_no_data 
+7214 c000f21e beq 0x01 ,usb_out_one_byte 
+7215 1fe67c07 sub pdata ,7 ,null 
+7216 20610000 rtn positive 
+
+usb_class_type:
+7217 44ddc017 bpatch patch17_3 ,mem_patch17 
+7218 793f8023 set0 mark_isstr ,mark 
+7219 6fe086c1 fetch 1 ,mem_usb_setup_bmrequesttype 
+721a 1fe17e80 and_into 0x80 ,pdata 
+721b c0407222 beq in_device ,usb_in_device 
+721c c000722a beq out_device ,usb_out_device 
+721d 20203aba branch assert 
+
+usb_out_one_byte:
+721e 6fe086c1 fetch 1 ,mem_usb_setup 
+721f c3838000 rtnbit1 7 
+7220 204073d2 call usb_get_led_status 
+7221 20207251 branch usb0_reply_zerolen 
+
+usb_in_device:
+7222 6fe086c1 fetch 1 ,mem_usb_setup_bmrequesttype 
+7223 1ff1fe00 rshift4 pdata ,pdata 
+7224 1fe37e00 rshift pdata ,pdata 
+7225 1fe17e03 and_into 0x03 ,pdata 
+7226 c0007232 beq standard_req ,usb_in_standard_req 
+7227 c000f238 beq class_req ,usb_in_class_req 
+7228 c001723d beq manufacturer_req ,usb_in_manufacturer_req 
+7229 20203aba branch assert 
+
+usb_out_device:
+722a 6fe086c1 fetch 1 ,mem_usb_setup_bmrequesttype 
+722b 1ff1fe00 rshift4 pdata ,pdata 
+722c 1fe37e00 rshift pdata ,pdata 
+722d 1fe17e03 and_into 0x03 ,pdata 
+722e c000723e beq standard_req ,usb_out_standard_req 
+722f c000f246 beq class_req ,usb_out_class_req 
+7230 c001724b beq manufacturer_req ,usb_out_manufacturer_req 
+7231 20203aba branch assert 
+
+usb_in_standard_req:
+7232 6fe086c2 fetch 1 ,mem_usb_setup_brequest 
+7233 c0047253 beq get_configuration ,usb0_request_get_configuration 
+7234 c0037269 beq get_descriptor ,usb0_request_get_descriptor 
+7235 c00572ae beq get_interface ,usb0_request_get_interface 
+7236 c00072c0 beq get_status ,usb0_request_get_status 
+7237 2020724c branch usb0_force_stall 
+
+usb_in_class_req:
+7238 6fe086c2 fetch 1 ,mem_usb_setup_brequest 
+7239 c00172f5 beq get_idle ,usb_get_idle 
+723a c000f2f9 beq get_report ,usb_get_report 
+723b c001f30a beq get_protocol ,usb_get_protocol_req 
+723c 2020724c branch usb0_force_stall 
+
+usb_in_manufacturer_req:
+723d 2020724c branch usb0_force_stall 
+
+usb_out_standard_req:
+723e 6fe086c2 fetch 1 ,mem_usb_setup_brequest 
+723f c000f314 beq clear_feature ,usb0_request_clear_feature 
+7240 c001f343 beq set_feature ,usb0_request_set_feature 
+7241 c002f36e beq set_address ,usb0_request_set_address 
+7242 c004f387 beq set_configuration ,usb0_request_set_configuration 
+7243 c005f3a2 beq set_interface ,usb0_request_set_interface 
+7244 c003f24c beq set_descriptor ,usb0_force_stall 
+7245 2020724c branch usb0_force_stall 
+
+usb_out_class_req:
+7246 6fe086c2 fetch 1 ,mem_usb_setup_brequest 
+7247 c00573b3 beq set_idle ,usb_set_idle 
+7248 c004f3c5 beq set_report ,usb_set_report 
+7249 c005f3e4 beq set_protocol ,usb_set_protocol_req 
+724a 2020724c branch usb0_force_stall 
+
+usb_out_manufacturer_req:
+724b 2020724c branch usb0_force_stall 
+
+usb0_force_stall:
+724c 44de4017 bpatch patch17_4 ,mem_patch17 
+724d 6ff08c19 fetch 1 ,core_usb_stall 
+724e 79207e00 set1 0 ,pdata 
+724f 67f08c19 store 1 ,core_usb_stall 
+7250 20207251 branch usb0_reply_zerolen 
+
+usb0_reply_zerolen:
+7251 708c1810 jam 0x10 ,core_usb_trig 
+7252 20600000 rtn 
+
+usb0_request_get_configuration:
+7253 6fe086c1 fetch 1 ,mem_usb_setup_bmrequesttype 
+7254 c0c0724c bne in_device ,usb0_force_stall 
+7255 6fe086c5 fetch 1 ,mem_usb_setup_windex 
+7256 c080724c bne 0 ,usb0_force_stall 
+7257 6fe086c6 fetch 1 ,mem_usb_setup_windex + 1 
+7258 c080724c bne 0 ,usb0_force_stall 
+7259 6fe086c7 fetch 1 ,mem_usb_setup_blength 
+725a c080f24c bne 1 ,usb0_force_stall 
+725b 6fe086c8 fetch 1 ,mem_usb_setup_blengthh 
+725c c080724c bne 0 ,usb0_force_stall 
+725d 6fe086c3 fetch 1 ,mem_usb_setup_bvalue 
+725e c080724c bne 0 ,usb0_force_stall 
+725f 6fe086c4 fetch 1 ,mem_usb_setup_bvalue + 1 
+7260 c080724c bne 0 ,usb0_force_stall 
+7261 6fe086bf fetch 1 ,mem_usb0_state 
+7262 c0027265 beq dev_configured ,usb0_request_get_cfg_dev_cfg 
+7263 c001f267 beq dev_address ,usb0_request_get_cfg_dev_addr 
+7264 2020724c branch usb0_force_stall 
+
+usb0_request_get_cfg_dev_cfg:
+7265 da400001 arg 1 ,regb 
+7266 202072da branch usb_send_ones_packet 
+
+usb0_request_get_cfg_dev_addr:
+7267 da400001 arg 1 ,regb 
+7268 202072d8 branch usb_send_zero_packet 
+
+usb0_request_get_descriptor:
+7269 44dec017 bpatch patch17_5 ,mem_patch17 
+726a 6fe086c4 fetch 1 ,mem_usb_setup_bvalueh 
+726b c000f27c beq dsc_device ,dsc_device_info 
+726c c0017295 beq dsc_config ,dsc_config_info 
+726d c001f298 beq dsc_string ,dsc_string_info 
+726e c010f271 beq dsc_hid ,dsc_hid_info 
+726f c01172a6 beq dsc_hid_report ,dsc_hid_report_info 
+7270 2020724c branch usb0_force_stall 
+
+dsc_hid_info:
+7271 70075100 jam 0 ,mem_usb_get_protocol_flag 
+7272 6fe086c5 fetch 1 ,mem_usb_setup_windex 
+7273 c0007276 beq 0 ,dsc_hid_info_interface0 
+7274 c000f279 beq 1 ,dsc_hid_info_interface1 
+7275 2020724c branch usb0_force_stall 
+
+dsc_hid_info_interface0:
+7276 6a408625 fetchr regb ,1 ,mem_confdesc + 19 
+7277 da200625 arg mem_confdesc + 19 ,rega 
+7278 202073f3 branch usb0_respond 
+
+dsc_hid_info_interface1:
+7279 6a40863e fetchr regb ,1 ,mem_confdesc + 44 
+727a da20063e arg mem_confdesc + 44 ,rega 
+727b 202073f3 branch usb0_respond 
+
+dsc_device_info:
+727c 6fe08765 fetch 1 ,mem_usb_set_high_addr_flag 
+727d 245a728d ncall usb_set_high_addr ,blank 
+727e 580005ff setarg mem_devicedesc 
+727f 684885ff fetcht 1 ,mem_devicedesc 
+
+dsc_info_set_data_len:
+7280 67e1075c store 2 ,mem_dsc_info_data_pointer 
+7281 6048875e storet 1 ,mem_dsc_info_len 
+7282 6fe086c7 fetch 1 ,mem_usb_setup_blength 
+7283 98467c00 isub temp ,null 
+7284 2421728b nbranch dsc_info_set_current_data_len ,positive 
+
+dsc_info_set_initial_data_len:
+7285 6fe0875e fetch 1 ,mem_dsc_info_len 
+
+dsc_info_set_data_size_completed:
+7286 98002400 iforce regb 
+7287 6fe1075c fetch 2 ,mem_dsc_info_data_pointer 
+7288 1fe0fe01 add pdata ,1 ,pdata 
+7289 98002200 iforce rega 
+728a 202073f3 branch usb0_respond 
+
+dsc_info_set_current_data_len:
+728b 6fe086c7 fetch 1 ,mem_usb_setup_blength 
+728c 20207286 branch dsc_info_set_data_size_completed 
+
+usb_set_high_addr:
+728d 6ff08c02 fetch 1 ,core_usb_addr 
+728e 245a7291 ncall usb0_set_addr ,blank 
+728f 70076500 jam 0 ,mem_usb_set_high_addr_flag 
+7290 20600000 rtn 
+
+usb0_set_addr:
+7291 6ff08c02 fetch 1 ,core_usb_addr 
+7292 79207e07 set1 7 ,pdata 
+7293 67f08c02 store 1 ,core_usb_addr 
+7294 20600000 rtn 
+
+dsc_config_info:
+7295 58000612 setarg mem_confdesc 
+7296 68488612 fetcht 1 ,mem_confdesc 
+7297 20207280 branch dsc_info_set_data_len 
+
+dsc_string_info:
+7298 6fe086c3 fetch 1 ,mem_usb_setup_bvalue 
+7299 1fe67c03 sub pdata ,3 ,null 
+729a 2421724c nbranch usb0_force_stall ,positive 
+729b 6fe086c3 fetch 1 ,mem_usb_setup_bvalue 
+729c da20064e arg mem_string0 ,rega 
+729d c00073f1 beq 0 ,usb0_respond_length 
+729e 79200023 set1 mark_isstr ,mark 
+729f da200653 arg mem_string1 ,rega 
+72a0 c000f3f1 beq 1 ,usb0_respond_length 
+72a1 da200671 arg mem_string2 ,rega 
+72a2 c00173f1 beq 2 ,usb0_respond_length 
+72a3 da20068f arg mem_string3 ,rega 
+72a4 c001f3f1 beq 3 ,usb0_respond_length 
+72a5 20600000 rtn 
+
+dsc_hid_report_info:
+72a6 6fe106c5 fetch 2 ,mem_usb_setup_windex 
+72a7 c000f2aa beq 1 ,dsc_hid_report_info0 
+72a8 6a2105fb fetchr rega ,2 ,mem_hidreportdesc_kb 
+72a9 202073f1 branch usb0_respond_length 
+
+dsc_hid_report_info0:
+72aa 70076201 jam 1 ,mem_usb_device_enumeration_endflag 
+72ab 70075401 jam usb_got_report_req ,mem_usb_state 
+72ac 6a2105fd fetchr rega ,2 ,mem_hidreportdesc_m 
+72ad 202073f1 branch usb0_respond_length 
+
+usb0_request_get_interface:
+72ae 6fe086bf fetch 1 ,mem_usb0_state 
+72af c082724c bne dev_configured ,usb0_force_stall 
+72b0 6fe086c1 fetch 1 ,mem_usb_setup_bmrequesttype 
+72b1 c0c0f24c bne in_interface ,usb0_force_stall 
+72b2 6fe086c3 fetch 1 ,mem_usb_setup_bvalue 
+72b3 c080724c bne 0 ,usb0_force_stall 
+72b4 6fe086c4 fetch 1 ,mem_usb_setup_bvalueh 
+72b5 c080724c bne 0 ,usb0_force_stall 
+72b6 6fe086c7 fetch 1 ,mem_usb_setup_blength 
+72b7 c080f24c bne 1 ,usb0_force_stall 
+72b8 6fe086c8 fetch 1 ,mem_usb_setup_blengthh 
+72b9 c080724c bne 0 ,usb0_force_stall 
+72ba 6fe086c5 fetch 1 ,mem_usb_setup_windex 
+72bb c080724c bne 0 ,usb0_force_stall 
+72bc 6fe086c6 fetch 1 ,mem_usb_setup_windex + 1 
+72bd c080724c bne 0 ,usb0_force_stall 
+72be da400001 arg 1 ,regb 
+72bf 202072d8 branch usb_send_zero_packet 
+
+usb0_request_get_status:
+72c0 6fe086bf fetch 1 ,mem_usb0_state 
+72c1 c001724c beq dev_default ,usb0_force_stall 
+72c2 6fe086c3 fetch 1 ,mem_usb_setup_bvalue 
+72c3 c080724c bne 0 ,usb0_force_stall 
+72c4 6fe086c4 fetch 1 ,mem_usb_setup_bvalueh 
+72c5 c080724c bne 0 ,usb0_force_stall 
+72c6 6fe086c7 fetch 1 ,mem_usb_setup_blength 
+72c7 c081724c bne 2 ,usb0_force_stall 
+72c8 6fe086c8 fetch 1 ,mem_usb_setup_blengthh 
+72c9 c080724c bne 0 ,usb0_force_stall 
+72ca 6fe086c6 fetch 1 ,mem_usb_setup_windex + 1 
+72cb c080724c bne 0 ,usb0_force_stall 
+72cc 6fe086c1 fetch 1 ,mem_usb_setup_bmrequesttype 
+72cd c04072d3 beq in_device ,usb0_get_status_in_device 
+72ce c040f2de beq in_interface ,usb0_get_status_in_interface 
+72cf c04172e2 beq in_endpoint ,usb0_get_status_in_endpoint 
+72d0 2020724c branch usb0_force_stall 
+
+usb0_sdsystem_dispose:
+72d1 70075701 jam 1 ,mem_sdsystem_wakeup_flag 
+72d2 202072dc branch usb_send_two_packet 
+
+usb0_get_status_in_device:
+72d3 6fe086c5 fetch 1 ,mem_usb_setup_windex 
+72d4 c080724c bne 0 ,usb0_force_stall 
+72d5 da400002 arg 2 ,regb 
+72d6 6fe08755 fetch 1 ,mem_usb_remote_wakeup 
+72d7 c000f2d1 beq 0x01 ,usb0_sdsystem_dispose 
+
+usb_send_zero_packet:
+72d8 da2006b9 arg mem_usb_zero_packet ,rega 
+72d9 202073f3 branch usb0_respond 
+
+usb_send_ones_packet:
+72da da2006bb arg mem_usb_ones_packet ,rega 
+72db 202073f3 branch usb0_respond 
+
+usb_send_two_packet:
+72dc da2006bd arg mem_usb_two_packet ,rega 
+72dd 202073f3 branch usb0_respond 
+
+usb0_get_status_in_interface:
+72de 6fe086bf fetch 1 ,mem_usb0_state 
+72df c082724c bne dev_configured ,usb0_force_stall 
+72e0 da400002 arg 2 ,regb 
+72e1 202072d8 branch usb_send_zero_packet 
+
+usb0_get_status_in_endpoint:
+72e2 6fe086bf fetch 1 ,mem_usb0_state 
+72e3 c082724c bne dev_configured ,usb0_force_stall 
+72e4 6fe086c5 fetch 1 ,mem_usb_setup_windex 
+72e5 c040f2ef beq in_ep1 ,usb0_get_status_in_ep_in_ep1 
+72e6 c04172f1 beq in_ep2 ,usb0_get_status_in_ep_in_ep2 
+72e7 c041f2f3 beq in_ep3 ,usb0_get_status_in_ep_in_ep3 
+72e8 1fe17e7f and_into 0x7f ,pdata 
+72e9 c00072eb beq 0x00 ,usb0_get_status_in_ep_in_ep0 
+72ea 2020724c branch usb0_force_stall 
+
+usb0_get_status_in_ep_in_ep0:
+72eb 6fe08758 fetch 1 ,mem_usb_ep0_stall_status 
+
+usb0_get_status_in_ep_in_ack:
+72ec da400002 arg 2 ,regb 
+72ed c000f2da beq 1 ,usb_send_ones_packet 
+72ee 202072d8 branch usb_send_zero_packet 
+
+usb0_get_status_in_ep_in_ep1:
+72ef 6fe08759 fetch 1 ,mem_usb_ep1_stall_status 
+72f0 202072ec branch usb0_get_status_in_ep_in_ack 
+
+usb0_get_status_in_ep_in_ep2:
+72f1 6fe0875a fetch 1 ,mem_usb_ep2_stall_status 
+72f2 202072ec branch usb0_get_status_in_ep_in_ack 
+
+usb0_get_status_in_ep_in_ep3:
+72f3 6fe0875b fetch 1 ,mem_usb_ep3_stall_status 
+72f4 202072ec branch usb0_get_status_in_ep_in_ack 
+
+usb_get_idle:
+72f5 70074f01 jam 1 ,mem_usb_idle_flag 
+72f6 da200750 arg mem_usb_idle_rate ,rega 
+72f7 da400001 arg 1 ,regb 
+72f8 202073f3 branch usb0_respond 
+
+usb_get_report:
+72f9 6fe106c3 fetch 2 ,mem_usb_setup_bvalue 
+72fa d84001ba arg pc_get_report ,temp 
+72fb 98467c00 isub temp ,null 
+72fc 2422f24c nbranch usb0_force_stall ,zero 
+
+usb_get_report_dispose:
+72fd 6fe0874c fetch 1 ,mem_usb0_data_ready_report 
+72fe 243a7307 nbranch usb_get_report_data_success ,blank 
+72ff 70070900 jam pc_get_nondata ,mem_usb0_get_report_data 
+
+usb_get_report_send_data:
+7300 6fe086c7 fetch 1 ,mem_usb_setup_blength 
+7301 98002400 iforce regb 
+7302 da200709 arg mem_usb0_get_report_data ,rega 
+7303 204073f3 call usb0_respond 
+
+usb_get_report_data_release:
+7304 d8a00709 arg mem_usb0_get_report_data ,contw 
+7305 df200008 arg 8 ,loopcnt 
+7306 20207500 branch memset0 
+
+usb_get_report_data_success:
+7307 70074c00 jam 0 ,mem_usb0_data_ready_report 
+7308 70070901 jam pc_get_data ,mem_usb0_get_report_data 
+7309 20207300 branch usb_get_report_send_data 
+
+usb_get_protocol_req:
+730a 6fe086c7 fetch 1 ,mem_usb_setup_blength 
+730b c080f24c bne 1 ,usb0_force_stall 
+730c 70075101 jam 1 ,mem_usb_get_protocol_flag 
+730d da400001 arg 1 ,regb 
+730e 6fe08753 fetch 1 ,mem_usb_set_protocol_value 
+730f c0007312 beq 0 ,usb_get_report_protocol 
+7310 c000f313 beq 1 ,usb_get_boot_protocol 
+7311 202072d8 branch usb_send_zero_packet 
+
+usb_get_report_protocol:
+7312 202072da branch usb_send_ones_packet 
+
+usb_get_boot_protocol:
+7313 202072d8 branch usb_send_zero_packet 
+
+usb0_request_clear_feature:
+7314 6fe086bf fetch 1 ,mem_usb0_state 
+7315 c082724c bne dev_configured ,usb0_force_stall 
+7316 6fe086c7 fetch 1 ,mem_usb_setup_blength 
+7317 c080724c bne 0 ,usb0_force_stall 
+7318 6fe086c8 fetch 1 ,mem_usb_setup_blengthh 
+7319 c080724c bne 0 ,usb0_force_stall 
+731a 6fe086c4 fetch 1 ,mem_usb_setup_bvalueh 
+731b c080724c bne 0 ,usb0_force_stall 
+731c 6fe086c6 fetch 1 ,mem_usb_setup_windex + 1 
+731d c080724c bne 0 ,usb0_force_stall 
+731e 6fe086c1 fetch 1 ,mem_usb_setup_bmrequesttype 
+731f c0007323 beq out_device ,usb0_request_clear_feature_out_device 
+7320 c000f330 beq out_interface ,usb0_request_clear_feature_out_interface 
+7321 c0017331 beq out_endpoint ,usb0_request_clear_feature_out_endpoint 
+7322 2020724c branch usb0_force_stall 
+
+usb0_request_clear_feature_out_device:
+7323 6fe086c3 fetch 1 ,mem_usb_setup_bvalue 
+7324 c080f24c bne device_remote_wakeup ,usb0_force_stall 
+7325 6ff08c00 fetch 1 ,core_usb_config 
+7326 793ffe07 set0 7 ,pdata 
+7327 67f08c00 store 1 ,core_usb_config 
+7328 70075500 jam 0 ,mem_usb_remote_wakeup 
+7329 70075601 jam 1 ,mem_usb_clear_remote_wakeup 
+732a 6fe08757 fetch 1 ,mem_sdsystem_wakeup_flag 
+732b 203a7251 branch usb0_reply_zerolen ,blank 
+732c 70075700 jam 0 ,mem_sdsystem_wakeup_flag 
+732d 70075600 jam 0 ,mem_usb_clear_remote_wakeup 
+732e 70075402 jam usb_connected ,mem_usb_state 
+732f 20207251 branch usb0_reply_zerolen 
+
+usb0_request_clear_feature_out_interface:
+7330 2020724c branch usb0_force_stall 
+
+usb0_request_clear_feature_out_endpoint:
+7331 6fe086c3 fetch 1 ,mem_usb_setup_bvalue 
+7332 c080724c bne endpoint_halt ,usb0_force_stall 
+7333 6fe086c5 fetch 1 ,mem_usb_setup_windex 
+7334 c040f33c beq in_ep1 ,usb0_force_stall_ep1_in_off 
+7335 c041733f beq in_ep2 ,usb0_force_stall_ep2_in_off 
+7336 c041f341 beq in_ep3 ,usb0_force_stall_ep3_in_off 
+7337 1fe17e7f and_into 0x7f ,pdata 
+7338 c000733a beq 0x00 ,usb0_force_stall_ep0_in_off 
+7339 2020724c branch usb0_force_stall 
+
+usb0_force_stall_ep0_in_off:
+733a 70075800 jam 0 ,mem_usb_ep0_stall_status 
+733b 20207251 branch usb0_reply_zerolen 
+
+usb0_force_stall_ep1_in_off:
+733c 70075900 jam 0 ,mem_usb_ep1_stall_status 
+
+usb0_force_stall_ep1_in_off_reply:
+733d 70076601 jam 1 ,mem_usb_clear_halt 
+733e 20207251 branch usb0_reply_zerolen 
+
+usb0_force_stall_ep2_in_off:
+733f 70075a00 jam 0 ,mem_usb_ep2_stall_status 
+7340 2020733d branch usb0_force_stall_ep1_in_off_reply 
+
+usb0_force_stall_ep3_in_off:
+7341 70075b00 jam 0 ,mem_usb_ep3_stall_status 
+7342 2020733d branch usb0_force_stall_ep1_in_off_reply 
+
+usb0_request_set_feature:
+7343 6fe086c7 fetch 1 ,mem_usb_setup_blength 
+7344 c080724c bne 0 ,usb0_force_stall 
+7345 6fe086c8 fetch 1 ,mem_usb_setup_blengthh 
+7346 c080724c bne 0 ,usb0_force_stall 
+7347 6fe086c1 fetch 1 ,mem_usb_setup_bmrequesttype 
+7348 c000734c beq out_device ,usb0_request_set_feature_out_device 
+7349 c000f35a beq out_interface ,usb0_request_set_feature_out_interface 
+734a c001735b beq out_endpoint ,usb0_request_set_feature_out_endpoint 
+734b 2020724c branch usb0_force_stall 
+
+usb0_request_set_feature_out_device:
+734c 6fe086c3 fetch 1 ,mem_usb_setup_bvalue 
+734d c080f24c bne device_remote_wakeup ,usb0_force_stall 
+734e 20405337 call dongle_set_pc_sleep_flag 
+734f 6ff08c00 fetch 1 ,core_usb_config 
+7350 79207e07 set1 7 ,pdata 
+7351 67f08c00 store 1 ,core_usb_config 
+7352 70075501 jam 1 ,mem_usb_remote_wakeup 
+7353 70075403 jam usb_sleep ,mem_usb_state 
+7354 70074d00 jam 0 ,mem_usb_tx_win_enable 
+7355 20407251 call usb0_reply_zerolen 
+
+usb_wakeup_timer_reinit:
+7356 2040755c call timer_reinit 
+7357 58001388 setarg timer_wakeup_delay 
+7358 d8e0000f arg usb_timer_wakeup ,queue 
+7359 2020754f branch timer_init 
+
+usb0_request_set_feature_out_interface:
+735a 2020724c branch usb0_force_stall 
+
+usb0_request_set_feature_out_endpoint:
+735b 6fe086c3 fetch 1 ,mem_usb_setup_bvalue 
+735c c080724c bne endpoint_halt ,usb0_force_stall 
+735d 6fe086c4 fetch 1 ,mem_usb_setup_bvalueh 
+735e c080724c bne 0 ,usb0_force_stall 
+735f 6fe086c5 fetch 1 ,mem_usb_setup_windex 
+7360 c040f368 beq in_ep1 ,usb0_force_stall_ep1_in_on 
+7361 c041736a beq in_ep2 ,usb0_force_stall_ep2_in_on 
+7362 c041f36c beq in_ep3 ,usb0_force_stall_ep3_in_on 
+7363 1fe17e7f and_into 0x7f ,pdata 
+7364 c0007366 beq 0x00 ,usb0_force_stall_ep0_in_on 
+7365 2020724c branch usb0_force_stall 
+
+usb0_force_stall_ep0_in_on:
+7366 70075801 jam 1 ,mem_usb_ep0_stall_status 
+7367 20207251 branch usb0_reply_zerolen 
+
+usb0_force_stall_ep1_in_on:
+7368 70075901 jam 1 ,mem_usb_ep1_stall_status 
+7369 20207251 branch usb0_reply_zerolen 
+
+usb0_force_stall_ep2_in_on:
+736a 70075a01 jam 1 ,mem_usb_ep2_stall_status 
+736b 20207251 branch usb0_reply_zerolen 
+
+usb0_force_stall_ep3_in_on:
+736c 70075b01 jam 1 ,mem_usb_ep3_stall_status 
+736d 20207251 branch usb0_reply_zerolen 
+
+usb0_request_set_address:
+736e 6fe086c1 fetch 1 ,mem_usb_setup_bmrequesttype 
+736f c080724c bne out_device ,usb0_force_stall 
+7370 6fe086c5 fetch 1 ,mem_usb_setup_windex 
+7371 c080724c bne 0 ,usb0_force_stall 
+7372 6fe086c6 fetch 1 ,mem_usb_setup_windex + 1 
+7373 c080724c bne 0 ,usb0_force_stall 
+7374 6fe086c7 fetch 1 ,mem_usb_setup_blength 
+7375 c080724c bne 0 ,usb0_force_stall 
+7376 6fe086c8 fetch 1 ,mem_usb_setup_blengthh 
+7377 c080724c bne 0 ,usb0_force_stall 
+7378 6fe086c4 fetch 1 ,mem_usb_setup_bvalueh 
+7379 c080724c bne 0 ,usb0_force_stall 
+737a 6fe086c3 fetch 1 ,mem_usb_setup_bvalue 
+737b 1fe17e80 and_into 0x80 ,pdata 
+737c c080724c bne 0 ,usb0_force_stall 
+737d 6fe086c3 fetch 1 ,mem_usb_setup_bvalue 
+737e c0807385 bne 0 ,usb_usb0_state_set_dev_addr 
+
+usb_usb0_state_set_dev_default:
+737f 7006bf02 jam dev_default ,mem_usb0_state 
+
+usb0_request_set_wait_address:
+7380 6fe086c3 fetch 1 ,mem_usb_setup_bvalue 
+7381 67f08c02 store 1 ,core_usb_addr 
+7382 20407251 call usb0_reply_zerolen 
+7383 70076501 jam 1 ,mem_usb_set_high_addr_flag 
+7384 20600000 rtn 
+
+usb_usb0_state_set_dev_addr:
+7385 7006bf03 jam dev_address ,mem_usb0_state 
+7386 20207380 branch usb0_request_set_wait_address 
+
+usb0_request_set_configuration:
+7387 6fe086bf fetch 1 ,mem_usb0_state 
+7388 c001724c beq dev_default ,usb0_force_stall 
+7389 6fe086c1 fetch 1 ,mem_usb_setup_bmrequesttype 
+738a c080724c bne out_device ,usb0_force_stall 
+738b 6fe086c5 fetch 1 ,mem_usb_setup_windex 
+738c c080724c bne 0 ,usb0_force_stall 
+738d 6fe086c6 fetch 1 ,mem_usb_setup_windex + 1 
+738e c080724c bne 0 ,usb0_force_stall 
+738f 6fe086c7 fetch 1 ,mem_usb_setup_blength 
+7390 c080724c bne 0 ,usb0_force_stall 
+7391 6fe086c8 fetch 1 ,mem_usb_setup_blengthh 
+7392 c080724c bne 0 ,usb0_force_stall 
+7393 6fe086c4 fetch 1 ,mem_usb_setup_bvalue + 1 
+7394 c080724c bne 0 ,usb0_force_stall 
+7395 6fe086c3 fetch 1 ,mem_usb_setup_bvalue 
+7396 1fe67c01 sub pdata ,usb_max_num_cfg ,null 
+7397 2421724c nbranch usb0_force_stall ,positive 
+7398 6fe086bf fetch 1 ,mem_usb0_state 
+7399 c001f39c beq dev_address ,usb0_request_set_cfg_addr_state 
+739a c002739c beq dev_configured ,usb0_request_set_cfg_cfg_state 
+739b 2020724c branch usb0_force_stall 
+
+usb0_request_set_cfg_addr_state:
+
+usb0_request_set_cfg_cfg_state:
+739c 6fe086c3 fetch 1 ,mem_usb_setup_bvalue 
+739d c00073a0 beq 0 ,usb0_request_set_cfg_stay_addr_state 
+739e 7006bf04 jam dev_configured ,mem_usb0_state 
+739f 20207251 branch usb0_reply_zerolen 
+
+usb0_request_set_cfg_stay_addr_state:
+73a0 7006bf03 jam dev_address ,mem_usb0_state 
+73a1 20207251 branch usb0_reply_zerolen 
+
+usb0_request_set_interface:
+73a2 6fe086bf fetch 1 ,mem_usb0_state 
+73a3 c082724c bne dev_configured ,usb0_force_stall 
+73a4 6fe086c1 fetch 1 ,mem_usb_setup_bmrequesttype 
+73a5 c080f24c bne out_interface ,usb0_force_stall 
+73a6 6fe086c3 fetch 1 ,mem_usb_setup_bvalue 
+73a7 c080724c bne 0 ,usb0_force_stall 
+73a8 6fe086c4 fetch 1 ,mem_usb_setup_bvalueh 
+73a9 c080724c bne 0 ,usb0_force_stall 
+73aa 6fe086c7 fetch 1 ,mem_usb_setup_blength 
+73ab c080724c bne 0 ,usb0_force_stall 
+73ac 6fe086c8 fetch 1 ,mem_usb_setup_blengthh 
+73ad c080724c bne 0 ,usb0_force_stall 
+73ae 6fe086c5 fetch 1 ,mem_usb_setup_windex 
+73af c080724c bne 0 ,usb0_force_stall 
+73b0 6fe086c6 fetch 1 ,mem_usb_setup_windex + 1 
+73b1 c080724c bne 0 ,usb0_force_stall 
+73b2 20207251 branch usb0_reply_zerolen 
+
+usb_set_idle:
+73b3 44df4017 bpatch patch17_6 ,mem_patch17 
+73b4 70074f01 jam 1 ,mem_usb_idle_flag 
+73b5 6fe086c4 fetch 1 ,mem_usb_setup_bvalueh 
+73b6 67e08750 store 1 ,mem_usb_idle_rate 
+73b7 6fe086c5 fetch 1 ,mem_usb_setup_windex 
+73b8 1fe67c01 sub pdata ,1 ,null 
+73b9 2042f3c1 call usb_clear_remote_wakeup_set0 ,zero 
+73ba 6fe08754 fetch 1 ,mem_usb_state 
+73bb c0827251 bne usb_resume ,usb0_reply_zerolen 
+73bc 70075402 jam usb_connected ,mem_usb_state 
+73bd 20407251 call usb0_reply_zerolen 
+73be 20007530 nop 30000 
+73bf 20007530 nop 30000 
+73c0 20600000 rtn 
+
+usb_clear_remote_wakeup_set0:
+73c1 70076201 jam 1 ,mem_usb_device_enumeration_endflag 
+73c2 70075600 jam 0 ,mem_usb_clear_remote_wakeup 
+73c3 70075404 jam usb_resume ,mem_usb_state 
+73c4 20600000 rtn 
+
+usb_set_report:
+73c5 20003a98 nop 15000 
+73c6 d8a006c9 arg mem_usb0_set_report_data ,contw 
+73c7 204071f8 call usb_rx_data 
+73c8 70074b01 jam 1 ,mem_usb0_get_set_report 
+73c9 204073d6 call usb_set_report_resume_judge 
+73ca 6fe106c3 fetch 2 ,mem_usb_setup_bvalue 
+73cb 67e10749 store 2 ,mem_usb_setup_bvalue_temp 
+73cc 20407251 call usb0_reply_zerolen 
+73cd 6fe0c095 fetch 1 ,mem_device_option 
+73ce c1820000 rtnne dvc_op_dongle 
+73cf 6fe0874d fetch 1 ,mem_usb_tx_win_enable 
+73d0 207a0000 rtn blank 
+73d1 6fe086c9 fetch 1 ,mem_usb0_set_report_data 
+
+usb_get_led_status:
+73d2 67e0c564 store 1 ,mem_24g_led_status 
+73d3 70074d00 jam 0 ,mem_usb_tx_win_enable 
+73d4 70455403 jam kb_led_ackpayload ,mem_24g_ackpayload_enable 
+73d5 20600000 rtn 
+
+usb_set_report_resume_judge:
+73d6 6fe106c3 fetch 2 ,mem_usb_setup_bvalue 
+73d7 d8400200 arg pc_set_report_bvalue ,temp 
+73d8 98467c00 isub temp ,null 
+73d9 24628000 nrtn zero 
+73da 6fe106c5 fetch 2 ,mem_usb_setup_windex 
+73db d8400000 arg pc_set_report_windex ,temp 
+73dc 98467c00 isub temp ,null 
+73dd 24628000 nrtn zero 
+73de 6fe106c7 fetch 2 ,mem_usb_setup_blength 
+73df d8400001 arg pc_set_report_blength ,temp 
+73e0 98467c00 isub temp ,null 
+73e1 24628000 nrtn zero 
+73e2 70074d01 jam 1 ,mem_usb_tx_win_enable 
+73e3 20600000 rtn 
+
+usb_set_protocol_req:
+73e4 6fe086c7 fetch 1 ,mem_usb_setup_blength 
+73e5 c080724c bne 0 ,usb0_force_stall 
+73e6 6fe086c3 fetch 1 ,mem_usb_setup_bvalue 
+73e7 c00073ea beq boot_protocol ,usb_set_boot_protocol 
+73e8 c000f3ed beq report_protocol ,usb_set_report_protocol 
+73e9 2020724c branch usb0_force_stall 
+
+usb_set_boot_protocol:
+73ea 70075200 jam 0 ,mem_usb_set_protocol_status 
+73eb 70075301 jam 1 ,mem_usb_set_protocol_value 
+73ec 20207251 branch usb0_reply_zerolen 
+
+usb_set_report_protocol:
+73ed 70074e01 jam 1 ,mem_usb_tx_mac_enable 
+73ee 70075201 jam 1 ,mem_usb_set_protocol_status 
+73ef 70075300 jam 0 ,mem_usb_set_protocol_value 
+73f0 20207251 branch usb0_reply_zerolen 
+
+usb0_respond_length:
+73f1 ea408011 ifetchr regb ,1 ,rega 
+73f2 1a20a201 increase 1 ,rega 
+
+usb0_respond:
+73f3 44dfc017 bpatch patch17_7 ,mem_patch17 
+73f4 7920000e set1 mark_usb_first_resp ,mark 
+73f5 c591f3f8 bmark0 mark_isstr ,usb0_respond_nostr 
+73f6 1a40a401 increase 1 ,regb 
+73f7 1a43a400 lshift regb ,regb 
+
+usb0_respond_nostr:
+73f8 622105f8 storer rega ,2 ,mem_bufptr 
+73f9 624085fa storer regb ,1 ,mem_remain 
+73fa 202073fd branch usb0_tx 
+
+usb_no_respond_data:
+73fb d8e00000 arg 0 ,queue 
+73fc 2020743d branch usb_trig 
+
+usb0_tx:
+73fd 44e04018 bpatch patch18_0 ,mem_patch18 
+73fe 6ff08c24 fetch 1 ,core_usb_txbusy 
+73ff c3800000 rtnbit1 0 
+7400 6fe085fa fetch 1 ,mem_remain 
+7401 207a0000 rtn blank 
+7402 1fe27200 copy pdata ,loopcnt 
+7403 98000400 iforce temp 
+7404 6fe106c7 fetch 2 ,mem_usb_setup_blength 
+7405 1fe67c40 sub pdata ,ep0_packet_size ,null 
+7406 2021740b branch usb0_tx_short ,positive 
+7407 1f267c40 sub loopcnt ,ep0_packet_size ,null 
+7408 2021740f branch usb0_tx_info ,positive 
+7409 18007240 force ep0_packet_size ,loopcnt 
+740a 2020740f branch usb0_tx_info 
+
+usb0_tx_short:
+740b 9f267c00 isub loopcnt ,null 
+740c 2021740f branch usb0_tx_info ,positive 
+740d 98007200 iforce loopcnt 
+740e 67e085fa store 1 ,mem_remain 
+
+usb0_tx_info:
+740f 6fe085fa fetch 1 ,mem_remain 
+7410 9f267e00 isub loopcnt ,pdata 
+7411 67e085fa store 1 ,mem_remain 
+7412 1f20ffff add loopcnt ,-1 ,pdata 
+7413 67e08562 store 1 ,mem_usb_txbuf 
+7414 c591f421 bmark0 mark_isstr ,usb0_tx_nostr 
+7415 1fe37e00 rshift pdata ,pdata 
+7416 1f20ffff add loopcnt ,-1 ,pdata 
+7417 67e08562 store 1 ,mem_usb_txbuf 
+7418 c5877421 bmark0 mark_usb_first_resp ,usb0_tx_nostr 
+7419 793f800e set0 mark_usb_first_resp ,mark 
+741a e0408005 istoret 1 ,contw 
+741b 58000003 setarg 3 
+741c e7e08005 istore 1 ,contw 
+741d 1f20f3ff increase -1 ,loopcnt 
+741e 1f227e00 copy loopcnt ,pdata 
+741f 2422f421 nbranch usb0_tx_nostr ,zero 
+7420 1f20f201 increase 1 ,loopcnt 
+
+usb0_tx_nostr:
+7421 6fe105f8 fetch 2 ,mem_bufptr 
+7422 1fe20c00 copy pdata ,contr 
+
+usb0_tx0:
+7423 efe08006 ifetch 1 ,contr 
+7424 e7e08005 istore 1 ,contw 
+7425 c591f428 bmark0 mark_isstr ,usb0_tx1 
+7426 58000000 setarg 0 
+7427 e7e08005 istore 1 ,contw 
+
+usb0_tx1:
+7428 c2007423 loop usb0_tx0 
+7429 18c27e00 copy contr ,pdata 
+742a 67e105f8 store 2 ,mem_bufptr 
+742b 58000562 setarg mem_usb_txbuf 
+742c 67f10c09 store 2 ,core_usb_tx_saddr0 
+742d d8e00000 arg 0 ,queue 
+742e 2040743d call usb_trig 
+742f 6fe085fa fetch 1 ,mem_remain 
+7430 247a0000 nrtn blank 
+7431 6fe08754 fetch 1 ,mem_usb_state 
+7432 c1808000 rtnne usb_got_report_req 
+7433 70075402 jam usb_connected ,mem_usb_state 
+7434 20600000 rtn 
+
+usb_tx_ep1:
+7435 d8e00001 arg 1 ,queue 
+7436 da2005a3 arg mem_usb_txbuf1 ,rega 
+7437 62310c0b storer rega ,2 ,core_usb_tx_saddr1 
+
+usb_tx_buf:
+7438 1f20ffff add loopcnt ,-1 ,pdata 
+7439 e7e08011 istore 1 ,rega 
+
+usb_tx_loop:
+743a efe08006 ifetch 1 ,contr 
+743b e7e08005 istore 1 ,contw 
+743c c200743a loop usb_tx_loop 
+
+usb_trig:
+743d 58000000 setarg 0 
+743e f9207e00 qset1 pdata 
+743f 67f08c18 store 1 ,core_usb_trig 
+7440 20600000 rtn 
+
+usb_tx_ep2:
+7441 d8e00002 arg 2 ,queue 
+7442 da2005ad arg mem_usb_txbuf2 ,rega 
+7443 62310c0d storer rega ,2 ,core_usb_tx_saddr2 
+7444 20207438 branch usb_tx_buf 
+
+usb_tx:
+7445 44e0c018 bpatch patch18_1 ,mem_patch18 
+7446 6fe08761 fetch 1 ,mem_usb_tx_enable 
+7447 207a0000 rtn blank 
+7448 6ff08c24 fetch 1 ,core_usb_txbusy 
+7449 1fe17e0f and_into 0x0f ,pdata 
+744a 243a7496 nbranch usb_inwake_state_tx_dispose ,blank 
+744b 6fe08762 fetch 1 ,mem_usb_device_enumeration_endflag 
+744c 203a746c branch usb_tx_fifo_release ,blank 
+744d 6fe08754 fetch 1 ,mem_usb_state 
+744e c001f4a6 beq usb_sleep ,usb_windows_wakeup 
+744f c081746c bne usb_connected ,usb_tx_fifo_release 
+7450 6fe08756 fetch 1 ,mem_usb_clear_remote_wakeup 
+7451 243a746c nbranch usb_tx_fifo_release ,blank 
+7452 20407454 call usb_tx_data_ep1 
+7453 2020745f branch usb_tx_data_ep2 
+
+usb_tx_data_ep1:
+7454 6ff08c24 fetch 1 ,core_usb_txbusy 
+7455 c3808000 rtnbit1 1 
+7456 6fe08761 fetch 1 ,mem_usb_tx_enable 
+7457 c4008000 rtnbit0 1 
+7458 6fe08761 fetch 1 ,mem_usb_tx_enable 
+7459 793ffe01 set0 1 ,pdata 
+745a 67e08761 store 1 ,mem_usb_tx_enable 
+745b 6fe0875f fetch 1 ,mem_usb_ep1_data 
+745c 207a0000 rtn blank 
+745d c008748e beq usb_ep1_kb ,usb_tx_kb_normal_data 
+745e 20203aba branch assert 
+
+usb_tx_data_ep2:
+745f 6ff08c24 fetch 1 ,core_usb_txbusy 
+7460 c3810000 rtnbit1 2 
+7461 6fe08761 fetch 1 ,mem_usb_tx_enable 
+7462 c4010000 rtnbit0 2 
+7463 6fe08761 fetch 1 ,mem_usb_tx_enable 
+7464 793ffe02 set0 2 ,pdata 
+7465 67e08761 store 1 ,mem_usb_tx_enable 
+7466 6fe08760 fetch 1 ,mem_usb_ep2_data 
+7467 207a0000 rtn blank 
+7468 c010746f beq usb_ep2_ms ,usb_tx_ms_data 
+7469 c010f48a beq usb_ep2_multikey ,usb_tx_kb_multikey_data 
+746a c0117492 beq usb_ep2_systemkey ,usb_tx_kb_systemkey_data 
+746b 20203aba branch assert 
+
+usb_tx_fifo_release:
+746c d8a00767 arg mem_usb_mouse_data ,contw 
+746d df200008 arg 8 ,loopcnt 
+746e 20207500 branch memset0 
+
+usb_tx_ms_data:
+746f 6fe0874f fetch 1 ,mem_usb_idle_flag 
+7470 68488751 fetcht 1 ,mem_usb_get_protocol_flag 
+7471 98417e00 iand temp ,pdata 
+7472 203a7486 branch usb_tx_ms_data_normal_mode ,blank 
+7473 68488752 fetcht 1 ,mem_usb_set_protocol_status 
+7474 9840fe00 iadd temp ,pdata 
+7475 c000f477 beq mac_boot_mode ,usb_tx_ms_data_mac_boot_mode 
+7476 20207486 branch usb_tx_ms_data_normal_mode 
+
+usb_tx_ms_data_mac_boot_mode:
+7477 70076000 jam 0 ,mem_usb_ep2_data 
+
+usb_tx_ms_data_mac_boot_regroup:
+7478 6fe08768 fetch 1 ,mem_usb_mouse_data + 1 
+7479 c0017487 beq r_key ,usb_tx_mac_boot_ms_regroup_r_or_lrkey 
+747a c001f487 beq lr_key ,usb_tx_mac_boot_ms_regroup_r_or_lrkey 
+747b 6fe08768 fetch 1 ,mem_usb_mouse_data + 1 
+747c 67e08767 store 1 ,mem_usb_mouse_data 
+747d 6fe08769 fetch 1 ,mem_usb_mouse_data + 2 
+747e e7e08005 istore 1 ,contw 
+747f 6fe0876b fetch 1 ,mem_usb_mouse_data + 4 
+7480 e7e08005 istore 1 ,contw 
+7481 6fe0876d fetch 1 ,mem_usb_mouse_data + 6 
+7482 e7e08005 istore 1 ,contw 
+7483 df200004 arg 4 ,loopcnt 
+7484 d8c00767 arg mem_usb_mouse_data ,contr 
+7485 20207441 branch usb_tx_ep2 
+
+usb_tx_ms_data_normal_mode:
+7486 70076000 jam 0 ,mem_usb_ep2_data 
+
+usb_tx_mac_boot_ms_regroup_r_or_lrkey:
+7487 df200008 arg 8 ,loopcnt 
+7488 d8c00767 arg mem_usb_mouse_data ,contr 
+7489 20207441 branch usb_tx_ep2 
+
+usb_tx_kb_multikey_data:
+748a 70076000 jam 0 ,mem_usb_ep2_data 
+748b df200003 arg 3 ,loopcnt 
+748c d8c00787 arg mem_usb_kb_multikey ,contr 
+748d 20207441 branch usb_tx_ep2 
+
+usb_tx_kb_normal_data:
+748e 70075f00 jam 0 ,mem_usb_ep1_data 
+748f df200008 arg 8 ,loopcnt 
+7490 d8c00777 arg mem_usb_kb_data ,contr 
+7491 20207435 branch usb_tx_ep1 
+
+usb_tx_kb_systemkey_data:
+7492 70076000 jam 0 ,mem_usb_ep2_data 
+7493 df200002 arg 2 ,loopcnt 
+7494 d8c00797 arg mem_usb_kb_system ,contr 
+7495 20207441 branch usb_tx_ep2 
+
+usb_inwake_state_tx_dispose:
+7496 6fe08754 fetch 1 ,mem_usb_state 
+7497 c0017499 beq usb_connected ,usb_mac_wakeup_trig 
+7498 20600000 rtn 
+
+usb_mac_wakeup_trig:
+7499 6ff08c00 fetch 1 ,core_usb_config 
+749a 79207e07 set1 7 ,pdata 
+749b 67f08c00 store 1 ,core_usb_config 
+749c 70076401 jam 1 ,mem_usb_mac_wakeup_trig 
+749d 20600000 rtn 
+
+usb_mac_wakeup_judge:
+749e 6fe08754 fetch 1 ,mem_usb_state 
+749f c1018000 rtneq usb_sleep 
+74a0 c00174a2 beq usb_connected ,usb_mac_wakeup 
+74a1 20600000 rtn 
+
+usb_mac_wakeup:
+74a2 6fe08764 fetch 1 ,mem_usb_mac_wakeup_trig 
+74a3 207a0000 rtn blank 
+74a4 70076301 jam 1 ,mem_usb_wakestate_onetime_flag 
+74a5 202074a9 branch usb_wakeup 
+
+usb_windows_wakeup:
+74a6 d8e0000f arg usb_timer_wakeup ,queue 
+74a7 2040755d call timer_check 
+74a8 247a0000 nrtn blank 
+
+usb_wakeup:
+74a9 6ff08c00 fetch 1 ,core_usb_config 
+74aa c4038000 rtnbit0 7 
+74ab 708c00fc jam 0xfc ,core_usb_config 
+74ac 20007530 nop 30000 
+74ad 708c003c jam 0x3c ,core_usb_config 
+74ae 20600000 rtn 
+
+push_stack:
+74af 60a104e5 storer contw ,2 ,mem_contw 
+74b0 604c04cc storet 8 ,mem_temp 
+74b1 616204d4 storer timeup ,4 ,mem_timeup 
+74b2 204074b7 call push_stack_rega_b_c 
+74b3 60c104e3 storer contr ,2 ,mem_contr 
+74b4 672104ef storer loopcnt ,2 ,mem_loopcnt 
+74b5 60e104ed storer queue ,2 ,mem_queue 
+74b6 20600000 rtn 
+
+push_stack_rega_b_c:
+74b7 622204d8 storer rega ,4 ,mem_rega 
+74b8 624204dc storer regb ,4 ,mem_regb 
+74b9 626184e0 storer regc ,3 ,mem_regc 
+74ba 20600000 rtn 
+
+pop_stack:
+74bb 44e14018 bpatch patch18_2 ,mem_patch18 
+74bc 6fe104e5 fetch 2 ,mem_contw 
+74bd 98000a00 iforce contw 
+74be 684c04cc fetcht 8 ,mem_temp 
+74bf 696204d4 fetchr timeup ,4 ,mem_timeup 
+74c0 204074c6 call pop_stack_rega_b_c 
+74c1 6f2104ef fetchr loopcnt ,2 ,mem_loopcnt 
+74c2 68e104ed fetchr queue ,2 ,mem_queue 
+74c3 6fe104e3 fetch 2 ,mem_contr 
+74c4 98000c00 iforce contr 
+74c5 20600000 rtn 
+
+pop_stack_rega_b_c:
+74c6 6a2204d8 fetchr rega ,4 ,mem_rega 
+74c7 6a4204dc fetchr regb ,4 ,mem_regb 
+74c8 6a6184e0 fetchr regc ,3 ,mem_regc 
+74c9 20600000 rtn 
+
+get_contw:
+74ca 6fe104e5 fetch 2 ,mem_contw 
+74cb 1fe20a00 copy pdata ,contw 
+74cc 20600000 rtn 
+
+get_contr:
+74cd 6fe104e3 fetch 2 ,mem_contr 
+74ce 1fe20c00 copy pdata ,contr 
+74cf 20600000 rtn 
+
+store_contw:
+74d0 18a27e00 copy contw ,pdata 
+74d1 67e104e5 store 2 ,mem_contw 
+74d2 20600000 rtn 
+
+store_contr:
+74d3 18c27e00 copy contr ,pdata 
+74d4 67e104e3 store 2 ,mem_contr 
+74d5 20600000 rtn 
+
+save_cont_pointers:
+74d6 18a27e00 copy contw ,pdata 
+74d7 67e104e5 store 2 ,mem_contw 
+74d8 18c27e00 copy contr ,pdata 
+74d9 67e104e3 store 2 ,mem_contr 
+74da 20600000 rtn 
+
+load_cont_pointers:
+74db 6fe104e5 fetch 2 ,mem_contw 
+74dc 1fe20a00 copy pdata ,contw 
+74dd 6fe104e3 fetch 2 ,mem_contr 
+74de 1fe20c00 copy pdata ,contr 
+74df 20600000 rtn 
+
+get_diff:
+74e0 98462200 isub temp ,rega 
+74e1 20610000 rtn positive 
+74e2 da200100 arg 0x100 ,rega 
+74e3 9a20fe00 iadd rega ,pdata 
+74e4 98462200 isub temp ,rega 
+74e5 20600000 rtn 
+
+memcpy96:
+74e6 204074f3 call memcpy32 
+
+memcpy64:
+74e7 204074f3 call memcpy32 
+74e8 202074f3 branch memcpy32 
+
+memcpy12:
+74e9 204074ef call memcpy8 
+
+memcpy4:
+74ea efe08006 ifetch 1 ,contr 
+74eb e7e08005 istore 1 ,contw 
+
+memcpy3:
+74ec efe18006 ifetch 3 ,contr 
+74ed e7e18005 istore 3 ,contw 
+74ee 20600000 rtn 
+
+memcpy8:
+74ef efe40006 ifetch 8 ,contr 
+74f0 e7e40005 istore 8 ,contw 
+74f1 20600000 rtn 
+
+memcpy48:
+74f2 204074f5 call memcpy16 
+
+memcpy32:
+74f3 204074ef call memcpy8 
+
+memcpy24:
+74f4 204074ef call memcpy8 
+
+memcpy16:
+74f5 204074ef call memcpy8 
+74f6 202074ef branch memcpy8 
+
+delay:
+74f7 1fe0ffff increase -1 ,pdata 
+74f8 20000026 nop 38 
+74f9 243a74f7 nbranch delay ,blank 
+74fa 20600000 rtn 
+
+delay_10ms:
+74fb df20000a arg 10 ,loopcnt 
+
+delay_ms_wait:
+74fc 20002ee0 nop 12000 
+74fd c20074fc loop delay_ms_wait 
+74fe 20600000 rtn 
+
+bn_zero:
+74ff 18007203 force 3 ,loopcnt 
+
+memset0:
+7500 18007e00 force 0 ,pdata 
+
+memset8:
+7501 e7e40005 istore 8 ,contw 
+7502 c2007501 loop memset8 
+7503 20600000 rtn 
+
+memset0_16:
+7504 20407505 call memset0_8 
+
+memset0_8:
+7505 18007e00 force 0 ,pdata 
+7506 e7e40005 istore 8 ,contw 
+7507 20600000 rtn 
+
+memset0_4:
+7508 18007e00 force 0 ,pdata 
+7509 e7e20005 istore 4 ,contw 
+750a 20600000 rtn 
+
+clear_mem_256:
+750b 18007204 force 4 ,loopcnt 
+750c 20207500 branch memset0 
+
+clear_mem_512:
+750d 18007208 force 8 ,loopcnt 
+750e 20207500 branch memset0 
+
+clear_mem:
+750f 1f227e00 deposit loopcnt 
+7510 207a0000 rtn blank 
+7511 58000000 setarg 0 
+
+clear_mem_loop:
+7512 e7e08005 istore 1 ,contw 
+7513 c2007512 loop clear_mem_loop 
+7514 20600000 rtn 
+
+clear_temp_block:
+7515 df200020 arg 32 ,loopcnt 
+7516 d8a004f6 arg mem_temp_block0 ,contw 
+7517 2020750f branch clear_mem 
+
+xor_loop:
+7518 efe20013 ifetch 4 ,regc 
+7519 e8420011 ifetcht 4 ,rega 
+751a 9842fe00 ixor temp ,pdata 
+751b e7e20005 istore 4 ,contw 
+751c 1a20a204 increase 4 ,rega 
+751d 1a60a604 increase 4 ,regc 
+751e c2007518 loop xor_loop 
+751f 20600000 rtn 
+
+inverse_data:
+7520 44e1c018 bpatch patch18_3 ,mem_patch18 
+7521 1f227e00 copy loopcnt ,pdata 
+7522 1fe67c01 sub pdata ,1 ,null 
+7523 20610000 rtn positive 
+7524 9a20a400 iadd rega ,regb 
+7525 1a40a5ff increase -1 ,regb 
+7526 1f237200 rshift loopcnt ,loopcnt 
+
+inverse_loop:
+7527 e8408011 ifetcht 1 ,rega 
+7528 efe08012 ifetch 1 ,regb 
+7529 e7e08011 istore 1 ,rega 
+752a e0408012 istoret 1 ,regb 
+752b 1a40a5ff increase -1 ,regb 
+752c 1a20a201 increase 1 ,rega 
+752d c2007527 loop inverse_loop 
+752e 20600000 rtn 
+
+le2be_6byte:
+
+inverse_data_6byte:
+752f 1fef0400 rshift32 pdata ,temp 
+7530 20407535 call inverse_data_4byte 
+7531 18508400 byteswap temp ,temp 
+7532 1ff07e00 lshift16 pdata ,pdata 
+7533 9841fe00 ior temp ,pdata 
+7534 20600000 rtn 
+
+le2be_4byte:
+
+inverse_data_4byte:
+7535 1ff10c00 rshift16 pdata ,contr 
+7536 18d08c00 byteswap contr ,contr 
+7537 1ff0fe00 byteswap pdata ,pdata 
+7538 1ff07e00 lshift16 pdata ,pdata 
+7539 98c1fe00 ior contr ,pdata 
+753a 20600000 rtn 
+
+memcpy_fast:
+753b 1f227e00 deposit loopcnt 
+753c 207a0000 rtn blank 
+
+memcpy_fast_loop:
+753d 1f20f3f8 increase -8 ,loopcnt 
+753e 204174ef call memcpy8 ,positive 
+753f 20628000 rtn zero 
+7540 2021753d branch memcpy_fast_loop ,positive 
+7541 1f20f208 increase 8 ,loopcnt 
+
+memcpy_fast_loop_four:
+7542 1f20f3fc increase -4 ,loopcnt 
+7543 204174ea call memcpy4 ,positive 
+7544 20628000 rtn zero 
+7545 20217542 branch memcpy_fast_loop_four ,positive 
+7546 1f20f204 increase 4 ,loopcnt 
+7547 20207548 branch memcpy 
+
+memcpy:
+7548 1f227e00 deposit loopcnt 
+7549 207a0000 rtn blank 
+
+memcpy_loop:
+754a efe08006 ifetch 1 ,contr 
+754b e7e08005 istore 1 ,contw 
+754c c200754a loop memcpy_loop 
+754d 20600000 rtn 
+
+timer_stop:
+754e 58000000 setarg 0 
+
+timer_init:
+754f 67e104c4 store 2 ,mem_pdatatemp 
+7550 44e24018 bpatch patch18_4 ,mem_patch18 
+7551 2040755d call timer_check 
+7552 684904c4 fetcht 2 ,mem_pdatatemp 
+7553 d8a040ed arg mem_timers ,contw 
+7554 18e3fe00 lshift queue ,pdata 
+7555 98a08a00 iadd contw ,contw 
+7556 e0410005 istoret 2 ,contw 
+7557 20600000 rtn 
+
+timer_check_timeout:
+7558 d9600800 arg 0x800 ,timeup 
+7559 19701600 lshift16 timeup ,timeup 
+755a 9960fe00 iadd timeup ,pdata 
+755b 20600000 rtn 
+
+timer_reinit:
+755c d8e00000 arg 0 ,queue 
+
+timer_check:
+755d 44e2c018 bpatch patch18_5 ,mem_patch18 
+755e 684a4096 fetcht 4 ,mem_last_clkn 
+755f 1c437e00 rshift clkn_bt ,pdata 
+7560 67e24096 store 4 ,mem_last_clkn 
+7561 98467c00 isub temp ,null 
+7562 24417558 ncall timer_check_timeout ,positive 
+7563 98461600 isub temp ,timeup 
+7564 19620400 copy timeup ,temp 
+7565 d8c040ed arg mem_timers ,contr 
+7566 18c20a00 copy contr ,contw 
+7567 df200010 arg 16 ,loopcnt 
+
+timer_loop:
+7568 efe10006 ifetch 2 ,contr 
+7569 98467e00 isub temp ,pdata 
+756a 2021756c branch timer_counting ,positive 
+756b 18007e00 force 0 ,pdata 
+
+timer_counting:
+756c e7e10005 istore 2 ,contw 
+756d c2007568 loop timer_loop 
+756e d8c040ed arg mem_timers ,contr 
+756f 18e3fe00 lshift queue ,pdata 
+7570 98c08c00 iadd contr ,contr 
+7571 efe10006 ifetch 2 ,contr 
+7572 20600000 rtn 
+
+clk_add:
+7573 98408400 iadd temp ,temp 
+7574 18427200 copy temp ,loopcnt 
+7575 6fe1003f fetch 2 ,mem_param_rt_rthalfslot 
+7576 9f267e00 isub loopcnt ,pdata 
+7577 20610000 rtn positive 
+7578 1fe67e00 sub pdata ,0 ,pdata 
+7579 18510400 rshift16 temp ,temp 
+757a 18408401 increase 1 ,temp 
+757b 18500400 lshift16 temp ,temp 
+757c 98418400 ior temp ,temp 
+757d 20600000 rtn 
+
+clk_diff_rt:
+757e 20407580 call clk_diff 
+757f 2020758d branch clk2rt 
+
+clk_diff:
+7580 78547c00 disable user 
+7581 98467e00 isub temp ,pdata 
+7582 20217585 branch clk_diff_pos ,positive 
+7583 78347c00 enable user 
+7584 1fe67e00 sub pdata ,0 ,pdata 
+
+clk_diff_pos:
+7585 c4078000 rtnbit0 15 
+7586 1fe22800 copy pdata ,regab 
+7587 d8410000 arg 0x10000 ,temp 
+7588 6fe1003f fetch 2 ,mem_param_rt_rthalfslot 
+7589 98467e00 isub temp ,pdata 
+758a 9a80fe00 iadd regab ,pdata 
+758b 793ffe40 set0 64 ,pdata 
+758c 20600000 rtn 
+
+clk2rt:
+758d 6849003f fetcht 2 ,mem_param_rt_rthalfslot 
+758e 98000c00 iforce contr 
+758f 1ff17e00 rshift16 pdata ,pdata 
+7590 984ffe00 imul32 temp ,pdata 
+7591 98c0fe00 iadd contr ,pdata 
+7592 20600000 rtn 
+
+clk2lpo:
+7593 1fed7e00 lshift8 pdata ,pdata 
+7594 1ff27e00 lshift4 pdata ,pdata 
+7595 6849c0be fetcht 3 ,mem_clks_per_lpo 
+7596 9846fc00 idiv temp 
+7597 204075d0 call wait_div_end 
+7598 18078400 quotient temp 
+7599 20600000 rtn 
+
+clk2bt:
+759a 6849003f fetcht 2 ,mem_param_rt_rthalfslot 
+759b 9846fc00 idiv temp 
+759c 204075cd call get_div_result 
+759d 1ff07e00 lshift16 pdata ,pdata 
+759e 18070400 remainder temp 
+759f 98418400 ior temp ,temp 
+75a0 20600000 rtn 
+
+string2dec_from_uart:
+75a1 d8400000 arg 0 ,temp 
+
+string2dec_from_uart_done:
+75a2 18422800 copy temp ,regab 
+75a3 efe08003 ifetch 1 ,contu 
+75a4 204075ad call uchar2dialog 
+75a5 1a820400 copy regab ,temp 
+75a6 204075df call swap 
+75a7 da40000a arg 10 ,regb 
+75a8 9a4ffe00 imul32 regb ,pdata 
+75a9 9840fe00 iadd temp ,pdata 
+75aa 1fe20400 copy pdata ,temp 
+75ab c20075a2 loop string2dec_from_uart_done 
+75ac 20600000 rtn 
+
+uchar2dialog:
+75ad d840003a arg 0x3a ,temp 
+75ae 98467c00 isub temp ,null 
+75af 242175b6 nbranch uchar2dialog_number ,positive 
+75b0 d8400061 arg 0x61 ,temp 
+75b1 98467c00 isub temp ,null 
+75b2 202175b9 branch uchar2dialog_a2f ,positive 
+75b3 d8400037 arg 0x37 ,temp 
+75b4 98467e00 isub temp ,pdata 
+75b5 20600000 rtn 
+
+uchar2dialog_number:
+75b6 d8400030 arg 0x30 ,temp 
+75b7 98467e00 isub temp ,pdata 
+75b8 20600000 rtn 
+
+uchar2dialog_a2f:
+75b9 d8400057 arg 0x57 ,temp 
+75ba 98467e00 isub temp ,pdata 
+75bb 20600000 rtn 
+
+right_shift_n:
+75bc 1f267c00 sub loopcnt ,0 ,null 
+75bd 20628000 rtn zero 
+
+right_shift_n_loop:
+75be 1fe37e00 rshift pdata ,pdata 
+75bf c20075be loop right_shift_n_loop 
+75c0 20600000 rtn 
+
+left_shift_n:
+75c1 18007e01 force 1 ,pdata 
+75c2 1f267c00 sub loopcnt ,0 ,null 
+75c3 20628000 rtn zero 
+
+left_shift_n_loop:
+75c4 1fe3fe00 lshift pdata ,pdata 
+75c5 c20075c4 loop left_shift_n_loop 
+75c6 20600000 rtn 
+
+calc_average:
+75c7 58000000 setarg 0 
+75c8 1f222200 copy loopcnt ,rega 
+
+calc_average_loop:
+75c9 e8410006 ifetcht 2 ,contr 
+75ca 9840fe00 iadd temp ,pdata 
+75cb c20075c9 loop calc_average_loop 
+75cc 9a26fc00 idiv rega 
+
+get_div_result:
+75cd 204075d0 call wait_div_end 
+75ce 1807fe00 quotient pdata 
+75cf 20600000 rtn 
+
+wait_div_end:
+75d0 207a8000 rtn modone 
+75d1 202075d0 branch wait_div_end 
+
+compare_loop:
+
+string_compare:
+75d2 efe08011 ifetch 1 ,rega 
+75d3 e8408012 ifetcht 1 ,regb 
+75d4 98467c00 isub temp ,null 
+75d5 24628000 nrtn zero 
+75d6 1a20a201 increase 1 ,rega 
+75d7 1a40a401 increase 1 ,regb 
+75d8 c20075d2 loop string_compare 
+75d9 18007c00 force 0 ,null 
+75da 20600000 rtn 
+
+ceiling:
+75db 98467c00 isub temp ,null 
+75dc 24610000 nrtn positive 
+75dd 18427e00 deposit temp 
+75de 20600000 rtn 
+
+swap:
+75df 9840fe00 iadd temp ,pdata 
+75e0 98460400 isub temp ,temp 
+75e1 98467e00 isub temp ,pdata 
+75e2 20600000 rtn 
+
+clean_mem:
+75e3 df200200 arg 0x200 ,loopcnt 
+75e4 d8a04000 arg 0x4000 ,contw 
+75e5 20207500 branch memset0 
+
+callback_func:
+75e6 207a0000 rtn blank 
+75e7 1fe27a00 copy pdata ,pc 
+
+wait_uarttx:
+75e8 6ff1010e fetch 2 ,core_uart_txitems 
+75e9 243a75e8 nbranch wait_uarttx ,blank 
+75ea 20600000 rtn 
+
+ice_break_disable_wdt:
+75eb 20406df0 call wdt_set_disable 
+
+ice_break:
+75ec 70820301 jam 0x1 ,core_ice_ctrl 
+75ed 20600000 rtn 
+
+ice_setbp:
+75ee 67f10205 store 2 ,core_ice_break0 
+75ef 6ff08203 fetch 1 ,core_ice_ctrl 
+75f0 79207e04 set1 4 ,pdata 
+75f1 67f08203 store 1 ,core_ice_ctrl 
+75f2 20600000 rtn 
+
+ice_setbp2:
+75f3 67f10207 store 2 ,core_ice_break1 
+75f4 6ff08203 fetch 1 ,core_ice_ctrl 
+75f5 79207e06 set1 6 ,pdata 
+75f6 67f08203 store 1 ,core_ice_ctrl 
+75f7 20600000 rtn 
+
+ice_set_write_bp:
+75f8 67f10205 store 2 ,core_ice_break0 
+75f9 70820330 jam 0x30 ,core_ice_ctrl 
+75fa 20600000 rtn 
+
+test_no_white:
+75fb 6ff08043 fetch 1 ,core_config 
+75fc 79207e04 set1 whiteoff_bit ,pdata 
+75fd 67f08043 store 1 ,core_config 
+75fe 20600000 rtn 
+
+test_enable_white:
+75ff 6ff08043 fetch 1 ,core_config 
+7600 793ffe04 set0 whiteoff_bit ,pdata 
+7601 67f08043 store 1 ,core_config 
+7602 20600000 rtn 
+
+check_uart_tx_buff:
+7603 6ff1010e fetch 2 ,core_uart_txitems 
+7604 d8400200 arg uart_air_control_threshold ,temp 
+
+pdata_sub_temp:
+7605 98467c00 isub temp ,null 
+7606 20600000 rtn 
+
+fifo_in:
+7607 44e34018 bpatch patch18_6 ,mem_patch18 
+7608 e8440011 ifetcht util_fifo_len ,rega 
+7609 18417eff and temp ,0xff ,pdata 
+760a 243a760d nbranch fifo_in_push ,blank 
+760b 184cfe00 rshift8 temp ,pdata 
+760c e7e40011 istore util_fifo_len ,rega 
+
+fifo_in_push:
+760d 1a20a207 increase util_fifo_len + util_fifo_offset ,rega 
+760e efe08011 ifetch 1 ,rega 
+760f 243a3aba nbranch assert ,blank 
+7610 6fe084c3 fetch 1 ,mem_fifo_temp 
+7611 e7e08011 istore 1 ,rega 
+7612 20600000 rtn 
+
+fifo_out:
+7613 44e3c018 bpatch patch18_7 ,mem_patch18 
+7614 df200008 arg util_fifo_len ,loopcnt 
+7615 efe40011 ifetch util_fifo_len ,rega 
+7616 207a0000 rtn blank 
+
+fifo_out_loop:
+7617 efe08011 ifetch 1 ,rega 
+7618 243a761c nbranch fifo_out_end ,blank 
+7619 1a20a201 increase 1 ,rega 
+761a c2007617 loop fifo_out_loop 
+761b 20203aba branch assert 
+
+fifo_out_end:
+761c d8400000 arg 0 ,temp 
+761d e0408011 istoret 1 ,rega 
+761e 20600000 rtn 
+
+fifo_is_empty:
+761f efe40011 ifetch util_fifo_len ,rega 
+7620 20600000 rtn 
+
+fifo_is_full:
+7621 efe08011 ifetch 1 ,rega 
+7622 20600000 rtn 
+
+fifo_is_near_full:
+7623 efe10011 ifetch 2 ,rega 
+7624 20600000 rtn 
+
+fifo_content_count:
+7625 d8400000 arg 0 ,temp 
+
+fifo_content_count_loop:
+7626 6fe08006 fetch 1 ,contr 
+7627 c2007626 loop fifo_content_count_loop ,blank 
+7628 18408401 increase 1 ,temp 
+7629 c2007626 loop fifo_content_count_loop 
+762a 18427e00 copy temp ,pdata 
+762b 20600000 rtn 
+
+not_greater_than:
+762c 98467c00 isub temp ,null 
+762d 24610000 nrtn positive 
+
+copy_temp2pdata:
+762e 18427e00 copy temp ,pdata 
+762f 20600000 rtn 
+
+disable_positive:
+7630 18007dff force -1 ,null 
+7631 20600000 rtn 
+
+enable_positive:
+
+disable_zero:
+7632 18007c01 force 1 ,null 
+7633 20600000 rtn 
+
+enable_zero:
+7634 18007c00 force 0 ,null 
+7635 20600000 rtn 
+
+enable_user:
+7636 78347c00 enable user 
+7637 20600000 rtn 
+
+disable_user:
+7638 78547c00 disable user 
+7639 20600000 rtn 
+
+enable_user2:
+763a 78367c00 enable user2 
+763b 20600000 rtn 
+
+disable_user2:
+763c 78567c00 disable user2 
+763d 20600000 rtn 
+
+enable_user7:
+763e 7838fc00 enable user7 
+763f 20600000 rtn 
+
+disable_true:
+7640 7840fc00 disable true 
+7641 20600000 rtn 
+
+enable_true:
+7642 7820fc00 enable true 
+7643 20600000 rtn 
+
+disable_blank:
+7644 58000001 setarg 1 
+7645 20600000 rtn 
+
+enable_blank:
+
+set_pdata_0:
+7646 58000000 setarg 0 
+7647 20600000 rtn 
+
+cal_sum:
+7648 1f267c00 sub loopcnt ,0 ,null 
+7649 20628000 rtn zero 
+
+cal_sum_loop:
+764a e8408006 ifetcht 1 ,contr 
+764b 9840fe00 iadd temp ,pdata 
+764c c200764a loop cal_sum_loop 
+764d 20600000 rtn 
+
+reverse_byte:
+764e 1f227e00 copy loopcnt ,pdata 
+764f 207a0000 rtn blank 
+7650 18c27e00 copy contr ,pdata 
+7651 9f20fe00 iadd loopcnt ,pdata 
+7652 1fe0ffff increase -1 ,pdata 
+7653 1fe20c00 copy pdata ,contr 
+
+reverse_loop:
+7654 efe08006 ifetch 1 ,contr 
+7655 18c08dfe increase -2 ,contr 
+7656 e7e08005 istore 1 ,contw 
+7657 c2007654 loop reverse_loop 
+7658 20600000 rtn 
+
+lshift14:
+7659 1ff07e00 lshift16 pdata ,pdata 
+
+rshift2:
+765a 1feb7e00 rshift2 pdata ,pdata 
+765b 20600000 rtn 
+
+lshift6:
+765c 1fed7e00 lshift8 pdata ,pdata 
+765d 2020765a branch rshift2 
+
+clear_wake:
+765e 58000000 setarg 0 
+765f 67e40016 store 8 ,mem_gpio_wakeup_low 
+7660 20600000 rtn 
+
+generate_random:
+7661 df200010 arg 16 ,loopcnt 
+
+generate_random_loop:
+7662 180a7e00 random pdata 
+7663 e7e08005 istore 1 ,contw 
+7664 c2007662 loop generate_random_loop 
+7665 20600000 rtn 
+
+frmt_gem_adv_pdu_common:
+7666 70459101 jam 1 ,mem_light_num_of_long_press 
+7667 20407904 call frmt_light_long_press_flag_reset 
+7668 7044c842 jam 66 ,mem_light_gm_tx_addr_type 
+7669 7044c915 jam 21 ,mem_light_gm_tx_len 
+766a 7044d855 jam 0x55 ,mem_light_gm_tx_remoter_id 
+766b 6fe0c4dd fetch 1 ,mem_light_gm_tx_count 
+766c 1fe0fe01 pincrease 1 
+766d 67e0c4dd store 1 ,mem_light_gm_tx_count 
+766e 20407674 call frmt_gem_pud_sum 
+766f 20407c45 call frmt_light_flag_set_short_press 
+7670 df200017 arg gem_pdu_len ,loopcnt 
+7671 d8c044c8 arg mem_light_gm_tx_addr_type ,contr 
+7672 d8a0464a arg mem_light_whitening_buffer ,contw 
+7673 2020753b branch memcpy_fast 
+
+frmt_gem_pud_sum:
+7674 d8400000 arg 0 ,temp 
+7675 d8c044d7 arg mem_light_gm_tx_press_time ,contr 
+7676 df200007 arg 7 ,loopcnt 
+
+frmt_gem_pud_sum_loop:
+7677 efe08006 ifetch 1 ,contr 
+7678 98408400 iadd temp ,temp 
+7679 c2007677 loop frmt_gem_pud_sum_loop 
+767a 6048c4de storet 1 ,mem_light_gm_tx_sum 
+767b 20600000 rtn 
+
+frmt_light_gem_long_press_cnt:
+767c 6fe0c4e3 fetch 1 ,mem_gem_long_cnt_enable 
+767d 207a0000 rtn blank 
+767e 7044e300 jam 0 ,mem_gem_long_cnt_enable 
+767f 6fe1458f fetch 2 ,mem_long_press_timeout 
+7680 207a0000 rtn blank 
+7681 6fe0c4d7 fetch 1 ,mem_light_gm_tx_press_time 
+7682 1fe0fe01 pincrease 1 
+7683 67e0c4d7 store 1 ,mem_light_gm_tx_press_time 
+7684 c000f68a beq 1 ,frmt_light_gem_long_press_code_increase 
+7685 c004f68a beq 9 ,frmt_light_gem_long_press_code_increase 
+7686 20407666 call frmt_gem_adv_pdu_common 
+7687 58000003 setarg gem_long_keypress 
+7688 67e144df store 2 ,mem_gem_cnt_inces_timeout 
+7689 20600000 rtn 
+
+frmt_light_gem_long_press_code_increase:
+768a 6fe0c4dc fetch 1 ,mem_light_gm_tx_code 
+768b 1fe0fe40 pincrease 0x40 
+768c 67e0c4dc store 1 ,mem_light_gm_tx_code 
+768d 20407666 call frmt_gem_adv_pdu_common 
+768e 2020768f branch gem_long_keypress_time 
+
+gem_long_keypress_time:
+768f 58000003 setarg gem_long_keypress 
+7690 67e144df store 2 ,mem_gem_cnt_inces_timeout 
+7691 20600000 rtn 
+
+gem_light_color_switch:
+7692 7044dc07 jam gem_light_color_switch_code ,mem_light_gm_tx_code 
+7693 7044d700 jam 0 ,mem_light_gm_tx_press_time 
+7694 20207666 branch frmt_gem_adv_pdu_common 
+
+gem_light_energy_saving_light:
+7695 6fe0c49e fetch 1 ,mem_ble_v2_customer_id 
+7696 245a7aeb ncall frmt_light_pcnt_50_percent_v2 ,blank 
+7697 7044dc11 jam gem_light_energy_save_light_code ,mem_light_gm_tx_code 
+7698 7044d700 jam 0 ,mem_light_gm_tx_press_time 
+7699 20207666 branch frmt_gem_adv_pdu_common 
+
+gem_light_timing_off:
+769a 7044dc12 jam gem_light_timing_off_code ,mem_light_gm_tx_code 
+769b 7044d700 jam 0 ,mem_light_gm_tx_press_time 
+769c 20207666 branch frmt_gem_adv_pdu_common 
+
+gem_light_aid_turn_onoff:
+769d 7044dc13 jam gem_light_aided_light_code ,mem_light_gm_tx_code 
+769e 7044d700 jam 0 ,mem_light_gm_tx_press_time 
+769f 20207666 branch frmt_gem_adv_pdu_common 
+
+gem_light_master_on:
+76a0 7044dc05 jam gem_light_on_code ,mem_light_gm_tx_code 
+76a1 7044db00 jam 0 ,mem_light_gm_tx_group_num 
+76a2 7044d700 jam 0 ,mem_light_gm_tx_press_time 
+76a3 20207666 branch frmt_gem_adv_pdu_common 
+
+gem_light_master_off:
+76a4 7044dc09 jam gem_light_off_code ,mem_light_gm_tx_code 
+76a5 7044d700 jam 0 ,mem_light_gm_tx_press_time 
+76a6 7044db00 jam 0 ,mem_light_gm_tx_group_num 
+76a7 20207666 branch frmt_gem_adv_pdu_common 
+
+gem_light_rgb_auto:
+76a8 7044dc14 jam gem_light_rgb_auto_code ,mem_light_gm_tx_code 
+76a9 7044d700 jam 0 ,mem_light_gm_tx_press_time 
+76aa 20207666 branch frmt_gem_adv_pdu_common 
+
+gem_light_rgb_step:
+76ab 7044dc15 jam gem_light_rgb_step_code ,mem_light_gm_tx_code 
+76ac 7044d700 jam 0 ,mem_light_gm_tx_press_time 
+76ad 20207666 branch frmt_gem_adv_pdu_common 
+
+gem_light_group1_on:
+76ae 6fe0c49e fetch 1 ,mem_ble_v2_customer_id 
+76af 245a7b21 ncall frmt_light_group1_on_v2 ,blank 
+76b0 7044dc0c jam gem_light_on_group1_code ,mem_light_gm_tx_code 
+76b1 7044db01 jam 1 ,mem_light_gm_tx_group_num 
+76b2 7044d700 jam 0 ,mem_light_gm_tx_press_time 
+76b3 20207666 branch frmt_gem_adv_pdu_common 
+
+gem_light_group1_off:
+76b4 6fe0c49e fetch 1 ,mem_ble_v2_customer_id 
+76b5 245a7b29 ncall frmt_light_group1_off_v2 ,blank 
+76b6 7044dc0e jam gem_light_off_group1_code ,mem_light_gm_tx_code 
+76b7 7044db01 jam 1 ,mem_light_gm_tx_group_num 
+76b8 7044d700 jam 0 ,mem_light_gm_tx_press_time 
+76b9 20207666 branch frmt_gem_adv_pdu_common 
+
+gem_light_group2_on:
+76ba 6fe0c49e fetch 1 ,mem_ble_v2_customer_id 
+76bb 245a7b23 ncall frmt_light_group2_on_v2 ,blank 
+76bc 7044dc01 jam gem_light_on_group2_code ,mem_light_gm_tx_code 
+76bd 7044db02 jam 2 ,mem_light_gm_tx_group_num 
+76be 7044d700 jam 0 ,mem_light_gm_tx_press_time 
+76bf 20207666 branch frmt_gem_adv_pdu_common 
+
+gem_light_group2_off:
+76c0 6fe0c49e fetch 1 ,mem_ble_v2_customer_id 
+76c1 245a7b2b ncall frmt_light_group2_off_v2 ,blank 
+76c2 7044dc04 jam gem_light_off_group2_code ,mem_light_gm_tx_code 
+76c3 7044db02 jam 2 ,mem_light_gm_tx_group_num 
+76c4 7044d700 jam 0 ,mem_light_gm_tx_press_time 
+76c5 20207666 branch frmt_gem_adv_pdu_common 
+
+gem_light_group3_on:
+76c6 6fe0c49e fetch 1 ,mem_ble_v2_customer_id 
+76c7 245a7b25 ncall frmt_light_group3_on_v2 ,blank 
+76c8 7044dc0d jam gem_light_on_group3_code ,mem_light_gm_tx_code 
+76c9 7044db03 jam 3 ,mem_light_gm_tx_group_num 
+76ca 7044d700 jam 0 ,mem_light_gm_tx_press_time 
+76cb 20207666 branch frmt_gem_adv_pdu_common 
+
+gem_light_group3_off:
+76cc 6fe0c49e fetch 1 ,mem_ble_v2_customer_id 
+76cd 245a7b2d ncall frmt_light_group3_off_v2 ,blank 
+76ce 7044dc0f jam gem_light_off_group3_code ,mem_light_gm_tx_code 
+76cf 7044db03 jam 3 ,mem_light_gm_tx_group_num 
+76d0 7044d700 jam 0 ,mem_light_gm_tx_press_time 
+76d1 20207666 branch frmt_gem_adv_pdu_common 
+
+gem_light_group4_on:
+76d2 6fe0c49e fetch 1 ,mem_ble_v2_customer_id 
+76d3 245a7b27 ncall frmt_light_group4_on_v2 ,blank 
+76d4 7044dc08 jam gem_light_on_group4_code ,mem_light_gm_tx_code 
+76d5 7044db04 jam 4 ,mem_light_gm_tx_group_num 
+76d6 7044d700 jam 0 ,mem_light_gm_tx_press_time 
+76d7 20207666 branch frmt_gem_adv_pdu_common 
+
+gem_light_group4_off:
+76d8 6fe0c49e fetch 1 ,mem_ble_v2_customer_id 
+76d9 245a7b2f ncall frmt_light_group4_off_v2 ,blank 
+76da 7044dc06 jam gem_light_off_group4_code ,mem_light_gm_tx_code 
+76db 7044db04 jam 4 ,mem_light_gm_tx_group_num 
+76dc 7044d700 jam 0 ,mem_light_gm_tx_press_time 
+76dd 20207666 branch frmt_gem_adv_pdu_common 
+
+gem_light_color_switch_short_press:
+76de 6fe0c71f fetch 1 ,mem_light_color_and_lgtness_long_press_adv_enable 
+76df c000f692 beq 1 ,gem_light_color_switch 
+76e0 704701b1 jam light_color_switch_release_adv_flag ,mem_light_release_adv_flag 
+76e1 202078c8 branch frmt_light_light_color_and_lightness_change_common 
+
+gem_light_color_switch_w:
+76e2 6fe0c49e fetch 1 ,mem_ble_v2_customer_id 
+76e3 245a7ad4 ncall frmt_light_color_switch_w_v2 ,blank 
+76e4 7044dc16 jam gem_color_switch_w ,mem_light_gm_tx_code 
+76e5 7044d700 jam 0 ,mem_light_gm_tx_press_time 
+76e6 7044db00 jam 0 ,mem_light_gm_tx_group_num 
+76e7 20207666 branch frmt_gem_adv_pdu_common 
+
+gem_light_color_switch_y:
+76e8 6fe0c49e fetch 1 ,mem_ble_v2_customer_id 
+76e9 245a7ada ncall frmt_light_color_switch_y_v2 ,blank 
+76ea 7044dc17 jam gem_color_switch_y ,mem_light_gm_tx_code 
+76eb 7044d700 jam 0 ,mem_light_gm_tx_press_time 
+76ec 7044db00 jam 0 ,mem_light_gm_tx_group_num 
+76ed 20207666 branch frmt_gem_adv_pdu_common 
+
+gem_light_to_y:
+76ee 70470100 jam 0 ,mem_light_release_adv_flag 
+76ef 6fe0c49e fetch 1 ,mem_ble_v2_customer_id 
+76f0 245a7aa0 ncall frmt_light_to_y_v2 ,blank 
+76f1 7044dc0a jam gem_light_to_y_code ,mem_light_gm_tx_code 
+76f2 20207666 branch frmt_gem_adv_pdu_common 
+
+gem_light_to_w:
+76f3 70470100 jam 0 ,mem_light_release_adv_flag 
+76f4 6fe0c49e fetch 1 ,mem_ble_v2_customer_id 
+76f5 245a7aa2 ncall frmt_light_to_w_v2 ,blank 
+76f6 7044dc0b jam gem_light_to_w_code ,mem_light_gm_tx_code 
+76f7 20207666 branch frmt_gem_adv_pdu_common 
+
+gem_light_darken:
+76f8 70470100 jam 0 ,mem_light_release_adv_flag 
+76f9 6fe0c49e fetch 1 ,mem_ble_v2_customer_id 
+76fa 245a7aa4 ncall frmt_light_darken_v2 ,blank 
+76fb 7044dc03 jam gem_light_darken_code ,mem_light_gm_tx_code 
+76fc 20207666 branch frmt_gem_adv_pdu_common 
+
+gem_light_lighten:
+76fd 70470100 jam 0 ,mem_light_release_adv_flag 
+76fe 6fe0c49e fetch 1 ,mem_ble_v2_customer_id 
+76ff 245a7aa6 ncall frmt_light_lighten_v2 ,blank 
+7700 7044dc02 jam gem_light_lighten_code ,mem_light_gm_tx_code 
+7701 20207666 branch frmt_gem_adv_pdu_common 
+
+gem_light_night_light:
+7702 6fe0c49e fetch 1 ,mem_ble_v2_customer_id 
+7703 245a7abc ncall frmt_light_night_light_v2 ,blank 
+7704 7044dc10 jam gem_light_night_light_code ,mem_light_gm_tx_code 
+7705 7044d700 jam 0 ,mem_light_gm_tx_press_time 
+7706 20207666 branch frmt_gem_adv_pdu_common 
+
+remoter_init:
+7707 20407f43 call frmt_ble_para_init 
+7708 2040772b call frmt_enter_lpm_gpio_config_flag_init_row 
+7709 20407735 call frmt_enter_lpm_gpio_config_flag_init_col 
+770a 4730c02c bpatchx patch2c_1 ,mem_patch2c 
+770b 70457801 jam 1 ,mem_set_clear_code_timeout_enable 
+770c 70457901 jam 1 ,mem_light_lpm_enable 
+
+frmt_apl_ble_scene_rewrite_lap:
+770d 6fe142ae fetch 2 ,mem_le_lap 
+770e 1ff27e00 lshift4 pdata ,pdata 
+770f d840ffff arg 0xffff ,temp 
+7710 98417e00 iand temp ,pdata 
+7711 203a773c branch frmt_light_set_addr_to_0010 ,blank 
+7712 d840fff0 arg 0xfff0 ,temp 
+7713 98467c00 isub temp ,null 
+7714 2022f73e branch frmt_light_set_addr_to_ffe0 ,zero 
+
+frmt_lightc_init_continue:
+7715 1ff0fe00 byteswap pdata ,pdata 
+7716 67e14576 store 2 ,mem_ftd_adv_raw_device_add_temp 
+7717 67e144d9 store 2 ,mem_light_gm_tx_remoter_addr 
+7718 da20ffff arg 0xffff ,rega 
+7719 1a300400 lshift16 rega ,temp 
+771a 5800ffff setarg 0xffff 
+771b 98418400 ior temp ,temp 
+771c 6fe242ae fetch 4 ,mem_le_lap 
+771d 205a773a call frmt_light_addr_default_v2 ,blank 
+771e 98467c00 isub temp ,null 
+771f 2042f73a call frmt_light_addr_default_v2 ,zero 
+7720 67e244a2 store 4 ,mem_ble_v2_addr 
+7721 58007cfe setarg frmt_apl_cb_event_timer 
+7722 67e14398 store 2 ,mem_cb_event_timer 
+7723 58007b32 setarg frmt_main 
+7724 67e14390 store 2 ,mem_cb_idle_process 
+7725 2020784c branch frmt_kscan_init 
+
+frmt_apl_iic_init:
+7726 58000102 setarg 0x000102 
+7727 67e1c3d5 store 3 ,mem_eeprom_wp_gpio 
+7728 7080706d jam 0x6d ,0x8070 
+7729 7080716c jam 0x6c ,0x8071 
+772a 20600000 rtn 
+
+frmt_enter_lpm_gpio_config_flag_init_row:
+772b 6fe0c559 fetch 1 ,mem_kscan_row_nums 
+772c 98007200 iforce loopcnt 
+772d 684a4733 fetcht 4 ,mem_light_lpm_gpio_config_flag 
+772e d8c0455b arg mem_kscan_row_gpio_pin ,contr 
+
+frmt_enter_lpm_gpio_config_flag_init_loop:
+772f efe08006 ifetch 1 ,contr 
+7730 98000e00 iforce queue 
+7731 f9200400 qset1 temp 
+7732 c200772f loop frmt_enter_lpm_gpio_config_flag_init_loop 
+7733 604a4733 storet 4 ,mem_light_lpm_gpio_config_flag 
+7734 20600000 rtn 
+
+frmt_enter_lpm_gpio_config_flag_init_col:
+7735 6fe0c55a fetch 1 ,mem_kscan_col_nums 
+7736 98007200 iforce loopcnt 
+7737 684a4733 fetcht 4 ,mem_light_lpm_gpio_config_flag 
+7738 d8c04563 arg mem_kscan_col_gpio_pin ,contr 
+7739 2020772f branch frmt_enter_lpm_gpio_config_flag_init_loop 
+
+frmt_light_addr_default_v2:
+773a 58111213 setarg 0x111213 
+773b 20600000 rtn 
+
+frmt_light_set_addr_to_0010:
+773c dfe00010 arg 0x0010 ,pdata 
+773d 20207715 branch frmt_lightc_init_continue 
+
+frmt_light_set_addr_to_ffe0:
+773e dfe0ffe0 arg 0xffe0 ,pdata 
+773f 20207715 branch frmt_lightc_init_continue 
+
+key_light_set_addr_to_7878:
+7740 d8407878 arg 0x7878 ,temp 
+7741 20600000 rtn 
+
+frmt_jym_pdu_common:
+7742 6fe242ae fetch 4 ,mem_le_lap 
+7743 67e24520 store 4 ,mem_light_jym_tx_id 
+7744 704524d1 jam 0xd1 ,mem_light_jym_tx_group 
+7745 6fe0c526 fetch 1 ,mem_light_jym_tx_count 
+7746 1fe0fe01 pincrease 1 
+7747 67e0c526 store 1 ,mem_light_jym_tx_count 
+7748 d8400000 arg 0 ,temp 
+7749 d8c0451f arg mem_light_jym_tx_cmd ,contr 
+774a df200008 arg 8 ,loopcnt 
+774b 20407783 call frmt_light_sum_cal_loop 
+774c 18508400 byteswap temp ,temp 
+774d 60494527 storet 2 ,mem_light_jym_tx_sum 
+774e da60451e arg mem_light_jym_tx_len ,regc 
+774f df20000b arg 11 ,loopcnt 
+7750 58000000 setarg 0 
+7751 67e144c1 store 2 ,mem_adv_crc_false_initvalue 
+7752 20407cc1 call key_crc16_ccitt_false1 
+7753 6fe144c1 fetch 2 ,mem_adv_crc_false_initvalue 
+7754 67e14529 store 2 ,mem_light_jym_tx_crc 
+7755 df200017 arg 23 ,loopcnt 
+7756 d8c044e4 arg mem_light_ky_tx ,contr 
+7757 d8a0464a arg mem_light_whitening_buffer ,contw 
+7758 2040753b call memcpy_fast 
+7759 df20000d arg 13 ,loopcnt 
+775a d8c0451e arg mem_light_jym_tx_len ,contr 
+775b d8a04661 arg mem_light_whitening_buffer + 23 ,contw 
+775c 2040753b call memcpy_fast 
+775d 70467525 jam 37 ,mem_light_recvd_len 
+775e 70467633 jam 51 ,mem_light_whitening_i 
+775f 20407ce1 call frmt_light_ble_whitening 
+7760 df200025 arg 37 ,loopcnt 
+7761 d8c0464a arg mem_light_whitening_buffer ,contr 
+7762 d8a0452b arg mem_light_jym_tx_temp ,contw 
+7763 2020753b branch memcpy_fast 
+
+frmt_reverse:
+7764 efe08006 ifetch 1 ,contr 
+7765 1fedfe00 reverse pdata ,pdata 
+7766 e7e08005 istore 1 ,contw 
+7767 c2007764 loop frmt_reverse 
+7768 20600000 rtn 
+
+key_pdu_common:
+7769 20407c45 call frmt_light_flag_set_short_press 
+776a 20407780 call frmt_light_sum_cal 
+776b 18508400 byteswap temp ,temp 
+776c 60494503 storet 2 ,mem_light_ky_tx_sum 
+776d da6044fb arg mem_light_ky_tx_len ,regc 
+776e df20000a arg 10 ,loopcnt 
+776f 58000000 setarg 0 
+7770 67e144c1 store 2 ,mem_adv_crc_false_initvalue 
+7771 20407cc1 call key_crc16_ccitt_false1 
+7772 6fe144c1 fetch 2 ,mem_adv_crc_false_initvalue 
+7773 67e14505 store 2 ,mem_light_ky_tx_crc 
+7774 6fe14507 fetch 2 ,mem_light_ky_tx_count 
+7775 1ff0fe00 byteswap pdata ,pdata 
+7776 1fe0fe01 pincrease 1 
+7777 1ff0fe00 byteswap pdata ,pdata 
+7778 67e14507 store 2 ,mem_light_ky_tx_count 
+7779 df200025 arg 37 ,loopcnt 
+777a d8c044e4 arg mem_light_ky_tx ,contr 
+777b d8a0464a arg mem_light_whitening_buffer ,contw 
+777c 2040753b call memcpy_fast 
+777d 70467525 jam 37 ,mem_light_recvd_len 
+777e 70467633 jam 51 ,mem_light_whitening_i 
+777f 20207ce1 branch frmt_light_ble_whitening 
+
+frmt_light_sum_cal:
+7780 d8400000 arg 0 ,temp 
+7781 d8c044fc arg mem_light_ky_tx_code1 ,contr 
+7782 df200007 arg 7 ,loopcnt 
+
+frmt_light_sum_cal_loop:
+7783 efe08006 ifetch 1 ,contr 
+7784 98408400 iadd temp ,temp 
+7785 c2007783 loop frmt_light_sum_cal_loop 
+7786 20600000 rtn 
+
+key_whitening_i_get:
+7787 da400033 arg 51 ,regb 
+7788 20600000 rtn 
+
+frmt_light_group_num_set:
+7789 6fe0c509 fetch 1 ,mem_light_group_num 
+778a 67e0c500 store 1 ,mem_light_ky_tx_remoter_id + 3 
+778b 20600000 rtn 
+
+frmt_light_timing_off_ky:
+778c 20407b1f call frmt_light_timing_30s_v2 
+778d 70451f68 jam light_jym_cmd_timing_off ,mem_light_jym_tx_cmd 
+778e 70452546 jam light_jym_data_timing_off ,mem_light_jym_tx_data 
+778f 20407742 call frmt_jym_pdu_common 
+7790 7044fc68 jam light_timing_code1 ,mem_light_ky_tx_code1 
+7791 70450246 jam 0x46 ,mem_light_ky_tx_code2 
+7792 20207769 branch key_pdu_common 
+
+key_light_aux_lamp_on_and_off_ky:
+7793 70451f6e jam light_jym_cmd_aux_lamp ,mem_light_jym_tx_cmd 
+7794 704525f0 jam light_jym_data_aux_lamp ,mem_light_jym_tx_data 
+7795 20407742 call frmt_jym_pdu_common 
+7796 7044fc6e jam light_aux_lamp_on_and_off_code1 ,mem_light_ky_tx_code1 
+7797 704502f0 jam 0xf0 ,mem_light_ky_tx_code2 
+7798 20207769 branch key_pdu_common 
+
+key_light_to_y:
+7799 20407aa0 call frmt_light_to_y_v2 
+779a 70451f69 jam light_jym_cmd_to_y ,mem_light_jym_tx_cmd 
+779b 70452500 jam light_jym_data_to_y ,mem_light_jym_tx_data 
+779c 20407742 call frmt_jym_pdu_common 
+779d 7044fc69 jam light_to_y_code1 ,mem_light_ky_tx_code1 
+779e 70450200 jam 0 ,mem_light_ky_tx_code2 
+779f 20207769 branch key_pdu_common 
+
+key_light_to_w:
+77a0 20407aa2 call frmt_light_to_w_v2 
+77a1 70451f6a jam light_jym_cmd_to_w ,mem_light_jym_tx_cmd 
+77a2 70452500 jam light_jym_data_to_w ,mem_light_jym_tx_data 
+77a3 20407742 call frmt_jym_pdu_common 
+77a4 7044fc6a jam light_to_w_code1 ,mem_light_ky_tx_code1 
+77a5 70450200 jam 0 ,mem_light_ky_tx_code2 
+77a6 20207769 branch key_pdu_common 
+
+key_light_darken:
+77a7 20407aa4 call frmt_light_darken_v2 
+77a8 70451f65 jam light_jym_cmd_darken ,mem_light_jym_tx_cmd 
+77a9 70452500 jam light_jym_data_darken ,mem_light_jym_tx_data 
+77aa 20407742 call frmt_jym_pdu_common 
+77ab 7044fc65 jam light_darken_code1 ,mem_light_ky_tx_code1 
+77ac 70450200 jam 0 ,mem_light_ky_tx_code2 
+77ad 20207769 branch key_pdu_common 
+
+key_light_lighten:
+77ae 20407aa6 call frmt_light_lighten_v2 
+77af 70451f66 jam light_jym_cmd_lighten ,mem_light_jym_tx_cmd 
+77b0 70452500 jam light_jym_data_lighten ,mem_light_jym_tx_data 
+77b1 20407742 call frmt_jym_pdu_common 
+77b2 7044fc66 jam light_lighten_code1 ,mem_light_ky_tx_code1 
+77b3 70450200 jam 0 ,mem_light_ky_tx_code2 
+77b4 20207769 branch key_pdu_common 
+
+key_light_group1_off:
+77b5 70451f60 jam light_jym_cmd_off ,mem_light_jym_tx_cmd 
+77b6 70452500 jam light_jym_data_off ,mem_light_jym_tx_data 
+77b7 704524d2 jam 0xd2 ,mem_light_jym_tx_group 
+77b8 20407742 call frmt_jym_pdu_common 
+77b9 7044fc60 jam light_off_code1 ,mem_light_ky_tx_code1 
+77ba 704502d1 jam light_off_code2 ,mem_light_ky_tx_code2 
+77bb 704501d2 jam 0xd2 ,mem_light_ky_tx_group_num 
+77bc 20207769 branch key_pdu_common 
+
+key_light_group2_off:
+77bd 70451f60 jam light_jym_cmd_off ,mem_light_jym_tx_cmd 
+77be 70452500 jam light_jym_data_off ,mem_light_jym_tx_data 
+77bf 704524d4 jam 0xd4 ,mem_light_jym_tx_group 
+77c0 20407742 call frmt_jym_pdu_common 
+77c1 7044fc60 jam light_off_code1 ,mem_light_ky_tx_code1 
+77c2 704502d1 jam light_off_code2 ,mem_light_ky_tx_code2 
+77c3 704501d4 jam 0xd4 ,mem_light_ky_tx_group_num 
+77c4 20207769 branch key_pdu_common 
+
+key_light_group3_off:
+77c5 70451f60 jam light_jym_cmd_off ,mem_light_jym_tx_cmd 
+77c6 70452500 jam light_jym_data_off ,mem_light_jym_tx_data 
+77c7 70452403 jam 3 ,mem_light_jym_tx_group 
+77c8 20407742 call frmt_jym_pdu_common 
+77c9 7044fc60 jam light_off_code1 ,mem_light_ky_tx_code1 
+77ca 580000d1 setarg light_off_code2 
+77cb 67e14502 store 2 ,mem_light_ky_tx_code2 
+77cc 70450903 jam 3 ,mem_light_group_num 
+77cd 20207769 branch key_pdu_common 
+
+key_light_group4_off:
+77ce 70451f60 jam light_jym_cmd_off ,mem_light_jym_tx_cmd 
+77cf 70452500 jam light_jym_data_off ,mem_light_jym_tx_data 
+77d0 70452404 jam 4 ,mem_light_jym_tx_group 
+77d1 20407742 call frmt_jym_pdu_common 
+77d2 7044fc60 jam light_off_code1 ,mem_light_ky_tx_code1 
+77d3 580000d1 setarg light_off_code2 
+77d4 67e14502 store 2 ,mem_light_ky_tx_code2 
+77d5 70450904 jam 4 ,mem_light_group_num 
+77d6 20207769 branch key_pdu_common 
+
+key_light_group1_on:
+77d7 70451f6f jam light_jym_cmd_on ,mem_light_jym_tx_cmd 
+77d8 70452500 jam light_jym_data_on ,mem_light_jym_tx_data 
+77d9 704524d2 jam 0xd2 ,mem_light_jym_tx_group 
+77da 20407742 call frmt_jym_pdu_common 
+77db 7044fc6f jam light_on_code1 ,mem_light_ky_tx_code1 
+77dc 704502d1 jam light_on_code2 ,mem_light_ky_tx_code2 
+77dd 704501d2 jam 0xd2 ,mem_light_ky_tx_group_num 
+77de 20207769 branch key_pdu_common 
+
+key_light_group2_on:
+77df 70451f6f jam light_jym_cmd_on ,mem_light_jym_tx_cmd 
+77e0 70452500 jam light_jym_data_on ,mem_light_jym_tx_data 
+77e1 704524d4 jam 0xd4 ,mem_light_jym_tx_group 
+77e2 20407742 call frmt_jym_pdu_common 
+77e3 7044fc6f jam light_on_code1 ,mem_light_ky_tx_code1 
+77e4 704502d1 jam light_on_code2 ,mem_light_ky_tx_code2 
+77e5 704501d4 jam 0xd4 ,mem_light_ky_tx_group_num 
+77e6 20207769 branch key_pdu_common 
+
+key_light_group3_on:
+77e7 70451f6f jam light_jym_cmd_on ,mem_light_jym_tx_cmd 
+77e8 70452500 jam light_jym_data_on ,mem_light_jym_tx_data 
+77e9 70452403 jam 3 ,mem_light_jym_tx_group 
+77ea 20407742 call frmt_jym_pdu_common 
+77eb 7044fc6f jam light_on_code1 ,mem_light_ky_tx_code1 
+77ec 580000d1 setarg light_on_code2 
+77ed 67e14502 store 2 ,mem_light_ky_tx_code2 
+77ee 70450903 jam 3 ,mem_light_group_num 
+77ef 20207769 branch key_pdu_common 
+
+key_light_group4_on:
+77f0 70451f6f jam light_jym_cmd_on ,mem_light_jym_tx_cmd 
+77f1 70452500 jam light_jym_data_on ,mem_light_jym_tx_data 
+77f2 70452404 jam 4 ,mem_light_jym_tx_group 
+77f3 20407742 call frmt_jym_pdu_common 
+77f4 7044fc6f jam light_on_code1 ,mem_light_ky_tx_code1 
+77f5 580000d1 setarg light_on_code2 
+77f6 67e14502 store 2 ,mem_light_ky_tx_code2 
+77f7 70450904 jam 4 ,mem_light_group_num 
+77f8 20207769 branch key_pdu_common 
+
+key_light_pairing_group1:
+77f9 704524d2 jam 0xd2 ,mem_light_jym_tx_group 
+77fa 704501d2 jam 0xd2 ,mem_light_ky_tx_group_num 
+77fb 2020780f branch key_light_master_pairing_process 
+
+key_light_pairing_group2:
+77fc 704524d4 jam 0xd4 ,mem_light_jym_tx_group 
+77fd 704501d4 jam 0xd4 ,mem_light_ky_tx_group_num 
+77fe 2020780f branch key_light_master_pairing_process 
+
+key_light_pairing_group3:
+77ff 70452403 jam 3 ,mem_light_jym_tx_group 
+7800 70450103 jam 3 ,mem_light_ky_tx_group_num 
+7801 2020780f branch key_light_master_pairing_process 
+
+key_light_pairing_group4:
+7802 70452404 jam 4 ,mem_light_jym_tx_group 
+7803 70450104 jam 4 ,mem_light_ky_tx_group_num 
+7804 2020780f branch key_light_master_pairing_process 
+
+key_light_clear_code:
+7805 20407ac3 call frmt_light_clear_code_v2 
+7806 70451f6f jam light_jym_cmd_clear ,mem_light_jym_tx_cmd 
+7807 704525aa jam light_jym_data_clear ,mem_light_jym_tx_data 
+7808 20407742 call frmt_jym_pdu_common 
+7809 7044fc6f jam light_clear_code_code1 ,mem_light_ky_tx_code1 
+780a 580000aa setarg light_clear_code_code2 
+780b 67e14502 store 2 ,mem_light_ky_tx_code2 
+780c 20207769 branch key_pdu_common 
+
+key_light_master_pairing:
+780d 704501d1 jam 0xd1 ,mem_light_ky_tx_group_num 
+780e 704524d1 jam 0xd1 ,mem_light_jym_tx_group 
+
+key_light_master_pairing_process:
+780f 20407abe call frmt_light_master_pairing_v2 
+7810 70451f6f jam light_jym_cmd_pairing ,mem_light_jym_tx_cmd 
+7811 70452555 jam light_jym_data_pairing ,mem_light_jym_tx_data 
+7812 20407742 call frmt_jym_pdu_common 
+7813 7044fc6f jam light_pairing_code1 ,mem_light_ky_tx_code1 
+7814 70450255 jam light_pairing_code2 ,mem_light_ky_tx_code2 
+7815 70450900 jam 0 ,mem_light_group_num 
+7816 20407789 call frmt_light_group_num_set 
+7817 20207769 branch key_pdu_common 
+
+key_light_night_light:
+7818 20407abc call frmt_light_night_light_v2 
+7819 70451f6e jam light_jym_cmd_night_light ,mem_light_jym_tx_cmd 
+781a 70452500 jam light_jym_data_night_light ,mem_light_jym_tx_data 
+781b 20407742 call frmt_jym_pdu_common 
+781c 7044fca1 jam light_night_light_code1 ,mem_light_ky_tx_code1 
+781d 70450200 jam 0 ,mem_light_ky_tx_code2 
+781e 20207769 branch key_pdu_common 
+
+key_light_color_switch:
+781f 6fe0c592 fetch 1 ,mem_light_color_switch_cnt 
+7820 c0007824 beq 0 ,key_light_color_switch_wy 
+7821 c000f82c beq 1 ,key_light_color_switch_w 
+7822 c0017834 beq 2 ,key_light_color_switch_y 
+7823 20600000 rtn 
+
+key_light_color_switch_wy:
+7824 20407acd call frmt_light_color_switch_wy_v2 
+7825 70459201 jam 1 ,mem_light_color_switch_cnt 
+7826 70451f6d jam light_jym_cmd_wy_lamp ,mem_light_jym_tx_cmd 
+7827 70452501 jam light_jym_data_wy_lamp ,mem_light_jym_tx_data 
+7828 20407742 call frmt_jym_pdu_common 
+7829 7044fc6d jam light_color_switch_code1 ,mem_light_ky_tx_code1 
+782a 70450201 jam light_color_switch_wy_code2 ,mem_light_ky_tx_code2 
+782b 20207769 branch key_pdu_common 
+
+key_light_color_switch_w:
+782c 20407ad4 call frmt_light_color_switch_w_v2 
+782d 70459202 jam 2 ,mem_light_color_switch_cnt 
+782e 70451f6d jam light_jym_cmd_white_lamp ,mem_light_jym_tx_cmd 
+782f 70452502 jam light_jym_data_white_lamp ,mem_light_jym_tx_data 
+7830 20407742 call frmt_jym_pdu_common 
+7831 7044fc6d jam light_color_switch_code1 ,mem_light_ky_tx_code1 
+7832 70450202 jam light_color_switch_w_code2 ,mem_light_ky_tx_code2 
+7833 20207769 branch key_pdu_common 
+
+key_light_color_switch_y:
+7834 20407ada call frmt_light_color_switch_y_v2 
+7835 70459200 jam 0 ,mem_light_color_switch_cnt 
+7836 70451f6d jam light_jym_cmd_yellow_lamp ,mem_light_jym_tx_cmd 
+7837 70452503 jam light_jym_data_yellow_lamp ,mem_light_jym_tx_data 
+7838 20407742 call frmt_jym_pdu_common 
+7839 7044fc6d jam light_color_switch_code1 ,mem_light_ky_tx_code1 
+783a 70450203 jam light_color_switch_y_code2 ,mem_light_ky_tx_code2 
+783b 20207769 branch key_pdu_common 
+
+key_light_master_off:
+783c 70451f60 jam light_jym_cmd_off ,mem_light_jym_tx_cmd 
+783d 70452500 jam light_jym_data_off ,mem_light_jym_tx_data 
+783e 704524d1 jam 0xd1 ,mem_light_jym_tx_group 
+783f 20407742 call frmt_jym_pdu_common 
+7840 7044fc60 jam light_off_code1 ,mem_light_ky_tx_code1 
+7841 70450200 jam 0 ,mem_light_ky_tx_code2 
+7842 704501d1 jam 0xd1 ,mem_light_ky_tx_group_num 
+7843 20207769 branch key_pdu_common 
+
+key_light_master_on:
+7844 70451f6f jam light_jym_cmd_on ,mem_light_jym_tx_cmd 
+7845 70452500 jam light_jym_data_on ,mem_light_jym_tx_data 
+7846 704524d1 jam 0xd1 ,mem_light_jym_tx_group 
+7847 20407742 call frmt_jym_pdu_common 
+7848 7044fc6f jam light_on_code1 ,mem_light_ky_tx_code1 
+7849 70450200 jam 0 ,mem_light_ky_tx_code2 
+784a 704501d1 jam 0xd1 ,mem_light_ky_tx_group_num 
+784b 20207769 branch key_pdu_common 
+
+frmt_kscan_init:
+784c 6fe14574 fetch 2 ,mem_kscan_analysis_interval_timeout 
+784d 247a0000 nrtn blank 
+784e 20407858 call frmt_kscan_col_state_init 
+
+frmt_kscan_row_state_init:
+784f da20455b arg mem_kscan_row_gpio_pin ,rega 
+7850 6fe0c559 fetch 1 ,mem_kscan_row_nums 
+7851 98007200 iforce loopcnt 
+
+frmt_kscan_input_pull_up_loop:
+7852 e8408011 ifetcht 1 ,rega 
+7853 20406c29 call gpio_config_input 
+7854 1a20a201 increase 1 ,rega 
+7855 c2007852 loop frmt_kscan_input_pull_up_loop 
+7856 20002ee0 nop 12000 
+7857 20600000 rtn 
+
+frmt_kscan_recover_col_output_low:
+
+frmt_kscan_col_state_init:
+7858 da204563 arg mem_kscan_col_gpio_pin ,rega 
+7859 6fe0c55a fetch 1 ,mem_kscan_col_nums 
+785a 98007200 iforce loopcnt 
+
+frmt_kscan_output_low_loop:
+785b e8408011 ifetcht 1 ,rega 
+785c 18418480 or temp ,0x80 ,temp 
+785d 204078b7 call gpio_config_output_patch 
+785e 1a20a201 increase 1 ,rega 
+785f c200785b loop frmt_kscan_output_low_loop 
+7860 20002ee0 nop 12000 
+7861 20600000 rtn 
+
+frmt_kscan:
+7862 6fe14574 fetch 2 ,mem_kscan_analysis_interval_timeout 
+7863 247a0000 nrtn blank 
+7864 70456d00 jam 0 ,mem_keypress_analysis_flag 
+7865 58000000 setarg 0 
+7866 67e44551 store 8 ,mem_kscan_record_keypress 
+
+frmt_kscan_get_row_state:
+7867 70456b00 jam 0 ,mem_kscan_row_scanned 
+7868 da60455b arg mem_kscan_row_gpio_pin ,regc 
+
+frmt_kscan_get_row_state_loop:
+7869 e8408013 ifetcht 1 ,regc 
+786a 20406c32 call gpio_get_bit 
+786b 2040f883 call frmt_kscan_avoid_shake_and_record_key ,true 
+786c e8408013 ifetcht 1 ,regc 
+786d 20406c29 call gpio_config_input 
+786e 20407858 call frmt_kscan_recover_col_output_low 
+786f 1a60a601 increase 1 ,regc 
+7870 6fe0c56b fetch 1 ,mem_kscan_row_scanned 
+7871 1fe0fe01 pincrease 1 
+7872 67e0c56b store 1 ,mem_kscan_row_scanned 
+7873 6848c559 fetcht 1 ,mem_kscan_row_nums 
+7874 98467c00 isub temp ,null 
+7875 24217869 nbranch frmt_kscan_get_row_state_loop ,positive 
+7876 20600000 rtn 
+
+frmt_kscan_press_gnd_related:
+7877 6fe0c56b fetch 1 ,mem_kscan_row_scanned 
+7878 1fe0fe01 pincrease 1 
+7879 6848c55a fetcht 1 ,mem_kscan_col_nums 
+787a 18408401 increase 1 ,temp 
+787b 984ffe00 imul32 temp ,pdata 
+787c 98000e00 iforce queue 
+787d 6fe44551 fetch 8 ,mem_kscan_record_keypress 
+787e f9207e00 qset1 pdata 
+787f 67e44551 store 8 ,mem_kscan_record_keypress 
+7880 20600000 rtn 
+
+frmt_kscan_set_default_avoid_shake_time:
+7881 df200001 arg 1 ,loopcnt 
+7882 20600000 rtn 
+
+frmt_kscan_avoid_shake_and_record_key:
+7883 6fe1456e fetch 2 ,mem_kscan_avoid_shake_delay_time 
+7884 98007200 iforce loopcnt 
+7885 205a7881 call frmt_kscan_set_default_avoid_shake_time ,blank 
+7886 204074fc call delay_ms_wait 
+7887 e8408013 ifetcht 1 ,regc 
+7888 20406c32 call gpio_get_bit 
+7889 24608000 nrtn true 
+788a 20002ee0 nop 12000 
+788b e8408013 ifetcht 1 ,regc 
+788c 20406c32 call gpio_get_bit 
+788d 24608000 nrtn true 
+788e 20002ee0 nop 12000 
+788f e8408013 ifetcht 1 ,regc 
+7890 20406c32 call gpio_get_bit 
+7891 24608000 nrtn true 
+7892 204078b3 call frmt_kscan_all_col_pull_up 
+7893 e8408013 ifetcht 1 ,regc 
+7894 20406c32 call gpio_get_bit 
+7895 2020f877 branch frmt_kscan_press_gnd_related ,true 
+
+frmt_kscan_check_col_elec_level:
+7896 e8408013 ifetcht 1 ,regc 
+7897 18418480 or temp ,0x80 ,temp 
+7898 204078b7 call gpio_config_output_patch 
+7899 70456c00 jam 0 ,mem_kscan_col_scanned 
+789a da204563 arg mem_kscan_col_gpio_pin ,rega 
+
+frmt_kscan_check_col_elec_level_loop:
+789b e8408011 ifetcht 1 ,rega 
+789c 20406c32 call gpio_get_bit 
+789d 2040f8a6 call frmt_kscan_record_keypress ,true 
+789e 1a20a201 increase 1 ,rega 
+789f 6fe0c56c fetch 1 ,mem_kscan_col_scanned 
+78a0 1fe0fe01 pincrease 1 
+78a1 67e0c56c store 1 ,mem_kscan_col_scanned 
+78a2 6848c55a fetcht 1 ,mem_kscan_col_nums 
+78a3 98467c00 isub temp ,null 
+78a4 2421789b nbranch frmt_kscan_check_col_elec_level_loop ,positive 
+78a5 20600000 rtn 
+
+frmt_kscan_record_keypress:
+78a6 6fe0c56b fetch 1 ,mem_kscan_row_scanned 
+78a7 6848c55a fetcht 1 ,mem_kscan_col_nums 
+78a8 18408401 increase 1 ,temp 
+78a9 984ffe00 imul32 temp ,pdata 
+78aa 6848c56c fetcht 1 ,mem_kscan_col_scanned 
+78ab 18408401 increase 1 ,temp 
+78ac 9840fe00 iadd temp ,pdata 
+78ad 98000e00 iforce queue 
+78ae 7820fc00 enable true 
+78af 6fe44551 fetch 8 ,mem_kscan_record_keypress 
+78b0 f920fe00 qsetflag true ,pdata 
+78b1 67e44551 store 8 ,mem_kscan_record_keypress 
+78b2 20600000 rtn 
+
+frmt_kscan_all_col_pull_up:
+78b3 da204563 arg mem_kscan_col_gpio_pin ,rega 
+78b4 6fe0c55a fetch 1 ,mem_kscan_col_nums 
+78b5 98007200 iforce loopcnt 
+78b6 20207852 branch frmt_kscan_input_pull_up_loop 
+
+gpio_config_output_patch:
+78b7 79400407 setflip 7 ,temp 
+78b8 20206c43 branch gpio_config_output 
+
+frmt_light_lighten_short_press:
+78b9 6fe0c71f fetch 1 ,mem_light_color_and_lgtness_long_press_adv_enable 
+78ba c000f8eb beq 1 ,frmt_light_lighten 
+78bb 704701a0 jam light_lighten_release_adv_flag ,mem_light_release_adv_flag 
+78bc 202078c8 branch frmt_light_light_color_and_lightness_change_common 
+
+frmt_light_darken_short_press:
+78bd 6fe0c71f fetch 1 ,mem_light_color_and_lgtness_long_press_adv_enable 
+78be c000f8e1 beq 1 ,frmt_light_darken 
+78bf 704701a1 jam light_darken_release_adv_flag ,mem_light_release_adv_flag 
+78c0 202078c8 branch frmt_light_light_color_and_lightness_change_common 
+
+frmt_light_to_w_short_press:
+78c1 6fe0c71f fetch 1 ,mem_light_color_and_lgtness_long_press_adv_enable 
+78c2 c000f8d7 beq 1 ,frmt_light_to_w 
+78c3 704701a2 jam light_to_w_release_adv_flag ,mem_light_release_adv_flag 
+78c4 202078c8 branch frmt_light_light_color_and_lightness_change_common 
+
+frmt_light_to_y_short_press:
+78c5 6fe0c71f fetch 1 ,mem_light_color_and_lgtness_long_press_adv_enable 
+78c6 c000f8cd beq 1 ,frmt_light_to_y 
+78c7 704701a3 jam light_to_y_release_adv_flag ,mem_light_release_adv_flag 
+
+frmt_light_light_color_and_lightness_change_common:
+78c8 6fe1471d fetch 2 ,mem_light_short_keypress_timeout 
+78c9 247a0000 nrtn blank 
+78ca 70435b00 jam 0 ,mem_le_adv_enable 
+78cb 70471d05 jam short_press_timeout ,mem_light_short_keypress_timeout 
+78cc 20600000 rtn 
+
+frmt_light_to_y:
+78cd 4731402c bpatchx patch2c_2 ,mem_patch2c 
+78ce 6fe0c71c fetch 1 ,mem_special_agreemeet_enable 
+78cf c000f6ee beq 1 ,gem_light_to_y 
+78d0 c0017799 beq 2 ,key_light_to_y 
+78d1 70470100 jam 0 ,mem_light_release_adv_flag 
+78d2 20407aa0 call frmt_light_to_y_v2 
+78d3 70457f21 jam light_cmd_ftd_color_state_change ,mem_ftd_adv_raw 
+78d4 70458618 jam 0x18 ,mem_ftd_adv_raw_reserved 
+78d5 204078f5 call frmt_light_set_pdu_common_short_press_with_3bytes_data_reset 
+78d6 20207c57 branch frmt_adv_rear_6bytes_and_whitening 
+
+frmt_light_to_w:
+78d7 4731c02c bpatchx patch2c_3 ,mem_patch2c 
+78d8 6fe0c71c fetch 1 ,mem_special_agreemeet_enable 
+78d9 c000f6f3 beq 1 ,gem_light_to_w 
+78da c00177a0 beq 2 ,key_light_to_w 
+78db 70470100 jam 0 ,mem_light_release_adv_flag 
+78dc 20407aa2 call frmt_light_to_w_v2 
+78dd 70457f21 jam light_cmd_ftd_color_state_change ,mem_ftd_adv_raw 
+78de 70458624 jam 0x24 ,mem_ftd_adv_raw_reserved 
+78df 204078f5 call frmt_light_set_pdu_common_short_press_with_3bytes_data_reset 
+78e0 20207c57 branch frmt_adv_rear_6bytes_and_whitening 
+
+frmt_light_darken:
+78e1 4732402c bpatchx patch2c_4 ,mem_patch2c 
+78e2 6fe0c71c fetch 1 ,mem_special_agreemeet_enable 
+78e3 c000f6f8 beq 1 ,gem_light_darken 
+78e4 c00177a7 beq 2 ,key_light_darken 
+78e5 70470100 jam 0 ,mem_light_release_adv_flag 
+78e6 20407aa4 call frmt_light_darken_v2 
+78e7 70457f21 jam light_cmd_ftd_color_state_change ,mem_ftd_adv_raw 
+78e8 70458628 jam 0x28 ,mem_ftd_adv_raw_reserved 
+78e9 204078f5 call frmt_light_set_pdu_common_short_press_with_3bytes_data_reset 
+78ea 20207c57 branch frmt_adv_rear_6bytes_and_whitening 
+
+frmt_light_lighten:
+78eb 4732c02c bpatchx patch2c_5 ,mem_patch2c 
+78ec 6fe0c71c fetch 1 ,mem_special_agreemeet_enable 
+78ed c000f6fd beq 1 ,gem_light_lighten 
+78ee c00177ae beq 2 ,key_light_lighten 
+78ef 70470100 jam 0 ,mem_light_release_adv_flag 
+78f0 20407aa6 call frmt_light_lighten_v2 
+78f1 70457f21 jam light_cmd_ftd_color_state_change ,mem_ftd_adv_raw 
+78f2 70458614 jam 0x14 ,mem_ftd_adv_raw_reserved 
+78f3 204078f5 call frmt_light_set_pdu_common_short_press_with_3bytes_data_reset 
+78f4 20207c57 branch frmt_adv_rear_6bytes_and_whitening 
+
+frmt_light_set_pdu_common_short_press_with_3bytes_data_reset:
+78f5 58000000 setarg 0 
+78f6 67e1c582 store 3 ,mem_ftd_adv_raw_data 
+78f7 20207c36 branch frmt_light_set_pdu_common_short_press 
+
+frmt_light_release_set1_and_long_press_set1:
+78f8 70459101 jam 1 ,mem_light_num_of_long_press 
+78f9 20407904 call frmt_light_long_press_flag_reset 
+78fa 70470101 jam 1 ,mem_light_release_adv_flag 
+78fb 20600000 rtn 
+
+frmt_light_release_set2_and_long_press_set2:
+78fc 70459102 jam 2 ,mem_light_num_of_long_press 
+78fd 20407904 call frmt_light_long_press_flag_reset 
+78fe 70470102 jam 2 ,mem_light_release_adv_flag 
+78ff 20600000 rtn 
+
+frmt_light_release_set3_and_long_press_set3:
+7900 70459103 jam 3 ,mem_light_num_of_long_press 
+7901 20407904 call frmt_light_long_press_flag_reset 
+7902 70470103 jam 3 ,mem_light_release_adv_flag 
+7903 20600000 rtn 
+
+frmt_light_long_press_flag_reset:
+7904 6fe1458f fetch 2 ,mem_long_press_timeout 
+7905 247a0000 nrtn blank 
+7906 6fe14769 fetch 2 ,mem_claer_code_time 
+7907 67e1458f store 2 ,mem_long_press_timeout 
+7908 1fe0fe01 pincrease 1 
+7909 67e146a1 store 2 ,mem_light_lpm_enable_timeout 
+790a 6fe0c71c fetch 1 ,mem_special_agreemeet_enable 
+790b 1fe67c01 sub pdata ,1 ,null 
+790c 2022f68f branch gem_long_keypress_time ,zero 
+790d 20600000 rtn 
+
+frmt_light_night_light:
+790e 20407abc call frmt_light_night_light_v2 
+790f 70457f23 jam light_cmd_night_light ,mem_ftd_adv_raw 
+7910 20207c34 branch frmt_adv_rear_6bytes_and_whitening_and_set_pdu_common_short_press 
+
+frmt_light_master_pairing:
+7911 70457c00 jam 0 ,mem_groups_num 
+7912 7044a600 jam 0 ,mem_ble_v2_group_index 
+
+frmt_light_pairing_process:
+7913 58000001 setarg key_press_led_on_time 
+7914 67e146a4 store 2 ,mem_indicator_led_turn_on_timeout 
+7915 7046a301 jam 1 ,mem_indicator_turn_on_enable 
+
+frmt_light_pairing_process_without_led_flag_set:
+7916 70435b01 jam 1 ,mem_le_adv_enable 
+7917 6fe14767 fetch 2 ,mem_light_adv_time 
+7918 1febfe00 lshift2 pdata ,pdata 
+7919 67e1459d store 2 ,mem_ble_light_adv_timeout 
+791a 1fe0fe01 pincrease 1 
+791b 67e146a1 store 2 ,mem_light_lpm_enable_timeout 
+791c 4733402c bpatchx patch2c_6 ,mem_patch2c 
+791d 20407abe call frmt_light_master_pairing_v2 
+791e 6fe0c57a fetch 1 ,mem_light_manufacture_id 
+791f 67e0c586 store 1 ,mem_ftd_adv_raw_reserved 
+7920 70457f28 jam light_cmd_pairing_code ,mem_ftd_adv_raw 
+7921 6fe0c585 fetch 1 ,mem_ftd_adv_raw_packet_num 
+7922 1fe0fe01 pincrease 1 
+7923 67e0c585 store 1 ,mem_ftd_adv_raw_packet_num 
+7924 70458481 jam 0x81 ,mem_ftd_adv_raw_data + 2 
+7925 6fe0c4a1 fetch 1 ,mem_ble_v2_maintype 
+7926 1fe67c03 sub pdata ,3 ,null 
+7927 2042fc41 call frmt_fan_lamp ,zero 
+7928 6fe0c4a1 fetch 1 ,mem_ble_v2_maintype 
+7929 1fe67c05 sub pdata ,5 ,null 
+792a 2042fc43 call frmt_solar_lamp ,zero 
+792b 2040792d call frmt_light_groups_pairing_address_set_set 
+792c 20207c57 branch frmt_adv_rear_6bytes_and_whitening 
+
+frmt_light_groups_pairing_address_set_set:
+792d 6fe14576 fetch 2 ,mem_ftd_adv_raw_device_add_temp 
+792e d840f0ff arg 0xf0ff ,temp 
+792f 98417e00 iand temp ,pdata 
+7930 67e14582 store 2 ,mem_ftd_adv_raw_data 
+7931 20207c4e branch frmt_light_groups_address_set 
+
+frmt_light_clear_code:
+7932 7046a301 jam 1 ,mem_indicator_turn_on_enable 
+7933 70435b01 jam 1 ,mem_le_adv_enable 
+7934 58000001 setarg key_press_led_on_time 
+7935 1febfe00 lshift2 pdata ,pdata 
+7936 67e146a4 store 2 ,mem_indicator_led_turn_on_timeout 
+7937 6fe14767 fetch 2 ,mem_light_adv_time 
+7938 1febfe00 lshift2 pdata ,pdata 
+7939 67e1459d store 2 ,mem_ble_light_adv_timeout 
+793a 1fe0fe01 pincrease 1 
+793b 67e146a1 store 2 ,mem_light_lpm_enable_timeout 
+793c 4733c02c bpatchx patch2c_7 ,mem_patch2c 
+793d 20407ac3 call frmt_light_clear_code_v2 
+793e 70457f45 jam light_cmd_clear_code ,mem_ftd_adv_raw 
+793f 5801feff setarg light_ftd_clear_code_addr 
+7940 67e1c580 store 3 ,mem_ftd_adv_raw_device_add 
+7941 6fe0c585 fetch 1 ,mem_ftd_adv_raw_packet_num 
+7942 1fe0fe01 pincrease 1 
+7943 67e0c585 store 1 ,mem_ftd_adv_raw_packet_num 
+7944 6fe0c4a1 fetch 1 ,mem_ble_v2_maintype 
+7945 1fe67c03 sub pdata ,3 ,null 
+7946 2042fc41 call frmt_fan_lamp ,zero 
+7947 6fe0c4a1 fetch 1 ,mem_ble_v2_maintype 
+7948 1fe67c05 sub pdata ,5 ,null 
+7949 2042fc43 call frmt_solar_lamp ,zero 
+794a 20207c57 branch frmt_adv_rear_6bytes_and_whitening 
+
+frmt_light_master_on_and_long_press_set0:
+794b 70459100 jam 0 ,mem_light_num_of_long_press 
+794c 20407904 call frmt_light_long_press_flag_reset 
+
+frmt_light_master_on:
+794d 70457c00 jam 0 ,mem_groups_num 
+794e 20407ac5 call frmt_light_master_on_v2 
+794f 6fe0c71c fetch 1 ,mem_special_agreemeet_enable 
+7950 c000f6a0 beq 1 ,gem_light_master_on 
+7951 c0017844 beq 2 ,key_light_master_on 
+
+frmt_light_on_without_group_set:
+7952 7046a601 jam 1 ,mem_light_on_and_off_flag 
+7953 70457f10 jam light_cmd_turn_on ,mem_ftd_adv_raw 
+7954 20407c4e call frmt_light_groups_address_set 
+7955 20207c34 branch frmt_adv_rear_6bytes_and_whitening_and_set_pdu_common_short_press 
+
+frmt_light_master_off_and_long_press_set0:
+7956 70459100 jam 0 ,mem_light_num_of_long_press 
+7957 20407904 call frmt_light_long_press_flag_reset 
+7958 2020795b branch frmt_light_master_off 
+
+frmt_light_master_on_and_off:
+7959 6fe0c6a6 fetch 1 ,mem_light_on_and_off_flag 
+795a 203a794d branch frmt_light_master_on ,blank 
+
+frmt_light_master_off:
+795b 20407ac8 call frmt_light_master_off_v2 
+795c 70457c00 jam 0 ,mem_groups_num 
+795d 6fe0c71c fetch 1 ,mem_special_agreemeet_enable 
+795e c000f6a4 beq 1 ,gem_light_master_off 
+795f c001783c beq 2 ,key_light_master_off 
+
+frmt_light_off_without_group_set:
+7960 7046a600 jam 0 ,mem_light_on_and_off_flag 
+7961 70457f11 jam light_cmd_turn_off ,mem_ftd_adv_raw 
+7962 20407c4e call frmt_light_groups_address_set 
+7963 20207c34 branch frmt_adv_rear_6bytes_and_whitening_and_set_pdu_common_short_press 
+
+frmt_light_on_and_off_1opcode_and_long_press_set0:
+7964 70459100 jam 0 ,mem_light_num_of_long_press 
+7965 20407904 call frmt_light_long_press_flag_reset 
+
+frmt_light_on_and_off_1opcode:
+7966 20407acb call frmt_light_on_and_off_1opcode_v2 
+7967 70457f09 jam light_cmd_turn_on_and_off ,mem_ftd_adv_raw 
+7968 20207c34 branch frmt_adv_rear_6bytes_and_whitening_and_set_pdu_common_short_press 
+
+frmt_light_color_switch_wy_only_payload_set:
+7969 70457f21 jam light_cmd_color_swtich ,mem_ftd_adv_raw 
+796a 704582ff jam light_data_part_ff ,mem_ftd_adv_raw_data 
+796b 704583ff jam light_data_part_ff ,mem_ftd_adv_raw_data + 1 
+796c 70458640 jam light_cmd_ftd_color_swtich_reserved ,mem_ftd_adv_raw_reserved 
+796d 20600000 rtn 
+
+frmt_light_color_switch_w_only_payload_set:
+796e 70457f21 jam light_cmd_color_swtich ,mem_ftd_adv_raw 
+796f 704582ff jam light_data_part_ff ,mem_ftd_adv_raw_data 
+7970 70458640 jam light_cmd_ftd_color_swtich_reserved ,mem_ftd_adv_raw_reserved 
+7971 20600000 rtn 
+
+frmt_light_color_switch_y_only_payload_set:
+7972 70457f21 jam light_cmd_color_swtich ,mem_ftd_adv_raw 
+7973 704583ff jam light_data_part_ff ,mem_ftd_adv_raw_data + 1 
+7974 70458640 jam light_cmd_ftd_color_swtich_reserved ,mem_ftd_adv_raw_reserved 
+7975 20600000 rtn 
+
+frmt_light_color_switch:
+7976 6fe0c592 fetch 1 ,mem_light_color_switch_cnt 
+7977 1fe67c03 sub pdata ,3 ,null 
+7978 2042f97d call frmt_color_switch_cnt_set0 ,zero 
+7979 c0007980 beq 0 ,frmt_light_color_switch_wy 
+797a c000f988 beq 1 ,frmt_light_color_switch_w 
+797b c0017990 beq 2 ,frmt_light_color_switch_y 
+797c 20600000 rtn 
+
+frmt_color_switch_cnt_set0:
+797d 58000000 setarg 0 
+797e 67e0c592 store 1 ,mem_light_color_switch_cnt 
+797f 20600000 rtn 
+
+frmt_light_color_switch_wy:
+7980 6fe0c592 fetch 1 ,mem_light_color_switch_cnt 
+7981 1fe0fe01 pincrease 1 
+7982 67e0c592 store 1 ,mem_light_color_switch_cnt 
+7983 20407acd call frmt_light_color_switch_wy_v2 
+7984 6fe0c71c fetch 1 ,mem_special_agreemeet_enable 
+7985 c000f692 beq 1 ,gem_light_color_switch 
+7986 20407969 call frmt_light_color_switch_wy_only_payload_set 
+7987 20207c34 branch frmt_adv_rear_6bytes_and_whitening_and_set_pdu_common_short_press 
+
+frmt_light_color_switch_w:
+7988 6fe0c592 fetch 1 ,mem_light_color_switch_cnt 
+7989 1fe0fe01 pincrease 1 
+798a 67e0c592 store 1 ,mem_light_color_switch_cnt 
+798b 20407ad4 call frmt_light_color_switch_w_v2 
+798c 6fe0c71c fetch 1 ,mem_special_agreemeet_enable 
+798d c000f692 beq 1 ,gem_light_color_switch 
+798e 2040796e call frmt_light_color_switch_w_only_payload_set 
+798f 20207c34 branch frmt_adv_rear_6bytes_and_whitening_and_set_pdu_common_short_press 
+
+frmt_light_color_switch_y:
+7990 6fe0c592 fetch 1 ,mem_light_color_switch_cnt 
+7991 1fe0fe01 pincrease 1 
+7992 67e0c592 store 1 ,mem_light_color_switch_cnt 
+7993 20407ada call frmt_light_color_switch_y_v2 
+7994 6fe0c71c fetch 1 ,mem_special_agreemeet_enable 
+7995 c000f692 beq 1 ,gem_light_color_switch 
+7996 20407972 call frmt_light_color_switch_y_only_payload_set 
+7997 20207c34 branch frmt_adv_rear_6bytes_and_whitening_and_set_pdu_common_short_press 
+
+frmt_light_aid_turn_on_and_off:
+7998 6fe0c6a8 fetch 1 ,mem_light_aid_swtich_flag 
+7999 c00079a1 beq 0 ,frmt_light_aid_turn_on 
+
+frmt_light_aid_turn_off:
+799a 20407ae0 call frmt_light_aid_turn_off_v2 
+799b 7046a800 jam 0 ,mem_light_aid_swtich_flag 
+799c 6fe0c71c fetch 1 ,mem_special_agreemeet_enable 
+799d c000f69d beq 1 ,gem_light_aid_turn_onoff 
+799e c0017793 beq 2 ,key_light_aux_lamp_on_and_off_ky 
+799f 70457f13 jam light_cmd_aid_turn_off ,mem_ftd_adv_raw 
+79a0 20207c34 branch frmt_adv_rear_6bytes_and_whitening_and_set_pdu_common_short_press 
+
+frmt_light_aid_turn_on:
+79a1 20407ae2 call frmt_light_aid_turn_on_v2 
+79a2 7046a801 jam 1 ,mem_light_aid_swtich_flag 
+79a3 6fe0c71c fetch 1 ,mem_special_agreemeet_enable 
+79a4 c000f69d beq 1 ,gem_light_aid_turn_onoff 
+79a5 c0017793 beq 2 ,key_light_aux_lamp_on_and_off_ky 
+79a6 70457f12 jam light_cmd_aid_turn_on ,mem_ftd_adv_raw 
+79a7 20207c34 branch frmt_adv_rear_6bytes_and_whitening_and_set_pdu_common_short_press 
+
+frmt_light_pcnt_50_and_100percent:
+79a8 6fe0c593 fetch 1 ,mem_light_brightness_switch_flag 
+79a9 c00079b1 beq 0 ,frmt_light_pcnt_50_percent 
+
+frmt_light_pcnt_100_percent:
+79aa 20407ae4 call frmt_light_pcnt_100_percent_v2 
+79ab 70457f21 jam light_cmd_color_swtich ,mem_ftd_adv_raw 
+79ac 704582ff jam light_data_part_ff ,mem_ftd_adv_raw_data 
+79ad 704583ff jam light_data_part_ff ,mem_ftd_adv_raw_data + 1 
+79ae 70459300 jam 0 ,mem_light_brightness_switch_flag 
+79af 70458602 jam 2 ,mem_ftd_adv_raw_reserved 
+79b0 20207c34 branch frmt_adv_rear_6bytes_and_whitening_and_set_pdu_common_short_press 
+
+frmt_light_pcnt_50_percent:
+79b1 20407aeb call frmt_light_pcnt_50_percent_v2 
+79b2 70458601 jam 1 ,mem_ftd_adv_raw_reserved 
+79b3 70457f21 jam light_cmd_color_swtich ,mem_ftd_adv_raw 
+79b4 7045827f jam light_ftd_data_part_pcnt_50percent ,mem_ftd_adv_raw_data 
+79b5 7045837f jam light_ftd_data_part_pcnt_50percent ,mem_ftd_adv_raw_data + 1 
+79b6 70459301 jam 1 ,mem_light_brightness_switch_flag 
+79b7 20207c34 branch frmt_adv_rear_6bytes_and_whitening_and_set_pdu_common_short_press 
+
+frmt_light_rgb_auto:
+79b8 6fe0c71c fetch 1 ,mem_special_agreemeet_enable 
+79b9 1fe67c01 sub pdata ,1 ,null 
+79ba 2042f6a8 call gem_light_rgb_auto ,zero 
+79bb 7046f901 jam 1 ,mem_light_rgb_on_and_off_flag 
+79bc 6fe0c596 fetch 1 ,mem_light_rgb_auto_flag 
+79bd c00079c2 beq 0 ,frmt_light_rgb_circulation_1e 
+
+frmt_light_rgb_circulation_1f:
+79be 20407af2 call frmt_light_rgb_circulation_1f_v2 
+79bf 70457f1f jam light_cmd_rgb_1f ,mem_ftd_adv_raw 
+79c0 70459600 jam 0 ,mem_light_rgb_auto_flag 
+79c1 20207c34 branch frmt_adv_rear_6bytes_and_whitening_and_set_pdu_common_short_press 
+
+frmt_light_rgb_circulation_1e:
+79c2 20407af4 call frmt_light_rgb_circulation_1e_v2 
+79c3 70457f1e jam light_cmd_rgb_1e ,mem_ftd_adv_raw 
+79c4 70459601 jam 1 ,mem_light_rgb_auto_flag 
+79c5 20207c34 branch frmt_adv_rear_6bytes_and_whitening_and_set_pdu_common_short_press 
+
+frmt_light_rgb_manual:
+79c6 6fe0c71c fetch 1 ,mem_special_agreemeet_enable 
+79c7 1fe67c01 sub pdata ,1 ,null 
+79c8 2042f6ab call gem_light_rgb_step ,zero 
+79c9 70457f22 jam light_cmd_rgb_mannul ,mem_ftd_adv_raw 
+79ca 6fe0c594 fetch 1 ,mem_light_rgb_hand_actuated_flag 
+79cb c00079f0 beq 0 ,frmt_light_rgb_manual0 
+79cc c000f9ec beq 1 ,frmt_light_rgb_manual1 
+79cd c00179e8 beq 2 ,frmt_light_rgb_manual2 
+79ce c001f9e3 beq 3 ,frmt_light_rgb_manual3 
+79cf c00279de beq 4 ,frmt_light_rgb_manual4 
+79d0 c002f9d9 beq 5 ,frmt_light_rgb_manual5 
+79d1 c00379d3 beq 6 ,frmt_light_rgb_manual6 
+79d2 20600000 rtn 
+
+frmt_light_rgb_manual6:
+79d3 20407b11 call frmt_light_rgb_manual6_v2 
+79d4 70459400 jam 0 ,mem_light_rgb_hand_actuated_flag 
+79d5 704582ff jam light_data_part_ff ,mem_ftd_adv_raw_data 
+79d6 704583ff jam light_data_part_ff ,mem_ftd_adv_raw_data + 1 
+79d7 704584ff jam light_data_part_ff ,mem_ftd_adv_raw_data + 2 
+79d8 20207c34 branch frmt_adv_rear_6bytes_and_whitening_and_set_pdu_common_short_press 
+
+frmt_light_rgb_manual5:
+79d9 20407b0c call frmt_light_rgb_manual5_v2 
+79da 70459406 jam 6 ,mem_light_rgb_hand_actuated_flag 
+79db 704582ff jam light_data_part_ff ,mem_ftd_adv_raw_data 
+79dc 704584ff jam light_data_part_ff ,mem_ftd_adv_raw_data + 2 
+79dd 20207c34 branch frmt_adv_rear_6bytes_and_whitening_and_set_pdu_common_short_press 
+
+frmt_light_rgb_manual4:
+79de 20407b07 call frmt_light_rgb_manual4_v2 
+79df 70459405 jam 5 ,mem_light_rgb_hand_actuated_flag 
+79e0 704583ff jam light_data_part_ff ,mem_ftd_adv_raw_data + 1 
+79e1 704584ff jam light_data_part_ff ,mem_ftd_adv_raw_data + 2 
+79e2 20207c34 branch frmt_adv_rear_6bytes_and_whitening_and_set_pdu_common_short_press 
+
+frmt_light_rgb_manual3:
+79e3 20407b02 call frmt_light_rgb_manual3_v2 
+79e4 70459404 jam 4 ,mem_light_rgb_hand_actuated_flag 
+79e5 704582ff jam light_data_part_ff ,mem_ftd_adv_raw_data 
+79e6 704583ff jam light_data_part_ff ,mem_ftd_adv_raw_data + 1 
+79e7 20207c34 branch frmt_adv_rear_6bytes_and_whitening_and_set_pdu_common_short_press 
+
+frmt_light_rgb_manual2:
+79e8 20407afe call frmt_light_rgb_manual2_v2 
+79e9 70459403 jam 3 ,mem_light_rgb_hand_actuated_flag 
+79ea 704584ff jam light_data_part_ff ,mem_ftd_adv_raw_data + 2 
+79eb 20207c34 branch frmt_adv_rear_6bytes_and_whitening_and_set_pdu_common_short_press 
+
+frmt_light_rgb_manual1:
+79ec 20407afa call frmt_light_rgb_manual1_v2 
+79ed 70459402 jam 2 ,mem_light_rgb_hand_actuated_flag 
+79ee 704583ff jam light_data_part_ff ,mem_ftd_adv_raw_data + 1 
+79ef 20207c34 branch frmt_adv_rear_6bytes_and_whitening_and_set_pdu_common_short_press 
+
+frmt_light_rgb_manual0:
+79f0 20407af6 call frmt_light_rgb_manual0_v2 
+79f1 70459401 jam 1 ,mem_light_rgb_hand_actuated_flag 
+79f2 704582ff jam light_data_part_ff ,mem_ftd_adv_raw_data 
+79f3 20207c34 branch frmt_adv_rear_6bytes_and_whitening_and_set_pdu_common_short_press 
+
+frmt_light_timing_1min:
+79f4 20407b17 call frmt_light_timing_1min_v2 
+79f5 70458201 jam 1 ,mem_ftd_adv_raw_data 
+
+frmt_light_timing_off:
+79f6 70457f41 jam light_cmd_delay_off ,mem_ftd_adv_raw 
+79f7 20207c34 branch frmt_adv_rear_6bytes_and_whitening_and_set_pdu_common_short_press 
+
+frmt_light_group1_on_and_long_press_set1:
+79f8 70459101 jam 1 ,mem_light_num_of_long_press 
+79f9 20407904 call frmt_light_long_press_flag_reset 
+
+frmt_light_group1_on:
+79fa 20407b21 call frmt_light_group1_on_v2 
+79fb 70459801 jam 1 ,mem_light_group1_on_and_off_flag 
+79fc 70457f10 jam light_cmd_turn_on ,mem_ftd_adv_raw 
+79fd 70457c01 jam 1 ,mem_groups_num 
+79fe 20207c34 branch frmt_adv_rear_6bytes_and_whitening_and_set_pdu_common_short_press 
+
+frmt_light_group2_on_and_long_press_set2:
+79ff 70459102 jam 2 ,mem_light_num_of_long_press 
+7a00 20407904 call frmt_light_long_press_flag_reset 
+
+frmt_light_group2_on:
+7a01 20407b23 call frmt_light_group2_on_v2 
+7a02 70459901 jam 1 ,mem_light_group2_on_and_off_flag 
+7a03 70457f10 jam light_cmd_turn_on ,mem_ftd_adv_raw 
+7a04 70457c02 jam 2 ,mem_groups_num 
+7a05 20207c34 branch frmt_adv_rear_6bytes_and_whitening_and_set_pdu_common_short_press 
+
+frmt_light_group3_on_and_long_press_set3:
+7a06 70459103 jam 3 ,mem_light_num_of_long_press 
+7a07 20407904 call frmt_light_long_press_flag_reset 
+
+frmt_light_group3_on:
+7a08 70459a01 jam 1 ,mem_light_group3_on_and_off_flag 
+7a09 70457f10 jam light_cmd_turn_on ,mem_ftd_adv_raw 
+7a0a 70457c03 jam 3 ,mem_groups_num 
+7a0b 20207c34 branch frmt_adv_rear_6bytes_and_whitening_and_set_pdu_common_short_press 
+
+frmt_light_group4_on_and_long_press_set4:
+7a0c 70459104 jam 4 ,mem_light_num_of_long_press 
+7a0d 20407904 call frmt_light_long_press_flag_reset 
+
+frmt_light_group4_on:
+7a0e 20407b27 call frmt_light_group4_on_v2 
+7a0f 70459b01 jam 1 ,mem_light_group4_on_and_off_flag 
+7a10 70457f10 jam light_cmd_turn_on ,mem_ftd_adv_raw 
+7a11 70457c04 jam 4 ,mem_groups_num 
+7a12 20207c34 branch frmt_adv_rear_6bytes_and_whitening_and_set_pdu_common_short_press 
+
+frmt_light_group1_on_and_off_and_long_press_set1:
+7a13 70459101 jam 1 ,mem_light_num_of_long_press 
+7a14 20407904 call frmt_light_long_press_flag_reset 
+
+frmt_light_group1_on_and_off:
+7a15 6fe0c598 fetch 1 ,mem_light_group1_on_and_off_flag 
+7a16 203a79fa branch frmt_light_group1_on ,blank 
+
+frmt_light_group1_off:
+7a17 20407b29 call frmt_light_group1_off_v2 
+7a18 70459800 jam 0 ,mem_light_group1_on_and_off_flag 
+7a19 70457f11 jam light_cmd_turn_off ,mem_ftd_adv_raw 
+7a1a 70457c01 jam 1 ,mem_groups_num 
+7a1b 20207c34 branch frmt_adv_rear_6bytes_and_whitening_and_set_pdu_common_short_press 
+
+frmt_light_group2_on_and_off_and_long_press_set2:
+7a1c 70459102 jam 2 ,mem_light_num_of_long_press 
+7a1d 20407904 call frmt_light_long_press_flag_reset 
+
+frmt_light_group2_on_and_off:
+7a1e 6fe0c599 fetch 1 ,mem_light_group2_on_and_off_flag 
+7a1f 203a7a01 branch frmt_light_group2_on ,blank 
+
+frmt_light_group2_off:
+7a20 20407b2b call frmt_light_group2_off_v2 
+7a21 70459900 jam 0 ,mem_light_group2_on_and_off_flag 
+7a22 70457f11 jam light_cmd_turn_off ,mem_ftd_adv_raw 
+7a23 70457c02 jam 2 ,mem_groups_num 
+7a24 20207c34 branch frmt_adv_rear_6bytes_and_whitening_and_set_pdu_common_short_press 
+
+frmt_light_group3_on_and_off_and_long_press_set3:
+7a25 70459103 jam 3 ,mem_light_num_of_long_press 
+7a26 20407904 call frmt_light_long_press_flag_reset 
+
+frmt_light_group3_on_and_off:
+7a27 6fe0c59a fetch 1 ,mem_light_group3_on_and_off_flag 
+7a28 203a7a08 branch frmt_light_group3_on ,blank 
+
+frmt_light_group3_off:
+7a29 20407b2d call frmt_light_group3_off_v2 
+7a2a 70459a00 jam 0 ,mem_light_group3_on_and_off_flag 
+7a2b 70457f11 jam light_cmd_turn_off ,mem_ftd_adv_raw 
+7a2c 70457c03 jam 3 ,mem_groups_num 
+7a2d 20207c34 branch frmt_adv_rear_6bytes_and_whitening_and_set_pdu_common_short_press 
+
+frmt_light_group4_on_and_off_and_long_press_set4:
+7a2e 70459104 jam 4 ,mem_light_num_of_long_press 
+7a2f 20407904 call frmt_light_long_press_flag_reset 
+
+frmt_light_group4_on_and_off:
+7a30 6fe0c59b fetch 1 ,mem_light_group4_on_and_off_flag 
+7a31 203a7a0e branch frmt_light_group4_on ,blank 
+
+frmt_light_group4_off:
+7a32 20407b2f call frmt_light_group4_off_v2 
+7a33 70459b00 jam 0 ,mem_light_group4_on_and_off_flag 
+7a34 70457f11 jam light_cmd_turn_off ,mem_ftd_adv_raw 
+7a35 70457c04 jam 4 ,mem_groups_num 
+7a36 20207c34 branch frmt_adv_rear_6bytes_and_whitening_and_set_pdu_common_short_press 
+
+frmt_light_pairing_group1:
+7a37 70457c01 jam 1 ,mem_groups_num 
+7a38 7044a601 jam 1 ,mem_ble_v2_group_index 
+7a39 20207913 branch frmt_light_pairing_process 
+
+frmt_light_pairing_group2:
+7a3a 70457c02 jam 2 ,mem_groups_num 
+7a3b 7044a602 jam 2 ,mem_ble_v2_group_index 
+7a3c 20207913 branch frmt_light_pairing_process 
+
+frmt_light_pairing_group3:
+7a3d 70457c03 jam 3 ,mem_groups_num 
+7a3e 7044a603 jam 3 ,mem_ble_v2_group_index 
+7a3f 20207913 branch frmt_light_pairing_process 
+
+frmt_light_pairing_group4:
+7a40 70457c04 jam 4 ,mem_groups_num 
+7a41 7044a604 jam 4 ,mem_ble_v2_group_index 
+7a42 20207913 branch frmt_light_pairing_process 
+
+frmt_fan_master_off:
+7a43 20407a7f call frmt_fan_master_off_v2 
+7a44 70457f6f jam fan_cmd_master_on_and_off ,mem_ftd_adv_raw 
+7a45 70458200 jam 0 ,mem_ftd_adv_raw_data 
+7a46 20207c34 branch frmt_adv_rear_6bytes_and_whitening_and_set_pdu_common_short_press 
+
+frmt_fan_turning_forward_and_reverse:
+7a47 6fe0c5a1 fetch 1 ,mem_fan_direction_alternant 
+7a48 203a7a4b branch frmt_fan_turning_reverse ,blank 
+7a49 7045a100 jam 0 ,mem_fan_direction_alternant 
+7a4a 20207a50 branch frmt_fan_turning_forward 
+
+frmt_fan_turning_reverse:
+7a4b 20407a82 call frmt_fan_turing_reverse_v2 
+7a4c 7045a101 jam 1 ,mem_fan_direction_alternant 
+7a4d 70457f15 jam fan_cmd_direction ,mem_ftd_adv_raw 
+7a4e 70458201 jam 1 ,mem_ftd_adv_raw_data 
+7a4f 20207c34 branch frmt_adv_rear_6bytes_and_whitening_and_set_pdu_common_short_press 
+
+frmt_fan_turning_forward:
+7a50 20407a83 call frmt_fan_turing_forward_v2 
+7a51 70457f15 jam fan_cmd_direction ,mem_ftd_adv_raw 
+7a52 70458200 jam 0 ,mem_ftd_adv_raw_data 
+7a53 20207c34 branch frmt_adv_rear_6bytes_and_whitening_and_set_pdu_common_short_press 
+
+frmt_fan_natural_wind:
+7a54 20407a86 call frmt_fan_natural_wind_v2 
+7a55 70457f33 jam fan_cmd_mode ,mem_ftd_adv_raw 
+7a56 70458202 jam 2 ,mem_ftd_adv_raw_data 
+7a57 20207c34 branch frmt_adv_rear_6bytes_and_whitening_and_set_pdu_common_short_press 
+
+frmt_fan_tap_position_1:
+7a58 20407a8a call frmt_fan_tap_position_1_v2 
+7a59 58000001 setarg 1 
+
+frmt_fan_tap_position_common:
+7a5a 67e0c582 store 1 ,mem_ftd_adv_raw_data 
+7a5b 70457f32 jam fan_cmd_speed_32 ,mem_ftd_adv_raw 
+7a5c 70458306 jam 6 ,mem_ftd_adv_raw_data + 1 
+7a5d 20207c34 branch frmt_adv_rear_6bytes_and_whitening_and_set_pdu_common_short_press 
+
+frmt_fan_tap_position_2:
+7a5e 20407a90 call frmt_fan_tap_position_2_v2 
+7a5f 58000002 setarg 2 
+7a60 20207a5a branch frmt_fan_tap_position_common 
+
+frmt_fan_tap_position_3:
+7a61 20407a92 call frmt_fan_tap_position_3_v2 
+7a62 58000003 setarg 3 
+7a63 20207a5a branch frmt_fan_tap_position_common 
+
+frmt_fan_tap_position_4:
+7a64 20407a94 call frmt_fan_tap_position_4_v2 
+7a65 58000004 setarg 4 
+7a66 20207a5a branch frmt_fan_tap_position_common 
+
+frmt_fan_tap_position_5:
+7a67 20407a96 call frmt_fan_tap_position_5_v2 
+7a68 58000005 setarg 5 
+7a69 20207a5a branch frmt_fan_tap_position_common 
+
+frmt_fan_tap_position_6:
+7a6a 20407a98 call frmt_fan_tap_position_6_v2 
+7a6b 58000006 setarg 6 
+7a6c 20207a5a branch frmt_fan_tap_position_common 
+
+frmt_fan_stop_fan_and_long_press_set1:
+7a6d 70459101 jam 1 ,mem_light_num_of_long_press 
+7a6e 20407904 call frmt_light_long_press_flag_reset 
+
+frmt_fan_stop_fan:
+7a6f 20407a9a call frmt_fan_stop_fan_v2 
+7a70 70457f31 jam fan_cmd_speed_31 ,mem_ftd_adv_raw 
+7a71 70458200 jam 0 ,mem_ftd_adv_raw_data 
+7a72 20207c34 branch frmt_adv_rear_6bytes_and_whitening_and_set_pdu_common_short_press 
+
+frmt_fan_deflector_on_and_off:
+7a73 6fe0c6a7 fetch 1 ,mem_fan_deflector_flag 
+7a74 203a7a7a branch frmt_fan_deflector_on ,blank 
+
+frmt_fan_deflector_off:
+7a75 20407a9d call frmt_fan_deflector_off_v2 
+7a76 7046a700 jam 0 ,mem_fan_deflector_flag 
+7a77 70457f16 jam fan_cmd_deflector ,mem_ftd_adv_raw 
+7a78 70458200 jam 0 ,mem_ftd_adv_raw_data 
+7a79 20207c34 branch frmt_adv_rear_6bytes_and_whitening_and_set_pdu_common_short_press 
+
+frmt_fan_deflector_on:
+7a7a 20407a9c call frmt_fan_deflector_on_v2 
+7a7b 7046a701 jam 1 ,mem_fan_deflector_flag 
+7a7c 70457f16 jam fan_cmd_deflector ,mem_ftd_adv_raw 
+7a7d 70458201 jam 1 ,mem_ftd_adv_raw_data 
+7a7e 20207c34 branch frmt_adv_rear_6bytes_and_whitening_and_set_pdu_common_short_press 
+
+frmt_fan_master_off_v2:
+7a7f 5800006f setarg fan_cmd_master_on_and_off_v2 
+7a80 67e144a7 store 2 ,mem_ble_v2_cmd 
+7a81 20207aab branch frmt_ble_v2_encoder_pack 
+
+frmt_fan_turing_reverse_v2:
+7a82 7044aa01 jam 1 ,mem_ble_v2_para + 1 
+
+frmt_fan_turing_forward_v2:
+7a83 58000015 setarg fan_cmd_wind_direction_v2 
+7a84 67e144a7 store 2 ,mem_ble_v2_cmd 
+7a85 20207aab branch frmt_ble_v2_encoder_pack 
+
+frmt_fan_natural_wind_v2:
+7a86 7044aa02 jam 0x02 ,mem_ble_v2_para + 1 
+
+frmt_fan_mode_sel_common_v2:
+7a87 58000033 setarg fan_cmd_mode_sel_v2 
+7a88 67e144a7 store 2 ,mem_ble_v2_cmd 
+7a89 20207aab branch frmt_ble_v2_encoder_pack 
+
+frmt_fan_tap_position_1_v2:
+7a8a 58000001 setarg 1 
+
+frmt_fan_tap_position_common_v2:
+7a8b 67e0c4ab store 1 ,mem_ble_v2_para + 2 
+7a8c 58000031 setarg fan_cmd_wind_speed_v2 
+7a8d 67e144a7 store 2 ,mem_ble_v2_cmd 
+7a8e 7044aa20 jam 0x20 ,mem_ble_v2_para + 1 
+7a8f 20207aab branch frmt_ble_v2_encoder_pack 
+
+frmt_fan_tap_position_2_v2:
+7a90 58000002 setarg 2 
+7a91 20207a8b branch frmt_fan_tap_position_common_v2 
+
+frmt_fan_tap_position_3_v2:
+7a92 58000003 setarg 3 
+7a93 20207a8b branch frmt_fan_tap_position_common_v2 
+
+frmt_fan_tap_position_4_v2:
+7a94 58000004 setarg 4 
+7a95 20207a8b branch frmt_fan_tap_position_common_v2 
+
+frmt_fan_tap_position_5_v2:
+7a96 58000005 setarg 5 
+7a97 20207a8b branch frmt_fan_tap_position_common_v2 
+
+frmt_fan_tap_position_6_v2:
+7a98 58000006 setarg 6 
+7a99 20207a8b branch frmt_fan_tap_position_common_v2 
+
+frmt_fan_stop_fan_v2:
+7a9a 58000000 setarg 0 
+7a9b 20207a8b branch frmt_fan_tap_position_common_v2 
+
+frmt_fan_deflector_on_v2:
+7a9c 7044aa01 jam 1 ,mem_ble_v2_para + 1 
+
+frmt_fan_deflector_off_v2:
+7a9d 58000016 setarg fan_cmd_deflector_v2 
+7a9e 67e144a7 store 2 ,mem_ble_v2_cmd 
+7a9f 20207aab branch frmt_ble_v2_encoder_pack 
+
+frmt_light_to_y_v2:
+7aa0 7044aa18 jam 0x18 ,mem_ble_v2_para + 1 
+7aa1 20207aa8 branch frmt_light_common 
+
+frmt_light_to_w_v2:
+7aa2 7044aa24 jam 0x24 ,mem_ble_v2_para + 1 
+7aa3 20207aa8 branch frmt_light_common 
+
+frmt_light_darken_v2:
+7aa4 7044aa28 jam 0x28 ,mem_ble_v2_para + 1 
+7aa5 20207aa8 branch frmt_light_common 
+
+frmt_light_lighten_v2:
+7aa6 7044aa14 jam 0x14 ,mem_ble_v2_para + 1 
+7aa7 20207aa8 branch frmt_light_common 
+
+frmt_light_common:
+7aa8 58000021 setarg light_cmd_light_ctl_v2 
+7aa9 67e144a7 store 2 ,mem_ble_v2_cmd 
+7aaa 20207aab branch frmt_ble_v2_encoder_pack 
+
+frmt_ble_v2_encoder_pack:
+7aab 20407f72 call frmt_ble_data_set 
+7aac 6fe0c6aa fetch 1 ,mem_light_manufacture_id2_v2 
+7aad 245a7aaf ncall frmt_have_id2_v2 ,blank 
+7aae 20600000 rtn 
+
+frmt_have_id2_v2:
+7aaf df200027 arg ftd_pdu_len ,loopcnt 
+7ab0 d8c04477 arg mem_ble_v2_pdu ,contr 
+7ab1 d8a046d2 arg mem_ble_v2_pdu_2 ,contw 
+7ab2 2040753b call memcpy_fast 
+7ab3 6fe0c6aa fetch 1 ,mem_light_manufacture_id2_v2 
+7ab4 67e0c49e store 1 ,mem_ble_v2_customer_id 
+7ab5 6fe0c49f fetch 1 ,mem_ble_v2_packet_num 
+7ab6 1fe0ffff pincrease -1 
+7ab7 67e0c49f store 1 ,mem_ble_v2_packet_num 
+7ab8 20407f72 call frmt_ble_data_set 
+7ab9 6fe0c76b fetch 1 ,mem_ble_v2_customer_id_copy 
+7aba 67e0c49e store 1 ,mem_ble_v2_customer_id 
+7abb 20600000 rtn 
+
+frmt_light_night_light_v2:
+7abc 58000023 setarg light_cmd_night_light_v2 
+7abd 20207abf branch frmt_ble_v2_encoder_with_cmd_store_and_para_set0 
+
+frmt_light_master_pairing_v2:
+7abe 58000028 setarg cmd_pairing 
+
+frmt_ble_v2_encoder_with_cmd_store_and_para_set0:
+7abf 67e144a7 store 2 ,mem_ble_v2_cmd 
+7ac0 58000000 setarg 0 
+7ac1 67e244a9 store 4 ,mem_ble_v2_para 
+7ac2 20207aab branch frmt_ble_v2_encoder_pack 
+
+frmt_light_clear_code_v2:
+7ac3 58000045 setarg cmd_clear_code 
+7ac4 20207abf branch frmt_ble_v2_encoder_with_cmd_store_and_para_set0 
+
+frmt_light_master_on_v2:
+7ac5 7044a600 jam 0 ,mem_ble_v2_group_index 
+
+frmt_light_turn_on_common:
+7ac6 58000010 setarg light_cmd_turn_on_v2 
+7ac7 20207abf branch frmt_ble_v2_encoder_with_cmd_store_and_para_set0 
+
+frmt_light_master_off_v2:
+7ac8 7044a600 jam 0 ,mem_ble_v2_group_index 
+
+frmt_light_turn_off_common:
+7ac9 58000011 setarg light_cmd_turn_off_v2 
+7aca 20207abf branch frmt_ble_v2_encoder_with_cmd_store_and_para_set0 
+
+frmt_light_on_and_off_1opcode_v2:
+7acb 58000009 setarg light_cmd_turn_on_and_off_v2 
+7acc 20207abf branch frmt_ble_v2_encoder_with_cmd_store_and_para_set0 
+
+frmt_light_color_switch_wy_v2:
+7acd 58000021 setarg light_cmd_light_ctl_v2 
+7ace 67e144a7 store 2 ,mem_ble_v2_cmd 
+7acf 7044a900 jam 0 ,mem_ble_v2_para 
+7ad0 7044aa40 jam light_cmd_ftd_color_swtich_reserved ,mem_ble_v2_para + 1 
+7ad1 7044abff jam light_data_part_ff ,mem_ble_v2_para + 2 
+7ad2 7044acff jam light_data_part_ff ,mem_ble_v2_para + 3 
+7ad3 20207aab branch frmt_ble_v2_encoder_pack 
+
+frmt_light_color_switch_w_v2:
+7ad4 58000021 setarg light_cmd_light_ctl_v2 
+7ad5 67e144a7 store 2 ,mem_ble_v2_cmd 
+7ad6 7044a900 jam 0 ,mem_ble_v2_para 
+7ad7 7044aa40 jam light_cmd_ftd_color_swtich_reserved ,mem_ble_v2_para + 1 
+7ad8 7044abff jam light_data_part_ff ,mem_ble_v2_para + 2 
+7ad9 20207aab branch frmt_ble_v2_encoder_pack 
+
+frmt_light_color_switch_y_v2:
+7ada 58000021 setarg light_cmd_light_ctl_v2 
+7adb 67e144a7 store 2 ,mem_ble_v2_cmd 
+7adc 7044a900 jam 0 ,mem_ble_v2_para 
+7add 7044aa40 jam light_cmd_ftd_color_swtich_reserved ,mem_ble_v2_para + 1 
+7ade 7044acff jam light_data_part_ff ,mem_ble_v2_para + 3 
+7adf 20207aab branch frmt_ble_v2_encoder_pack 
+
+frmt_light_aid_turn_off_v2:
+7ae0 58000013 setarg light_cmd_aided_light_turn_off_v2 
+7ae1 20207abf branch frmt_ble_v2_encoder_with_cmd_store_and_para_set0 
+
+frmt_light_aid_turn_on_v2:
+7ae2 58000012 setarg light_cmd_aided_light_turn_on_v2 
+7ae3 20207abf branch frmt_ble_v2_encoder_with_cmd_store_and_para_set0 
+
+frmt_light_pcnt_100_percent_v2:
+7ae4 58000021 setarg light_cmd_light_ctl_v2 
+7ae5 67e144a7 store 2 ,mem_ble_v2_cmd 
+7ae6 7044a900 jam 0 ,mem_ble_v2_para 
+7ae7 7044aa02 jam 0x02 ,mem_ble_v2_para + 1 
+7ae8 7044abff jam light_data_part_ff ,mem_ble_v2_para + 2 
+7ae9 7044acff jam light_data_part_ff ,mem_ble_v2_para + 3 
+7aea 20207aab branch frmt_ble_v2_encoder_pack 
+
+frmt_light_pcnt_50_percent_v2:
+7aeb 58000021 setarg light_cmd_light_ctl_v2 
+7aec 67e144a7 store 2 ,mem_ble_v2_cmd 
+7aed 7044a900 jam 0 ,mem_ble_v2_para 
+7aee 7044aa01 jam 0x01 ,mem_ble_v2_para + 1 
+7aef 7044ab7f jam light_ftd_data_part_pcnt_50percent ,mem_ble_v2_para + 2 
+7af0 7044ac7f jam light_ftd_data_part_pcnt_50percent ,mem_ble_v2_para + 3 
+7af1 20207aab branch frmt_ble_v2_encoder_pack 
+
+frmt_light_rgb_circulation_1f_v2:
+7af2 5800001f setarg light_cmd_rgb_auto_turn_off_v2 
+7af3 20207abf branch frmt_ble_v2_encoder_with_cmd_store_and_para_set0 
+
+frmt_light_rgb_circulation_1e_v2:
+7af4 5800001e setarg light_cmd_rgb_auto_turn_on_v2 
+7af5 20207abf branch frmt_ble_v2_encoder_with_cmd_store_and_para_set0 
+
+frmt_light_rgb_manual0_v2:
+7af6 58000022 setarg light_cmd_rgb_manual_v2 
+7af7 67e144a7 store 2 ,mem_ble_v2_cmd 
+7af8 7044aaff jam light_data_part_ff ,mem_ble_v2_para + 1 
+7af9 20207aab branch frmt_ble_v2_encoder_pack 
+
+frmt_light_rgb_manual1_v2:
+7afa 58000022 setarg light_cmd_rgb_manual_v2 
+7afb 67e144a7 store 2 ,mem_ble_v2_cmd 
+7afc 7044abff jam light_data_part_ff ,mem_ble_v2_para + 2 
+7afd 20207aab branch frmt_ble_v2_encoder_pack 
+
+frmt_light_rgb_manual2_v2:
+7afe 58000022 setarg light_cmd_rgb_manual_v2 
+7aff 67e144a7 store 2 ,mem_ble_v2_cmd 
+7b00 7044acff jam light_data_part_ff ,mem_ble_v2_para + 3 
+7b01 20207aab branch frmt_ble_v2_encoder_pack 
+
+frmt_light_rgb_manual3_v2:
+7b02 58000022 setarg light_cmd_rgb_manual_v2 
+7b03 67e144a7 store 2 ,mem_ble_v2_cmd 
+7b04 7044aaff jam light_data_part_ff ,mem_ble_v2_para + 1 
+7b05 7044abff jam light_data_part_ff ,mem_ble_v2_para + 2 
+7b06 20207aab branch frmt_ble_v2_encoder_pack 
+
+frmt_light_rgb_manual4_v2:
+7b07 58000022 setarg light_cmd_rgb_manual_v2 
+7b08 67e144a7 store 2 ,mem_ble_v2_cmd 
+7b09 7044aaff jam light_data_part_ff ,mem_ble_v2_para + 1 
+7b0a 7044acff jam light_data_part_ff ,mem_ble_v2_para + 3 
+7b0b 20207aab branch frmt_ble_v2_encoder_pack 
+
+frmt_light_rgb_manual5_v2:
+7b0c 58000022 setarg light_cmd_rgb_manual_v2 
+7b0d 67e144a7 store 2 ,mem_ble_v2_cmd 
+7b0e 7044abff jam light_data_part_ff ,mem_ble_v2_para + 2 
+7b0f 7044acff jam light_data_part_ff ,mem_ble_v2_para + 3 
+7b10 20207aab branch frmt_ble_v2_encoder_pack 
+
+frmt_light_rgb_manual6_v2:
+7b11 58000022 setarg light_cmd_rgb_manual_v2 
+7b12 67e144a7 store 2 ,mem_ble_v2_cmd 
+7b13 7044aaff jam light_data_part_ff ,mem_ble_v2_para + 1 
+7b14 7044abff jam light_data_part_ff ,mem_ble_v2_para + 2 
+7b15 7044acff jam light_data_part_ff ,mem_ble_v2_para + 3 
+7b16 20207aab branch frmt_ble_v2_encoder_pack 
+
+frmt_light_timing_1min_v2:
+7b17 58000001 setarg 0x01 
+
+frmt_light_timing_off_common_v2:
+7b18 7044a101 jam product_maintype_light ,mem_ble_v2_maintype 
+7b19 67e144aa store 2 ,mem_ble_v2_para + 1 
+7b1a 58000041 setarg cmd_timing_off 
+7b1b 67e144a7 store 2 ,mem_ble_v2_cmd 
+7b1c 7044a900 jam 0 ,mem_ble_v2_para 
+7b1d 7044ac00 jam 0 ,mem_ble_v2_para + 3 
+7b1e 20207aab branch frmt_ble_v2_encoder_pack 
+
+frmt_light_timing_30s_v2:
+7b1f 58000000 setarg 0 
+7b20 20207b18 branch frmt_light_timing_off_common_v2 
+
+frmt_light_group1_on_v2:
+7b21 7044a601 jam 1 ,mem_ble_v2_group_index 
+7b22 20207ac6 branch frmt_light_turn_on_common 
+
+frmt_light_group2_on_v2:
+7b23 7044a602 jam 2 ,mem_ble_v2_group_index 
+7b24 20207ac6 branch frmt_light_turn_on_common 
+
+frmt_light_group3_on_v2:
+7b25 7044a603 jam 3 ,mem_ble_v2_group_index 
+7b26 20207ac6 branch frmt_light_turn_on_common 
+
+frmt_light_group4_on_v2:
+7b27 7044a604 jam 4 ,mem_ble_v2_group_index 
+7b28 20207ac6 branch frmt_light_turn_on_common 
+
+frmt_light_group1_off_v2:
+7b29 7044a601 jam 1 ,mem_ble_v2_group_index 
+7b2a 20207ac9 branch frmt_light_turn_off_common 
+
+frmt_light_group2_off_v2:
+7b2b 7044a602 jam 2 ,mem_ble_v2_group_index 
+7b2c 20207ac9 branch frmt_light_turn_off_common 
+
+frmt_light_group3_off_v2:
+7b2d 7044a603 jam 3 ,mem_ble_v2_group_index 
+7b2e 20207ac9 branch frmt_light_turn_off_common 
+
+frmt_light_group4_off_v2:
+7b2f 7044a604 jam 4 ,mem_ble_v2_group_index 
+7b30 20207ac9 branch frmt_light_turn_off_common 
+
+frmt_apl_idle_process:
+7b31 20600000 rtn 
+
+frmt_main:
+7b32 4734402d bpatchx patch2d_0 ,mem_patch2d 
+7b33 2040784c call frmt_kscan_init 
+7b34 20407862 call frmt_kscan 
+7b35 6fe44551 fetch 8 ,mem_kscan_record_keypress 
+7b36 245a7b6c ncall frmt_kscan_available ,blank 
+7b37 20407b5f call frmt_judge_reset_last_key 
+7b38 6fe0c701 fetch 1 ,mem_light_release_adv_flag 
+7b39 245a7b53 ncall p_light_released_cb ,blank 
+7b3a 20407b43 call frmt_kscan_keypress_analysis_process 
+7b3b 6fe0c35b fetch 1 ,mem_le_adv_enable 
+7b3c 205a7b72 call frmt_light_indicator_led_flag_set0 ,blank 
+7b3d 6fe0c6a3 fetch 1 ,mem_indicator_turn_on_enable 
+7b3e 245a7b7a ncall frmt_light_indicator_led ,blank 
+7b3f 6fe0c6a3 fetch 1 ,mem_indicator_turn_on_enable 
+7b40 205a7b7f call frmt_light_indicator_led_off ,blank 
+7b41 4734c02d bpatchx patch2d_1 ,mem_patch2d 
+7b42 20207b85 branch frmt_app_enter_lpm 
+
+frmt_kscan_keypress_analysis_process:
+7b43 4735402d bpatchx patch2d_2 ,mem_patch2d 
+7b44 6fe0c71c fetch 1 ,mem_special_agreemeet_enable 
+7b45 1fe67c01 sub pdata ,1 ,null 
+7b46 2042f67c call frmt_light_gem_long_press_cnt ,zero 
+7b47 6fe14572 fetch 2 ,mem_long_press_adv_timeout 
+7b48 247a0000 nrtn blank 
+7b49 6fe44551 fetch 8 ,mem_kscan_record_keypress 
+7b4a 207a0000 rtn blank 
+7b4b 58000000 setarg 0 
+7b4c 67e1c582 store 3 ,mem_ftd_adv_raw_data 
+7b4d 67e244a9 store 4 ,mem_ble_v2_para 
+7b4e 70458600 jam 0 ,mem_ftd_adv_raw_reserved 
+7b4f 6fe0c701 fetch 1 ,mem_light_release_adv_flag 
+7b50 245a7b53 ncall p_light_released_cb ,blank 
+7b51 6fe1475d fetch 2 ,mem_rmt_keydown_cb 
+7b52 202075e6 branch callback_func 
+
+p_light_released_cb:
+7b53 6fe1475f fetch 2 ,mem_rmt_released_cb 
+7b54 202075e6 branch callback_func 
+
+frmt_get_current_key:
+7b55 6fe44551 fetch 8 ,mem_kscan_record_keypress 
+7b56 1fe20400 copy pdata ,temp 
+7b57 df200019 arg keyboard_max_keys_num ,loopcnt 
+7b58 d8e00000 arg 0 ,queue 
+7b59 20407b67 call frmt_kscan_keypress_analysis_get_keypress 
+7b5a 18e27e00 deposit queue 
+7b5b 67e0c59c store 1 ,mem_light_current_key 
+7b5c 58000000 setarg 0 
+7b5d 67e44551 store 8 ,mem_kscan_record_keypress 
+7b5e 20207d2f branch frmt_light_set_continuous_kps_cnt_reset_timeout 
+
+frmt_judge_reset_last_key:
+7b5f 6fe0c56d fetch 1 ,mem_keypress_analysis_flag 
+7b60 247a0000 nrtn blank 
+7b61 70457d00 jam 0 ,mem_light_last_key 
+7b62 70471f00 jam 0 ,mem_light_color_and_lgtness_long_press_adv_enable 
+
+frmt_light_long_press_judge_reset:
+7b63 58000000 setarg 0 
+7b64 67e1458f store 2 ,mem_long_press_timeout 
+7b65 67e144df store 2 ,mem_gem_cnt_inces_timeout 
+7b66 20600000 rtn 
+
+frmt_kscan_keypress_analysis_get_keypress:
+7b67 afefffff qisolate1 pdata 
+7b68 20608000 rtn true 
+7b69 18e08e01 increase 1 ,queue 
+7b6a c2007b67 loop frmt_kscan_keypress_analysis_get_keypress 
+7b6b 20600000 rtn 
+
+frmt_kscan_available:
+7b6c 70456d01 jam 1 ,mem_keypress_analysis_flag 
+7b6d 7046a301 jam 1 ,mem_indicator_turn_on_enable 
+7b6e 58000001 setarg key_press_led_on_time 
+7b6f 67e146a4 store 2 ,mem_indicator_led_turn_on_timeout 
+7b70 70457401 jam kscan_analysis_interval ,mem_kscan_analysis_interval_timeout 
+7b71 20600000 rtn 
+
+frmt_light_indicator_led_flag_set0:
+7b72 4735c02d bpatchx patch2d_3 ,mem_patch2d 
+7b73 6fe0c56d fetch 1 ,mem_keypress_analysis_flag 
+7b74 247a0000 nrtn blank 
+
+frmt_light_indicator_led_flag_set0_process:
+7b75 58000000 setarg 0 
+7b76 67e146a4 store 2 ,mem_indicator_led_turn_on_timeout 
+7b77 7046a300 jam 0 ,mem_indicator_turn_on_enable 
+7b78 4736402d bpatchx patch2d_4 ,mem_patch2d 
+7b79 20600000 rtn 
+
+frmt_light_indicator_led:
+7b7a 4736c02d bpatchx patch2d_5 ,mem_patch2d 
+7b7b 6fe0c57b fetch 1 ,mem_light_indicator_led 
+7b7c 207a0000 rtn blank 
+
+frmt_light_indicator_led_debug:
+7b7d 6848c57b fetcht 1 ,mem_light_indicator_led 
+7b7e 202078b7 branch gpio_config_output_patch 
+
+frmt_light_indicator_led_off:
+7b7f 4737402d bpatchx patch2d_6 ,mem_patch2d 
+7b80 6fe0c57b fetch 1 ,mem_light_indicator_led 
+7b81 207a0000 rtn blank 
+
+frmt_light_indicator_led_off_debug:
+7b82 6848c57b fetcht 1 ,mem_light_indicator_led 
+7b83 18418480 or temp ,0x80 ,temp 
+7b84 202078b7 branch gpio_config_output_patch 
+
+frmt_app_enter_lpm:
+7b85 4737c02d bpatchx patch2d_7 ,mem_patch2d 
+7b86 6fe146a1 fetch 2 ,mem_light_lpm_enable_timeout 
+7b87 247a0000 nrtn blank 
+7b88 6fe146a4 fetch 2 ,mem_indicator_led_turn_on_timeout 
+7b89 247a0000 nrtn blank 
+7b8a 20407b8f call frmt_enter_lpm_gpio_config 
+7b8b 20407b9f call frmt_wakeup_low_config 
+7b8c 4738402e bpatchx patch2e_0 ,mem_patch2e 
+7b8d d85fffff arg -1 ,temp 
+7b8e 20203b7a branch lpm_sleep 
+
+frmt_enter_lpm_gpio_config:
+7b8f df200010 arg enter_lpm_leisure_io_config_num ,loopcnt 
+7b90 70473703 jam enter_lpm_leisure_io_config_start ,mem_light_lpm_gpio_config_io_temp 
+
+frmt_drop_down_unused_io_loopcnt:
+7b91 6848c737 fetcht 1 ,mem_light_lpm_gpio_config_io_temp 
+7b92 18420e00 copy temp ,queue 
+7b93 6fe24733 fetch 4 ,mem_light_lpm_gpio_config_flag 
+7b94 afefffff qisolate1 pdata 
+7b95 2020fb98 branch frmt_drop_down_unused_io_loopcnt_no_drop_down ,true 
+7b96 18418480 or temp ,0x80 ,temp 
+7b97 20406c29 call gpio_config_input 
+
+frmt_drop_down_unused_io_loopcnt_no_drop_down:
+7b98 6fe0c737 fetch 1 ,mem_light_lpm_gpio_config_io_temp 
+7b99 1fe0fe01 pincrease 1 
+7b9a 67e0c737 store 1 ,mem_light_lpm_gpio_config_io_temp 
+7b9b c2007b91 loop frmt_drop_down_unused_io_loopcnt 
+7b9c 70807340 jam gpcfg_pullup ,core_gpio03_conf 
+7b9d 70808340 jam gpcfg_pullup ,core_gpio19_conf 
+7b9e 20600000 rtn 
+
+frmt_wakeup_low_config:
+7b9f 6848c559 fetcht 1 ,mem_kscan_row_nums 
+7ba0 18422200 copy temp ,rega 
+7ba1 da400000 arg 0 ,regb 
+7ba2 d8400000 arg 0 ,temp 
+7ba3 604c0016 storet 8 ,mem_gpio_wakeup_low 
+7ba4 d8c0455b arg mem_kscan_row_gpio_pin ,contr 
+7ba5 20407ba9 call frmt_wakeup_low_config_loop 
+7ba6 79200403 set1 3 ,temp 
+7ba7 604a0016 storet 4 ,mem_gpio_wakeup_low 
+7ba8 20600000 rtn 
+
+frmt_wakeup_low_config_loop:
+7ba9 efe08006 ifetch 1 ,contr 
+7baa 98000e00 iforce queue 
+7bab f9200400 qset1 temp 
+7bac 1a40a401 increase 1 ,regb 
+7bad 1a227e00 deposit rega 
+7bae 9a467c00 isub regb ,null 
+7baf 20628000 rtn zero 
+7bb0 20207ba9 branch frmt_wakeup_low_config_loop 
+
+frmt_le_send_adv_ind:
+7bb1 4738c02e bpatchx patch2e_1 ,mem_patch2e 
+7bb2 6fe0c71c fetch 1 ,mem_special_agreemeet_enable 
+7bb3 c0017bf7 beq 2 ,key_le_send_adv_ind 
+7bb4 6fe0c49e fetch 1 ,mem_ble_v2_customer_id 
+7bb5 243a7bdc nbranch frmt_send_id1_v2 ,blank 
+
+frmt_judge_send_id1_v1:
+7bb6 6fe0c71c fetch 1 ,mem_special_agreemeet_enable 
+7bb7 c000fbe1 beq 1 ,frmt_send_id1_v1 
+7bb8 6fe0c57a fetch 1 ,mem_light_manufacture_id 
+7bb9 243a7be1 nbranch frmt_send_id1_v1 ,blank 
+
+frmt_judge_send_id2_v1:
+7bba 6fe0c6a9 fetch 1 ,mem_light_manufacture_id2 
+7bbb 243a7be8 nbranch frmt_send_id2_v1 ,blank 
+
+frmt_judge_send_id2_v2:
+7bbc 6fe0c6aa fetch 1 ,mem_light_manufacture_id2_v2 
+7bbd 243a7bed nbranch frmt_send_id2_v2 ,blank 
+
+frmt_id_flag_set0:
+7bbe 58000000 setarg 0 
+7bbf 67e0c6fc store 1 ,mem_adv_manufacturer_switch_flag 
+7bc0 67e0c6fd store 1 ,mem_adv_manufacturer_switch_flag1 
+7bc1 67e0c6fe store 1 ,mem_adv_manufacturer_switch_flag2 
+7bc2 67e0c6ff store 1 ,mem_adv_manufacturer_switch_flag3 
+7bc3 20600000 rtn 
+
+frmt_le_send_adv_ind_pdu1:
+7bc4 4739402e bpatchx patch2e_2 ,mem_patch2e 
+7bc5 df200027 arg ftd_pdu_len ,loopcnt 
+7bc6 d8a04129 arg mem_le_txheader ,contw 
+7bc7 d8c0464a arg mem_light_whitening_buffer ,contr 
+7bc8 2040753b call memcpy_fast 
+7bc9 202042e9 branch le_send_adv_transmit 
+
+frmt_le_send_adv_ind_v2:
+7bca 4739c02e bpatchx patch2e_3 ,mem_patch2e 
+7bcb df200027 arg ftd_pdu_len ,loopcnt 
+7bcc d8a04129 arg mem_le_txheader ,contw 
+7bcd d8c04477 arg mem_ble_v2_pdu ,contr 
+7bce 2040753b call memcpy_fast 
+7bcf 202042e9 branch le_send_adv_transmit 
+
+frmt_le_send_adv_ind_pdu2:
+7bd0 473a402e bpatchx patch2e_4 ,mem_patch2e 
+7bd1 df200027 arg ftd_pdu_len ,loopcnt 
+7bd2 d8a04129 arg mem_le_txheader ,contw 
+7bd3 d8c046ab arg mem_light_whitening_buffer_2 ,contr 
+7bd4 2040753b call memcpy_fast 
+7bd5 202042e9 branch le_send_adv_transmit 
+
+frmt_le_send_adv_ind_v2_2:
+7bd6 473ac02e bpatchx patch2e_5 ,mem_patch2e 
+7bd7 df200027 arg ftd_pdu_len ,loopcnt 
+7bd8 d8a04129 arg mem_le_txheader ,contw 
+7bd9 d8c046d2 arg mem_ble_v2_pdu_2 ,contr 
+7bda 2040753b call memcpy_fast 
+7bdb 202042e9 branch le_send_adv_transmit 
+
+frmt_send_id1_v2:
+7bdc 6fe0c6fc fetch 1 ,mem_adv_manufacturer_switch_flag 
+7bdd c001fbb6 beq 3 ,frmt_judge_send_id1_v1 
+7bde 1fe0fe01 pincrease 1 
+7bdf 67e0c6fc store 1 ,mem_adv_manufacturer_switch_flag 
+7be0 20207bca branch frmt_le_send_adv_ind_v2 
+
+frmt_send_id1_v1:
+7be1 6fe0c6fd fetch 1 ,mem_adv_manufacturer_switch_flag1 
+7be2 c001fbba beq 3 ,frmt_judge_send_id2_v1 
+7be3 1fe0fe01 pincrease 1 
+7be4 67e0c6fd store 1 ,mem_adv_manufacturer_switch_flag1 
+7be5 6fe0c71c fetch 1 ,mem_special_agreemeet_enable 
+7be6 c000fbf2 beq 1 ,gem_le_send_adv_ind 
+7be7 20207bc4 branch frmt_le_send_adv_ind_pdu1 
+
+frmt_send_id2_v1:
+7be8 6fe0c6fe fetch 1 ,mem_adv_manufacturer_switch_flag2 
+7be9 c001fbbc beq 3 ,frmt_judge_send_id2_v2 
+7bea 1fe0fe01 pincrease 1 
+7beb 67e0c6fe store 1 ,mem_adv_manufacturer_switch_flag2 
+7bec 20207bd0 branch frmt_le_send_adv_ind_pdu2 
+
+frmt_send_id2_v2:
+7bed 6fe0c6ff fetch 1 ,mem_adv_manufacturer_switch_flag3 
+7bee c001fbbe beq 3 ,frmt_id_flag_set0 
+7bef 1fe0fe01 pincrease 1 
+7bf0 67e0c6ff store 1 ,mem_adv_manufacturer_switch_flag3 
+7bf1 20207bd6 branch frmt_le_send_adv_ind_v2_2 
+
+gem_le_send_adv_ind:
+7bf2 df200017 arg gem_pdu_len ,loopcnt 
+7bf3 d8a04129 arg mem_le_txheader ,contw 
+7bf4 d8c0464a arg mem_light_whitening_buffer ,contr 
+7bf5 2040753b call memcpy_fast 
+7bf6 202042e9 branch le_send_adv_transmit 
+
+key_le_send_adv_ind:
+7bf7 6fe0c550 fetch 1 ,mem_adv_cnts 
+7bf8 1fe0fe01 pincrease 1 
+7bf9 67e0c550 store 1 ,mem_adv_cnts 
+7bfa 1fe67c03 sub pdata ,3 ,null 
+7bfb 20217bca branch frmt_le_send_adv_ind_v2 ,positive 
+7bfc 1fe67c06 sub pdata ,6 ,null 
+7bfd 20217c03 branch key_le_send_adv_ind_ky1 ,positive 
+7bfe 1fe67c09 sub pdata ,9 ,null 
+7bff 20217c08 branch key_le_send_adv_ind_ky ,positive 
+7c00 58000000 setarg 0 
+7c01 67e0c550 store 1 ,mem_adv_cnts 
+7c02 20207bca branch frmt_le_send_adv_ind_v2 
+
+key_le_send_adv_ind_ky1:
+7c03 df200025 arg key_pdu_len ,loopcnt 
+7c04 d8a04129 arg mem_le_txheader ,contw 
+7c05 d8c0452b arg mem_light_jym_tx_temp ,contr 
+7c06 2040753b call memcpy_fast 
+7c07 202042e9 branch le_send_adv_transmit 
+
+key_le_send_adv_ind_ky:
+7c08 df200025 arg key_pdu_len ,loopcnt 
+7c09 d8a04129 arg mem_le_txheader ,contw 
+7c0a d8c0464a arg mem_light_whitening_buffer ,contr 
+7c0b 2040753b call memcpy_fast 
+7c0c 202042e9 branch le_send_adv_transmit 
+
+frmt_le_next_adv_channel:
+7c0d 6fe0c71a fetch 1 ,mem_channel_num 
+7c0e 205a7c19 call frmt_channel_num_init ,blank 
+7c0f 6fe0c71a fetch 1 ,mem_channel_num 
+7c10 2feffe00 isolate1 0 ,pdata 
+7c11 2020fc1c branch frmt_le_next_adv_channel_37 ,true 
+7c12 6fe0c71a fetch 1 ,mem_channel_num 
+7c13 2feffe01 isolate1 1 ,pdata 
+7c14 2020fc24 branch frmt_le_next_adv_channel_38 ,true 
+7c15 6fe0c71a fetch 1 ,mem_channel_num 
+7c16 2feffe02 isolate1 2 ,pdata 
+7c17 2020fc2c branch frmt_le_next_adv_channel_39 ,true 
+7c18 20600000 rtn 
+
+frmt_channel_num_init:
+7c19 6fe0c719 fetch 1 ,mem_channel_enable 
+7c1a 67e0c71a store 1 ,mem_channel_num 
+7c1b 20600000 rtn 
+
+frmt_le_next_adv_channel_37:
+7c1c 6fe0c71a fetch 1 ,mem_channel_num 
+7c1d 793ffe00 set0 0 ,pdata 
+7c1e 67e0c71a store 1 ,mem_channel_num 
+7c1f 6848c366 fetcht 1 ,mem_le_adv_channel_map 
+7c20 79200400 set1 bit_adv_channel_map_37 ,temp 
+7c21 6048c366 storet 1 ,mem_le_adv_channel_map 
+7c22 70000725 jam 37 ,mem_le_ch_mapped 
+7c23 2020433c branch le_next_adv_channel + 1 
+
+frmt_le_next_adv_channel_38:
+7c24 6fe0c71a fetch 1 ,mem_channel_num 
+7c25 793ffe01 set0 1 ,pdata 
+7c26 67e0c71a store 1 ,mem_channel_num 
+7c27 6848c366 fetcht 1 ,mem_le_adv_channel_map 
+7c28 79200401 set1 bit_adv_channel_map_38 ,temp 
+7c29 6048c366 storet 1 ,mem_le_adv_channel_map 
+7c2a 70000726 jam 38 ,mem_le_ch_mapped 
+7c2b 2020433c branch le_next_adv_channel + 1 
+
+frmt_le_next_adv_channel_39:
+7c2c 6fe0c71a fetch 1 ,mem_channel_num 
+7c2d 793ffe02 set0 2 ,pdata 
+7c2e 67e0c71a store 1 ,mem_channel_num 
+7c2f 6848c366 fetcht 1 ,mem_le_adv_channel_map 
+7c30 79200402 set1 bit_adv_channel_map_39 ,temp 
+7c31 6048c366 storet 1 ,mem_le_adv_channel_map 
+7c32 70000727 jam 39 ,mem_le_ch_mapped 
+7c33 2020433c branch le_next_adv_channel + 1 
+
+frmt_adv_rear_6bytes_and_whitening_and_set_pdu_common_short_press:
+7c34 20407c36 call frmt_light_set_pdu_common_short_press 
+7c35 20207c57 branch frmt_adv_rear_6bytes_and_whitening 
+
+frmt_light_set_pdu_common_short_press:
+7c36 20407c45 call frmt_light_flag_set_short_press 
+
+frmt_light_set_pdu_packet_num_and_addr:
+7c37 6fe0c585 fetch 1 ,mem_ftd_adv_raw_packet_num 
+7c38 1fe0fe01 pincrease 1 
+7c39 67e0c585 store 1 ,mem_ftd_adv_raw_packet_num 
+7c3a 6fe0c4a1 fetch 1 ,mem_ble_v2_maintype 
+7c3b 1fe67c03 sub pdata ,3 ,null 
+7c3c 2042fc41 call frmt_fan_lamp ,zero 
+7c3d 6fe0c4a1 fetch 1 ,mem_ble_v2_maintype 
+7c3e 1fe67c05 sub pdata ,5 ,null 
+7c3f 2042fc43 call frmt_solar_lamp ,zero 
+7c40 20207c4e branch frmt_light_groups_address_set 
+
+frmt_fan_lamp:
+7c41 70458483 jam 0x83 ,mem_ftd_adv_raw_data + 2 
+7c42 20600000 rtn 
+
+frmt_solar_lamp:
+7c43 70458488 jam 0x88 ,mem_ftd_adv_raw_data + 2 
+7c44 20600000 rtn 
+
+frmt_light_flag_set_short_press:
+7c45 473b402e bpatchx patch2e_6 ,mem_patch2e 
+7c46 70435b01 jam 1 ,mem_le_adv_enable 
+7c47 7046a401 jam key_press_led_on_time ,mem_indicator_led_turn_on_timeout 
+7c48 7046a301 jam 1 ,mem_indicator_turn_on_enable 
+7c49 6fe14767 fetch 2 ,mem_light_adv_time 
+7c4a 67e1459d store 2 ,mem_ble_light_adv_timeout 
+7c4b 1fe0fe01 pincrease 1 
+7c4c 67e146a1 store 2 ,mem_light_lpm_enable_timeout 
+7c4d 20600000 rtn 
+
+frmt_light_groups_address_set:
+7c4e 6fe0c577 fetch 1 ,mem_ftd_adv_raw_device_add_temp + 1 
+7c4f d84000f0 arg 0xf0 ,temp 
+7c50 98417e00 iand temp ,pdata 
+7c51 6848c57c fetcht 1 ,mem_groups_num 
+7c52 9840fe00 iadd temp ,pdata 
+7c53 67e0c577 store 1 ,mem_ftd_adv_raw_device_add_temp + 1 
+7c54 6fe14576 fetch 2 ,mem_ftd_adv_raw_device_add_temp 
+7c55 67e14580 store 2 ,mem_ftd_adv_raw_device_add 
+7c56 20600000 rtn 
+
+frmt_adv_rear_6bytes_and_whitening:
+7c57 6fe0c57a fetch 1 ,mem_light_manufacture_id 
+7c58 245a7c6f ncall frmt_adv_rear_6bytes_and_whitening_pdu2 ,blank 
+7c59 6fe0c57f fetch 1 ,mem_ftd_adv_raw 
+7c5a 1fe67c28 sub pdata ,light_cmd_pairing_code ,null 
+7c5b 2042fc6c call frmt_light_pdu1_manufacturer_id_set ,zero 
+7c5c 20407c88 call frmt_adv_rear_6bytes 
+7c5d d8a0463a arg mem_adv_packet_payload ,contw 
+7c5e d8c0457f arg mem_ftd_adv_raw ,contr 
+7c5f df20000e arg 14 ,loopcnt 
+7c60 2040753b call memcpy_fast 
+7c61 df200027 arg ftd_pdu_len ,loopcnt 
+7c62 d8c04623 arg mem_adv_packet ,contr 
+7c63 d8a0464a arg mem_light_whitening_buffer ,contw 
+7c64 2040753b call memcpy_fast 
+7c65 70467527 jam ftd_pdu_len ,mem_light_recvd_len 
+7c66 70467653 jam 83 ,mem_light_whitening_i 
+7c67 20407cdb call frmt_light_reverse_and_ble_whitening 
+7c68 6fe0c57a fetch 1 ,mem_light_manufacture_id 
+7c69 67e0c654 store 1 ,mem_light_whitening_buffer + 10 
+7c6a 473bc02e bpatchx patch2e_7 ,mem_patch2e 
+7c6b 20600000 rtn 
+
+frmt_light_pdu1_manufacturer_id_set:
+7c6c 6fe0c57a fetch 1 ,mem_light_manufacture_id 
+7c6d 67e0c586 store 1 ,mem_ftd_adv_raw_reserved 
+7c6e 20600000 rtn 
+
+frmt_adv_rear_6bytes_and_whitening_pdu2:
+7c6f 6fe0c57f fetch 1 ,mem_ftd_adv_raw 
+7c70 1fe67c28 sub pdata ,light_cmd_pairing_code ,null 
+7c71 2042fc85 call frmt_light_pdu2_manufacturer_id_set ,zero 
+7c72 20407c88 call frmt_adv_rear_6bytes 
+7c73 d8a0463a arg mem_adv_packet_payload ,contw 
+7c74 d8c0457f arg mem_ftd_adv_raw ,contr 
+7c75 df20000e arg 14 ,loopcnt 
+7c76 2040753b call memcpy_fast 
+7c77 df200027 arg ftd_pdu_len ,loopcnt 
+7c78 d8c04623 arg mem_adv_packet ,contr 
+7c79 d8a0464a arg mem_light_whitening_buffer ,contw 
+7c7a 2040753b call memcpy_fast 
+7c7b 70467527 jam ftd_pdu_len ,mem_light_recvd_len 
+7c7c 70467653 jam 83 ,mem_light_whitening_i 
+7c7d 20407cdb call frmt_light_reverse_and_ble_whitening 
+7c7e df200027 arg ftd_pdu_len ,loopcnt 
+7c7f d8c0464a arg mem_light_whitening_buffer ,contr 
+7c80 d8a046ab arg mem_light_whitening_buffer_2 ,contw 
+7c81 2040753b call memcpy_fast 
+7c82 6fe0c6a9 fetch 1 ,mem_light_manufacture_id2 
+7c83 67e0c6b5 store 1 ,mem_light_whitening_buffer_2 + 10 
+7c84 20600000 rtn 
+
+frmt_light_pdu2_manufacturer_id_set:
+7c85 6fe0c6a9 fetch 1 ,mem_light_manufacture_id2 
+7c86 67e0c586 store 1 ,mem_ftd_adv_raw_reserved 
+7c87 20600000 rtn 
+
+frmt_adv_rear_6bytes:
+7c88 70458701 jam 1 ,mem_ftd_adv_raw + 8 
+7c89 70458800 jam 0 ,mem_ftd_adv_raw + 9 
+7c8a 180a7e00 random pdata 
+7c8b 1fec8400 rshift8 pdata ,temp 
+7c8c 6048c589 storet 1 ,mem_ftd_adv_raw + 10 
+7c8d 67e0c58a store 1 ,mem_ftd_adv_raw + 11 
+7c8e 1fe47e00 invert pdata ,pdata 
+7c8f 67e144c1 store 2 ,mem_adv_crc_false_initvalue 
+7c90 6fe0c58a fetch 1 ,mem_ftd_adv_raw + 11 
+7c91 6848c587 fetcht 1 ,mem_ftd_adv_raw + 8 
+7c92 9842fe00 ixor temp ,pdata 
+7c93 67e0c587 store 1 ,mem_ftd_adv_raw + 8 
+7c94 6848c588 fetcht 1 ,mem_ftd_adv_raw + 9 
+7c95 9842fe00 ixor temp ,pdata 
+7c96 67e0c588 store 1 ,mem_ftd_adv_raw + 9 
+
+frmt_crc16_ccitt_false_ftd:
+7c97 da60457f arg mem_ftd_adv_raw ,regc 
+7c98 df20000c arg 0x0c ,loopcnt 
+7c99 6fe0c71c fetch 1 ,mem_special_agreemeet_enable 
+7c9a 1fe67c02 sub pdata ,2 ,null 
+7c9b 2042fcc1 call key_crc16_ccitt_false1 ,zero 
+7c9c 2442fca5 ncall frmt_crc16_ccitt_false ,zero 
+7c9d 6fe144c1 fetch 2 ,mem_adv_crc_false_initvalue 
+7c9e da20ff00 arg 0xff00 ,rega 
+7c9f 9a210400 iand rega ,temp 
+7ca0 184c8400 rshift8 temp ,temp 
+7ca1 6048c58b storet 1 ,mem_ftd_adv_raw + 12 
+7ca2 6fe0c4c1 fetch 1 ,mem_adv_crc_false_initvalue 
+7ca3 67e0c58c store 1 ,mem_ftd_adv_raw + 13 
+7ca4 20600000 rtn 
+
+frmt_crc16_ccitt_false:
+7ca5 e8408013 ifetcht 1 ,regc 
+7ca6 184d0400 lshift8 temp ,temp 
+7ca7 6fe144c1 fetch 2 ,mem_adv_crc_false_initvalue 
+7ca8 98428400 ixor temp ,temp 
+7ca9 d8e00000 arg 0x0 ,queue 
+7caa 20407caf call frmt_crc16_deal_next_8bits 
+7cab 604944c1 storet 2 ,mem_adv_crc_false_initvalue 
+7cac 1a60a601 increase 1 ,regc 
+7cad c2007ca5 loop frmt_crc16_ccitt_false 
+7cae 20600000 rtn 
+
+frmt_crc16_deal_next_8bits:
+7caf 18427e00 copy temp ,pdata 
+7cb0 1feca200 rshift8 pdata ,rega 
+7cb1 1a31a200 rshift4 rega ,rega 
+7cb2 1a292200 rshift3 rega ,rega 
+7cb3 1fe38400 lshift pdata ,temp 
+7cb4 1a227e00 copy rega ,pdata 
+7cb5 245a7cba ncall frmt_crc16_xor_ploy ,blank 
+7cb6 18e08e01 increase 1 ,queue 
+7cb7 18e27e00 copy queue ,pdata 
+7cb8 c0847caf bne 0x08 ,frmt_crc16_deal_next_8bits 
+7cb9 20600000 rtn 
+
+frmt_crc16_xor_ploy:
+7cba 6fe144c3 fetch 2 ,mem_crc16_polynomial 
+7cbb 1fe22200 copy pdata ,rega 
+7cbc 18427e00 copy temp ,pdata 
+7cbd 9a22fe00 ixor rega ,pdata 
+7cbe da20ffff arg 0xffff ,rega 
+7cbf 9a210400 iand rega ,temp 
+7cc0 20600000 rtn 
+
+key_crc16_ccitt_false1:
+7cc1 6fe144c1 fetch 2 ,mem_adv_crc_false_initvalue 
+
+key_crc16_ccitt_false_loop:
+7cc2 e8408013 ifetcht 1 ,regc 
+7cc3 1a60a601 increase 1 ,regc 
+7cc4 184d8400 reverse temp ,temp 
+7cc5 184d0400 lshift8 temp ,temp 
+7cc6 9842fe00 ixor temp ,pdata 
+
+key_crc16_for_byte:
+7cc7 1f222400 copy loopcnt ,regb 
+7cc8 df200008 arg 8 ,loopcnt 
+
+key_crc16_for_byte_loop:
+7cc9 2feffe0f isolate1 15 ,pdata 
+7cca 1fe3fe00 lshift pdata ,pdata 
+7ccb 2420fcce nbranch key_crc16_for_byte_continue ,true 
+7ccc 684944c3 fetcht 2 ,mem_crc16_polynomial 
+7ccd 9842fe00 ixor temp ,pdata 
+
+key_crc16_for_byte_continue:
+7cce c2007cc9 loop key_crc16_for_byte_loop 
+7ccf 1a427200 copy regb ,loopcnt 
+7cd0 c2007cc2 loop key_crc16_ccitt_false_loop 
+7cd1 67e144c1 store 2 ,mem_adv_crc_false_initvalue 
+7cd2 6848c4c1 fetcht 1 ,mem_adv_crc_false_initvalue 
+7cd3 184d8400 reverse temp ,temp 
+7cd4 6fe0c4c2 fetch 1 ,mem_adv_crc_false_initvalue + 1 
+7cd5 1fedfe00 reverse pdata ,pdata 
+7cd6 6048c4c2 storet 1 ,mem_adv_crc_false_initvalue + 1 
+7cd7 67e0c4c1 store 1 ,mem_adv_crc_false_initvalue 
+7cd8 20600000 rtn 
+
+frmt_light_ble_whitening_and_reverse:
+7cd9 20407ce1 call frmt_light_ble_whitening 
+7cda 20207cdd branch frmt_fml_whitening_buffer_bytes_reverse 
+
+frmt_light_reverse_and_ble_whitening:
+7cdb 20407cdd call frmt_fml_whitening_buffer_bytes_reverse 
+7cdc 20207ce1 branch frmt_light_ble_whitening 
+
+frmt_fml_whitening_buffer_bytes_reverse:
+7cdd d8c0464a arg mem_light_whitening_buffer ,contr 
+7cde d8a0464a arg mem_light_whitening_buffer ,contw 
+7cdf df200027 arg ftd_pdu_len ,loopcnt 
+7ce0 20207ce8 branch frmt_fml_bytes_reverse_loop 
+
+frmt_light_ble_whitening:
+7ce1 df200027 arg ftd_pdu_len ,loopcnt 
+7ce2 da60464a arg mem_light_whitening_buffer ,regc 
+7ce3 da400053 arg 83 ,regb 
+7ce4 6fe0c71c fetch 1 ,mem_special_agreemeet_enable 
+7ce5 1fe67c02 sub pdata ,2 ,null 
+7ce6 2042f787 call key_whitening_i_get ,zero 
+7ce7 20207ced branch frmt_ble_whitening 
+
+frmt_fml_bytes_reverse_loop:
+7ce8 efe08006 ifetch 1 ,contr 
+7ce9 1fedfe00 reverse pdata ,pdata 
+7cea e7e08005 istore 1 ,contw 
+7ceb c2007ce8 loop frmt_fml_bytes_reverse_loop 
+7cec 20600000 rtn 
+
+frmt_ble_whitening:
+
+frmt_ble_whitening_loop:
+7ced 20407cf1 call frmt_ble_whitening_byte 
+7cee 1a60a601 increase 1 ,regc 
+7cef c2007ced loop frmt_ble_whitening_loop 
+7cf0 20600000 rtn 
+
+frmt_ble_whitening_byte:
+7cf1 da200001 arg 1 ,rega 
+
+frmt_ble_whitening_byte_loop:
+7cf2 1a43a400 lshift regb ,regb 
+7cf3 2a4ffe07 isolate1 7 ,regb 
+7cf4 2040fcf9 call frmt_ble_whitening_byte_xor ,true 
+7cf5 1a23a200 lshift rega ,rega 
+7cf6 1a227e00 deposit rega 
+7cf7 c3840000 rtnbit1 8 
+7cf8 20207cf2 branch frmt_ble_whitening_byte_loop 
+
+frmt_ble_whitening_byte_xor:
+7cf9 efe08013 ifetch 1 ,regc 
+7cfa 9a22fe00 ixor rega ,pdata 
+7cfb e7e08013 istore 1 ,regc 
+7cfc 1a42a411 xor regb ,0x11 ,regb 
+7cfd 20600000 rtn 
+
+frmt_apl_cb_event_timer:
+7cfe 473c402f bpatchx patch2f_0 ,mem_patch2f 
+7cff 6fe0c71c fetch 1 ,mem_special_agreemeet_enable 
+7d00 1fe67c01 sub pdata ,1 ,null 
+7d01 2042fd32 call p_light_gem_long_press_cnt_timer ,zero 
+7d02 20407d28 call frmt_light_reset_continuous_kps_cnt_timer 
+7d03 20407d0a call frmt_light_kscan_analysis_interval_timer 
+7d04 20407d0e call frmt_light_le_adv_timer 
+7d05 20407d25 call frmt_light_long_press_timer 
+7d06 20407d13 call frmt_light_long_press_adv_timer 
+7d07 20407d17 call frmt_light_indicator_led_timer 
+7d08 20407d1c call frmt_light_enter_lpm_timer 
+7d09 20207d20 branch frmt_light_color_and_lightness_long_press_timer 
+
+frmt_light_kscan_analysis_interval_timer:
+7d0a da604574 arg mem_kscan_analysis_interval_timeout ,regc 
+7d0b da407d0d arg frmt_light_kscan_analysis_interval_timeout ,regb 
+7d0c 20204de8 branch timer_single_step_2b 
+
+frmt_light_kscan_analysis_interval_timeout:
+7d0d 20600000 rtn 
+
+frmt_light_le_adv_timer:
+7d0e da60459d arg mem_ble_light_adv_timeout ,regc 
+7d0f da407d11 arg frmt_light_le_adv_time_timeout ,regb 
+7d10 20204de8 branch timer_single_step_2b 
+
+frmt_light_le_adv_time_timeout:
+7d11 70435b00 jam 0 ,mem_le_adv_enable 
+7d12 20600000 rtn 
+
+frmt_light_long_press_adv_timer:
+7d13 da604572 arg mem_long_press_adv_timeout ,regc 
+7d14 da407d16 arg frmt_light_long_press_adv_timeout ,regb 
+7d15 20204de8 branch timer_single_step_2b 
+
+frmt_light_long_press_adv_timeout:
+7d16 20600000 rtn 
+
+frmt_light_indicator_led_timer:
+7d17 da6046a4 arg mem_indicator_led_turn_on_timeout ,regc 
+7d18 da407d1a arg frmt_light_indicator_led_timer_timeout ,regb 
+7d19 20204de8 branch timer_single_step_2b 
+
+frmt_light_indicator_led_timer_timeout:
+7d1a 7046a300 jam 0 ,mem_indicator_turn_on_enable 
+7d1b 20600000 rtn 
+
+frmt_light_enter_lpm_timer:
+7d1c da6046a1 arg mem_light_lpm_enable_timeout ,regc 
+7d1d da407d1f arg frmt_light_enter_lpm_timeout ,regb 
+7d1e 20204de8 branch timer_single_step_2b 
+
+frmt_light_enter_lpm_timeout:
+7d1f 20600000 rtn 
+
+frmt_light_color_and_lightness_long_press_timer:
+7d20 da60471d arg mem_light_short_keypress_timeout ,regc 
+7d21 da407d23 arg frmt_light_color_and_lightness_long_press_timeout ,regb 
+7d22 20204de8 branch timer_single_step_2b 
+
+frmt_light_color_and_lightness_long_press_timeout:
+7d23 70471f01 jam 1 ,mem_light_color_and_lgtness_long_press_adv_enable 
+7d24 20600000 rtn 
+
+frmt_light_long_press_timer:
+7d25 da60458f arg mem_long_press_timeout ,regc 
+7d26 da407d2b arg p_light_long_press_timeout_cb ,regb 
+7d27 20204de8 branch timer_single_step_2b 
+
+frmt_light_reset_continuous_kps_cnt_timer:
+7d28 da604704 arg mem_light_continuous_kps_cnt_reset_timeout ,regc 
+7d29 da407d2d arg p_light_reset_continuous_kps_cnt_timeout_cb ,regb 
+7d2a 20204de8 branch timer_single_step_2b 
+
+p_light_long_press_timeout_cb:
+7d2b 6fe14761 fetch 2 ,mem_rmt_long_press_cb 
+7d2c 202075e6 branch callback_func 
+
+p_light_reset_continuous_kps_cnt_timeout_cb:
+7d2d 6fe14763 fetch 2 ,mem_rmt_continuous_keydown_cb 
+7d2e 202075e6 branch callback_func 
+
+frmt_light_set_continuous_kps_cnt_reset_timeout:
+7d2f 6fe14765 fetch 2 ,mem_rmt_continuous_kps_time 
+7d30 67e14704 store 2 ,mem_light_continuous_kps_cnt_reset_timeout 
+7d31 20600000 rtn 
+
+p_light_gem_long_press_cnt_timer:
+7d32 da6044df arg mem_gem_cnt_inces_timeout ,regc 
+7d33 da407d35 arg p_light_gem_long_press_cnt_timeout ,regb 
+7d34 20204de8 branch timer_single_step_2b 
+
+p_light_gem_long_press_cnt_timeout:
+7d35 6fe1458f fetch 2 ,mem_long_press_timeout 
+7d36 207a0000 rtn blank 
+7d37 7044e301 jam 1 ,mem_gem_long_cnt_enable 
+7d38 20600000 rtn 
+
+fan_idle_process:
+7d39 472bc02a bpatchx patch2a_7 ,mem_patch2a 
+7d3a 20207d3c branch fan_le_scan_process 
+
+fan_apl_event_timer:
+7d3b 20600000 rtn 
+
+fan_le_scan_process:
+7d3c 472c402b bpatchx patch2b_0 ,mem_patch2b 
+7d3d 20403d2f call le_enable 
+7d3e 7854fc00 disable master 
+7d3f 204042c9 call le_init_adv 
+7d40 20407d46 call p_le_wait_adv 
+7d41 24768000 nrtn match 
+7d42 6fe08002 fetch 1 ,mem_le_adv_rcv 
+7d43 1fe0fe01 increase 1 ,pdata 
+7d44 67e08002 store 1 ,mem_le_adv_rcv 
+7d45 20207dc2 branch fan_apl_ble_rx_v1_or_v2 
+
+p_le_wait_adv:
+7d46 20407d48 call p_le_next_scan_chanel 
+7d47 20203dc8 branch le_receive_adv 
+
+p_le_next_scan_chanel:
+7d48 6fe0c774 fetch 1 ,mem_ble_ch_mapped 
+7d49 67e08007 store 1 ,mem_le_ch_mapped 
+7d4a 20600000 rtn 
+
+fan_apl_pair:
+7d4b 58000003 setarg fan_433_pairing 
+7d4c 20207eb8 branch fan_fml_fet_ctl 
+
+fan_apl_light_on_and_off:
+7d4d 58000008 setarg fan_433_lamp_on_and_off 
+7d4e 20207eb8 branch fan_fml_fet_ctl 
+
+fan_apl_is_yc_remoter:
+7d4f 6fe34783 fetch 6 ,mem_recv_addr 
+7d50 684b477d fetcht 6 ,mem_yc_fan_ble_addr 
+7d51 98467c00 isub temp ,null 
+7d52 20600000 rtn 
+
+fan_apl_light_on:
+7d53 6fe0c76e fetch 1 ,mem_fan_yc_identify_flag 
+7d54 203a7d5b branch fan_apl_light_on_only ,blank 
+7d55 6fe0c773 fetch 1 ,mem_light_device_flag 
+7d56 c000fd5b beq 1 ,fan_apl_light_on_only 
+7d57 6fe0c772 fetch 1 ,mem_manufacture_id_temp 
+7d58 c0287d5b beq 0x50 ,fan_apl_light_on_only 
+7d59 20407d4f call fan_apl_is_yc_remoter 
+7d5a 2022fd4d branch fan_apl_light_on_and_off ,zero 
+
+fan_apl_light_on_only:
+7d5b 58000014 setarg fan_433_lamp_on_only 
+7d5c 20207eb8 branch fan_fml_fet_ctl 
+
+fan_apl_light_off:
+7d5d 6fe0c76e fetch 1 ,mem_fan_yc_identify_flag 
+7d5e 203a7d65 branch fan_apl_light_off_only ,blank 
+7d5f 6fe0c773 fetch 1 ,mem_light_device_flag 
+7d60 c000fd65 beq 1 ,fan_apl_light_off_only 
+7d61 6fe0c772 fetch 1 ,mem_manufacture_id_temp 
+7d62 c0287d65 beq 0x50 ,fan_apl_light_off_only 
+7d63 20407d4f call fan_apl_is_yc_remoter 
+7d64 2022fd4d branch fan_apl_light_on_and_off ,zero 
+
+fan_apl_light_off_only:
+7d65 58000018 setarg fan_433_lamp_off_only 
+7d66 20207eb8 branch fan_fml_fet_ctl 
+
+fan_apl_master_off:
+7d67 58000006 setarg fan_433_master_on_and_off 
+7d68 20207eb8 branch fan_fml_fet_ctl 
+
+fan_apl_light_color_switch:
+7d69 6fe0c7a4 fetch 1 ,mem_ble_parameter_para + 1 
+7d6a c1a00000 rtnne light_cmd_ftd_color_swtich_reserved 
+7d6b 58000005 setarg fan_433_color_switch 
+7d6c 20207eb8 branch fan_fml_fet_ctl 
+
+fan_apl_speed_30:
+7d6d 6fe147a4 fetch 2 ,mem_ble_parameter_para + 1 
+7d6e 243a7d71 nbranch fan_apl_speed_opcode_30_incse ,blank 
+
+fan_apl_speed_opcode_30_decse:
+7d6f 5800001b setarg fan_433_fan_speed_dec 
+7d70 20207eb8 branch fan_fml_fet_ctl 
+
+fan_apl_speed_opcode_30_incse:
+7d71 58000017 setarg fan_433_fan_speed_inc 
+7d72 20207eb8 branch fan_fml_fet_ctl 
+
+fan_apl_speed_31_v1:
+7d73 6fe0c7a5 fetch 1 ,mem_ble_parameter_para + 2 
+7d74 c0007d85 beq fan_speed_flag_off ,fan_apl_speed_32_to_0_and_deflector_off 
+7d75 c000fd87 beq fan_speed_flag_low ,fan_apl_speed_32_to_1 
+7d76 c0017d8b beq fan_speed_flag_middle ,fan_apl_speed_32_to_3 
+7d77 c001fd8f beq fan_speed_flag_high ,fan_apl_speed_32_to_5 
+7d78 20600000 rtn 
+
+fan_apl_speed_31_v2:
+7d79 6fe0c7a4 fetch 1 ,mem_ble_parameter_para + 1 
+7d7a c0107d7c beq 0x20 ,fan_apl_speed_32 
+7d7b 20207d73 branch fan_apl_speed_31_v1 
+
+fan_apl_speed_32:
+7d7c 6fe0c7a5 fetch 1 ,mem_ble_parameter_para + 2 
+7d7d c0007d85 beq fan_speed_flag_off ,fan_apl_speed_32_to_0_and_deflector_off 
+7d7e c000fd87 beq 1 ,fan_apl_speed_32_to_1 
+7d7f c0017d89 beq 2 ,fan_apl_speed_32_to_2 
+7d80 c001fd8b beq 3 ,fan_apl_speed_32_to_3 
+7d81 c0027d8d beq 4 ,fan_apl_speed_32_to_4 
+7d82 c002fd8f beq 5 ,fan_apl_speed_32_to_5 
+7d83 c0037d91 beq 6 ,fan_apl_speed_32_to_6 
+7d84 20600000 rtn 
+
+fan_apl_speed_32_to_0_and_deflector_off:
+
+fan_apl_speed_32_to_0:
+7d85 58000016 setarg fan_433_tap_posotion_0 
+7d86 20207eb8 branch fan_fml_fet_ctl 
+
+fan_apl_speed_32_to_1:
+7d87 58000010 setarg fan_433_tap_posotion_1 
+7d88 20207eb8 branch fan_fml_fet_ctl 
+
+fan_apl_speed_32_to_2:
+7d89 58000012 setarg fan_433_tap_posotion_2 
+7d8a 20207eb8 branch fan_fml_fet_ctl 
+
+fan_apl_speed_32_to_3:
+7d8b 5800001c setarg fan_433_tap_posotion_3 
+7d8c 20207eb8 branch fan_fml_fet_ctl 
+
+fan_apl_speed_32_to_4:
+7d8d 5800000a setarg fan_433_tap_posotion_4 
+7d8e 20207eb8 branch fan_fml_fet_ctl 
+
+fan_apl_speed_32_to_5:
+7d8f 5800000f setarg fan_433_tap_posotion_5 
+7d90 20207eb8 branch fan_fml_fet_ctl 
+
+fan_apl_speed_32_to_6:
+7d91 5800000c setarg fan_433_tap_posotion_6 
+7d92 20207eb8 branch fan_fml_fet_ctl 
+
+fan_apl_wind_direction:
+7d93 6fe0c7a4 fetch 1 ,mem_ble_parameter_para + 1 
+7d94 203a7d97 branch fan_fml_wind_direction_forward_433 ,blank 
+
+fan_fml_wind_direction_reverse_433:
+7d95 58000011 setarg fan_433_turning_reverse 
+7d96 20207eb8 branch fan_fml_fet_ctl 
+
+fan_fml_wind_direction_forward_433:
+7d97 58000004 setarg fan_433_turniing_forward 
+7d98 20207eb8 branch fan_fml_fet_ctl 
+
+fan_apl_wind_direction_on_and_off:
+7d99 58000007 setarg fan_433_wind_reverse 
+7d9a 20207eb8 branch fan_fml_fet_ctl 
+
+fan_apl_deflector_ctl_on_and_off:
+7d9b 58000013 setarg fan_433_deflector_on_and_off 
+7d9c 20207eb8 branch fan_fml_fet_ctl 
+
+fan_apl_deflector_ctl:
+7d9d 6fe0c7a4 fetch 1 ,mem_ble_parameter_para + 1 
+7d9e 203a7da1 branch fan_apl_deflector_off ,blank 
+
+fan_apl_deflector_on:
+7d9f 5800000d setarg fan_433_deflector_on 
+7da0 20207eb8 branch fan_fml_fet_ctl 
+
+fan_apl_deflector_off:
+7da1 5800000e setarg fan_433_deflector_off 
+7da2 20207eb8 branch fan_fml_fet_ctl 
+
+fan_apl_mode:
+7da3 472cc02b bpatchx patch2b_1 ,mem_patch2b 
+7da4 6fe0c7a4 fetch 1 ,mem_ble_parameter_para + 1 
+7da5 c000fda8 beq ble_para_sleep_mode ,fan_fml_mode_sleep_wind 
+7da6 c0017daa beq ble_para_natural_mode ,fan_apl_mode_natural_wind 
+7da7 20600000 rtn 
+
+fan_fml_mode_sleep_wind:
+7da8 5800001e setarg fan_433_sleep_wind 
+7da9 20207eb8 branch fan_fml_fet_ctl 
+
+fan_apl_mode_natural_wind:
+7daa 58000015 setarg fan_433_natural_wind 
+7dab 20207eb8 branch fan_fml_fet_ctl 
+
+fan_apl_timing_to_off:
+7dac 6fe147a4 fetch 2 ,mem_ble_parameter_para + 1 
+7dad c07ffdbb beq fan_ble_cmd_timing_to_off_8hour_v1 ,fan_fml_timing_to_off_8hour 
+
+fan_apl_timing_to_off_v2:
+7dae 472d402b bpatchx patch2b_2 ,mem_patch2b 
+7daf 6fe147a4 fetch 2 ,mem_ble_parameter_para + 1 
+7db0 c0707dbb beq fan_ble_cmd_timing_to_off_8hour ,fan_fml_timing_to_off_8hour 
+7db1 c01e7db5 beq fan_ble_cmd_timing_to_off_1hour ,fan_fml_timing_to_off_1hour 
+7db2 c03c7db7 beq fan_ble_cmd_timing_to_off_2hour ,fan_fml_timing_to_off_2hour 
+7db3 c0787db9 beq fan_ble_cmd_timing_to_off_4hour ,fan_fml_timing_to_off_4hour 
+7db4 20600000 rtn 
+
+fan_fml_timing_to_off_1hour:
+7db5 58000002 setarg fan_433_timing_to_off_1hour 
+7db6 20207eb8 branch fan_fml_fet_ctl 
+
+fan_fml_timing_to_off_2hour:
+7db7 58000009 setarg fan_433_timing_to_off_2hour 
+7db8 20207eb8 branch fan_fml_fet_ctl 
+
+fan_fml_timing_to_off_4hour:
+7db9 58000019 setarg fan_433_timing_to_off_4hour 
+7dba 20207eb8 branch fan_fml_fet_ctl 
+
+fan_fml_timing_to_off_8hour:
+7dbb 5800001a setarg fan_433_timing_to_off_8hour 
+7dbc 20207eb8 branch fan_fml_fet_ctl 
+
+fan_init:
+7dbd 58007d39 setarg fan_idle_process 
+7dbe 67e14390 store 2 ,mem_cb_idle_process 
+7dbf 58007ea5 setarg fan_apl_cb_event_timer 
+7dc0 67e14398 store 2 ,mem_cb_event_timer 
+7dc1 20207ebd branch fan_fml_tx_low_level_init 
+
+fan_apl_ble_rx_v1_or_v2:
+7dc2 6fe0c76c fetch 1 ,mem_fan_protocol_select_flag 
+7dc3 c0007dc8 beq 0 ,fan_apl_ble_rx_packet 
+7dc4 6fe14775 fetch 2 ,mem_ble_v2_decoder 
+7dc5 204075e6 call callback_func 
+7dc6 20347e18 branch fan_apl_ble_rx_packet_v2_cb ,user 
+7dc7 20600000 rtn 
+
+fan_apl_ble_rx_packet:
+7dc8 6fe08052 fetch 1 ,mem_le_rxbuf + 11 
+7dc9 c02afdfb beq remoter_marker ,fan_apl_ble_rx_packet_is_remoter 
+7dca 70477200 jam 0 ,mem_manufacture_id_temp 
+7dcb 58000000 setarg 0 
+7dcc 67e34783 store 6 ,mem_recv_addr 
+
+fan_apl_ble_rx_packet_id_valid:
+7dcd 68498053 fetcht 3 ,mem_le_rxbuf + 12 
+7dce 58528718 setarg ftd_remoter_id_code 
+7dcf 98467c00 isub temp ,null 
+7dd0 70477300 jam 0 ,mem_light_device_flag 
+7dd1 2022fddd branch fan_apl_ble_rx_packet_preamble_valid ,zero 
+7dd2 70477301 jam 1 ,mem_light_device_flag 
+7dd3 5808f9ff setarg ftd_andriod4913_id_code 
+7dd4 98467c00 isub temp ,null 
+7dd5 2022fddd branch fan_apl_ble_rx_packet_preamble_valid ,zero 
+7dd6 5808f903 setarg ftd_ios4913_id_code 
+7dd7 98467c00 isub temp ,null 
+7dd8 2022fddd branch fan_apl_ble_rx_packet_preamble_valid ,zero 
+7dd9 70477302 jam 2 ,mem_light_device_flag 
+7dda 58f87703 setarg ftd_b65f_id_code 
+7ddb 98467c00 isub temp ,null 
+7ddc 24628000 nrtn zero 
+
+fan_apl_ble_rx_packet_preamble_valid:
+7ddd d8c00047 arg mem_le_rxbuf ,contr 
+7dde d8a0464a arg mem_light_whitening_buffer ,contw 
+7ddf df200027 arg ftd_pdu_len ,loopcnt 
+7de0 20407548 call memcpy 
+7de1 70467653 jam 83 ,mem_light_whitening_i 
+7de2 70467527 jam 39 ,mem_light_recvd_len 
+7de3 20407cd9 call frmt_light_ble_whitening_and_reverse 
+7de4 6fe0c773 fetch 1 ,mem_light_device_flag 
+7de5 c000fdf9 beq 1 ,fan_apl_ble_rx_packet_protocol_4913 
+7de6 d8c04661 arg mem_light_whitening_buffer + 23 ,contr 
+
+fan_apl_ble_rx_packet_get_protocol:
+7de7 d8a04739 arg mem_light_adv_packet ,contw 
+7de8 df20000e arg 14 ,loopcnt 
+7de9 2040753b call memcpy_fast 
+
+fan_apl_ble_rx_packet_validity_checkout:
+7dea 6fe14743 fetch 2 ,mem_light_adv_packet + 10 
+7deb 1ff0fe00 byteswap pdata ,pdata 
+7dec 1fe47e00 invert pdata ,pdata 
+7ded 67e144c1 store 2 ,mem_adv_crc_false_initvalue 
+7dee da604739 arg mem_light_adv_packet ,regc 
+7def df20000c arg 0x0c ,loopcnt 
+7df0 58001021 setarg 0x1021 
+7df1 67e144c3 store 2 ,mem_crc16_polynomial 
+7df2 20407ca5 call frmt_crc16_ccitt_false 
+7df3 6fe144c1 fetch 2 ,mem_adv_crc_false_initvalue 
+7df4 1ff0fe00 byteswap pdata ,pdata 
+7df5 68494745 fetcht 2 ,mem_light_adv_packet_encry + 4 
+7df6 98467c00 isub temp ,null 
+7df7 24628000 nrtn zero 
+7df8 20207e0c branch fan_apl_ble_rx_packet_v1_cb 
+
+fan_apl_ble_rx_packet_protocol_4913:
+7df9 d8c04662 arg mem_light_whitening_buffer + 24 ,contr 
+7dfa 20207de7 branch fan_apl_ble_rx_packet_get_protocol 
+
+fan_apl_ble_rx_packet_is_remoter:
+7dfb 472dc02b bpatchx patch2b_3 ,mem_patch2b 
+7dfc d8a04783 arg mem_recv_addr ,contw 
+7dfd d8c00049 arg mem_le_rxbuf + 2 ,contr 
+7dfe df200006 arg 6 ,loopcnt 
+7dff 2040753b call memcpy_fast 
+7e00 6fe08051 fetch 1 ,mem_le_rxbuf + 10 
+7e01 67e0c772 store 1 ,mem_manufacture_id_temp 
+7e02 6848c76f fetcht 1 ,mem_customer_id 
+7e03 98467c00 isub temp ,null 
+7e04 2022fdcd branch fan_apl_ble_rx_packet_id_valid ,zero 
+7e05 6848c770 fetcht 1 ,mem_customer_id_v2 
+7e06 98467c00 isub temp ,null 
+7e07 2022fdcd branch fan_apl_ble_rx_packet_id_valid ,zero 
+7e08 6848c771 fetcht 1 ,mem_id_universal 
+7e09 98467c00 isub temp ,null 
+7e0a 2022fdcd branch fan_apl_ble_rx_packet_id_valid ,zero 
+7e0b 20600000 rtn 
+
+fan_apl_ble_rx_packet_v1_cb:
+7e0c 6fe0c739 fetch 1 ,mem_light_adv_packet_cmd 
+7e0d 67e147a1 store 2 ,mem_ble_parameter_cmd 
+7e0e 6fe1473c fetch 2 ,mem_light_adv_packet_data 
+7e0f 67e147a4 store 2 ,mem_ble_parameter_para + 1 
+7e10 6fe0c73a fetch 1 ,mem_light_adv_packet_addr 
+7e11 67e0c7a8 store 1 ,mem_ble_parameter_addr + 1 
+7e12 6fe0c73b fetch 1 ,mem_light_adv_packet_addr + 1 
+7e13 67e0c7a7 store 1 ,mem_ble_parameter_addr 
+7e14 6fe0c73b fetch 1 ,mem_light_adv_packet_addr + 1 
+7e15 1fe17e0f and pdata ,0x0f ,pdata 
+7e16 67e0c7a9 store 1 ,mem_ble_parameter_group 
+7e17 20207e25 branch fan_apl_ble_rx_packet_cb_common 
+
+fan_apl_ble_rx_packet_v2_cb:
+7e18 6fe144b1 fetch 2 ,mem_ble_addr 
+7e19 1ff27e00 lshift4 pdata ,pdata 
+7e1a 67e147a7 store 2 ,mem_ble_parameter_addr 
+7e1b 6fe344b6 fetch 6 ,mem_ble_cmd 
+7e1c 67e347a1 store 6 ,mem_ble_parameter 
+7e1d 6fe0c4b5 fetch 1 ,mem_ble_group 
+7e1e 67e0c7a9 store 1 ,mem_ble_parameter_group 
+7e1f 6fe0c4c0 fetch 1 ,mem_ble_is_app 
+7e20 67e0c773 store 1 ,mem_light_device_flag 
+7e21 6fe0c4ad fetch 1 ,mem_ble_customer_id 
+7e22 67e0c772 store 1 ,mem_manufacture_id_temp 
+7e23 6fe0c4ae fetch 1 ,mem_ble_count 
+7e24 67e0c73f store 1 ,mem_light_adv_packet_packetnum 
+
+fan_apl_ble_rx_packet_cb_common:
+7e25 6fe1479f fetch 2 ,mem_fan_packet_indiscriminate_cb 
+7e26 204075e6 call callback_func 
+
+fan_apl_ble_rx_cmd_execution:
+7e27 472e402b bpatchx patch2b_4 ,mem_patch2b 
+7e28 20407e4e call fan_apl_ble_cmd_handler_customer_message 
+7e29 20740000 rtn user 
+7e2a 6fe147a1 fetch 2 ,mem_ble_parameter_cmd 
+7e2b c0147d4b beq light_cmd_pairing_code ,fan_apl_pair 
+7e2c c004fd4d beq light_cmd_turn_on_and_off ,fan_apl_light_on_and_off 
+7e2d c0087d53 beq light_cmd_turn_on ,fan_apl_light_on 
+7e2e c008fd5d beq light_cmd_turn_off ,fan_apl_light_off 
+7e2f c037fd67 beq fan_cmd_master_on_and_off ,fan_apl_master_off 
+7e30 c0187d6d beq fan_cmd_speed_change ,fan_apl_speed_30 
+7e31 c00afd93 beq fan_cmd_direction ,fan_apl_wind_direction 
+7e32 c00bfd99 beq fan_cmd_direction_on_and_off ,fan_apl_wind_direction_on_and_off 
+7e33 c00b7d9d beq fan_cmd_deflector ,fan_apl_deflector_ctl 
+7e34 c00c7d9b beq fan_cmd_deflector_on_and_off ,fan_apl_deflector_ctl_on_and_off 
+7e35 c019fda3 beq fan_cmd_mode ,fan_apl_mode 
+7e36 6fe0c76c fetch 1 ,mem_fan_protocol_select_flag 
+7e37 c0007e3a beq 0 ,fan_apl_main_v1 
+7e38 c000fe48 beq 1 ,fan_apl_main_v2 
+7e39 20600000 rtn 
+
+fan_apl_main_v1:
+7e3a 472ec02b bpatchx patch2b_5 ,mem_patch2b 
+7e3b 6fe147a1 fetch 2 ,mem_ble_parameter_cmd 
+7e3c c028fdac beq fan_cmd_timing_to_off ,fan_apl_timing_to_off 
+7e3d c020fdac beq light_cmd_delay_off ,fan_apl_timing_to_off 
+7e3e 6fe1473c fetch 2 ,mem_light_adv_packet_data 
+7e3f 67e147a5 store 2 ,mem_ble_parameter_para + 2 
+7e40 6fe147a1 fetch 2 ,mem_ble_parameter_cmd 
+7e41 c018fd73 beq fan_cmd_speed_31 ,fan_apl_speed_31_v1 
+7e42 c0197d7c beq fan_cmd_speed_32 ,fan_apl_speed_32 
+7e43 6fe0c740 fetch 1 ,mem_light_adv_packet_reserve 
+7e44 67e0c7a4 store 1 ,mem_ble_parameter_para + 1 
+7e45 6fe147a1 fetch 2 ,mem_ble_parameter_cmd 
+7e46 c010fd69 beq light_cmd_color_swtich ,fan_apl_light_color_switch 
+7e47 20600000 rtn 
+
+fan_apl_main_v2:
+7e48 472f402b bpatchx patch2b_6 ,mem_patch2b 
+7e49 6fe147a1 fetch 2 ,mem_ble_parameter_cmd 
+7e4a c018fd79 beq fan_cmd_speed_31 ,fan_apl_speed_31_v2 
+7e4b c020fdae beq light_cmd_delay_off ,fan_apl_timing_to_off_v2 
+7e4c c010fd69 beq light_cmd_color_swtich ,fan_apl_light_color_switch 
+7e4d 20600000 rtn 
+
+fan_apl_ble_cmd_handler_customer_message:
+7e4e 472fc02b bpatchx patch2b_7 ,mem_patch2b 
+7e4f 20407638 call disable_user 
+7e50 684947a7 fetcht 2 ,mem_ble_parameter_addr 
+7e51 d8e00009 arg 9 ,queue 
+7e52 df20000a arg 10 ,loopcnt 
+
+fan_apl_ble_rx_packet_addr_check_loop:
+7e53 1f26260a sub loopcnt ,10 ,regc 
+7e54 18e27e00 deposit queue 
+7e55 9a667c00 isub regc ,null 
+7e56 20217e5a branch fan_apl_ble_rx_packet_addr_check ,positive 
+
+fan_apl_ble_rx_packet_other_addr_check_continue:
+7e57 1a667c03 sub regc ,3 ,null 
+7e58 24217e5a nbranch fan_apl_ble_rx_packet_addr_check ,positive 
+7e59 20207e65 branch fan_apl_ble_rx_packet_addr_check_end 
+
+fan_apl_ble_rx_packet_addr_check:
+7e5a d8c0055e arg mem_flash_paired_addr_base ,contr 
+7e5b 1a6ffe03 mul32 regc ,3 ,pdata 
+7e5c 98c08c00 iadd contr ,contr 
+7e5d efe10006 ifetch 2 ,contr 
+7e5e 98467c00 isub temp ,null 
+7e5f 2422fe65 nbranch fan_apl_ble_rx_packet_addr_check_end ,zero 
+7e60 ea208006 ifetchr rega ,1 ,contr 
+7e61 6fe0c7a9 fetch 1 ,mem_ble_parameter_group 
+7e62 203a7e75 branch fan_apl_ble_rx_packet_cnt_check ,blank 
+7e63 9a267c00 isub rega ,null 
+7e64 2022fe75 branch fan_apl_ble_rx_packet_cnt_check ,zero 
+
+fan_apl_ble_rx_packet_addr_check_end:
+7e65 c2007e53 loop fan_apl_ble_rx_packet_addr_check_loop 
+7e66 da200576 arg mem_flash_paired_addr8 ,rega 
+7e67 df200009 arg 9 ,loopcnt 
+
+fan_apl_ble_rx_packet_addr_move_loop:
+7e68 efe18011 ifetch 3 ,rega 
+7e69 1a208403 add rega ,3 ,temp 
+7e6a e7e18002 istore 3 ,temp 
+7e6b 1a20a3fd increase -3 ,rega 
+7e6c c2007e68 loop fan_apl_ble_rx_packet_addr_move_loop 
+7e6d 6fe1c7a7 fetch 3 ,mem_ble_parameter_addr 
+7e6e 67e1855e store 3 ,mem_flash_paired_addr0 
+7e6f 6fe08584 fetch 1 ,mem_addr8_msg_cnt 
+7e70 67e08585 store 1 ,mem_addr9_msg_cnt 
+7e71 6fe4057c fetch 8 ,mem_msg_cnt_base 
+7e72 67e4057d store 8 ,mem_addr1_msg_cnt 
+7e73 70057c00 jam 0 ,mem_msg_cnt_base 
+7e74 20207e4e branch fan_apl_ble_cmd_handler_customer_message 
+
+fan_apl_ble_rx_packet_cnt_check:
+7e75 1f220400 copy loopcnt ,temp 
+7e76 60488587 storet 1 ,mem_msg_addr_save 
+7e77 d840057c arg mem_msg_cnt_base ,temp 
+7e78 1f267e0a sub loopcnt ,10 ,pdata 
+7e79 98408400 iadd temp ,temp 
+7e7a 18422200 copy temp ,rega 
+7e7b e8408002 ifetcht 1 ,temp 
+7e7c 6fe0c73f fetch 1 ,mem_light_adv_packet_packetnum 
+7e7d 98467c00 isub temp ,null 
+7e7e 2022f636 branch enable_user ,zero 
+7e7f 20217e86 branch fan_apl_ble_rx_check_packetnum_vaild_v2 ,positive 
+7e80 1fe0ff00 add pdata ,0x100 ,pdata 
+7e81 98467e00 isub temp ,pdata 
+7e82 1fe17eff and pdata ,0xff ,pdata 
+7e83 1fe67c06 sub pdata ,6 ,null 
+7e84 20217e86 branch fan_apl_ble_rx_check_packetnum_vaild_v2 ,positive 
+7e85 20600000 rtn 
+
+fan_apl_ble_rx_check_packetnum_vaild_v2:
+
+fan_apl_ble_rx_relay_check:
+7e86 6fe0c73f fetch 1 ,mem_light_adv_packet_packetnum 
+7e87 67e085a6 store 1 ,mem_count_and_random 
+7e88 6fe1006a fetch 2 ,mem_le_rxbuf + 35 
+7e89 67e105a7 store 2 ,mem_count_and_random + 1 
+7e8a 684985a6 fetcht 3 ,mem_count_and_random 
+7e8b d8c00588 arg mem_msg_before_queue ,contr 
+7e8c df20000a arg 10 ,loopcnt 
+
+fan_apl_msg_check_count_random_loop:
+7e8d efe18006 ifetch 3 ,contr 
+7e8e 98467c00 isub temp ,null 
+7e8f 2022f636 branch enable_user ,zero 
+7e90 c2007e8d loop fan_apl_msg_check_count_random_loop 
+
+fan_apl_msg_enqueue:
+7e91 7005aa1e jam 30 ,mem_msg_judgment_window_time 
+7e92 6fe185a0 fetch 3 ,mem_msg_before_queue + 24 
+7e93 67e185a3 store 3 ,mem_msg_before_queue + 27 
+7e94 6fe40590 fetch 8 ,mem_msg_before_queue + 8 
+7e95 684c0598 fetcht 8 ,mem_msg_before_queue + 16 
+7e96 67e40593 store 8 ,mem_msg_before_queue + 11 
+7e97 604c059b storet 8 ,mem_msg_before_queue + 19 
+7e98 6fe40588 fetch 8 ,mem_msg_before_queue 
+7e99 67e4058b store 8 ,mem_msg_before_queue + 3 
+7e9a 6fe185a6 fetch 3 ,mem_count_and_random 
+7e9b 67e18588 store 3 ,mem_msg_before_queue 
+7e9c 6fe08587 fetch 1 ,mem_msg_addr_save 
+7e9d 1fe27200 copy pdata ,loopcnt 
+7e9e d840057c arg mem_msg_cnt_base ,temp 
+7e9f 1f267e0a sub loopcnt ,10 ,pdata 
+7ea0 98408400 iadd temp ,temp 
+7ea1 6fe0c73f fetch 1 ,mem_light_adv_packet_packetnum 
+7ea2 e7e08002 istore 1 ,temp 
+7ea3 7005a91e jam 30 ,mem_msg_cnt_judgment_window_time 
+7ea4 20600000 rtn 
+
+fan_apl_cb_event_timer:
+7ea5 4730402c bpatchx patch2c_0 ,mem_patch2c 
+7ea6 20407ea8 call fan_apl_ble_msg_cache_clear_time 
+7ea7 20600000 rtn 
+
+fan_apl_ble_msg_cache_clear_time:
+7ea8 20407eaa call fan_apl_ble_msg_cache_clear_timer 
+7ea9 20207eb0 branch fan_apl_ble_msg_cnt_cache_clear_timer 
+
+fan_apl_ble_msg_cache_clear_timer:
+7eaa da6005aa arg mem_msg_judgment_window_time ,regc 
+7eab da407ead arg fan_apl_ble_msg_cache_clear_timeout ,regb 
+7eac 20204de1 branch timer_single_step 
+
+fan_apl_ble_msg_cache_clear_timeout:
+7ead df20001e arg 30 ,loopcnt 
+7eae d8a00588 arg mem_msg_before_queue ,contw 
+7eaf 2020750f branch clear_mem 
+
+fan_apl_ble_msg_cnt_cache_clear_timer:
+7eb0 da6005a9 arg mem_msg_cnt_judgment_window_time ,regc 
+7eb1 da407eb3 arg fan_apl_ble_msg_cnt_cache_clear_timeout ,regb 
+7eb2 20204de1 branch timer_single_step 
+
+fan_apl_ble_msg_cnt_cache_clear_timeout:
+7eb3 70477c00 jam 0 ,mem_light_last_packetnum 
+7eb4 df20000a arg 10 ,loopcnt 
+7eb5 d8a0057c arg mem_msg_cnt_base ,contw 
+7eb6 2020750f branch clear_mem 
+7eb7 20600000 rtn 
+
+fan_fml_fet_ctl:
+7eb8 67e0c78b store 1 ,mem_fan_opcode 
+7eb9 6fe1479d fetch 2 ,mem_433_tx_cb 
+7eba 202075e6 branch callback_func 
+
+fan_fml_tx_high_level:
+7ebb 6848c79a fetcht 1 ,mem_fan_tx_gpio 
+7ebc 202078b7 branch gpio_config_output_patch 
+
+fan_fml_tx_low_level_init:
+
+fan_fml_tx_low_level:
+7ebd 6848c79a fetcht 1 ,mem_fan_tx_gpio 
+7ebe 18418480 or temp ,0x80 ,temp 
+7ebf 202078b7 branch gpio_config_output_patch 
+
+fan_fml_function_once:
+7ec0 20407f22 call fan_fml_tx_header_signal 
+7ec1 20407ec3 call fan_fml_function_once_433code 
+7ec2 20207f31 branch fan_fml_tx_end_signal 
+
+fan_fml_function_once_433code:
+7ec3 dfe00004 arg fan_433code_len ,pdata 
+7ec4 1fe9fe00 lshift3 pdata ,pdata 
+7ec5 67e14789 store 2 ,mem_fan_tx_bits_loop 
+7ec6 1fe20e00 copy pdata ,queue 
+7ec7 18e08fff increase -1 ,queue 
+7ec8 684a478d fetcht fan_433code_len ,mem_fan_433code_packet 
+
+fan_fml_function_once_433code_loop:
+7ec9 6fe14789 fetch 2 ,mem_fan_tx_bits_loop 
+7eca 207a0000 rtn blank 
+7ecb 1fe0ffff pincrease -1 
+7ecc 67e14789 store 2 ,mem_fan_tx_bits_loop 
+7ecd a84fffff qisolate1 temp 
+7ece 2020fed5 branch fan_fml_1_signal_temp ,true 
+7ecf 20407f2b call fan_fml_0_signal 
+
+fan_fml_function_once_tx_bit_loop_continue:
+7ed0 18e08fff increase -1 ,queue 
+7ed1 6fe14789 fetch 2 ,mem_fan_tx_bits_loop 
+7ed2 684a478d fetcht fan_433code_len ,mem_fan_433code_packet 
+7ed3 243a7ec9 nbranch fan_fml_function_once_433code_loop ,blank 
+7ed4 20600000 rtn 
+
+fan_fml_1_signal_temp:
+7ed5 20407f25 call fan_fml_1_signal 
+7ed6 20207ed0 branch fan_fml_function_once_tx_bit_loop_continue 
+
+fan_fml_function_loop:
+7ed7 6fe14797 fetch 2 ,mem_fan_tx_loop2 
+7ed8 207a0000 rtn blank 
+7ed9 1fe0ffff pincrease -1 
+7eda 67e14797 store 2 ,mem_fan_tx_loop2 
+7edb 20407ec0 call fan_fml_function_once 
+7edc 20207ed7 branch fan_fml_function_loop 
+
+p_fan_fml_fet_ctl:
+7edd 20407efe call fan_fml_get_433_code 
+7ede 58000003 setarg fan_retransmission_times 
+7edf 67e14797 store 2 ,mem_fan_tx_loop2 
+7ee0 20207ed7 branch fan_fml_function_loop 
+
+fan_apl_ble_rx_packet_indiscriminate:
+7ee1 6fe0c772 fetch 1 ,mem_manufacture_id_temp 
+7ee2 6848c771 fetcht 1 ,mem_id_universal 
+7ee3 98467c00 isub temp ,null 
+7ee4 2022feea branch fan_apl_ble_433_packet_type1 ,zero 
+7ee5 6fe0c773 fetch 1 ,mem_light_device_flag 
+7ee6 c0007ee8 beq 0 ,fan_apl_ble_433_packet_type0 
+7ee7 20207eea branch fan_apl_ble_433_packet_type1 
+
+fan_apl_ble_433_packet_type0:
+7ee8 58000000 setarg 0 
+7ee9 20207eeb branch fan_apl_ble_433_packet_common 
+
+fan_apl_ble_433_packet_type1:
+7eea 58000080 setarg 0x80 
+
+fan_apl_ble_433_packet_common:
+7eeb 6848c7a9 fetcht 1 ,mem_ble_parameter_group 
+7eec 1841227f and temp ,0x7f ,rega 
+7eed 9a21fe00 ior rega ,pdata 
+7eee 1ff18400 rshift4 pdata ,temp 
+7eef 6048c7ac storet 1 ,mem_fan_addr_433 + 2 
+7ef0 1fe17e0f and pdata ,0x0f ,pdata 
+7ef1 1ff27e00 lshift4 pdata ,pdata 
+7ef2 6848c7a8 fetcht 1 ,mem_ble_parameter_addr + 1 
+7ef3 184122f0 and temp ,0xf0 ,rega 
+7ef4 1a31a200 rshift4 rega ,rega 
+7ef5 9a21fe00 ior rega ,pdata 
+7ef6 67e0c7ab store 1 ,mem_fan_addr_433 + 1 
+7ef7 18417e0f and temp ,0x0f ,pdata 
+7ef8 1ff27e00 lshift4 pdata ,pdata 
+7ef9 6848c7a7 fetcht 1 ,mem_ble_parameter_addr 
+7efa 18518400 rshift4 temp ,temp 
+7efb 9841fe00 ior temp ,pdata 
+7efc 67e0c7aa store 1 ,mem_fan_addr_433 
+7efd 20600000 rtn 
+
+fan_fml_get_433_code:
+7efe 6fe1c7aa fetch 3 ,mem_fan_addr_433 
+7eff 1ff27e00 lshift4 pdata ,pdata 
+7f00 1fed7e00 lshift8 pdata ,pdata 
+7f01 6848c78b fetcht 1 ,mem_fan_opcode 
+7f02 18498400 lshift3 temp ,temp 
+7f03 18520400 lshift4 temp ,temp 
+7f04 9841a200 ior temp ,rega 
+7f05 20407f1a call fan_fml_get_433_code_packet_num_get 
+7f06 1ff27e00 lshift4 pdata ,pdata 
+7f07 9a21a200 ior rega ,rega 
+7f08 20407f0c call fan_fml_get_433_code_get_check_code 
+7f09 9a21fe00 ior rega ,pdata 
+7f0a 67e2478d store fan_433code_len ,mem_fan_433code_packet 
+7f0b 20600000 rtn 
+
+fan_fml_get_433_code_get_check_code:
+7f0c df200004 arg 4 ,loopcnt 
+7f0d 1a222400 copy rega ,regb 
+7f0e de000000 arg 0 ,alarm 
+
+fan_fml_get_433_code_get_check_code_loop:
+7f0f 1a4126ff and regb ,0xff ,regc 
+7f10 1a617ef0 and regc ,0xf0 ,pdata 
+7f11 1ff1fe00 rshift4 pdata ,pdata 
+7f12 9e02e000 ixor alarm ,alarm 
+7f13 1a617e0f and regc ,0x0f ,pdata 
+7f14 9e02e000 ixor alarm ,alarm 
+7f15 1a4ca400 rshift8 regb ,regb 
+7f16 c2007f0f loop fan_fml_get_433_code_get_check_code_loop 
+7f17 1e02e00a xor alarm ,0x0a ,alarm 
+7f18 1e017e0f and alarm ,0x0f ,pdata 
+7f19 20600000 rtn 
+
+fan_fml_get_433_code_packet_num_get:
+7f1a 6fe0c78c fetch 1 ,mem_fan_tx_cnt 
+7f1b 1fe0fe01 pincrease 1 
+7f1c 1fe17e07 and pdata ,0x07 ,pdata 
+7f1d 67e0c78c store 1 ,mem_fan_tx_cnt 
+7f1e 20600000 rtn 
+
+fan_fml_delay_us:
+7f1f 2000000c nop 12 
+7f20 c2007f1f loop fan_fml_delay_us 
+7f21 20600000 rtn 
+
+fan_fml_tx_header_signal:
+7f22 20407ebd call fan_fml_tx_low_level 
+7f23 df201900 arg fan_header_low_delay ,loopcnt 
+7f24 20207f1f branch fan_fml_delay_us 
+
+fan_fml_1_signal:
+7f25 20407ebb call fan_fml_tx_high_level 
+7f26 df200257 arg fan_1_high_delay ,loopcnt 
+7f27 20407f1f call fan_fml_delay_us 
+7f28 20407ebd call fan_fml_tx_low_level 
+7f29 df2000c8 arg fan_1_low_delay ,loopcnt 
+7f2a 20207f1f branch fan_fml_delay_us 
+
+fan_fml_0_signal:
+7f2b 20407ebb call fan_fml_tx_high_level 
+7f2c df2000c8 arg fan_0_high_delay ,loopcnt 
+7f2d 20407f1f call fan_fml_delay_us 
+7f2e 20407ebd call fan_fml_tx_low_level 
+7f2f df200257 arg fan_0_low_delay ,loopcnt 
+7f30 20207f1f branch fan_fml_delay_us 
+
+fan_fml_tx_end_signal:
+7f31 20407ebb call fan_fml_tx_high_level 
+7f32 df2000c8 arg fan_end_high_delay ,loopcnt 
+7f33 20407f1f call fan_fml_delay_us 
+7f34 20407ebd call fan_fml_tx_low_level 
+7f35 df20022f arg fan_end_low_delay ,loopcnt 
+7f36 20207f1f branch fan_fml_delay_us 
+
+fan_fml_1_signal_loop:
+7f37 6fe14795 fetch 2 ,mem_fan_tx_loop 
+7f38 207a0000 rtn blank 
+7f39 1fe0ffff pincrease -1 
+7f3a 67e14795 store 2 ,mem_fan_tx_loop 
+7f3b 20407f25 call fan_fml_1_signal 
+7f3c 20207f37 branch fan_fml_1_signal_loop 
+
+fan_fml_0_signal_loop:
+7f3d 6fe14795 fetch 2 ,mem_fan_tx_loop 
+7f3e 207a0000 rtn blank 
+7f3f 1fe0ffff pincrease -1 
+7f40 67e14795 store 2 ,mem_fan_tx_loop 
+7f41 20407f2b call fan_fml_0_signal 
+7f42 20207f3d branch fan_fml_0_signal_loop 
+
+frmt_ble_para_init:
+7f43 5893fdb7 setarg 0x93FDB7 
+7f44 67e1c437 store 3 ,mem_ble_v2_xbox 
+7f45 583f3626 setarg 0x3F3626 
+7f46 67e1c43a store 3 ,mem_ble_v2_xbox + 3 
+7f47 5834ccf7 setarg 0x34CCF7 
+7f48 67e1c43d store 3 ,mem_ble_v2_xbox + 6 
+7f49 58f1e5a5 setarg 0xF1E5A5 
+7f4a 67e1c440 store 3 ,mem_ble_v2_xbox + 9 
+7f4b 5831d871 setarg 0x31D871 
+7f4c 67e1c443 store 3 ,mem_ble_v2_xbox + 12 
+7f4d 58c70415 setarg 0xC70415 
+7f4e 67e1c446 store 3 ,mem_ble_v2_xbox + 15 
+7f4f 5818c323 setarg 0x18C323 
+7f50 67e1c449 store 3 ,mem_ble_v2_xbox + 18 
+7f51 589a0596 setarg 0x9A0596 
+7f52 67e1c44c store 3 ,mem_ble_v2_xbox + 21 
+7f53 58801207 setarg 0x801207 
+7f54 67e1c44f store 3 ,mem_ble_v2_xbox + 24 
+7f55 5827ebe2 setarg 0x27EBE2 
+7f56 67e1c452 store 3 ,mem_ble_v2_xbox + 27 
+7f57 580075b2 setarg 0x75B2 
+7f58 67e14455 store 2 ,mem_ble_v2_xbox + 30 
+7f59 5889a18c setarg 0x89A18C 
+7f5a 67e1c457 store 3 ,mem_ble_v2_xbox + 32 
+7f5b 58e6bf0d setarg 0xE6BF0D 
+7f5c 67e1c45a store 3 ,mem_ble_v2_xbox + 35 
+7f5d 58416842 setarg 0x416842 
+7f5e 67e1c45d store 3 ,mem_ble_v2_xbox + 38 
+7f5f 580f2d99 setarg 0x0F2D99 
+7f60 67e1c460 store 3 ,mem_ble_v2_xbox + 41 
+7f61 580054b0 setarg 0x54B0 
+7f62 67e14463 store 2 ,mem_ble_v2_xbox + 44 
+7f63 580016bb setarg 0x16BB 
+7f64 67e14465 store 2 ,mem_ble_v2_xbox + 46 
+7f65 5851c29b setarg 0x51C29B 
+7f66 67e1c467 store 3 ,mem_ble_v2_xbox + 48 
+7f67 581a532f setarg 0x1A532F 
+7f68 67e1c46a store 3 ,mem_ble_v2_xbox + 51 
+7f69 58b5836a setarg 0xB5836A 
+7f6a 67e1c46d store 3 ,mem_ble_v2_xbox + 54 
+7f6b 58106e02 setarg 0x106E02 
+7f6c 67e1c470 store 3 ,mem_ble_v2_xbox + 57 
+7f6d 5800ab16 setarg 0xAB16 
+7f6e 67e14473 store 2 ,mem_ble_v2_xbox + 60 
+7f6f 580042a3 setarg 0x42A3 
+7f70 67e14475 store 2 ,mem_ble_v2_xbox + 62 
+7f71 20600000 rtn 
+
+frmt_ble_data_set:
+7f72 58002542 setarg 0x2542 
+7f73 67e14477 store 2 ,mem_ble_v2_pdu 
+7f74 5810255d setarg 0x10255d 
+7f75 67e1c479 store 3 ,mem_ble_v2_pdu + 2 
+7f76 58109e3a setarg 0x109e3a 
+7f77 67e1c47c store 3 ,mem_ble_v2_pdu + 5 
+7f78 58000000 setarg 0x00 
+7f79 67e1c497 store 3 ,mem_ble_v2_pdu + 32 
+7f7a 58020102 setarg 0x020102 
+7f7b 67e1c47f store 3 ,mem_ble_v2_pdu + 8 
+7f7c 58f0161b setarg 0xF0161B 
+7f7d 67e1c482 store 3 ,mem_ble_v2_pdu + 11 
+7f7e 58001008 setarg 0x001008 
+7f7f 67e1c485 store 3 ,mem_ble_v2_pdu + 14 
+7f80 6fe0c49f fetch 1 ,mem_ble_v2_packet_num 
+7f81 1fe0fe01 pincrease 1 
+7f82 67e0c49f store 1 ,mem_ble_v2_packet_num 
+7f83 6fe144c5 fetch 2 ,mem_ble_pack_cb 
+7f84 202075e6 branch callback_func 
+
+frtm_ble_setdefault:
+7f85 5800ffff setarg 0xffff 
+7f86 20600000 rtn 
+
Index: output/romcode.rom
===================================================================
--- /branch/usb/usb_public_base/output/romcode.rom	(revision 0)
+++ /branch/usb/usb_public_base/output/romcode.rom	(working copy)
@@ -0,0 +1,18432 @@
+20403af8
+44804000
+20800000
+20404da6
+20403a0e
+20406a00
+20403ac3
+20406635
+4480c000
+20406fdb
+20403ae9
+20404d9b
+2055bb9a
+44814000
+2040421c
+20403826
+20404dae
+20403815
+204047c4
+20403bc2
+2020380d
+2040381a
+c6848000
+793f8009
+2040383d
+20203d36
+4481c000
+20403863
+2422b822
+20403832
+1a208c01
+efe08006
+c2803cac
+20600000
+20403843
+1f227c00
+20628000
+20203aba
+6fe0c10d
+207a0000
+c00db82f
+2040385c
+20628000
+2040385f
+20628000
+70410d00
+20600000
+7001b71b
+70410d00
+20600000
+44824000
+79200009
+1a227e00
+67e1000a
+18007253
+d8a00163
+1a208c01
+efe08006
+1a220c00
+c2807548
+20600000
+4482c000
+6fe1000a
+98000a00
+18007253
+d8c00163
+20207548
+df200001
+68488006
+18408401
+2841fe01
+2420b849
+d8400000
+60488006
+184ffe53
+da204040
+9a20a200
+efe08011
+c280b850
+c3800000
+c2003845
+20600000
+44834000
+da603870
+20403866
+24628000
+1a227e00
+67e1000a
+18007c00
+20600000
+da6038a7
+20203866
+6848c10e
+da603879
+20203866
+4483c000
+684b410f
+da603873
+20203866
+da60387f
+20203866
+da6038c2
+44844001
+da204040
+df200001
+efe08011
+1a627a00
+4484c001
+1a20a253
+c2003869
+18007c01
+20600000
+c280386b
+18007c00
+20600000
+c300386b
+1a208c10
+efe30006
+98467c00
+20628000
+2020386b
+c300386b
+1a208c16
+efe08006
+98467c00
+20628000
+2020386b
+c300b86b
+204038af
+20403897
+98467e00
+1fe0fe01
+20213891
+18c22400
+67e484cc
+44854001
+6fe484cc
+1a420c00
+1fe0fe05
+2020388c
+2421386b
+18424200
+204038bb
+18007c00
+20600000
+98002400
+1a208c02
+efe10006
+203a388d
+204038bb
+20203880
+1ff11600
+196c9600
+2022b8a1
+29601e0f
+24608000
+18511600
+196c9600
+24628000
+7920041c
+20600000
+18511600
+196c9600
+29601e0f
+24608000
+79207e1c
+20600000
+c300386b
+18007c00
+20600000
+c300386b
+1a208c01
+efe08006
+c280386b
+20600000
+1a208c01
+e8408006
+1c427e00
+284ffe01
+1a208c04
+e8420006
+20608000
+1a208c08
+efe30006
+20403905
+1d027e00
+20600000
+1a208c02
+1a208a04
+efe10006
+98409600
+19627e00
+e7e20005
+20203d83
+c300b86b
+204038af
+9b60fe00
+9b60fe00
+98e0fe00
+98467c00
+2421386b
+18007c00
+20600000
+4485c001
+784efc00
+784e7c00
+7846fc00
+78467c00
+7844fc00
+78477c00
+7843fc00
+2030b913
+37d38200
+20000064
+20203913
+44864001
+78487c00
+18423600
+20403865
+78547c00
+24628000
+18003600
+78347c00
+20600000
+4486c001
+37d10200
+1b427e00
+98000c00
+1ff17e00
+9c467200
+1f217203
+2422b8ea
+18007e00
+202038ee
+6849003f
+18007e00
+9840fe00
+c20038ec
+98c0fe00
+1fe6fc0c
+204075cd
+67e1002a
+20600000
+44874001
+1b427e00
+1b220400
+98467c00
+7d217e2c
+98460400
+6fe1003f
+284c000f
+2020b901
+18426000
+d8410000
+6fe1003f
+98467e00
+9e008400
+604b016b
+20600000
+78587c00
+6fe3016b
+9b20e000
+1e00e00a
+6fe1003f
+9e067e00
+2fec000f
+2020b911
+58010000
+6b01003f
+9b067e00
+9e00e000
+1e023400
+20600000
+18007c00
+2020390f
+4487c001
+20406449
+18002a08
+18002a00
+7850fc00
+78507c00
+782f7c00
+70890005
+20000002
+70890000
+20403925
+708a1600
+708a0a80
+6ff08a09
+793ffe07
+67f08a09
+708a0b00
+20203a6b
+44884002
+70890005
+20000002
+70890000
+6fe0c09a
+c00c392c
+c0043941
+708a10aa
+708a11aa
+708a1215
+708a0a78
+6ff08a09
+79207e07
+67f08a09
+708a0b04
+2000003c
+708a167a
+708a1700
+708a1800
+708a1900
+708a1a00
+708a112a
+708a0a78
+6ff08a09
+793ffe07
+67f08a09
+708a4300
+20600000
+708a8729
+708a8be6
+708a10aa
+708a11aa
+708a1215
+708a0a78
+6ff08a09
+79207e07
+67f08a09
+708a0b04
+2000003c
+708a163a
+708a1700
+708a1800
+708a1900
+708a1a00
+708a112a
+708a0a38
+2020393c
+4488c002
+6fe0c09a
+1fe67c18
+2042b95e
+2442b964
+60488008
+1840fe00
+c516b95d
+1840fe01
+20203989
+708a4300
+708a3d04
+708a3e00
+708a8403
+708a8940
+20600000
+708a4330
+708a3d06
+708a3e00
+708a8420
+708a8915
+20600000
+44894002
+20406443
+6fe0c118
+c07fb973
+d8c04119
+98c08c00
+efe08006
+67f08961
+70896027
+6848c11c
+6ff08960
+9841fe00
+67f08960
+708a10aa
+708a112a
+708a1213
+708a0a7f
+6ff08a09
+793ffe07
+67f08a09
+2000003c
+708a171f
+708a18f8
+708a1918
+708a1000
+708a1120
+2000000a
+70890004
+20000002
+7089000c
+20600000
+4489c002
+d8c00960
+98c0fe00
+6848c09a
+20203998
+448a4002
+6fe0c09a
+1fe67c18
+2042b9bb
+2442b9c2
+58000960
+9a20fe00
+1fe3fe00
+6848c09a
+184f8403
+18438400
+9846fc00
+204075d0
+1807fe00
+67f08a3f
+18077e00
+1ff07e00
+1fed7e00
+9846fc00
+204075d0
+1807fe00
+67f08a42
+1fecfe00
+67f08a41
+1fecfe00
+67f08a40
+68588a43
+184104f0
+60588a43
+2000000c
+6fe0c09a
+c00c39af
+c00439b5
+1841840c
+60588a43
+2000000c
+18418403
+60588a43
+20600000
+1841843c
+60588a43
+2000000c
+18418433
+60588a43
+20600000
+708a4300
+708a3d12
+708a3e00
+708a8403
+708a8ba6
+708a8940
+20600000
+708a4330
+708a3d15
+708a3e00
+708a8420
+708a8ba6
+708a8915
+20600000
+448ac002
+708a3d12
+60488008
+1840a202
+2040398e
+200003c0
+448b4002
+708a10aa
+708a112a
+708a1210
+708a0a7f
+6ff08a09
+793ffe07
+67f08a09
+708a0b07
+2000003c
+708a190d
+708a1af9
+708a1000
+708a1120
+2000000a
+70890001
+20000002
+70890003
+448bc002
+6fe0c116
+c001b9f1
+c002b9f6
+c00339f9
+c003b9fc
+c00539ff
+c041ba02
+c042ba05
+c04a3a08
+c04f3a0b
+708a396a
+708a3a07
+708a14a3
+708a1507
+20600000
+708a3966
+708a3a0b
+708a14aa
+708a150a
+20600000
+708a396c
+708a3a0d
+202039f3
+708a396b
+708a3a0f
+202039f3
+708a39a7
+708a3a0f
+202039f3
+708a39b6
+708a3a0f
+202039f3
+708a3968
+708a3a05
+202039ee
+708a3960
+708a3a05
+202039ee
+708a3953
+708a3a01
+202039ee
+708a394c
+708a3a00
+202039ee
+70804206
+6fe1409d
+c3073a0f
+98000c00
+d8408a00
+efe08006
+c07fba19
+98418a00
+efe08006
+e7e08005
+20203a13
+448c4003
+6fe0c3eb
+205a6df0
+708a0305
+708a7a94
+20403a40
+20403a3b
+20403a36
+708a8be6
+708a8390
+708a0e0b
+708a0f05
+70896876
+70896976
+6fe0c09a
+c0843a2a
+708a0834
+708a01ff
+20000064
+708a020e
+708a0003
+204039ec
+708a9a2b
+708a9b13
+20403aa1
+20000064
+70804205
+70411d0c
+20203d36
+6fe0c3e7
+243a3a39
+58000029
+67f08a87
+20600000
+6fe0c3e8
+243a3a3e
+58000000
+67f08a0d
+20600000
+6fe0c3e9
+203a3a43
+580000d3
+67f08a6c
+20600000
+448cc003
+6ff089a2
+2feffe06
+7920fe07
+67e0c117
+6ff089a3
+1fe1040f
+18438400
+1ff1fe00
+98408400
+184fa203
+6fe0c117
+20403a5b
+1fe67e00
+9a20fe00
+1fe0fff7
+1fe17fff
+2feffe08
+2420ba59
+58000000
+67e08030
+20203a60
+2feffe07
+24608000
+d840ff00
+9841fe00
+20600000
+6fe08030
+20403a64
+67e08009
+20600000
+1fe17eff
+1fe6fc0a
+204075cd
+1ff27e00
+18070400
+9841fe00
+20600000
+448d4003
+6fe0c118
+c17f8000
+242c3a92
+6fe0c117
+1fe67cf0
+24213a96
+1fe67c7f
+20213a96
+6a308961
+6fe0c118
+c1000000
+d8c04119
+98c08c00
+efe08006
+9a267c00
+24628000
+18c08dfe
+e8408006
+1851fe00
+1a31a400
+9a462400
+18417e0f
+1a21220f
+9a262200
+1a23fe00
+9a40a400
+1a4fa403
+6848c117
+18417e80
+207a0000
+58000100
+98460400
+1a427e00
+98467e00
+20610000
+1fe17eff
+c17f8000
+c17f0000
+6fe0c118
+c000ba9b
+c0013a9d
+20203a9b
+6fe0c118
+c0003a9d
+c000ba99
+70411802
+20600000
+70411800
+20600000
+70411801
+20600000
+58000f0f
+20203c2e
+5800080f
+20203c2e
+1fe20400
+448dc003
+18427e00
+2040759a
+1c307e00
+79207e2c
+20407580
+793ffe2c
+20403ab2
+20407580
+20740000
+2040758d
+98003600
+37c18200
+20600000
+1b220400
+20748000
+1b420400
+20600000
+1c427e00
+20748000
+1d027e00
+20600000
+448e4003
+20203aba
+207a0000
+1fe37e00
+1fe0fffd
+1fe0ffff
+2422babf
+18007e00
+20600000
+58000000
+67e30000
+d8a00163
+df20000a
+20407500
+7004c300
+7001b600
+58000e43
+67e10031
+58000600
+67e10033
+58000600
+67e10035
+58000d00
+67e1003b
+580003bb
+67e10037
+58000500
+67e10039
+580007d0
+67e1003d
+58000ea6
+67e1003f
+580001e0
+67e10041
+58000120
+67e10043
+5800011a
+67e10045
+448ec003
+20758000
+58000d00
+67e14312
+58000060
+67e14314
+1c437e00
+67e24096
+20600000
+20758000
+448f4003
+6ff08a0a
+79207e03
+67f08a0a
+200004b0
+793ffe03
+67f08a0a
+20600000
+70804206
+70804201
+2000000a
+58001d4a
+67f10040
+20600000
+5800ee21
+67f10050
+6ff2011c
+67e204f2
+70804783
+6ff08133
+67e084f1
+6ff08136
+c301e79d
+7835fc00
+c303bb0a
+7855fc00
+1ce27e00
+243a3b0a
+6ff08133
+c2813b0a
+d85fffff
+20203b95
+6ff20138
+67f2004c
+6ff08139
+1fe17ee0
+67f0804d
+20403c49
+6ff18134
+67f1804c
+efe08006
+1fe1feef
+e7e08005
+20403c3a
+6ff0804f
+79207e04
+67f0804f
+20403c3a
+2055bb37
+6ff0804e
+793ffe03
+67f0804e
+20403c3a
+2435e79d
+c6958000
+70800608
+20600000
+6fe0c3e6
+c000bb2b
+c0013b2f
+c001bb33
+6fe0c0cd
+1fe17ee0
+67e0c0cd
+20600000
+6fe0c0cd
+1fe17ee0
+1fe1fe1d
+20203b29
+6fe0c0cd
+1fe17ee0
+1fe1fe1b
+20203b29
+6fe0c0cd
+1fe17ee0
+1fe1fe17
+20203b29
+6fe0c0e8
+67f08080
+d8c040d0
+d8a08070
+df20000d
+20407548
+6fe440e0
+98000000
+6ff4013c
+67e40016
+2020682c
+18027e00
+67e440e0
+d8c08070
+d8a040d0
+df20000d
+20407548
+6ff08080
+67e0c0e8
+20203c4b
+6ff0806f
+1feb7e00
+1fe17e0f
+243a3b55
+6fe1c0be
+247a0000
+6ff0806f
+1fe1fe30
+67f0806f
+70800680
+6ff08129
+c4008000
+6ff18145
+67e1c0be
+20600000
+448fc003
+1b427e00
+2040757e
+684a40ae
+18467cff
+20610000
+1fed7e00
+1ff27e00
+9846fc00
+204075cd
+d84000c8
+204075db
+67e0800e
+24343b69
+1fe67e00
+6849c0be
+9840fe00
+67e1c0be
+58000000
+67e240ae
+20600000
+d85fffff
+6fe0c0c5
+793ffe07
+67e0c0c5
+44904004
+20403c4b
+6fe0c0a8
+67e0c0cb
+6fe0c0c9
+79207e07
+67e0c0c9
+4490c004
+20403a9f
+6fe1439e
+204075e6
+6fe240ae
+9840fe00
+67e240ae
+20403b42
+20403b23
+6fe240cc
+1fe22400
+6fe2c0c7
+67f2004c
+1fef2200
+37d98200
+1b227e00
+67e340b2
+70800502
+37d98200
+37d98200
+1a227e00
+67f0804f
+70800502
+37d98200
+37d98200
+6252004c
+70800520
+37d98200
+37d98200
+605a004c
+70800510
+37df8200
+44914004
+58000000
+1ce27c00
+2022bba5
+6ff08134
+68588135
+98467c00
+20213ba3
+18427e00
+9ce67e00
+1fe0fe01
+1fe0fe0a
+37d98200
+9e20fe00
+684a40aa
+9840fe00
+6849c0be
+984ffe00
+1fecfe00
+1ff1fe00
+1fe0fe6e
+6849003f
+9846fc00
+204075cd
+1ff07e00
+18070400
+9841fe00
+684b40b2
+20407573
+18423200
+6fe34048
+20403905
+1b427e00
+67e304c4
+1ce27e00
+e7e08005
+6ff0811d
+1fe1fef0
+e7e08005
+20600000
+4491c004
+20403b4b
+6fe1c0be
+207a0000
+6fe0c094
+207a0000
+da6038aa
+20403866
+20628000
+20403c5c
+247a0000
+2040385a
+2422bbed
+20758000
+44924004
+68488015
+6fe14042
+984ffe00
+18518400
+184b0400
+98467e00
+684a4044
+9840fe00
+6848c0a7
+98467e00
+1ff06000
+6fe1404e
+1fe37e00
+2040759a
+1e027e00
+20407580
+1b420400
+2040757e
+20740000
+20407593
+4492c004
+6fe0c0c7
+98467c00
+20213b6c
+604a40aa
+20404dc6
+684a40aa
+20203b7a
+44934004
+6fe0c35b
+243a3bf1
+20600000
+6fe140a5
+207a0000
+6848c0a7
+98467e00
+d8401d4c
+984ffe00
+20203be4
+6fe1439a
+204075e6
+243a3c10
+70001500
+c586bc10
+6fe0c0c3
+203a3c14
+1fe0ffff
+67e0c0c3
+20600000
+7040a900
+6fe1c0b8
+1fe0fe01
+67e1c0b8
+20600000
+4493c004
+70001500
+6fe1c0bb
+1fe0fe01
+67e1c0bb
+6fe0c0a9
+1fe0fe01
+67e0c0a9
+20600000
+70001500
+6fe0c0c2
+67e0c0c3
+20600000
+6848c0c1
+60488015
+20600000
+6fe0c0c7
+247a0000
+70804206
+58000f0c
+20403c2e
+58030d40
+20403abc
+37d98200
+1e226000
+20403a9f
+70804204
+2000000a
+37d98200
+1e227e00
+9e067e00
+1fe0fe30
+d84000ff
+204075db
+67e0c0c7
+20007530
+20007530
+20007530
+20600000
+d8a00fff
+98a10a00
+6fe0c0c4
+1fe17ef0
+1fed7e00
+98a1fe00
+67f1004c
+efe10006
+e7e10005
+44944005
+58000001
+20203c3c
+4494c005
+58000002
+37d98200
+67f08005
+37d98200
+37d98200
+20600000
+44954005
+6ff20138
+67f2004c
+6ff08138
+1fe17e41
+6848c0cc
+9841fe00
+67f0804c
+58000020
+20203c3c
+4495c005
+6fe20016
+67f2004c
+58000004
+20403c3c
+6fe2001a
+67f2004c
+58000008
+20203c3c
+6fe140a3
+f9207e00
+67e140a3
+20600000
+6fe140a3
+f93ffe00
+67e140a3
+20600000
+44964005
+20404dc4
+6fe140a3
+1fe22200
+6fe1c3f8
+7d3a2201
+6fe44419
+7d3a220f
+6fe44421
+7d3a220e
+6fe0c10d
+7d3a2208
+6fe0c095
+2fe1fe0a
+2040bc6e
+1a227e00
+67e140a3
+20600000
+6ff10112
+7d3a2206
+6ff1010e
+7d3a2205
+20600000
+6ff20130
+793ffe1b
+67f2004c
+20403c37
+20203aba
+6ff20134
+793ffe14
+67f2004c
+20203c3a
+44e44019
+7855fc00
+70017901
+70016303
+70017a01
+5fffffff
+67e1017d
+18007e00
+67e0817b
+67e08186
+67e1c0b8
+67e1c0bb
+20403fd8
+70412901
+70412a00
+70019801
+70019901
+70436900
+202040b4
+44e4c019
+7834fc00
+70016403
+70436b01
+70050601
+5800ffff
+67e10508
+18007e00
+67e2c402
+79207e27
+67e2c3fd
+20203c7c
+44e54019
+7854fc00
+58000017
+67e142b6
+1fe0fe04
+67e14378
+70016401
+70435b00
+70001500
+20403d05
+6fe10191
+67e142c8
+6fe10165
+1feffe05
+1ff1fe00
+67e10191
+20203c7c
+44e5c019
+20403d2f
+6fe08163
+2feffe04
+79208032
+20404db3
+6fe08164
+c280bcb5
+20203cc7
+44e64019
+7834fc00
+204040aa
+20213cc4
+20403d75
+20403fed
+7856fc00
+20403eab
+24768000
+6fe08005
+1fe0fe01
+67e08005
+20403f9e
+7854fc00
+20600000
+20403cfa
+7854fc00
+20600000
+44e6c019
+70431100
+793f8030
+78577c00
+204040aa
+20213cfa
+6fe08198
+20403d16
+20403d75
+20403dcc
+242c3ceb
+20403d09
+2036bcd6
+c5183cd6
+20203ce5
+44e74019
+6fe0c311
+1fe0fe01
+67e0c311
+c0063ce5
+20403f9e
+20403fed
+6fe08199
+20403d16
+20403ebc
+20404050
+6fe14396
+204075e6
+20403cef
+20343cf4
+44e7c019
+204046c1
+204046b8
+204070b1
+6fe08186
+c281bcfa
+44e8401a
+204038cb
+2040417e
+202038f3
+78547c00
+c5157636
+c514f636
+c5187636
+20600000
+44e8c01a
+78377c00
+20403eaf
+2036bcd6
+c5183cd6
+20203ce5
+44e9401a
+20403d00
+20404e03
+20403d05
+7004c315
+2020709b
+d8a043ee
+20407504
+70017900
+70016400
+70016300
+44e9c01a
+7042d000
+7042cf00
+20600000
+44ea401a
+6fe08005
+1fe0fe01
+67e08005
+6fe08163
+c3818000
+79207e03
+67e08163
+6fe142c8
+67e10191
+58000000
+67e242f0
+20600000
+1fe20400
+44eac01a
+18427e00
+c2803d2f
+c280bd1f
+c3013d2f
+c283bd2c
+c2813d25
+20203d2f
+20403d2f
+7920002d
+793f802f
+70890103
+70892084
+20600000
+20403d2f
+7920002f
+793f802e
+70890105
+70892080
+70893020
+20600000
+20403d25
+7920002e
+20600000
+44eb401a
+793f802d
+793f802f
+70890101
+70892080
+70893003
+20600000
+44ebc01a
+793f8032
+70890101
+70892080
+70893003
+20600000
+44ec401b
+7844fc00
+7843fc00
+6fe1818b
+98001e00
+6fe08007
+1fed8400
+79200401
+18431c00
+20600000
+20403d4f
+20403954
+6fe10039
+20403abc
+2020396a
+2036b9cf
+c51839cf
+20403d4f
+202039c9
+44ecc01b
+20403925
+6fe081b6
+243a3d62
+6fe08007
+1fe67c24
+20213d5c
+18000400
+c1128000
+18000418
+c1130000
+1800044e
+20600000
+1fe67c0a
+20213d5f
+1fe0fe01
+1fe3fe00
+1fe08402
+20600000
+6fe08007
+1fe38400
+20600000
+d84001f4
+207a0000
+d84000fa
+c1008000
+d8400096
+c1010000
+d8400064
+c1018000
+d840004b
+c1020000
+d8400032
+c1028000
+d8400028
+c1030000
+d8400014
+20600000
+44ed401b
+78287c00
+6fe20187
+98001200
+20403daa
+58000200
+2034bd7e
+6fe10171
+1fe37e00
+68490039
+9840fe00
+20403aa3
+1b427e00
+20600000
+44edc01b
+204074b7
+672104ef
+1a208c01
+efe08006
+c4000000
+1a208a1a
+efe10005
+1fe0fe01
+e7e10005
+20403f1d
+20403f3f
+20403f48
+20403d94
+204074c6
+6f2104ef
+20600000
+1a208c19
+efe08006
+1a208a18
+e8408005
+9840fe00
+1fe67c24
+20213d9c
+1fe0ffdb
+e7e08005
+20600000
+1a208c30
+efe28006
+18000400
+18007225
+c3003da4
+18408401
+1fe37e00
+c2003da2
+1840ffff
+1a208a22
+e7e08005
+20600000
+44ee401b
+6fe0817b
+98000e00
+684a8193
+a84fffff
+2020bdbf
+6fe08185
+98e67e00
+20213db5
+1fe60fff
+20203db0
+18e27200
+18000e00
+a84fffff
+2020bdba
+1f20f201
+1f227e00
+203a3dbf
+18e08e01
+1f20f3ff
+20203db7
+18e27e00
+67e08007
+20600000
+2034bdc5
+37c18200
+20600000
+d9600ea0
+34730200
+20600000
+78487c00
+6fe14319
+1fe21600
+20203dd2
+44eec01b
+20403e39
+78287c00
+6fe10171
+684a42f0
+98409600
+20403d46
+44ef401b
+20403d3c
+c597bdda
+783cfc00
+2000001e
+20403d3c
+19699600
+7856fc00
+7826fc00
+7830fc00
+78507c00
+19623600
+37c18400
+20373de3
+1b420400
+604b000f
+242c3e75
+44efc01b
+78287c00
+db604eab
+6fe0c11d
+9b6fb600
+2040644b
+20373df0
+20403e7a
+6fe08163
+c301bdf0
+684b000f
+2055bb5a
+20403a45
+7823fc00
+7824fc00
+09800008
+19897e00
+67e08047
+09800008
+19897e00
+67e08048
+1fe27200
+2022be16
+c5193e01
+09800008
+19897e00
+e7e08005
+c2003dfc
+20203e16
+18a22400
+44f0401c
+20403f97
+6a208048
+1a20a3fc
+24213e6d
+20403e3e
+1a420a00
+d8400000
+6f208048
+1f20f3fc
+2022be14
+09800008
+19897e00
+e7e08005
+18408401
+18417c0f
+2042be5c
+c2003e0d
+20403e64
+1a420a00
+44f0c01c
+09800018
+1fef7e00
+1ff17e00
+e7e18005
+78287c00
+20403e88
+20233e71
+c5993e28
+6fe08048
+203a3e28
+1fe0fffc
+67e08048
+20406f07
+6ff08108
+c303be6d
+1800700c
+65e2014f
+2040644a
+7836fc00
+793f8030
+44f1401c
+20406f09
+6fe08198
+7d3e7e07
+67e08198
+20403e33
+7846fc00
+20203925
+44f1c01c
+68488008
+1840a202
+c516b98e
+1840a201
+2020398e
+c6990000
+20406fa4
+1800700c
+20406fac
+20206fab
+44f2401c
+70806c00
+70806d01
+6fe08047
+1fe17e03
+67f0806e
+58000049
+67f10068
+67f1006a
+6a208048
+1a20a3fc
+684ac402
+280ffe0f
+2040be52
+20406e74
+58000000
+67f100c1
+70800a06
+70800a07
+20600000
+18467c00
+2022be57
+184085ff
+79200427
+20600000
+58ffffff
+1ff07e00
+d840ffff
+98418400
+20600000
+18a22400
+6fe08048
+1fe0fffc
+98467c00
+20628000
+605900c1
+1a420a00
+20600000
+09800020
+1fef7e00
+1fecfe00
+e7e20005
+18a22400
+18007000
+1fe25e00
+605900c1
+20600000
+20203e77
+20403e88
+204038cb
+20203e28
+2040644c
+c5183e75
+79200030
+20203e2b
+793f8030
+20203e77
+44f2c01c
+20406f09
+202038cb
+c517be80
+c516be84
+6fe10041
+1fe25200
+1c225000
+20600000
+6fe10045
+1fe25200
+1c20d001
+20600000
+6fe10043
+1fe25200
+1c225000
+20600000
+6fe08048
+1fe08405
+18498400
+6fe08198
+c517be8f
+c2803e91
+c280be92
+203e3e94
+20203e97
+20203e9c
+18430400
+20203e9c
+18408403
+18438400
+20203e99
+18408403
+18498400
+58000028
+98408400
+20203e9c
+6fe0c11d
+984f8400
+da204e20
+9a2ffe00
+98460400
+1b627e00
+98463600
+20600000
+20403ebc
+68488008
+20403954
+2040396a
+78287c00
+d960157c
+20203dd3
+44f3401c
+6fe08199
+20403d16
+20403ebc
+6fe08198
+20403d16
+68488008
+20403954
+2040396a
+78287c00
+d960157c
+c597bdd3
+d9602134
+20203dd3
+44f3c01c
+20403ebc
+202038cb
+44f4401d
+20403d3c
+20403d4b
+20406451
+79202a00
+782efc00
+78307c00
+7850fc00
+20403dc2
+785d7c00
+c517beff
+c516bf11
+19317e00
+1fecfe00
+1ff1fe00
+08008628
+7823fc00
+7824fc00
+44f4c01d
+6fe0c129
+08008608
+efe08006
+1fe27200
+08008608
+1f267c00
+2022bedd
+6ff0800a
+203a3ed9
+c5193ef4
+d8c0412b
+efe08006
+08008608
+c2003eda
+78247c00
+08008618
+78447c00
+c597bee4
+7843fc00
+58000000
+08008603
+37d38200
+20000064
+44f5401d
+784efc00
+785c7c00
+20403925
+2040644f
+6fe0c129
+1fe17e03
+c1818000
+6fe0c2d0
+c0013fd8
+c1828000
+6fe0c12b
+c002bfd3
+20600000
+1f20f3fc
+1f220400
+20406ef4
+d8c0412b
+efe08006
+08008608
+c2003ef8
+20406ef9
+1de27e00
+08008620
+20203edd
+df20000a
+5800003c
+08008608
+c2003f00
+784efc00
+783c7c00
+19317e00
+1ff17e00
+1ff1fe00
+08008620
+c5173f0e
+58000001
+08008605
+783d7c00
+20203ecc
+58000000
+08008605
+20203ecc
+6fe0c11d
+1fe37200
+20000002
+c2003f13
+19317e00
+1fecfe00
+1ff18400
+18427e00
+08008608
+18427e00
+08008628
+20203ecc
+da603f21
+da403f37
+d8e00005
+20203f76
+1a208c04
+e8420006
+1a208c37
+efe08006
+1a208a2b
+e7e08005
+efe10006
+1febfe00
+98409600
+1a208a04
+19627e00
+e7e20005
+efe10006
+1febfe00
+1a208a02
+e7e10005
+efe10006
+1a208a2c
+e7e10005
+efe10006
+67e142c8
+202040b7
+efe08011
+793ffe03
+e7e08011
+622104d8
+7004c344
+2040709b
+6a2104d8
+20600000
+da600000
+da403f43
+d8e00006
+20203f76
+1a208c37
+efe28006
+1a208a30
+e7e28005
+20203d9e
+da600000
+da403f4c
+d8e00007
+20203f76
+1a208c37
+efe08006
+20403f59
+e7e08005
+1a208c38
+efe08006
+20403f67
+e7e08005
+622104d8
+7004c342
+2040709b
+6a2104d8
+20600000
+205a3f61
+1a208a35
+24748000
+6848c376
+284ffe07
+7920fe07
+1a208a36
+20600000
+1a208c35
+efe08006
+24748000
+1a208c36
+efe08006
+20600000
+205a3f70
+6848c376
+284ffe07
+7920fe07
+1a208a36
+24748000
+793ffe07
+1a208a35
+20600000
+1a208c36
+efe08006
+24748000
+1a208c35
+efe08006
+20600000
+44f5c01d
+efe08011
+afec0000
+20608000
+1a208c1a
+e8410006
+1a208c20
+efe10006
+98467e00
+2022bf86
+24213f8b
+1fe67c01
+2022bf84
+20600000
+1a627e00
+202075e6
+efe08011
+f93ffe00
+e7e08011
+1a427e00
+202075e6
+1a208c1a
+efe10006
+1a208c20
+efe10006
+98467e00
+d840ffff
+98467c00
+2022bf86
+d840f000
+98467c00
+24213f86
+20600000
+6848817a
+6fe08047
+1fe37e00
+9842fe00
+2feffe02
+7920800f
+20600000
+44f6401d
+204040b4
+c6180000
+20403fc5
+6fe08047
+2feffe04
+7920802a
+1fe37e00
+9842fe00
+2feffe02
+7920800f
+c6078000
+6fe08048
+203a3fb7
+6fe08163
+c3023fb7
+684a014f
+6fe24407
+98467c00
+2022baba
+604a4407
+6fe2c402
+1fe0fe01
+79207e27
+67e2c402
+6848817a
+79400402
+6048817a
+6fe0c2f4
+c4030000
+44f6c01d
+6fe08048
+207a0000
+6fe08047
+2fe00601
+2020c5c5
+2fe00602
+2020c5b3
+20600000
+44f7401d
+6848817a
+284c0005
+20608000
+6fe08047
+1fe3fe00
+9842fe00
+c4018000
+793f8405
+79400403
+6048817a
+28400603
+24608000
+20600000
+6fe08163
+79207e04
+67e08163
+79200032
+20600000
+44f7c01d
+7042d000
+dfe00000
+67e24407
+67e2c3fd
+79207e27
+67e2c402
+6fe08163
+793ffe04
+67e08163
+793f8032
+20600000
+da200001
+6fe08047
+c3830000
+da200000
+20600000
+18c20a00
+68494378
+18a20c00
+20600000
+44f8401e
+6fe0817a
+c3828000
+2040400e
+204041eb
+203a4032
+efe10006
+e8410006
+18422200
+9a267e00
+20403fe9
+2040762c
+1fe20400
+e8208006
+1a227e00
+98c0fe00
+67e104e3
+20404022
+20404034
+204041eb
+efe10006
+1fe22200
+18c22600
+e8410006
+18422400
+9a467e00
+20403fe9
+2040762c
+9a40fe00
+e7e10013
+9a267c00
+24628000
+20204205
+20404015
+c6148000
+6fe0c2f4
+c3014020
+204041ef
+203a4020
+2020401e
+204041eb
+203a4020
+efe10006
+e8410006
+98462200
+20403fe9
+18427e00
+9a267c00
+20214020
+79200029
+20600000
+793f8029
+20600000
+1a227e00
+207a0000
+d8200001
+20600000
+44f8c01e
+18408401
+204040e6
+18c08dfe
+efe10006
+d8402902
+98467c00
+24628000
+18c08c01
+18c22200
+efe08006
+20600000
+18000400
+18000201
+44f9401e
+6048c12a
+6848817a
+79200405
+18417efc
+9821fe00
+67e0817a
+1fe17e1f
+280ffe29
+7920fe04
+67e0c129
+6fe0c129
+28200601
+2420c044
+6fe0c12a
+207a0000
+c519404a
+6f20c12a
+6fe104e3
+1fe20c00
+d8a0412b
+2020753b
+20406fa4
+20206edb
+d8e00000
+20203c54
+d8e00000
+20203c58
+44f9c01e
+c6078000
+c6180000
+6fe08047
+1fe17e03
+67e0c307
+6fe08048
+207a0000
+58000049
+67e1430c
+44fa401e
+6fe0c307
+c001c6ff
+2040406a
+2434404c
+2040404e
+58000000
+67e1430a
+6fe1430c
+1fe08c02
+44fac01e
+efe10006
+c0024362
+c0034616
+c002c5ea
+20600000
+6fe0c307
+c0014079
+c000c090
+20600000
+20407636
+d8400004
+9fe67c00
+20628000
+d8400005
+9fe67c00
+20628000
+d8400006
+9fe67c00
+20628000
+20207638
+6fe1430c
+1fe20c00
+efe10006
+67e14308
+efe10006
+2040406e
+24740000
+68488048
+6049430a
+6fe14308
+1fe0fe04
+98467c00
+2022f636
+6f208048
+d8a00f00
+6fe1430c
+1fe20c00
+2040753b
+20207638
+20407636
+6fe1430a
+247a0000
+20207638
+2040408c
+24740000
+6fe1430a
+d8a00f00
+98a0a200
+68488048
+9840fe00
+67e1430a
+6f208048
+1a220a00
+6fe1430c
+1fe20c00
+2040753b
+58000f00
+67e1430c
+6fe14308
+1fe0fe04
+6849430a
+98467c00
+2022f636
+20207638
+204074d3
+d8a0428d
+202045ad
+6fe14394
+202075e6
+44fb401e
+684a017f
+20403ab6
+98461600
+19627e00
+68490191
+18520400
+18438400
+98467e00
+20600000
+20403ab6
+67e2017f
+20600000
+44fbc01e
+1a208c50
+efe08006
+20403d65
+1a208c02
+efe10006
+984ffe00
+6849003f
+984ffe00
+d84f4240
+9846fc00
+d8400682
+6fe0c11d
+984f8400
+1a208c2b
+efe08006
+984ffe00
+9840fe00
+67e242f0
+6fe1409b
+204075d0
+18078400
+9840fe00
+1a208a0e
+e7e10005
+20600000
+44fc401f
+6fe10506
+98002400
+6fe10508
+98002600
+6fe142ca
+98000c00
+78347c00
+20600000
+efe10006
+1fe17eff
+207a0000
+9a467c00
+24610000
+9a667c00
+20628000
+202140e4
+18007c01
+20600000
+18007e00
+20600000
+204040e9
+2022c0f6
+20600000
+44fcc01f
+6fe142ca
+98000c00
+efe10006
+1fe17eff
+207a0000
+98467c00
+20628000
+efe08006
+98c08c00
+efe08006
+98c08c00
+202040ec
+efe08006
+98c08c00
+20600000
+44fd401f
+6fe142ca
+98000c00
+efe10006
+1fe17eff
+207a0000
+efe08006
+98c08c00
+18c08dfe
+efe10006
+98467c00
+20628000
+efe08006
+98c08c00
+202040fc
+6fe142ca
+98000c00
+efe10006
+1fe17eff
+207a0000
+1fe08401
+efe08006
+98c08c00
+efe08006
+98c08c00
+18c20a00
+2020410a
+6fe1051c
+20204118
+44fdc01f
+6fe142ca
+98000c00
+efe10006
+1fe17eff
+203a4123
+98467c00
+2022c124
+efe08006
+98c08c00
+efe08006
+98c08c00
+20204119
+20207644
+efe08006
+67e08522
+1fe27200
+d8a00523
+2040753b
+efe08006
+67e0851b
+204074d3
+20207646
+44fe401f
+20404130
+20204142
+d8402a00
+204040f9
+207a0000
+efe08006
+18c20a00
+6848c22b
+18427200
+98467c00
+2421413f
+98460400
+d8c0422c
+2040753b
+18427200
+2442c17a
+20600000
+1fe27200
+d8c0422c
+2020753b
+da60433b
+da20431c
+2040414f
+58000000
+79347e00
+67e084c4
+da60435b
+da20433c
+2040414f
+20740000
+6fe084c4
+203a3aba
+20600000
+44fec01f
+20407636
+20407515
+da400000
+d8a004f7
+20404169
+6fe0c22b
+1fe08401
+9a40a200
+1a20a202
+1a267c1f
+24214167
+e0408005
+d8400009
+e0408005
+98007200
+2040753b
+1a222400
+1a427e00
+67e084f6
+d8c004f6
+5fffffe0
+9a608a00
+202074f3
+20407638
+20204161
+efe08011
+207a0000
+1fe0fe01
+e8408006
+18467c09
+2022c178
+9a40a400
+1a220c00
+98007200
+2040753b
+18c22200
+1a227e00
+9a667c00
+20610000
+20204169
+9a20a200
+20204174
+58000020
+e7e08005
+c200417a
+20600000
+44ff401f
+7855fc00
+20374182
+2436c191
+20403c02
+6fe1409b
+67e10171
+6fe0c2f4
+c282bc10
+c507bc10
+6fe08048
+243a3c10
+6fe0c12a
+243a3c10
+6fe08163
+c282bc10
+c283bc10
+c2833c10
+20203bf8
+6fe0c0a9
+1fe67c1e
+24213c07
+6849409b
+18430400
+6fe10171
+9840fe00
+67e10171
+20203c07
+d8e00000
+202041b2
+d8e00000
+202041b6
+d8e00001
+202041b2
+d8e00001
+202041b6
+d8e00002
+202041b2
+d8e00002
+202041b6
+d8e00003
+202041b2
+d8e00003
+202041b6
+d8e00004
+202041b2
+d8e00004
+202041b6
+d8e00005
+202041b2
+d8e00005
+202041b6
+6fe0c2f4
+f9207e00
+67e0c2f4
+20600000
+6fe0c2f4
+f93ffe00
+67e0c2f4
+20600000
+58112233
+67e1c2f5
+58445566
+e7e18005
+58778899
+e7e18005
+58001122
+e7e18005
+58334455
+e7e18005
+58000066
+e7e08005
+20600000
+59000302
+67e24284
+58010010
+67e1c288
+7042d101
+20600000
+da200000
+d8200001
+202041e0
+44ffc01f
+d8200003
+204041e0
+1a427e00
+e7e08005
+20600000
+47004020
+18000202
+1a20a204
+204041e0
+1a20a3fc
+1a227e00
+e7e10005
+1a427e00
+e7e10005
+20600000
+4700c020
+1a20a205
+20406654
+1a20a3fb
+1a227e00
+e7e10005
+58000000
+e7e10005
+18227e00
+e7e08005
+20600000
+47014020
+2040668e
+1fe20c00
+20600000
+6fe143f6
+20600000
+204041f4
+1fe20c00
+20600000
+6fe143f9
+20600000
+204041eb
+18c08c05
+20600000
+204041eb
+18c08c09
+20600000
+204041f1
+18c08c09
+20600000
+204041f1
+18c08c05
+20600000
+202066a4
+202066a7
+202066aa
+20206693
+67e44380
+20204217
+184122ff
+2040420d
+184ca200
+6220c377
+2020420e
+6220c376
+2a2ffe01
+2040c213
+2a2ffe02
+2040c215
+20600000
+d8e00008
+20204218
+d8e0000b
+20204218
+d8e00005
+6fe4436e
+f9207e00
+67e4436e
+20600000
+70019801
+70019901
+20403d2f
+20404222
+2040429f
+20203d36
+4701c020
+6fe0c316
+c1808000
+d8e00002
+2040755d
+247a0000
+6fe14317
+68494319
+98467e00
+d8e00002
+2040754f
+7854fc00
+204042c9
+20404241
+24768000
+47024020
+6fe30049
+67e30173
+6fe08002
+1fe0fe01
+67e08002
+20404248
+20748000
+204042f0
+24768000
+6fe08004
+1fe0fe01
+67e08004
+6fe4804f
+67e484f6
+20600000
+4702c020
+2040433b
+20403dc8
+6fe08001
+1fe0fe01
+67e08001
+20600000
+47034020
+6fe081b7
+c18d8000
+6fe30173
+684b429f
+98467c00
+24628000
+20403852
+24628000
+20404258
+20403c8f
+70410d00
+7001b300
+70431600
+7001b700
+2020383d
+4703c020
+18007fff
+38080001
+67e28193
+da200163
+20403d9e
+18007204
+d8a00187
+20407662
+6fe142ac
+67e10191
+180a7e00
+1fe17e0f
+1fe67c04
+20214263
+67e0817c
+47044021
+68494127
+60490165
+18422600
+1c40fe07
+9a66fc00
+204075d0
+18072200
+9a267e00
+9a60fe00
+68494125
+9840fe00
+67e20167
+9c462200
+1a20a3fa
+da402205
+6fe0c2a5
+7d3a2406
+6fe0c29e
+7d3a2407
+1a427e00
+67e14129
+6fe342ae
+e7e30005
+6fe30173
+e7e30005
+6fe20187
+e7e20005
+180a7e00
+e7e10005
+180a7e00
+e7e08005
+18007e02
+e7e08005
+1a2b7e00
+e7e10005
+1a6b7e00
+e7e10005
+4704c021
+58000000
+e7e10005
+6fe142ac
+e7e10005
+6fe28193
+e7e28005
+6fe0817c
+d84000a0
+9841fe00
+e7e08005
+20403eb9
+58004129
+1fe08c12
+efe18006
+67e1818b
+20600000
+70000724
+7004f600
+204042c3
+204042a4
+202042c6
+47054021
+6fe0c35b
+207a0000
+d8e00000
+2040755d
+247a0000
+78287c00
+204042c9
+2040433b
+204042d2
+2436c2b6
+6fe08003
+1fe0fe01
+67e08003
+6fe08047
+1fe17e0f
+c001c301
+c002c313
+4705c021
+6fe084f6
+6848c366
+98467c00
+2422c2a4
+180a7e00
+d84001ff
+98417e00
+1fe0fefa
+204074f7
+d8e00000
+6fe1435c
+2020754f
+d8a00506
+d8c04129
+202074f2
+d8c00506
+d8a04129
+202074f2
+47064021
+7854fc00
+588e89be
+1fed7e00
+1fe1fed6
+98001200
+58555555
+67e1818b
+20600000
+4706c021
+6fe0c35e
+6848c35f
+18520400
+184b8400
+98408400
+6048c129
+c000c2e3
+6848c31b
+1840fe06
+67e0c12a
+6fe342ae
+67e3412b
+18427200
+d8c0431c
+2040753b
+202042e9
+5800000c
+67e0c12a
+6fe342ae
+67e3412b
+6fe3410f
+e7e30005
+47074021
+6fe08000
+1fe0fe01
+67e08000
+db600708
+7856fc00
+20203ea4
+4707c021
+6fe0c367
+c1808000
+6fe08000
+1fe0fe01
+67e08000
+d8400c03
+6fe0c368
+7d3a0406
+1a227e00
+7d3a0407
+60494129
+6fe342ae
+e7e30005
+6fe30173
+e7e30005
+20203ea4
+6fe3004f
+684b42ae
+98467c00
+24628000
+d8400004
+6fe0c35f
+7d3a0406
+6048c129
+6848c33b
+1840fe06
+67e0c12a
+6fe342ae
+67e3412b
+d8c0433c
+18427200
+2040753b
+20403eb9
+202042b6
+6fe3004f
+684b42ae
+98467c00
+24628000
+20403fe4
+6220c29e
+6fe30049
+67e30173
+6fe40055
+67e40187
+6849005d
+47084022
+184b8400
+6fe1005f
+1febfe00
+67e10165
+67e20167
+98467e00
+1fe0d1fe
+6fe48061
+67e4818f
+6fe0806a
+1fe1041f
+6048817c
+1ff18400
+18430400
+604881b3
+da200163
+204040b7
+da200163
+20403d9e
+20403c9b
+20403852
+24628000
+4708c022
+204038f3
+20404607
+7004c314
+2040709b
+2020383d
+47094022
+6fe08007
+c012c341
+c0134347
+c013c34d
+2020434d
+6848c366
+284ffe01
+2020c358
+284ffe02
+2020c35d
+20204353
+6848c366
+284ffe02
+2020c35d
+284ffe00
+2020c353
+20204358
+6848c366
+284ffe00
+2020c353
+284ffe01
+2020c358
+2020435d
+70000725
+6fe084f6
+79207e00
+67e084f6
+20600000
+70000726
+6fe084f6
+79207e01
+67e084f6
+20600000
+70000727
+6fe084f6
+79207e02
+67e084f6
+20600000
+efe18006
+67e1c36a
+c0014379
+c001c381
+c0024384
+c00343ad
+c00443fa
+c0054478
+c00644a7
+c00844bd
+c0094500
+c00b4526
+c00c4539
+c00f453e
+c0294542
+20600000
+18002203
+20404568
+58000002
+e7e08005
+6fe142b4
+e7e10005
+20600000
+20404381
+18002203
+20404568
+58000003
+e7e08005
+6fe142b4
+e7e10005
+20600000
+1fecfe00
+67e142b6
+20600000
+2040459c
+20407636
+20204387
+d9600003
+204040d1
+204040da
+203a43ab
+242143a8
+18c08dfe
+204074d3
+204074ca
+2434439b
+204074b7
+20407638
+616204d4
+18002214
+20404568
+696204d4
+204074c6
+58000005
+e7e08005
+58000001
+e7e08005
+204074cd
+efe10006
+1fe17eff
+e7e10005
+efe08006
+1fe27200
+20407548
+204074d0
+196097ff
+2022c3ab
+efe08006
+98c08c00
+20204389
+efe08006
+98c08c00
+202043a5
+2034455b
+2020458f
+2040459c
+efe10006
+67e1428e
+204074d3
+d8a0050a
+6fe14308
+1fe0fff9
+204045af
+202043c0
+78547c00
+68490506
+6fe10508
+98467c00
+242143bd
+18427e00
+c1800000
+78347c00
+7001b401
+2020455d
+204043b6
+20740000
+6849428e
+58002800
+98467c00
+2022c3c7
+2020455b
+70436d00
+68490506
+604904cc
+20404116
+243a455b
+684904cc
+20404116
+243a43e0
+18c22200
+6fe0851b
+1fe27200
+6848850a
+98467c00
+2422c3dc
+da40050b
+204075d2
+2022c3e3
+6fe10523
+6849428e
+98467c00
+2022c3eb
+6fe104cc
+1fe0fe01
+67e104cc
+202043cc
+6fe0c36d
+c000c3eb
+2020455b
+6fe10523
+6849428e
+98467c00
+2422c3dc
+70436d01
+684904cc
+6049051e
+202043dc
+6fe0c36d
+c00043dc
+70436d02
+684904cc
+184085ff
+60490520
+da200005
+20404568
+58000007
+e7e08005
+6fe1051e
+e7e10005
+6fe10520
+e7e10005
+20600000
+2040459c
+204045aa
+202043fd
+68490506
+604904cc
+204040d1
+204040e9
+18c08dfe
+18c27e00
+67e1051c
+6849050b
+58002a00
+98467c00
+2022c464
+58002803
+98467c00
+2422c450
+d9600002
+2040456f
+2421442d
+684904cc
+20404114
+243a442d
+20404573
+2422c42b
+2434442f
+78547c00
+da200014
+20404568
+58000009
+e7e08005
+18a26000
+18a08a01
+2040443d
+2040456b
+20404114
+20404444
+6fe08522
+1fe0a205
+e2208030
+1a267c07
+2442f63a
+2042f63c
+204045a1
+9a26fc00
+204075d0
+18079600
+196097ff
+2022c42d
+2040456b
+2020440c
+2034455b
+2020458f
+2040457f
+2040456b
+20404114
+204044ee
+243a442d
+204074ca
+6fe104cc
+1fe0ffff
+e7e10005
+2040458b
+20404444
+196097ff
+2022c42d
+2020442b
+6fe104cc
+e7e10005
+6fe0851b
+1fe27200
+204074cd
+2040753b
+202074d0
+204074ca
+6fe104cc
+e7e10005
+204074d0
+6fe08522
+1fe27200
+204074ca
+204074cd
+9f260c00
+18c08dff
+2040753b
+202074d0
+204040f9
+203a455b
+18c22600
+18c08dfb
+efe10006
+67e104cc
+da200014
+20404568
+58000009
+e7e08005
+efe08013
+1fe27200
+1fe0fe02
+e7e08005
+6fe104cc
+e7e10005
+1a608c01
+2040753b
+204074d0
+2020458f
+d8402a00
+204040f9
+207a0000
+18c08dfb
+efe10006
+67e104cc
+da200014
+20404568
+58000009
+e7e08005
+6fe0c22b
+1fe27200
+1fe0fe02
+e7e08005
+6fe104cc
+e7e10005
+d8c0422c
+2040753b
+204074d0
+2020458f
+2040451f
+6849436b
+6fe0c2f4
+c281c49d
+204040e9
+2422c55b
+205444a3
+20740000
+204040f6
+18c08dfe
+efe10006
+d8402a00
+98467c00
+2022c493
+efe08006
+1fe67c16
+2021448a
+18007e16
+1fe22600
+204074d3
+1a60a201
+20404568
+5800000b
+e7e08005
+1a627200
+204074cd
+20207548
+204074d3
+6fe0c22b
+1fe0a201
+20404568
+5800000b
+e7e08005
+6fe0c22b
+1fe27200
+d8c0422c
+20207548
+6fe14305
+98467c00
+2422c47c
+2434447c
+7001b405
+2020455d
+18c08dfe
+efe10006
+c28744a1
+20207638
+efe10006
+67e1050a
+da200014
+20404568
+5800000d
+e7e08005
+6fe1050a
+98002200
+6849436b
+204040e6
+203a455b
+efe08006
+9a267200
+2421455b
+1f267c16
+202144b8
+18007216
+1a227e00
+98c08c00
+2040753b
+204074d0
+2020458f
+2040459c
+204045aa
+202044c0
+d9600002
+68490506
+604904cc
+204040e9
+18c08dfe
+18c27e00
+67e1051c
+2040456f
+242144f6
+684904cc
+20404114
+243a44f9
+20404573
+2422c4ec
+19627e00
+c00044f9
+243444e2
+78547c00
+da200014
+20404568
+58000011
+e7e08005
+6fe0851b
+1fe0a204
+e2208005
+204074d0
+1a267c06
+2442f63a
+2042f63c
+204045a1
+9a26fc00
+204075d0
+18079600
+202044e8
+204044f0
+243a44f9
+6fe104cc
+1fe0ffff
+67e10520
+20404585
+6fe104cc
+67e1051e
+2040457f
+196097ff
+2040456b
+202044c7
+6fe08522
+202044f1
+6fe0851b
+203644f4
+1fe0fffe
+20600000
+1fe0fff0
+20600000
+6fe104cc
+67e10520
+202044fd
+6fe104cc
+1fe0ffff
+67e10520
+202044fd
+2034455b
+20404585
+2020458f
+18c22200
+6fe14308
+1fe0a5fd
+204040a8
+4709c022
+2040451f
+6849436b
+204040e9
+2422c51d
+20544519
+20740000
+6fe0c2f4
+c3024514
+6849436b
+6fe14305
+98467c00
+2422c514
+2040451f
+24344514
+202044a1
+18002201
+20404568
+58000013
+e7e08005
+20600000
+18c08dfe
+efe10006
+c287c4a1
+20207638
+7001b401
+2020455d
+470a4022
+20407638
+6fe0c2d1
+c1000000
+6fe0c040
+c3820000
+20207636
+18c0a202
+6fe14308
+1fe0a5fb
+204040a8
+2020452b
+6fe14308
+1fe22200
+20404568
+58000017
+e7e08005
+6fe1436b
+e7e10005
+6fe14308
+1fe0f3fb
+6fe1430c
+1fe08c07
+efe10006
+e7e10005
+2020753b
+18002201
+20404568
+58000019
+e7e08005
+20600000
+6fe0c369
+793ffe00
+67e0c369
+20600000
+18c22200
+6fe14308
+1fe0a5fd
+202040a8
+18422600
+1a20a203
+20404568
+1a20a3fd
+5800001b
+e7e08005
+1a620400
+e0410005
+20600000
+6fe0c369
+79207e00
+67e0c369
+18422600
+1a20a203
+20404568
+1a20a3fd
+5800001d
+e7e08005
+1a620400
+e0410005
+20600000
+470ac022
+7001b40a
+18002205
+20404568
+58000001
+e7e08005
+6fe0c36a
+e7e08005
+6fe1436b
+e7e10005
+6fe081b4
+e7e08005
+20600000
+470b4022
+18002404
+202041d6
+684904cc
+18408401
+604904cc
+20600000
+684904cc
+6fe10508
+98467c00
+20600000
+470bc022
+6848850a
+da20050b
+6fe08522
+1fe27200
+98467c00
+24628000
+da400523
+202075d2
+6848c28d
+da20428e
+20204576
+470c4023
+6fe0851b
+67e084f6
+1fe27200
+204074cd
+2020753b
+470cc023
+204074ca
+6fe1051e
+e7e10005
+6fe10520
+e7e10005
+6fe084f6
+1fe27200
+2040753b
+202074d0
+470d4023
+204074ca
+204041fc
+18a27e00
+98c62200
+204041ff
+1a227e00
+e7e10006
+1a20a204
+204041f1
+1a227e00
+e7e08006
+20600000
+1fecfe00
+67e10506
+efe10006
+67e10508
+20600000
+470dc023
+6fe142b6
+1fe0fffe
+684942b4
+184085fe
+2040762c
+d84000f0
+2040762c
+20600000
+470e4023
+204074d3
+d8a0050a
+6fe14308
+1fe0fffb
+e7e08005
+1fe27200
+204074cd
+2020753b
+6fe1004b
+c1820000
+6fe0c369
+79207e01
+67e0c369
+6fe1804d
+67e1c36a
+7920000f
+c00945ce
+c02945d3
+c00c4539
+c0014379
+c00f453e
+793f800f
+6fe0c369
+793ffe01
+67e0c369
+20600000
+6fe0c369
+c4008000
+7920000f
+204045de
+204045e4
+205445c1
+6fe0c36a
+c0094504
+20600000
+204045d3
+202045d0
+204045e4
+24740000
+20204504
+470ec023
+204045d7
+da200050
+202040a8
+6fe08048
+1fe0a5f9
+1fe0fffc
+67e1430a
+68490049
+60494308
+20600000
+6a408048
+6fe1430a
+9a408400
+6049430a
+da200049
+202040a8
+20407638
+6fe1430a
+68494308
+98467c00
+24628000
+20207636
+efe08006
+e8408006
+e8410006
+c009c5ef
+20600000
+efe10006
+67e1430f
+7004c340
+2020709b
+da20000c
+da600012
+204045fb
+58000008
+e7e10005
+6fe442a6
+e7e40005
+20600000
+20404603
+da400005
+204041d6
+1a627e00
+e7e08005
+6fe0c30e
+e7e08005
+20600000
+6fe0c30e
+1fe0fe01
+67e0c30e
+c1800000
+70430e01
+20600000
+6fe0c2d1
+c000460e
+c000c611
+c0014613
+20600000
+70428700
+70428503
+20600000
+70428705
+2020460f
+70428705
+70428500
+20600000
+efe08006
+c000c628
+c001c649
+c0024658
+c002c663
+c003c6b7
+c00446a3
+c004c6b3
+c00546b7
+c005c6b7
+20600000
+18002202
+204046fc
+5800000b
+e7e08005
+6fe0c287
+e7e08005
+20600000
+67e0c27d
+efe30006
+e7e30005
+6fe0c2d1
+c0004669
+20404644
+7042cf03
+6fe0c27e
+c0004636
+c000c636
+c001c636
+6fe0c2d1
+c0014639
+c1418000
+dfe00000
+67e242d2
+20600000
+6fe0c2f4
+c2804642
+da2042d2
+1a220a00
+df200003
+20407662
+6fe142d4
+1fe17e07
+67e142d4
+7004c334
+2020709b
+18002207
+204046fc
+6fe3c284
+e7e38005
+20600000
+7042cf05
+d8a0425b
+204074f5
+6fe0c2d1
+c002464f
+20204651
+7004c343
+2020709b
+7042cf06
+20406e65
+18002211
+204046fc
+58000003
+e7e08005
+20206fb1
+18c22200
+1a220c00
+20406e5d
+2022c66b
+7001b504
+18002202
+204046fc
+58000005
+e7e08005
+6fe081b5
+e7e08005
+470f4023
+18000e07
+2040754e
+7042cf00
+7004c330
+2020709b
+7001b505
+2020465d
+20406e59
+7004c331
+2040709b
+70425a01
+7042cf09
+18002211
+204046fc
+58000004
+e7e08005
+d8c0426b
+202074f5
+18002211
+204046fc
+58000006
+e7e08005
+6fe0c2f4
+c280c67e
+d8c0424a
+202074f5
+d8c042f5
+202074f5
+d8a042d6
+1800720a
+20407662
+1800220b
+204046fc
+58000007
+e7e08005
+6fe142d6
+e7e10005
+6fe442d8
+e7e40005
+20600000
+18002211
+204046fc
+58000008
+e7e08005
+58000000
+e7e40005
+e7e40005
+20600000
+18002208
+204046fc
+58000009
+e7e08005
+6fe0c2a5
+e7e08005
+6fe342ae
+e7e30005
+20600000
+7001b508
+2020465d
+6fe0c289
+6848c289
+98417e00
+20600000
+d8a042e0
+204074f5
+2040469f
+2fec0001
+2020c69d
+6fe0c095
+c1850000
+204046ad
+24740000
+20204e2a
+20407638
+6fe0c29e
+c1000000
+6fe0c282
+c4008000
+20207636
+2040469f
+2fec0001
+2020c69d
+20600000
+20600000
+6fe0c2cf
+c17f8000
+d8400003
+98467c00
+24610000
+d8e00007
+2040755d
+247a0000
+2020469d
+470fc023
+20404203
+247a0000
+6fe0c2cf
+c00046ce
+c000c6d4
+c00146ce
+c001c6d6
+c004c6da
+c005c6ea
+c00646ec
+c006c6f3
+20600000
+6fe0c2d0
+c1820000
+7042d0ff
+7042cfff
+7004c33f
+2020709b
+7042cf02
+20204621
+7042cf04
+58017700
+d8e00007
+2020754f
+6fe0c2d0
+c00246dd
+20600000
+6fe0c2d1
+c283c6e8
+7042cf0b
+20404676
+7004c329
+2040709b
+6fe0c095
+c1850000
+204046ad
+20740000
+20204e2a
+7042cf0c
+202046e1
+7042cf0c
+20204680
+6fe0c283
+6848c28a
+98417e00
+2fec0001
+2020c6f5
+7042cf0d
+2020468c
+20404694
+202046f5
+47104024
+18000e07
+2040754e
+7042d0ff
+7042cfff
+7004c33e
+2020709b
+47114024
+18002406
+202041d6
+6fe08049
+c0004716
+c000c71e
+c0014726
+c001c72a
+c0024748
+c002c74d
+c0034751
+c003c756
+c0044757
+c004c758
+c0054759
+c005c75d
+c006475e
+c006c760
+c0094761
+c009c762
+c00a4763
+c00ac765
+c00b4770
+c00c4771
+6a608049
+20204794
+efe48006
+67e4819a
+efe10006
+67e10183
+6fe08163
+79207e05
+67e08163
+20600000
+efe28006
+67e2819a
+efe10006
+67e10183
+6fe08163
+79207e06
+67e08163
+20600000
+58000014
+67e10191
+67e142c8
+20600000
+efe40006
+67e442d8
+efe10006
+67e142d6
+efe40006
+67e442b8
+efe20006
+67e2440b
+20404781
+4711c024
+6fe0c2cf
+c004c73c
+6fe0c2f4
+c280c73f
+6fe0c3af
+245a6bf8
+6fe0c25a
+c0004744
+7042d001
+2040478f
+20206e6b
+70425a01
+d8c042f5
+d8a0424a
+204074f5
+2020473c
+7042d000
+7042cf00
+7004c341
+2020709b
+efe40006
+67e442c0
+efe20006
+67e2440f
+20206e6b
+6fe08163
+79207e04
+67e08163
+20600000
+20748000
+7004c332
+2040709b
+7042d004
+20204792
+20600000
+20204799
+20600000
+7042d002
+204047a0
+7004c333
+2020709b
+20600000
+20748000
+202047a2
+20600000
+202047ae
+20600000
+20404765
+202047b2
+efe40006
+67e44378
+6fe14378
+68494384
+2040762c
+67e14378
+6fe1437c
+68494380
+2040762c
+67e1437c
+20600000
+202047b8
+efe10006
+67e1019a
+efe10006
+67e10183
+207a0000
+6fe08163
+79207e07
+67e08163
+20600000
+da600013
+da200002
+da400002
+204041d0
+1a627e00
+e7e08005
+20600000
+d8a042c0
+18007208
+20407662
+d8a0440f
+18007204
+20407662
+da20000d
+da400004
+204041d0
+6fe442c0
+e7e40005
+6fe2440f
+e7e20005
+20600000
+7042d005
+da400005
+202047c2
+da400006
+202047c2
+da200002
+da400007
+204041d0
+e2608005
+20600000
+da200009
+da400009
+204041d0
+6fe4436e
+1fe1fe01
+e7e40005
+20600000
+da40000b
+202047c2
+da200006
+da40000c
+204041d0
+6fe2c120
+e7e28005
+20600000
+da200002
+da40000d
+204041d0
+58000006
+e7e08005
+20600000
+da400013
+202047c2
+da400014
+202047b3
+da400015
+da200009
+204041d0
+6fe44380
+e7e40005
+20600000
+da200003
+da400017
+204041d0
+6fe0c376
+1fe17e07
+e7e08005
+6fe0c377
+1fe17e07
+e7e08005
+20600000
+da200001
+202041d0
+47124024
+c513ca39
+20204c86
+4712c024
+7844fc00
+7843fc00
+58555555
+98001e00
+6fe0c4d3
+20203d42
+47134024
+6fe0c4fd
+20403d16
+6fe244d5
+98001200
+20403925
+6848c4d3
+20403d47
+204047c7
+c597c7db
+783cfc00
+2000001e
+204047c7
+7857fc00
+7826fc00
+7830fc00
+78507c00
+78287c00
+6fe144d1
+98003600
+37c18400
+242c4835
+2040644b
+c517c7ea
+6fe0c510
+243a47ea
+7846fc00
+7825fc00
+7823fc00
+7824fc00
+20404832
+67e0c4f3
+6848c4f2
+98467c00
+2422c837
+4713c024
+7858fc00
+280ffe2f
+2040c824
+2038c837
+20404832
+67e0c43d
+c513c7fd
+6fe0c43d
+6848c4cf
+a8400e00
+2420c837
+20404832
+280ffe2f
+2040c82d
+e7e08005
+1fe97e00
+1fe67c1f
+24214837
+1fe27200
+2022c809
+20404832
+e7e08005
+c2004806
+c513c80e
+18a22200
+20404832
+67e0c518
+1a220a00
+09800018
+1fef7e00
+1ff17e00
+e7e18005
+6fe0c510
+243a4822
+7845fc00
+280ffe27
+2040cc49
+20234837
+2040644a
+7837fc00
+20403e33
+47144025
+c6138000
+6fe0c518
+6848c567
+98467c00
+2041762e
+20204c4d
+7846fc00
+20204815
+20404832
+1fe67c01
+2021763e
+1fe0fffe
+c513c82b
+203a763e
+1fe0ffff
+67e084cc
+20600000
+1fe17e07
+684884cc
+18498400
+9841fe00
+20600000
+09800008
+19897e00
+20600000
+280ffe27
+2040cc65
+4714c025
+20403d36
+784dfc00
+7845fc00
+202038cb
+20403925
+6848c4d3
+202039c9
+47154025
+6fe0c4fe
+20403d16
+6fe244d5
+98001200
+204047c7
+2040483c
+79202a00
+782efc00
+78307c00
+7850fc00
+20406451
+785d7c00
+c517c871
+c516c883
+19317e00
+1fecfe00
+1ff1fe00
+08008628
+4715c025
+c517c858
+6fe0c510
+243a4858
+784efc00
+782dfc00
+7823fc00
+7824fc00
+6fe0c4d0
+98007200
+d8c0447f
+efe08006
+08008608
+c200485d
+78247c00
+08008618
+78447c00
+c597c867
+7843fc00
+58000000
+08008603
+37d38200
+20000064
+785d7c00
+784efc00
+6fe0c510
+243a486e
+784dfc00
+785c7c00
+20403925
+2020644f
+df20000a
+5800003c
+08008608
+c2004872
+784efc00
+783c7c00
+19317e00
+1ff17e00
+1ff1fe00
+08008620
+c5174880
+58000001
+08008605
+783d7c00
+20204852
+58000000
+08008605
+20204852
+6fe0c11d
+1fe37200
+20000002
+c2004885
+19317e00
+1fecfe00
+1ff18400
+18427e00
+08008608
+18427e00
+08008628
+20204852
+47164025
+6fe0c4fe
+c28148b0
+6fe0c4ce
+1fe0fe03
+67e0c4d0
+6fe0c4f2
+67e0c47f
+6fe0c4cf
+e7e08005
+6fe0c4ce
+1fe9fe00
+6848c4c4
+18410403
+18438400
+9841fe00
+6848c4c5
+9840fe00
+e7e08005
+6fe0c4ce
+98007200
+d8c0445f
+20407548
+4716c025
+c6938000
+6fe08030
+e7e08005
+6fe0c4fe
+c3810000
+6fe0c4d0
+1fe0fe01
+67e0c4d0
+20600000
+6fe0c4ce
+1fe0fe04
+c593c8b4
+1fe0fe01
+67e0c4d0
+6fe0c4f2
+67e0c47f
+6fe0c4d0
+1fe0fffe
+e7e08005
+6fe0c4cf
+e7e08005
+58000000
+2020489a
+47174025
+6fe0c43e
+1fe97e00
+67e0c4c3
+1fe0fe01
+d8c0443e
+98c08c00
+efe18006
+67e1c4c6
+6fe0c43e
+1fe37e00
+1fe17e03
+67e0c4cc
+20600000
+4717c025
+6848c4d4
+204048d1
+6048c4d4
+20600000
+47184026
+204048d6
+18408401
+18410403
+20600000
+4718c026
+6fe0c4d5
+1fe17e03
+1fefa204
+580044d9
+9a20fe00
+98408c00
+efe08006
+67e0c4d3
+20600000
+67e244d5
+47194026
+da200000
+df200004
+d8c044d5
+efe08006
+9a20a200
+c20048e5
+1a227e00
+67e144f0
+6fe0c4f0
+6848c4f1
+9840fe00
+67e0c4f2
+20600000
+4719c026
+20407638
+684a44e9
+1c427e00
+98467c00
+244148ff
+1fe22400
+6fe244e9
+6848c4ed
+98408400
+1a427e00
+98467c00
+24610000
+793ffe1c
+67e244e9
+20207636
+20628000
+79207e1c
+20600000
+58000000
+67e244e9
+20600000
+471a4026
+38001300
+3805908b
+380b6150
+380c3d20
+67e4c4d9
+38003a1a
+3804c453
+3808d312
+380c0001
+e7e38005
+6fe0c4ff
+207a0000
+d8c04500
+d8a044d9
+202074f5
+471ac026
+584e001e
+67e1c501
+58032303
+e7e18005
+58250642
+e7e18005
+58094c06
+e7e18005
+583c0927
+e7e18005
+7044ff01
+20600000
+471b4026
+d8406978
+c513c929
+d84012c0
+6fe0c4fd
+c3014929
+d8402ee0
+604944d1
+20600000
+7044fd01
+7044fe01
+20600000
+7044fd02
+7044fe02
+20600000
+471bc026
+7045154e
+58101520
+67e1c511
+58000005
+e7e08005
+20600000
+da60451d
+da404ceb
+20204de8
+79200026
+6fe0c53b
+793ffe02
+79207e01
+67e0c53b
+58000000
+67e14521
+6fe1451b
+67e1451d
+70451a00
+20404979
+7044c400
+6fe0c515
+67e0c4d3
+6fe0c516
+67e0c116
+6fe24511
+202048e0
+471c4027
+6fe0c519
+c07fc99b
+c000c955
+c0014957
+c001c95d
+c0024963
+20600000
+70445fff
+20204964
+6fe0c4f4
+203a495b
+6fe24543
+204048e0
+70445faa
+20204964
+70445f55
+6fe0c4f4
+203a4964
+6fe2452b
+67e24461
+20204966
+70445f22
+6fe24543
+67e24461
+6fe0c4cf
+1fe17e07
+67e0c460
+70446500
+7044ce07
+2040488f
+20404cc8
+246c0000
+24778000
+20404c01
+20404cdf
+471cc027
+6fe0c519
+c17f8000
+c000c97e
+c0014980
+c001c986
+c002498e
+20600000
+70451902
+6fe0c4f4
+207a0000
+70451901
+20600000
+70451902
+20204cc3
+6fe0c4f4
+203a4984
+6fe244a5
+67e2452b
+70451903
+20204cc3
+6fe0c4f4
+203a498c
+6fe244a5
+684a4543
+98467c00
+24628000
+70451904
+20204cc3
+6fe0c4f4
+203a4994
+6fe244a5
+684a452b
+98467c00
+24628000
+704519ff
+7004c339
+2040709b
+58000000
+67e1451d
+6fe244a5
+204048e0
+6fe0c53b
+793ffe01
+67e0c53b
+20204cc3
+70455901
+70455800
+20600000
+6fe0c558
+c3808000
+79207e01
+67e0c558
+58000000
+67e1c518
+67e2456f
+70455401
+20204946
+70455401
+7044ce08
+d8c0451b
+d8a0445f
+202074ef
+471d4027
+20404a54
+204047ce
+2437ca54
+204049bf
+20404a87
+20404a2e
+204053c3
+6fe0c4f4
+207a0000
+6fe2456f
+207a0000
+202048e0
+20404a54
+20204837
+70456505
+d8c0443d
+d8a0452b
+204074ef
+471dc027
+6fe0c52d
+c05549ca
+c02ac9d7
+c01149f4
+c07fcc20
+20600000
+6fe0c52e
+c000c9ce
+c00149d4
+20600000
+70451801
+70451b01
+70451c80
+6fe34437
+67e3451d
+20600000
+70451901
+70451b02
+202049d0
+6fe0c4f4
+203a49dd
+6fe2452f
+684a4437
+98467c00
+24628000
+6fe0c52e
+c000c9e1
+c00149ec
+20600000
+6fe0c518
+c000c9e4
+20600000
+70451802
+6fe0c4f4
+203a49cf
+70451b01
+70451c80
+6fe2456f
+67e2451d
+20207636
+6fe0c519
+c000c9ef
+20600000
+70451902
+6fe0c4f4
+203a49d5
+70451b02
+202049e8
+6fe0c4f4
+203a49fa
+6fe2452f
+684a456f
+98467c00
+24628000
+6fe0c52e
+c000c9fe
+c0014a09
+20600000
+6fe0c518
+c0014a01
+20600000
+20404a22
+204049cf
+6fe0c51a
+1fe1fe01
+67e0c51a
+58000000
+67e14518
+20600000
+6fe0c519
+c0804a0c
+20600000
+20404a28
+204049d5
+6fe0c51a
+1fe1fe02
+67e0c51a
+20404a06
+202053bd
+6fe0c559
+c1808000
+6fe0c553
+247a0000
+6fe0c440
+c000ca1b
+c0014a1f
+20600000
+6fe0c56e
+c4000000
+7857fc00
+20600000
+6fe0c56e
+c4008000
+20204a1d
+6fe0c553
+247a0000
+6fe0c56e
+1fe1fe01
+67e0c56e
+20600000
+6fe0c553
+247a0000
+6fe0c56e
+1fe1fe02
+67e0c56e
+20600000
+6fe0c51a
+207a0000
+6fe0c52e
+c000ca22
+c0014a28
+20600000
+79200027
+6fe0c116
+67e0c566
+20404922
+20204c58
+6fe14523
+202075e6
+471e4027
+7044ce00
+6fe0c554
+207a0000
+6fe14525
+202075e6
+20404a84
+2437ca54
+20404a76
+24344a54
+6fe0c4c3
+203a4a54
+1fe0fe02
+98007200
+d8c0443d
+d8a0452b
+20407548
+70455600
+6fe0c553
+205a4a91
+471ec027
+6fe0c52d
+c000ca5a
+c0014a69
+c07fca58
+471f4027
+d8a0443d
+df200042
+2020750f
+20404a30
+20204c20
+20404a22
+20404bbd
+6fe0c54d
+6848c52b
+284ffe03
+7920fe00
+67e0c54d
+c000ca6f
+6fe0c555
+6848c52b
+284ffe04
+7920fe00
+67e0c555
+6fe14527
+202075e6
+20404a28
+6848c52b
+284ffe03
+2020ca74
+6fe14529
+202075e6
+6fe0c095
+1fe67c0e
+2042cf01
+6fe24535
+20204c26
+6fe24535
+20204c2a
+20407638
+6fe0c4cc
+6848c4cd
+98467c00
+2442f636
+6fe0c4cc
+67e0c4cd
+6fe1c4c6
+6849c4c9
+98467c00
+2442f636
+6fe1c4c6
+67e1c4c9
+20600000
+20404a54
+204047ce
+24778000
+6fe0c43d
+67e0c4cf
+204048be
+6fe0c43e
+2feffe00
+2020ca90
+20404a3b
+2040488f
+2040483f
+20204837
+70455701
+58000280
+d8e00008
+2020754f
+471fc027
+70455601
+70455a00
+7044edff
+20204902
+47204028
+6fe0c556
+207a0000
+204048ef
+24740000
+20404aa7
+6fe0c55a
+1fe0fe01
+1fe17e01
+67e0c55a
+c0004aac
+c000caaf
+20600000
+6fe0c565
+207a0000
+1fe0ffff
+67e0c565
+20600000
+6fe0c565
+247a0000
+20204af1
+6fe0c565
+247a0000
+2020499f
+6fe0c56d
+247a0000
+6fe0c56b
+205a4ae0
+6fe0c568
+c3800000
+79207e00
+67e0c568
+70456701
+70456c00
+58000000
+67e14569
+7044ed60
+20204902
+4720c028
+6fe0c559
+c1000000
+6fe0c56d
+247a0000
+6fe0c56b
+247a0000
+6fe0c567
+207a0000
+204048ef
+24740000
+6fe14569
+1fe0fe01
+67e14569
+d84007d0
+98467c00
+20214adc
+20404aa7
+6fe0c56c
+1fe0fe01
+1fe17e01
+67e0c56c
+c0004ad9
+c000c99f
+20600000
+6fe0c565
+243a499f
+20204ba3
+70456b01
+20204ba3
+70456700
+20600000
+70456701
+20600000
+47214028
+6fe0c558
+c3800000
+79207e00
+67e0c558
+6fe0c566
+67e0c116
+70455400
+70076100
+70454d01
+7044c400
+6fe24437
+204048e0
+204048cc
+20204a54
+70455400
+70455900
+70455800
+20600000
+6fe0c559
+c1800000
+20404ae2
+20404ba7
+20204a41
+4721c028
+6fe0c559
+c1808000
+204049a2
+204049b0
+6fe0c553
+247a0000
+6fe0c51a
+207a0000
+70455600
+20404af1
+20404a91
+20204902
+6fe0c558
+c3838000
+79207e07
+67e0c558
+70455a00
+70455401
+58000000
+67e1c580
+67e3c55d
+20404b95
+24628000
+6fe0c4d4
+67e0c55c
+6fe0c4d3
+67e0c55b
+20600000
+47224028
+6fe0c559
+c1838000
+20404b07
+20404b3d
+20404a84
+2437ca54
+20404b95
+2042ca43
+6fe0c54d
+205a4ade
+70455900
+6fe0c558
+79207e00
+67e0c558
+6fe0c554
+1fe67c02
+2442cb93
+20404a54
+20404a91
+20404b95
+2022cb36
+6fe244d5
+684a4577
+98467c00
+2022cb39
+6fe244d5
+684a4573
+98467c00
+2022cb3b
+20600000
+6fe0c55c
+67e0c4d4
+20600000
+6fe0c562
+20204b37
+6fe0c55f
+20204b37
+4722c028
+6fe0c55a
+1fe0fe01
+1fe17e03
+67e0c55a
+c0004b61
+c000cb7b
+c0014b47
+c001cb7b
+20600000
+204049cf
+6fe24573
+203a4b3d
+204048e0
+6fe0c560
+205a4b5c
+6fe0c55e
+67e0c4d3
+6848c581
+6a214587
+20404c2c
+6048c581
+20404c35
+6048c57e
+18467c50
+24610000
+6848c55f
+204048d1
+6048c55f
+67e0c55e
+20600000
+70456001
+d8400000
+204048d6
+67e0c55e
+20600000
+204049d5
+6fe24577
+203a4b3d
+204048e0
+6fe0c563
+205a4b76
+6fe0c561
+67e0c4d3
+6848c582
+6a214589
+20404c2c
+6048c582
+20404c35
+6048c57f
+18467c50
+24610000
+6848c562
+204048d1
+6048c562
+67e0c561
+20600000
+70456301
+d8400000
+204048d6
+67e0c561
+20600000
+204049cf
+6fe24437
+204048e0
+6fe0c55d
+205a4b8f
+6fe0c55b
+67e0c4d3
+6848c580
+6a214585
+20404c2c
+6048c580
+20404c35
+6048c57d
+18467c50
+24610000
+6848c55c
+204048d1
+6048c55c
+67e0c55b
+20600000
+70455d01
+6fe0c55b
+67e0c4d3
+20600000
+70455400
+20600000
+6fe244d5
+684a4437
+98467c00
+20600000
+6fe0c554
+c1010000
+6fe0c557
+207a0000
+d8e00008
+2040755d
+247a0000
+70455700
+70456500
+20404ab2
+47234028
+70455907
+70455800
+20204a54
+4723c028
+6fe0c54d
+c000cc6c
+6fe0c555
+c000cbbb
+684a454e
+1c427e00
+98467c00
+244148ff
+1fe22400
+6fe2454e
+6848c552
+98408400
+1a427e00
+98467c00
+24610000
+793ffe1c
+67e2454e
+70454d01
+202048cc
+70455500
+202048cc
+1c427e00
+67e2454e
+20600000
+da604521
+da404ceb
+20204de8
+47244029
+79200026
+6fe0c53b
+793ffe01
+79207e02
+67e0c53b
+6fe0c526
+203a4bd8
+6fe0c525
+c000cbd0
+c0014bd0
+c001cbdf
+c0024bdf
+6fe0c516
+67e0c116
+6848c52f
+6048c4d4
+6fe24527
+20404be8
+6048c52f
+20600000
+70411603
+6848c530
+6048c4d4
+6fe2452b
+20404be8
+6048c530
+20600000
+70411603
+6848c531
+6048c4d4
+6fe24543
+20404be8
+6048c531
+20600000
+6fe244a5
+67e2452b
+204048e0
+202048cc
+4724c029
+20404c05
+20404cc8
+242c4c0c
+2437cc0c
+20404cdf
+6fe0c53b
+793ffe02
+67e0c53b
+58000000
+67e1451d
+67e14523
+67e14521
+6fe24511
+684a44d5
+98467c00
+2022c93b
+6fe24543
+684a44d5
+98467c00
+2042cbe6
+7004c33c
+2040709b
+47254029
+df200004
+d8a0445f
+20207500
+70445fff
+6fe0c4cf
+67e0c460
+6fe24543
+67e24461
+7044ce06
+2020488f
+6fe0c526
+203a48cc
+6fe14523
+1fe0fe01
+67e14523
+2feffe03
+6fe0c525
+c000cc18
+c0014c1a
+c001cc1c
+c0024c1e
+20204bd8
+2020cbd8
+20204bd0
+2020cbdf
+20204bd0
+2020cbdf
+20204bd8
+2020c946
+20204bdf
+6fe0c52e
+c000cc24
+c0014c28
+20600000
+6fe2452f
+67e2456f
+67e24573
+20600000
+6fe2452f
+67e2456f
+67e24577
+20600000
+4725c029
+1a227e00
+98408a00
+6fe08009
+e7e08005
+18408401
+6fe0c517
+98410400
+20600000
+47264029
+6fe0c517
+1fe0fe01
+67e104ef
+1fe27200
+1a220c00
+dfe00000
+e8408006
+9840fe00
+c2004c3c
+684904ef
+9846fc00
+204075d0
+18078400
+c6138000
+18427e00
+c6930000
+20403a64
+1fe20400
+20600000
+20403a45
+20203a60
+6fe14533
+20204c5f
+1fe22200
+6848c532
+6fe14533
+98408a00
+1a227e00
+e7e08005
+18408401
+6fe0c517
+98410400
+6048c532
+20600000
+6fe14583
+20404c5f
+6fe14585
+20404c5f
+6fe14587
+20404c5f
+6fe14589
+207a0000
+1fe20a00
+6fe0c517
+1fe0fe01
+1fe27200
+2020750f
+20404c49
+207a0000
+6848c57c
+6a214583
+20404c2c
+6048c57c
+20600000
+6a214583
+20404c35
+6048c57b
+18467c50
+24610000
+202048cc
+6fe24437
+67e24543
+20404922
+20204c4b
+58002fb2
+67e1c547
+58100c0c
+67e1c4ed
+5800bb80
+67e1c54a
+70456005
+20600000
+5800f80c
+67e1c547
+581c1919
+67e1c4ed
+58017700
+67e1c54a
+7045600b
+20600000
+c6930000
+6fe0c53b
+c280c94d
+c2814bea
+6fe0c557
+c000cd35
+4726c029
+20404c9d
+24344d10
+20404cb2
+20404d5d
+6fe0c095
+c00460b1
+6fe4454a
+67e444f5
+6fe1455c
+67e1455e
+47274029
+20404d2c
+24740000
+2040765e
+6fe1c547
+20204d29
+20404ca0
+24740000
+2020488f
+6fe14535
+204075e6
+20344ca6
+6fe3c460
+207a0000
+20207636
+70454100
+1a20fe01
+67e0c4ce
+20404cae
+67e0c45f
+1a420c00
+1a227200
+20207548
+6fe0c4cf
+1fe17e07
+67e0c4cf
+20600000
+70454000
+6961003b
+34730200
+20404cc8
+6fe0c4c5
+c000ccbd
+242c4cd6
+2437ccd6
+20404cdf
+6fe0c095
+c00460a4
+20404d8d
+20404c01
+6fe0c4c4
+1fe0fe01
+67e0c4c4
+20404d03
+4727c029
+58000000
+67e0c53c
+67e1453d
+20600000
+4728402a
+7857fc00
+2040483f
+6fe0c4c5
+c000c837
+18002a00
+6fe244d5
+98001200
+68488008
+20403954
+2040396a
+204047d6
+2057c837
+20600000
+6fe0c541
+247a0000
+6fe1453d
+1fe0fe01
+67e1453d
+6fe0c53e
+c2824ce7
+20404ced
+20204cb3
+4728c02a
+204048be
+6fe0c4c3
+207a0000
+98007200
+d8c0443f
+d8a044a3
+20207548
+4729402a
+58000000
+67e1453d
+70453f01
+7004c33a
+2020709b
+4729c02a
+6848c540
+6fe0c560
+98467c00
+24214d0b
+18408401
+6048c540
+6fe0c560
+c002ccfa
+6fe0c540
+c0034d05
+c0064d05
+20600000
+6fe0c540
+c001cd05
+c0034d05
+20600000
+c517cd01
+67e0c480
+20600000
+67e0c481
+20600000
+6fe0c4cf
+c4020000
+6fe0c4cf
+793ffe04
+67e0c4cf
+20404cfe
+20404d91
+202048cc
+20404d81
+20404d91
+202048cc
+6fe14537
+202075e6
+6fe0c541
+205a4d15
+20404d3f
+20404d0e
+20204d23
+7044cf01
+70454101
+20404cae
+67e0c45f
+58000000
+67e3c460
+6fe24543
+67e24467
+7044ce0c
+6fe0c4cf
+79207e03
+67e0c4cf
+2040488f
+20204c8f
+472a402a
+20404d2c
+24740000
+6fe0c095
+c00460a0
+6fe444f5
+20407593
+604a40aa
+20203b7a
+472ac02a
+78347c00
+20403b4b
+6fe1c0be
+203a7638
+6fe0c094
+203a7638
+6fe14539
+202075e6
+204048ef
+24740000
+20404d4a
+6fe14558
+1fe0fe01
+67e14558
+6849455a
+98467c00
+2042cd3f
+20204c8c
+70455700
+58000000
+67e14558
+58000064
+67e1455a
+70455600
+6fe0c4ee
+67e0c4ed
+20600000
+6fe0c4ef
+20204d46
+6fe0c556
+1fe0fe01
+67e0c556
+c0024d48
+c002cd44
+20600000
+70455701
+58000000
+67e14558
+20600000
+df200002
+d8c044d5
+20407636
+5800ffff
+e8410006
+98467c00
+2442f638
+c2004d58
+20600000
+472b402a
+6fe1442f
+c3858000
+6a214533
+20404c35
+6048c561
+6fe0c566
+c5134d66
+6fe0c569
+98467c00
+24214d80
+6fe0c563
+1fe67c02
+24214d6e
+6fe0c563
+c0004d81
+20600000
+6fe0c563
+6848c564
+98467c00
+24628000
+70456300
+6848c561
+6fe0c565
+c5134d77
+6fe0c568
+98467c00
+24610000
+6fe0c562
+c0004d88
+1fe0ffff
+67e0c562
+c0004d88
+70411600
+20600000
+70456300
+6fe0c562
+c0014d86
+1fe0fe01
+67e0c562
+c000cd7e
+70411606
+20600000
+70411685
+20600000
+70456201
+70456300
+20600000
+6fe0c563
+1fe0fe01
+67e0c563
+20600000
+6fe0c563
+1fe67c02
+24414d99
+6fe0c563
+c1000000
+1fe0ffff
+67e0c563
+20600000
+70456303
+20600000
+44b1400c
+6fe0c095
+203a4d9b
+c0025249
+c004e295
+c00553d2
+c0074e4d
+c006d102
+c0066506
+c00456ed
+20600000
+20758000
+20406c88
+6fe0c095
+c004e3d3
+c0025254
+c004572e
+c006d204
+20600000
+20406fe0
+204070b1
+20404db5
+6fe14390
+202075e6
+6fe1438e
+202075e6
+44b1c00c
+da204419
+20407613
+207a0000
+1fe22600
+20404dbe
+20204dc2
+da600000
+20600000
+c0084dd1
+c00a4dc8
+c00acdcc
+20600000
+6fe14392
+202075e6
+6fe14388
+202075e6
+6fe1438c
+202075e6
+6fe1442f
+79207e09
+67e1442f
+20600000
+70436900
+6fe1442f
+793ffe09
+67e1442f
+20204e2e
+6fe143a6
+79207e00
+67e143a6
+20600000
+67e081dc
+44b2400c
+6fe081dc
+207a0000
+1fe0ffff
+67e081dc
+20406fec
+20404e0f
+20406944
+6fe14398
+204075e6
+20204dd6
+efe08013
+207a0000
+1fe0ffff
+e7e08013
+247a0000
+1a427e00
+202075e6
+efe10013
+207a0000
+1fe0ffff
+e7e10013
+247a0000
+1a427e00
+202075e6
+684943de
+1840a601
+da404df3
+20204de1
+20404e44
+c000cdf6
+20204e28
+58000002
+e7e08013
+1840a408
+efe10012
+202075e6
+20404dfd
+20204e28
+58000000
+67e143a4
+20600000
+58000000
+67e143a6
+20600000
+6fe143a6
+79207e07
+67e143a4
+58000000
+67e143a6
+20600000
+d8e00009
+20203c54
+d8e00009
+20203c58
+7043a205
+20204e09
+da6043a2
+da404e0b
+20204de1
+7004c30f
+202070a4
+7004c310
+202070a4
+7004c30e
+202070a4
+7004c30d
+202070a4
+7004c317
+202070a4
+7004c318
+202070a4
+7004c316
+202070a4
+7004c311
+202070a4
+7004c315
+202070a4
+7004c314
+202070a4
+7004c313
+202070a4
+7004c319
+202070a4
+7004c31f
+202070a4
+7920000d
+20600000
+793f800d
+20600000
+20404e44
+c0014e3a
+58000001
+e7e08013
+1840a203
+1840a406
+e8408011
+1a60a601
+e0408013
+20204df9
+58000000
+e7e08013
+6fe1442f
+c304ce40
+2040477a
+20404e20
+684943de
+1840a202
+1840a404
+20204e36
+684943de
+1840a600
+efe08013
+20600000
+20404e44
+c0804e4b
+20204e28
+1840a40a
+20204df9
+20406fd3
+20758000
+58005056
+67e14523
+580049ab
+67e14525
+580050ee
+67e14527
+58004eca
+67e1438a
+58004ecc
+67e1438c
+58004eed
+67e14390
+58004f0e
+67e14392
+58004e09
+67e14388
+58004f69
+67e14394
+58004f2c
+67e14398
+4496c005
+20404eae
+20404efb
+2040711d
+7040c102
+7048fa00
+6fe0c6bc
+67e0c58b
+c0004e77
+6fe0c6bd
+67e0c432
+70435b00
+20406fe2
+20406fec
+7046e401
+6fe1442f
+c3860000
+20204e28
+20600000
+20204e95
+7046e402
+70435b01
+58000020
+204063c7
+d8a04233
+6fe0c2ae
+1fe104f0
+18518400
+20404e8f
+e0408005
+1fe1040f
+20404e8f
+e0408005
+20404130
+6848c22b
+18427200
+d8a0431e
+d8c0422c
+20407548
+6848c22b
+18427200
+d8a0433e
+d8c0422c
+20207548
+18467c09
+20214e93
+18408437
+20600000
+18408430
+20600000
+6fe0c6b1
+c0ffcea7
+6fe0c6af
+c0ffceaa
+6fe0c6ba
+c0ffceac
+6fe0c61d
+1fe27200
+5800461e
+1fe22200
+1a220c00
+efe08006
+18c22200
+c07fcea5
+1fe20400
+20406c43
+c2004e9f
+20600000
+6fe446b1
+67e44620
+20204e97
+67e0c61e
+20204e99
+67e0c61f
+20204e9b
+20405052
+204050d0
+da200000
+20406d6e
+20404e95
+20404f03
+20404ec8
+20204eb7
+20600000
+6fe0c8e7
+1fe27200
+580048e8
+1fe22200
+1a220c00
+efe08006
+18c22200
+c07fcec2
+1fe20400
+67e0c8ec
+20404ec4
+c2004ebb
+20600000
+6fe0c8ec
+c17f8000
+98000400
+20206c43
+7046c064
+20600000
+20404ecd
+2040765e
+20206d34
+204070fb
+df200014
+d8c08070
+18c20a00
+efe08006
+c00fcedd
+c0104edd
+c010cedd
+c0114edd
+c011cedd
+c0164edd
+c016cedd
+c0004edd
+c2004ed0
+20404ee3
+20600000
+58000040
+e7e08005
+20204eda
+58000080
+e7e08005
+20204eda
+6fe0c8e7
+1fe27200
+d8c048e8
+efe08006
+79207e07
+d840003e
+20406c67
+c2004ee6
+20600000
+20206d40
+20404f05
+20404ef0
+20204eec
+6fe1442f
+c3848000
+6fe0c8fa
+c000cef5
+20600000
+6fe0c6db
+c1008000
+7046db01
+20404eff
+20404f01
+20204f18
+6fe148ff
+67e14901
+70490300
+20600000
+58000000
+20204efc
+da200000
+2020702b
+da200000
+20207030
+6fe1442f
+c4048000
+20404203
+247a0000
+da204609
+2040713a
+24740000
+d8c04609
+202063cb
+1a627e00
+c016ce48
+c0084e30
+c00a4f14
+c00acf1e
+20600000
+20404eff
+20404f01
+793f8027
+20204f1a
+6fe146dc
+67e146de
+7046bf14
+70409400
+20404e16
+20204e2c
+79200027
+20404efb
+20405006
+20404ffa
+58000000
+67e2c68d
+2040711d
+70464f0a
+7046510a
+7046530a
+7040c102
+58000020
+204063c7
+20204e18
+20404fa7
+20404faa
+20404fad
+20404f39
+20204f31
+da6048fb
+da400000
+20204de1
+da604901
+da404f37
+20204de8
+70490301
+20600000
+da6046de
+da404f3c
+20204de8
+7046db02
+7048fa00
+20204f22
+6fe0c6b9
+207a0000
+da6046bf
+da404f44
+20204de1
+6fe0c6be
+67e0c6bf
+6fe0c6c2
+247a0000
+20406cc0
+67e146d9
+da2046d3
+20406cef
+6848c6c0
+98467c00
+20214f51
+67e0c6c0
+1fe20400
+6048c6c1
+6fe0c6bb
+98467c00
+20414f5c
+6048c6cc
+df200006
+d8c046c7
+20404f63
+67e0c6cd
+da2046c4
+20207122
+6fe0c6c3
+247a0000
+7046c301
+da200001
+20207030
+da200001
+2020702b
+da200000
+efe08006
+9a20a200
+c2004f64
+1a217eff
+20600000
+6fe0c36a
+c0094f6c
+20600000
+6fe1436b
+c00ccf83
+20600000
+44974005
+efe28011
+67e28546
+6fe10546
+d8406b5a
+98467c00
+24628000
+6fe10549
+1ff0fe00
+67e10549
+1fe27200
+1a20a205
+1a220c00
+d8a0054b
+20407548
+efe08006
+67e08555
+da200548
+da40054b
+20600000
+58000000
+67e2c643
+67e2c648
+20404f6f
+1a420c00
+d8a04643
+df20000a
+20407548
+4497c005
+efe08011
+c0014fb6
+c001cfcb
+c0024fd2
+c002cfd2
+c0035042
+c003d043
+c0045046
+20600000
+20404f83
+6fe08548
+c0024f9a
+c002cf9a
+20600000
+6fe0c643
+245a4fa1
+6fe0c645
+245a4fa3
+6fe0c647
+245a4fa5
+20600000
+7048e405
+20600000
+7048e505
+20600000
+7048e605
+20600000
+da6048e4
+da404fb0
+20204de1
+da6048e5
+da404fb2
+20204de1
+da6048e6
+da404fb4
+20204de1
+70464300
+20204fd2
+70464500
+20204fd2
+70464700
+20204fd2
+6fe0c643
+67e0c64e
+6fe0c644
+67e0c650
+20204fdc
+6fe0c643
+67e0c650
+20204fea
+6fe0c64f
+20404fc3
+6fe0c644
+67e0c64e
+20204fe8
+c0014fc7
+c001cfc9
+67e0c64f
+20600000
+70464f05
+20600000
+70464f0a
+20600000
+6fe0c643
+20404fc3
+6fe0c64f
+20405036
+20405039
+7004c500
+20206d93
+6fe0c6e1
+247a0000
+6fe34643
+67e3464e
+6fe0c64f
+6848c651
+98417e00
+6848c653
+98417e00
+205a4fee
+44984006
+6fe1442f
+2feffe09
+2440cefb
+20404fe8
+20404fea
+20204fe3
+6fe0c64e
+6848c650
+9840fe00
+243a70fd
+202070fb
+d8c0464e
+20204ff0
+d8c04650
+20204ff5
+d8c04652
+20205012
+7046c200
+20600000
+efe08006
+c0004ffa
+c000cffe
+c0015002
+20600000
+efe08006
+c0005006
+c001500a
+c000d00e
+20600000
+6848c8e8
+20406c3f
+6848c8e9
+20206c3f
+6848c8e8
+20406c43
+6848c8e9
+20206c3f
+6848c8e8
+20406c3f
+6848c8e9
+20206c43
+6848c8ea
+20406c3f
+6848c8eb
+20206c3f
+6848c8ea
+20406c43
+6848c8eb
+20206c3f
+6848c8ea
+20406c3f
+6848c8eb
+20206c43
+4498c006
+efe08006
+c000501f
+c000d018
+c001501a
+20600000
+70466c00
+2020501b
+70466c01
+efe08006
+67e0c66e
+efe40012
+20205024
+efe08012
+20406dd6
+1a40a401
+efe08012
+20206dd6
+67e4466f
+7046c201
+6fe0c66c
+c0005032
+6fe0c670
+67e0c671
+6fe0c66f
+20406dd6
+6fe0c66e
+20405036
+67e0c676
+6fe34671
+67e304c4
+20206d7f
+6fe0c66f
+67e0c671
+6fe0c670
+2020502b
+1feffe05
+1fe0fe32
+20600000
+d8402ee0
+984ffe00
+1fe6fc64
+204075d0
+18078400
+18422200
+58002ee0
+98462400
+20600000
+20600000
+6fe44643
+67e4468d
+20600000
+6fe0c6aa
+67e0c6a0
+6fe0c6ab
+67e0c6a1
+6fe0c6ac
+67e0c6a2
+df20000d
+d8c0469b
+20404f63
+67e0c6a8
+da204698
+20207122
+58000000
+67e4451b
+20404a34
+20204a95
+2040505a
+20405062
+204050a3
+202050f5
+20404a9a
+6fe0c559
+c1808000
+6fe0c8fb
+243a4af1
+6fe0c6db
+c0014af1
+20600000
+6fe0c559
+c1800000
+20405071
+2037d06f
+6fe0c903
+207a0000
+6fe0c904
+1fe0fe01
+67e0c904
+c002506f
+204048cc
+20405082
+2437d066
+70490400
+20600000
+6fe0c559
+c1800000
+20405076
+20404ba7
+20205082
+6fe0c558
+c3800000
+79207e00
+67e0c558
+6fe0c566
+67e0c116
+70455400
+70076100
+70454d01
+7044c400
+6fe2491d
+20204aed
+20404a84
+2437ca54
+20404a76
+24344a54
+6fe0c4c3
+203a4a54
+1fe0fe02
+98007200
+d8c0443d
+d8a0452b
+20407548
+70455600
+6fe0c553
+205a4a91
+6fe0c52d
+c07fd094
+c000d096
+20204a51
+204070fd
+20204c20
+20404bbd
+6fe0c54d
+6848c52b
+284ffe03
+7920fe00
+67e0c54d
+c000d09e
+20204a61
+6fe0c095
+1fe67c0e
+2042f0fd
+6fe24535
+20204c26
+6fe0c559
+c1808000
+204049a2
+204050eb
+204049b0
+6fe0c51a
+243a50b0
+20404b99
+6fe0c557
+207a0000
+58000000
+67e24573
+20600000
+70455600
+da200000
+204070fd
+20404af1
+20404902
+6fe24437
+67e2491d
+6fe0c929
+245a50bb
+6fe2491d
+202048e0
+6fe0c929
+207a0000
+6fe0c570
+67e0c920
+6fe0c438
+67e0c91f
+6fe0c56f
+67e0c91e
+6fe0c437
+67e0c91d
+20600000
+204050da
+6fe2491d
+684a4921
+98467c00
+20628000
+1a627e00
+da20491d
+df200004
+2040686a
+20600000
+6fe24437
+67e2491d
+6fe0c929
+207a0000
+20600000
+204050da
+6fe24921
+207a0000
+67e2491d
+20600000
+20600000
+6fe0c929
+207a0000
+da600700
+1a627e00
+da204921
+d8400004
+204068ac
+6fe24925
+207a0000
+67e24921
+1a627e00
+d84007cc
+98467c00
+20610000
+1a60a604
+202050de
+6fe24573
+207a0000
+202048e0
+6fe1442f
+c3848000
+6fe146dc
+67e146de
+7048fa01
+da20452e
+20204f95
+6fe0c903
+207a0000
+204050fd
+24740000
+6fe1c4f5
+20407593
+604a40aa
+20203b7a
+78347c00
+20403b4b
+6fe1c0be
+203a7638
+20204ecc
+20758000
+20405204
+20406d0f
+580051e8
+67e14535
+58005146
+67e14539
+58005141
+67e1438a
+58005181
+67e14390
+58005183
+67e14392
+580051cd
+67e14398
+58005136
+67e1462b
+58005126
+67e1462f
+44994006
+20406a26
+2040513d
+2040711d
+6fe0c5fb
+67e0c56a
+c0005125
+6fe0c5fc
+67e0c432
+20405136
+20406fe2
+20406fec
+70462701
+6fe1442f
+c3860000
+20204e28
+70462702
+20405136
+da200000
+20407030
+204051ab
+6fe2463d
+67e244d5
+203a493b
+6fe244d5
+67e2452b
+6fe1451f
+67e14521
+20204bc3
+d8400004
+da2044d5
+da400000
+20600000
+4499c006
+6fe0c5f9
+c0ffd13b
+6848c5d6
+20206c43
+67e0c5d6
+20205139
+20404c72
+6fe14623
+67e14625
+20600000
+20405146
+6fe0c5cc
+79207e07
+d840003f
+20206c67
+20406c74
+20206d34
+20406d40
+20405159
+2040514c
+20205167
+6fe0c632
+c1808000
+6fe24636
+203a5153
+70463c00
+78347c00
+202070fd
+6fe0c63c
+c17f8000
+1fe0fe01
+67e0c63c
+78547c00
+202070fb
+684943dc
+18417e01
+18430400
+67e0c636
+18417e01
+18430400
+67e0c637
+18417e01
+18430400
+67e0c638
+18417e01
+18430400
+67e0c639
+20600000
+449a4006
+20405177
+2040517c
+2040516d
+24740000
+202051e4
+6fe0c632
+c1808000
+6fe0c63c
+207a0000
+1fe67c01
+24610000
+6fe1451f
+67e14521
+78347c00
+20600000
+6fe0c636
+243a51d8
+6fe0c637
+243a51da
+202051e0
+6fe0c638
+243a51dc
+6fe0c639
+243a51de
+202051e2
+204051c2
+20205148
+1a627e00
+c016ce48
+c0084e30
+c01cd18b
+c01e5192
+c01d518a
+20600000
+20204c01
+449ac006
+6fe2452b
+67e2463d
+6fe0c649
+245a5197
+6fe2463d
+204048e0
+70453b00
+70463301
+70463401
+70452100
+20600000
+6fe0c649
+207a0000
+6fe0c438
+67e0c640
+6fe0c52c
+67e0c63f
+6fe0c437
+67e0c63e
+6fe0c52b
+67e0c63d
+204051b2
+6fe2463d
+684a4641
+98467c00
+20628000
+1a627e00
+da20463d
+df200004
+2040686a
+20600000
+6fe0c649
+207a0000
+204051b2
+6fe24641
+207a0000
+67e2463d
+20600000
+6fe0c649
+207a0000
+da600700
+1a627e00
+da204641
+d8400004
+204068ac
+6fe24645
+207a0000
+67e24641
+1a627e00
+d84007cc
+98467c00
+20610000
+1a60a604
+202051b5
+6fe0c633
+c1000000
+6fe0c632
+c1008000
+70463201
+da200000
+2020702b
+da200000
+2040702b
+20405136
+20204e28
+20404def
+20404938
+20404bc0
+202051d1
+6fe0c5fd
+207a0000
+6fe0c3dc
+243a513e
+da604625
+da4051c9
+20204de8
+70460401
+20600000
+70460402
+20600000
+70460601
+20600000
+70460602
+20600000
+70460400
+20600000
+70460600
+20600000
+da2045fe
+20207122
+da20460b
+20207122
+6fe0c634
+c000d1f2
+da204614
+2040713a
+243451f7
+d8c04614
+efe08006
+1fe22200
+da404615
+20600000
+70463400
+78347c00
+da200001
+da404635
+20600000
+6fe0c617
+c00251fb
+c002d1fb
+20600000
+6fe0c61a
+243a5202
+6fe0c61c
+243a5202
+6fe0c61e
+243a5202
+20600000
+78347c00
+202051ed
+70443114
+70442a01
+5800060f
+67e1456b
+5800456b
+67e143b0
+70409401
+7040a706
+7040c202
+70456a00
+580045ca
+67e14435
+70443401
+7045cbff
+58000296
+67e145cd
+5800073a
+67e145cf
+58004627
+67e143de
+58000c0c
+67e14629
+580045de
+67e143da
+7045fb00
+7045f9ff
+7045fcff
+7045f700
+7045f800
+7045fa00
+7045fd01
+58004e55
+67e145ea
+67e145ec
+58000007
+67e145f0
+7043c202
+38035a0c
+3804011a
+38080060
+380c0028
+67e4c5fe
+3802000a
+38040002
+e7e20005
+38035a08
+3804019a
+38080000
+380c0000
+67e4c60b
+58000064
+67e14623
+70411600
+7044cf01
+70454206
+7044f401
+70452600
+20404922
+20404c7e
+20404905
+58000708
+67e1451b
+58000050
+67e1451f
+580a7700
+67e1c54a
+58604800
+67e1c4f5
+20600000
+5800527c
+67e14523
+5800535a
+67e14527
+5800536b
+67e14529
+58005331
+67e14525
+5800528b
+67e106ad
+20207182
+47404030
+20405281
+20405277
+6fe0c5ab
+2feffe05
+2020d25d
+6fe0c5ab
+2feffe06
+2040c915
+6fe0c5d6
+67e0c116
+704517ff
+580007b3
+67e14583
+580008b3
+67e14585
+580009b3
+67e14587
+58000ab3
+67e14589
+70451685
+7045d400
+70456e00
+2040492b
+6fe0c5ab
+2feffe03
+2040c92e
+20404a34
+20404931
+20404905
+6fe0c5b5
+67e086af
+6fe4c5ac
+67e486b0
+20600000
+70409a18
+6fe0c5ab
+c4038000
+70409a08
+20600000
+6fe0c553
+c0005321
+c000d2b4
+c007d2b0
+20600000
+4740c030
+58001fdf
+da20458b
+d8400001
+202068ac
+47414030
+df200001
+da20458b
+dfe01fdf
+2020686a
+6fe0c5ab
+c282528f
+6fe0c58b
+c0ad5293
+70458b5a
+6ff2137a
+79207e1d
+67e20608
+204052aa
+204071d5
+20405297
+202052a0
+6fe086b0
+207a0000
+6fe0c58b
+c02d529e
+6fe206b1
+67e20608
+20600000
+6fe206b5
+2020529c
+6fe0c58b
+c02d52a6
+58009272
+67e105fb
+70062c1a
+20600000
+5800928d
+67e105fb
+70062c3f
+20600000
+6fe0c5b6
+207a0000
+d8c045b6
+d8a00671
+df20001e
+20207548
+20404af1
+20405329
+204052ed
+202052b1
+20404af1
+20405329
+20404afa
+204052ed
+202052b5
+204052bc
+204052cc
+202052de
+4741c030
+6fe0c5aa
+207a0000
+d8e0000d
+2040755d
+247a0000
+7045aa00
+58000001
+67e08767
+58000000
+e7e38005
+70076020
+6fe08761
+79207e02
+67e08761
+20600000
+47424030
+6fe0c5a8
+207a0000
+d8e0000e
+2040755d
+247a0000
+7045a800
+d8a00777
+df200002
+20407500
+6fe40777
+67e44594
+70077700
+70075f10
+6fe08761
+79207e01
+67e08761
+20600000
+4742c030
+6fe0c5a9
+207a0000
+d8e0000c
+2040755d
+247a0000
+7045a900
+d8a00787
+df200002
+20407500
+70078703
+6fe18787
+67e1c59f
+70076021
+202052c8
+449b4006
+6fe08755
+205a533b
+20407176
+6fe0874b
+207a0000
+70074b00
+6fe10749
+d84002ba
+98467c00
+24628000
+6fe086c9
+c1dd0000
+6fe086ca
+c0505302
+c050d308
+c0535314
+c053d316
+c054d31c
+70074c00
+20600000
+6fe086cb
+c040d305
+20205300
+2040499f
+70074c01
+20600000
+6fe086cb
+c000d30d
+c0425310
+c053d312
+20205300
+6fe0c51a
+67e0870a
+20205306
+20404af2
+2020530d
+70070aa1
+20205306
+70070a15
+20205306
+6fe0c559
+c000531a
+c000d312
+20600000
+70070aa0
+20205306
+70070a00
+70070b00
+70070c01
+70070d07
+20205306
+20404a95
+20404a9a
+20404ac0
+20405329
+20404afa
+20404b17
+204052ed
+20205322
+449bc006
+6fe0c559
+c1800000
+20404af5
+204052b9
+6fe0c553
+247a0000
+20204b99
+6fe0c4cf
+c000d334
+c001533d
+6fe0c5d5
+c2805343
+2020533f
+6fe0c095
+c1820000
+7045d503
+20600000
+7045d500
+20600000
+6fe0c5d5
+c280d347
+6fe0c554
+c000d34e
+c001d352
+20600000
+6fe0c5d5
+793ffe00
+67e0c5d5
+2020534a
+6fe0c5d5
+793ffe01
+67e0c5d5
+7044ce01
+580000ff
+67e0c45f
+20600000
+70455401
+20404a13
+24778000
+202049ab
+6fe0c43f
+c000d34e
+c07fd34e
+70074d00
+7044ce01
+6fe0c564
+67e0c45f
+20600000
+58000001
+67e08767
+6fe3c52e
+e7e38005
+6fe0c52e
+245a5363
+6fe0c52e
+205a5367
+202052c7
+7045aa01
+58000180
+d8e0000d
+2020754f
+7045aa00
+58000000
+d8e0000d
+2020754f
+6fe0c52e
+c0005370
+c00153a3
+c001d38b
+20204a54
+6fe0c530
+67e0c554
+70453000
+d8a00777
+d8c0452f
+df200008
+20407548
+6fe40777
+245a5383
+6fe40777
+205a5387
+6fe40777
+67e4458c
+684c4594
+98467c00
+2442d2d9
+6fe4458c
+67e44594
+20204a54
+7045a801
+58000180
+d8e0000e
+2020754f
+7045a800
+58000000
+d8e0000e
+2020754f
+d8a00787
+d8c0452e
+df200003
+20407548
+6fe10788
+245a539b
+6fe10788
+205a539f
+6fe18787
+67e1c59c
+6849c59f
+98467c00
+2442d2eb
+6fe1c59c
+67e1c59f
+20204a54
+7045a901
+58000180
+d8e0000c
+2020754f
+7045a900
+58000000
+d8e0000c
+2020754f
+d8a00797
+d8c0452e
+df200002
+20407548
+6fe10797
+245a53b3
+6fe10797
+205a53b7
+6fe10797
+67e145a2
+684945a5
+98467c00
+2442d3bb
+6fe145a2
+67e145a5
+20204a54
+7045a901
+58000180
+d8e0000c
+2020754f
+7045a900
+58000000
+d8e0000c
+2020754f
+70076022
+202052c8
+6fe0c095
+c1820000
+6fe0c58b
+c12d0000
+7045d401
+20600000
+6fe0c095
+c1820000
+6fe0c5d4
+207a0000
+7004cc00
+70458b5a
+20405286
+20405281
+6fe084cc
+1fe0fe01
+67e084cc
+c07fe9f6
+6fe0c58b
+c0ad53c8
+202069f6
+2035d3f6
+2040412d
+58005400
+67e14390
+58005403
+67e14392
+580053fc
+67e14388
+580054b7
+67e14396
+580056c0
+67e14394
+580056d1
+67e14398
+449c4007
+204053e4
+204053f7
+20205651
+6ff08060
+793ffe00
+67f08060
+6fe44446
+20406acd
+6fe1444e
+20406ad8
+20406ae7
+70807508
+70807649
+7080790a
+70807a0b
+d8400081
+6fe14455
+2feffe00
+79208404
+60588060
+20600000
+202053e4
+6848c43b
+20406c43
+20405425
+6848c439
+20206c29
+6848c439
+20406c32
+2420ce0b
+20204e09
+204066a4
+247a0000
+20205427
+1a627e00
+c00a5414
+c00ad410
+c0185685
+c018d687
+c0195691
+c019d68f
+c01a567f
+c01ed665
+c020d41a
+c021541c
+c021d67d
+20600000
+204041a4
+70445700
+20405418
+20205637
+2040541f
+6fe0c444
+67e0c0c1
+20205635
+20405480
+2020541d
+204047a8
+20204621
+202056a1
+6848c43b
+20206c43
+20405421
+20205425
+6fe0c43e
+2feffe01
+2040ce16
+20600000
+6848c43b
+20206c3f
+6ff0810b
+c3810000
+20406afb
+efe08003
+c080d43d
+6ff10112
+1fe67c02
+20610000
+efe08003
+67e08537
+e8408003
+18622200
+60488538
+18408403
+6ff10112
+98460400
+24610000
+70053901
+2040544b
+6fe08539
+c1000000
+20205446
+204074fb
+2040566e
+20205440
+449cc007
+20406afb
+6ff10112
+207a0000
+98608600
+2020544a
+20406afb
+18608602
+efe08003
+98608600
+20206b01
+449d4007
+6fe08537
+c000d474
+c0015479
+c0025487
+c004d48b
+c005d4e2
+c00754e3
+c007d4eb
+c00854f3
+c00954f7
+c01354fb
+c0145500
+c0155503
+c015d536
+c016553c
+c0185543
+c018d548
+c0195559
+c019d564
+c01a5579
+c01ad57c
+c01b5585
+c01bd58e
+c01c5591
+c0205599
+c02155a3
+c02455a8
+c028d5b3
+c030d5b7
+c03b55c6
+c03bd5cc
+c03c55d1
+c03d5607
+c0485615
+c048d61a
+c049561e
+c049d623
+c04a5627
+c07fd62d
+2020562f
+6fe08538
+c083562f
+efe30003
+67e342ae
+20205632
+6fe08538
+c080d62f
+e8408003
+6048c445
+20405632
+6fe1442f
+c3848000
+6fe0c43e
+2feffe01
+24608000
+6848c445
+284ffe02
+2020ce18
+20204e16
+dfe0001d
+d8a0422b
+2040557f
+2020412d
+6fe1442f
+c304d62f
+204054df
+2034562f
+70053900
+6fe14455
+c28454b0
+6fe0c457
+247a0000
+70053901
+efe10003
+67e14458
+6061445a
+6fe08538
+1fe0fffe
+2421562f
+2022d62f
+67e0c457
+68494458
+184085ff
+204040e9
+203a54b3
+e8420006
+59280302
+98467c00
+2422d4b3
+efe08006
+67e0c45c
+1fe17e30
+203a54b3
+70053900
+204041a2
+204054b7
+204054b7
+204054b7
+6fe14455
+c4040000
+70053901
+204056e3
+20205632
+70445700
+70053901
+204056e3
+2020562f
+6fe0c457
+207a0000
+20404203
+247a0000
+204054da
+449dc007
+6fe142b4
+2040762c
+1fe20400
+6fe0c369
+c3800000
+1840fffd
+d84000fb
+2040762c
+6848c457
+2040762c
+1fe22200
+18427e00
+9a267e00
+67e0c457
+204054d5
+6fe1445a
+1fe20600
+1a227200
+20406b2c
+18627e00
+67e1445a
+6fe0c457
+247a0000
+202056e1
+68494458
+6fe0c45c
+c282c54f
+c2824546
+20600000
+d8400017
+6fe14455
+c3808000
+684942b6
+20600000
+6fe14455
+c281451f
+20207638
+20205655
+efe08003
+6848c455
+7d3a0400
+6048c455
+68588060
+7d3a0404
+60588060
+20205632
+6f208538
+204075a1
+20406adc
+67e1444e
+20405632
+204075e8
+6fe1444e
+20206ad8
+da200002
+da404437
+d8400000
+20205639
+6fe1442f
+c304d62f
+20405632
+20204e20
+6f208538
+6fe143ad
+1fe20a00
+20406b2c
+20205632
+6fe1442f
+c284d5a8
+2020562f
+df200040
+d8a0431b
+2040750f
+58000000
+67e084dc
+1a220600
+18627e00
+67e104e0
+20405531
+6fe084dc
+684884cc
+18408401
+9840fe00
+67e084dc
+1fe67c1f
+2421551d
+6848c31b
+5800431c
+9840fe00
+67e104e5
+684884cc
+18408401
+6fe0c31b
+9840fe00
+67e0c31b
+20205526
+6848c33b
+5800433c
+9840fe00
+67e104e5
+684884cc
+18408401
+6fe0c33b
+9840fe00
+67e0c33b
+6fe104e5
+1fe20a00
+6fe104e0
+1fe20600
+18427200
+20406b2c
+6fe08538
+684884dc
+98467c00
+2422d509
+20205632
+efe08003
+67e084cc
+efe08003
+67e084d8
+20600000
+d8400000
+da200002
+6fe14452
+67e104f6
+da4004f6
+20205639
+6fe08538
+c080d62f
+efe08003
+67e0c450
+58000000
+67e14452
+20205632
+6fe08538
+c082562f
+6fe1442f
+c284d607
+2020562f
+6fe08538
+c081d62f
+efe08003
+c000554e
+c000d554
+2020562f
+20405632
+e8408003
+efe08003
+c0016c5b
+7d3a0407
+20206c29
+20405632
+e8408003
+efe08003
+203a6c43
+20206c3f
+6fe08538
+c080d62f
+e8408003
+20406c32
+58000000
+7d20fe00
+da200001
+67e104f6
+da4004f6
+d8400000
+20205639
+efe08003
+67e0c2d1
+6fe0c2d1
+c000556c
+c000d56f
+c0015571
+c0025573
+2020562f
+70428700
+70428503
+20205632
+70428701
+2020556d
+70428705
+20205577
+70428705
+20205575
+70428502
+20205632
+70428500
+20205632
+dfe0001f
+d8a0431b
+2020557f
+dfe0001f
+d8a0433b
+2020557f
+6f208538
+9f267c00
+2421562f
+e7208005
+20406b2c
+20205632
+6fe1442f
+c304d62f
+6fe08538
+c084562f
+efe40003
+67e442a6
+7004c312
+204070a4
+20205632
+efe10003
+67e1435c
+20205632
+6fe0c2d1
+203a562f
+6fe0c2cf
+c080562f
+6fe0c2d0
+c080562f
+20407119
+20205632
+6fe08538
+c082d62f
+efe08003
+67e0c43f
+efe20003
+67e24440
+6848c43f
+20406c43
+204056be
+20205632
+6fe08538
+c080d62f
+efe08003
+67e0c116
+20205632
+efe08003
+c000d5b1
+6fe0c2cd
+c001d5af
+c00355af
+c003d5af
+2020562f
+7042ce01
+20205632
+2040465c
+20205632
+20405632
+204075e8
+70801001
+20203aba
+6fe08538
+c000562f
+efe08003
+203a55c4
+6fe08538
+c082d62f
+efe20003
+d84f4240
+98467c00
+2021562f
+67e242d2
+2040419a
+20205632
+2040419c
+20205632
+e8410003
+204040e9
+18c08bfe
+58000000
+e7e10005
+20205632
+204055d5
+20405603
+58000000
+e7e10005
+20205698
+efe08003
+204055d9
+204055e0
+20205698
+20405600
+58280002
+e7e18005
+20600000
+67e084c4
+20405600
+59280302
+e7e20005
+6fe084c4
+e7e18005
+20600000
+20404108
+efe08003
+1fe1721f
+1fe22200
+2a2ffe07
+7920840f
+2a2ffe06
+7920840e
+e0410005
+1f227e00
+e7e08005
+20406b3f
+20405603
+58000000
+e7e10005
+184104ff
+184085ff
+204040e9
+18c08c04
+efe08006
+c28255f8
+c282d5f8
+18408401
+20600000
+20404108
+2a2ffe05
+7920840f
+e0410005
+5a290202
+e7e40005
+184085ff
+20600000
+20404108
+e0410005
+20600000
+efe08003
+1fe27200
+e7e08005
+20206b3f
+6fe0c2cf
+c082d62f
+6fe0c2d1
+c0025613
+c042560d
+2020562f
+7042cc02
+7042cd08
+20205610
+efe20003
+67e242d2
+20205632
+20405610
+20204651
+6fe08538
+c081562f
+e8410003
+20404208
+20205632
+d8400000
+da200002
+da404075
+20205639
+6fe08538
+c084562f
+efe40003
+20404206
+20205632
+ea208003
+ea410003
+d8400000
+20205639
+6f208538
+1f20f3fe
+efe10003
+1fe20a00
+20406b2c
+20205632
+70409400
+20205632
+d8400001
+da200000
+20205639
+d8400000
+da200000
+20205639
+70053702
+20205652
+70053705
+20205652
+6fe08537
+1fe22600
+70053706
+58000002
+9a20fe00
+204056a7
+1a627e00
+e7e08003
+e0408003
+1a227200
+1a420c00
+20406b26
+202056b1
+70053708
+1f20fe02
+204056a7
+6fe10562
+e7e10003
+6fe10560
+1fe20c00
+20406b13
+18c27e00
+67e10560
+202056b1
+70053709
+58000000
+204056a7
+202056b1
+7005370a
+58000001
+204056a7
+2040565f
+6fe1442f
+d8e00009
+afefffff
+79208405
+e0408003
+202056b1
+d8400000
+6fe0c35b
+d8e00000
+afefffff
+79208402
+20600000
+7005370d
+6fe0c3af
+1feffe22
+1fe27200
+204056a7
+6fe143ad
+1fe20c00
+20406b13
+202056b1
+7005370f
+6ff10112
+d8400040
+2040762c
+1fe22200
+1fe27200
+20406afb
+d8a004f6
+20406b2c
+1a227e00
+1a227200
+204056a7
+d8c004f6
+20406b13
+202056b1
+70053710
+20205652
+70053711
+58000004
+204056a7
+6fe242d2
+e7e20003
+202056b1
+da200180
+20205689
+da200080
+20205689
+70053714
+58000002
+204056a7
+1a227e00
+e7e10003
+202056b1
+da600000
+20205692
+da600001
+70053715
+58000001
+204056a7
+1a627e00
+e7e08003
+202056b1
+604904cc
+70053729
+58000002
+204056a7
+684904cc
+e0410003
+202056b1
+7005372b
+20205652
+70053740
+58000002
+204056a7
+6fe14075
+e7e10003
+202056b1
+70053602
+67e08538
+604c04cc
+449e4007
+204056b3
+684c04cc
+20406b07
+6fe18536
+e7e18003
+20600000
+449ec007
+20206b09
+204056bc
+20608000
+204056ba
+6fe24440
+1feb7e00
+207a0000
+202074f7
+6848c43f
+20206c43
+6848c43f
+20206c4e
+6848c43f
+20206c3f
+62210560
+6241055e
+6fe1436b
+67e10562
+204054df
+20740000
+6849055e
+6fe0c454
+2040762c
+1fe27200
+18427e00
+9f267e00
+67e1055e
+20405646
+6fe1055e
+207a0000
+202056c6
+6fe0c450
+207a0000
+6fe0c451
+207a0000
+1fe0ffff
+67e0c451
+247a0000
+70445105
+20406c98
+20406cc0
+1fe6fc64
+204075cd
+18070400
+67e0c452
+6048c453
+20600000
+d8e00008
+202056e9
+d8e00008
+202056e5
+6fe14455
+f93ffe00
+67e14455
+20600000
+6fe14455
+f9207e00
+67e14455
+20600000
+20406fd3
+20405718
+20405b64
+20758000
+20405a4e
+20405fdb
+204056f9
+20405bf9
+6fe1442f
+c2865e21
+20405f53
+2020578c
+58006196
+67e1439e
+58006134
+67e14535
+5800615e
+67e14537
+58005802
+67e14539
+58005d2b
+67e1438e
+580057fd
+67e1438c
+58005cca
+67e14392
+58005f00
+67e14390
+580057cb
+67e1438a
+58005d10
+67e14394
+58005d8d
+67e14398
+5800592a
+67e1439c
+580057b7
+67e14388
+5800628b
+67e14396
+58006292
+67e1439a
+20600000
+20758000
+20404c72
+20404905
+204058de
+2040574f
+2040419e
+204041c7
+204041ba
+204041a6
+6fe44848
+c289deea
+c2895eab
+20600000
+70409a08
+6fe44848
+c3860000
+70409a18
+20600000
+2040492b
+6fe44848
+c41e8000
+2020492e
+6fe1459a
+67e1451b
+6fe0c59d
+67e1451f
+6fe2c59f
+67e2c565
+6fe0c59e
+67e0c516
+6fe0c5a4
+2feffe00
+2040df97
+6fe0c5a4
+2feffe02
+2040df99
+6fe0c5a4
+2feffe01
+2040df9b
+6fe0c5a4
+2feffe03
+2040df9d
+6fe0c5a4
+2feffe04
+2040df9f
+6fe0c5a4
+2feffe05
+2040dfa9
+6fe0c4ff
+245a4915
+20405725
+2040583d
+2040572a
+20406088
+20204931
+58009000
+67e142ca
+7040c203
+7040a708
+70483b00
+70483b00
+70483c00
+58000200
+67e140a5
+7042b417
+7042b617
+58000a77
+67e143aa
+38001224
+38044000
+38080000
+e7e28005
+58004793
+67e14312
+58000010
+67e14314
+204061ef
+204061a7
+20405850
+6fe44848
+c30dd76c
+58000006
+67e142a6
+67e142a8
+20404c7e
+6fe44848
+c30c5770
+20404c76
+6fe0c5d1
+67e0c752
+6fe1c2b1
+67e1c767
+6fe0c597
+1fe17efe
+67e0c597
+67e0c3c2
+58000000
+67e3c56a
+6fe0c431
+67e0c838
+67e0c839
+20404142
+47454031
+6fe0c5b0
+67e0c5c1
+6fe0c5af
+c17f8000
+6848c5af
+20405915
+6848c5af
+20406c32
+2040d789
+20205911
+6fe0c5b1
+67e0c5c1
+20600000
+449f4007
+6fe44848
+c297e0c8
+6fe0c5d1
+c00060b8
+2040579e
+24345c9c
+449fc007
+da2045d2
+6fe0c5d1
+1fe0ffff
+1feffe1d
+9a20a200
+efe08011
+67e0c3a8
+6fe0c3a8
+c01a57a8
+20205e21
+44a04008
+78547c00
+6fe44848
+c305d7a5
+6fe084f1
+c30157a5
+78347c00
+6fe0c74f
+67e0c74e
+20600000
+70476501
+6848c853
+6fe0c75f
+c07fd7ad
+6848c59c
+6048c815
+20404e2e
+6fe1c76d
+67e1c320
+20405d73
+58000004
+e7e08006
+d8c0433c
+20405d7a
+202070e0
+c5134e09
+6fe0c74a
+203a4e09
+6fe0c792
+c000ce09
+6fe0c57b
+243a4e09
+20204e0b
+6fe0c59c
+67e0c762
+20600000
+204061ef
+44a0c008
+58000006
+20406723
+c281d7c9
+20405bef
+20405bf9
+204057d7
+20204e28
+44a14008
+6ff20130
+79207e1a
+67f2004c
+20403c37
+20406fd7
+204061ef
+204059d7
+204057d7
+20405ee2
+6848c5b8
+20206c1b
+44a1c008
+20405c9a
+2040765e
+20405802
+204057f4
+6848c5ba
+20405915
+20405919
+204057ed
+202057e1
+6fe44848
+c41e0000
+6848c5ab
+20406c1b
+6848c5ac
+20406c1b
+6fe0c5ab
+d8400080
+20406c68
+6fe0c5ac
+d8400080
+20206c68
+6fe44848
+c40a0000
+6fe0c597
+c1810000
+6fe0c596
+d84000c0
+20206c68
+d8c08070
+df200013
+efe08006
+243a57fb
+58000040
+18c08bff
+e7e08005
+c20057f6
+20600000
+c6130000
+20405802
+6fe08015
+247a0000
+20206c1b
+44a24008
+6848c5ab
+20406c29
+6848c5ac
+20406c29
+2040594a
+6fe0c5ad
+d840003f
+20406c68
+2040671a
+6848c5a5
+20406c0f
+6848c5a7
+20406c0f
+6848c5a6
+20406c0f
+6848c5a8
+20406c0f
+6848c5a9
+20406c0f
+6848c5aa
+20406c0f
+6848c5b6
+20406c0f
+6848c5b7
+20406c0f
+6848c5ab
+20406c0b
+6848c5ac
+20406c0b
+6848c5b3
+20406c0b
+6848c5b4
+20406c0b
+6848c5b8
+20206c0f
+6fe1442f
+c284d829
+20600000
+1a227e00
+243a41ae
+202041b0
+6fe0c3c2
+c1810000
+44a2c008
+6848c3c3
+18467c03
+2021583a
+18408405
+6048c596
+18422200
+20406c6f
+c01fe237
+20406235
+1a220400
+20206c5b
+18408404
+6048c596
+20205834
+6fe0c597
+c0015846
+c000584b
+70459700
+582c0172
+67e1c57d
+58014001
+e7e18005
+20600000
+585d0099
+67e1c57d
+58007100
+e7e18005
+20600000
+58c8012c
+67e1c57d
+5800dc00
+e7e18005
+20600000
+6fe44848
+c40a0000
+70458f01
+c3970000
+c3958000
+70458f00
+20600000
+6fe0c590
+1fe0fe01
+67e0c590
+6848c591
+98467c00
+20600000
+6fe44848
+c40a0000
+2040582c
+6fe0c58f
+203a5874
+6fe0c3c2
+c0015869
+70458f03
+20405857
+2021586b
+20405870
+2020587a
+70458f02
+2020587a
+2040582e
+7043c202
+6fe0c847
+245a5870
+2020587a
+70459000
+6fe0c597
+67e0c3c2
+20600000
+6fe0c3c2
+c0815878
+6fe0c847
+247a0000
+20405857
+24610000
+44a34008
+6fe0c847
+247a0000
+70459000
+20406c98
+20406cc0
+67e14583
+6fe0c3c2
+c0815889
+68494583
+184ffe08
+1fe6fc0a
+204075cd
+9840fe00
+67e14583
+da20457d
+2040589b
+6fe0c3c6
+c28158dc
+c280d7c2
+c3005893
+70459401
+20205891
+d8e00004
+20205fa1
+d8e00004
+20405fa5
+7045920c
+6fe0c594
+207a0000
+70459400
+6848c5bb
+2020620c
+44a3c008
+efe40011
+67e404c4
+6fe0c58f
+c00058b2
+c00158a2
+c001d8d1
+6fe44848
+c31758a8
+6fe104ca
+68494585
+98467c00
+242158d4
+6fe44848
+c315d8b2
+70459500
+6fe104ca
+68494587
+98467c00
+242158b1
+20405f5c
+202058b2
+20405f60
+204058d8
+20406d0b
+20406d03
+6fe104ca
+684904c6
+98467c00
+24416d07
+684904c8
+98467c00
+24416cff
+6fe104ca
+684904c4
+98467c00
+202158cd
+684904c6
+98467e00
+242158cf
+203a58cf
+1fefa264
+6fe104c4
+684904c6
+98460400
+1a227e00
+9846fc00
+204075cd
+67e0c78d
+20600000
+70478d64
+20600000
+70478d00
+20600000
+6fe0c3c2
+c00158a2
+202058b2
+6848c3c6
+79200402
+6048c3c6
+20600000
+6848c3c6
+793f8402
+6048c3c6
+20600000
+70459501
+20600000
+6848c3d5
+20406c43
+20407199
+6848c5a5
+20405915
+6848c5a7
+20405915
+6848c5a6
+20405915
+6848c5a8
+20405915
+6848c5a9
+20405915
+6848c5aa
+20405915
+6848c5b5
+20405915
+6848c5b6
+20405915
+6848c5b7
+20405915
+6848c5ab
+20405915
+6848c5ac
+20405915
+6848c5b3
+20405915
+6848c5b4
+20405915
+6848c5b8
+20405915
+6848c5b9
+20405915
+6848c5bb
+20406c43
+6848c5bc
+20406c43
+6848c5bd
+20406c43
+6848c5be
+20406c43
+6848c5bf
+20406c43
+6848c5af
+20205915
+18467cff
+20628000
+18410e7f
+6ff2011c
+afefffff
+2020d915
+18467cff
+20628000
+79200407
+20206c29
+18467cff
+20628000
+793f8407
+20206c29
+6fe1c87a
+67e184c4
+df20000d
+d8400000
+6fe184c4
+2feffe00
+2040ec5b
+6fe184c4
+1fe3fe00
+67e184c4
+18408401
+c200591d
+20600000
+2040592b
+7043aa73
+2040592a
+2020671e
+2020691f
+6fe0c5ad
+d8400021
+20406c68
+6fe0c5ae
+d8400023
+20206c68
+44a44009
+78547c00
+58000000
+67e3456b
+20405bfe
+20405a4e
+20405940
+20405945
+20405a9b
+6fe0c56a
+1fe17e1f
+67e0c56a
+24345fdb
+20405fca
+20205e12
+6fe0c57a
+207a0000
+67e0c56f
+70457a00
+20207636
+6fe0c576
+207a0000
+67e0c570
+70457600
+20207636
+20405957
+20405993
+6fe0c574
+6848c573
+67e0c573
+98467c00
+2422ce0d
+6fe0c578
+6848c577
+67e0c577
+98467c00
+2422ce0d
+20600000
+6fe0c5b3
+c17f8000
+da200000
+6848c5b3
+20406c32
+7920a200
+6848c5b4
+20406c32
+7920a201
+1a227e00
+67e0c574
+c000d967
+c001596b
+6fe0c575
+c283d977
+20600000
+6fe0c573
+c000596f
+c001d971
+20600000
+6fe0c573
+c0005973
+c001d975
+20600000
+70457582
+20600000
+70457581
+20600000
+70457580
+20600000
+70457583
+20600000
+6fe0c575
+793ffe07
+67e0c575
+c000597f
+c000d982
+c0015985
+c001d988
+20600000
+6fe0c574
+c001d98b
+20600000
+6fe0c574
+c000598b
+20600000
+6fe0c574
+c001d98f
+20600000
+6fe0c574
+c000598f
+20600000
+6fe0c576
+1fe0fe01
+67e0c576
+20600000
+6fe0c576
+1fe0ffff
+67e0c576
+20600000
+6fe0c5ab
+c17f8000
+da200000
+6848c5ab
+20406c32
+7920a200
+6848c5ac
+20406c32
+7920a201
+1a227e00
+67e0c578
+c000d9a3
+c00159a7
+6fe0c579
+c283d9b3
+20600000
+6fe0c577
+c00059ab
+c001d9ad
+20600000
+6fe0c577
+c00059af
+c001d9b1
+20600000
+70457982
+20600000
+70457981
+20600000
+70457980
+20600000
+70457983
+20600000
+6fe0c579
+793ffe07
+67e0c579
+c00059bb
+c000d9be
+c00159c1
+c001d9c4
+20600000
+6fe0c578
+c001d9c7
+20600000
+6fe0c578
+c00059c7
+20600000
+6fe0c578
+c001d9cb
+20600000
+6fe0c578
+c00059cb
+20600000
+6fe0c57a
+1fe0fe01
+67e0c57a
+20600000
+6fe0c57a
+1fe0ffff
+67e0c57a
+20600000
+6848c5ab
+20406c0b
+6848c5ac
+20406c0b
+6848c5b3
+20406c0b
+6848c5b4
+20206c0b
+6848c5ab
+2040590b
+6848c5ac
+2040590b
+6848c5b3
+2040590b
+6848c5b4
+2020590b
+6fe1456f
+207a0000
+70457b01
+70457c0a
+20600000
+da60457c
+da4059e7
+20204de1
+70457b00
+20600000
+6fe44848
+c2975a10
+6fe0c5aa
+c17f8000
+da200000
+70483305
+6848c5aa
+204059f8
+67e0c830
+6fe0c5b5
+c07fda08
+20405b1e
+1a227e00
+c282da12
+20205a19
+6fe44848
+c2965a0e
+6fe0c830
+1fe22600
+6fe0c5b5
+c07fdb52
+6fe0c837
+243a5a0b
+20406c32
+6848c5b5
+2020da0e
+6848c5b5
+20406c43
+6848c5aa
+6fe0c830
+20205b46
+6848c5aa
+20405915
+202059f5
+70467600
+70483000
+20600000
+6fe0c830
+20205b46
+6fe0c595
+203a5a19
+6fe0c676
+c1008000
+70467601
+6fe44848
+c3940000
+c39b0000
+20205a29
+6fe0c676
+c1000000
+70467600
+6fe44848
+c2945a20
+c29b5a20
+20600000
+6fe0c677
+243a5a24
+6fe0c839
+245a5a29
+70467700
+6fe0c431
+67e0c839
+67e0c838
+20600000
+44a4c009
+20405a32
+20740000
+6fe0c62b
+1fe0fe01
+1fe17e03
+67e0c62b
+20405a55
+20205ea3
+78547c00
+6fe44848
+c3960000
+c3970000
+6fe0c82b
+207a0000
+6fe0c82c
+207a0000
+78347c00
+20600000
+6fe44848
+c2945a40
+c29b5a47
+20600000
+6fe0c676
+c1808000
+da604839
+da405a45
+20204de1
+70467701
+20205f68
+6fe0c676
+c1808000
+da604838
+da405a4c
+20204de1
+70467701
+20205daa
+20205a58
+6fe44848
+c38e0000
+6fe0c62b
+c1818000
+70462b00
+20600000
+44a54009
+20405a4f
+204061c2
+6fe0c5c0
+c001da7a
+c005da8e
+6fe0c62b
+c0005a62
+c000da60
+c0015a64
+c001da66
+6848c66a
+20205a67
+6848c669
+20205a67
+6848c66b
+20205a67
+6848c66c
+6fe0c5c0
+c0025a76
+c002da76
+c0045a78
+c003da78
+c0035a76
+6048c675
+58000006
+20406723
+1fe104f8
+6fe0c675
+9840fe00
+1fed7e00
+1fe0fe06
+20206722
+184085ff
+20205a6d
+18408402
+20205a6d
+6fe0c62b
+c0005a81
+c000da7f
+c0015a83
+c001da85
+6fe0c66e
+20205a86
+6fe0c66d
+20205a86
+6fe0c66f
+20205a86
+6fe0c670
+67e0c675
+1fed7e00
+1fe22200
+1fe0fe0d
+20406722
+1a227e00
+1fe0fe0e
+20206722
+6fe0c62b
+c0005a95
+c000da93
+c0015a97
+c001da99
+6fe0c672
+20205a86
+6fe0c671
+20205a86
+6fe0c673
+20205a86
+6fe0c674
+20205a86
+20405ad4
+20405aac
+20405826
+20405aa7
+1a227e00
+6848c572
+67e0c572
+67e0c56a
+9842fe00
+1fe67c00
+20628000
+20207636
+c6930000
+1a227e00
+207a0000
+67e0c56a
+20207636
+70483500
+70483600
+70483700
+1fe20400
+20405abc
+20405abf
+20405ac2
+20405ac5
+6fe0c836
+207a0000
+6fe0c835
+207a0000
+70483701
+6fe0c572
+1fe22200
+20600000
+18417e09
+c004dacd
+20600000
+18417e14
+c00a5acd
+20600000
+18417e18
+c00c5acb
+20600000
+18417e07
+c001dacb
+c002dacb
+c0035acb
+c003dacb
+20600000
+70483601
+20600000
+70483501
+20600000
+20405ae0
+20405ad4
+58000000
+67e1c82b
+20600000
+44a5c009
+6fe0c87d
+245a5ae0
+da200000
+20405ae3
+20405ae9
+20405aef
+20405af5
+20405b0e
+20405b28
+1a227e00
+20600000
+58030303
+67e1c82b
+20600000
+70483300
+6848c5a5
+6fe0c82b
+20405b46
+67e0c82b
+20600000
+70483301
+6848c5a7
+6fe0c82c
+20405b46
+67e0c82c
+20600000
+70483302
+6848c5a6
+6fe0c82d
+20405b46
+67e0c82d
+20600000
+6fe0c5a8
+c17f8000
+70483303
+6fe0c82e
+1fe22600
+6848c5a8
+6fe0c5b5
+c07fdb0a
+20406c32
+2020db06
+6848c5b5
+20406c43
+6848c5a8
+6fe0c82e
+20405b46
+67e0c82e
+20205b1e
+6848c5b5
+6fe0c82e
+20405b46
+20205b04
+20405b52
+67e0c82e
+6848c5a8
+20205915
+6fe0c5a9
+c17f8000
+70483304
+6fe0c82f
+1fe22600
+6848c5a9
+6fe0c5b5
+c07fdb24
+20406c32
+2020db20
+6848c5b5
+20406c43
+6848c5a9
+6fe0c82f
+20405b46
+67e0c82f
+6848c5b5
+20205915
+6848c5b5
+6fe0c82f
+20405b46
+20205b1d
+20405b52
+67e0c82f
+6848c5a9
+20205915
+70482800
+6fe44848
+c40a8000
+6fe0c5b7
+c17f8000
+70483307
+6848c5b7
+6fe0c832
+20405b46
+67e0c832
+1a227e00
+c283db38
+20405b3b
+6fe0c829
+67e0c82a
+20600000
+70482901
+20405b3e
+20205b35
+70482900
+6fe0c82a
+207a0000
+70482801
+20600000
+20406c32
+6848c833
+18420e00
+2020db50
+f93fa200
+20600000
+1fe3fe00
+1fe22400
+20406c32
+7920a400
+1a417e07
+6848c833
+18420e00
+c003db50
+c0005b44
+20600000
+f9202200
+20600000
+44a64009
+1a627e00
+67e0c834
+1fe3fe00
+1fe22400
+18422600
+20405911
+1a620400
+20406c32
+7d20a400
+20405b5e
+20205b4b
+6848c834
+18410401
+1a417e01
+98467c00
+2422dcc5
+20600000
+44a6c009
+20405926
+20758000
+20405bf3
+44a74009
+20405b73
+c0185b7a
+c018dbdb
+c02c5be4
+20405b70
+20001af4
+20205b68
+6fe0c5ad
+2040670b
+2020592b
+58000001
+20406723
+67e0c65b
+58000000
+20406723
+67e0c65a
+20600000
+6fe0c65b
+c02d5b83
+c06c5b89
+c068db98
+c0695ba1
+c0015ba8
+c02a5bb1
+c0285bd8
+20205b68
+7045c005
+20405bef
+204074fb
+da6046d2
+20405baa
+20205a4e
+58000016
+20406723
+1fe67cbd
+2422db64
+58000019
+20406723
+1fe67c55
+2422db64
+5800001b
+20406723
+1fe67c1d
+2422db64
+7045c006
+da604716
+20205baa
+7045c000
+da60468c
+20405baa
+da604696
+20405baa
+58000943
+20406722
+da6046b0
+20205baa
+7045c002
+da604682
+20405baa
+da604696
+20405baa
+da6046b0
+20205baa
+7045c003
+da604678
+efe10013
+d840ffff
+98467c00
+20628000
+20406722
+1a60a602
+20205baa
+20405bed
+58009a5b
+20406722
+5800000d
+20406723
+1fe67c12
+2022dbc5
+1fe67c0a
+2422dbc8
+5800000e
+20406723
+1fe67ce5
+2422db68
+58000010
+20406723
+1fe67ca5
+2022dbc5
+20405bd5
+7045c008
+20600000
+7045c009
+da6046f8
+20205baa
+1fe67c10
+2422db68
+5800000e
+20406723
+1fe67cc5
+2422db68
+58000010
+20406723
+1fe67c38
+2422db68
+20405bd5
+7045c00a
+20600000
+5800005b
+20406722
+20205beb
+7045c007
+da604736
+20205baa
+20405bf3
+6fe0c65b
+c0385be2
+c0005be0
+20205b68
+7045c001
+20600000
+7045c004
+20600000
+20405bf3
+6fe0c65b
+c02cdbe8
+20205b7a
+7045c00b
+da604726
+20205baa
+58000009
+20206722
+58005a09
+20206722
+58008006
+20406722
+20002ee0
+20600000
+44a7c009
+20405926
+20405bef
+da604742
+20405baa
+20205a4e
+44a8400a
+20405b64
+20405926
+58000806
+20206722
+6fe0c3ce
+c1800000
+6fe0c5c0
+c0005c0a
+c000dc0a
+c0045c0a
+c0015c0a
+c001dc2e
+c0025c0a
+c0035c53
+c005dc4c
+20205c0a
+20405c75
+78547c00
+6fe0c5b8
+c07fdc11
+6848c5b8
+20406c32
+24608000
+58000000
+20406723
+c0985c24
+58000002
+20406723
+c4038000
+20405c8c
+6fe0c56b
+20405c84
+67e1456b
+6fe0c56d
+20405c84
+67e1456d
+6fe0c5c1
+c0005c26
+c000dc28
+c0015c2a
+c001dc2c
+20600000
+c018dc14
+20205b70
+20405c5e
+20205c93
+20405c66
+20205c93
+20405c62
+20205c93
+20405c6e
+20205c93
+20405c75
+6fe0c5b8
+c07fdc34
+6848c5b8
+20406c32
+24608000
+58000000
+20406723
+c0985b70
+58000002
+20406723
+c4038000
+20405c8c
+20405c4a
+67e0c571
+1ff1fe00
+20405c88
+67e0c56c
+6fe0c571
+1fe17e0f
+20405c88
+67e0c56e
+6fe0c5c1
+c0005c5e
+c000dc66
+c0015c62
+c001dc6e
+20600000
+58000012
+20206723
+20405c75
+6fe0c5b8
+c07fdc52
+6848c5b8
+20406c32
+24608000
+20205c37
+20405c75
+78547c00
+58000002
+20406723
+c4038000
+58000008
+20406723
+203a5c17
+58000000
+67e3456b
+20600000
+6fe1456b
+1fe67e00
+67e1456b
+20207636
+6fe1456d
+1fe67e00
+67e1456d
+20207636
+6fe1456d
+1fe67e00
+67e1456d
+6fe1456b
+1fe67e00
+67e1456b
+20405c70
+20207636
+20405c70
+20207636
+6fe1456d
+6849456b
+67e1456b
+6049456d
+20600000
+6fe0c661
+205a5c8c
+70466101
+20600000
+70474a01
+204041a2
+20205b64
+6fe0c5b8
+c1ff8000
+6fe0c74c
+c1808000
+58000000
+67e0c74c
+67e2456b
+20205c7b
+c4038000
+d840ff00
+9841fe00
+20600000
+c4018000
+d84000f0
+9841fe00
+20600000
+dfe00003
+20406723
+67e1456b
+dfe00004
+20406723
+67e1456d
+20600000
+6848c5ae
+20406c32
+20608000
+5800000a
+20406723
+200003e8
+20205c93
+58008100
+20206722
+70475fff
+7043a834
+580f0f0f
+67e1c2ae
+67e1c2b1
+2020579b
+44a8c00a
+20405e78
+20405cb0
+6fe0c5d1
+c000dca9
+c0015cab
+20600000
+6fe345d3
+20205cac
+6fe345f0
+684b460d
+98467c00
+2022de21
+20205793
+70475f5a
+20600000
+6fe1442f
+c284ce20
+20205e42
+58000000
+67e14750
+6fe1442f
+c284ce20
+20600000
+6fe44848
+c40d8000
+24345cc2
+6fe0c74b
+1fe0fe01
+1fe17e0f
+67e0c74b
+247a0000
+70474b00
+78547c00
+20600000
+6fe0c5b8
+c1ff8000
+7040c100
+70474d1e
+20600000
+44a9400a
+1a627e00
+c00a5cd9
+c00adce8
+c0085e1c
+c018dcf5
+c014dcf7
+c0195cf9
+c01f4e2a
+c0205d04
+c01ce124
+c01d60f0
+c01e6115
+c0225d18
+20600000
+70474c00
+20405c7b
+70476401
+204060df
+6fe0c765
+243a5ce0
+70476614
+6fe143a6
+793ffe00
+67e143a6
+70481500
+6fe1478e
+67e14790
+20405e12
+20205e42
+58000000
+67e14790
+70476400
+d8400006
+6fe44848
+c28ddcef
+d8400007
+604942a6
+604942a8
+70479200
+70474a00
+204041a4
+20205d7e
+d8e00002
+20205d00
+7004c312
+202070a4
+6fe0c765
+c000dcfc
+20205cfe
+20405cf7
+70481414
+d8e00001
+20205d00
+6fe0c813
+f9207e00
+67e0c813
+20600000
+6fe1430f
+c1000000
+6fe08165
+1feb7e00
+1fe67c0c
+20610000
+58000009
+67e142a6
+67e142a8
+20405cf7
+70479201
+20600000
+6fe0c765
+247a0000
+6fe0c36b
+1fe67e22
+24628000
+70481400
+d8e00000
+20205d00
+6fe0819d
+1fe67c0c
+24215d0e
+67e142a6
+67e142a8
+6fe0819f
+203a5d25
+6848c827
+98467c00
+20215d25
+6fe0819f
+67e0c0c1
+20205d27
+6fe0c827
+67e0c0c1
+70479200
+20600000
+70481300
+20600000
+44a9c00a
+20404203
+247a0000
+6fe0c75f
+c07fdd33
+6fe0c813
+1fe17e03
+c1818000
+6fe0c74a
+205a5c79
+6fe44848
+c280dd63
+c2805d63
+c282dd63
+c2835d63
+20405931
+20405cba
+24740000
+20405cc5
+20405c7c
+204059df
+6fe44848
+c30add44
+6fe0c828
+c000dd45
+20205d65
+6fe0c829
+203a5d55
+6fe44869
+67e404c4
+6fe0c868
+c001dd57
+c0015d5a
+70478408
+68494785
+6fe0c784
+1fe22200
+20404546
+6848c784
+18427200
+d8c004c4
+20207548
+6fe44872
+20205d48
+70478403
+68494787
+20205d4e
+70478402
+68494789
+20205d4e
+da200001
+6849478b
+20404546
+6fe0c78d
+e7e08005
+20600000
+58000000
+67e3c56a
+70478407
+6fe3c56a
+67e384c4
+6849428b
+20205d4e
+70476500
+6fe1c76a
+67e1c320
+20405d73
+58000005
+e7e08006
+d8c04770
+20405d7a
+202070e0
+da20431c
+efe08011
+207a0000
+98c0a200
+efe08006
+c1008000
+20205d74
+d8a04327
+df200013
+20407548
+20204142
+20405d83
+6fe143a4
+c283dd89
+c2804dfd
+20205e21
+58000000
+67e44573
+e7e20005
+70466100
+70425a00
+20600000
+20405d29
+6fe143a4
+c2804dfd
+202057c3
+44aa400a
+2040585d
+20406239
+20404938
+20404bc0
+20406081
+2040619f
+204061d0
+20405a3c
+20405da2
+20405db2
+20405dd5
+20405dda
+20405de8
+20405df5
+20405deb
+20405e02
+20405e05
+204059e4
+20405e15
+20205e0c
+6fe44848
+c29bdda5
+20600000
+6fe0c83b
+c1808000
+da604838
+da405daa
+20204de1
+6fe0c5d1
+c1000000
+6fe44848
+c3830000
+d8e00006
+20405fa1
+20404dd1
+20205e1c
+6fe0c5d1
+c0005db8
+6fe44848
+c41a8000
+6848c866
+20205dbb
+6fe44848
+c4190000
+6848c867
+6048c83a
+20405ad4
+1fe17e07
+6848c83a
+98467c00
+2022ddc7
+6fe0c431
+67e0c83d
+6fe0c83c
+c1000000
+70483c00
+20600000
+20405dcc
+6fe0c83c
+c1008000
+70483c01
+20600000
+da4060e4
+da60483d
+6fe0c5d1
+c0004de1
+da405daa
+20404de1
+6fe0c83d
+c000df93
+20600000
+da604760
+da405dd8
+20204de8
+20405e42
+202057c3
+da604815
+da405de0
+20404de8
+6fe0c815
+c000ce14
+20600000
+6fe0c75f
+c07fdca2
+6fe0c74e
+243a5fbf
+6fe44848
+c299de21
+c297e0dc
+202057c3
+da604814
+da405d16
+20204de1
+6fe0c764
+207a0000
+da604766
+da405df0
+20204de1
+6fe0c765
+247a0000
+6fe0c2cf
+c1800000
+202046d4
+6fe44848
+c39d8000
+da604790
+da405dfa
+20204de1
+6fe1478e
+67e14790
+20205d5d
+6fe0c813
+c3810000
+20405cf7
+d8e00000
+20205d00
+da604762
+da4057c3
+20204de1
+da60474d
+da405e08
+20204de1
+6fe0c827
+67e0c0c1
+70474c01
+20600000
+da604750
+da405e0f
+20204de8
+6fe0c5d1
+c0006096
+20205cb5
+6fe1485a
+67e14750
+20600000
+da604658
+da405e18
+20204de1
+20405ea6
+6fe0c763
+243a5f72
+20600000
+280ffe26
+2040e0b4
+20405cb5
+20405d29
+20205e21
+44aac00a
+6fe1442f
+2feffe0b
+2040de48
+20405cb0
+6fe1442f
+c285de30
+6fe44848
+c3045e30
+68494630
+18408401
+60494630
+604942af
+180a7e00
+67e0c2ae
+6fe1c767
+67e1c2b1
+20404e2e
+6fe14598
+67e14760
+58000000
+67e14750
+67e14790
+67e0c815
+67e0c762
+67e0c844
+67e0c74a
+d8e00002
+20405fa1
+20405f95
+20405d6a
+20406271
+202061ad
+44ab400a
+d8e00006
+20405fa5
+70476200
+20405e48
+202061f3
+70481500
+202070e6
+44abc00a
+6fe44848
+c4010000
+204061a7
+d8e00002
+20405fa5
+20405e53
+20405e62
+20205ea3
+6fe0802d
+c01a5e56
+20600000
+67e0c816
+6fe30173
+67e34817
+6fe3c816
+d8c045d2
+df200003
+e8438006
+98467c00
+2022de72
+18c08c16
+c2005e5c
+20600000
+da2045d2
+6fe0c5d1
+1fe0ffff
+1feffe1d
+9a20a200
+6fe0802d
+e7e08011
+c01a5e6b
+20600000
+6fe30173
+e7e30005
+d8c0424a
+204074f5
+6fe342ae
+e7e30005
+20600000
+18c08dfa
+18c20a00
+684b4817
+18408403
+e0430005
+20600000
+da2045d2
+6fe0c5d1
+c1000000
+1fe0ffff
+1feffe1d
+9a20a200
+efe08011
+67e0c3a8
+c01a5e82
+20600000
+efe30006
+67e3410f
+d8a0424a
+204074f5
+efe30006
+67e342ae
+20600000
+6fe14629
+d840aa55
+98467c00
+2022de97
+60494629
+20405e9c
+6fe0c752
+67e0c5d1
+6fe0c5b2
+67e0c62b
+6fe24527
+67e2452b
+67e244d5
+20600000
+20405e78
+6fe2462c
+67e2452b
+67e244d5
+20600000
+6fe342ae
+67e345e9
+1fe0ff00
+67e34606
+1fe0ff00
+67e34623
+20600000
+6fe0c659
+67e0c658
+20600000
+44ac400b
+6fe44848
+c289def4
+c2895eb8
+20600000
+20406979
+20405ebf
+20405eb2
+2040699d
+20405ec6
+20405e89
+20205926
+58004651
+d84045d1
+98460400
+6fe1c651
+da2045d1
+20600000
+20406979
+20405ebf
+20405ed4
+20405eb2
+20405ed7
+20405ec6
+20205926
+7004ccab
+20406d74
+2040697f
+da204654
+684884cc
+20405ec8
+20206d74
+7004ccb9
+20205ec0
+e0408011
+1ff10400
+e0408005
+1fec8400
+e0408005
+e7e08005
+1a227e00
+67f10084
+58000000
+67f10088
+70800602
+20206939
+6fe1c651
+67e1c3c7
+20206953
+1fe22600
+1a227e00
+1fe0fffc
+1fe22400
+efe20012
+67e24654
+1a627e00
+2040698c
+6fe24654
+e7e20012
+20600000
+6fe44848
+c4090000
+20405ec6
+2040671e
+6848c3cf
+20406c3f
+6848c3d4
+20205911
+20406a0f
+6fe44848
+2feffe09
+2440ea29
+20405ef0
+20205e89
+d8400080
+da2045d1
+da400000
+20206a46
+d8400080
+da2045d1
+da400000
+20206a38
+d8400001
+da20462b
+da40005a
+20206a38
+d8400001
+da20462b
+da40005a
+20206a46
+44acc00b
+20406273
+2040711a
+204059e9
+20405f08
+20405f53
+20405f88
+2020594a
+6fe44848
+c294df0d
+c29bdf0d
+20600000
+70483103
+6fe0c5b6
+c17f8000
+da200000
+70483306
+6848c5b6
+20405f1d
+67e0c831
+6fe0c5b5
+c07fdf1a
+20405b1e
+1a227e00
+c2835f3e
+20205f33
+6848c5b6
+20405915
+20205f17
+6fe44848
+c296df29
+6fe0c831
+1fe22600
+6fe0c5b5
+c07fdb52
+6fe0c837
+243a5f26
+20205f2b
+70483b00
+70483100
+20600000
+6fe0c831
+20205b46
+20406c32
+6848c5b5
+2020df29
+6848c5b5
+20406c43
+6848c5b6
+6fe0c831
+20205b46
+6fe0c83b
+c1000000
+70483b00
+6fe44848
+c39a0000
+6fe0c838
+1fe67c14
+24415f68
+6fe0c431
+67e0c838
+20600000
+20405f4a
+20740000
+6fe0c83b
+c1008000
+70483b01
+6fe44848
+c29a5daa
+6fe0c815
+207a0000
+6fe0c59c
+67e0c815
+20600000
+78547c00
+6fe44848
+c3968000
+6fe0c82b
+207a0000
+6fe0c82c
+207a0000
+78347c00
+20600000
+6fe44848
+c2955f57
+c295d85d
+20600000
+6848c5b9
+20405915
+6848c5b9
+20406c32
+2020df60
+6fe0c5d1
+c1008000
+7045d101
+20205cb2
+6fe44848
+c315df64
+6fe34589
+67e3457d
+6fe0c5d1
+c1000000
+7045d100
+202060b4
+44ad400b
+6fe0c850
+c1008000
+20405f74
+6048c5d1
+20405f8b
+20405cb2
+20405f8d
+70476301
+20205ea3
+20405f8b
+202069f6
+6848c5d1
+18408401
+6fe44848
+c288df7b
+18467c02
+24415f82
+20600000
+6fe0c850
+1fe0ffff
+98467c00
+24415f80
+20600000
+d8400000
+20600000
+d8400001
+20600000
+d8400001
+da2045d1
+da400000
+20206a38
+6fe44848
+c41a0000
+20205f0d
+d8e00000
+20205fa1
+d8e00000
+20205fa5
+d8e00003
+20205fa1
+d8e00003
+20205fa5
+d8e00005
+20205fa1
+d8e00005
+20205fa5
+d8e00014
+20205fa1
+d8e00018
+20205fa1
+d8e00016
+20205fa1
+d8e0000c
+20205fa1
+d8e0001c
+20205fa1
+6fe44848
+f9207e00
+67e44848
+20600000
+6fe44848
+f93ffe00
+67e44848
+20600000
+d8e00015
+20405fa1
+58000000
+67e44868
+67e44871
+6fe0c5a4
+1fe17ec0
+c0205fb6
+c0405fb8
+c0605fbd
+58070008
+67e44869
+20600000
+58040005
+20205fb4
+58022303
+67e44868
+58000003
+67e44871
+20600000
+5800cd03
+20205fb9
+44adc00b
+6fe0c74e
+1fe0ffff
+67e0c74e
+6848c5d1
+18467c01
+2442df74
+6048c5d1
+20405f84
+20405e62
+20205793
+47434030
+6fe0c5c0
+c1018000
+6fe44848
+c41c0000
+6fe2456b
+207a0000
+20406071
+58000003
+20406067
+205a6063
+245a6065
+58000002
+2040606c
+205a6063
+6fe0c662
+c000dfe0
+6fe44848
+c41c0000
+df200005
+d8a04662
+2020750f
+20405ff4
+6fe14663
+67e10560
+6fe1456b
+67e10562
+2040602d
+6fe10560
+67e14663
+6fe10562
+67e1456b
+6fe14665
+67e10560
+6fe1456d
+67e10562
+20406035
+6fe10560
+67e14665
+6fe10562
+67e1456d
+20600000
+6fe44848
+c41c8000
+4744c031
+6fe14663
+67e10567
+20406008
+67e14663
+6fe1456b
+67e10567
+20406016
+67e1456b
+6fe14665
+67e10567
+20406008
+67e14665
+6fe1456d
+67e10567
+20406016
+67e1456d
+20600000
+6fe08568
+203a600b
+20206010
+6fe08567
+20406023
+67e08567
+6fe10567
+20600000
+6fe08567
+2040605f
+20406023
+205a7644
+2040605b
+2020600e
+6fe08568
+203a6019
+2020601d
+6fe08567
+20406028
+67e08567
+2020600e
+6fe08567
+2040605f
+20406028
+205a7644
+2040605b
+2020600e
+1feffe04
+1fe6fc05
+204075d0
+1807fe00
+20600000
+1feffe0c
+1fe6fc0a
+204075d0
+1807fe00
+20600000
+6fe10560
+68490562
+9840fe00
+6848c667
+9840fe00
+1fe10401
+6048c667
+2020603d
+6fe10560
+68490562
+9840fe00
+6848c668
+9840fe00
+1fe10401
+6048c668
+2020603d
+67e18564
+2feffe10
+2020e047
+6fe08565
+c07fe04e
+6fe08564
+1fe37e00
+67e10560
+67e10562
+20600000
+6fe08565
+c000604b
+6fe18564
+20206043
+70056600
+6fe08564
+20206043
+6fe08564
+20406059
+67e08560
+67e08562
+203a6057
+580000ff
+67e08561
+67e08563
+20600000
+58000000
+20206054
+2040605f
+1fe37e00
+20406060
+1fe67e00
+67e08567
+20600000
+1fe67e00
+67e084d8
+6fe084d8
+20600000
+70466200
+20600000
+70466201
+20600000
+9a267c00
+24217644
+9a467c00
+24217644
+20207646
+9a267c00
+24610000
+9a467c00
+24610000
+20207646
+6fe1456b
+20406078
+1fe22200
+6fe1456d
+20406078
+1fe22400
+20600000
+67e10562
+6fe08563
+c07fe07e
+6fe08562
+1fe17eff
+20600000
+6fe10562
+1fe67e00
+2020607c
+da60455e
+da406084
+20204de1
+6fe24552
+67e244f5
+70474c01
+20600000
+6fe0c87e
+c0006090
+c000e092
+c001608d
+c001e094
+580ea600
+67e24552
+20600000
+5805e740
+2020608e
+580927c0
+2020608e
+58124f80
+2020608e
+4743c030
+70453f00
+20404cbe
+5fffffff
+67e244f5
+58000000
+67e3c56a
+70487d01
+20405bf9
+204057d7
+6fe0c87d
+245a57d7
+6fe444f5
+20204d29
+6fe0c87d
+245a60a8
+70487d00
+20204cbd
+20405b67
+6fe44848
+c41e0000
+6fe0c5ab
+d8400040
+20406c68
+6fe0c5ac
+d8400040
+20206c68
+6fe0c87d
+243a4c97
+20204c93
+793f8026
+70453b00
+d8e00001
+20205fa5
+6fe44848
+c308e0c5
+2040579e
+20346107
+6fe44848
+c29860ca
+c318e0ca
+20405acf
+1a217e07
+6848c867
+98467c00
+2022e0e4
+202060ca
+6fe0c74e
+243a5fbf
+20600000
+2040579e
+203460d4
+7045d100
+6fe14856
+67e14521
+70452502
+20204bc3
+204061ad
+6fe1451b
+67e14521
+70452504
+20204bc3
+6fe0c5d1
+c0006107
+20405cb0
+204060b4
+204061ef
+7045d101
+20405e78
+20205793
+2040579e
+203457c3
+20205e21
+2040579e
+20740000
+6fe44848
+c297dea3
+20600000
+d8e00001
+20405fa1
+58000000
+67e14521
+20405e42
+20406271
+204061ad
+7044cf01
+6fe44848
+c30ac93b
+7044cf02
+2020493b
+6fe0c53f
+243a6096
+6fe0c525
+c00160ff
+c002610b
+c001e110
+6fe44848
+c29e6096
+204061f3
+204060b4
+6fe0c74e
+243a5fbf
+6fe0c5d1
+c00057c3
+20600000
+6fe44848
+c297e0cf
+c29860cf
+c31d6107
+6fe2462c
+684a460d
+98467c00
+2022e0e4
+6fe1451f
+67e14521
+70452503
+20204bc3
+6fe44848
+c317e0f6
+6fe0c850
+c000e0f6
+202060d7
+6fe44848
+c317e0f6
+c289e0f6
+c28960f6
+202060d0
+6fe244d5
+67e2452b
+67e2462c
+20404be8
+204061a7
+20405e12
+20405c7b
+70474c00
+70453b00
+70452500
+6fe2452b
+6fe24527
+98467c00
+20628000
+202060df
+20405e12
+d8e00001
+20405fa5
+204061a7
+58000000
+67e1451d
+67e14521
+67e0c53b
+67e0c661
+67e0c525
+20405c7b
+20405c8c
+6fe244d5
+67e2452b
+67e2462c
+20205ea3
+47444031
+c6930000
+20405931
+24740000
+6fe44848
+c30ae13c
+6fe0c828
+243a6153
+20405c7c
+6fe0c4cf
+c280e14b
+6848c460
+6fe0c56a
+9841fe00
+67e0c56a
+6848c465
+6fe0c56f
+9840fe00
+67e0c56f
+6848c466
+6fe0c570
+9840fe00
+67e0c570
+7044cf01
+da200007
+da40456a
+6fe44848
+c28c4d50
+6fe1456f
+207a0000
+20204d50
+7044cf02
+da200009
+6fe0c829
+243a6159
+da404871
+20600000
+da404868
+20600000
+58000000
+67e1c841
+20600000
+6fe44848
+c40b0000
+6fe0c74c
+207a0000
+6fe0c541
+207a0000
+6fe0c83e
+1fe0fe01
+1fe17e03
+67e0c83e
+247a0000
+70483f00
+44ae400b
+6fe0c83f
+1fe0fe01
+67e0c83f
+1fe67c08
+24216176
+20404c05
+20404cc8
+242c617c
+2437e17c
+2040618f
+20406186
+20404c01
+6fe0c840
+1fe0fe01
+67e0c840
+c008617e
+20600000
+204048cc
+2020616a
+70484000
+6fe0c841
+c3800000
+79207e00
+67e0c841
+6fe14858
+67e14750
+20205bf9
+6fe0c541
+203a615b
+70484000
+6fe0c841
+c4000000
+793ffe00
+67e0c841
+20405e12
+20205b67
+20404cdf
+6fe0c43e
+2fe1f008
+24608000
+6fe0c43f
+c07fe096
+20600000
+6fe0c5d1
+c0803b7e
+6fe0c510
+207a0000
+70804202
+6ff08130
+1fe17efc
+67f0804c
+20203c37
+6fe44848
+c4100000
+6fe0c844
+207a0000
+1fe0ffff
+67e0c844
+203a61f3
+20206201
+6fe44848
+c4100000
+20406271
+6fe0c85c
+67e0c844
+20600000
+70484400
+6fe14860
+67e145c9
+67e145cb
+6fe0c5d1
+c00061b6
+c000e1b8
+c00161ba
+20600000
+6fe0c5bc
+202061bb
+6fe0c5bd
+202061bb
+6fe0c5be
+67e084cc
+204061f3
+6fe084cc
+67e0c5c8
+da200000
+7045c601
+20207030
+6fe0c5bf
+c17f8000
+6fe14760
+247a0000
+6fe1451d
+247a0000
+6fe14521
+247a0000
+6fe0c844
+247a0000
+6fe0c85d
+203a61d3
+67e0c845
+20600000
+da604845
+da4061d3
+20204de1
+6fe0c5bf
+67e0c5c8
+6fe1485e
+67e145c9
+67e145cb
+da200000
+6848c62b
+18408401
+6fe44848
+c30e61e0
+18408401
+18467c04
+244161e3
+6048c5c7
+7045c601
+20600000
+d8400001
+20600000
+78547c00
+6fe0c5bf
+6848c5c8
+98467c00
+24628000
+6fe0c5c7
+207a0000
+70459300
+78347c00
+20600000
+204061ff
+204061f8
+204061fb
+202061fd
+6fe0c5d1
+c00061f8
+c000e1fb
+c00161fd
+20600000
+70484700
+6848c5bc
+2020620c
+6848c5bd
+2020620c
+6848c5be
+2020620c
+6848c5bf
+2020620c
+6fe0c5d1
+c0006206
+c000e208
+c001620a
+20600000
+6848c5bc
+20206210
+6848c5bd
+20206210
+6848c5be
+20206210
+44aec00b
+6048c5c8
+da200000
+2020702b
+44af400b
+6048c5c8
+da200000
+20207026
+44afc00b
+6fe0c5bc
+98467c00
+2042e235
+6fe44848
+c3126c3f
+20406226
+2040622a
+2040622e
+6fe0c846
+203a6c3f
+70484600
+20206c5b
+44b0400c
+6fe0c5bc
+98467c00
+2042e237
+20206c43
+6fe44848
+c4130000
+6fe0c5be
+20206231
+6fe44848
+c4128000
+6fe0c5bf
+20206231
+6fe44848
+c4138000
+6fe0c5bb
+98467c00
+24628000
+70484601
+20600000
+70484700
+20600000
+70484701
+20600000
+6fe14760
+247a0000
+6fe1451d
+247a0000
+6fe14521
+247a0000
+6fe0c844
+247a0000
+204061e5
+20740000
+6fe44848
+c4108000
+c4020000
+c291e25f
+6fe0c592
+1fe0fe01
+67e0c592
+1fe67c14
+24416251
+c0016253
+c0026259
+c0036253
+c0046259
+20600000
+70459201
+20206259
+6fe44848
+c2916201
+6fe0c5bb
+c17f8000
+6848c5bb
+20206210
+6fe44848
+c29161f3
+6fe0c5bb
+c17f8000
+6848c5bb
+2020620c
+6fe1485a
+68494750
+98460400
+6fe14864
+98467c00
+24216271
+6fe0c593
+247a0000
+70459301
+20206269
+6fe14862
+67e145c9
+67e145cb
+6fe44848
+c29161b1
+6fe0c5bb
+c17f8000
+202061bb
+70459300
+20206259
+6fe44848
+c4108000
+c4020000
+c291e285
+6fe0c592
+1fe67c0a
+20216281
+6fe0c5d1
+c000627e
+70409401
+20600000
+6fe44848
+c38c0000
+20204d3f
+6fe0c5d1
+c0004d50
+70409400
+20600000
+6fe0c593
+243a6281
+2020627a
+20403a60
+6fe08009
+20204c4d
+20406288
+20204d5d
+6fe0c813
+2fe00603
+2420f644
+20404e2c
+20207646
+6fe1442f
+c284e28d
+20600000
+20406fd3
+20758000
+58006316
+67e1438a
+58006314
+67e1438c
+58006312
+67e14390
+580062c3
+67e14392
+580062bd
+67e14388
+58006382
+67e14394
+580062f9
+67e14398
+5800635d
+67e14479
+58006399
+67e14474
+5800639a
+67e14476
+204062b8
+20404142
+20406385
+20406d0f
+2040711d
+20407018
+44b0c00c
+20406392
+6fe0c46f
+c00062ba
+6fe0c470
+67e0c432
+202063a1
+70412007
+20600000
+704432ff
+70447101
+20206331
+6fe0c471
+c0014e09
+204066b4
+6fe0c3ee
+243a4e09
+20204e0b
+1a627e00
+c00a62cc
+c00ae2d0
+c01fe2d3
+c02062d9
+c00862df
+c01662e0
+c016e2eb
+20600000
+20406318
+58000000
+67e14449
+20204e26
+2040711d
+70444200
+20206331
+2040711d
+70444201
+6fe44453
+67e442a6
+20404e2c
+202045f3
+6fe1430f
+c1000000
+6fe4445b
+207a0000
+67e442a6
+202045f3
+202063b6
+6fe0c46f
+c1000000
+6fe0c471
+c1808000
+204062e6
+20204e24
+70467101
+df20000b
+d8a04672
+d8c0465b
+20207548
+6fe0c46f
+c1000000
+6fe0c471
+c000e2f0
+202063b2
+6fe0c671
+c1808000
+70467100
+6fe1442f
+c284ce26
+df20000b
+d8c04672
+d8a0465b
+20207548
+204062fc
+20406303
+2020630d
+da60446d
+da4062ff
+20204de8
+70447102
+20404e26
+20406342
+2020639e
+da60467e
+da406306
+20204de1
+6fe1442f
+c284e39e
+6fe0c65b
+c000e39e
+c002639e
+c002e39e
+20204e28
+6fe0c471
+c1808000
+da604449
+da40631f
+20204de8
+2040636e
+20206d40
+20406c74
+20206d34
+20406c74
+20206fd7
+6fe0c437
+c280631b
+20600000
+6fe14469
+67e1446b
+67e1446d
+20204e16
+6fe0c471
+c1808000
+6fe0c437
+c2806324
+20600000
+6fe1442f
+c3848000
+6fe14467
+67e1446b
+67e1446d
+6fe14445
+204063c7
+20404e22
+6fe2444f
+67e2465e
+6fe1442f
+c3858000
+20204e18
+6fe0c471
+c1808000
+6fe0c437
+c2806336
+20600000
+6fe14449
+68494447
+60494449
+247a0000
+6fe14443
+204063c7
+20404e22
+6fe2444b
+67e2465e
+6fe1442f
+c3858000
+20204e18
+6fe1442f
+c284ce20
+20206318
+20407638
+6fe1442f
+c284e349
+20600000
+6fe0c442
+207a0000
+20207636
+20407638
+6fe1442f
+c3848000
+20207636
+6fe0c437
+c2806353
+20600000
+20206331
+78567c00
+6fe1446b
+67e1446d
+2040634c
+20346350
+20406345
+24740000
+78367c00
+20600000
+20406354
+24760000
+1a227e00
+203a6364
+20404e24
+da604483
+20206366
+20404e26
+da6044ab
+dfe00005
+98effe00
+9a60a600
+efe08013
+207a0000
+2040637a
+1a60a601
+20206369
+6fe1442f
+c284e371
+20600000
+20404203
+247a0000
+2040637d
+24740000
+1fe0ffff
+1feffe05
+d84044d3
+98408c00
+202063cb
+67e084c4
+da2004c4
+20207122
+da2004c4
+2040713a
+24740000
+6fe084c4
+20600000
+6fe1436b
+c00c62d3
+20600000
+58000002
+67e0c67d
+58200008
+67e24453
+592c0005
+e7e20005
+7042b417
+5800001b
+67e14305
+2040419e
+204041ba
+204041c7
+202041a6
+df200028
+d8a044d3
+d8c094f9
+2020753b
+df200139
+d8c093c0
+2020753b
+20206331
+da200000
+da604666
+20407036
+20406342
+6fe0c67d
+67e0c67e
+20600000
+58000000
+204063ad
+70442a01
+20406fe2
+20406fec
+6fe0c684
+203a63aa
+6fe084f1
+c30163b9
+6fe1442f
+c3860000
+20204e28
+684943de
+e7e08002
+efe08005
+67e0c431
+20600000
+6fe143de
+efe0803f
+c1800000
+20204e28
+684943de
+efe08002
+c000e3c1
+58000001
+684943de
+e7e08002
+18408c02
+efe08006
+e7e08031
+efe10006
+202075e6
+58000002
+204063ad
+18408c05
+efe10006
+203a4e28
+202075e6
+67e140a5
+1fe0fffc
+67e1435c
+20600000
+efe08006
+1fe22200
+e8410006
+204074d3
+20404546
+1a227200
+204074cd
+20207548
+6fe1467f
+67e1447b
+6fe0c681
+67e0c65d
+67e0c668
+6fe0c682
+67e0c46f
+6fe0c683
+67e0c470
+70443701
+58000030
+67e14440
+58000000
+67e14438
+58000002
+67e14483
+67e14488
+58000006
+67e144ab
+67e144b0
+58000007
+67e1448d
+58000008
+67e144b5
+58004471
+67e143de
+58201400
+67e1c471
+70409401
+58000100
+67e140a5
+7040a708
+7040c105
+7040c202
+58000096
+67e1444b
+e7e10005
+58000296
+67e1444f
+e7e10005
+38000010
+38048008
+380ac000
+380c0004
+67e4445b
+70443401
+5800465b
+67e14435
+58000000
+67e1465b
+380001a0
+38040068
+38080000
+380c0000
+67e4465e
+58000301
+67e14666
+380001a0
+380400e8
+38080000
+380c0000
+67e44669
+5800000e
+67e14443
+58000140
+67e14445
+67e1435c
+58000050
+67e14447
+70436607
+70435b00
+380000fb
+3806c212
+3808800f
+380c0021
+67e44380
+38000bb8
+380402ee
+67e24467
+5800458c
+67e143b0
+58002001
+67e1458c
+70431b1f
+38010102
+380480c1
+38098120
+380c640c
+67e4c31c
+380003c1
+e7e10005
+70433b1f
+3802090d
+38074c15
+380a8532
+380dd1d5
+67e4c33c
+38026574
+3804001c
+e7e18005
+58004478
+67e143da
+70447802
+580045b1
+67e143ad
+7043af05
+580093c0
+67e142ca
+20600000
+6fe0c3ec
+d840003e
+20206c67
+6fe0c3ec
+d840003f
+20206c67
+20406443
+20406440
+20206443
+20406447
+20206440
+20206447
+20406447
+20206449
+20206440
+6fe0c3ed
+20206441
+6fe0c3ed
+20206444
+2040644f
+20406451
+2020644f
+2040649f
+20206458
+44b2c00c
+7001e801
+7001ea01
+7001ec19
+7001ed02
+6fe101ef
+204075e6
+6fe401e7
+67e401df
+6fe081ee
+67e0c116
+6fe081e9
+c000e466
+c00164f7
+684881e7
+6fe081ea
+c001646a
+c000e486
+44b3400c
+204064e4
+204039c9
+204064b2
+79202a00
+782efc00
+78307c00
+7850fc00
+20403dc2
+6fe081eb
+67f0890d
+20206476
+44b3c00c
+6fe081e8
+c000e479
+6fe081ec
+c00ce47d
+c03c6480
+c0786483
+df200035
+d8c00b00
+202064d5
+df2000cb
+d8c00b00
+202064d5
+df200162
+d8c00b00
+202064d5
+44b4400d
+204064e4
+204039c9
+7843fc00
+782efc00
+78307c00
+684881e8
+18422a00
+6fe081eb
+67f0890d
+c0006476
+44b4c00d
+6fe081ec
+1fe27200
+d8c00b00
+efe08006
+08008608
+c2006495
+6fe101ef
+204075e6
+6fe401e7
+684c01df
+98467c00
+2022e491
+20206458
+df2003fe
+d8a00b00
+580001ff
+18002400
+1fe92200
+1a232200
+9a22a200
+2a2ffe00
+7920fe09
+18430400
+2feffe00
+79208407
+1fe37e00
+1a40a401
+2a400e00
+2420e4a3
+e0408005
+c20064a3
+20600000
+44b5400d
+793f802f
+70890103
+70892084
+708925a7
+70893003
+70893740
+708a6d85
+708a6d89
+6fe08164
+c3968000
+70890101
+70892080
+708a6d05
+708a6d09
+7920002f
+70890105
+70893024
+7089340a
+20600000
+44b5c00d
+18002a08
+18002a00
+7850fc00
+78507c00
+782f7c00
+70890005
+20000002
+70890000
+204064e4
+708a1600
+708a0a10
+708a0b00
+20600000
+202064c6
+efe08006
+08008608
+c20064d5
+204064d4
+78287c00
+db600350
+2021e458
+6fe101ef
+204075e6
+6fe401e7
+684c01df
+98467c00
+2022e4db
+204064d4
+20206458
+44b6400d
+70890005
+20000002
+70890000
+708a10aa
+708a11aa
+708a1215
+708a0af8
+708a0b04
+20000078
+708a167a
+708a1700
+708a1800
+708a1900
+708a1a00
+708a112a
+708a0a78
+708a4300
+20600000
+20406500
+44b6c00d
+6fe101ef
+204075e6
+6fe401e7
+684c01df
+98467c00
+2022e4f8
+20206458
+44b7400d
+204064d4
+20403954
+58000500
+20403abc
+2020396a
+20800000
+20406df0
+20406511
+20406513
+20406527
+20406543
+20406547
+70056401
+70056104
+20406552
+2020650f
+70804204
+20600000
+20406517
+2040651b
+2040651f
+20206523
+6fe0c437
+247a0000
+70443705
+20600000
+6fe0c438
+247a0000
+70443806
+20600000
+6fe0c439
+247a0000
+70443909
+20600000
+6fe0c43a
+247a0000
+70443a0a
+20600000
+58000c00
+67e104c4
+58000eff
+e7e10005
+58000f00
+e7e10005
+58000fff
+e7e10005
+6fe404c4
+20406acd
+20406ae7
+d841c200
+20406ada
+6fe0c437
+d8400008
+20406c68
+6fe0c438
+d8400049
+20406c68
+6fe0c439
+d840000a
+20406c68
+6fe0c43a
+d840000b
+20406c68
+d8400081
+60588060
+202075e3
+6fe0c43b
+247a0000
+70443b0c
+20600000
+6fe0c43b
+d8400010
+20406c68
+da200040
+20406d6e
+da200000
+da400000
+58000000
+20406d93
+d8e00000
+20206dd9
+6ff10112
+1fe0a3fc
+24610000
+20406afb
+efe08003
+c000e55a
+204074fb
+20206b03
+efe10003
+67e10565
+d84003ff
+98410400
+6049055e
+1feb7e00
+1fecfe00
+67e08560
+efe08003
+1fe0ffff
+9a267c00
+20610000
+20406568
+202065c3
+6fe08560
+c01fe56b
+202065af
+44b7c00d
+6fe0855e
+c00065ae
+c000e576
+c001657b
+c001e589
+c0026593
+c002e5ae
+c00865a4
+c00a65aa
+202065ae
+70056700
+6ff10000
+67e10568
+df200003
+202065b6
+efe10003
+67f10052
+20600000
+efe08003
+1fe20400
+67f08024
+efe08003
+98408400
+79207e07
+67f08023
+efe08003
+98408400
+1fe27200
+20600000
+2040657e
+efe08003
+67f08025
+98408400
+c200658a
+184104ff
+efe08003
+98467c00
+2422e5a2
+202065ae
+df200020
+d8a04000
+d8400000
+efe08003
+e7e08005
+98408400
+c2006596
+184104ff
+efe08003
+98467c00
+2422e5a2
+70802300
+204065ae
+204075e8
+20203801
+70802300
+202065af
+efe08003
+1fe27200
+efe10003
+1fe20a00
+20406b3f
+202065ae
+6ff08060
+79207e04
+67f08060
+202065ae
+202065b3
+70056701
+202065b4
+7005670c
+202065b4
+70056700
+df200001
+202065b6
+7005620e
+1f20fe03
+67e08563
+204065bf
+6fe18564
+e7e18003
+d8c00567
+20406b26
+20206b09
+20406b07
+6fe18561
+e7e18003
+20600000
+20406afb
+18608603
+efe08003
+98608600
+20206b01
+70410d00
+20600000
+6fe143d8
+1fe22600
+204065e0
+202065e6
+58000000
+1a60a20b
+e7e08011
+1a60a200
+efe08011
+203a65f1
+1fe27200
+1a60a402
+e8408012
+20406c43
+e8408012
+20406c43
+204065f1
+e8408012
+20406c29
+1a40a401
+c20065d6
+20600000
+1a608a01
+efe08005
+207a0000
+1fe27200
+1a60a206
+202065ec
+1a608a00
+efe08005
+207a0000
+1fe27200
+1a60a202
+202065ec
+e8408011
+20406c29
+1a20a201
+c20065ec
+20600000
+58000000
+1a60a20a
+e7e08011
+1a60a206
+e8408011
+20406c32
+1a60840c
+efe10002
+1a608c0b
+e8408006
+18420e00
+f920fe00
+1a60840c
+e7e10002
+1a20a201
+1a608a0b
+efe08005
+1fe0fe01
+e7e08005
+1a608a0a
+e8408005
+18408401
+e0408005
+1a608a01
+efe08005
+9842fc00
+2422e5f5
+20600000
+6fe143d8
+1fe22600
+1a608a01
+efe08005
+1fe27200
+1a60a202
+e8408011
+20406c0f
+1a20a201
+c2006613
+20600000
+e8420011
+1c427e00
+98467c00
+20610000
+58000000
+e7e20011
+20600000
+6fe143d8
+1fe22600
+1a60a212
+20406618
+efe20011
+1a60a416
+e8408012
+98408400
+1c427e00
+98467c00
+24610000
+e7e20011
+204065ce
+1a60a20c
+efe10011
+1a60a20e
+e8410011
+e7e10011
+98417e00
+1a60a210
+e7e10011
+20600000
+2035e63a
+580043fd
+d8a043ee
+98a67200
+2040750f
+20600000
+44b8400e
+204066b4
+6fe0c3ee
+c0007646
+c000f646
+c0017646
+c001f646
+c040f646
+c0607646
+c0407646
+c0207646
+20600000
+d8e00000
+da400000
+18e67c07
+24610000
+aa2fffff
+2020e64e
+20206652
+18427e00
+203a6652
+f9202400
+184085ff
+18e08e01
+20206649
+6b014312
+6d614314
+20407638
+20206658
+44b8c00e
+204066a4
+243a3aba
+204066b4
+df200008
+6848c3ee
+1f260e08
+a84fffff
+2020e665
+2040666c
+24216665
+20406682
+20206669
+1d627e00
+9b00b000
+c200665d
+20203aba
+1b027e00
+1b020a00
+20600000
+44b9400e
+1f260e08
+d8400000
+d9600000
+18e27e00
+c004667d
+6fe0c3ee
+afefffff
+2020e67d
+f9201600
+1d627e00
+98408400
+18e08e01
+1a227e00
+98467c00
+2022e67d
+20216670
+18427e00
+9a267c00
+24628000
+f9201600
+20600000
+44b9c00e
+204066a4
+243a3aba
+204066aa
+203a668b
+6fe4c3f2
+67e4c3ef
+58000000
+e7e18005
+6160c3f8
+630143f9
+20600000
+44ba400e
+204066ad
+18c08c01
+efe10006
+20600000
+44bac00e
+204066ad
+18c20a00
+18c20400
+58000000
+e7e18005
+20600000
+44bb400e
+204066aa
+203a3aba
+6fe1c3f5
+67e1c3f8
+6fe1c3f2
+67e1c3f5
+6fe1c3ef
+67e1c3f2
+20600000
+44bbc00e
+6fe1c3ef
+20600000
+44bc400f
+6fe1c3f2
+20600000
+44bcc00f
+6fe1c3f8
+20600000
+204066aa
+203a66b2
+d8c043ef
+efe18006
+203a66b0
+18c08dfd
+20600000
+44bd400f
+df200004
+d8c043ef
+d8400000
+efe18006
+1fe17eff
+98418400
+c20066b8
+6048c3ee
+20600000
+203a3aba
+1fe20a00
+20600000
+44bdc00f
+da400000
+da2043ef
+1a20a3fe
+1a20a202
+580043fb
+9a267c00
+2022e6d1
+efe08011
+1a20a201
+203a66c5
+e8410011
+efe10002
+9a40a400
+1a40a404
+202066c5
+1a427e00
+20600000
+d8e0000c
+20203c54
+d8e0000c
+20203c58
+204066b4
+6fe0c3ee
+207a0000
+204066c1
+d8400100
+98467c00
+202166d3
+204066d5
+6fe143fb
+18c20a00
+da2043ef
+580043fb
+9a267c00
+20628000
+efe08011
+1a20a201
+243a66eb
+e7e10005
+1a20a202
+202066e2
+efe10011
+1a20a202
+1fe20c00
+efe10006
+e7e10005
+1fe27200
+1f20f202
+20407548
+202066e2
+204066b4
+6fe0c3ee
+207a0000
+da2043f0
+1a20a3fd
+18c20a00
+6fe143fb
+18a20c00
+1a20a203
+580043fc
+9a267c00
+20628000
+efe10006
+203a66fc
+1fe0fe04
+1fe27200
+18c22400
+efe10011
+1fe20a00
+1a420c00
+18c08dfe
+20407548
+202066fc
+44be400f
+1fe17eff
+1fe67c0c
+24213aba
+d8a08070
+98a08a00
+18a22200
+d840003e
+e0408005
+2040671a
+2000001e
+1a220a00
+d840003f
+e0408005
+2020671e
+6ff08081
+1fe17e7f
+67f08081
+20600000
+6ff08081
+1fe1fe80
+67f08081
+20600000
+20206929
+20206930
+6ff0806f
+1fe17efd
+67f0806f
+20600000
+2434672c
+6ff0806f
+1fe1fe02
+67f0806f
+18427c00
+2022e72f
+1a627a00
+2fcc0000
+2020681b
+18000404
+da2001c4
+20406724
+2040672c
+da2055aa
+6fe101c4
+e8410006
+9a267c00
+20600000
+2054674c
+d8400002
+da2001ca
+2040672c
+6fe101ca
+67e101bd
+20546742
+20600000
+d8400010
+da2001cc
+20406724
+2040672c
+d8c001cc
+df200010
+20406f8f
+20406f16
+20406fab
+20206f10
+70802300
+20406724
+20206fab
+58000000
+67e104ed
+7856fc00
+20406731
+24628000
+7836fc00
+70802380
+70802200
+70802400
+da208025
+20406728
+70802300
+6fe081ba
+c4000000
+d8400006
+20406732
+2422e76e
+efe10006
+98002200
+2040672c
+20406765
+2020675d
+6fe104ed
+df200006
+d8c001c4
+20407648
+6f2101c6
+1a220c00
+20407648
+67e104ed
+20600000
+6fe081de
+c02d677c
+da20aa55
+6fe101c4
+9a267c00
+2422e77e
+da2055aa
+6fe101c6
+9a267c00
+2422e77e
+6fe101c8
+684904ed
+98467c00
+2422e77e
+7920220f
+2020672f
+7001ba00
+20600000
+204075e3
+58001000
+67e101bd
+da606a4c
+df200002
+20406731
+24628000
+6fe101bd
+1ff0fe00
+9840fe00
+1ff0fe00
+67e101bd
+c2006785
+2020675d
+6ff1011e
+67e101b8
+793ffe0e
+247a0000
+580007d0
+da2001b8
+d8400002
+204068b0
+6fe081ca
+1ff18400
+6fe081b8
+1ff27e00
+9841fe00
+67e081b8
+202068c6
+70805025
+204075e3
+78547c00
+7001ba00
+2040683d
+204068be
+58000000
+da2001ca
+d8400002
+204068b0
+2040678e
+580007d3
+da2001dd
+d8400002
+204068b0
+6fe081b8
+c301e7b7
+580007f0
+da2001cc
+d8400010
+204068b0
+70800608
+7920002b
+d8c001cc
+20406f9b
+78347c00
+70411500
+2040680c
+24216818
+2054674c
+6fe101ca
+1ff0fe00
+d84007ff
+98417e00
+2022e7c9
+20406866
+da6068b4
+20546742
+2040674f
+2436e7c9
+6fe081ba
+2fe00603
+2420e7b8
+204067d7
+2040685a
+70411500
+2040680c
+24216818
+204067fe
+20406a29
+6fe081b8
+c28167e3
+20406806
+2436e7da
+6fe081ba
+2fe00603
+2420e7cb
+202067e3
+580001ff
+dfa00000
+20600000
+20406a26
+6fe081b8
+c28167e3
+20406806
+2436e7e3
+6fe081ba
+2fe00603
+2420e7cb
+202067f3
+70411500
+2040680c
+24216818
+6fe081b8
+c280e7f3
+20406979
+200000c8
+20406988
+20000064
+da6069bc
+2040673a
+2040674f
+2436e7f3
+6fe081ba
+2fe00603
+2420e7e4
+204067f7
+6fe081b8
+c4000000
+20206506
+58000000
+67e401cc
+67e401d4
+18007004
+20406fac
+70805021
+20600000
+6fe0c3d7
+6848c3d6
+98467c00
+2422ea0f
+7043d502
+7043d601
+7043d700
+20206a0f
+58000000
+67e101bd
+da606a4c
+204069f8
+2040673a
+2020674f
+20406812
+6fe0c115
+1fe0fe01
+1fe67c03
+67e0c115
+20600000
+6fe0c115
+207a0000
+6fe081dd
+207a0000
+1fe27200
+202074fc
+204067f7
+204075ec
+20600000
+6fe081ba
+1fe3fe00
+7920fe00
+2a2c000f
+20608000
+67e081ba
+20600000
+6ff0806f
+c4008000
+20206828
+6ff08128
+afefffff
+20608000
+6ff08108
+c300e825
+20406f10
+20206825
+6fe140e9
+207a0000
+70802380
+70802200
+70802400
+684940eb
+184bf200
+98000c00
+efe08006
+67f08025
+c2006834
+70802300
+20600000
+708aa004
+708aa133
+708aa201
+20206840
+708aa00c
+708aa1fb
+708aa203
+67e104d4
+44bec00f
+708a01ff
+6ff08a0b
+67e084d6
+1fe1fe04
+67f08a0b
+6ff08a13
+67e084d7
+708a1311
+200003e8
+6ff08a02
+1fe1fe01
+67f08a02
+708a0003
+44bf400f
+6ff08aa0
+1fe1fed0
+67f08aa0
+20001770
+6ff08aa0
+1fe1fe20
+67f08aa0
+20002ee0
+6fe104d4
+20600000
+44bfc00f
+708aa004
+708aa143
+708aa201
+6ff08a02
+1fe17efe
+67f08a02
+6fe084d6
+67f08a0b
+6fe084d7
+67f08a13
+20600000
+1fe9fe00
+67f10045
+70804b00
+20600000
+20406839
+20406866
+20406898
+e8408011
+1a20a201
+18000e00
+a84c0000
+2020e88f
+6ff08046
+79207e06
+79207e07
+67f08046
+70804702
+70804782
+793ffe07
+67f08046
+7080478a
+2000000b
+708047ca
+20000021
+7080474a
+2000002c
+708047ca
+20000016
+7080478a
+20000021
+70804782
+20000001
+70804792
+2000000a
+708047b2
+6ff08007
+70804792
+20000001
+70804782
+afec0000
+2020e870
+6ff10045
+1fe0fe01
+67f10045
+18e08e01
+28e01e08
+2420e870
+c200686d
+70804783
+2020685a
+70804782
+2000000c
+70804780
+70804782
+20000096
+20600000
+20406898
+708047a2
+1a227e00
+67f10048
+7920040b
+2fec000f
+7920840f
+6059004a
+70800701
+20600000
+6ff08128
+c300e8a8
+70804783
+20600000
+44c04010
+2040683d
+204068b0
+2020685a
+20406866
+2040689e
+204068a8
+20600000
+2040683d
+6ff10122
+67f10045
+2040689e
+d8e00001
+20406822
+204068a8
+2feffe00
+2040681b
+2020685a
+580007d2
+da2040cc
+d8400001
+204068b0
+6fe0c0cc
+243a68c5
+7040cc04
+20203c41
+6fe101b8
+1ff1fe00
+207a0000
+6fe081b8
+1ff1fe00
+c00568d4
+c00268d6
+c005e8db
+c00468df
+c004e8e3
+c00668d4
+c006e8e7
+c00768e7
+20206901
+204068fe
+20206906
+dfe053d2
+d84063c1
+204068f1
+20206906
+20206906
+dfe04e4d
+d84063d3
+204068f1
+20206906
+dfe04e4d
+d84056e9
+204068f1
+20206906
+dfe04e4d
+d8405202
+204068f1
+20206906
+dfe05249
+d84063c1
+204068f1
+20206906
+dfe04e4d
+d84063c1
+204068f1
+20206906
+dfe053d2
+d84056e9
+18500400
+9841fe00
+67f2004c
+2020691b
+dfe04e4d
+d84063c1
+202068f1
+dfe04362
+d84047c2
+18500400
+9841fe00
+67f2004c
+2020691d
+dfe047c7
+d840492b
+202068fa
+204068fe
+dfe04362
+d84047c2
+204068f1
+20206906
+6fe101b8
+79207e0d
+79207e0e
+67f2004c
+2040690d
+70801108
+20600000
+58000002
+37d98200
+67f08012
+37d98200
+37d98200
+20600000
+6ff1011e
+793ffe0e
+67f2004c
+2020690d
+6ff1011e
+79207e0e
+67f2004c
+2020690d
+58000004
+2020690e
+58000008
+2020690e
+44c0c010
+6fe0c3aa
+67f08080
+6fe0c3ab
+67f08081
+580001bb
+67f10084
+580001c0
+67f10086
+2020671a
+79207e07
+67e101bb
+44c14010
+70808202
+70808800
+70800602
+20206939
+18000401
+67e081bb
+44c1c010
+70808201
+60590088
+70800602
+20406939
+6fe081c0
+20600000
+20000005
+6ff08128
+c301e939
+20600000
+78547c00
+1fe22400
+6fe0c3ce
+c1800000
+78347c00
+1a427e00
+2020694b
+6fe0c3ce
+c000e94b
+c0016951
+c001e959
+c002695d
+c002e964
+20600000
+67e1c3c7
+1a227e00
+67e143ca
+604943cc
+7043ce02
+20206979
+20406979
+7043ce03
+2040697f
+da2001bb
+70808204
+6fe1c3c7
+d8400020
+20206990
+20406979
+204069b3
+7043ce04
+20600000
+44c24010
+20406979
+7043ce05
+2040697f
+20406971
+2040698c
+2020696c
+20406979
+2040697f
+58000005
+20406930
+c3800000
+7043ce00
+6fe1439c
+202075e6
+6fe204cc
+684943ca
+184085fc
+e7e20002
+20600000
+684943ca
+18422200
+184085fc
+efe20002
+67e204cc
+684943cc
+6fe1c3c7
+20600000
+44c2c010
+204069de
+2040671a
+58000000
+67e201bb
+20600000
+7001bb06
+58000000
+67f10088
+58000001
+67f10082
+580001bb
+67f10084
+70800602
+20206939
+7001bbab
+20206980
+7001bbb9
+20206980
+18408404
+60590082
+d8400002
+1a20a3fc
+e0408011
+1ff10400
+e0408005
+1fec8400
+e0408005
+e7e08005
+1a227e00
+67f10084
+58000000
+67f10088
+70800602
+20406939
+202069b3
+60590088
+1ff10400
+604881bc
+1fec8400
+604881bd
+67e081be
+58000004
+67f10082
+7001bb03
+580001bb
+67f10084
+1a227e00
+67f10086
+6ff08080
+2a2c000f
+7920fe06
+67f08080
+70800602
+6ff08128
+c283e9af
+d8e00003
+20206939
+580007d0
+20403abc
+2040697f
+580001c0
+67f10086
+58000005
+20406930
+c28069b3
+20600000
+60590088
+58000004
+67f10082
+7001bb03
+580001bb
+67f10084
+1a227e00
+67f10086
+6ff08080
+2a2c000f
+7920fe06
+67f08080
+70800602
+6ff08128
+c283e9c9
+d8e00003
+20406822
+20406939
+2feffe02
+2040681b
+6fe081bc
+1ff02400
+6fe081bd
+1fed7e00
+9a41a400
+6fe081be
+9a41fe00
+9840fe00
+67e081be
+1fecfe00
+67e081bd
+1fecfe00
+67e081bc
+20600000
+6fe0c3cf
+6848c3d1
+98467c00
+2422e9e3
+204069ef
+6fe0c3cf
+d8400020
+20406c68
+6fe0c3d2
+d8400021
+20406c68
+6fe0c3d0
+d8400022
+20406c68
+6fe0c3d1
+d840001f
+20206c68
+7043cf01
+7043d003
+7043d100
+7043d202
+7043d30b
+7043d40a
+20600000
+70801001
+20600000
+70808b05
+70808c07
+70808d07
+70808e07
+70808f07
+70809005
+70809100
+20600000
+70808b0c
+70808c0d
+70808d0d
+70808e0d
+70808f0d
+7080900c
+70809100
+20600000
+20406a3d
+6fe0c3d6
+d840006c
+20406c68
+6fe0c3d7
+d840006d
+20206c68
+20406a44
+20206a09
+6ff08128
+c302ea11
+20600000
+67e081bf
+580001bf
+67f10094
+58000001
+67f10092
+60590098
+62310096
+70808a01
+70800604
+20206a11
+58000000
+67f10098
+67f10096
+60590092
+62310094
+70808a01
+70800604
+20206a11
+79200028
+7043a908
+20600000
+793f8028
+7043a920
+20600000
+6fe0c3a0
+9a40fe00
+67e081bd
+20206a33
+6fe101bd
+1ff0fe00
+67e081bd
+58000003
+67f10092
+7001bca0
+7001bea1
+20206a52
+604904cc
+20406a3d
+684904cc
+20406a6c
+20206a44
+6fe0c3d5
+c17f8000
+c3036a42
+580249f0
+20403abc
+6848c3d5
+20206c43
+6848c3d5
+20206c3f
+44c34010
+c5146a2c
+6fe143a0
+9a40fe00
+1ff0fe00
+67e101bd
+44c3c010
+c5146a30
+58000004
+67f10092
+7001bca0
+7001bfa1
+580001bc
+67f10094
+60590098
+62310096
+58000002
+2a2c000f
+7920fe00
+67f0808a
+70800604
+d8e00005
+20406822
+20406a11
+2feffe04
+2040681b
+c5146a67
+6fe101bd
+1ff0fe00
+9840fe00
+1ff0fe00
+67e101bd
+20600000
+6fe081bd
+9840fe00
+1ff0fe00
+67e101bd
+20600000
+6fe143a0
+9a40fe00
+67e104c4
+44c44011
+604904cc
+622104e3
+20406a81
+684904dc
+6a2104e3
+6fe104c4
+20406aa2
+6fe104dc
+684904e3
+98408400
+604904e3
+684904c4
+98408400
+604904c4
+6fe104cc
+243a6a72
+20600000
+44c4c011
+6fe0c3a9
+1fe0ffff
+684904c4
+9841fe00
+1fe0fe01
+67e184e0
+6fe104cc
+9840fe00
+684984e0
+98467e00
+24216a93
+67e104cc
+6fe184e0
+684904c4
+98467e00
+67e104dc
+20600000
+6fe104cc
+67e104dc
+58000000
+67e104cc
+20600000
+1a427e00
+18408402
+60590092
+1a20a3fe
+e8418011
+18422400
+d84000a0
+e0408011
+e7e08005
+20206aaf
+1fe22400
+44c54011
+c5146a98
+1a427e00
+18408403
+60590092
+1a20a3fd
+e8418011
+18422400
+d84000a0
+e0408011
+1ff0fe00
+e7e10005
+62310094
+58000000
+67f10098
+70808a01
+70800604
+20406a11
+e2418011
+44c5c011
+7001bf00
+58000001
+67f10092
+7001bca0
+580001bc
+67f10094
+58000000
+67f10098
+67f10096
+58000003
+67f0808a
+70800604
+20406a11
+6ff08128
+c4030000
+200005dc
+6fe081bf
+1fe0fe01
+67e081bf
+1fe67c28
+24610000
+20206ab8
+20407636
+20206acf
+1ff10400
+20546af3
+1fef7e00
+1ff10400
+20546aef
+6ff10050
+793ffe0f
+67f10050
+20600000
+67f10052
+20600000
+20406adc
+20206ad8
+20406ae1
+9846fc00
+204075d0
+1807fe00
+20600000
+6ff08043
+c3006ae5
+5adc6c00
+20600000
+596e3600
+20600000
+6ff08043
+1fe17efe
+67f08043
+20600000
+6ff08043
+1fe1fe01
+67f08043
+20600000
+67f1005a
+67f1005e
+6059005c
+20600000
+67f10054
+67f10058
+60590056
+20600000
+6951005a
+6a11005c
+6871005e
+20600000
+69510054
+6a110056
+68710058
+20600000
+6071005e
+20600000
+60710058
+20600000
+20406afb
+6ff10112
+98608600
+20206b01
+20406b0b
+20206af7
+20406aff
+20206b0f
+606104eb
+614104e9
+620104e7
+20600000
+686104eb
+694104e9
+6a0104e7
+20600000
+1f227e00
+207a0000
+1f20f3f8
+20416b20
+20628000
+20216b15
+1f20f208
+1f20f3fc
+20416b23
+20628000
+20216b1a
+1f20f204
+20206b26
+efe40006
+e7e40003
+20600000
+efe20006
+e7e20003
+20600000
+1f227e00
+207a0000
+efe08006
+e7e08003
+c2006b28
+20600000
+1f227e00
+207a0000
+1f20f3f8
+20416b39
+20628000
+20216b2e
+1f20f208
+1f20f3fc
+20416b3c
+20628000
+20216b33
+1f20f204
+20206b3f
+efe40003
+e7e40005
+20600000
+efe20003
+e7e20005
+20600000
+1f227e00
+207a0000
+efe08003
+e7e08005
+c2006b41
+20600000
+7004c33d
+2020709b
+44c64011
+6fe0c3af
+207a0000
+20406be9
+2042ebef
+2040763c
+20406b7a
+6fe0c3af
+1fe22600
+684943ad
+6049002e
+1a627e00
+203a6b45
+1a60a7ff
+18422200
+efe08011
+6848802c
+98467c00
+2042eb62
+20216b5e
+efe08011
+1fe0fe01
+e7e08011
+6849002e
+18408422
+6049002e
+20206b52
+58000000
+e7e08011
+6fe0802d
+e7e08005
+c099eb6f
+efe30006
+e7e40005
+58000000
+e7e40005
+1a420c00
+204074f5
+18007c01
+20600000
+c01b6b73
+c01beb77
+da40424a
+20206b67
+d8c042e0
+204074f5
+d8c0424a
+20206b6c
+d8c042d8
+204074f5
+20206b75
+44c6c011
+20407638
+6fe0c3af
+207a0000
+44c74011
+6fe1442f
+c4048000
+6fe0c29e
+c0006b96
+6fe08178
+2fe180c0
+2020eb89
+2fe18040
+2020eb9b
+20206b90
+20366b8d
+6fe0c282
+c300eb96
+20206b90
+20406b96
+20740000
+20206b90
+6fe0c2d1
+c283eb93
+20206b99
+6fe30173
+67e442d8
+20206b99
+70002d35
+6fe30173
+20206b9d
+70002d37
+20206b9d
+70002d36
+20206b9d
+44c7c011
+6fe143ad
+e840803f
+1fe0fe01
+67e1002e
+6048802c
+6fe0c3af
+1fe22600
+6fe1002e
+1fe22200
+20406bb5
+20740000
+6849002e
+18408422
+6049002e
+184085ff
+efe08002
+67e0802c
+1a60a7ff
+2422eba5
+6fe0c3af
+1fe0ffff
+67e0802c
+20600000
+6fe0802d
+c099ebbc
+da40002d
+df200007
+204075d2
+2022f636
+20600000
+c01b6bbf
+c01bebda
+20206bb7
+e8408011
+98467c00
+24628000
+d8a004f6
+df200010
+2040750f
+6fe18176
+67e184f6
+20406bd1
+6fe10513
+1ff0fe00
+1fed0400
+efe08006
+9840fe00
+68498173
+98467c00
+2022f636
+20600000
+d8c004f6
+20406f9d
+efe08011
+20406f9e
+18006c38
+18006c00
+20406f0b
+d8a00506
+20206fb1
+e8408011
+98467c00
+24628000
+18c22200
+18c0a608
+da4042d8
+df200008
+204075d2
+2022f636
+1a622200
+da4042e0
+df200008
+204075d2
+2022f636
+20600000
+6fe143ad
+e840803f
+1fe0fe22
+efe0803f
+98467c00
+20600000
+6fe0c3af
+1fe27200
+684943ad
+58000000
+e7e08002
+18408422
+1fe0fe01
+c2006bf3
+20600000
+2040763a
+20406b7a
+24346c03
+6fe1002e
+1fe08c01
+d8a042e0
+204074f5
+d8a0424a
+204074f5
+70425a01
+20600000
+70425a00
+20600000
+70002d34
+20206c07
+6fe0c095
+c0056b47
+c0045e4a
+20600000
+44c84012
+79200407
+20406c32
+7d208407
+44c8c012
+18467cff
+20628000
+284c0007
+18410e1f
+6fe20016
+f920fe00
+67e20016
+6fe2001a
+fd20fe00
+67e2001a
+20600000
+44c94012
+18467cff
+20628000
+284c0007
+18410e1f
+6fe20016
+f93ffe00
+67e20016
+6fe2001a
+f93ffe00
+67e2001a
+20600000
+20406c1b
+20206c2c
+18467cff
+20628000
+2455ec0f
+20406c5e
+58000000
+284ffe07
+7d20fe06
+7920fe07
+20206c59
+44c9c012
+d8a0811c
+18410e07
+18497e00
+1fe17e03
+98a08a00
+efe08005
+284ffe07
+2020ec3d
+afec0000
+20600000
+afefffff
+20600000
+18467cff
+20628000
+2fcffe07
+20206c46
+18467cff
+20628000
+2fcc0007
+58000000
+7d20fe07
+98428400
+20406c5e
+5800003f
+284ffe07
+7920fe00
+20206c59
+18467cff
+2022f640
+20406c5e
+efe08005
+c2806c55
+284c0007
+20600000
+284ffe07
+20600000
+20406c5e
+580000c0
+e7e08005
+20600000
+20406c5e
+58000000
+20206c59
+18417e3f
+1fe67c0c
+24213aba
+d8a08070
+98a08a00
+20600000
+1fe104ff
+1fecfe00
+20206c68
+c4038000
+1fe17e3f
+1fe67c0c
+24213aba
+d8a08070
+98a08a00
+e0408005
+20600000
+1841043f
+58008070
+98408c00
+efe08006
+20600000
+df20000d
+d8c08070
+18c20a00
+efe08006
+c00fec82
+c0106c82
+c010ec82
+c0116c82
+c011ec82
+c0166c82
+c016ec82
+c0006c82
+c2006c76
+20600000
+58000040
+e7e08005
+20206c80
+58000080
+e7e08005
+20206c80
+44ca4012
+580007e0
+da2043b2
+d840000c
+204068ac
+6fe443b2
+247a0000
+5800469a
+67e143b2
+5800ab77
+67e143b8
+580073d0
+67e143bc
+58009658
+67e143b6
+20600000
+44cac012
+6a508a12
+708a123d
+708a11aa
+708a0a0c
+6ff08a09
+79207e07
+67f08a09
+708a0b04
+2000003c
+708a1600
+708a1706
+20406cb4
+67f08a97
+7080c603
+2000003c
+6ff08053
+79207e07
+67f08053
+200003e8
+6ff1014c
+67e143c4
+6ff08053
+793ffe07
+67f08053
+708a9700
+62508a12
+20600000
+44cb4012
+6fe0c3c2
+c0006cbc
+c000ecbe
+6fe0c3c3
+1fe9fe00
+1fe1fe07
+20600000
+58000057
+20600000
+5800004f
+20600000
+44cbc012
+6fe0c3c2
+c0006cc6
+c000eccc
+c0016cd2
+20600000
+58000064
+67e143c0
+684943bc
+6fe143b6
+da60012c
+20206cd7
+58000064
+67e143c0
+684943ba
+6fe143b4
+da60012c
+20206cd7
+580000c8
+67e143c0
+684943b2
+6fe143b8
+da60012c
+98462200
+6fe143c4
+98467e00
+24216ce6
+684943c0
+984fa400
+1a627e00
+9a2ffe00
+9a467e00
+44cc4013
+24217646
+9a26fc00
+204075d0
+1807fe00
+20600000
+18427e00
+684943c4
+98467e00
+684943c0
+984fa400
+1a627e00
+9a2ffe00
+9a40fe00
+20206ce2
+efe40011
+67e404c4
+6fe104c4
+684904c6
+98462200
+6fe104ca
+98462400
+684904c8
+98467c00
+24416cff
+1a4ffe64
+9a26fc00
+204075d0
+1807fe00
+205a6d07
+20600000
+6fe0c3c6
+79207e00
+67e0c3c6
+20600000
+6fe0c3c6
+793ffe00
+67e0c3c6
+20600000
+6848c3c6
+79200401
+6048c3c6
+20600000
+6848c3c6
+793f8401
+6048c3c6
+20600000
+6fe143da
+efe0803f
+207a0000
+1fe27200
+6fe143da
+1fe0fe03
+1fe22200
+e8408011
+20406c29
+1a20a201
+c2006d16
+20600000
+6fe143da
+1fe0fe03
+1fe22200
+18002400
+58000000
+67e10546
+e8408011
+20406c32
+44ccc013
+6fe10546
+1a420e00
+f920fe00
+67e10546
+1a20a201
+1a40a401
+6fe143da
+efe0803f
+9a42fc00
+2422ed21
+6fe10546
+684943dc
+9842fc00
+20628000
+78347c00
+20600000
+6fe143da
+efe0803f
+207a0000
+1fe27200
+6fe143da
+1fe0fe03
+1fe22200
+e8408011
+20406c0b
+1a20a201
+c2006d3b
+20600000
+d8e00009
+2040755d
+247a0000
+58000020
+d8e00009
+2040754f
+78547c00
+20406d34
+44cd4013
+6fe143da
+efe0803f
+207a0000
+20406d1b
+24347011
+2040700f
+78547c00
+6fe10546
+67e1054d
+70054f00
+18000e00
+6fe143dc
+1fe30400
+604943dc
+1fe17e01
+6849054d
+18412201
+18430400
+6049054d
+9a22fc00
+2442ed69
+6fe143da
+efe0803f
+6848854f
+18408401
+6048854f
+18420e00
+98e2fc00
+2422ed54
+6fe10546
+67e143dc
+20600000
+44cdc013
+6fe143da
+1fe0fe01
+efe1003f
+202075e6
+6ff08042
+9a21fe00
+67f08042
+6ff10050
+793ffe0d
+67f10050
+20000064
+20600000
+6ff08042
+c2836d7b
+c283ed7d
+58b71b00
+20600000
+596e3600
+20600000
+580080e8
+20600000
+684984c6
+20406d76
+9846fc00
+204075d0
+18078400
+6fe084c9
+984ffe00
+1fe6fc64
+204075d0
+1807a200
+18427e00
+9a262400
+6fe084c5
+20406d93
+6fe084c4
+684884c5
+1841040f
+184d0400
+9841fe00
+20206dd3
+98000e00
+20406da1
+20206d96
+6ff080c5
+f9207e00
+67f080c5
+68588042
+284ffe07
+2040ed9f
+f93ffe00
+67f080c5
+20600000
+200001e0
+20600000
+1fe17e0f
+d8a0809c
+1feffe04
+98a08a00
+1a227e00
+e7e10005
+1a427e00
+e7e10005
+20600000
+1a4c8e00
+20406dc8
+1a4c8e00
+20406dc2
+1a2c8e00
+7820fc00
+20406dc3
+1a227e00
+20406dce
+1a427e00
+20206dd3
+1a227e00
+20406dd6
+1a427e00
+20406dd6
+1a2c8e00
+7840fc00
+20406dc3
+1a4c8e00
+7840fc00
+20406dc9
+1a4c8e00
+7840fc00
+20206dc3
+28effe07
+18e10e0f
+6ff080c3
+f920fe00
+67f080c3
+20600000
+28effe06
+18e10e0f
+6ff0809b
+f920fe00
+67f0809b
+20600000
+20406dde
+1fed7e00
+18e08410
+9841fe00
+20206c64
+78347c00
+20406dce
+20206dd9
+78547c00
+20406dde
+20206dd9
+18e10e0f
+6ff0809a
+f9347e00
+67f0809a
+20600000
+1fec8e00
+18e10e0f
+20600000
+1fe20400
+44ce4013
+20406dee
+58000800
+98467e00
+1fe20400
+18518400
+60588004
+20000578
+1fe20400
+1841040f
+6058800b
+20600000
+78367c00
+20206df2
+44cec013
+78567c00
+6ff08043
+79367e03
+67f08043
+20600000
+d8400031
+67f20061
+67f10065
+60588067
+20600000
+6ff1012c
+20600000
+68710065
+69510061
+6a110063
+20600000
+60710065
+20600000
+20407636
+dd600000
+20406dfb
+c0016e45
+1fe67c04
+20610000
+20406dfd
+e8410003
+5800a654
+20406e4e
+24216e33
+1b020400
+58017f8e
+20406e4e
+24216e33
+1b020400
+58002328
+20406e4e
+20216e2a
+e8410003
+58001194
+20406e4e
+20216e2a
+20406dfb
+1fe67c85
+20610000
+df200020
+e8410003
+58000230
+20406e4e
+20216e2a
+e8410003
+5800069a
+20406e4e
+24216e2f
+1b020400
+58000230
+20406e4e
+24216e30
+1b020400
+5800ffff
+98467c00
+2022ee4a
+20206e01
+79205620
+1d635600
+c2006e1e
+20206e3e
+20406dfb
+1fe67c07
+20610000
+e8410003
+58002328
+20406e4e
+20216e2a
+e8410003
+580008ca
+20406e4e
+20216e2a
+e8410003
+58000230
+20406e4e
+20216e2a
+20406e01
+1a627e00
+202075e6
+20406dfd
+e8410003
+5800ffff
+98467c00
+24628000
+20406e01
+20407638
+1a627e00
+202075e6
+6a40c3ea
+18423000
+9a4fa400
+18438400
+98462200
+24416e57
+1a2ffe64
+9a467c00
+20600000
+1a262200
+20600000
+44d24014
+20406f42
+d8a0424a
+20206fb1
+d8a0426b
+2034ee60
+d8a00153
+18c22200
+204074f5
+20406f57
+d8c0425b
+20206fca
+da200153
+2034ee68
+da20426b
+1a220a00
+20407661
+20206f57
+d8c042b8
+20406f9d
+d8c0424a
+20406f9e
+18006c38
+18006c00
+20406f0b
+d8a001a3
+20206fb1
+18007008
+18007e49
+20206e7b
+18007e49
+20206e7a
+18007e01
+18007000
+184d5e00
+9de1de00
+1f00f001
+184cde00
+1df15e00
+6fe1440b
+1ff07e00
+9de1de00
+1f00f001
+ede20006
+1f00f001
+efe10006
+1a30de00
+1df05e00
+9de1de00
+1f00f001
+20600000
+1a608c01
+efe08006
+98002200
+20406e77
+20406f0d
+18007000
+efe08013
+1fe17e03
+1ff05e00
+79205e08
+20406fa6
+20406f10
+1a227200
+1a608c02
+20406f85
+20406f8f
+20406f10
+1f227e00
+203a6ea0
+20206e9b
+1800700c
+1de27e00
+67e2014b
+20600000
+1a20a201
+20406e79
+1a620c00
+20406f99
+20406f13
+20406fb8
+1a60a610
+1a40a5f0
+20216ea4
+20600000
+20406f00
+70806c00
+70806d01
+6fe08047
+1fe17e03
+67f0806e
+58000049
+67f10068
+67f1006a
+6a208048
+1a20a3fc
+24217644
+62208048
+58000049
+9a208c00
+18007000
+ede20006
+65e2014f
+684ac402
+20406e74
+70800a06
+70800a07
+6fe08048
+67f100c1
+20406f07
+6ff08108
+c303f644
+684a014f
+6fe24407
+98467e00
+207a0000
+604a4407
+6fe2c402
+1fe0fe01
+79207e27
+67e2c402
+18007e00
+20600000
+20406edb
+5800412b
+9a20a200
+20406f07
+df00000c
+e5e20011
+20600000
+20406f00
+44d2c014
+70806c00
+70806d01
+6fe0c129
+1fe17e03
+67f0806e
+6fe104e3
+67f10068
+5800412b
+67f1006a
+6a20c12a
+684ac3fd
+20406e74
+70800a02
+70800a03
+6fe0c12a
+67f100c1
+1fe0fe04
+67e0c12a
+6fe2c3fd
+1fe0fe01
+793ffe27
+67e2c3fd
+20600000
+6ff1011a
+98467c00
+20628000
+247a0000
+20206ef4
+6ff08108
+c3033aba
+5800412b
+98408a00
+df00000c
+e5e20005
+20206f09
+44d34014
+1800700c
+20406fac
+20406fab
+58000000
+67f100c1
+20600000
+6ff08108
+c3036f07
+70800a00
+20600000
+243bef0b
+20600000
+18006c30
+18006c00
+20206f0b
+18006c32
+18006c02
+20206f0b
+18006c34
+18006c04
+20206f0b
+18006c01
+18006c00
+20600000
+6ff08144
+c302ef19
+20600000
+67f1007e
+18006cc0
+18006c80
+20206f19
+18007000
+1a420c00
+18007204
+20406f2f
+18006d80
+18006c80
+20406f0b
+1800700c
+1a620a00
+18007204
+1de27e00
+e7e20005
+1f00f001
+c2006f2a
+20600000
+efe10006
+e8410006
+18500400
+9841de00
+1f00f001
+c2006f2f
+20600000
+18007008
+1a220c00
+18007204
+20406f2f
+18007000
+1a420c00
+18007204
+20406f2f
+18006d82
+18006c82
+20406f0b
+20206f27
+18007000
+6fe20153
+98005e00
+1f00f001
+efe20006
+98005e00
+1f00f001
+6fe2426b
+98005e00
+1f00f001
+efe20006
+98005e00
+1f00f001
+20406fac
+1f00f1fc
+6fe242d2
+1fe25e00
+1f00f004
+18006c38
+18006c08
+20206f0b
+44d3c014
+6fe342ae
+684b0173
+2034ef5d
+6fe30173
+684b42ae
+18007008
+18425e00
+1f00f001
+184f5e00
+1ff07e00
+9de1de00
+1f00f001
+1fef5e00
+1f00f001
+18005e00
+18007e00
+6fe0c29e
+6848c35f
+2434ef6d
+6fe0c2a5
+6848c29e
+67e0c27b
+6048c27c
+18007000
+da40427b
+18007204
+efe20011
+e8420012
+9842de00
+1f00f001
+1a20a204
+1a40a404
+c2006f72
+20406fac
+1f00f1fc
+6fe242d2
+1fe25e00
+1f00f004
+18006c38
+18006c0c
+20406f0b
+20406fab
+18006c3a
+18006c08
+20206f0b
+2f200600
+20608000
+18c27e00
+9f208a00
+18007e00
+e7e08005
+1f20f201
+2f200600
+20608000
+20206f8a
+18007000
+1f227e00
+203a6f94
+efe20006
+1f20f3fc
+98005e00
+1f00f001
+2f001e04
+20608000
+20206f90
+18007008
+20206f9e
+18007004
+20206f9e
+18007000
+18007204
+efe20006
+98005e00
+1f00f001
+c2006f9f
+20600000
+d8c001a3
+20206f9b
+18007204
+20206fae
+18007000
+18007210
+20206fad
+18007000
+18007204
+18005e00
+1f00f001
+c2006fad
+20600000
+1800700c
+18007204
+1de27e00
+e7e20005
+1f00f001
+c2006fb3
+20600000
+1800700c
+1a620a00
+1a40f201
+1f267c0f
+20216fbe
+18007210
+1de27e00
+1f267c03
+20216fc6
+e7e20005
+1f20f3fc
+20628000
+1f00f001
+20206fbe
+e7e08005
+1fecfe00
+c2006fc6
+20600000
+1800700c
+18007204
+efe20006
+9de67c00
+24628000
+1f00f001
+c2006fcc
+18007c00
+20600000
+6ff08050
+793ffe00
+67f08050
+20600000
+6ff08050
+79207e00
+67f08050
+20600000
+20758000
+20403c78
+20406fe2
+2040708b
+20207018
+2040703b
+2020707a
+6fe0c432
+c17f8000
+98000400
+20406c43
+6848c432
+20406c3f
+20000064
+6848c432
+20406c29
+20206fec
+44d74015
+6fe0c432
+c17f8000
+1fe20400
+20406c32
+2420effe
+20407008
+6fe1442f
+79207e0c
+67e1442f
+6fe0c42a
+c1000000
+70442a00
+6fe0c431
+67e0c429
+2040700f
+7004c32c
+2020709b
+6fe1442f
+793ffe0c
+67e1442f
+6fe0c42a
+c1008000
+70442a01
+70442900
+20407011
+7004c32d
+2020709b
+6fe0c429
+207a0000
+1fe0ffff
+67e0c429
+247a0000
+7004c310
+2020709b
+d8e00007
+20203c54
+d8e00007
+20203c58
+44d7c015
+6fe14435
+1a2fa40b
+9a40a400
+20600000
+6fe0c434
+207a0000
+1fe27200
+6fe14435
+1fe22400
+1a40a602
+e8408013
+20407023
+1a40a40b
+c200701d
+20600000
+6fe0c433
+203a6c3f
+20206c43
+20407013
+58000002
+e7e08012
+20407074
+20207049
+20407013
+58000003
+e7e08012
+20407074
+20207044
+20407013
+58000001
+e7e08012
+580000ff
+e7e08005
+20207044
+20407013
+df20000b
+1a620c00
+1a420a00
+2020753b
+6fe0c434
+207a0000
+da200000
+2040704e
+1a20a201
+6fe0c434
+9a267c00
+20628000
+2020703e
+1a40a602
+e8408013
+6fe0c095
+c0046214
+20206c3f
+1a40a602
+e8408013
+6fe0c095
+c0046221
+20206c43
+1a208e0b
+2040755d
+247a0000
+20407013
+efe08012
+c0017049
+c001f044
+c0007044
+c002f062
+20407049
+1a40a607
+204074af
+efe10013
+204075e6
+204074bb
+58000005
+e7e08012
+1a40a603
+efe10013
+20207072
+20407044
+1a40a609
+204074af
+efe10013
+204075e6
+204074bb
+1a40a601
+efe08013
+c07ff06e
+1fe0ffff
+e7e08013
+203a702b
+58000004
+e7e08012
+1a40a605
+efe10013
+1a208e0b
+2020754f
+58000000
+20207072
+58001000
+1ff07e00
+9a40a400
+20600000
+44d84016
+da200000
+684a442b
+1c422400
+1a427e00
+98467c00
+24417076
+1a427e00
+184084a0
+184084a0
+98467c00
+2421708e
+1a20a201
+1a217e0f
+243a7081
+da200000
+20407094
+1c427e00
+67e2442b
+20600000
+1a227e00
+207a0000
+18408560
+18408560
+793f841c
+604a442b
+20204dd5
+70441701
+6fe0c418
+243a7096
+20600000
+70441700
+20600000
+44d8c016
+20407095
+1a227e00
+67e204d8
+da204419
+20407607
+6fe204d8
+1fe22200
+20207099
+44d94016
+20407095
+1a227e00
+67e204d8
+da204421
+20407607
+6fe204d8
+1fe22200
+20207099
+58000000
+67e44421
+67e44419
+20600000
+44d9c016
+6fe0c10d
+247a0000
+da204421
+2040761f
+207a0000
+7004c200
+204070bc
+6fe084c2
+203a70b1
+20600000
+20407095
+da204421
+20407613
+1fe20400
+20407099
+44da4016
+18427e00
+207a0000
+c006f0e0
+c00770e6
+c007f0eb
+c00870f1
+c009f0fb
+c00a70fd
+c00af0ff
+c00b7109
+c00bf10c
+c00c710e
+c00cf111
+67e084c3
+6fe084c3
+c584f0d9
+44dac016
+6fe084c3
+c008f0f6
+c00df119
+c00970fa
+c00fec05
+20600000
+67e084c3
+2040385a
+2022f0de
+2040385f
+24628000
+7004c201
+202070a4
+70435b01
+70435e00
+6fe1442f
+79207e0b
+67e1442f
+20600000
+6fe1442f
+793ffe0b
+67e1442f
+70435b00
+20600000
+70435b01
+70435e01
+6fe1442f
+79207e0b
+67e1442f
+20600000
+6fe1442f
+793ffe0b
+67e1442f
+70435b00
+20600000
+58000014
+67e10191
+67e142c8
+2020477a
+202045f3
+da200000
+2020702b
+da200000
+20207026
+da200000
+20407013
+efe08012
+c000f106
+c0027106
+c002f106
+20207030
+efe08006
+c17f8000
+20207030
+70431601
+70410d1b
+20600000
+70431601
+20600000
+70431600
+70410d00
+20600000
+6fe1438a
+204075e6
+6fe0c432
+c07ff117
+1fe20400
+20406c29
+204070ad
+20203b6f
+20204621
+6fe0c42f
+c4060000
+20600000
+6fe143b0
+1fe08a02
+58000000
+e7e18005
+20600000
+44db4016
+20407638
+2040716e
+207a0000
+6fe143b0
+1fe0a402
+e8408012
+18408401
+e0408012
+e840803f
+18427200
+1fe0a404
+efe08012
+984ffe00
+98c08a00
+1a220c00
+20407548
+20407172
+1fe0ffff
+e8408012
+18408401
+98410400
+e0408012
+20207636
+44dbc016
+20407638
+2040716a
+207a0000
+6fe143b0
+1fe0a402
+e8408012
+184085ff
+e0408012
+e840803f
+18427200
+1fe0a403
+efe08012
+984ffe00
+98c08c00
+18c08c01
+1a220a00
+20207132
+20407638
+2040716a
+207a0000
+6fe143b0
+e840803f
+18427200
+1fe0a403
+efe08012
+984ffe00
+98c08c00
+18c08c01
+18c22400
+1a220a00
+20407548
+20207636
+20407638
+2040716a
+207a0000
+6fe143b0
+e840803f
+18427200
+1fe0a403
+efe08012
+984ffe00
+98c08c00
+18c08a02
+1a220c00
+1f20f3ff
+20407548
+20207636
+6fe143b0
+1fe08c02
+efe08006
+20600000
+20407172
+e8408006
+98467e00
+20600000
+6fe143b0
+1fe08c01
+efe08006
+20600000
+44dc4017
+6ff08c23
+2feffe03
+2040f182
+6ff08c23
+67f08c23
+67e0855e
+204071e2
+2040720a
+204073fd
+20407445
+202071da
+44dcc017
+20406fd3
+204071a1
+708c0000
+20002710
+708c18c0
+6ff10050
+793ffe0a
+67f10050
+708c1100
+708c003c
+580005b7
+67f10c03
+67f10c07
+580005f7
+67f10c05
+708c1104
+708c0200
+708c23ff
+580007b3
+d8a006c1
+98a67200
+2020750f
+684886c0
+20206c29
+6fe08762
+207a0000
+684886c0
+20406c32
+2020f182
+20600000
+7006bf02
+58000000
+67e085fa
+67e106b9
+1fe0fe01
+67e106bb
+1fe0fe01
+67e106bd
+d8a0064e
+58030404
+e7e18005
+58000409
+e7e10005
+d8a00653
+38015906
+380610d2
+38090494
+380c0001
+e7e48005
+d8a00671
+3801570f
+38055c9a
+380a56c6
+380dcdcd
+e7e48005
+38014420
+38065d99
+380a5636
+380c0001
+e7e38005
+d8a0068f
+3801620a
+38040c8c
+380b0333
+380cc0c0
+e7e48005
+38003130
+e7e10005
+58009272
+67e105fb
+580092cd
+67e105fd
+d8c09371
+d8a005ff
+df200013
+20407548
+d8c09384
+d8a00612
+df20003c
+20407548
+6fe106ad
+202075e6
+6fe086af
+207a0000
+67e08634
+67e0864d
+20600000
+d8e00001
+2040755d
+247a0000
+6fe08763
+247a0000
+6fe08762
+245a749e
+20600000
+6fe0855e
+c28171e5
+20600000
+204071ea
+2040755c
+58000280
+d8e00001
+2020754f
+6fe08754
+c08171ef
+70076300
+70076400
+20600000
+6fe08766
+207a0000
+70076600
+70075402
+70076201
+20600000
+6fe0855e
+c2807217
+20600000
+6ff08c24
+c3830000
+69510c03
+6a110c05
+68710c07
+efe10003
+1fec8400
+18518400
+d8c00fff
+98c17200
+1f222200
+efe08003
+e7e08005
+c2007203
+60710c07
+62210560
+20600000
+20600000
+44dd4017
+6fe0855e
+c4028000
+d8a006c1
+204071f8
+18427e00
+c0007212
+20207209
+6fe08560
+c00071f5
+c000f21e
+1fe67c07
+20610000
+44ddc017
+793f8023
+6fe086c1
+1fe17e80
+c0407222
+c000722a
+20203aba
+6fe086c1
+c3838000
+204073d2
+20207251
+6fe086c1
+1ff1fe00
+1fe37e00
+1fe17e03
+c0007232
+c000f238
+c001723d
+20203aba
+6fe086c1
+1ff1fe00
+1fe37e00
+1fe17e03
+c000723e
+c000f246
+c001724b
+20203aba
+6fe086c2
+c0047253
+c0037269
+c00572ae
+c00072c0
+2020724c
+6fe086c2
+c00172f5
+c000f2f9
+c001f30a
+2020724c
+2020724c
+6fe086c2
+c000f314
+c001f343
+c002f36e
+c004f387
+c005f3a2
+c003f24c
+2020724c
+6fe086c2
+c00573b3
+c004f3c5
+c005f3e4
+2020724c
+2020724c
+44de4017
+6ff08c19
+79207e00
+67f08c19
+20207251
+708c1810
+20600000
+6fe086c1
+c0c0724c
+6fe086c5
+c080724c
+6fe086c6
+c080724c
+6fe086c7
+c080f24c
+6fe086c8
+c080724c
+6fe086c3
+c080724c
+6fe086c4
+c080724c
+6fe086bf
+c0027265
+c001f267
+2020724c
+da400001
+202072da
+da400001
+202072d8
+44dec017
+6fe086c4
+c000f27c
+c0017295
+c001f298
+c010f271
+c01172a6
+2020724c
+70075100
+6fe086c5
+c0007276
+c000f279
+2020724c
+6a408625
+da200625
+202073f3
+6a40863e
+da20063e
+202073f3
+6fe08765
+245a728d
+580005ff
+684885ff
+67e1075c
+6048875e
+6fe086c7
+98467c00
+2421728b
+6fe0875e
+98002400
+6fe1075c
+1fe0fe01
+98002200
+202073f3
+6fe086c7
+20207286
+6ff08c02
+245a7291
+70076500
+20600000
+6ff08c02
+79207e07
+67f08c02
+20600000
+58000612
+68488612
+20207280
+6fe086c3
+1fe67c03
+2421724c
+6fe086c3
+da20064e
+c00073f1
+79200023
+da200653
+c000f3f1
+da200671
+c00173f1
+da20068f
+c001f3f1
+20600000
+6fe106c5
+c000f2aa
+6a2105fb
+202073f1
+70076201
+70075401
+6a2105fd
+202073f1
+6fe086bf
+c082724c
+6fe086c1
+c0c0f24c
+6fe086c3
+c080724c
+6fe086c4
+c080724c
+6fe086c7
+c080f24c
+6fe086c8
+c080724c
+6fe086c5
+c080724c
+6fe086c6
+c080724c
+da400001
+202072d8
+6fe086bf
+c001724c
+6fe086c3
+c080724c
+6fe086c4
+c080724c
+6fe086c7
+c081724c
+6fe086c8
+c080724c
+6fe086c6
+c080724c
+6fe086c1
+c04072d3
+c040f2de
+c04172e2
+2020724c
+70075701
+202072dc
+6fe086c5
+c080724c
+da400002
+6fe08755
+c000f2d1
+da2006b9
+202073f3
+da2006bb
+202073f3
+da2006bd
+202073f3
+6fe086bf
+c082724c
+da400002
+202072d8
+6fe086bf
+c082724c
+6fe086c5
+c040f2ef
+c04172f1
+c041f2f3
+1fe17e7f
+c00072eb
+2020724c
+6fe08758
+da400002
+c000f2da
+202072d8
+6fe08759
+202072ec
+6fe0875a
+202072ec
+6fe0875b
+202072ec
+70074f01
+da200750
+da400001
+202073f3
+6fe106c3
+d84001ba
+98467c00
+2422f24c
+6fe0874c
+243a7307
+70070900
+6fe086c7
+98002400
+da200709
+204073f3
+d8a00709
+df200008
+20207500
+70074c00
+70070901
+20207300
+6fe086c7
+c080f24c
+70075101
+da400001
+6fe08753
+c0007312
+c000f313
+202072d8
+202072da
+202072d8
+6fe086bf
+c082724c
+6fe086c7
+c080724c
+6fe086c8
+c080724c
+6fe086c4
+c080724c
+6fe086c6
+c080724c
+6fe086c1
+c0007323
+c000f330
+c0017331
+2020724c
+6fe086c3
+c080f24c
+6ff08c00
+793ffe07
+67f08c00
+70075500
+70075601
+6fe08757
+203a7251
+70075700
+70075600
+70075402
+20207251
+2020724c
+6fe086c3
+c080724c
+6fe086c5
+c040f33c
+c041733f
+c041f341
+1fe17e7f
+c000733a
+2020724c
+70075800
+20207251
+70075900
+70076601
+20207251
+70075a00
+2020733d
+70075b00
+2020733d
+6fe086c7
+c080724c
+6fe086c8
+c080724c
+6fe086c1
+c000734c
+c000f35a
+c001735b
+2020724c
+6fe086c3
+c080f24c
+20405337
+6ff08c00
+79207e07
+67f08c00
+70075501
+70075403
+70074d00
+20407251
+2040755c
+58001388
+d8e0000f
+2020754f
+2020724c
+6fe086c3
+c080724c
+6fe086c4
+c080724c
+6fe086c5
+c040f368
+c041736a
+c041f36c
+1fe17e7f
+c0007366
+2020724c
+70075801
+20207251
+70075901
+20207251
+70075a01
+20207251
+70075b01
+20207251
+6fe086c1
+c080724c
+6fe086c5
+c080724c
+6fe086c6
+c080724c
+6fe086c7
+c080724c
+6fe086c8
+c080724c
+6fe086c4
+c080724c
+6fe086c3
+1fe17e80
+c080724c
+6fe086c3
+c0807385
+7006bf02
+6fe086c3
+67f08c02
+20407251
+70076501
+20600000
+7006bf03
+20207380
+6fe086bf
+c001724c
+6fe086c1
+c080724c
+6fe086c5
+c080724c
+6fe086c6
+c080724c
+6fe086c7
+c080724c
+6fe086c8
+c080724c
+6fe086c4
+c080724c
+6fe086c3
+1fe67c01
+2421724c
+6fe086bf
+c001f39c
+c002739c
+2020724c
+6fe086c3
+c00073a0
+7006bf04
+20207251
+7006bf03
+20207251
+6fe086bf
+c082724c
+6fe086c1
+c080f24c
+6fe086c3
+c080724c
+6fe086c4
+c080724c
+6fe086c7
+c080724c
+6fe086c8
+c080724c
+6fe086c5
+c080724c
+6fe086c6
+c080724c
+20207251
+44df4017
+70074f01
+6fe086c4
+67e08750
+6fe086c5
+1fe67c01
+2042f3c1
+6fe08754
+c0827251
+70075402
+20407251
+20007530
+20007530
+20600000
+70076201
+70075600
+70075404
+20600000
+20003a98
+d8a006c9
+204071f8
+70074b01
+204073d6
+6fe106c3
+67e10749
+20407251
+6fe0c095
+c1820000
+6fe0874d
+207a0000
+6fe086c9
+67e0c564
+70074d00
+70455403
+20600000
+6fe106c3
+d8400200
+98467c00
+24628000
+6fe106c5
+d8400000
+98467c00
+24628000
+6fe106c7
+d8400001
+98467c00
+24628000
+70074d01
+20600000
+6fe086c7
+c080724c
+6fe086c3
+c00073ea
+c000f3ed
+2020724c
+70075200
+70075301
+20207251
+70074e01
+70075201
+70075300
+20207251
+ea408011
+1a20a201
+44dfc017
+7920000e
+c591f3f8
+1a40a401
+1a43a400
+622105f8
+624085fa
+202073fd
+d8e00000
+2020743d
+44e04018
+6ff08c24
+c3800000
+6fe085fa
+207a0000
+1fe27200
+98000400
+6fe106c7
+1fe67c40
+2021740b
+1f267c40
+2021740f
+18007240
+2020740f
+9f267c00
+2021740f
+98007200
+67e085fa
+6fe085fa
+9f267e00
+67e085fa
+1f20ffff
+67e08562
+c591f421
+1fe37e00
+1f20ffff
+67e08562
+c5877421
+793f800e
+e0408005
+58000003
+e7e08005
+1f20f3ff
+1f227e00
+2422f421
+1f20f201
+6fe105f8
+1fe20c00
+efe08006
+e7e08005
+c591f428
+58000000
+e7e08005
+c2007423
+18c27e00
+67e105f8
+58000562
+67f10c09
+d8e00000
+2040743d
+6fe085fa
+247a0000
+6fe08754
+c1808000
+70075402
+20600000
+d8e00001
+da2005a3
+62310c0b
+1f20ffff
+e7e08011
+efe08006
+e7e08005
+c200743a
+58000000
+f9207e00
+67f08c18
+20600000
+d8e00002
+da2005ad
+62310c0d
+20207438
+44e0c018
+6fe08761
+207a0000
+6ff08c24
+1fe17e0f
+243a7496
+6fe08762
+203a746c
+6fe08754
+c001f4a6
+c081746c
+6fe08756
+243a746c
+20407454
+2020745f
+6ff08c24
+c3808000
+6fe08761
+c4008000
+6fe08761
+793ffe01
+67e08761
+6fe0875f
+207a0000
+c008748e
+20203aba
+6ff08c24
+c3810000
+6fe08761
+c4010000
+6fe08761
+793ffe02
+67e08761
+6fe08760
+207a0000
+c010746f
+c010f48a
+c0117492
+20203aba
+d8a00767
+df200008
+20207500
+6fe0874f
+68488751
+98417e00
+203a7486
+68488752
+9840fe00
+c000f477
+20207486
+70076000
+6fe08768
+c0017487
+c001f487
+6fe08768
+67e08767
+6fe08769
+e7e08005
+6fe0876b
+e7e08005
+6fe0876d
+e7e08005
+df200004
+d8c00767
+20207441
+70076000
+df200008
+d8c00767
+20207441
+70076000
+df200003
+d8c00787
+20207441
+70075f00
+df200008
+d8c00777
+20207435
+70076000
+df200002
+d8c00797
+20207441
+6fe08754
+c0017499
+20600000
+6ff08c00
+79207e07
+67f08c00
+70076401
+20600000
+6fe08754
+c1018000
+c00174a2
+20600000
+6fe08764
+207a0000
+70076301
+202074a9
+d8e0000f
+2040755d
+247a0000
+6ff08c00
+c4038000
+708c00fc
+20007530
+708c003c
+20600000
+60a104e5
+604c04cc
+616204d4
+204074b7
+60c104e3
+672104ef
+60e104ed
+20600000
+622204d8
+624204dc
+626184e0
+20600000
+44e14018
+6fe104e5
+98000a00
+684c04cc
+696204d4
+204074c6
+6f2104ef
+68e104ed
+6fe104e3
+98000c00
+20600000
+6a2204d8
+6a4204dc
+6a6184e0
+20600000
+6fe104e5
+1fe20a00
+20600000
+6fe104e3
+1fe20c00
+20600000
+18a27e00
+67e104e5
+20600000
+18c27e00
+67e104e3
+20600000
+18a27e00
+67e104e5
+18c27e00
+67e104e3
+20600000
+6fe104e5
+1fe20a00
+6fe104e3
+1fe20c00
+20600000
+98462200
+20610000
+da200100
+9a20fe00
+98462200
+20600000
+204074f3
+204074f3
+202074f3
+204074ef
+efe08006
+e7e08005
+efe18006
+e7e18005
+20600000
+efe40006
+e7e40005
+20600000
+204074f5
+204074ef
+204074ef
+204074ef
+202074ef
+1fe0ffff
+20000026
+243a74f7
+20600000
+df20000a
+20002ee0
+c20074fc
+20600000
+18007203
+18007e00
+e7e40005
+c2007501
+20600000
+20407505
+18007e00
+e7e40005
+20600000
+18007e00
+e7e20005
+20600000
+18007204
+20207500
+18007208
+20207500
+1f227e00
+207a0000
+58000000
+e7e08005
+c2007512
+20600000
+df200020
+d8a004f6
+2020750f
+efe20013
+e8420011
+9842fe00
+e7e20005
+1a20a204
+1a60a604
+c2007518
+20600000
+44e1c018
+1f227e00
+1fe67c01
+20610000
+9a20a400
+1a40a5ff
+1f237200
+e8408011
+efe08012
+e7e08011
+e0408012
+1a40a5ff
+1a20a201
+c2007527
+20600000
+1fef0400
+20407535
+18508400
+1ff07e00
+9841fe00
+20600000
+1ff10c00
+18d08c00
+1ff0fe00
+1ff07e00
+98c1fe00
+20600000
+1f227e00
+207a0000
+1f20f3f8
+204174ef
+20628000
+2021753d
+1f20f208
+1f20f3fc
+204174ea
+20628000
+20217542
+1f20f204
+20207548
+1f227e00
+207a0000
+efe08006
+e7e08005
+c200754a
+20600000
+58000000
+67e104c4
+44e24018
+2040755d
+684904c4
+d8a040ed
+18e3fe00
+98a08a00
+e0410005
+20600000
+d9600800
+19701600
+9960fe00
+20600000
+d8e00000
+44e2c018
+684a4096
+1c437e00
+67e24096
+98467c00
+24417558
+98461600
+19620400
+d8c040ed
+18c20a00
+df200010
+efe10006
+98467e00
+2021756c
+18007e00
+e7e10005
+c2007568
+d8c040ed
+18e3fe00
+98c08c00
+efe10006
+20600000
+98408400
+18427200
+6fe1003f
+9f267e00
+20610000
+1fe67e00
+18510400
+18408401
+18500400
+98418400
+20600000
+20407580
+2020758d
+78547c00
+98467e00
+20217585
+78347c00
+1fe67e00
+c4078000
+1fe22800
+d8410000
+6fe1003f
+98467e00
+9a80fe00
+793ffe40
+20600000
+6849003f
+98000c00
+1ff17e00
+984ffe00
+98c0fe00
+20600000
+1fed7e00
+1ff27e00
+6849c0be
+9846fc00
+204075d0
+18078400
+20600000
+6849003f
+9846fc00
+204075cd
+1ff07e00
+18070400
+98418400
+20600000
+d8400000
+18422800
+efe08003
+204075ad
+1a820400
+204075df
+da40000a
+9a4ffe00
+9840fe00
+1fe20400
+c20075a2
+20600000
+d840003a
+98467c00
+242175b6
+d8400061
+98467c00
+202175b9
+d8400037
+98467e00
+20600000
+d8400030
+98467e00
+20600000
+d8400057
+98467e00
+20600000
+1f267c00
+20628000
+1fe37e00
+c20075be
+20600000
+18007e01
+1f267c00
+20628000
+1fe3fe00
+c20075c4
+20600000
+58000000
+1f222200
+e8410006
+9840fe00
+c20075c9
+9a26fc00
+204075d0
+1807fe00
+20600000
+207a8000
+202075d0
+efe08011
+e8408012
+98467c00
+24628000
+1a20a201
+1a40a401
+c20075d2
+18007c00
+20600000
+98467c00
+24610000
+18427e00
+20600000
+9840fe00
+98460400
+98467e00
+20600000
+df200200
+d8a04000
+20207500
+207a0000
+1fe27a00
+6ff1010e
+243a75e8
+20600000
+20406df0
+70820301
+20600000
+67f10205
+6ff08203
+79207e04
+67f08203
+20600000
+67f10207
+6ff08203
+79207e06
+67f08203
+20600000
+67f10205
+70820330
+20600000
+6ff08043
+79207e04
+67f08043
+20600000
+6ff08043
+793ffe04
+67f08043
+20600000
+6ff1010e
+d8400200
+98467c00
+20600000
+44e34018
+e8440011
+18417eff
+243a760d
+184cfe00
+e7e40011
+1a20a207
+efe08011
+243a3aba
+6fe084c3
+e7e08011
+20600000
+44e3c018
+df200008
+efe40011
+207a0000
+efe08011
+243a761c
+1a20a201
+c2007617
+20203aba
+d8400000
+e0408011
+20600000
+efe40011
+20600000
+efe08011
+20600000
+efe10011
+20600000
+d8400000
+6fe08006
+c2007626
+18408401
+c2007626
+18427e00
+20600000
+98467c00
+24610000
+18427e00
+20600000
+18007dff
+20600000
+18007c01
+20600000
+18007c00
+20600000
+78347c00
+20600000
+78547c00
+20600000
+78367c00
+20600000
+78567c00
+20600000
+7838fc00
+20600000
+7840fc00
+20600000
+7820fc00
+20600000
+58000001
+20600000
+58000000
+20600000
+1f267c00
+20628000
+e8408006
+9840fe00
+c200764a
+20600000
+1f227e00
+207a0000
+18c27e00
+9f20fe00
+1fe0ffff
+1fe20c00
+efe08006
+18c08dfe
+e7e08005
+c2007654
+20600000
+1ff07e00
+1feb7e00
+20600000
+1fed7e00
+2020765a
+58000000
+67e40016
+20600000
+df200010
+180a7e00
+e7e08005
+c2007662
+20600000
+70459101
+20407904
+7044c842
+7044c915
+7044d855
+6fe0c4dd
+1fe0fe01
+67e0c4dd
+20407674
+20407c45
+df200017
+d8c044c8
+d8a0464a
+2020753b
+d8400000
+d8c044d7
+df200007
+efe08006
+98408400
+c2007677
+6048c4de
+20600000
+6fe0c4e3
+207a0000
+7044e300
+6fe1458f
+207a0000
+6fe0c4d7
+1fe0fe01
+67e0c4d7
+c000f68a
+c004f68a
+20407666
+58000003
+67e144df
+20600000
+6fe0c4dc
+1fe0fe40
+67e0c4dc
+20407666
+2020768f
+58000003
+67e144df
+20600000
+7044dc07
+7044d700
+20207666
+6fe0c49e
+245a7aeb
+7044dc11
+7044d700
+20207666
+7044dc12
+7044d700
+20207666
+7044dc13
+7044d700
+20207666
+7044dc05
+7044db00
+7044d700
+20207666
+7044dc09
+7044d700
+7044db00
+20207666
+7044dc14
+7044d700
+20207666
+7044dc15
+7044d700
+20207666
+6fe0c49e
+245a7b21
+7044dc0c
+7044db01
+7044d700
+20207666
+6fe0c49e
+245a7b29
+7044dc0e
+7044db01
+7044d700
+20207666
+6fe0c49e
+245a7b23
+7044dc01
+7044db02
+7044d700
+20207666
+6fe0c49e
+245a7b2b
+7044dc04
+7044db02
+7044d700
+20207666
+6fe0c49e
+245a7b25
+7044dc0d
+7044db03
+7044d700
+20207666
+6fe0c49e
+245a7b2d
+7044dc0f
+7044db03
+7044d700
+20207666
+6fe0c49e
+245a7b27
+7044dc08
+7044db04
+7044d700
+20207666
+6fe0c49e
+245a7b2f
+7044dc06
+7044db04
+7044d700
+20207666
+6fe0c71f
+c000f692
+704701b1
+202078c8
+6fe0c49e
+245a7ad4
+7044dc16
+7044d700
+7044db00
+20207666
+6fe0c49e
+245a7ada
+7044dc17
+7044d700
+7044db00
+20207666
+70470100
+6fe0c49e
+245a7aa0
+7044dc0a
+20207666
+70470100
+6fe0c49e
+245a7aa2
+7044dc0b
+20207666
+70470100
+6fe0c49e
+245a7aa4
+7044dc03
+20207666
+70470100
+6fe0c49e
+245a7aa6
+7044dc02
+20207666
+6fe0c49e
+245a7abc
+7044dc10
+7044d700
+20207666
+20407f43
+2040772b
+20407735
+4730c02c
+70457801
+70457901
+6fe142ae
+1ff27e00
+d840ffff
+98417e00
+203a773c
+d840fff0
+98467c00
+2022f73e
+1ff0fe00
+67e14576
+67e144d9
+da20ffff
+1a300400
+5800ffff
+98418400
+6fe242ae
+205a773a
+98467c00
+2042f73a
+67e244a2
+58007cfe
+67e14398
+58007b32
+67e14390
+2020784c
+58000102
+67e1c3d5
+7080706d
+7080716c
+20600000
+6fe0c559
+98007200
+684a4733
+d8c0455b
+efe08006
+98000e00
+f9200400
+c200772f
+604a4733
+20600000
+6fe0c55a
+98007200
+684a4733
+d8c04563
+2020772f
+58111213
+20600000
+dfe00010
+20207715
+dfe0ffe0
+20207715
+d8407878
+20600000
+6fe242ae
+67e24520
+704524d1
+6fe0c526
+1fe0fe01
+67e0c526
+d8400000
+d8c0451f
+df200008
+20407783
+18508400
+60494527
+da60451e
+df20000b
+58000000
+67e144c1
+20407cc1
+6fe144c1
+67e14529
+df200017
+d8c044e4
+d8a0464a
+2040753b
+df20000d
+d8c0451e
+d8a04661
+2040753b
+70467525
+70467633
+20407ce1
+df200025
+d8c0464a
+d8a0452b
+2020753b
+efe08006
+1fedfe00
+e7e08005
+c2007764
+20600000
+20407c45
+20407780
+18508400
+60494503
+da6044fb
+df20000a
+58000000
+67e144c1
+20407cc1
+6fe144c1
+67e14505
+6fe14507
+1ff0fe00
+1fe0fe01
+1ff0fe00
+67e14507
+df200025
+d8c044e4
+d8a0464a
+2040753b
+70467525
+70467633
+20207ce1
+d8400000
+d8c044fc
+df200007
+efe08006
+98408400
+c2007783
+20600000
+da400033
+20600000
+6fe0c509
+67e0c500
+20600000
+20407b1f
+70451f68
+70452546
+20407742
+7044fc68
+70450246
+20207769
+70451f6e
+704525f0
+20407742
+7044fc6e
+704502f0
+20207769
+20407aa0
+70451f69
+70452500
+20407742
+7044fc69
+70450200
+20207769
+20407aa2
+70451f6a
+70452500
+20407742
+7044fc6a
+70450200
+20207769
+20407aa4
+70451f65
+70452500
+20407742
+7044fc65
+70450200
+20207769
+20407aa6
+70451f66
+70452500
+20407742
+7044fc66
+70450200
+20207769
+70451f60
+70452500
+704524d2
+20407742
+7044fc60
+704502d1
+704501d2
+20207769
+70451f60
+70452500
+704524d4
+20407742
+7044fc60
+704502d1
+704501d4
+20207769
+70451f60
+70452500
+70452403
+20407742
+7044fc60
+580000d1
+67e14502
+70450903
+20207769
+70451f60
+70452500
+70452404
+20407742
+7044fc60
+580000d1
+67e14502
+70450904
+20207769
+70451f6f
+70452500
+704524d2
+20407742
+7044fc6f
+704502d1
+704501d2
+20207769
+70451f6f
+70452500
+704524d4
+20407742
+7044fc6f
+704502d1
+704501d4
+20207769
+70451f6f
+70452500
+70452403
+20407742
+7044fc6f
+580000d1
+67e14502
+70450903
+20207769
+70451f6f
+70452500
+70452404
+20407742
+7044fc6f
+580000d1
+67e14502
+70450904
+20207769
+704524d2
+704501d2
+2020780f
+704524d4
+704501d4
+2020780f
+70452403
+70450103
+2020780f
+70452404
+70450104
+2020780f
+20407ac3
+70451f6f
+704525aa
+20407742
+7044fc6f
+580000aa
+67e14502
+20207769
+704501d1
+704524d1
+20407abe
+70451f6f
+70452555
+20407742
+7044fc6f
+70450255
+70450900
+20407789
+20207769
+20407abc
+70451f6e
+70452500
+20407742
+7044fca1
+70450200
+20207769
+6fe0c592
+c0007824
+c000f82c
+c0017834
+20600000
+20407acd
+70459201
+70451f6d
+70452501
+20407742
+7044fc6d
+70450201
+20207769
+20407ad4
+70459202
+70451f6d
+70452502
+20407742
+7044fc6d
+70450202
+20207769
+20407ada
+70459200
+70451f6d
+70452503
+20407742
+7044fc6d
+70450203
+20207769
+70451f60
+70452500
+704524d1
+20407742
+7044fc60
+70450200
+704501d1
+20207769
+70451f6f
+70452500
+704524d1
+20407742
+7044fc6f
+70450200
+704501d1
+20207769
+6fe14574
+247a0000
+20407858
+da20455b
+6fe0c559
+98007200
+e8408011
+20406c29
+1a20a201
+c2007852
+20002ee0
+20600000
+da204563
+6fe0c55a
+98007200
+e8408011
+18418480
+204078b7
+1a20a201
+c200785b
+20002ee0
+20600000
+6fe14574
+247a0000
+70456d00
+58000000
+67e44551
+70456b00
+da60455b
+e8408013
+20406c32
+2040f883
+e8408013
+20406c29
+20407858
+1a60a601
+6fe0c56b
+1fe0fe01
+67e0c56b
+6848c559
+98467c00
+24217869
+20600000
+6fe0c56b
+1fe0fe01
+6848c55a
+18408401
+984ffe00
+98000e00
+6fe44551
+f9207e00
+67e44551
+20600000
+df200001
+20600000
+6fe1456e
+98007200
+205a7881
+204074fc
+e8408013
+20406c32
+24608000
+20002ee0
+e8408013
+20406c32
+24608000
+20002ee0
+e8408013
+20406c32
+24608000
+204078b3
+e8408013
+20406c32
+2020f877
+e8408013
+18418480
+204078b7
+70456c00
+da204563
+e8408011
+20406c32
+2040f8a6
+1a20a201
+6fe0c56c
+1fe0fe01
+67e0c56c
+6848c55a
+98467c00
+2421789b
+20600000
+6fe0c56b
+6848c55a
+18408401
+984ffe00
+6848c56c
+18408401
+9840fe00
+98000e00
+7820fc00
+6fe44551
+f920fe00
+67e44551
+20600000
+da204563
+6fe0c55a
+98007200
+20207852
+79400407
+20206c43
+6fe0c71f
+c000f8eb
+704701a0
+202078c8
+6fe0c71f
+c000f8e1
+704701a1
+202078c8
+6fe0c71f
+c000f8d7
+704701a2
+202078c8
+6fe0c71f
+c000f8cd
+704701a3
+6fe1471d
+247a0000
+70435b00
+70471d05
+20600000
+4731402c
+6fe0c71c
+c000f6ee
+c0017799
+70470100
+20407aa0
+70457f21
+70458618
+204078f5
+20207c57
+4731c02c
+6fe0c71c
+c000f6f3
+c00177a0
+70470100
+20407aa2
+70457f21
+70458624
+204078f5
+20207c57
+4732402c
+6fe0c71c
+c000f6f8
+c00177a7
+70470100
+20407aa4
+70457f21
+70458628
+204078f5
+20207c57
+4732c02c
+6fe0c71c
+c000f6fd
+c00177ae
+70470100
+20407aa6
+70457f21
+70458614
+204078f5
+20207c57
+58000000
+67e1c582
+20207c36
+70459101
+20407904
+70470101
+20600000
+70459102
+20407904
+70470102
+20600000
+70459103
+20407904
+70470103
+20600000
+6fe1458f
+247a0000
+6fe14769
+67e1458f
+1fe0fe01
+67e146a1
+6fe0c71c
+1fe67c01
+2022f68f
+20600000
+20407abc
+70457f23
+20207c34
+70457c00
+7044a600
+58000001
+67e146a4
+7046a301
+70435b01
+6fe14767
+1febfe00
+67e1459d
+1fe0fe01
+67e146a1
+4733402c
+20407abe
+6fe0c57a
+67e0c586
+70457f28
+6fe0c585
+1fe0fe01
+67e0c585
+70458481
+6fe0c4a1
+1fe67c03
+2042fc41
+6fe0c4a1
+1fe67c05
+2042fc43
+2040792d
+20207c57
+6fe14576
+d840f0ff
+98417e00
+67e14582
+20207c4e
+7046a301
+70435b01
+58000001
+1febfe00
+67e146a4
+6fe14767
+1febfe00
+67e1459d
+1fe0fe01
+67e146a1
+4733c02c
+20407ac3
+70457f45
+5801feff
+67e1c580
+6fe0c585
+1fe0fe01
+67e0c585
+6fe0c4a1
+1fe67c03
+2042fc41
+6fe0c4a1
+1fe67c05
+2042fc43
+20207c57
+70459100
+20407904
+70457c00
+20407ac5
+6fe0c71c
+c000f6a0
+c0017844
+7046a601
+70457f10
+20407c4e
+20207c34
+70459100
+20407904
+2020795b
+6fe0c6a6
+203a794d
+20407ac8
+70457c00
+6fe0c71c
+c000f6a4
+c001783c
+7046a600
+70457f11
+20407c4e
+20207c34
+70459100
+20407904
+20407acb
+70457f09
+20207c34
+70457f21
+704582ff
+704583ff
+70458640
+20600000
+70457f21
+704582ff
+70458640
+20600000
+70457f21
+704583ff
+70458640
+20600000
+6fe0c592
+1fe67c03
+2042f97d
+c0007980
+c000f988
+c0017990
+20600000
+58000000
+67e0c592
+20600000
+6fe0c592
+1fe0fe01
+67e0c592
+20407acd
+6fe0c71c
+c000f692
+20407969
+20207c34
+6fe0c592
+1fe0fe01
+67e0c592
+20407ad4
+6fe0c71c
+c000f692
+2040796e
+20207c34
+6fe0c592
+1fe0fe01
+67e0c592
+20407ada
+6fe0c71c
+c000f692
+20407972
+20207c34
+6fe0c6a8
+c00079a1
+20407ae0
+7046a800
+6fe0c71c
+c000f69d
+c0017793
+70457f13
+20207c34
+20407ae2
+7046a801
+6fe0c71c
+c000f69d
+c0017793
+70457f12
+20207c34
+6fe0c593
+c00079b1
+20407ae4
+70457f21
+704582ff
+704583ff
+70459300
+70458602
+20207c34
+20407aeb
+70458601
+70457f21
+7045827f
+7045837f
+70459301
+20207c34
+6fe0c71c
+1fe67c01
+2042f6a8
+7046f901
+6fe0c596
+c00079c2
+20407af2
+70457f1f
+70459600
+20207c34
+20407af4
+70457f1e
+70459601
+20207c34
+6fe0c71c
+1fe67c01
+2042f6ab
+70457f22
+6fe0c594
+c00079f0
+c000f9ec
+c00179e8
+c001f9e3
+c00279de
+c002f9d9
+c00379d3
+20600000
+20407b11
+70459400
+704582ff
+704583ff
+704584ff
+20207c34
+20407b0c
+70459406
+704582ff
+704584ff
+20207c34
+20407b07
+70459405
+704583ff
+704584ff
+20207c34
+20407b02
+70459404
+704582ff
+704583ff
+20207c34
+20407afe
+70459403
+704584ff
+20207c34
+20407afa
+70459402
+704583ff
+20207c34
+20407af6
+70459401
+704582ff
+20207c34
+20407b17
+70458201
+70457f41
+20207c34
+70459101
+20407904
+20407b21
+70459801
+70457f10
+70457c01
+20207c34
+70459102
+20407904
+20407b23
+70459901
+70457f10
+70457c02
+20207c34
+70459103
+20407904
+70459a01
+70457f10
+70457c03
+20207c34
+70459104
+20407904
+20407b27
+70459b01
+70457f10
+70457c04
+20207c34
+70459101
+20407904
+6fe0c598
+203a79fa
+20407b29
+70459800
+70457f11
+70457c01
+20207c34
+70459102
+20407904
+6fe0c599
+203a7a01
+20407b2b
+70459900
+70457f11
+70457c02
+20207c34
+70459103
+20407904
+6fe0c59a
+203a7a08
+20407b2d
+70459a00
+70457f11
+70457c03
+20207c34
+70459104
+20407904
+6fe0c59b
+203a7a0e
+20407b2f
+70459b00
+70457f11
+70457c04
+20207c34
+70457c01
+7044a601
+20207913
+70457c02
+7044a602
+20207913
+70457c03
+7044a603
+20207913
+70457c04
+7044a604
+20207913
+20407a7f
+70457f6f
+70458200
+20207c34
+6fe0c5a1
+203a7a4b
+7045a100
+20207a50
+20407a82
+7045a101
+70457f15
+70458201
+20207c34
+20407a83
+70457f15
+70458200
+20207c34
+20407a86
+70457f33
+70458202
+20207c34
+20407a8a
+58000001
+67e0c582
+70457f32
+70458306
+20207c34
+20407a90
+58000002
+20207a5a
+20407a92
+58000003
+20207a5a
+20407a94
+58000004
+20207a5a
+20407a96
+58000005
+20207a5a
+20407a98
+58000006
+20207a5a
+70459101
+20407904
+20407a9a
+70457f31
+70458200
+20207c34
+6fe0c6a7
+203a7a7a
+20407a9d
+7046a700
+70457f16
+70458200
+20207c34
+20407a9c
+7046a701
+70457f16
+70458201
+20207c34
+5800006f
+67e144a7
+20207aab
+7044aa01
+58000015
+67e144a7
+20207aab
+7044aa02
+58000033
+67e144a7
+20207aab
+58000001
+67e0c4ab
+58000031
+67e144a7
+7044aa20
+20207aab
+58000002
+20207a8b
+58000003
+20207a8b
+58000004
+20207a8b
+58000005
+20207a8b
+58000006
+20207a8b
+58000000
+20207a8b
+7044aa01
+58000016
+67e144a7
+20207aab
+7044aa18
+20207aa8
+7044aa24
+20207aa8
+7044aa28
+20207aa8
+7044aa14
+20207aa8
+58000021
+67e144a7
+20207aab
+20407f72
+6fe0c6aa
+245a7aaf
+20600000
+df200027
+d8c04477
+d8a046d2
+2040753b
+6fe0c6aa
+67e0c49e
+6fe0c49f
+1fe0ffff
+67e0c49f
+20407f72
+6fe0c76b
+67e0c49e
+20600000
+58000023
+20207abf
+58000028
+67e144a7
+58000000
+67e244a9
+20207aab
+58000045
+20207abf
+7044a600
+58000010
+20207abf
+7044a600
+58000011
+20207abf
+58000009
+20207abf
+58000021
+67e144a7
+7044a900
+7044aa40
+7044abff
+7044acff
+20207aab
+58000021
+67e144a7
+7044a900
+7044aa40
+7044abff
+20207aab
+58000021
+67e144a7
+7044a900
+7044aa40
+7044acff
+20207aab
+58000013
+20207abf
+58000012
+20207abf
+58000021
+67e144a7
+7044a900
+7044aa02
+7044abff
+7044acff
+20207aab
+58000021
+67e144a7
+7044a900
+7044aa01
+7044ab7f
+7044ac7f
+20207aab
+5800001f
+20207abf
+5800001e
+20207abf
+58000022
+67e144a7
+7044aaff
+20207aab
+58000022
+67e144a7
+7044abff
+20207aab
+58000022
+67e144a7
+7044acff
+20207aab
+58000022
+67e144a7
+7044aaff
+7044abff
+20207aab
+58000022
+67e144a7
+7044aaff
+7044acff
+20207aab
+58000022
+67e144a7
+7044abff
+7044acff
+20207aab
+58000022
+67e144a7
+7044aaff
+7044abff
+7044acff
+20207aab
+58000001
+7044a101
+67e144aa
+58000041
+67e144a7
+7044a900
+7044ac00
+20207aab
+58000000
+20207b18
+7044a601
+20207ac6
+7044a602
+20207ac6
+7044a603
+20207ac6
+7044a604
+20207ac6
+7044a601
+20207ac9
+7044a602
+20207ac9
+7044a603
+20207ac9
+7044a604
+20207ac9
+20600000
+4734402d
+2040784c
+20407862
+6fe44551
+245a7b6c
+20407b5f
+6fe0c701
+245a7b53
+20407b43
+6fe0c35b
+205a7b72
+6fe0c6a3
+245a7b7a
+6fe0c6a3
+205a7b7f
+4734c02d
+20207b85
+4735402d
+6fe0c71c
+1fe67c01
+2042f67c
+6fe14572
+247a0000
+6fe44551
+207a0000
+58000000
+67e1c582
+67e244a9
+70458600
+6fe0c701
+245a7b53
+6fe1475d
+202075e6
+6fe1475f
+202075e6
+6fe44551
+1fe20400
+df200019
+d8e00000
+20407b67
+18e27e00
+67e0c59c
+58000000
+67e44551
+20207d2f
+6fe0c56d
+247a0000
+70457d00
+70471f00
+58000000
+67e1458f
+67e144df
+20600000
+afefffff
+20608000
+18e08e01
+c2007b67
+20600000
+70456d01
+7046a301
+58000001
+67e146a4
+70457401
+20600000
+4735c02d
+6fe0c56d
+247a0000
+58000000
+67e146a4
+7046a300
+4736402d
+20600000
+4736c02d
+6fe0c57b
+207a0000
+6848c57b
+202078b7
+4737402d
+6fe0c57b
+207a0000
+6848c57b
+18418480
+202078b7
+4737c02d
+6fe146a1
+247a0000
+6fe146a4
+247a0000
+20407b8f
+20407b9f
+4738402e
+d85fffff
+20203b7a
+df200010
+70473703
+6848c737
+18420e00
+6fe24733
+afefffff
+2020fb98
+18418480
+20406c29
+6fe0c737
+1fe0fe01
+67e0c737
+c2007b91
+70807340
+70808340
+20600000
+6848c559
+18422200
+da400000
+d8400000
+604c0016
+d8c0455b
+20407ba9
+79200403
+604a0016
+20600000
+efe08006
+98000e00
+f9200400
+1a40a401
+1a227e00
+9a467c00
+20628000
+20207ba9
+4738c02e
+6fe0c71c
+c0017bf7
+6fe0c49e
+243a7bdc
+6fe0c71c
+c000fbe1
+6fe0c57a
+243a7be1
+6fe0c6a9
+243a7be8
+6fe0c6aa
+243a7bed
+58000000
+67e0c6fc
+67e0c6fd
+67e0c6fe
+67e0c6ff
+20600000
+4739402e
+df200027
+d8a04129
+d8c0464a
+2040753b
+202042e9
+4739c02e
+df200027
+d8a04129
+d8c04477
+2040753b
+202042e9
+473a402e
+df200027
+d8a04129
+d8c046ab
+2040753b
+202042e9
+473ac02e
+df200027
+d8a04129
+d8c046d2
+2040753b
+202042e9
+6fe0c6fc
+c001fbb6
+1fe0fe01
+67e0c6fc
+20207bca
+6fe0c6fd
+c001fbba
+1fe0fe01
+67e0c6fd
+6fe0c71c
+c000fbf2
+20207bc4
+6fe0c6fe
+c001fbbc
+1fe0fe01
+67e0c6fe
+20207bd0
+6fe0c6ff
+c001fbbe
+1fe0fe01
+67e0c6ff
+20207bd6
+df200017
+d8a04129
+d8c0464a
+2040753b
+202042e9
+6fe0c550
+1fe0fe01
+67e0c550
+1fe67c03
+20217bca
+1fe67c06
+20217c03
+1fe67c09
+20217c08
+58000000
+67e0c550
+20207bca
+df200025
+d8a04129
+d8c0452b
+2040753b
+202042e9
+df200025
+d8a04129
+d8c0464a
+2040753b
+202042e9
+6fe0c71a
+205a7c19
+6fe0c71a
+2feffe00
+2020fc1c
+6fe0c71a
+2feffe01
+2020fc24
+6fe0c71a
+2feffe02
+2020fc2c
+20600000
+6fe0c719
+67e0c71a
+20600000
+6fe0c71a
+793ffe00
+67e0c71a
+6848c366
+79200400
+6048c366
+70000725
+2020433c
+6fe0c71a
+793ffe01
+67e0c71a
+6848c366
+79200401
+6048c366
+70000726
+2020433c
+6fe0c71a
+793ffe02
+67e0c71a
+6848c366
+79200402
+6048c366
+70000727
+2020433c
+20407c36
+20207c57
+20407c45
+6fe0c585
+1fe0fe01
+67e0c585
+6fe0c4a1
+1fe67c03
+2042fc41
+6fe0c4a1
+1fe67c05
+2042fc43
+20207c4e
+70458483
+20600000
+70458488
+20600000
+473b402e
+70435b01
+7046a401
+7046a301
+6fe14767
+67e1459d
+1fe0fe01
+67e146a1
+20600000
+6fe0c577
+d84000f0
+98417e00
+6848c57c
+9840fe00
+67e0c577
+6fe14576
+67e14580
+20600000
+6fe0c57a
+245a7c6f
+6fe0c57f
+1fe67c28
+2042fc6c
+20407c88
+d8a0463a
+d8c0457f
+df20000e
+2040753b
+df200027
+d8c04623
+d8a0464a
+2040753b
+70467527
+70467653
+20407cdb
+6fe0c57a
+67e0c654
+473bc02e
+20600000
+6fe0c57a
+67e0c586
+20600000
+6fe0c57f
+1fe67c28
+2042fc85
+20407c88
+d8a0463a
+d8c0457f
+df20000e
+2040753b
+df200027
+d8c04623
+d8a0464a
+2040753b
+70467527
+70467653
+20407cdb
+df200027
+d8c0464a
+d8a046ab
+2040753b
+6fe0c6a9
+67e0c6b5
+20600000
+6fe0c6a9
+67e0c586
+20600000
+70458701
+70458800
+180a7e00
+1fec8400
+6048c589
+67e0c58a
+1fe47e00
+67e144c1
+6fe0c58a
+6848c587
+9842fe00
+67e0c587
+6848c588
+9842fe00
+67e0c588
+da60457f
+df20000c
+6fe0c71c
+1fe67c02
+2042fcc1
+2442fca5
+6fe144c1
+da20ff00
+9a210400
+184c8400
+6048c58b
+6fe0c4c1
+67e0c58c
+20600000
+e8408013
+184d0400
+6fe144c1
+98428400
+d8e00000
+20407caf
+604944c1
+1a60a601
+c2007ca5
+20600000
+18427e00
+1feca200
+1a31a200
+1a292200
+1fe38400
+1a227e00
+245a7cba
+18e08e01
+18e27e00
+c0847caf
+20600000
+6fe144c3
+1fe22200
+18427e00
+9a22fe00
+da20ffff
+9a210400
+20600000
+6fe144c1
+e8408013
+1a60a601
+184d8400
+184d0400
+9842fe00
+1f222400
+df200008
+2feffe0f
+1fe3fe00
+2420fcce
+684944c3
+9842fe00
+c2007cc9
+1a427200
+c2007cc2
+67e144c1
+6848c4c1
+184d8400
+6fe0c4c2
+1fedfe00
+6048c4c2
+67e0c4c1
+20600000
+20407ce1
+20207cdd
+20407cdd
+20207ce1
+d8c0464a
+d8a0464a
+df200027
+20207ce8
+df200027
+da60464a
+da400053
+6fe0c71c
+1fe67c02
+2042f787
+20207ced
+efe08006
+1fedfe00
+e7e08005
+c2007ce8
+20600000
+20407cf1
+1a60a601
+c2007ced
+20600000
+da200001
+1a43a400
+2a4ffe07
+2040fcf9
+1a23a200
+1a227e00
+c3840000
+20207cf2
+efe08013
+9a22fe00
+e7e08013
+1a42a411
+20600000
+473c402f
+6fe0c71c
+1fe67c01
+2042fd32
+20407d28
+20407d0a
+20407d0e
+20407d25
+20407d13
+20407d17
+20407d1c
+20207d20
+da604574
+da407d0d
+20204de8
+20600000
+da60459d
+da407d11
+20204de8
+70435b00
+20600000
+da604572
+da407d16
+20204de8
+20600000
+da6046a4
+da407d1a
+20204de8
+7046a300
+20600000
+da6046a1
+da407d1f
+20204de8
+20600000
+da60471d
+da407d23
+20204de8
+70471f01
+20600000
+da60458f
+da407d2b
+20204de8
+da604704
+da407d2d
+20204de8
+6fe14761
+202075e6
+6fe14763
+202075e6
+6fe14765
+67e14704
+20600000
+da6044df
+da407d35
+20204de8
+6fe1458f
+207a0000
+7044e301
+20600000
+472bc02a
+20207d3c
+20600000
+472c402b
+20403d2f
+7854fc00
+204042c9
+20407d46
+24768000
+6fe08002
+1fe0fe01
+67e08002
+20207dc2
+20407d48
+20203dc8
+6fe0c774
+67e08007
+20600000
+58000003
+20207eb8
+58000008
+20207eb8
+6fe34783
+684b477d
+98467c00
+20600000
+6fe0c76e
+203a7d5b
+6fe0c773
+c000fd5b
+6fe0c772
+c0287d5b
+20407d4f
+2022fd4d
+58000014
+20207eb8
+6fe0c76e
+203a7d65
+6fe0c773
+c000fd65
+6fe0c772
+c0287d65
+20407d4f
+2022fd4d
+58000018
+20207eb8
+58000006
+20207eb8
+6fe0c7a4
+c1a00000
+58000005
+20207eb8
+6fe147a4
+243a7d71
+5800001b
+20207eb8
+58000017
+20207eb8
+6fe0c7a5
+c0007d85
+c000fd87
+c0017d8b
+c001fd8f
+20600000
+6fe0c7a4
+c0107d7c
+20207d73
+6fe0c7a5
+c0007d85
+c000fd87
+c0017d89
+c001fd8b
+c0027d8d
+c002fd8f
+c0037d91
+20600000
+58000016
+20207eb8
+58000010
+20207eb8
+58000012
+20207eb8
+5800001c
+20207eb8
+5800000a
+20207eb8
+5800000f
+20207eb8
+5800000c
+20207eb8
+6fe0c7a4
+203a7d97
+58000011
+20207eb8
+58000004
+20207eb8
+58000007
+20207eb8
+58000013
+20207eb8
+6fe0c7a4
+203a7da1
+5800000d
+20207eb8
+5800000e
+20207eb8
+472cc02b
+6fe0c7a4
+c000fda8
+c0017daa
+20600000
+5800001e
+20207eb8
+58000015
+20207eb8
+6fe147a4
+c07ffdbb
+472d402b
+6fe147a4
+c0707dbb
+c01e7db5
+c03c7db7
+c0787db9
+20600000
+58000002
+20207eb8
+58000009
+20207eb8
+58000019
+20207eb8
+5800001a
+20207eb8
+58007d39
+67e14390
+58007ea5
+67e14398
+20207ebd
+6fe0c76c
+c0007dc8
+6fe14775
+204075e6
+20347e18
+20600000
+6fe08052
+c02afdfb
+70477200
+58000000
+67e34783
+68498053
+58528718
+98467c00
+70477300
+2022fddd
+70477301
+5808f9ff
+98467c00
+2022fddd
+5808f903
+98467c00
+2022fddd
+70477302
+58f87703
+98467c00
+24628000
+d8c00047
+d8a0464a
+df200027
+20407548
+70467653
+70467527
+20407cd9
+6fe0c773
+c000fdf9
+d8c04661
+d8a04739
+df20000e
+2040753b
+6fe14743
+1ff0fe00
+1fe47e00
+67e144c1
+da604739
+df20000c
+58001021
+67e144c3
+20407ca5
+6fe144c1
+1ff0fe00
+68494745
+98467c00
+24628000
+20207e0c
+d8c04662
+20207de7
+472dc02b
+d8a04783
+d8c00049
+df200006
+2040753b
+00020001
+18000228
+03020002
+030a0128
+2a000200
+00000014
+00000000
+00000000
+00000000
+00000000
+02000400
+02012803
+01020005
+03c2022a
+03020006
+07020128
+2a040200
+06000608
+2c006400
+02000801
+01022800
+02000918
+20012803
+0502000a
+000b002a
+02290202
+000c0000
+02280002
+000d180a
+01280302
+02000e02
+59062a29
+69684369
+02000f70
+02012803
+50020010
+3502072a
+01aa2212
+02001100
+12022800
+02001218
+06012803
+4e020013
+1401012a
+28030200
+00151201
+082a4d02
+00000000
+00000000
+02020016
+00000229
+08020017
+01020229
+03020018
+191a0128
+2a4d0200
+00000007
+00000000
+0202001a
+00000229
+0802001b
+01010229
+0302001c
+1d120128
+2a4d0200
+1e000002
+29020200
+1f000002
+29080200
+20010302
+28030200
+00211201
+022a4d02
+00220000
+02290202
+00230000
+02290802
+00240104
+01280302
+0200250e
+00022a4d
+02002600
+02022908
+02002702
+02012803
+4b020028
+0105bd2a
+01a10209
+01090185
+090500a1
+08290119
+01250015
+08950175
+01050281
+31093009
+26f80116
+107507ff
+06810295
+81153809
+08757f25
+06810195
+380a0c05
+81019502
+05c0c006
+a1060901
+75028501
+05089501
+29e01907
+250015e7
+95028101
+81087501
+75059503
+19080501
+91052901
+75019502
+95039103
+15087506
+00ff2600
+00190705
+0081ff29
+090c05c0
+8501a101
+2a001903
+001503ff
+9503ff26
+81107501
+0105c000
+01A18009
+00150485
+01750125
+81190395
+02818329
+05750195
+29C00381
+28030200
+002a1a01
+082a3302
+00000000
+00000000
+0202002b
+00010229
+0302002c
+2d020128
+2a4a0200
+00010104
+02002e03
+0f022800
+02002f18
+12012803
+19020030
+3164012a
+29020200
+32000002
+28030200
+00330401
+002a4c02
+061a0000
+8809ffbc
+048501a1
+ff2a0019
+26001500
+087500ff
+00810195
+01053fc0
+01a10609
+08950175
+e0190705
+0015e729
+02810125
+08750195
+05950381
+08050175
+05290119
+01950291
+03910375
+08750695
+ff250015
+00190705
+0081ff29
+0105a3c0
+01a10209
+01090185
+090500a1
+05290119
+01250015
+01750595
+01950281
+01810375
+30090105
+01163109
+07FF26F8
+02951075
+38090681
+7f258115
+01950875
+0c050681
+9502380a
+c0068101
+090105c0
+8501a180
+19010502
+15882981
+95012500
+81017508
+0c05c006
+01a10109
+00150385
+19038026
+03802a00
+01951075
+06c00081
+0e09ff00
+BA8501a1
+08751f95
+1500ff26
+91010900
+95BA8502
+2608751f
+001500ff
+02810109
+011212C0
+00000200
+31514000
+00021020
+01000201
+3b02093b
+00010200
+040932a0
+03010000
+09000101
+00020021
+001a2201
+03810507
+09020040
+01000104
+00020103
+02002109
+a3220100
+82050700
+02004003
+00020001
+18010228
+03020002
+03200128
+2a050200
+00040001
+02290202
+00050000
+02280002
+00061800
+01280302
+02000702
+43132a00
+73706968
+422d6165
+2020454c
+20202020
+00082020
+01280302
+02000902
+c1022a01
+02000a03
+02012803
+0402000b
+0006082a
+00640006
+000c012c
+02280002
+000d180a
+01280302
+02000e02
+02072a50
+8266248a
+000f0001
+02280002
+00101812
+01280302
+02001106
+01012a4e
+03020012
+13120128
+2a4d0200
+14000002
+29020200
+15000002
+29080200
+16010202
+28030200
+00171201
+022a4d02
+00180000
+02290202
+00190000
+02290802
+001a0103
+01280302
+02001b02
+051b2a4b
+a101090c
+09028501
+09ea09e9
+153009e2
+750c2501
+81019510
+001cc000
+01280302
+02001d02
+11042a4a
+1e010001
+28030200
+001f0401
+012a4c02
+02002000
+0f022800
+02002118
+12012803
+19020022
+0063012a
+00130200
+13020002
+02000100
+00040013
+06001302
+00130200
+13020005
+02000000
+28000017
+00001702
+02000100
+01022800
+02000218
+20012803
+05020003
+0400012a
+29020200
+05000002
+28000200
+06180002
+28030200
+00070201
+112a0002
+4f484355
+3130204e
+20202020
+20202020
+02000820
+02012803
+01020009
+00c8022a
+0302000a
+0b020128
+2a040200
+06000608
+2c006400
+02000c01
+0a022800
+02000d18
+02012803
+5002000e
+8a02072a
+01826624
+02000f00
+f0022800
+020010ff
+12012803
+f1020011
+00000eff
+00000000
+00000000
+00000000
+02020012
+00000229
+03020013
+14080128
+fff20200
+0000000e
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+0000dd22
\ No newline at end of file
Index: program/app.prog
===================================================================
--- /branch/usb/usb_public_base/program/app.prog	(revision 0)
+++ /branch/usb/usb_public_base/program/app.prog	(working copy)
@@ -0,0 +1,326 @@
+app_init:
+	bpatch patch0c_2,mem_patch0c
+	fetch 1,mem_device_option
+	branch app_init,blank				/* wait ram to be initialized */
+	beq dvc_op_dongle,dongle_init
+	beq dvc_op_shutter,shutter_init
+	beq dvc_op_module,module_init
+	beq dvc_op_car,car_init
+	beq dvc_op_remote_car,remote_car_init
+	beq dvc_op_hci_boot,hci_init
+//	beq dvc_op_test,test_init
+	beq dvc_op_mouse,mouse_init
+	rtn
+
+
+app_param_init:
+	rtn wake
+	call adc_init_data
+	fetch 1,mem_device_option
+	beq dvc_op_shutter,shutter_default_init
+	beq dvc_op_dongle,dongle_default_init
+	beq dvc_op_mouse,mouse_default_init
+	beq dvc_op_remote_car,remote_car_default_init
+	rtn
+	
+app_process_idle:
+	call ui_dispatch
+	call check_51cmd
+	call app_process_bb_event
+	fetch 2,mem_cb_idle_process
+	branch callback_func
+
+app_process_ble:
+	fetch 2,mem_cb_le_process
+	branch callback_func
+
+app_process_bb_event:
+	bpatch patch0c_3,mem_patch0c
+	//return if c51 need to process bb event
+	arg mem_ipc_fifo_bt2c51,rega
+	call fifo_out
+	rtn blank
+	//reaching here mains c51 cannot get bb event.
+	copy pdata,regc
+	call app_event_normal_process
+	branch app_process_bb_event_priority
+	
+app_discard_event:
+	arg 0,regc
+	rtn
+
+//************************************************//
+//*APP BB EVENT NORMAL PROCESS**//
+//************************************************//
+app_event_normal_process:
+	beq BT_EVT_BUTTON_LONG_PRESSED,app_evt_button_long_pressed
+	beq BT_EVT_LE_CONNECTED,app_le_event_bb_connected
+	beq BT_EVT_LE_DISCONNECTED,app_le_event_bb_disconn
+	rtn
+
+
+
+app_process_bb_event_priority:
+	fetch 2,mem_cb_bb_event_process
+	branch callback_func
+	
+app_check_wake_lock:
+	fetch 2,mem_cb_check_wakelock
+	branch callback_func
+	
+app_will_enter_lpm:
+	fetch 2,mem_cb_before_lpm
+	branch callback_func
+
+app_le_event_bb_connected:
+	fetch 2,mem_ui_state_map
+	set1 UI_STATE_BLE_CONNECTED,pdata
+	store 2,mem_ui_state_map
+	rtn
+	
+app_le_event_bb_disconn:
+	jam 0,mem_le_l2cap_att_states
+	fetch 2,mem_ui_state_map
+	set0 UI_STATE_BLE_CONNECTED,pdata
+	store 2,mem_ui_state_map
+	branch app_lpm_mult_disable
+	
+
+app_evt_button_long_pressed:
+	fetch APP_DISC_RSN_SIZE,mem_app_disconn_reason_flag
+	set1 APP_DISC_BY_BUTTON,pdata
+	store APP_DISC_RSN_SIZE,mem_app_disconn_reason_flag
+	rtn
+	
+
+app_evt_timer:
+	store 1,mem_app_evt_timer_count
+app_evt_100ms_loop:
+	bpatch patch0c_4,mem_patch0c
+	fetch 1,mem_app_evt_timer_count
+	rtn blank
+	increase -1,pdata
+	store 1,mem_app_evt_timer_count
+	call ui_button_polling
+	call app_lpm_wake_auto_lock_timer
+	call flash_write_spi_sm_timer
+	fetch 2,mem_cb_event_timer
+	call callback_func
+	branch app_evt_100ms_loop
+
+
+//regc:timer addr
+//regb:timer up call back fuction
+timer_single_step:
+	ifetch 1,regc
+	rtn blank
+	pincrease -1
+	istore 1,regc
+	nrtn blank
+	copy regb,pdata
+	branch callback_func
+
+//regc:timer addr
+//regb:timer up call back fuction
+timer_single_step_2B:
+	ifetch 2,regc
+	rtn blank
+	pincrease -1
+	istore 2,regc
+	nrtn blank
+	copy regb,pdata
+	branch callback_func
+	
+app_power_timer:
+	fetcht 2,mem_power_param_ptr
+	add temp,power_timer_offset,regc
+	arg app_power_timer_timeout,regb
+	branch timer_single_step
+	
+app_power_timer_timeout:
+	call app_got_power_state_common
+	beq POWER_STARTING,app_enter_power_stanby_state
+app_enter_power_off_state:
+	branch app_enter_hibernate
+app_enter_power_stanby_state:
+	setarg POWER_STANDBY
+	istore 1,regc
+	add temp,power_standby_cb_offset,regb
+app_power_cb_common:
+	ifetch 2,regb
+	branch callback_func
+
+
+app_bb_hibernate:
+	call app_disconn_reason_clear
+	branch app_enter_hibernate
+
+	
+app_disconn_reason_clear:
+	setarg 0
+	store APP_DISC_RSN_SIZE,mem_app_disconn_reason
+	rtn
+app_disconn_reason_flag_clear:
+	setarg 0
+	store APP_DISC_RSN_SIZE,mem_app_disconn_reason_flag
+	rtn
+
+
+	
+app_disconn_reason_collect_ble:
+	fetch APP_DISC_RSN_SIZE,mem_app_disconn_reason_flag
+	set1 APP_DISC_BLE,pdata
+	store APP_DISC_RSN_SIZE,mem_app_disconn_reason
+	setarg 0
+	store APP_DISC_RSN_SIZE,mem_app_disconn_reason_flag
+	rtn
+
+	
+//************************************************//
+//********APP SHARED FUNCSIONS*******//
+//************************************************//
+
+
+app_get_lpm_wake_lock:
+	arg wake_lock_app,queue
+	branch lpm_get_wake_lock
+
+app_put_lpm_wake_lock:
+	arg wake_lock_app,queue
+	branch lpm_put_wake_lock
+	
+app_lpm_wake_auto_lock:
+	jam  LPM_WAKE_UP_DELAY_TIMER,mem_wake_up_delay_timer
+	branch app_get_lpm_wake_lock
+	
+app_lpm_wake_auto_lock_timer:
+	arg mem_wake_up_delay_timer,regc
+	arg app_put_lpm_wake_lock,regb
+	branch timer_single_step
+
+
+app_ble_start_direct_adv:
+	jam BT_CMD_START_DIRECT_ADV,mem_fifo_temp
+	branch ui_ipc_send_cmd
+
+app_ble_stop_direct_adv:
+	jam BT_CMD_STOP_DIRECT_ADV,mem_fifo_temp
+	branch ui_ipc_send_cmd
+	
+app_ble_stop_adv:
+	jam BT_CMD_STOP_ADV,mem_fifo_temp
+	branch ui_ipc_send_cmd
+	
+app_ble_start_adv:	
+	jam BT_CMD_START_ADV,mem_fifo_temp
+	branch ui_ipc_send_cmd
+	
+app_ble_start_scan:
+	jam BT_CMD_LE_START_SCAN,mem_fifo_temp
+	branch ui_ipc_send_cmd
+	
+app_ble_stop_scan:
+	jam BT_CMD_LE_STOP_SCAN,mem_fifo_temp
+	branch ui_ipc_send_cmd
+	
+app_ble_start_conn:
+	jam BT_CMD_LE_START_CONN,mem_fifo_temp
+	branch ui_ipc_send_cmd
+	
+app_ble_disconnect:
+	jam BT_CMD_LE_DISCONNECT,mem_fifo_temp
+	branch ui_ipc_send_cmd
+	
+app_led_start_blink:	
+	jam BT_CMD_LED_BLINK,mem_fifo_temp
+	branch ui_ipc_send_cmd
+
+app_led_on:
+	jam BT_CMD_LED_ON,mem_fifo_temp
+	branch ui_ipc_send_cmd
+	
+app_led_stop_blink:
+app_led_off:
+	jam BT_CMD_LED_OFF,mem_fifo_temp
+	branch ui_ipc_send_cmd
+	
+app_enter_hibernate:
+	jam BT_CMD_ENTER_HIBERNATE,mem_fifo_temp 
+	branch ui_ipc_send_cmd
+	
+
+app_ble_store_reconn_info:
+	jam BT_CMD_STORE_RECONN_INFO_LE,mem_fifo_temp
+	branch ui_ipc_send_cmd
+
+
+app_lpm_mult_enable:
+	set1 mark_lpm_mult_enable,mark
+	rtn
+
+app_lpm_mult_disable:
+	set0 mark_lpm_mult_enable,mark
+	rtn
+
+
+/*
+
+mem_power_param struct
+{
+	usigned char     mem_power_state
+	usigned char     mem_power_timer
+	usigned char	 mem_power_off_timeout
+	usigned char	 mem_power_starting_timeout
+	usigned long	 mem_power_off_cb
+	usigned long	 mem_power_starting_cb
+	usigned long	 mem_power_standby_cb
+	usigned long 	 mem_ui_butten_up_cb
+}
+    	functions:power state switching by mem_app_power_timer timeout or by button_long_pressed event
+    	(power off -> power starting->power standby->power off) and power timer initialization 
+ input parameters:mem_power_param_ptr should be point to the variable(mem_power_param) address where the input parameters stored in with its format
+output parameters:switched power state will be stored in variable mem_power_state*/
+app_button_long_pressed:
+	call app_got_power_state_common
+	beq POWER_STANDBY,app_power_shutting_down
+app_power_starting:
+	setarg POWER_STARTING
+	istore 1,regc
+	add temp,power_starting_timeout_offset,rega
+	add temp,power_starting_cb_offset,regb
+app_power_common:
+	ifetcht 1,rega
+	increase 1,regc
+	istoret 1,regc
+	branch app_power_cb_common
+	
+app_power_shutting_down:
+	setarg POWER_OFF
+	istore 1,regc
+	fetch 2,mem_ui_state_map
+	bbit0 UI_STATE_BLE_CONNECTED,app_power_off_end
+	call le_send_terminate_ind_user_terminated
+	call app_ble_disconnect
+app_power_off_end:
+	fetcht 2,mem_power_param_ptr
+	add temp,power_off_timeout_offset,rega
+	add temp,power_off_cb_offset,regb
+	branch app_power_common
+	
+app_got_power_state_common:
+	fetcht 2,mem_power_param_ptr
+	add temp,power_state_offset,regc
+	ifetch 1,regc
+	rtn
+
+app_event_button_up:
+	call app_got_power_state_common
+	bne POWER_OFF,app_power_release
+	branch app_enter_hibernate
+app_power_release:
+	add temp,ui_butten_up_cb_offset,regb
+	branch app_power_cb_common
+
+
+
+
Index: program/app_car.prog
===================================================================
--- /branch/usb/usb_public_base/program/app_car.prog	(revision 0)
+++ /branch/usb/usb_public_base/program/app_car.prog	(working copy)
@@ -0,0 +1,974 @@
+ifdef COMPILE_CAR
+
+define CAR_TEST_FUNCTION
+
+car_init:
+	call enable_authrom
+	rtn wake
+	setarg car_g24_receive_process
+	store 2,mem_cb_24g_receive_process
+	
+	setarg g24_bind_ackpayload_prep
+	store 2,mem_cb_24g_ackpayload
+	
+	setarg car_g24_cb_data_device1
+	store 2,mem_cb_24g_data_device1
+
+	setarg car_le_before_hibernate
+	store 2,mem_cb_before_hibernate
+	
+	setarg car_le_process_lpm_before
+	store 2,mem_cb_before_lpm	
+		
+	setarg car_scale_process_idle	
+	store 2,mem_cb_idle_process	
+	
+	setarg car_scale_process_bb_event 
+	store 2,mem_cb_bb_event_process	
+	
+	setarg app_get_lpm_wake_lock
+	store 2,mem_cb_check_wakelock
+	
+	setarg car_le_receive_data
+	store 2,mem_cb_att_write
+	
+	setarg car_le_bb_event_timer
+	store 2,mem_cb_event_timer
+	
+	bpatch patch05_5,mem_patch05
+	call car_init_environment
+	call car_lpm_timer_enable
+	call queue_init
+	jam 2,mem_lpm_mult
+	jam POWER_ON,mem_car_24g_received_pac
+	fetch 1,mem_car_config_soft_switch_enable
+	store 1,mem_car_hard_soft_switch
+	beq HARD_SWITCH, car_hard_switch_power_on_signal
+	fetch 1,mem_car_config_soft_switch_gpio
+	store 1,mem_ui_button_gpio
+	jam OFF,mem_le_adv_enable
+car_soft_switch_power_on_init:
+	call ui_button_init
+	call ui_button_polling
+	jam POWER_STARTING,mem_car_power_state
+	fetch 2,mem_ui_state_map
+	rtnbit1 UI_STATE_BTN_DOWN
+ 	branch app_enter_hibernate
+ 	
+car_default_init:
+        rtn
+car_power_off_signal:	
+	branch car_ui_led_init
+	
+car_hard_switch_power_on_signal:
+	jam POWER_STANDBY,mem_car_power_state
+car_soft_switch_power_on_signal:
+	jam ON,mem_le_adv_enable
+	setarg FAST_ADV_INTERVAL_VALUE_CAR
+	call shutter_ble_adv_interval_set
+car_le_modified_name_adv:
+	arg mem_le_name+7,contw
+	fetch 1,mem_le_lap
+car_name_loop:
+	and pdata,0xF0,temp
+	rshift4 temp,temp
+	call car_hex_to_ascii
+	istoret 1, contw
+	and pdata,0x0F,temp
+	call car_hex_to_ascii
+	istoret 1, contw
+	call le_modified_name_att_list
+	fetcht 1,mem_le_name_len
+	copy temp,loopcnt
+	arg mem_le_adv_data+2,contw
+	arg mem_le_name,contr
+	call memcpy
+car_le_modified_name_scan:
+	fetcht 1,mem_le_name_len
+	copy temp,loopcnt
+	arg mem_le_scan_data+2,contw
+	arg mem_le_name,contr
+	branch memcpy
+car_hex_to_ascii:
+	sub temp,9,null
+	branch car_hex_num,positive
+	add temp,55,temp
+	rtn
+car_hex_num:	
+	add temp,48,temp
+	rtn
+
+car_ui_led_init:
+	fetch 1,mem_car_config_blood_led1_gpio
+	bne INVALID_PIN_NUM,car_blood_led_gpio_set
+car_ui_led_init_1:
+	fetch 1,mem_car_config_pairing_led_gpio
+	bne INVALID_PIN_NUM,car_pairing_led_gpio_set
+car_ui_led_init_2:
+	fetch 1,mem_car_config_low_voltage_led_gpio
+	bne INVALID_PIN_NUM,car_low_voltage_led_gpio_set
+car_ui_led_init_3:
+	fetch 1, mem_car_led_num
+	copy pdata,loopcnt
+	setarg mem_car_led_map
+	copy pdata,rega
+car_in_lp1:
+	copy rega,contr
+	ifetch 1,contr
+	copy contr,rega
+	beq INVALID_PIN_NUM,car_in_lp1_end
+	copy pdata,temp
+	call gpio_config_output
+car_in_lp1_end:
+	loop car_in_lp1
+car_ui_led_init_end:
+	rtn
+car_blood_led_gpio_set:
+	fetch 8,mem_car_config_blood_led1_gpio
+	store 8,mem_car_led_map+2
+	branch car_ui_led_init_1
+car_pairing_led_gpio_set:
+	store 1,mem_car_led_map
+	branch car_ui_led_init_2
+car_low_voltage_led_gpio_set:
+	store 1,mem_car_led_map+1
+	branch car_ui_led_init_3
+
+car_init_environment:
+	
+	call car_g24_init
+	call car_g24_load_commom_addr
+	arg 0,rega
+	call pwm_init
+	call car_ui_led_init
+	call car_start_blink
+	call car_init_adc_hvin
+	branch car_motor_init
+car_read_otp_addr:
+        rtn
+car_motor_init:
+	fetch 1, mem_car_motor_gpio_num
+	copy pdata,loopcnt
+	setarg mem_car_motor_gpio_map
+	copy pdata,rega
+p_in_lp1:
+	copy rega,contr
+	ifetch 1,contr
+	copy contr,rega
+	beq INVALID_PIN_NUM,p_in_lp1_end
+	copy pdata,temp
+	store 1, mem_car_gpio
+	call car_ui_gpio_init
+p_in_lp1_end:
+	loop p_in_lp1
+p_car_ui_led_init_end:
+	rtn
+
+car_ui_gpio_init:
+	fetch 1,mem_car_gpio
+	rtneq UI_BUTTON_GPIO_DISABLE
+	iforce temp
+	branch gpio_config_output
+
+	
+car_init_adc_hvin:
+	jam 100,mem_car_notify_vdd_value_last
+	rtn
+	
+car_le_before_hibernate:
+	call car_gpio_set_before_hibernate
+	call clear_wake
+car_le_process_lpm_before:
+	branch keyscan_process_lpm_before
+
+car_gpio_set_before_hibernate:
+	 call check_51cmd_led_off
+car_gpio_set_before_lpm_common:
+	arg 20,loopcnt
+	arg core_gpio_conf,contr
+car_setgpio_loop:
+	copy contr,contw
+	ifetch 1,contr
+	beq gpcfg_spid_miso,car_setgpio_pullup
+	beq gpcfg_spid_ncs,car_setgpio_pullup
+	beq gpcfg_spid_sck,car_setgpio_pullup
+	beq gpcfg_spid_mosi,car_setgpio_pullup
+	beq gpcfg_spid_sdio,car_setgpio_pullup
+	beq gpcfg_iic_scl,car_setgpio_pullup
+	beq gpcfg_iic_sda,car_setgpio_pullup
+	beq gpcfg_input,car_setgpio_pullup
+car_setgpio_loop_end:
+	loop car_setgpio_loop
+	call car_motor_setgpio
+	rtn
+car_setgpio_pullup:
+	setarg gpcfg_pullup
+	istore 1,contw
+	branch car_setgpio_loop_end
+car_setgpio_pulldown:
+	setarg gpcfg_pulldown
+	istore 1,contw	
+	branch car_setgpio_loop_end
+car_motor_setgpio:	
+	fetch 1,mem_car_motor_gpio_num
+	copy pdata,loopcnt
+	arg mem_car_motor_gpio_map,contr
+car_motor_setgpio_loop:
+	ifetch 1,contr
+	set1 7,pdata
+	 arg gpcfg_output_low,temp
+	 call gpio_config_function
+	 loop car_motor_setgpio_loop
+	 rtn
+	 
+car_key_scan_process:
+	branch keyscan_key_process
+
+car_scale_process_idle:
+	call car_le_send_packet
+	call car_g24_status_process
+	branch car_key_scan_process
+
+car_g24_status_process:
+	fetch 2,mem_ui_state_map
+	rtnbit1 UI_STATE_BLE_CONNECTED
+	fetch 1,mem_car_24g_received_pac
+	beq WORK_PAIRED,car_g24_connected_event
+	rtn
+car_g24_connected_event:
+	fetch 1,mem_car_24g_status
+	rtneq WORK_PAIRED
+	jam WORK_PAIRED,mem_car_24g_status
+	call car_lpm_timer_disable
+	call car_stop_blink
+	branch car_g24_connected
+
+car_lpm_timer_enable:
+	fetch 2,mem_car_enter_lpm_timer_count	
+	store 2,mem_car_enter_lpm_timer
+	jam 0,mem_car_enter_lpm_flag
+	rtn
+
+	
+car_lpm_timer_disable:
+	setarg 0
+	branch car_lpm_timer_enable+1
+
+
+car_stop_blink:
+	arg 0,rega
+	branch ui_led_blink_stop_global
+	
+	
+car_start_blink:
+	arg 0,rega
+	branch ui_led_blink_start_global
+	
+
+
+
+
+car_le_send_packet:
+	fetch 2,mem_ui_state_map
+	rtnbit0 UI_STATE_BLE_CONNECTED
+	call le_fifo_check_nearly_full
+	nrtn blank
+	arg mem_car_pop_queue_buff,rega
+	call queue_pop
+	nrtn user
+	arg mem_car_pop_queue_buff,contr
+	branch le_send_notify_from_list
+ 
+car_scale_process_bb_event:
+	copy regc,pdata
+	beq BT_EVT_BUTTON_UP,app_event_button_up
+	beq BT_EVT_BUTTON_LONG_PRESSED,app_button_long_pressed
+	beq BT_EVT_LE_CONNECTED,car_scale_event_le_conn
+	beq BT_EVT_LE_DISCONNECTED,car_scale_event_le_discon
+	rtn
+
+car_scale_event_le_conn:
+	call car_lpm_timer_disable
+	call car_stop_blink
+	set0 mark_24g_rxmode,mark
+	branch car_scale_process_conn
+car_g24_connected:
+	fetch 2,mem_car_24g_no_data_timeout_count
+	store 2,mem_car_24g_no_data_timeout_timer
+car_scale_process_conn:
+	jam 0x14,mem_car_notify_vdd_timer
+	jam 0,mem_lpm_mode
+	call app_ble_stop_adv
+	branch app_lpm_mult_enable
+
+
+car_scale_event_le_discon:
+	set1 mark_24g_rxmode,mark
+	call car_lpm_timer_enable
+	call car_fb_motor_stop
+	call car_lr_motor_stop
+car_g24_disconnect:
+	setarg 0
+	store 5,mem_car_led_control
+	/*setarg 4
+	call pwm_disable
+	setarg 5
+	call pwm_disable
+	setarg 20
+	call pwm_disable
+	setarg 21
+	call pwm_disable
+	setarg 22
+	call pwm_disable
+	setarg 7
+	call pwm_disable*/
+	call queue_init
+	jam 10,mem_motor1_speed
+	jam 10,mem_motor2_speed
+	jam 10,mem_motor3_speed
+//	jam 1,mem_lpm_mode
+	jam 2,mem_lpm_mult
+	setarg FAST_ADV_INTERVAL_VALUE_CAR
+	call shutter_ble_adv_interval_set
+	branch app_ble_start_adv
+
+car_le_bb_event_timer:
+	call car_moto1_blank_data_timer
+	call car_moto2_blank_data_timer
+	call car_moto3_blank_data_timer
+	//call app_power_timer
+	//call car_notify_vdd_timer
+	call car_24g_no_data_timeout_timer
+	branch car_24g_bind_enable_timer
+	//branch car_enter_lpm_timer
+
+car_24g_bind_enable_timer:
+	arg mem_car_24g_bind_enable_delay_count,regc
+	arg 0,regb
+	branch timer_single_step
+
+car_enter_lpm_timer:
+	arg mem_car_enter_lpm_timer,regc
+	arg car_enter_lpm_enable,regb
+	branch timer_single_step_2B
+car_enter_lpm_enable:
+	jam 1,mem_car_enter_lpm_flag
+	rtn
+	
+car_24g_no_data_timeout_timer:
+	arg mem_car_24g_no_data_timeout_timer,regc
+	arg car_24g_no_data_timer_timeout,regb
+	branch timer_single_step_2B
+car_24g_no_data_timer_timeout:
+	jam WORK_SEARCH,mem_car_24g_status
+	jam POWER_ON,mem_car_24g_received_pac
+	branch car_g24_disconnect
+
+car_notify_vdd_timer:
+	fetch 1,mem_car_config_bat_notify_enable
+	rtn blank
+	arg mem_car_notify_vdd_timer,regc
+	arg car_notify_vdd,regb
+	branch timer_single_step
+car_notify_vdd:
+	fetch 1,mem_car_notify_vdd_count
+	store 1,mem_car_notify_vdd_timer
+ 	fetch 1,mem_car_working_flag
+ 	nrtn blank
+car_read_hvin:
+	call vdd_calculate_by_mode
+	store 2,mem_vdd_now_vol
+	arg mem_vdd_calculate_set,rega
+	call adc_bat_percent_lowpower_out
+	fetcht 1,mem_car_notify_vdd_value_last
+	isub temp,null
+	branch car_notify_vdd_next2,positive
+	store 1,mem_car_notify_vdd_value_last
+	copy pdata,temp
+car_notify_vdd_next2:
+	storet 1,mem_car_notify_vdd_percent
+	fetch 1,mem_car_config_low_voltage_percent
+	isub temp,null
+	call car_enter_low_bat,positive
+	storet 1,mem_notify_bat_payload 
+	arg 6,loopcnt
+	arg mem_notify_bat_head,contr
+	call calc_check_sum_start
+	store 1,mem_notify_bat_check_sum
+	arg mem_notify_bat_packet,rega
+	branch queue_push
+car_enter_low_bat:
+	fetch 1,mem_low_bat_flag
+	nrtn blank
+	jam 1,mem_low_bat_flag
+	arg 1,rega
+	branch ui_led_blink_start_global
+car_low_bat_led_off:
+	arg 1,rega
+	branch ui_led_blink_stop_global
+
+////////////////////////check sum////////////////////////
+//loopcnt = sum number,contr = ptr
+calc_check_sum_start:
+	arg 0,rega
+calc_check_sum_loop:
+	ifetch 1,contr
+	iadd rega,rega
+	loop calc_check_sum_loop
+calc_check_sum_and:
+	and rega,0xff,pdata
+	rtn
+
+car_le_receive_data:	
+	fetch 1,mem_le_att_opcode
+	beq ATTOP_WRITE_REQUEST,car_le_parse_att_write_request
+	rtn
+car_le_parse_att_write_request:
+	fetch 2,mem_le_att_handle
+	beq ATT_CAR_CONTROL_HANDLE,car_control_le_receive
+	rtn
+
+/*
+*	typedef struct
+*	{
+*		2byte	packet_head				(mem_app_receive_temp)
+*		1byte	packet_cmd				(mem_app_receive_temp+2)
+*		2byte	packet_payload_length	(mem_app_receive_temp+3)
+*		10byte	packet_payload			(mem_app_receive_temp+5)
+*		1byte	packet_check_sum		(mem_app_receive_temp+15)
+*	}
+*/
+le_app_receive_data:
+	bpatch patch05_6,mem_patch05
+	ifetch 5,rega
+	store 5,mem_app_receive_temp
+	fetch 2,mem_app_receive_temp
+	arg LE_RECEIVE_PACKET_HEAD,temp
+	isub temp,null
+	nrtn zero
+	fetch 2,mem_app_receive_temp+3
+	byteswap pdata,pdata
+	store 2,mem_app_receive_temp+3
+	copy pdata,loopcnt
+	increase 5,rega
+	copy rega,contr
+	arg mem_app_receive_temp+5,contw
+	call memcpy
+	ifetch 1,contr
+	store 1,mem_app_receive_temp+15
+	arg mem_app_receive_temp+2,rega
+	arg mem_app_receive_temp+5,regb
+	rtn
+
+car_control_le_receive:
+	setarg 0
+	store 5,mem_le_receive_payload
+	store 5,mem_le_receive_payload+5
+	call le_app_receive_data
+	copy regb,contr
+	arg mem_le_receive_payload,contw
+	arg 10,loopcnt
+	call memcpy
+car_receive_cmd_select:
+	bpatch patch05_7,mem_patch05
+	ifetch 1,rega
+	beq CAR_CMD_OLD_CAR_CONTROL,car_drive_old
+	beq CAR_CMD_OLD_SPEED_CONTROL,car_speed_set_old
+	beq CAR_CMD_L_R_MOTOR_CONTROL,car_motor_control
+	beq CAR_CMD_F_B_MOTOR_CONTROL,car_motor_control
+	beq CAR_CMD_IR_CONTROL,car_ir_data_rx_from_app
+	beq CAR_CMD_LED_CONTROL,car_led_control_receive
+	beq CAR_CMD_DEVICE_INFO,car_info_request
+	rtn
+
+car_24g_receive_data:
+	call car_control_le_receive
+	fetch 1,mem_app_receive_temp+2	//cmd
+	beq CAR_CMD_L_R_MOTOR_CONTROL,car_24g_receive_data_next
+	beq CAR_CMD_F_B_MOTOR_CONTROL,car_24g_receive_data_next
+	rtn
+car_24g_receive_data_next:
+	fetch 1,mem_le_receive_payload	//moto1
+	ncall car_moto1_enable_blank_data_timer,blank
+	fetch 1,mem_le_receive_payload+2	//moto2
+	ncall car_moto2_enable_blank_data_timer,blank
+	fetch 1,mem_le_receive_payload+4	//moto3
+	ncall car_moto3_enable_blank_data_timer,blank
+	rtn
+
+car_moto1_enable_blank_data_timer:
+	jam 5,mem_car_moto1_blank_timer
+	rtn
+car_moto2_enable_blank_data_timer:
+	jam 5,mem_car_moto2_blank_timer
+	rtn
+car_moto3_enable_blank_data_timer:
+	jam 5,mem_car_moto3_blank_timer
+	rtn
+
+car_moto1_blank_data_timer:
+	arg mem_car_moto1_blank_timer,regc
+	arg car_moto1_blank_data,regb
+	branch timer_single_step
+car_moto2_blank_data_timer:	
+	arg mem_car_moto2_blank_timer,regc
+	arg car_moto2_blank_data,regb
+	branch timer_single_step
+car_moto3_blank_data_timer:		
+	arg mem_car_moto3_blank_timer,regc
+	arg car_moto3_blank_data,regb
+	branch timer_single_step
+
+car_moto1_blank_data:
+	jam 0,mem_le_receive_payload
+	branch car_motor_control
+car_moto2_blank_data:
+	jam 0,mem_le_receive_payload+2
+	branch car_motor_control
+car_moto3_blank_data:
+	jam 0,mem_le_receive_payload+4
+	branch car_motor_control
+	
+	
+///////////////////////Motor//////////////////////////////////////////
+
+car_drive_old:	
+	fetch 1,mem_le_receive_payload
+	store 1,mem_motor1_status
+	fetch 1,mem_le_receive_payload+1
+	store 1,mem_motor2_status
+	branch car_motor_control_common
+
+
+	
+car_left_right_control_old:
+	fetch 1,mem_le_receive_payload
+	store 1,mem_motor2_status
+	branch car_motor2_control
+car_front_back_control_old:
+	fetch 1,mem_motor1_speed
+	call car_reset_old_speed
+	fetch 1,mem_le_receive_payload+1
+	store 1,mem_motor1_status
+	branch car_motor1_control
+car_reset_old_speed:
+	beq SPEED_LEVEL_2,car_reset_old_speed2
+	beq SPEED_LEVEL_3,car_reset_old_speed3
+	store 1,mem_motor1_speed
+	rtn
+car_reset_old_speed2:
+	jam SPEED_LEVEL_5,mem_motor1_speed
+	rtn
+car_reset_old_speed3:
+	jam SPEED_LEVEL_10,mem_motor1_speed
+	rtn
+car_speed_set_old:
+	fetch 1,mem_le_receive_payload
+	call car_reset_old_speed
+	fetch 1,mem_motor1_speed
+	call car_motor_speed_duty_setting
+	call car_motor_speed_duty_transform
+	jam 0x00,mem_pdatatemp+1	//pwm channel0
+	branch pwm_duty_cycle_set
+
+car_motor_control:
+	fetch 1,mem_car_24g_go_die_flag
+	nrtn blank
+	fetch 6,mem_le_receive_payload
+	store 6,mem_motor1_status
+	fetch 1,mem_motor1_speed
+	fetcht 1,mem_motor2_speed
+	iand temp,pdata
+	fetcht 1,mem_motor3_speed
+	iand temp,pdata
+	call car_motor_working_flag,blank	
+car_motor_control_common:
+	bpatch patch06_0,mem_patch06
+	fetch 2,mem_ui_state_map
+	isolate1 UI_STATE_BLE_CONNECTED,pdata
+	ncall car_lpm_timer_enable,true
+	call car_motor1_control
+	call car_motor2_control
+	branch car_conn_led_state
+
+car_conn_led_state:
+	fetch 1,mem_motor1_status
+	fetcht 1,mem_motor2_status
+	iadd temp,pdata
+	nbranch check_51cmd_led_on,blank
+	branch check_51cmd_led_off	
+
+car_motor1_control:
+	arg mem_motor1_status,contr
+	branch car_motor1_status_select
+car_motor2_control:
+	arg mem_motor2_status,contr
+	branch car_motor2_status_select
+car_motor3_control:
+	arg mem_motor3_status,contr
+	branch car_motor_status_select
+car_motor_working_flag:
+	jam 0,mem_car_working_flag
+	rtn
+
+car_motor1_status_select:
+	ifetch 1,contr
+	beq TURN_FRONT,car_lr_motor_stop
+	beq TURN_LEFT,car_lr_motor_left
+	beq TURN_RIGHT,car_lr_motor_right
+	rtn
+car_motor2_status_select:
+	ifetch 1,contr
+	beq MOTOR_STOP,car_fb_motor_stop
+	beq GO_BACK,car_fb_motor_front
+	beq GO_FRONT,car_fb_motor_back
+	rtn
+
+car_lr_motor_stop:
+	fetcht 1,mem_car_motor_left_gpio
+	call gpio_out_inactive
+	fetcht 1,mem_car_motor_right_gpio
+	branch gpio_out_inactive
+car_lr_motor_left:
+	fetcht 1,mem_car_motor_left_gpio
+	call gpio_out_active
+	fetcht 1,mem_car_motor_right_gpio
+	branch gpio_out_inactive
+car_lr_motor_right:
+	fetcht 1,mem_car_motor_left_gpio
+	call gpio_out_inactive
+	fetcht 1,mem_car_motor_right_gpio
+	branch gpio_out_active
+car_fb_motor_stop:
+	fetcht 1,mem_car_motor_front_gpio
+	call gpio_out_inactive
+	fetcht 1,mem_car_motor_back_gpio
+	branch gpio_out_inactive
+car_fb_motor_front:
+	fetcht 1,mem_car_motor_front_gpio
+	call gpio_out_active
+	fetcht 1,mem_car_motor_back_gpio
+	branch gpio_out_inactive
+car_fb_motor_back:
+	fetcht 1,mem_car_motor_front_gpio
+	call gpio_out_inactive
+	fetcht 1,mem_car_motor_back_gpio
+	branch gpio_out_active
+
+	
+
+
+car_motor_status_select:
+	bpatch patch06_1,mem_patch06
+	ifetch 1,contr
+	beq MOTOR_STOP,car_motor_stop
+	beq GO_FRONT,car_motor_positive
+	beq GO_BACK,car_motor_negative
+	rtn
+car_motor_positive:
+	jam 0,mem_motor_select_p_n
+	branch car_motor_negative+1
+car_motor_negative:
+	jam 1,mem_motor_select_p_n
+	ifetch 1,contr
+	store 1,mem_car_motor_speed
+	ifetch 8,regb
+	branch car_motor_work
+
+car_motor_stop:
+	ifetch 1,regb
+	call pwm_disable
+	increase 1,regb
+	ifetch 1,regb
+	branch pwm_disable
+car_motor_work:
+	store 8,mem_motor_pwm_pin1_set
+	jam 1,mem_car_working_flag
+	fetch 1,mem_motor_select_p_n
+	beq 0,car_motor_select_positive
+car_motor_select_negative:
+	fetch 1,mem_motor_pwm_pin2_set
+	store 1,mem_motor_pwm_pin_set
+	fetch 1,mem_motor_pwm_pin1_set
+car_motor_work_next:
+	call pwm_disable
+	fetch 1,mem_car_motor_speed
+	call car_motor_speed_duty_setting
+	store 1,mem_motor_pwm_dute_set
+	fetch 6,mem_motor_pwm_pin_set
+	store 6,mem_pdatatemp
+	branch pwm_out_set
+car_motor_select_positive:
+	fetch 1,mem_motor_pwm_pin1_set
+	store 1,mem_motor_pwm_pin_set
+	fetch 1,mem_motor_pwm_pin2_set
+	branch car_motor_work_next
+
+car_motor_speed_duty_setting:
+	mul32 pdata,5,pdata
+	add pdata,50,pdata
+	rtn
+car_motor_speed_duty_transform:
+	arg 12000,temp
+	imul32 temp,pdata
+	div pdata,100
+	call wait_div_end
+	quotient temp
+	copy temp,rega
+	setarg 12000
+	isub temp,regb
+	rtn
+
+car_ir_data_rx_from_app:
+	rtn
+
+car_led_control_receive:
+	fetch 8,mem_le_receive_payload
+	store 8,mem_car_led_control
+	rtn
+
+car_info_request:
+	fetch 1,mem_car_config_device_select
+	store 1,mem_car_info_request_payload
+	fetch 1,mem_car_config_motor_layout
+	store 1,mem_car_info_request_payload+1
+	fetch 1,mem_car_config_ir_enable
+	store 1,mem_car_info_request_payload+2
+	arg 13,loopcnt
+	arg mem_car_info_request_head,contr
+	call calc_check_sum_start
+	store 1,mem_car_info_request_checksum
+	arg mem_car_info_request,rega
+	branch queue_push
+
+
+/************************************G24 CAR RX FUNC START**************************************/
+car_g24_init:
+	setarg 0
+	store 8,mem_24g_bind_payload
+	call g24_receive_init
+	branch g24_mode_switch_init
+
+car_g24_receive_process:
+	call car_g24_mode_switch
+	call car_g24_work_mode
+	call car_g24_bind_mode
+	branch car_g24_lpm_dipatch
+
+car_g24_mode_switch:
+	call g24_mode_switch_bind_work
+car_g24_bind_mode_enable:
+	fetch 1,mem_24g_work_mode
+	rtnne DONGLE_BIND
+	fetch 1,mem_car_24g_bind_enable_delay_count	//after power on 10s,enable bind
+	nbranch g24_switch_work_mode,blank
+	fetch 1,mem_car_24g_status	//after paired,disable bind mode
+	beq WORK_SEARCH,g24_switch_work_mode
+	rtn
+
+car_g24_work_mode:
+	fetch 1,mem_24g_work_mode
+	rtnne DONGLE_WORK
+	call car_g24_work_mode_start
+	branch car_g24_ch_polling_clear,user3
+car_g24_receive_ch_polling:
+	fetch 1,mem_car_enter_lpm_flag
+	rtn blank
+	fetch 1,mem_car_24g_ch_polling
+	increase 1,pdata
+	store 1,mem_car_24g_ch_polling
+	beq 4,car_g24_ch_polling_clear
+	call g24_ch
+	call car_g24_receive_packet_start
+	nbranch car_g24_receive_ch_polling,user3
+car_g24_ch_polling_clear:
+	jam 0,mem_car_24g_ch_polling
+	rtn
+car_g24_work_mode_start:
+	fetch 1,mem_24g_work_mode
+	rtnne DONGLE_WORK
+	call car_g24_work_init
+	call g24_ch_process
+	branch car_g24_receive_packet_start
+car_g24_work_init:
+	fetch 1,mem_24g_mode_init
+	rtnbit1 DONGLE_WORK
+	set1 DONGLE_WORK,pdata
+	store 1,mem_24g_mode_init
+	fetch 1,mem_tx_power_temp
+	store 1,mem_tx_power
+	jam 0,mem_24g_ackpayload_enable
+	jam 0,mem_usb_tx_enable
+	jam 1,mem_24g_abort_packet
+	jam 0,mem_24g_pid
+	//fetch 4,mem_lap
+	fetch 4,mem_car_24g_commom_addr
+	branch g24_work_init+11
+car_g24_receive_packet_start:	
+	call g24_receive_transmit_ack
+	nbranch g24_rx_interrupt_clear,user3
+p_g24_receive_packet_parse:
+	call g24_receive_packet_parse_pid_crc
+	nbranch g24_rx_interrupt_clear,user
+	fetch 1,mem_24g_rxdata_length
+	branch g24_rx_interrupt_clear,blank
+	increase 2,pdata
+	iforce loopcnt
+	arg mem_24g_rxbuf,contr
+	arg mem_24g_rxdata_temp,contw
+	call memcpy
+	jam 0,mem_24g_mode_switch
+	fetch 1,mem_24g_pair_mode
+	call g24_enable_nodata_timer,blank
+	fetch 1,mem_24g_rxdata_temp+2
+	beq DATATYPE_ATTEMP,car_g24_data_attemp	//reconn packet
+	beq DATATYPE_DEVICE1,car_g24_data_device1	//mouse
+	branch g24_receive_packet_parse+14
+car_g24_data_attemp:
+	call check_51cmd_led_on
+	branch g24_data_attemp	
+car_g24_data_device1:
+	call g24_ch_timer_reinit
+	fetch 1,mem_24g_abort_packet
+	fetcht 1,mem_24g_rxdata_temp
+	isolate1 bit_abort,temp
+	setflag true,0,pdata
+	store 1,mem_24g_abort_packet
+	beq 1,car_g24_data_attemp_device1_abort
+	branch g24_data_device1+7
+car_g24_data_attemp_device1_abort:
+	fetch 1,mem_device_option
+	sub pdata,dvc_op_car,null
+	call check_51cmd_led_on,zero
+	fetch 4,mem_24g_rxdata_temp+10
+	branch g24_store_device1_addr
+	
+car_g24_bind_mode:
+	fetch 1,mem_24g_work_mode
+	rtnne DONGLE_BIND
+	call g24_bind_init
+	call car_g24_bind_device_addr
+	call g24_bind_data_process
+	fetch 1,mem_24g_bind_device_status
+	nbranch car_g24_bind_mode_exit,blank
+	call g24_nodata_process
+	fetch 1,mem_24g_nodata_timer_enable
+	rtn blank
+	setarg 0
+	store 4,mem_24g_device1_addr
+	rtn
+car_g24_bind_mode_exit:
+	jam 0,mem_24g_mode_switch
+	arg 0,rega
+	call check_51cmd_led_on
+	call g24_switch_work_mode
+	call g24_timer_init
+
+        fetch 4,mem_24g_lap
+        store 4,mem_car_24g_commom_addr
+        fetch 1,mem_car_save_addr_flag
+        ncall car_g24_save_commom_addr,blank
+		
+	fetch 4,mem_car_24g_commom_addr
+	branch g24_update_addr_and_synccrc8
+
+car_g24_save_commom_addr:
+
+        fetch 1,mem_car_save_addr_flag
+        rtn blank
+	fetch 1,mem_24g_transmitter_addr+1	//Tx lap H
+	store 1,mem_car_24g_commom_addr+3
+
+	fetch 1,mem_24g_lap+1				//Rx lap H
+	store 1,mem_car_24g_commom_addr+2
+
+	fetch 1,mem_24g_transmitter_addr	//Tx lap L
+	store 1,mem_car_24g_commom_addr+1
+
+	fetch 1,mem_24g_lap					//Rx lap L
+	store 1,mem_car_24g_commom_addr
+ifdef CAR_TEST_FUNCTION
+        rtn
+endif // CAR_TEST_FUNCTION  	
+	call car_g24_search_commom_addr
+	fetch 4,mem_car_24g_commom_addr
+	fetcht 4,mem_car_24g_commom_addr_temp 
+	isub temp,null
+	rtn zero        
+        copy regc,pdata
+        arg mem_car_24g_commom_addr,rega
+        arg 4,loopcnt        
+        call otp_write
+        rtn
+car_g24_load_commom_addr:
+
+        fetch 4,mem_24g_lap
+        store 4,mem_car_24g_commom_addr
+        fetch 1,mem_car_save_addr_flag
+        rtn blank
+ifdef CAR_TEST_FUNCTION
+        rtn
+endif // CAR_TEST_FUNCTION         
+        call car_g24_search_commom_addr
+        fetch 4,mem_car_24g_commom_addr_temp
+        rtn blank
+        store 4,mem_car_24g_commom_addr
+        rtn
+
+/* regc=otp start address and output */        
+car_g24_search_commom_addr:
+ifdef CAR_TEST_FUNCTION
+        rtn
+endif // CAR_TEST_FUNCTION 
+        fetch 1,mem_car_save_addr_flag
+        rtn blank
+        arg OTP_OFFSET_CAR_COMMOM_START_ADDR,regc
+car_g24_search_commom_addr_loop:
+        copy regc,pdata
+        arg mem_car_24g_commom_addr_temp,rega
+        arg 4,temp
+        call otpd_read_data_with_pwr_operation
+        fetch 4,mem_car_24g_commom_addr_read
+        rtn blank    
+        store 4,mem_car_24g_commom_addr_temp
+        copy regc,pdata
+        arg OTP_OFFSET_CAR_COMMOM_END_ADDR,temp
+        isub temp,null
+        rtn positive        
+        increase 4,regc
+        branch car_g24_search_commom_addr_loop
+        
+car_g24_bind_device_addr:
+	fetch 4,mem_24g_device1_addr
+	rtn blank
+	branch g24_update_addr_and_synccrc8
+
+car_g24_cb_data_device1:
+	fetch 2,mem_ui_state_map
+	rtnbit1 UI_STATE_BLE_CONNECTED
+	fetch 2,mem_car_24g_no_data_timeout_count
+	store 2,mem_car_24g_no_data_timeout_timer
+	jam WORK_PAIRED,mem_car_24g_received_pac
+	arg mem_24g_rxdata_temp+3,rega
+	branch car_24g_receive_data
+
+car_g24_lpm_dipatch:
+	fetch 1,mem_car_enter_lpm_flag
+	rtn blank
+	call car_g24_lpm_wait
+	nrtn user
+	fetch 3,mem_24g_enter_hibernate	//about 1000ms
+	call clk2lpo
+	storet 4,mem_sleep_counter
+  	branch lpm_sleep
+car_g24_lpm_wait:
+	enable user
+	call lpo_calibration
+	fetch 3,mem_clks_per_lpo
+	branch disable_user,blank
+	branch car_le_process_lpm_before
+
+endif
+
+
+
Index: program/app_car_remote.prog
===================================================================
--- /branch/usb/usb_public_base/program/app_car_remote.prog	(revision 0)
+++ /branch/usb/usb_public_base/program/app_car_remote.prog	(working copy)
@@ -0,0 +1,467 @@
+ifdef COMPILE_REMOTE_CAR
+//define REMOTE_TEST_FUNCTION
+remote_car_init:
+	rtn wake	
+	call remote_car_default_init
+	call keyscan_key_init
+	setarg remote_car_g24_package_data
+	store 2,mem_cb_24g_transmit_data
+
+	setarg remote_car_process_lpm_before
+	store 2,mem_cb_24g_lpm_before
+	
+	setarg remote_car_le_before_hibernate
+	store 2,mem_cb_before_hibernate
+	
+	setarg remote_car_scale_process_idle
+	store 2,mem_cb_idle_process	
+	
+	setarg remote_car_scale_process_bb_event
+	store 2,mem_cb_bb_event_process
+
+	setarg remote_car_event_timer
+	store 2,mem_cb_event_timer
+	
+	setarg remote_car_power_off_signal
+	store 2,mem_remote_car_power_off_cb
+	
+	setarg remote_car_soft_switch_power_on_signal
+	store 2,mem_remote_car_power_standby_cb
+	
+	
+	bpatch patch06_2,mem_patch06
+	call set_eeprom_size_2k
+	call remote_car_init_environment
+
+	call queue_init
+	fetch 1,mem_remote_car_config_soft_switch_enable
+	store 1,mem_remote_car_hard_soft_switch
+	beq HARD_SWITCH, remote_car_hard_switch_power_on_signal
+	fetch 1,mem_remote_car_config_soft_switch_gpio
+	store 1,mem_ui_button_gpio
+remote_car_soft_switch_power_on_init:
+	call remote_car_ui_led_init
+	call ui_button_init
+	call ui_button_polling
+	jam POWER_STARTING,mem_remote_car_power_state
+	fetch 2,mem_ui_state_map
+	rtnbit1 UI_STATE_BTN_DOWN
+	branch app_enter_hibernate
+
+
+
+remote_car_hard_switch_power_on_signal:
+	jam POWER_STANDBY,mem_remote_car_power_state
+remote_car_soft_switch_power_on_signal:
+	call remote_car_ui_led_init
+	arg 0,rega
+	call ui_led_blink_start_global
+ifdef REMOTE_TEST_FUNCTION	
+	branch g24_pair_start
+endif //REMOTE_TEST_FUNCTION	
+	call remote_car_g24_load_commom_addr
+	fetch 4,mem_remote_24g_commom_addr
+	store 4,mem_24g_addr	
+	branch g24_pair_start,blank
+	fetch 4,mem_24g_addr
+	store 4,mem_24g_receiver_addr
+	fetch 2,mem_24g_reconn_timeout_init
+	store 2,mem_24g_reconn_timeout
+	branch g24_reconn_start
+
+remote_car_set_24g_addr_eeprom:
+	arg 4,temp
+	arg mem_24g_addr,rega
+	arg REMOTE_INFO_EEPROM_OFFECT,regb
+	rtn
+
+
+remote_car_power_off_signal:	
+remote_car_ui_led_init:
+	bpatch patch06_3,mem_patch06
+	fetch 1,mem_remote_car_config_connect_led_gpio
+	bne INVALID_PIN_NUM,remote_car_pairing_led_gpio_set
+remote_car_ui_led_init_1:
+	fetcht 1, mem_remote_car_led_map
+	branch gpio_config_output
+remote_car_pairing_led_gpio_set:
+	store 1,mem_remote_car_led_map
+	branch remote_car_ui_led_init_1
+
+
+remote_car_init_environment:
+	call g24_transmit_init
+remote_no_data_timer_init:
+	fetch 2,mem_remote_car_no_data_timeout
+	store 2,mem_remote_car_no_data_timer
+	rtn
+
+remote_car_le_before_hibernate:
+	call remote_car_process_lpm_before
+remote_gpio_set_before_hibernate:
+	fetch 1,mem_remote_style_struct_led_gpio
+	set1 7,pdata
+	arg gpcfg_output_high,temp
+	branch gpio_config_function
+
+remote_car_process_lpm_before:
+	call gpio_set_before_lpm
+	branch keyscan_process_lpm_before
+
+remote_car_key_scan_process:
+	call keyscan_key_process
+	call get_remote_key_state
+	call remote_conn_led_state
+	branch send_data
+
+remote_conn_led_state:
+	fetch 1,mem_remote_car_24g_status
+	rtnne WORK_PAIRED
+	fetch 4,mem_remote_car_motor1_key0_press_state
+	branch remote_car_stop_state,blank
+	jam 0,mem_remote_car_no_data_check
+	enable user
+	branch check_51cmd_led_on
+remote_car_stop_state:
+	fetch 1,mem_remote_car_no_data_check
+	rtneq 0xff
+	pincrease 1
+	store 1,mem_remote_car_no_data_check
+	disable user
+	branch check_51cmd_led_off
+
+	
+get_remote_key_state:
+	fetcht 2,mem_key_value_retention
+	and temp,0x01,pdata
+	rshift temp,temp
+	store 1,mem_remote_car_motor1_key0_press_state
+	and temp,0x01,pdata
+	rshift temp,temp
+	store 1,mem_remote_car_motor1_key1_press_state
+	and temp,0x01,pdata
+	rshift temp,temp
+	store 1,mem_remote_car_motor2_key2_press_state
+	and temp,0x01,pdata
+	rshift temp,temp
+	store 1,mem_remote_car_motor2_key3_press_state
+	rtn
+send_data:
+	bpatch patch06_4,mem_patch06
+	call remote_car_fb_check
+	call remote_car_lr_check
+	call remote_car_no_data_timeout_check
+	nrtn user
+	branch remote_car_send_key 
+
+
+remote_car_no_data_timeout_check:
+	fetch 1,mem_remote_car_24g_status
+	rtnne WORK_PAIRED
+	fetch 1,mem_remote_car_no_data_check
+	rtn blank
+	sub pdata,1,null
+	nrtn positive
+	fetch 2,mem_24g_reconn_timeout_init
+	store 2,mem_24g_reconn_timeout
+	enable user
+	rtn
+
+
+	
+remote_car_fb_check:
+	fetch 1,mem_remote_car_motor1_key0_press_state
+	nbranch remote_car_send_motor1_key0_press,blank
+	fetch 1,mem_remote_car_motor1_key1_press_state
+	nbranch remote_car_send_motor1_key1_press,blank
+	branch remote_car_send_motor1_key0_rel
+	
+remote_car_lr_check:
+	fetch 1,mem_remote_car_motor2_key2_press_state
+	nbranch remote_car_send_motor2_key2_press,blank
+	fetch 1,mem_remote_car_motor2_key3_press_state
+	nbranch remote_car_send_motor2_key3_press,blank
+	branch remote_car_send_motor2_key2_rel
+
+
+remote_car_scale_process_idle:
+	call remote_car_24g_status_process
+	branch remote_car_key_scan_process
+
+remote_car_scale_process_bb_event:
+	copy regc,pdata
+	beq BT_EVT_BUTTON_UP,app_event_button_up
+	beq BT_EVT_BUTTON_LONG_PRESSED,app_button_long_pressed
+	beq BT_EVT_24G_PAIRING_COMPLETE,remote_car_24g_pairing_complete
+	beq BT_EVT_24G_ATTEMPT_SUCCESS,remote_car_24g_attempt_success
+	beq BT_EVT_24G_ATTEMPT_FAIL,remote_car_24g_attempt_fail
+	rtn
+
+remote_car_24g_attempt_fail:
+	branch g24_txbuf_clear
+
+remote_car_24g_pairing_complete:
+	bpatch patch06_5,mem_patch06
+        fetch 4,mem_24g_receiver_addr
+        store 4,mem_remote_24g_commom_addr
+        fetch 1,mem_remote_save_addr_flag
+        ncall remote_car_g24_save_commom_addr,blank
+	fetch 4,mem_remote_24g_commom_addr
+	call g24_update_addr_and_synccrc8        
+	//call remote_car_set_24g_addr_eeprom
+	//call iicd_write_protect_eep_data
+remote_car_24g_attempt_success:
+	jam 0,mem_24g_conn_sm
+	jam WORK_PAIRED,mem_remote_car_24g_auto_work_step
+	jam WORK_PAIRED,mem_remote_car_24g_pair_success_flag
+	jam 0,mem_24g_reconn_timeout		
+	rtn
+remote_car_g24_save_commom_addr:
+    
+
+        fetch 1,mem_remote_save_addr_flag
+        rtn blank
+	fetch 1,mem_24g_lap+1				//Tx lap H
+	store 1,mem_remote_24g_commom_addr+3
+
+	fetch 1,mem_24g_receiver_addr+1		//Rx lap H
+	store 1,mem_remote_24g_commom_addr+2
+
+	fetch 1,mem_24g_lap					//Tx lap L
+	store 1,mem_remote_24g_commom_addr+1
+
+	fetch 1,mem_24g_receiver_addr		//Rx lap L
+	store 1,mem_remote_24g_commom_addr
+ifdef REMOTE_TEST_FUNCTION
+        rtn
+endif // REMOTE_TEST_FUNCTION 
+	call remote_car_g24_search_commom_addr
+	fetch 4,mem_remote_24g_commom_addr
+	fetcht 4,mem_remote_24g_commom_addr_temp 
+	isub temp,null
+	rtn zero	
+        copy regc,pdata
+        arg mem_remote_24g_commom_addr,rega
+        arg 4,loopcnt        
+        call otp_write
+        rtn
+remote_car_g24_load_commom_addr:
+ifdef REMOTE_TEST_FUNCTION
+        rtn
+endif // REMOTE_TEST_FUNCTION 
+        fetch 1,mem_remote_save_addr_flag
+        rtn blank
+        call remote_car_g24_search_commom_addr
+        fetch 4,mem_remote_24g_commom_addr_temp
+        rtn blank
+        store 4,mem_remote_24g_commom_addr  
+        rtn
+
+/* regc=otp start address and output */        
+remote_car_g24_search_commom_addr:
+ifdef REMOTE_TEST_FUNCTION
+        rtn
+endif // REMOTE_TEST_FUNCTION 
+        fetch 1,mem_remote_save_addr_flag
+        rtn blank       
+        arg OTP_OFFSET_REMOTE_COMMOM_START_ADDR,regc
+remote_car_g24_search_commom_addr_loop:
+        copy regc,pdata
+        arg mem_remote_24g_commom_addr_temp,rega
+        arg 4,temp
+        call otpd_read_data_with_pwr_operation
+        fetch 4,mem_remote_24g_commom_addr_read
+        rtn blank        
+        store 4,mem_remote_24g_commom_addr_temp
+        copy regc,pdata
+        arg OTP_OFFSET_REMOTE_COMMOM_END_ADDR,temp
+        isub temp,null
+        rtn positive        
+        increase 4,regc
+        branch remote_car_g24_search_commom_addr_loop
+        
+remote_car_24g_status_process:
+	fetch 1,mem_remote_car_24g_auto_work_step
+	rtneq POWER_ON
+	fetch 1,mem_remote_car_24g_status
+	rtneq WORK_PAIRED
+	jam WORK_PAIRED,mem_remote_car_24g_status
+remote_car_scale_process_paired:
+	arg 0,rega
+	branch ui_led_off_global
+remote_car_scale_process_shutdown:
+	arg 0,rega
+	call ui_led_off_global
+	call remote_car_ui_led_init
+	branch app_enter_hibernate
+	
+remote_car_event_timer:
+	call app_power_timer
+	call g24_pair_timeout_timer
+	call g24_reconn_timeout_timer	
+	branch remote_car_no_data_timer
+
+remote_car_no_data_timer:
+	fetch 1,mem_remote_car_config_timeout_shutdown_enable
+	rtn blank
+	fetch 1,mem_key_value_retention
+	nbranch remote_no_data_timer_init,blank
+	arg mem_remote_car_no_data_timer,regc
+	arg remote_car_scale_process_shutdown,regb
+	branch timer_single_step_2B
+
+
+//cross key,control front-back motor layout
+remote_car_send_motor1_key0_press:	//front
+	jam MOTOR_POSITIVE,mem_remote_car_24g_motor1_payload
+	rtn
+remote_car_send_motor1_key1_press:	//back
+	jam MOTOR_NEGATIVE,mem_remote_car_24g_motor1_payload
+	rtn
+remote_car_send_motor2_key2_press:	//left
+	jam MOTOR_POSITIVE,mem_remote_car_24g_motor2_payload
+	rtn
+remote_car_send_motor2_key3_press:	//right
+	jam MOTOR_NEGATIVE,mem_remote_car_24g_motor2_payload
+	rtn
+
+
+remote_car_send_motor1_key0_rel:
+remote_car_send_motor1_key1_rel:
+	jam MOTOR_STOP,mem_remote_car_24g_motor1_payload
+	rtn
+remote_car_send_motor2_key2_rel:
+remote_car_send_motor2_key3_rel:
+	jam MOTOR_STOP,mem_remote_car_24g_motor2_payload
+	rtn
+	
+remote_car_send_key:
+	arg mem_remote_car_24g_motor_packet,rega
+	branch queue_push
+remote_car_send_attack:
+	arg mem_remote_car_24g_fire_packet,rega
+	branch queue_push
+
+remote_car_g24_package_data:
+	fetch 1,mem_remote_car_24g_pair_success_flag
+	beq WORK_PAIRED,remote_car_g24_send_empty
+	arg mem_remote_car_24g_tx_temp,rega
+	call queue_pop
+	nbranch remote_car_moto_data,user
+remote_car_g24_package_data_continue:
+	arg mem_remote_car_24g_tx_temp,contr
+	ifetch 1,contr
+	copy pdata,rega
+	arg mem_remote_car_24g_tx_temp+1,regb
+	//rega: length
+	//regb: tx buffer
+	rtn
+	
+remote_car_g24_send_empty:
+	jam 0,mem_remote_car_24g_pair_success_flag
+	enable user
+	arg 1,rega
+	arg mem_remote_car_empty_packet,regb
+	rtn
+	
+remote_car_moto_data:
+	fetch 1,mem_remote_car_24g_tx_temp+3	//cmd
+	beq CAR_CMD_L_R_MOTOR_CONTROL,remote_car_moto_data_next
+	beq CAR_CMD_F_B_MOTOR_CONTROL,remote_car_moto_data_next
+	rtn
+remote_car_moto_data_next:
+	fetch 1,mem_remote_car_24g_tx_temp+6	//data moto1
+	nbranch remote_car_moto_data_enable_user,blank
+	fetch 1,mem_remote_car_24g_tx_temp+8	//data moto2
+	nbranch remote_car_moto_data_enable_user,blank
+	fetch 1,mem_remote_car_24g_tx_temp+10	//data moto3
+	nbranch remote_car_moto_data_enable_user,blank
+	rtn
+remote_car_moto_data_enable_user:
+	enable user
+	branch remote_car_g24_package_data_continue
+
+
+
+/*************remote car default_init starting*********************/
+remote_car_default_init:
+	jam 0x14,mem_ui_button_timeout
+	jam 0x01,mem_ui_button_last_state
+	setarg 0x060f
+	store 2,mem_remote_car_queue_each_size
+	setarg mem_remote_car_queue_each_size
+	store 2,mem_queue_ptr
+	jam 0x01,mem_lpm_mode
+	jam 0x06,mem_lpm_overhead
+	jam 0x02,mem_lpm_mult_timeout
+	jam 0x00,mem_remote_car_hard_soft_switch
+	setarg mem_remote_style_led_type
+	store 2,mem_ui_led_struct_ptr
+	jam 0x01,mem_ui_led_struct_num
+	jam 0xff,mem_remote_style_blink_count
+	setarg 0x0296
+	store 2,mem_remote_style_on_time
+	setarg 0x073a
+	store 2,mem_remote_style_off_time
+	setarg mem_remote_car_soft_power
+	store 2,mem_power_param_ptr
+	setarg 0x0c0c
+	store 2,mem_remote_car_power_off_timeout
+	setarg mem_remote_car_keyscan
+	store 2,mem_keyscan_ptr
+	jam 0x00,mem_remote_car_config_soft_switch_enable
+	jam 0xff,mem_remote_car_config_connect_led_gpio
+	jam 0xff,mem_remote_car_config_soft_switch_gpio
+	jam 0x00,mem_remote_car_config_key_map
+	jam 0x00,mem_remote_car_config_layout
+	jam 0x00,mem_remote_car_config_check_way
+	jam 0x01,mem_remote_car_config_timeout_shutdown_enable
+	setarg 0x4e55
+	store 2,mem_current_vdd_value_default_mid_x
+	store 2,mem_current_vdd_value_default_mid_y
+	setarg 0x0007
+	store 2,mem_current_vdd_default_range
+	jam 0x02,mem_adc_config_flag
+	setsect 0,0x35a0c
+	setsect 1,0x11a
+	setsect 2,0x60
+	setsect 3,0x28
+	store 9,mem_remote_car_24g_motor_packet
+	setsect 0,0x2000a
+	setsect 1,0x02
+	istore 4,contw
+	setsect 0,0x35a08
+	setsect 1,0x19a
+	setsect 2,0x00
+	setsect 3,0x00
+	store 9,mem_remote_car_24g_fire_packet
+	setarg 0x0064
+	store 2,mem_remote_car_no_data_timeout
+	jam TX_POWER_0DB,mem_tx_power
+	jam 0x01,mem_24g_data_type		//24g init
+	jam 0x06,mem_24g_max_retry
+	jam 0x01,mem_24g_pair_switch
+	jam 0x00,mem_24g_fast_conn_enable
+	call g24_rx_window_init
+	call g24_interval_param_8ms
+	call g24_chmap_param_init
+
+	//call g24_pair_param_init
+	setarg 0x0708
+	store 2,mem_24g_pair_timeout_init
+	setarg 0x0050
+	store 2,mem_24g_reconn_timeout_init
+	setarg 0x0a7700
+	store 3,mem_24g_long_sleep_set
+	setarg 0x604800
+	store 3,mem_24g_enter_hibernate	
+	rtn
+
+/*************remote car default_init ending*********************/
+
+else
+remote_car_init:
+	rtn
+endif
+
+
Index: program/app_dongle.prog
===================================================================
--- /branch/usb/usb_public_base/program/app_dongle.prog	(revision 0)
+++ /branch/usb/usb_public_base/program/app_dongle.prog	(working copy)
@@ -0,0 +1,538 @@
+ifdef COMPILE_DONGLE
+
+dongle_init:
+	setarg dongle_dispatch
+	store 2,mem_cb_24g_receive_process
+	setarg dongle_g24_mouse
+	store 2,mem_cb_24g_data_device1
+	setarg dongle_g24_kb
+	store 2,mem_cb_24g_data_device2
+	setarg dongle_ackpayload_prep
+	store 2,mem_cb_24g_ackpayload
+	setarg dongle_usb_config
+	store 2,mem_cb_usb_config
+	branch usb_init
+
+
+dongle_default_init:
+	bpatchx patch30_0,mem_patch30
+	//sys init
+	call dongle_read_kb_bind_status
+	call dongle_xtal_select
+	fetch 1,mem_dg_sys_config
+	isolate1 DG_ENABLE_EEPROM,pdata
+	branch dongle_default_no_eeprom,true
+	fetch 1,mem_dg_sys_config
+	isolate1 DG_ENABLE_NEW_CHMAP,pdata
+	call g24_chamap_param_update,true
+dongle_default_no_eeprom:	
+	fetch 1,mem_dg_24g_tx_power_default
+	store 1,mem_tx_power
+	//24g init
+	jam 0xff,mem_rssi_buff_index
+	setarg mem_dg_rssi_noise_buffer
+	store 2,mem_rssi_noise_buffer_ptr
+	setarg mem_dg_rssi_noise_dg_buffer
+	store 2,mem_rssi_noise_self_buffer_ptr
+	setarg mem_dg_rssi_noise_ms_buffer
+	store 2,mem_rssi_noise_device1_buffer_ptr
+	setarg mem_dg_rssi_noise_kb_buffer
+	store 2,mem_rssi_noise_device2_buffer_ptr
+	jam TX_POWER_F5DB,mem_24g_pair_tx_power
+	jam 0,mem_dg_kb_bind_success
+	jam 0,mem_24g_bind_device_living
+	call g24_enable_1M
+	fetch 1,mem_dg_sys_config
+	isolate1 DG_ENABLE_24G_2M,pdata
+	call g24_enable_2M,true
+	call g24_receive_init
+	call g24_pair_param_init
+	call g24_chmap_param_init
+	//usb init
+	fetch 1,mem_dg_usb_tx_interval
+	store 1,mem_usb_tx_interval
+	fetch 9,mem_dg_usb_vid_pid
+	store 9,mem_usb_vid_pid
+	rtn
+	
+dongle_xtal_select:
+	jam XTAL_24M,mem_fcomp_div
+	fetch 1,mem_dg_sys_config
+	rtnbit0 DG_ENABLE_XTAL_24M
+	jam XTAL_16M,mem_fcomp_div
+	rtn
+
+dongle_dispatch:
+	fetch 1,mem_24g_pair_mode
+	beq 0x00,dongle_auto_bind
+	beq 0x01,dongle_pc_bind
+	beq 0x0f,dongle_all_powerful
+	rtn
+
+
+dongle_read_kb_bind_status:
+	bpatchx patch30_1,mem_patch30
+	setarg DONGLE_KB_BIND_EFUSE_OFFECT
+	arg mem_dg_kb_bind_flag,rega
+	arg 1,temp
+	branch otpd_read_data_with_pwr_operation
+
+dongle_write_kb_bind_status:
+	bpatchx patch30_2,mem_patch30
+	arg 1,loopcnt
+	arg mem_dg_kb_bind_flag,rega
+	arg DONGLE_KB_BIND_EFUSE_OFFECT,pdata
+	branch otp_write
+
+dongle_usb_config:
+	fetch 1,mem_dg_sys_config
+	bbit1 DG_ENABLE_KB_ICON,dongle_usb_config_kb
+	fetch 1,mem_dg_kb_bind_flag
+	bne DONGLE_KB_BIND_SUCCESS,dongle_usb_config_param
+dongle_usb_config_kb:
+	jam DONGLE_KB_BIND_SUCCESS,mem_dg_kb_bind_flag
+	fetch 4,USB_DEVICEDATA_ADDR+9
+	set1 29,pdata
+	store 4,mem_devicedesc+9
+dongle_usb_config_param:
+	call dongle_usb_device_name
+	call usb_tx_interval_config
+	call dongle_usb_vid_pid_config
+	branch dongle_usb_hid_icon_config
+
+dongle_usb_vid_pid_config:
+	fetch 1,mem_usb_vid_pid
+	rtn blank
+	fetch 1,mem_dg_kb_bind_flag
+	beq DONGLE_KB_BIND_SUCCESS,dongle_usb_vid_pid_for_suit
+dongle_usb_vid_pid_for_mouse_only_auto_pair:	
+	fetch 4,mem_usb_vid_pid+1
+dongle_usb_vid_pid_store:	
+	store 4,mem_devicedesc+9
+	rtn
+dongle_usb_vid_pid_for_suit:
+	fetch 4,mem_usb_vid_pid+5
+	branch dongle_usb_vid_pid_store
+
+dongle_usb_hid_icon_config:
+	fetch 1,mem_dg_kb_bind_flag
+	beq DONGLE_KB_BIND_SUCCESS,dongle_usb_kb_hidreportdesc
+	setarg USB_KBDATA_VENDOR_DEFINE_ADDR
+	store 2,mem_hidreportdesc_kb
+	jam 0x1a,mem_confdesc+26//hid_descriptor--keyboard length
+	rtn
+dongle_usb_kb_hidreportdesc:
+	setarg USB_KBDATA_ADDR
+	store 2,mem_hidreportdesc_kb
+	jam 0x3f,mem_confdesc+26//hid_descriptor--keyboard length	
+	rtn
+
+dongle_usb_device_name:
+	fetch 1,mem_dg_usb_device_name
+	rtn blank
+	arg mem_dg_usb_device_name,contr
+	arg mem_string2,contw
+	arg 30,loopcnt
+	branch memcpy
+
+
+dongle_all_powerful:
+	call g24_switch_work_mode
+dongle_all_powerful_loop:
+	call dongle_work_mode_auto
+	call dongle_usb_dispatch
+	branch dongle_all_powerful_loop
+
+dongle_pc_bind:
+	call g24_switch_work_mode
+dongle_pc_bind_loop:	
+	call dongle_work_mode_auto
+	call g24_bind_mode_auto
+	call dongle_usb_dispatch
+	branch dongle_pc_bind_loop
+
+dongle_g24_blank_data_process:
+	call dongle_g24_ms_blank_data
+	call dongle_g24_kb_blank_data
+	branch dongle_g24_kb_mul_blank_data
+
+dongle_g24_ms_blank_data:
+	bpatchx patch30_3,mem_patch30
+	fetch 1,mem_dg_ms_blank_data_enable
+	rtn blank
+	arg G24_TIMER_MS_BLANK,queue
+	call timer_check
+	nrtn blank
+	jam 0,mem_dg_ms_blank_data_enable
+	setarg MS_REPORT_ID
+	store 1,mem_usb_mouse_data
+	setarg 0
+	istore 7,contw
+dongle_usb_tx_ms_data:
+	jam USB_EP2_MS,mem_usb_ep2_data
+dongle_usb_tx_enable_ep2:
+	fetch 1,mem_usb_tx_enable
+	set1 2,pdata
+	store 1,mem_usb_tx_enable
+	rtn
+
+dongle_g24_kb_blank_data:
+	bpatchx patch30_4,mem_patch30
+	fetch 1,mem_dg_kb_blank_data_enable
+	rtn blank
+	arg G24_TIMER_KB_BLANK,queue
+	call timer_check
+	nrtn blank
+	jam 0,mem_dg_kb_blank_data_enable
+	arg mem_usb_kb_data,contw
+	arg 2,loopcnt
+	call memset0
+	fetch 8,mem_usb_kb_data
+	store 8,mem_dg_kb_data_last_data
+dongle_usb_tx_kb_data:	
+	jam KB_NORMAL_REPORT_ID,mem_usb_kb_data
+dongle_usb_tx_enable_ep1:
+	jam USB_EP1_KB,mem_usb_ep1_data
+	fetch 1,mem_usb_tx_enable
+	set1 1,pdata
+	store 1,mem_usb_tx_enable
+	rtn
+
+dongle_g24_kb_mul_blank_data:
+	bpatchx patch30_5,mem_patch30
+	fetch 1,mem_dg_kb_mul_blank_data_enable
+	rtn blank
+	arg G24_TIMER_KB_MUL_BLANK,queue
+	call timer_check
+	nrtn blank
+	jam 0,mem_dg_kb_mul_blank_data_enable
+	arg mem_usb_kb_multikey,contw
+	arg 2,loopcnt
+	call memset0
+	jam KB_MULTIKEY_REPORT_ID,mem_usb_kb_multikey
+	fetch 3,mem_usb_kb_multikey
+	store 3,mem_dg_kb_multikey_last_data	
+dongle_usb_tx_multikey_data:
+	jam USB_EP2_MULTIKEY,mem_usb_ep2_data
+	branch dongle_usb_tx_enable_ep2
+
+dongle_usb_dispatch:
+	bpatch patch06_6,mem_patch06
+	fetch 1,mem_usb_remote_wakeup
+	call dongle_clear_pc_sleep_flag,blank
+	call usb_isr
+	fetch 1,mem_usb0_get_set_report
+	rtn blank
+	jam 0,mem_usb0_get_set_report
+	fetch 2,mem_usb_setup_bValue_temp
+	arg PC_SET_REPORT,temp
+	isub temp,null
+	nrtn zero
+	//get usb host command
+	fetch 1,mem_usb0_set_report_data
+	rtnne PC_REPORT_ID
+	fetch 1,mem_usb0_set_report_data+1
+	beq COMMAND_MODE,dongle_dispose_cmd_mode
+	beq COMMAND_BIND,dongle_dispose_cmd_bind
+	beq COMMAND_CURRENT_PROJECT,dongle_dispose_cmd_current_project
+	beq COMMAND_CURRENT_MODE,dongle_dispose_cmd_current_mode
+	beq COMMAND_CURRENT_FW_VERSION,dongle_dispose_cmd_current_fw_version
+//	beq COMMAND_USER_DEFINED,dongle_dispose_cmd_user_defined
+dongle_usb0_data_ready_report_set0:
+	jam 0,mem_usb0_data_ready_report
+	rtn
+
+dongle_dispose_cmd_mode:
+	fetch 1,mem_usb0_set_report_data+2
+	beq COM_MODE_BIND,dongle_enter_bind_mode
+	branch dongle_usb0_data_ready_report_set0
+dongle_enter_bind_mode:
+	call g24_bind_mode_enable
+dongle_usb0_data_ready_report_set1:
+	jam 1,mem_usb0_data_ready_report
+	rtn
+
+dongle_dispose_cmd_bind:
+	fetch 1,mem_usb0_set_report_data+2
+	beq COM_BIND_GET,dongle_dispose_cmd_get_bind
+	beq COM_BIND_EXIT,dongle_dispose_cmd_exit_bind
+	beq COM_READ_MODE,dongle_dispose_cmd_read_mode
+	branch dongle_usb0_data_ready_report_set0
+dongle_dispose_cmd_get_bind:
+	fetch 1,mem_24g_bind_device_status
+	store 1,mem_usb0_get_report_data+1
+	branch dongle_usb0_data_ready_report_set1
+dongle_dispose_cmd_exit_bind:
+	call g24_work_mode_enable
+	branch dongle_dispose_cmd_get_bind
+dongle_dispose_cmd_read_mode:
+dongle_dispose_in_bind_mode:
+	jam COMMAND_BIND,mem_usb0_get_report_data+1
+	branch dongle_usb0_data_ready_report_set1	
+
+dongle_dispose_cmd_current_project:
+	jam PRODUCT_ID,mem_usb0_get_report_data+1
+	branch dongle_usb0_data_ready_report_set1
+
+dongle_dispose_cmd_current_mode:
+	fetch 1,mem_24g_work_mode
+	beq DONGLE_WORK,dongle_dispose_in_work_mode
+	beq DONGLE_BIND,dongle_dispose_in_bind_mode
+	rtn
+dongle_dispose_in_work_mode:
+	jam COMMAND_MODE,mem_usb0_get_report_data+1
+	branch dongle_usb0_data_ready_report_set1
+	
+dongle_dispose_cmd_current_fw_version:
+	jam FW_VERSION0,mem_usb0_get_report_data+1
+	jam FW_VERSION1,mem_usb0_get_report_data+2
+	jam FW_VERSION2,mem_usb0_get_report_data+3
+	jam FW_VERSION3,mem_usb0_get_report_data+4
+	branch dongle_usb0_data_ready_report_set1
+
+//dongle_dispose_cmd_user_defined:
+//	call g24_ackpayload_disable
+//	fetch 1,mem_usb0_set_report_data+2
+//	beq 0xff,soft_reset_chip
+//	rtn
+
+dongle_auto_bind:
+	call g24_mode_switch_init
+dongle_auto_bind_loop:
+	call g24_mode_switch_bind_work
+	call g24_mode_switch_bind_search
+	call dongle_work_mode_auto
+	call g24_bind_mode_auto
+	call g24_search_mode_auto
+	call dongle_usb_dispatch
+	branch dongle_auto_bind_loop
+
+dongle_work_mode_auto:
+	bpatch patch06_7,mem_patch06
+	fetch 1,mem_24g_work_mode
+	rtnne DONGLE_WORK
+	call g24_work_mode_start
+	call dongle_g24_blank_data_process
+	fetch 1,mem_24g_pair_mode
+	nrtn blank
+	branch g24_nodata_process
+
+dongle_ackpayload_prep:
+	fetch 1,mem_24g_data_type
+	beq DATATYPE_DEVICE1,dongle_ackpayload_prep_mouse
+	beq DATATYPE_DEVICE2,dongle_ackpayload_prep_keyboard
+dongle_ackpayload_prep_mouse:
+	fetch 1,mem_dg_pc_sleep_flag
+	bbit1 0,dongle_pc_sleep_ackpayload_prep_mouse
+	branch dongle_ackpayload_prep_end
+
+dongle_set_pc_sleep_flag:
+	fetch 1,mem_device_option
+	rtnne dvc_op_dongle
+	jam 3,mem_dg_pc_sleep_flag
+	rtn
+dongle_clear_pc_sleep_flag:
+	jam 0,mem_dg_pc_sleep_flag
+	rtn
+
+dongle_ackpayload_prep_keyboard:
+	fetch 1,mem_dg_pc_sleep_flag
+	bbit1 1,dongle_pc_sleep_ackpayload_prep_keyboard
+dongle_ackpayload_prep_end:
+	fetch 1,mem_24g_ackpayload_enable
+	beq BIND_ACKPAYLOAD,dongle_g24_bind_ackpayload_prep
+	beq KB_LED_ACKPAYLOAD,dongle_g24_kb_led_ackpayload_prep
+	rtn
+
+dongle_pc_sleep_ackpayload_prep_mouse:
+	fetch 1,mem_dg_pc_sleep_flag
+	set0 0,pdata
+	store 1,mem_dg_pc_sleep_flag
+	branch dongle_pc_sleep_ackpayload_prep
+
+dongle_pc_sleep_ackpayload_prep_keyboard:
+	fetch 1,mem_dg_pc_sleep_flag
+	set0 1,pdata
+	store 1,mem_dg_pc_sleep_flag
+dongle_pc_sleep_ackpayload_prep:
+	jam 0x01,mem_24g_datalen
+	setarg 0xff
+	store 1,mem_24g_txbuf
+	rtn
+
+
+dongle_g24_bind_ackpayload_prep:
+	jam 1,mem_24g_ackpayload_enable
+	call g24_binding_device_check	//works on auto pair only
+	nrtn user3
+	branch g24_bind_ackpayload_prep
+
+dongle_g24_kb_led_ackpayload_prep:
+	fetch 1,mem_24g_rxbuf+2
+	beq DATATYPE_DEVICE1,dongle_g24_bind_ackpayload_prep
+	beq DATATYPE_ATTEMP,dongle_g24_bind_ackpayload_prep
+	jam 0,mem_usb_tx_win_enable
+	jam 0x01,mem_24g_datalen
+	fetch 1,mem_24g_led_status
+	store 1,mem_24g_txbuf
+	rtn
+
+dongle_g24_mouse:
+	setarg MS_REPORT_ID
+	store 1,mem_usb_mouse_data	//report id
+	fetch 7,mem_24g_rxdata_temp+3	//key
+	istore 7,contw
+	fetch 1,mem_24g_rxdata_temp+3	//key
+	ncall dongle_g24_ms_enable_blank_data_forcibly,blank//get kb data
+	fetch 1,mem_24g_rxdata_temp+3	//key
+	call dongle_g24_ms_disable_blank_data_forcibly,blank
+	branch dongle_usb_tx_ms_data
+
+dongle_g24_ms_enable_blank_data_forcibly:
+	jam 1,mem_dg_ms_blank_data_enable
+	setarg TIMER_MS_BLANK_DELAY
+	arg G24_TIMER_MS_BLANK,queue
+	branch timer_init
+
+dongle_g24_ms_disable_blank_data_forcibly:
+	jam 0,mem_dg_ms_blank_data_enable
+	setarg 0
+	arg G24_TIMER_MS_BLANK,queue
+	branch timer_init
+
+dongle_g24_kb:
+	fetch 1,mem_24g_rxdata_temp+3
+	beq 0,dongle_g24_kb_type0	//normal key
+	beq 2,dongle_g24_kb_type2	//system key
+	beq 3,dongle_g24_kb_type3	//multikey
+	branch g24_rx_interrupt_clear
+
+dongle_g24_kb_type0:
+	fetch 1,mem_24g_rxdata_temp+5
+	store 1,mem_24g_ackpayload_enable
+	jam 0,mem_24g_rxdata_temp+5
+	arg mem_usb_kb_data,contw
+	arg mem_24g_rxdata_temp+4,contr
+	arg 8,loopcnt
+	call memcpy
+	fetch 8,mem_usb_kb_data
+	ncall dongle_g24_kb_enable_blank_data_forcibly,blank//get kb data
+	fetch 8,mem_usb_kb_data	
+	call dongle_g24_kb_disable_blank_data_forcibly,blank
+	fetch 8,mem_usb_kb_data
+	store 8,mem_dg_kb_data_sta_data
+	fetcht 8,mem_dg_kb_data_last_data
+	isub temp,null
+	ncall dongle_usb_tx_enable_ep1,zero
+	fetch 8,mem_dg_kb_data_sta_data
+	store 8,mem_dg_kb_data_last_data
+	branch g24_rx_interrupt_clear
+
+dongle_g24_kb_enable_blank_data_forcibly:
+	jam 1,mem_dg_kb_blank_data_enable
+	setarg TIMER_KB_BLANK_DELAY
+	arg G24_TIMER_KB_BLANK,queue
+	branch timer_init
+
+dongle_g24_kb_disable_blank_data_forcibly:
+	jam 0,mem_dg_kb_blank_data_enable
+	setarg 0
+	arg G24_TIMER_KB_BLANK,queue
+	branch timer_init
+
+dongle_g24_kb_type3:
+	arg mem_usb_kb_multikey,contw
+	arg mem_24g_rxdata_temp+3,contr
+	arg 3,loopcnt
+	call memcpy
+	fetch 2,mem_usb_kb_multikey+1
+	ncall dongle_g24_kb_mul_enable_blank_data_forcibly,blank//get multikey data
+	fetch 2,mem_usb_kb_multikey+1
+	call dongle_g24_kb_mul_disable_blank_data_forcibly,blank
+	fetch 3,mem_usb_kb_multikey
+	store 3,mem_dg_kb_multikey_sta_data
+	fetcht 3,mem_dg_kb_multikey_last_data
+	isub temp,null
+	ncall dongle_usb_tx_multikey_data,zero
+	fetch 3,mem_dg_kb_multikey_sta_data
+	store 3,mem_dg_kb_multikey_last_data
+	branch g24_rx_interrupt_clear
+
+dongle_g24_kb_mul_enable_blank_data_forcibly:
+	jam 1,mem_dg_kb_mul_blank_data_enable
+	setarg TIMER_KB_MUL_BLANK_DELAY
+	arg G24_TIMER_KB_MUL_BLANK,queue
+	branch timer_init
+	
+dongle_g24_kb_mul_disable_blank_data_forcibly:
+	jam 0,mem_dg_kb_mul_blank_data_enable
+	setarg 0
+	arg G24_TIMER_KB_MUL_BLANK,queue
+	branch timer_init
+
+dongle_g24_kb_type2:
+	arg mem_usb_kb_system,contw
+	arg mem_24g_rxdata_temp+3,contr
+	arg 2,loopcnt
+	call memcpy
+	fetch 2,mem_usb_kb_system
+	ncall dongle_g24_kb_sys_enable_blank_data_forcibly,blank
+	fetch 2,mem_usb_kb_system
+	call dongle_g24_kb_sys_disable_blank_data_forcibly,blank
+	fetch 2,mem_usb_kb_system
+	store 2,mem_dg_kb_system_sta_data
+	fetcht 2,mem_dg_kb_system_last_data
+	isub temp,null
+	ncall dongle_usb_tx_sys_data,zero
+	fetch 2,mem_dg_kb_system_sta_data
+	store 2,mem_dg_kb_system_last_data
+	branch g24_rx_interrupt_clear
+
+dongle_g24_kb_sys_enable_blank_data_forcibly:
+	jam 1,mem_dg_kb_mul_blank_data_enable
+	setarg TIMER_KB_MUL_BLANK_DELAY
+	arg G24_TIMER_KB_MUL_BLANK,queue
+	branch timer_init
+dongle_g24_kb_sys_disable_blank_data_forcibly:
+	jam 0,mem_dg_kb_mul_blank_data_enable
+	setarg 0
+	arg G24_TIMER_KB_MUL_BLANK,queue
+	branch timer_init
+
+dongle_usb_tx_sys_data:
+	jam USB_EP2_SYSTEMKEY,mem_usb_ep2_data
+	branch dongle_usb_tx_enable_ep2
+
+
+dongle_g24_store_dvc2_bind_flag:
+	fetch 1,mem_device_option
+	rtnne dvc_op_dongle
+	fetch 1,mem_dg_kb_bind_flag
+	rtneq DONGLE_KB_BIND_SUCCESS
+dongle_prep_soft_reset:
+	jam 1,mem_dg_kb_bind_success
+	rtn
+
+
+dongle_kb_bind_soft_reset:
+	fetch 1,mem_device_option
+	rtnne dvc_op_dongle
+	fetch 1,mem_dg_kb_bind_success
+	rtn blank
+	jam 0,mem_temp
+dongle_wirte_efuse_bind_status:	
+	jam DONGLE_KB_BIND_SUCCESS,mem_dg_kb_bind_flag
+	call dongle_write_kb_bind_status
+	call dongle_read_kb_bind_status
+	fetch 1,mem_temp
+	increase 1,pdata
+	store 1,mem_temp
+	beq 0xff,soft_reset_chip
+	fetch 1,mem_dg_kb_bind_flag
+	bne DONGLE_KB_BIND_SUCCESS,dongle_wirte_efuse_bind_status
+	branch soft_reset_chip
+
+
+endif
+
+
Index: program/app_light/common/frmt_fml_ble.prog
===================================================================
--- /branch/usb/usb_public_base/program/app_light/common/frmt_fml_ble.prog	(revision 0)
+++ /branch/usb/usb_public_base/program/app_light/common/frmt_fml_ble.prog	(working copy)
@@ -0,0 +1,76 @@
+
+frmt_ble_para_init:
+	setarg 0x93FDB7
+	store 3,mem_ble_v2_xbox
+	setarg 0x3F3626
+	store 3,mem_ble_v2_xbox+3
+	setarg 0x34CCF7
+	store 3,mem_ble_v2_xbox+6
+	setarg 0xF1E5A5
+	store 3,mem_ble_v2_xbox+9
+	setarg 0x31D871
+	store 3,mem_ble_v2_xbox+12
+	setarg 0xC70415
+	store 3,mem_ble_v2_xbox+15
+	setarg 0x18C323
+	store 3,mem_ble_v2_xbox+18
+	setarg 0x9A0596
+	store 3,mem_ble_v2_xbox+21
+	setarg 0x801207
+	store 3,mem_ble_v2_xbox+24
+	setarg 0x27EBE2
+	store 3,mem_ble_v2_xbox+27
+	setarg 0x75B2
+	store 2,mem_ble_v2_xbox+30
+	setarg 0x89A18C
+	store 3,mem_ble_v2_xbox+32
+	setarg 0xE6BF0D
+	store 3,mem_ble_v2_xbox+35
+	setarg 0x416842
+	store 3,mem_ble_v2_xbox+38
+	setarg 0x0F2D99
+	store 3,mem_ble_v2_xbox+41
+	setarg 0x54B0
+	store 2,mem_ble_v2_xbox+44
+	setarg 0x16BB
+	store 2,mem_ble_v2_xbox+46
+	setarg 0x51C29B
+	store 3,mem_ble_v2_xbox+48
+	setarg 0x1A532F
+	store 3,mem_ble_v2_xbox+51
+	setarg 0xB5836A
+	store 3,mem_ble_v2_xbox+54
+	setarg 0x106E02
+	store 3,mem_ble_v2_xbox+57
+	setarg 0xAB16
+	store 2,mem_ble_v2_xbox+60
+	setarg 0x42A3
+	store 2,mem_ble_v2_xbox+62
+	rtn
+frmt_ble_data_set:
+	setarg 0x2542
+	store 2,mem_ble_v2_pdu
+	setarg 0x10255d
+	store 3, mem_ble_v2_pdu+2
+	setarg 0x109e3a
+	store 3, mem_ble_v2_pdu+5
+	setarg 0x00
+	store 3,mem_ble_v2_pdu+32
+	setarg 0x020102
+	store 3,mem_ble_v2_pdu+8
+	setarg 0xF0161B
+	store 3,mem_ble_v2_pdu+11
+	setarg 0x001008
+	store 3,mem_ble_v2_pdu+14
+
+	fetch 1,mem_ble_v2_packet_num
+	pincrease 1
+	store 1,mem_ble_v2_packet_num
+	
+	fetch 2,mem_ble_pack_cb
+	branch callback_func
+	
+frtm_ble_setdefault:
+	setarg 0xffff
+	rtn
+	
Index: program/app_light/fan/fdflp_fml_fan.prog
===================================================================
--- /branch/usb/usb_public_base/program/app_light/fan/fdflp_fml_fan.prog	(revision 0)
+++ /branch/usb/usb_public_base/program/app_light/fan/fdflp_fml_fan.prog	(working copy)
@@ -0,0 +1,33 @@
+
+
+
+fan_idle_process:
+	bpatchx patch2a_7,mem_patch2a
+	branch fan_le_scan_process
+
+fan_apl_event_timer:
+	rtn
+
+	
+fan_le_scan_process:
+	bpatchx patch2b_0,mem_patch2b
+	call le_enable
+	disable master
+	call le_init_adv
+ 	call p_le_wait_adv
+	nrtn match
+	fetch 1,mem_le_adv_rcv
+	increase 1,pdata
+	store 1,mem_le_adv_rcv
+	branch fan_apl_ble_rx_v1_or_v2
+
+p_le_wait_adv:
+	call p_le_next_scan_chanel
+	branch le_receive_adv
+
+p_le_next_scan_chanel:
+	fetch 1,mem_ble_ch_mapped
+	store 1, mem_le_ch_mapped 
+	rtn
+
+
Index: program/app_light/fan/fdflp_fml_fan_ctl.prog
===================================================================
--- /branch/usb/usb_public_base/program/app_light/fan/fdflp_fml_fan_ctl.prog	(revision 0)
+++ /branch/usb/usb_public_base/program/app_light/fan/fdflp_fml_fan_ctl.prog	(working copy)
@@ -0,0 +1,195 @@
+
+
+ifdef FUNC_FAN_MODULE
+fan_apl_pair:
+	setarg FAN_433_PAIRING
+	branch fan_fml_fet_ctl
+
+fan_apl_light_on_and_off:
+	setarg FAN_433_LAMP_ON_AND_OFF
+	branch fan_fml_fet_ctl
+
+fan_apl_is_yc_remoter:
+	fetch 6, mem_recv_addr
+	fetcht 6, mem_yc_fan_ble_addr     //如果是YC的遥控器，就转发0x16
+	isub temp, null
+	rtn
+
+fan_apl_light_on:
+	fetch 1,mem_fan_yc_identify_flag
+	branch fan_apl_light_on_only,blank
+	fetch 1,mem_light_device_flag
+	beq 1,fan_apl_light_on_only
+	fetch 1,mem_manufacture_id_temp
+	beq 0x50,fan_apl_light_on_only
+	
+	call fan_apl_is_yc_remoter
+	branch fan_apl_light_on_and_off, zero
+fan_apl_light_on_only:
+	setarg FAN_433_LAMP_ON_ONLY
+	branch fan_fml_fet_ctl
+
+fan_apl_light_off:
+	fetch 1,mem_fan_yc_identify_flag
+	branch fan_apl_light_off_only,blank
+	fetch 1,mem_light_device_flag
+	beq 1,fan_apl_light_off_only
+	fetch 1,mem_manufacture_id_temp
+	beq 0x50,fan_apl_light_off_only
+	
+	call fan_apl_is_yc_remoter
+	branch fan_apl_light_on_and_off, zero
+fan_apl_light_off_only:
+	setarg FAN_433_LAMP_OFF_ONLY
+	branch fan_fml_fet_ctl
+
+fan_apl_master_off:
+	setarg FAN_433_MASTER_ON_AND_OFF
+	branch fan_fml_fet_ctl
+
+fan_apl_light_color_switch:
+	fetch 1, mem_ble_parameter_para+1
+	rtnne LIGHT_CMD_FTD_COLOR_SWTICH_RESERVED
+	setarg FAN_433_COLOR_SWITCH
+	branch fan_fml_fet_ctl
+
+
+fan_apl_speed_30:
+	fetch 2, mem_ble_parameter_para+1
+	nbranch fan_apl_speed_opcode_30_incse, blank
+fan_apl_speed_opcode_30_decse:
+	setarg FAN_433_FAN_SPEED_DEC
+	branch fan_fml_fet_ctl
+fan_apl_speed_opcode_30_incse:
+	setarg FAN_433_FAN_SPEED_INC
+	branch fan_fml_fet_ctl
+
+
+fan_apl_speed_31_v1:
+	fetch 1, mem_ble_parameter_para+2
+	beq FAN_SPEED_FLAG_OFF, fan_apl_speed_32_to_0_and_deflector_off
+	beq FAN_SPEED_FLAG_LOW, fan_apl_speed_32_to_1
+	beq FAN_SPEED_FLAG_MIDDLE, fan_apl_speed_32_to_3
+	beq FAN_SPEED_FLAG_HIGH, fan_apl_speed_32_to_5
+	rtn
+	
+fan_apl_speed_31_v2:
+	fetch 1, mem_ble_parameter_para+1
+	beq 0x20, fan_apl_speed_32
+	branch fan_apl_speed_31_v1
+
+
+fan_apl_speed_32:
+	fetch 1, mem_ble_parameter_para+2
+	beq FAN_SPEED_FLAG_OFF, fan_apl_speed_32_to_0_and_deflector_off
+	beq 1, fan_apl_speed_32_to_1
+	beq 2, fan_apl_speed_32_to_2
+	beq 3, fan_apl_speed_32_to_3
+	beq 4, fan_apl_speed_32_to_4
+	beq 5, fan_apl_speed_32_to_5
+	beq 6, fan_apl_speed_32_to_6
+	rtn
+
+fan_apl_speed_32_to_0_and_deflector_off:	
+fan_apl_speed_32_to_0:
+	setarg FAN_433_TAP_POSOTION_0
+	branch fan_fml_fet_ctl
+
+fan_apl_speed_32_to_1:
+	setarg FAN_433_TAP_POSOTION_1
+	branch fan_fml_fet_ctl
+
+fan_apl_speed_32_to_2:
+	setarg FAN_433_TAP_POSOTION_2
+	branch fan_fml_fet_ctl
+
+fan_apl_speed_32_to_3:
+	setarg FAN_433_TAP_POSOTION_3
+	branch fan_fml_fet_ctl
+
+fan_apl_speed_32_to_4:
+	setarg FAN_433_TAP_POSOTION_4
+	branch fan_fml_fet_ctl
+
+fan_apl_speed_32_to_5:
+	setarg FAN_433_TAP_POSOTION_5
+	branch fan_fml_fet_ctl
+
+fan_apl_speed_32_to_6:
+	setarg FAN_433_TAP_POSOTION_6
+	branch fan_fml_fet_ctl
+	
+	
+fan_apl_wind_direction:
+	fetch 1, mem_ble_parameter_para+1
+	branch fan_fml_wind_direction_forward_433, blank
+fan_fml_wind_direction_reverse_433:
+	setarg FAN_433_TURNING_REVERSE
+	branch fan_fml_fet_ctl
+fan_fml_wind_direction_forward_433:
+	setarg FAN_433_TURNIING_FORWARD
+	branch fan_fml_fet_ctl
+
+fan_apl_wind_direction_on_and_off:
+	setarg FAN_433_WIND_REVERSE
+	branch fan_fml_fet_ctl
+
+fan_apl_deflector_ctl_on_and_off:
+	setarg FAN_433_DEFLECTOR_ON_AND_OFF
+	branch fan_fml_fet_ctl
+
+fan_apl_deflector_ctl:
+	fetch 1, mem_ble_parameter_para+1
+	branch fan_apl_deflector_off, blank
+fan_apl_deflector_on:
+	setarg FAN_433_DEFLECTOR_ON
+	branch fan_fml_fet_ctl
+fan_apl_deflector_off:
+	setarg FAN_433_DEFLECTOR_OFF
+	branch fan_fml_fet_ctl
+
+fan_apl_mode:	
+	bpatchx patch2b_1,mem_patch2b
+	fetch 1, mem_ble_parameter_para+1
+
+ 	beq BLE_PARA_SLEEP_MODE, fan_fml_mode_sleep_wind
+	beq BLE_PARA_NATURAL_MODE, fan_apl_mode_natural_wind
+	rtn
+	
+fan_fml_mode_sleep_wind:
+	setarg FAN_433_SLEEP_WIND
+	branch fan_fml_fet_ctl
+
+fan_apl_mode_natural_wind:
+	setarg FAN_433_NATURAL_WIND
+	branch fan_fml_fet_ctl
+
+
+fan_apl_timing_to_off:
+	fetch 2, mem_ble_parameter_para+1
+	beq FAN_BLE_CMD_TIMING_TO_OFF_8HOUR_V1, fan_fml_timing_to_off_8hour
+fan_apl_timing_to_off_v2:
+	bpatchx patch2b_2,mem_patch2b
+	fetch 2, mem_ble_parameter_para+1
+	beq FAN_BLE_CMD_TIMING_TO_OFF_8HOUR, fan_fml_timing_to_off_8hour
+	beq FAN_BLE_CMD_TIMING_TO_OFF_1HOUR, fan_fml_timing_to_off_1hour
+	beq FAN_BLE_CMD_TIMING_TO_OFF_2HOUR, fan_fml_timing_to_off_2hour
+	beq FAN_BLE_CMD_TIMING_TO_OFF_4HOUR, fan_fml_timing_to_off_4hour
+	rtn
+fan_fml_timing_to_off_1hour:
+	setarg FAN_433_TIMING_TO_OFF_1HOUR
+	branch fan_fml_fet_ctl
+fan_fml_timing_to_off_2hour:
+	setarg FAN_433_TIMING_TO_OFF_2HOUR
+	branch fan_fml_fet_ctl
+fan_fml_timing_to_off_4hour:
+	setarg FAN_433_TIMING_TO_OFF_4HOUR
+	branch fan_fml_fet_ctl
+fan_fml_timing_to_off_8hour:
+	setarg FAN_433_TIMING_TO_OFF_8HOUR
+	branch fan_fml_fet_ctl
+	
+endif
+
+
+
Index: program/app_light/fan/fdflp_fml_fan_init.prog
===================================================================
--- /branch/usb/usb_public_base/program/app_light/fan/fdflp_fml_fan_init.prog	(revision 0)
+++ /branch/usb/usb_public_base/program/app_light/fan/fdflp_fml_fan_init.prog	(working copy)
@@ -0,0 +1,11 @@
+
+
+fan_init:
+	setarg fan_idle_process
+	store 2,mem_cb_idle_process	
+	setarg fan_apl_cb_event_timer
+	store 2, mem_cb_event_timer
+	branch fan_fml_tx_low_level_init
+
+
+
Index: program/app_light/fan/fdflp_fml_fan_main.prog
===================================================================
--- /branch/usb/usb_public_base/program/app_light/fan/fdflp_fml_fan_main.prog	(revision 0)
+++ /branch/usb/usb_public_base/program/app_light/fan/fdflp_fml_fan_main.prog	(working copy)
@@ -0,0 +1,325 @@
+
+
+//------------------------------收包------------------------------
+/*选择V1或V2*/
+fan_apl_ble_rx_v1_or_v2:
+ifdef FUNC_FAN_MODULE
+	fetch 1,mem_fan_protocol_select_flag
+	beq 0, fan_apl_ble_rx_packet
+endif
+//	call fan_fml_ble_v2_decoder
+	fetch 2, mem_ble_v2_decoder
+	call callback_func
+//	
+	branch fan_apl_ble_rx_packet_v2_cb,user
+	rtn
+
+ifdef FUNC_FAN_MODULE
+fan_apl_ble_rx_packet:
+
+	fetch 1, mem_le_rxbuf+11     //added, at 20200113
+	beq REMOTER_MARKER, fan_apl_ble_rx_packet_is_remoter
+	jam 0 ,mem_manufacture_id_temp
+	
+	setarg 0
+	store 6,mem_recv_addr
+fan_apl_ble_rx_packet_id_valid:
+	fetcht 3, mem_le_rxbuf+12   //adv data begin
+	setarg FTD_REMOTER_ID_CODE
+	isub temp, null
+	jam 0, mem_light_device_flag   //0: remoter;  !0:app
+	branch  fan_apl_ble_rx_packet_preamble_valid, zero
+
+	jam 1, mem_light_device_flag  //0: remoter;  !0:app
+	setarg FTD_ANDRIOD4913_ID_CODE
+	isub temp, null
+	branch  fan_apl_ble_rx_packet_preamble_valid, zero
+	setarg FTD_IOS4913_ID_CODE
+	isub temp, null
+	branch  fan_apl_ble_rx_packet_preamble_valid, zero
+	
+	jam 2, mem_light_device_flag  //0: remoter;  !0:app
+	setarg FTD_B65F_ID_CODE
+	isub temp, null
+	nrtn zero
+fan_apl_ble_rx_packet_preamble_valid:
+	arg mem_le_rxbuf, contr
+	arg mem_light_whitening_buffer, contw
+	arg FTD_PDU_LEN, loopcnt
+	call memcpy
+	
+	jam 83, mem_light_whitening_i     //channel 37
+	jam 39, mem_light_recvd_len
+	call frmt_light_BLE_whitening_and_reverse
+	fetch 1, mem_light_device_flag
+	beq 1, fan_apl_ble_rx_packet_protocol_4913
+	arg mem_light_whitening_buffer+23, contr
+fan_apl_ble_rx_packet_get_protocol:	
+	arg mem_light_adv_packet, contw
+	arg 14, loopcnt
+	call memcpy_fast
+fan_apl_ble_rx_packet_validity_checkout:
+	fetch 2, mem_light_adv_packet+10
+	byteswap pdata, pdata
+	invert pdata, pdata
+	store 2, mem_adv_CRC_False_initValue
+	arg mem_light_adv_packet, regc   
+	arg 0x0c, loopcnt
+	setarg 0x1021
+	store 2,mem_CRC16_polynomial
+	call frmt_CRC16_CCITT_False
+	fetch 2, mem_adv_CRC_False_initValue
+	byteswap pdata, pdata
+	fetcht 2, mem_light_adv_packet_encry+4
+	isub temp, null
+	nrtn zero
+	branch fan_apl_ble_rx_packet_v1_cb
+
+fan_apl_ble_rx_packet_protocol_4913:
+	arg mem_light_whitening_buffer+24, contr
+	branch fan_apl_ble_rx_packet_get_protocol
+
+fan_apl_ble_rx_packet_is_remoter:	
+	bpatchx patch2b_3,mem_patch2b
+	arg mem_recv_addr, contw
+	arg mem_le_rxbuf+2, contr
+	arg 6, loopcnt
+	call memcpy_fast
+	
+	fetch 1, mem_le_rxbuf+10
+	store 1, mem_manufacture_id_temp
+
+	fetcht 1,mem_customer_id
+	isub temp,null
+	branch fan_apl_ble_rx_packet_id_valid,zero
+
+	fetcht 1,mem_customer_id_v2
+	isub temp,null
+	branch fan_apl_ble_rx_packet_id_valid,zero
+
+	fetcht 1,mem_id_universal
+	isub temp,null
+	branch fan_apl_ble_rx_packet_id_valid,zero
+	rtn	
+
+	
+/*callback*/
+fan_apl_ble_rx_packet_v1_cb:
+	
+	fetch 1, mem_light_adv_packet_cmd
+	store 2, mem_ble_parameter_cmd
+	fetch 2, mem_light_adv_packet_data
+	store 2, mem_ble_parameter_para+1 
+	
+	fetch 1, mem_light_adv_packet_addr
+	store 1,mem_ble_parameter_addr+1
+	fetch 1, mem_light_adv_packet_addr+1
+	store 1,mem_ble_parameter_addr
+
+	fetch 1, mem_light_adv_packet_addr+1
+	and pdata,0x0f,pdata
+	store 1,mem_ble_parameter_group
+	
+	branch fan_apl_ble_rx_packet_cb_common
+endif
+
+fan_apl_ble_rx_packet_v2_cb:
+
+	fetch 2,mem_ble_addr
+	lshift4 pdata,pdata
+	store 2,mem_ble_parameter_addr
+	fetch 6,mem_ble_cmd
+	store 6, mem_ble_parameter
+	fetch 1,mem_ble_group
+	store 1,mem_ble_parameter_group
+	fetch 1,mem_ble_is_app
+	store 1,mem_light_device_flag
+	fetch 1,mem_ble_customer_id
+	store 1,mem_manufacture_id_temp
+	fetch 1,mem_ble_count
+	store 1,mem_light_adv_packet_packetnum
+fan_apl_ble_rx_packet_cb_common:
+	fetch 2, mem_fan_packet_indiscriminate_cb
+	call callback_func
+//	call fan_apl_ble_rx_packet_indiscriminate
+	
+fan_apl_ble_rx_cmd_execution:
+	bpatchx patch2b_4,mem_patch2b
+ifdef FUNC_FAN_MODULE
+
+	call fan_apl_ble_cmd_handler_customer_message
+	rtn user
+	
+	fetch 2, mem_ble_parameter_cmd
+
+	beq LIGHT_CMD_PAIRING_CODE, fan_apl_pair
+
+	beq LIGHT_CMD_TURN_ON_AND_OFF, fan_apl_light_on_and_off
+	beq LIGHT_CMD_TURN_ON, fan_apl_light_on
+	beq LIGHT_CMD_TURN_OFF, fan_apl_light_off
+
+	beq FAN_CMD_MASTER_ON_AND_OFF, fan_apl_master_off
+	beq FAN_CMD_SPEED_CHANGE, fan_apl_speed_30
+
+	beq FAN_CMD_DIRECTION, fan_apl_wind_direction
+	beq FAN_CMD_DIRECTION_ON_AND_OFF , fan_apl_wind_direction_on_and_off
+	beq FAN_CMD_DEFLECTOR,fan_apl_deflector_ctl
+	beq FAN_CMD_DEFLECTOR_ON_AND_OFF ,fan_apl_deflector_ctl_on_and_off
+	beq FAN_CMD_MODE, fan_apl_mode
+	
+	fetch 1,mem_fan_protocol_select_flag
+	beq 0, fan_apl_main_v1
+	beq 1, fan_apl_main_v2
+endif
+	rtn
+
+
+
+ifdef FUNC_FAN_MODULE
+//--------------------------响应风扇功能--------------------------
+/*V1 主函数*/
+fan_apl_main_v1:	
+	bpatchx patch2b_5,mem_patch2b
+	fetch 2,mem_ble_parameter_cmd
+	beq FAN_CMD_TIMING_TO_OFF, fan_apl_timing_to_off
+	beq LIGHT_CMD_DELAY_OFF, fan_apl_timing_to_off
+
+	fetch 2, mem_light_adv_packet_data
+	store 2, mem_ble_parameter_para+2
+	fetch 2, mem_ble_parameter_cmd
+	beq FAN_CMD_SPEED_31,fan_apl_speed_31_v1
+	beq FAN_CMD_SPEED_32,fan_apl_speed_32
+
+	fetch 1, mem_light_adv_packet_reserve
+	store 1, mem_ble_parameter_para+1
+	fetch 2, mem_ble_parameter_cmd
+	beq LIGHT_CMD_COLOR_SWTICH, fan_apl_light_color_switch
+	rtn
+
+	
+/*V2 主函数*/
+fan_apl_main_v2:
+	bpatchx patch2b_6,mem_patch2b
+	fetch 2,mem_ble_parameter_cmd
+	beq FAN_CMD_SPEED_31,fan_apl_speed_31_v2
+	beq LIGHT_CMD_DELAY_OFF, fan_apl_timing_to_off_v2
+	beq LIGHT_CMD_COLOR_SWTICH, fan_apl_light_color_switch
+	rtn
+endif
+
+fan_apl_ble_cmd_handler_customer_message:
+	bpatchx patch2b_7,mem_patch2b
+	call disable_user
+	fetcht 2,mem_ble_parameter_addr
+	arg 9,queue
+	arg 10,loopcnt
+fan_apl_ble_rx_packet_addr_check_loop:
+	sub loopcnt,10,regc
+	deposit queue
+	isub regc,null
+	branch fan_apl_ble_rx_packet_addr_check,positive
+fan_apl_ble_rx_packet_other_addr_check_continue:
+	sub regc,3,null
+	nbranch fan_apl_ble_rx_packet_addr_check,positive
+	branch fan_apl_ble_rx_packet_addr_check_end
+	
+fan_apl_ble_rx_packet_addr_check:
+	arg mem_flash_paired_addr_base,contr
+	mul32 regc,3,pdata
+	iadd contr,contr
+	ifetch 2,contr
+	isub temp, null
+	nbranch fan_apl_ble_rx_packet_addr_check_end, zero
+
+	ifetchr rega,1,contr
+	fetch 1,mem_ble_parameter_group
+
+	branch fan_apl_ble_rx_packet_cnt_check,blank
+	isub rega,null
+	branch fan_apl_ble_rx_packet_cnt_check,zero
+fan_apl_ble_rx_packet_addr_check_end:	
+	loop fan_apl_ble_rx_packet_addr_check_loop
+	
+	arg mem_flash_paired_addr8,rega
+	arg 9,loopcnt
+fan_apl_ble_rx_packet_addr_move_loop:
+	ifetch 3,rega
+	add rega,3,temp
+	istore 3,temp
+	increase -3,rega
+	loop fan_apl_ble_rx_packet_addr_move_loop
+	fetch 3,mem_ble_parameter_addr
+	store 3,mem_flash_paired_addr0
+//同时cnt队列也相应往后面移动
+	fetch 1,mem_addr8_msg_cnt
+	store 1,mem_addr9_msg_cnt
+	fetch 8,mem_msg_cnt_base
+	store 8,mem_addr1_msg_cnt
+	jam 0,mem_msg_cnt_base
+	branch fan_apl_ble_cmd_handler_customer_message
+
+	
+fan_apl_ble_rx_packet_cnt_check:
+	copy loopcnt,temp
+	storet 1,mem_msg_addr_save
+/*cnt判断机制，根据loopcnt的值判断是什么设备，再mem_ble_v2_count是否有效*/
+	arg mem_msg_cnt_base,temp
+	sub loopcnt,10,pdata
+	iadd temp,temp
+	copy temp,rega
+	ifetcht 1,temp
+	fetch 1,mem_light_adv_packet_packetnum
+	isub temp, null
+//	rtn zero 
+	branch enable_user,zero
+	branch fan_apl_ble_rx_check_packetnum_vaild_v2,positive
+/*当cnt小于上次的cnt，判断符不符合6-(cnt+256-last_cnt)>0*/
+	add pdata,0x100,pdata
+	isub temp,pdata
+	and pdata,0xff,pdata
+	sub pdata,6,null
+	branch fan_apl_ble_rx_check_packetnum_vaild_v2,positive
+	rtn
+
+fan_apl_ble_rx_check_packetnum_vaild_v2:	
+fan_apl_ble_rx_relay_check:
+	fetch 1,mem_light_adv_packet_packetnum
+	store 1,mem_count_and_random
+	fetch 2,mem_le_rxbuf+35
+	store 2,mem_count_and_random+1
+	fetcht 3,mem_count_and_random
+	arg mem_msg_before_queue,contr
+	arg 10,loopcnt
+fan_apl_msg_check_count_random_loop:
+	ifetch 3,contr
+	isub temp,null
+//	rtn zero
+	branch enable_user,zero
+	loop fan_apl_msg_check_count_random_loop
+fan_apl_msg_enqueue:
+	jam 30,mem_msg_judgment_window_time//窗口
+	fetch 3,mem_msg_before_queue+24
+	store 3,mem_msg_before_queue+27
+	
+	fetch 8,mem_msg_before_queue+8
+	fetcht 8,mem_msg_before_queue+16
+	store 8,mem_msg_before_queue+11
+	storet 8,mem_msg_before_queue+19	
+	
+	fetch 8,mem_msg_before_queue
+	store 8,mem_msg_before_queue+3
+	
+	fetch 3,mem_count_and_random
+	store 3,mem_msg_before_queue
+
+	fetch 1,mem_msg_addr_save
+	copy pdata,loopcnt
+	arg mem_msg_cnt_base,temp
+	sub loopcnt,10,pdata
+	iadd temp,temp
+	fetch 1,mem_light_adv_packet_packetnum
+	istore 1,temp
+	jam 30,mem_msg_cnt_judgment_window_time
+
+	rtn
+	
\ No newline at end of file
Index: program/app_light/fan/fdflp_fml_fan_timer.prog
===================================================================
--- /branch/usb/usb_public_base/program/app_light/fan/fdflp_fml_fan_timer.prog	(revision 0)
+++ /branch/usb/usb_public_base/program/app_light/fan/fdflp_fml_fan_timer.prog	(working copy)
@@ -0,0 +1,32 @@
+
+fan_apl_cb_event_timer:
+	bpatchx patch2c_0,mem_patch2c
+	call fan_apl_ble_msg_cache_clear_time
+	rtn
+
+
+
+fan_apl_ble_msg_cache_clear_time:
+	call fan_apl_ble_msg_cache_clear_timer
+	branch fan_apl_ble_msg_cnt_cache_clear_timer
+	
+fan_apl_ble_msg_cache_clear_timer:
+	arg mem_msg_judgment_window_time,regc
+	arg fan_apl_ble_msg_cache_clear_timeout, regb
+	branch timer_single_step
+fan_apl_ble_msg_cache_clear_timeout:
+	arg 30,loopcnt
+	arg mem_msg_before_queue,contw
+	branch clear_mem
+	
+fan_apl_ble_msg_cnt_cache_clear_timer:
+	arg mem_msg_cnt_judgment_window_time,regc
+	arg fan_apl_ble_msg_cnt_cache_clear_timeout, regb
+	branch timer_single_step
+fan_apl_ble_msg_cnt_cache_clear_timeout:
+	jam 0,mem_light_last_packetnum
+	arg 10,loopcnt
+	arg mem_msg_cnt_base,contw
+	branch clear_mem
+	rtn
+
Index: program/app_light/fan/fdflp_fml_fan_tx.prog
===================================================================
--- /branch/usb/usb_public_base/program/app_light/fan/fdflp_fml_fan_tx.prog	(revision 0)
+++ /branch/usb/usb_public_base/program/app_light/fan/fdflp_fml_fan_tx.prog	(working copy)
@@ -0,0 +1,206 @@
+
+
+fan_fml_fet_ctl:
+	store 1,mem_fan_opcode
+	fetch 2,mem_433_tx_cb
+	branch callback_func
+
+
+fan_fml_tx_high_level:
+	fetcht 1,mem_fan_tx_gpio
+	branch gpio_config_output_patch
+
+fan_fml_tx_low_level_init:
+fan_fml_tx_low_level:
+	fetcht 1,mem_fan_tx_gpio
+	or temp, 0x80, temp
+	branch gpio_config_output_patch
+
+//para: mem_opcode
+fan_fml_function_once:     
+	call fan_fml_tx_header_signal
+	call fan_fml_function_once_433code
+	branch fan_fml_tx_end_signal
+
+fan_fml_function_once_433code:
+	arg FAN_433CODE_LEN, pdata
+	lshift3 pdata, pdata
+	store 2, mem_fan_tx_bits_loop
+	copy pdata, queue
+	increase -1, queue
+	fetcht FAN_433CODE_LEN, mem_fan_433code_packet
+fan_fml_function_once_433code_loop:
+	fetch 2, mem_fan_tx_bits_loop
+	rtn blank
+	pincrease -1
+	store 2, mem_fan_tx_bits_loop
+	qisolate1 temp
+	branch fan_fml_1_signal_temp,true
+	call fan_fml_0_signal
+fan_fml_function_once_tx_bit_loop_continue:
+	increase -1, queue
+	fetch 2, mem_fan_tx_bits_loop	
+	fetcht FAN_433CODE_LEN, mem_fan_433code_packet
+	nbranch fan_fml_function_once_433code_loop, blank
+	rtn
+
+fan_fml_1_signal_temp:
+	call fan_fml_1_signal
+	branch fan_fml_function_once_tx_bit_loop_continue
+
+
+// para1: mem_opcode 
+// para2: mem_tx_loop2       retransmission times
+fan_fml_function_loop:
+	fetch 2, mem_fan_tx_loop2
+	rtn blank
+	pincrease -1
+	store 2, mem_fan_tx_loop2
+	call fan_fml_function_once
+	branch fan_fml_function_loop
+
+
+p_fan_fml_fet_ctl:
+	call fan_fml_get_433_code
+	setarg FAN_RETRANSMISSION_TIMES
+	store 2,mem_fan_tx_loop2
+	branch fan_fml_function_loop
+
+
+//433D-òé?°20bit
+fan_apl_ble_rx_packet_indiscriminate:
+	fetch 1,mem_manufacture_id_temp
+	fetcht 1,mem_id_universal
+	isub temp,null
+	branch fan_apl_ble_433_packet_type1,zero
+	fetch 1,mem_light_device_flag
+	beq 0,fan_apl_ble_433_packet_type0
+	branch fan_apl_ble_433_packet_type1
+
+fan_apl_ble_433_packet_type0:
+	setarg 0
+	branch fan_apl_ble_433_packet_common
+fan_apl_ble_433_packet_type1:
+	setarg 0x80
+fan_apl_ble_433_packet_common:
+	fetcht 1, mem_ble_parameter_group
+	and temp, 0x7f, rega
+	ior rega,pdata
+	rshift4 pdata,temp
+	storet 1,mem_fan_addr_433+2
+
+	and pdata,0x0f,pdata
+	lshift4 pdata,pdata
+	fetcht 1, mem_ble_parameter_addr+1
+	and temp, 0xf0, rega
+	rshift4 rega,rega
+	ior rega,pdata
+	store 1,mem_fan_addr_433+1
+
+	and temp,0x0f, pdata
+	lshift4 pdata,pdata
+	fetcht 1, mem_ble_parameter_addr
+	rshift4 temp,temp
+	ior temp,pdata
+	store 1,mem_fan_addr_433
+
+	rtn
+
+
+//433×é?? μ??·-opcode-
+fan_fml_get_433_code:
+	fetch 3,mem_fan_addr_433
+	lshift4 pdata, pdata
+	lshift8 pdata, pdata
+	fetcht 1, mem_fan_opcode
+	lshift3 temp, temp
+	lshift4 temp, temp
+	ior temp, rega
+	call fan_fml_get_433_code_packet_num_get
+	lshift4 pdata, pdata
+	ior rega, rega
+	call fan_fml_get_433_code_get_check_code
+	ior rega, pdata
+	store FAN_433CODE_LEN, mem_fan_433code_packet
+	rtn
+
+//output: pdata
+fan_fml_get_433_code_get_check_code:
+	arg 4, loopcnt
+	copy rega, regb
+	arg 0, alarm
+fan_fml_get_433_code_get_check_code_loop:
+	and regb, 0xff, regc
+	and regc, 0xf0, pdata
+	rshift4 pdata, pdata
+	ixor alarm, alarm
+	and regc, 0x0f, pdata
+	ixor alarm, alarm
+	rshift8 regb, regb	
+	loop fan_fml_get_433_code_get_check_code_loop
+	xor alarm, 0x0a, alarm
+	and alarm, 0x0f, pdata
+	rtn
+
+//output: pdata
+fan_fml_get_433_code_packet_num_get:
+	fetch 1, mem_fan_tx_cnt
+	pincrease 1
+	and pdata, 0x07, pdata
+	store 1, mem_fan_tx_cnt
+	rtn
+
+//para: loopcnt      unit: 1us
+fan_fml_delay_us:
+	nop 12
+	loop fan_fml_delay_us
+	rtn
+
+fan_fml_tx_header_signal:
+	call fan_fml_tx_low_level
+	arg FAN_HEADER_LOW_DELAY,loopcnt
+	branch fan_fml_delay_us
+	
+fan_fml_1_signal:
+	call fan_fml_tx_high_level
+	arg FAN_1_HIGH_DELAY, loopcnt
+	call fan_fml_delay_us
+	call fan_fml_tx_low_level
+	arg FAN_1_LOW_DELAY, loopcnt
+	branch fan_fml_delay_us
+	
+fan_fml_0_signal:
+	call fan_fml_tx_high_level
+	arg FAN_0_HIGH_DELAY, loopcnt
+	call fan_fml_delay_us
+	call fan_fml_tx_low_level
+	arg FAN_0_LOW_DELAY, loopcnt
+	branch fan_fml_delay_us	
+
+fan_fml_tx_end_signal:	
+	call fan_fml_tx_high_level
+	arg FAN_END_HIGH_DELAY,loopcnt
+	call fan_fml_delay_us
+	call fan_fml_tx_low_level
+	arg FAN_END_LOW_DELAY,loopcnt
+	branch fan_fml_delay_us
+
+	
+fan_fml_1_signal_loop:
+	fetch 2, mem_fan_tx_loop
+	rtn blank
+	pincrease -1	
+	store 2, mem_fan_tx_loop
+	call fan_fml_1_signal
+	branch fan_fml_1_signal_loop
+
+
+fan_fml_0_signal_loop:
+	fetch 2, mem_fan_tx_loop
+	rtn blank
+	pincrease -1
+	store 2, mem_fan_tx_loop
+	call fan_fml_0_signal
+	branch fan_fml_0_signal_loop
+
+
Index: program/app_light/remoter/frmt_fml_remoter_gem.prog
===================================================================
--- /branch/usb/usb_public_base/program/app_light/remoter/frmt_fml_remoter_gem.prog	(revision 0)
+++ /branch/usb/usb_public_base/program/app_light/remoter/frmt_fml_remoter_gem.prog	(working copy)
@@ -0,0 +1,235 @@
+
+
+frmt_gem_adv_pdu_common:   
+	jam 1, mem_light_num_of_long_press
+	call frmt_light_long_press_flag_reset
+	jam 66,mem_light_gm_tx_addr_type
+	jam 21,mem_light_gm_tx_len
+	
+	jam 0x55, mem_light_gm_tx_remoter_ID
+	fetch 1, mem_light_gm_tx_count
+	pincrease 1
+	store 1, mem_light_gm_tx_count
+	call frmt_gem_pud_sum
+	call frmt_light_flag_set_short_press
+	arg GEM_PDU_LEN, loopcnt
+	arg mem_light_gm_tx_addr_type, contr
+	arg mem_light_whitening_buffer, contw
+	branch memcpy_fast
+	
+	
+frmt_gem_pud_sum:
+	arg 0, temp
+	arg mem_light_gm_tx_press_time , contr
+	arg 7, loopcnt
+frmt_gem_pud_sum_loop:
+	ifetch 1, contr
+	iadd temp, temp
+	loop frmt_gem_pud_sum_loop
+	storet 1,mem_light_gm_tx_sum
+	rtn
+
+
+frmt_light_gem_long_press_cnt:
+	fetch 1,mem_gem_long_cnt_enable
+	rtn blank
+	jam 0,mem_gem_long_cnt_enable
+	fetch 2,mem_long_press_timeout
+	rtn blank
+	fetch 1,mem_light_gm_tx_press_time
+	pincrease 1
+	store 1,mem_light_gm_tx_press_time
+	beq 1,frmt_light_gem_long_press_code_increase
+	beq 9,frmt_light_gem_long_press_code_increase
+	call frmt_gem_adv_pdu_common
+	setarg GEM_LONG_KEYPRESS
+	store 2,mem_gem_cnt_inces_timeout
+	rtn
+
+frmt_light_gem_long_press_code_increase:	
+	fetch 1,mem_light_gm_tx_code
+	pincrease 0x40
+	store 1,mem_light_gm_tx_code
+	call frmt_gem_adv_pdu_common
+	branch gem_long_keypress_time
+
+gem_long_keypress_time:
+	setarg GEM_LONG_KEYPRESS
+	store 2,mem_gem_cnt_inces_timeout
+	rtn
+
+gem_light_color_switch:
+	jam GEM_LIGHT_COLOR_SWITCH_CODE, mem_light_gm_tx_code
+	jam 0,mem_light_gm_tx_press_time
+	branch frmt_gem_adv_pdu_common
+	
+gem_light_energy_saving_light:
+	fetch 1,mem_ble_v2_customer_id
+	ncall frmt_light_pcnt_50_percent_V2,blank
+	jam GEM_LIGHT_ENERGY_SAVE_LIGHT_CODE, mem_light_gm_tx_code
+	jam 0,mem_light_gm_tx_press_time
+	branch frmt_gem_adv_pdu_common
+
+
+gem_light_timing_off:
+	jam GEM_LIGHT_TIMING_OFF_CODE, mem_light_gm_tx_code
+	jam 0,mem_light_gm_tx_press_time
+	branch frmt_gem_adv_pdu_common
+
+gem_light_aid_turn_onoff:
+	jam GEM_LIGHT_AIDED_LIGHT_CODE, mem_light_gm_tx_code
+	jam 0,mem_light_gm_tx_press_time
+	branch frmt_gem_adv_pdu_common
+
+gem_light_master_on:
+	jam GEM_LIGHT_ON_CODE, mem_light_gm_tx_code
+	jam 0, mem_light_gm_tx_group_num
+	jam 0,mem_light_gm_tx_press_time
+	branch frmt_gem_adv_pdu_common
+
+gem_light_master_off:
+	jam GEM_LIGHT_OFF_CODE, mem_light_gm_tx_code
+	jam 0,mem_light_gm_tx_press_time
+	jam 0, mem_light_gm_tx_group_num
+	branch frmt_gem_adv_pdu_common
+
+gem_light_rgb_auto:
+	jam GEM_LIGHT_RGB_AUTO_CODE, mem_light_gm_tx_code
+	jam 0,mem_light_gm_tx_press_time
+	branch frmt_gem_adv_pdu_common
+
+
+gem_light_rgb_step:
+	jam GEM_LIGHT_RGB_STEP_CODE, mem_light_gm_tx_code
+	jam 0,mem_light_gm_tx_press_time
+	branch frmt_gem_adv_pdu_common
+	
+
+gem_light_group1_on:
+	fetch 1,mem_ble_v2_customer_id
+	ncall frmt_light_group1_on_V2,blank
+	jam GEM_LIGHT_ON_GROUP1_CODE, mem_light_gm_tx_code
+	jam 1, mem_light_gm_tx_group_num
+	jam 0,mem_light_gm_tx_press_time
+	branch frmt_gem_adv_pdu_common
+
+gem_light_group1_off:
+	fetch 1,mem_ble_v2_customer_id
+	ncall frmt_light_group1_off_V2,blank
+	jam GEM_LIGHT_OFF_GROUP1_CODE, mem_light_gm_tx_code
+	jam 1, mem_light_gm_tx_group_num
+	jam 0,mem_light_gm_tx_press_time
+	branch frmt_gem_adv_pdu_common
+
+
+gem_light_group2_on:
+	fetch 1,mem_ble_v2_customer_id
+	ncall frmt_light_group2_on_V2,blank
+	jam GEM_LIGHT_ON_GROUP2_CODE, mem_light_gm_tx_code
+	jam 2, mem_light_gm_tx_group_num
+	jam 0,mem_light_gm_tx_press_time
+	branch frmt_gem_adv_pdu_common
+
+gem_light_group2_off:
+	fetch 1,mem_ble_v2_customer_id
+	ncall frmt_light_group2_off_V2,blank
+	jam GEM_LIGHT_OFF_GROUP2_CODE, mem_light_gm_tx_code
+	jam 2, mem_light_gm_tx_group_num
+	jam 0,mem_light_gm_tx_press_time
+	branch frmt_gem_adv_pdu_common
+
+
+gem_light_group3_on:
+	fetch 1,mem_ble_v2_customer_id
+	ncall frmt_light_group3_on_V2,blank
+	jam GEM_LIGHT_ON_GROUP3_CODE, mem_light_gm_tx_code
+	jam 3, mem_light_gm_tx_group_num
+	jam 0,mem_light_gm_tx_press_time
+	branch frmt_gem_adv_pdu_common
+
+gem_light_group3_off:
+	fetch 1,mem_ble_v2_customer_id
+	ncall frmt_light_group3_off_V2,blank
+	jam GEM_LIGHT_OFF_GROUP3_CODE, mem_light_gm_tx_code
+	jam 3, mem_light_gm_tx_group_num
+	jam 0,mem_light_gm_tx_press_time
+	branch frmt_gem_adv_pdu_common
+
+
+gem_light_group4_on:
+	fetch 1,mem_ble_v2_customer_id
+	ncall frmt_light_group4_on_V2,blank
+	jam GEM_LIGHT_ON_GROUP4_CODE, mem_light_gm_tx_code
+	jam 4, mem_light_gm_tx_group_num
+	jam 0,mem_light_gm_tx_press_time
+	branch frmt_gem_adv_pdu_common
+
+gem_light_group4_off:
+	fetch 1,mem_ble_v2_customer_id
+	ncall frmt_light_group4_off_V2,blank
+	jam GEM_LIGHT_OFF_GROUP4_CODE, mem_light_gm_tx_code
+	jam 4, mem_light_gm_tx_group_num
+	jam 0,mem_light_gm_tx_press_time
+	branch frmt_gem_adv_pdu_common
+
+
+gem_light_color_switch_short_press:
+	fetch 1, mem_light_color_and_lgtness_long_press_adv_enable
+	beq 1, gem_light_color_switch
+	jam LIGHT_COLOR_SWITCH_RELEASE_ADV_FLAG, mem_light_release_adv_flag
+	branch frmt_light_light_color_and_lightness_change_common
+
+gem_light_color_switch_W:
+	fetch 1,mem_ble_v2_customer_id
+	ncall frmt_light_color_switch_W_V2,blank
+	jam GEM_COLOR_SWITCH_W, mem_light_gm_tx_code
+	jam 0,mem_light_gm_tx_press_time
+	jam 0, mem_light_gm_tx_group_num
+	branch frmt_gem_adv_pdu_common
+
+gem_light_color_switch_Y:
+	fetch 1,mem_ble_v2_customer_id
+	ncall frmt_light_color_switch_Y_V2,blank
+	jam GEM_COLOR_SWITCH_Y, mem_light_gm_tx_code
+	jam 0,mem_light_gm_tx_press_time
+	jam 0, mem_light_gm_tx_group_num
+	branch frmt_gem_adv_pdu_common
+
+gem_light_to_Y:
+	jam 0, mem_light_release_adv_flag
+	fetch 1,mem_ble_v2_customer_id
+	ncall frmt_light_to_Y_V2,blank
+	jam GEM_LIGHT_TO_Y_CODE, mem_light_gm_tx_code
+	branch frmt_gem_adv_pdu_common
+
+gem_light_to_W:
+	jam 0, mem_light_release_adv_flag
+	fetch 1,mem_ble_v2_customer_id
+	ncall frmt_light_to_W_V2,blank
+	jam GEM_LIGHT_TO_W_CODE, mem_light_gm_tx_code
+	branch frmt_gem_adv_pdu_common
+
+gem_light_darken:
+	jam 0, mem_light_release_adv_flag
+	fetch 1,mem_ble_v2_customer_id
+	ncall frmt_light_darken_V2,blank
+	jam GEM_LIGHT_DARKEN_CODE, mem_light_gm_tx_code
+	branch frmt_gem_adv_pdu_common	
+
+gem_light_lighten:
+	jam 0, mem_light_release_adv_flag
+	fetch 1,mem_ble_v2_customer_id
+	ncall frmt_light_lighten_V2,blank
+	jam GEM_LIGHT_LIGHTEN_CODE, mem_light_gm_tx_code
+	branch frmt_gem_adv_pdu_common	
+
+gem_light_night_light:
+	fetch 1,mem_ble_v2_customer_id
+	ncall frmt_light_night_light_V2,blank
+	jam GEM_LIGHT_NIGHT_LIGHT_CODE, mem_light_gm_tx_code
+	jam 0,mem_light_gm_tx_press_time
+	branch frmt_gem_adv_pdu_common
+	
+
+
+
Index: program/app_light/remoter/frmt_fml_remoter_init.prog
===================================================================
--- /branch/usb/usb_public_base/program/app_light/remoter/frmt_fml_remoter_init.prog	(revision 0)
+++ /branch/usb/usb_public_base/program/app_light/remoter/frmt_fml_remoter_init.prog	(working copy)
@@ -0,0 +1,91 @@
+
+
+remoter_init:	
+	call frmt_ble_para_init
+// call ice_break
+	call frmt_enter_lpm_gpio_config_flag_init_row
+	call frmt_enter_lpm_gpio_config_flag_init_col
+	bpatchx patch2c_1,mem_patch2c
+
+	jam 1, mem_set_clear_code_timeout_enable
+	jam 1, mem_light_lpm_enable
+
+
+frmt_apl_ble_scene_rewrite_lap:
+	fetch 2, mem_le_lap
+	lshift4 pdata, pdata
+	arg 0xffff, temp
+	iand temp, pdata    //因为左移过后原本的高四位，只是被左移了，仍然存在于16bit往左的高位，应该把它们去掉
+	branch frmt_light_set_addr_to_0010 , blank
+	arg 0xfff0, temp
+	isub temp, null
+	branch frmt_light_set_addr_to_ffe0, zero
+frmt_lightc_init_continue:	
+	byteswap pdata, pdata    //20200417
+	store 2, mem_FTD_adv_raw_device_add_temp
+	store 2, mem_light_gm_tx_remoter_addr
+
+	arg 0xffff,rega
+	lshift16 rega, temp
+	setarg 0xffff
+	ior temp, temp
+	fetch 4, mem_le_lap
+	call frmt_light_addr_default_v2, blank
+	isub temp, null
+	call frmt_light_addr_default_v2, zero
+	store 4, mem_ble_v2_addr
+
+	setarg frmt_apl_cb_event_timer
+	store 2, mem_cb_event_timer
+	
+	setarg frmt_main
+	store 2,mem_cb_idle_process
+	branch  frmt_kscan_init
+
+
+
+frmt_apl_iic_init:
+	setarg 0x000102   //配置wp, scl, sda的gpio分别为:02, 01, 00
+	store 3,mem_eeprom_wp_gpio  
+
+	jam 0x6d, 0x8070
+	jam 0x6c, 0x8071
+// 	jam 0x3e, 0x8072
+	rtn
+
+frmt_enter_lpm_gpio_config_flag_init_row:
+	fetch 1, mem_kscan_row_nums
+	iforce loopcnt
+	fetcht 4, mem_light_lpm_gpio_config_flag
+	arg mem_kscan_row_gpio_pin, contr
+frmt_enter_lpm_gpio_config_flag_init_loop:
+	ifetch 1, contr
+	iforce queue
+	qset1 temp
+	loop frmt_enter_lpm_gpio_config_flag_init_loop
+	storet 4, mem_light_lpm_gpio_config_flag
+	rtn
+
+frmt_enter_lpm_gpio_config_flag_init_col:
+	fetch 1, mem_kscan_col_nums
+	iforce loopcnt
+	fetcht 4, mem_light_lpm_gpio_config_flag
+	arg mem_kscan_col_gpio_pin, contr
+	branch frmt_enter_lpm_gpio_config_flag_init_loop
+
+frmt_light_addr_default_v2:
+	setarg 0x111213
+	rtn
+
+frmt_light_set_addr_to_0010:
+	arg 0x0010, pdata
+	branch frmt_lightc_init_continue
+
+frmt_light_set_addr_to_ffe0:
+	arg 0xffe0, pdata
+	branch frmt_lightc_init_continue
+
+key_light_set_addr_to_7878:
+	arg 0x7878, temp
+	rtn
+	
Index: program/app_light/remoter/frmt_fml_remoter_key.prog
===================================================================
--- /branch/usb/usb_public_base/program/app_light/remoter/frmt_fml_remoter_key.prog	(revision 0)
+++ /branch/usb/usb_public_base/program/app_light/remoter/frmt_fml_remoter_key.prog	(working copy)
@@ -0,0 +1,378 @@
+
+//关于adv的时间和lpm需要重新重点计算   pairing 和 clear等等
+
+frmt_jym_pdu_common:                     
+	fetch 4, mem_le_lap
+	store 4, mem_light_JYM_tx_ID
+	jam 0xd1, mem_light_JYM_tx_group
+	fetch 1, mem_light_JYM_tx_count
+	pincrease 1
+	store 1, mem_light_JYM_tx_count
+	
+	arg 0, temp
+	arg mem_light_JYM_tx_cmd, contr
+	arg 8, loopcnt
+	call frmt_light_sum_cal_loop
+	byteswap temp, temp
+	storet 2,mem_light_JYM_tx_sum
+
+	//call ice_break
+	arg mem_light_JYM_tx_len, regc
+	arg 11, loopcnt
+	setarg 0
+	store 2, mem_adv_CRC_False_initValue
+	call key_CRC16_CCITT_False1
+	fetch 2, mem_adv_CRC_False_initValue
+	store 2, mem_light_JYM_tx_CRC
+
+
+/***************************************
+mem_light_JYM_tx_header_temp中，pre1本来是50 55 55，但是白化的时候，需要reverse，
+所以初始化的时候，就直接reverse好了，为:0a aa aa
+****************************************/
+	arg 23, loopcnt      //只copy 23个byte，第24个byte是协议中的len
+	arg mem_light_KY_tx, contr  
+	arg mem_light_whitening_buffer, contw
+	call memcpy_fast
+
+	arg 13, loopcnt
+	arg mem_light_JYM_tx_len, contr  
+	arg mem_light_whitening_buffer+23, contw
+	call memcpy_fast
+	
+	jam 37, mem_light_recvd_len
+	jam 51, mem_light_whitening_i
+	call frmt_light_ble_whitening
+
+	arg 37, loopcnt
+	arg mem_light_whitening_buffer, contr
+	arg mem_light_JYM_tx_temp , contw
+	branch memcpy_fast
+	
+frmt_reverse:
+	ifetch 1, contr
+	reverse pdata, pdata
+	istore 1, contw
+	loop frmt_reverse
+	rtn
+
+key_pdu_common:		
+	call frmt_light_flag_set_short_press
+	call frmt_light_sum_cal
+	byteswap temp, temp
+	storet 2, mem_light_KY_tx_sum
+	arg mem_light_KY_tx_len, regc
+	arg 10, loopcnt
+	setarg 0
+	store 2, mem_adv_CRC_False_initValue 
+	call key_CRC16_CCITT_False1
+	fetch 2, mem_adv_CRC_False_initValue
+	store 2, mem_light_KY_tx_CRC
+	fetch 2, mem_light_KY_tx_count
+	byteswap pdata, pdata
+	pincrease 1
+	byteswap pdata, pdata
+	store 2, mem_light_KY_tx_count
+	
+	arg 37, loopcnt
+	arg mem_light_KY_tx, contr
+	arg mem_light_whitening_buffer, contw
+	call memcpy_fast
+	jam 37, mem_light_recvd_len
+	jam 51, mem_light_whitening_i
+	branch frmt_light_ble_whitening
+	
+
+frmt_light_sum_cal:
+	arg 0, temp
+	arg mem_light_KY_tx_code1, contr
+	arg 7, loopcnt
+frmt_light_sum_cal_loop:
+	ifetch 1, contr
+	iadd temp, temp
+	loop frmt_light_sum_cal_loop
+	rtn
+
+key_whitening_i_get:
+	arg 51, regb
+	rtn
+
+/***************************科云功能****************************/
+//mem_light_group_num
+frmt_light_group_num_set:
+	fetch 1, mem_light_group_num
+	store 1, mem_light_KY_tx_remoter_ID+3 
+	rtn
+
+frmt_light_timing_off_KY:
+	call frmt_light_timing_30s_V2
+	jam LIGHT_JYM_CMD_TIMING_OFF, mem_light_JYM_tx_cmd
+	jam LIGHT_JYM_DATA_TIMING_OFF, mem_light_JYM_tx_data
+	call frmt_jym_pdu_common
+
+	jam LIGHT_TIMING_CODE1, mem_light_KY_tx_code1
+	jam 0x46, mem_light_KY_tx_code2
+	branch key_pdu_common
+
+key_light_Aux_lamp_on_and_off_KY:
+	jam LIGHT_JYM_CMD_AUX_LAMP, mem_light_JYM_tx_cmd
+	jam LIGHT_JYM_DATA_AUX_LAMP, mem_light_JYM_tx_data
+	call frmt_jym_pdu_common
+
+	jam LIGHT_AUX_LAMP_ON_AND_OFF_CODE1, mem_light_KY_tx_code1
+	jam 0xf0, mem_light_KY_tx_code2
+	branch key_pdu_common
+
+key_light_to_Y:	
+	call frmt_light_to_Y_V2
+	jam LIGHT_JYM_CMD_TO_Y, mem_light_JYM_tx_cmd
+	jam LIGHT_JYM_DATA_TO_Y, mem_light_JYM_tx_data
+	call frmt_jym_pdu_common
+
+	jam LIGHT_TO_Y_CODE1, mem_light_KY_tx_code1
+	jam 0, mem_light_KY_tx_code2
+	branch key_pdu_common
+
+key_light_to_W:	
+	call frmt_light_to_W_V2
+	jam LIGHT_JYM_CMD_TO_W, mem_light_JYM_tx_cmd
+	jam LIGHT_JYM_DATA_TO_W, mem_light_JYM_tx_data
+	call frmt_jym_pdu_common
+
+	jam LIGHT_TO_W_CODE1, mem_light_KY_tx_code1
+	jam 0, mem_light_KY_tx_code2
+	branch key_pdu_common
+
+key_light_darken:
+	call frmt_light_darken_V2
+	jam LIGHT_JYM_CMD_DARKEN, mem_light_JYM_tx_cmd
+	jam LIGHT_JYM_DATA_DARKEN, mem_light_JYM_tx_data
+	call frmt_jym_pdu_common
+
+	jam LIGHT_DARKEN_CODE1, mem_light_KY_tx_code1
+	jam 0, mem_light_KY_tx_code2
+	branch key_pdu_common
+
+key_light_lighten:
+	call frmt_light_lighten_V2
+	jam LIGHT_JYM_CMD_LIGHTEN, mem_light_JYM_tx_cmd
+	jam LIGHT_JYM_DATA_LIGHTEN, mem_light_JYM_tx_data
+	call frmt_jym_pdu_common
+
+	jam LIGHT_LIGHTEN_CODE1, mem_light_KY_tx_code1
+	jam 0, mem_light_KY_tx_code2
+	branch key_pdu_common
+
+key_light_group1_off:
+	jam LIGHT_JYM_CMD_OFF, mem_light_JYM_tx_cmd
+	jam LIGHT_JYM_DATA_OFF, mem_light_JYM_tx_data
+	jam 0xd2,mem_light_JYM_tx_group
+	call frmt_jym_pdu_common
+	
+	jam LIGHT_OFF_CODE1, mem_light_KY_tx_code1
+	jam LIGHT_OFF_CODE2, mem_light_KY_tx_code2
+	jam 0xd2,mem_light_KY_tx_group_num
+	branch key_pdu_common
+
+key_light_group2_off:	
+	jam LIGHT_JYM_CMD_OFF, mem_light_JYM_tx_cmd
+	jam LIGHT_JYM_DATA_OFF, mem_light_JYM_tx_data
+	jam 0xd4,mem_light_JYM_tx_group
+	call frmt_jym_pdu_common
+	
+	jam LIGHT_OFF_CODE1, mem_light_KY_tx_code1
+	jam LIGHT_OFF_CODE2, mem_light_KY_tx_code2
+	jam 0xd4,mem_light_KY_tx_group_num
+	branch key_pdu_common
+
+key_light_group3_off:
+	jam LIGHT_JYM_CMD_OFF, mem_light_JYM_tx_cmd
+	jam LIGHT_JYM_DATA_OFF, mem_light_JYM_tx_data
+	jam 3,mem_light_JYM_tx_group
+	call frmt_jym_pdu_common
+	
+	jam LIGHT_OFF_CODE1, mem_light_KY_tx_code1
+	setarg LIGHT_OFF_CODE2
+	store 2, mem_light_KY_tx_code2
+	jam 3,mem_light_group_num
+	branch key_pdu_common
+
+key_light_group4_off:
+	jam LIGHT_JYM_CMD_OFF, mem_light_JYM_tx_cmd
+	jam LIGHT_JYM_DATA_OFF, mem_light_JYM_tx_data
+	jam 4,mem_light_JYM_tx_group
+	call frmt_jym_pdu_common
+	
+	jam LIGHT_OFF_CODE1, mem_light_KY_tx_code1
+	setarg LIGHT_OFF_CODE2
+	store 2, mem_light_KY_tx_code2
+	jam 4,mem_light_group_num
+	branch key_pdu_common
+
+key_light_group1_on:
+	jam LIGHT_JYM_CMD_ON, mem_light_JYM_tx_cmd
+	jam LIGHT_JYM_DATA_ON, mem_light_JYM_tx_data
+	jam 0xd2,mem_light_JYM_tx_group
+	call frmt_jym_pdu_common
+	
+	jam LIGHT_ON_CODE1, mem_light_KY_tx_code1
+	jam LIGHT_ON_CODE2, mem_light_KY_tx_code2
+	jam 0xd2,mem_light_KY_tx_group_num
+	branch key_pdu_common
+
+key_light_group2_on:
+	jam LIGHT_JYM_CMD_ON, mem_light_JYM_tx_cmd
+	jam LIGHT_JYM_DATA_ON, mem_light_JYM_tx_data
+	jam 0xd4,mem_light_JYM_tx_group
+	call frmt_jym_pdu_common
+	
+	jam LIGHT_ON_CODE1, mem_light_KY_tx_code1
+	jam LIGHT_ON_CODE2, mem_light_KY_tx_code2
+	jam 0xd4,mem_light_KY_tx_group_num
+	branch key_pdu_common
+
+key_light_group3_on:
+	jam LIGHT_JYM_CMD_ON, mem_light_JYM_tx_cmd
+	jam LIGHT_JYM_DATA_ON, mem_light_JYM_tx_data
+	jam 3,mem_light_JYM_tx_group
+	call frmt_jym_pdu_common
+	
+	jam LIGHT_ON_CODE1, mem_light_KY_tx_code1
+	setarg LIGHT_ON_CODE2
+	store 2, mem_light_KY_tx_code2
+	jam 3,mem_light_group_num
+	branch key_pdu_common
+
+key_light_group4_on:
+	jam LIGHT_JYM_CMD_ON, mem_light_JYM_tx_cmd
+	jam LIGHT_JYM_DATA_ON, mem_light_JYM_tx_data
+	jam 4,mem_light_JYM_tx_group
+	call frmt_jym_pdu_common
+	
+	jam LIGHT_ON_CODE1, mem_light_KY_tx_code1
+	setarg LIGHT_ON_CODE2
+	store 2, mem_light_KY_tx_code2
+	jam 4,mem_light_group_num
+	branch key_pdu_common
+
+key_light_pairing_group1:	
+	jam 0xd2,mem_light_JYM_tx_group
+	jam 0xd2,mem_light_KY_tx_group_num
+	branch key_light_master_pairing_process
+
+key_light_pairing_group2:	
+	jam 0xd4,mem_light_JYM_tx_group
+	jam 0xd4,mem_light_KY_tx_group_num
+	branch key_light_master_pairing_process
+
+key_light_pairing_group3:	
+	jam 3,mem_light_JYM_tx_group
+	jam 3,mem_light_KY_tx_group_num
+	branch key_light_master_pairing_process
+
+key_light_pairing_group4:	
+	jam 4,mem_light_JYM_tx_group
+	jam 4,mem_light_KY_tx_group_num
+	branch key_light_master_pairing_process
+
+
+key_light_clear_code:
+	call frmt_light_clear_code_V2
+	jam LIGHT_JYM_CMD_CLEAR, mem_light_JYM_tx_cmd
+	jam LIGHT_JYM_DATA_CLEAR, mem_light_JYM_tx_data
+	call frmt_jym_pdu_common
+
+	jam LIGHT_CLEAR_CODE_CODE1, mem_light_KY_tx_code1
+	setarg LIGHT_CLEAR_CODE_CODE2
+	store 2, mem_light_KY_tx_code2
+	branch key_pdu_common
+
+key_light_master_pairing:
+	jam 0xd1,mem_light_KY_tx_group_num
+	jam 0xd1,mem_light_JYM_tx_group
+key_light_master_pairing_process:
+	call frmt_light_master_pairing_V2
+	jam LIGHT_JYM_CMD_PAIRING, mem_light_JYM_tx_cmd
+	jam LIGHT_JYM_DATA_PAIRING, mem_light_JYM_tx_data
+	call frmt_jym_pdu_common
+ 
+	jam LIGHT_PAIRING_CODE1, mem_light_KY_tx_code1
+	jam LIGHT_PAIRING_CODE2, mem_light_KY_tx_code2
+	jam 0, mem_light_group_num
+	call frmt_light_group_num_set
+	branch key_pdu_common
+
+key_light_night_light:
+	call frmt_light_night_light_V2
+	jam LIGHT_JYM_CMD_NIGHT_LIGHT, mem_light_JYM_tx_cmd
+	jam LIGHT_JYM_DATA_NIGHT_LIGHT, mem_light_JYM_tx_data
+	call frmt_jym_pdu_common
+
+	jam LIGHT_NIGHT_LIGHT_CODE1, mem_light_KY_tx_code1
+	jam 0, mem_light_KY_tx_code2
+	branch key_pdu_common
+
+key_light_color_switch:
+	fetch 1,mem_light_color_switch_cnt
+	beq 0,key_light_color_switch_WY
+	beq 1,key_light_color_switch_W
+	beq 2,key_light_color_switch_Y
+	rtn
+
+key_light_color_switch_WY:
+	call frmt_light_color_switch_WY_V2
+	jam 1, mem_light_color_switch_cnt
+	jam LIGHT_JYM_CMD_WY_LAMP, mem_light_JYM_tx_cmd
+	jam LIGHT_JYM_DATA_WY_LAMP, mem_light_JYM_tx_data
+	call frmt_jym_pdu_common
+
+	jam LIGHT_COLOR_SWITCH_CODE1, mem_light_KY_tx_code1
+	jam LIGHT_COLOR_SWITCH_WY_CODE2, mem_light_KY_tx_code2
+	branch key_pdu_common
+
+key_light_color_switch_W:
+	call frmt_light_color_switch_W_V2
+	jam 2, mem_light_color_switch_cnt
+	jam LIGHT_JYM_CMD_WHITE_LAMP, mem_light_JYM_tx_cmd
+	jam LIGHT_JYM_DATA_WHITE_LAMP, mem_light_JYM_tx_data
+	call frmt_jym_pdu_common
+	
+	jam LIGHT_COLOR_SWITCH_CODE1, mem_light_KY_tx_code1
+	jam LIGHT_COLOR_SWITCH_W_CODE2, mem_light_KY_tx_code2
+	branch key_pdu_common
+
+key_light_color_switch_Y:
+	call frmt_light_color_switch_Y_V2
+	jam 0, mem_light_color_switch_cnt
+	jam LIGHT_JYM_CMD_YELLOW_LAMP, mem_light_JYM_tx_cmd
+	jam LIGHT_JYM_DATA_YELLOW_LAMP, mem_light_JYM_tx_data
+	call frmt_jym_pdu_common
+
+	jam LIGHT_COLOR_SWITCH_CODE1, mem_light_KY_tx_code1
+	jam LIGHT_COLOR_SWITCH_Y_CODE2, mem_light_KY_tx_code2
+	branch key_pdu_common
+
+key_light_master_off:
+	jam LIGHT_JYM_CMD_OFF, mem_light_JYM_tx_cmd
+	jam LIGHT_JYM_DATA_OFF, mem_light_JYM_tx_data
+	jam 0xd1,mem_light_JYM_tx_group
+	call frmt_jym_pdu_common
+	
+	jam LIGHT_OFF_CODE1, mem_light_KY_tx_code1
+	jam 0, mem_light_KY_tx_code2
+	jam 0xd1,mem_light_KY_tx_group_num
+	branch key_pdu_common
+
+key_light_master_on:
+	jam LIGHT_JYM_CMD_ON, mem_light_JYM_tx_cmd
+	jam LIGHT_JYM_DATA_ON, mem_light_JYM_tx_data
+	jam 0xd1,mem_light_JYM_tx_group
+	call frmt_jym_pdu_common
+	
+	jam LIGHT_ON_CODE1, mem_light_KY_tx_code1
+	jam 0, mem_light_KY_tx_code2
+	jam 0xd1,mem_light_KY_tx_group_num
+	branch key_pdu_common
+
+
+
Index: program/app_light/remoter/frmt_fml_remoter_keyscan.prog
===================================================================
--- /branch/usb/usb_public_base/program/app_light/remoter/frmt_fml_remoter_keyscan.prog	(revision 0)
+++ /branch/usb/usb_public_base/program/app_light/remoter/frmt_fml_remoter_keyscan.prog	(working copy)
@@ -0,0 +1,173 @@
+
+/*
+按键检测
+*/
+frmt_kscan_init:
+	fetch 2, mem_kscan_analysis_interval_timeout   
+	nrtn blank
+
+	call frmt_kscan_col_state_init
+frmt_kscan_row_state_init:  //pull up, input
+	arg mem_kscan_row_gpio_pin, rega
+
+	fetch 1, mem_kscan_row_nums
+	iforce loopcnt
+frmt_kscan_input_pull_up_loop:	
+	ifetcht 1, rega
+	call gpio_config_input
+	increase 1, rega
+	loop frmt_kscan_input_pull_up_loop
+	nop 12000	
+	rtn
+
+frmt_kscan_recover_col_output_low:	
+frmt_kscan_col_state_init:  //output low
+	arg mem_kscan_col_gpio_pin, rega
+	fetch 1, mem_kscan_col_nums
+	iforce loopcnt
+frmt_kscan_output_low_loop:
+	ifetcht 1, rega
+	or temp, 0x80, temp
+	call gpio_config_output_patch
+	increase 1, rega
+	loop frmt_kscan_output_low_loop
+	nop 12000
+	rtn
+
+	
+/**************************************************
+gpio数可配置
+gpio pin脚可配置
+行列可配置，最大8*8
+
+mem_kscan_row_nums:行数
+mem_kscan_col_nums:列数
+mem_kscan_col_gpio_pin:列GPIO
+mem_kscan_row_gpio_pin:行GPIO
+
+mem_kscan_avoid_shake_delay_time: 消抖时间，如果为0，没有消抖。消抖时间:X * 3.5us
+
+**************************************************/
+frmt_kscan:
+	fetch 2, mem_kscan_analysis_interval_timeout   
+// 	call ice_break
+	nrtn blank
+	jam 0, mem_keypress_analysis_flag
+
+	setarg 0
+	store 8, mem_kscan_record_keypress
+frmt_kscan_get_row_state:
+	jam 0, mem_kscan_row_scanned
+	arg mem_kscan_row_gpio_pin, regc
+
+frmt_kscan_get_row_state_loop:
+	ifetcht 1, regc
+	call gpio_get_bit
+	call frmt_kscan_avoid_shake_and_record_key, true  //low , in
+
+	ifetcht 1, regc        //current row recover to pull up
+	call gpio_config_input
+	call frmt_kscan_recover_col_output_low  
+	
+	increase 1, regc
+	fetch 1, mem_kscan_row_scanned
+	pincrease 1
+	store 1, mem_kscan_row_scanned
+	fetcht 1, mem_kscan_row_nums
+	isub temp, null
+	nbranch frmt_kscan_get_row_state_loop, positive
+	rtn
+	
+frmt_kscan_press_GND_related:
+	fetch 1, mem_kscan_row_scanned
+	pincrease 1
+	fetcht 1, mem_kscan_col_nums
+	increase 1, temp
+	imul32 temp, pdata
+	iforce queue
+	fetch 8, mem_kscan_record_keypress
+	qset1 pdata
+	store 8, mem_kscan_record_keypress
+	rtn
+	
+frmt_kscan_set_default_avoid_shake_time:
+	arg 1, loopcnt
+	rtn
+	
+frmt_kscan_avoid_shake_and_record_key:
+
+	fetch 2, mem_kscan_avoid_shake_delay_time
+	iforce loopcnt
+	call frmt_kscan_set_default_avoid_shake_time, blank
+	call delay_ms_wait
+	ifetcht 1, regc
+	call gpio_get_bit
+	nrtn true
+	nop 12000 
+
+	ifetcht 1, regc
+	call gpio_get_bit
+	nrtn true
+	nop 12000 
+	
+	ifetcht 1, regc
+	call gpio_get_bit
+	nrtn true
+
+	call frmt_kscan_all_col_pull_up
+	ifetcht 1, regc //deal with GND
+	call gpio_get_bit
+	branch frmt_kscan_press_GND_related, true
+	
+frmt_kscan_check_col_elec_level:
+	ifetcht 1, regc
+	or temp, 0x80, temp
+	call gpio_config_output_patch
+	jam 0, mem_kscan_col_scanned	
+	arg mem_kscan_col_gpio_pin, rega
+frmt_kscan_check_col_elec_level_loop:  
+	ifetcht 1, rega
+	call gpio_get_bit  //only "pdata" , "temp"
+	call frmt_kscan_record_keypress, true  
+	
+	increase 1, rega
+	fetch 1, mem_kscan_col_scanned
+	pincrease 1
+	store 1, mem_kscan_col_scanned
+	fetcht 1, mem_kscan_col_nums
+	isub temp, null
+	nbranch frmt_kscan_check_col_elec_level_loop, positive	
+	rtn
+
+
+frmt_kscan_record_keypress:
+	fetch 1, mem_kscan_row_scanned
+	fetcht 1, mem_kscan_col_nums
+	increase 1, temp
+	imul32 temp, pdata
+	//nop 10000
+	fetcht 1, mem_kscan_col_scanned
+	increase 1, temp
+	iadd temp, pdata
+	iforce queue
+	enable true
+	fetch 8, mem_kscan_record_keypress
+	qsetflag true, pdata
+	store 8, mem_kscan_record_keypress
+
+// 	call ice_break
+// 	fetcht 8, mem_kscan_record_keypress
+// 	setarg LIGHT_ND21KEY_KEY_PAIRING2_COMBINATION
+// 	isub temp, null
+// 	call ice_break, zero
+	rtn
+frmt_kscan_all_col_pull_up:
+	arg mem_kscan_col_gpio_pin, rega
+	fetch 1, mem_kscan_col_nums
+	iforce loopcnt
+	branch frmt_kscan_input_pull_up_loop
+
+gpio_config_output_patch:	
+	setflip 7, temp
+	branch gpio_config_output
+
Index: program/app_light/remoter/frmt_fml_remoter_lib.prog
===================================================================
--- /branch/usb/usb_public_base/program/app_light/remoter/frmt_fml_remoter_lib.prog	(revision 0)
+++ /branch/usb/usb_public_base/program/app_light/remoter/frmt_fml_remoter_lib.prog	(working copy)
@@ -0,0 +1,542 @@
+
+
+
+frmt_light_lighten_short_press:
+	fetch 1, mem_light_color_and_lgtness_long_press_adv_enable
+	beq 1, frmt_light_lighten
+	jam LIGHT_LIGHTEN_RELEASE_ADV_FLAG, mem_light_release_adv_flag
+	branch frmt_light_light_color_and_lightness_change_common
+
+frmt_light_darken_short_press:
+	fetch 1, mem_light_color_and_lgtness_long_press_adv_enable
+	beq 1, frmt_light_darken
+	jam LIGHT_DARKEN_RELEASE_ADV_FLAG, mem_light_release_adv_flag
+	branch frmt_light_light_color_and_lightness_change_common
+
+frmt_light_to_W_short_press:
+	fetch 1, mem_light_color_and_lgtness_long_press_adv_enable
+	beq 1, frmt_light_to_W
+	jam LIGHT_TO_W_RELEASE_ADV_FLAG, mem_light_release_adv_flag
+	branch frmt_light_light_color_and_lightness_change_common
+
+frmt_light_to_Y_short_press:
+	fetch 1, mem_light_color_and_lgtness_long_press_adv_enable
+	beq 1,frmt_light_to_Y
+	jam LIGHT_TO_Y_RELEASE_ADV_FLAG, mem_light_release_adv_flag
+frmt_light_light_color_and_lightness_change_common:
+	fetch 2, mem_light_short_keypress_timeout
+	nrtn blank
+	jam 0, mem_le_adv_enable
+	jam SHORT_PRESS_TIMEOUT, mem_light_short_keypress_timeout
+	rtn	
+
+frmt_light_to_Y:
+	bpatchx patch2c_2,mem_patch2c
+	fetch 1,mem_special_agreemeet_enable
+	beq 1, gem_light_to_Y
+	beq 2,key_light_to_Y
+	jam 0, mem_light_release_adv_flag
+	call frmt_light_to_Y_V2
+	jam LIGHT_CMD_FTD_COLOR_STATE_CHANGE, mem_FTD_adv_raw
+	jam 0x18, mem_FTD_adv_raw_reserved
+	call frmt_light_set_PDU_common_short_press_with_3Bytes_data_reset		
+	branch frmt_adv_rear_6bytes_and_whitening
+
+
+frmt_light_to_W:
+	bpatchx patch2c_3,mem_patch2c
+	fetch 1,mem_special_agreemeet_enable
+	beq 1, gem_light_to_W
+	beq 2,key_light_to_W
+	jam 0, mem_light_release_adv_flag
+	call frmt_light_to_W_V2
+	jam LIGHT_CMD_FTD_COLOR_STATE_CHANGE, mem_FTD_adv_raw
+	jam 0x24, mem_FTD_adv_raw_reserved
+	call frmt_light_set_PDU_common_short_press_with_3Bytes_data_reset
+	branch frmt_adv_rear_6bytes_and_whitening
+
+frmt_light_darken:
+	bpatchx patch2c_4,mem_patch2c
+	fetch 1,mem_special_agreemeet_enable
+	beq 1, gem_light_darken
+	beq 2, key_light_darken
+	jam 0, mem_light_release_adv_flag
+	call frmt_light_darken_V2
+	jam LIGHT_CMD_FTD_COLOR_STATE_CHANGE, mem_FTD_adv_raw
+	jam 0x28, mem_FTD_adv_raw_reserved
+	call frmt_light_set_PDU_common_short_press_with_3Bytes_data_reset
+	branch frmt_adv_rear_6bytes_and_whitening
+
+frmt_light_lighten:
+	bpatchx patch2c_5,mem_patch2c
+	fetch 1,mem_special_agreemeet_enable
+	beq 1, gem_light_lighten
+	beq 2, key_light_lighten
+	jam 0, mem_light_release_adv_flag	
+	call frmt_light_lighten_V2
+	jam LIGHT_CMD_FTD_COLOR_STATE_CHANGE, mem_FTD_adv_raw
+	jam 0x14, mem_FTD_adv_raw_reserved
+	call frmt_light_set_PDU_common_short_press_with_3Bytes_data_reset
+	branch frmt_adv_rear_6bytes_and_whitening
+
+frmt_light_set_PDU_common_short_press_with_3Bytes_data_reset:
+	setarg 0    //clear data part (3 Bytes)
+	store 3, mem_FTD_adv_raw_data	
+	branch frmt_light_set_PDU_common_short_press
+
+
+
+frmt_light_release_set1_and_long_press_set1:
+	jam 1, mem_light_num_of_long_press
+	call frmt_light_long_press_flag_reset
+	jam 1, mem_light_release_adv_flag
+	rtn
+
+frmt_light_release_set2_and_long_press_set2:
+	jam 2, mem_light_num_of_long_press
+	call frmt_light_long_press_flag_reset
+	jam 2, mem_light_release_adv_flag
+	rtn
+
+frmt_light_release_set3_and_long_press_set3:
+	jam 3, mem_light_num_of_long_press
+	call frmt_light_long_press_flag_reset
+	jam 3, mem_light_release_adv_flag
+	rtn
+
+frmt_light_long_press_flag_reset:
+	fetch 2, mem_long_press_timeout
+	nrtn blank
+	fetch 2,mem_claer_code_time
+	store 2, mem_long_press_timeout
+	pincrease 1
+	store 2, mem_light_lpm_enable_timeout
+	fetch 1,mem_special_agreemeet_enable
+	sub pdata,1,null
+	branch gem_long_keypress_time,zero	
+	rtn
+
+frmt_light_night_light:
+	call frmt_light_night_light_V2
+	jam LIGHT_CMD_NIGHT_LIGHT, mem_FTD_adv_raw
+	branch frmt_adv_rear_6bytes_and_whitening_and_set_PDU_common_short_press	
+
+frmt_light_master_pairing:
+	jam 0, mem_groups_num
+	jam 0, mem_ble_v2_group_index
+
+frmt_light_pairing_process:
+	setarg KEY_PRESS_LED_ON_TIME
+	store 2, mem_indicator_led_turn_on_timeout
+	jam 1, mem_indicator_turn_on_enable
+frmt_light_pairing_process_without_led_flag_set:	
+	jam 1, mem_le_adv_enable
+	fetch 2, mem_light_adv_time
+	lshift2 pdata, pdata
+	store 2, mem_ble_light_adv_timeout
+	pincrease 1
+	store 2, mem_light_lpm_enable_timeout	
+	bpatchx patch2c_6,mem_patch2c
+	
+	call frmt_light_master_pairing_V2
+	fetch 1, mem_light_manufacture_id
+	store 1, mem_FTD_adv_raw_reserved
+	jam LIGHT_CMD_PAIRING_CODE, mem_FTD_adv_raw
+
+	fetch 1, mem_FTD_adv_raw_packet_num
+	pincrease 1
+	store 1, mem_FTD_adv_raw_packet_num
+	jam 0x81, mem_FTD_adv_raw_data+2
+	
+	fetch 1,mem_ble_v2_maintype
+	sub pdata,3,null
+	call frmt_fan_lamp,zero
+	fetch 1,mem_ble_v2_maintype
+	sub pdata,5,null
+	call frmt_solar_lamp,zero
+	
+	call frmt_light_groups_pairing_address_set_set
+	branch frmt_adv_rear_6bytes_and_whitening
+	
+frmt_light_groups_pairing_address_set_set:
+	fetch 2, mem_FTD_adv_raw_device_add_temp
+	arg 0xf0ff, temp
+	iand temp, pdata
+	store 2, mem_FTD_adv_raw_data
+	branch frmt_light_groups_address_set
+
+frmt_light_clear_code:
+// 	call ice_break
+	jam 1, mem_indicator_turn_on_enable
+
+	jam 1, mem_le_adv_enable
+	setarg KEY_PRESS_LED_ON_TIME
+	lshift2 pdata, pdata
+	store 2, mem_indicator_led_turn_on_timeout
+	fetch 2,mem_light_adv_time
+	lshift2 pdata, pdata
+
+	store 2, mem_ble_light_adv_timeout
+	pincrease 1
+	store 2, mem_light_lpm_enable_timeout
+	
+	bpatchx patch2c_7,mem_patch2c
+	call frmt_light_clear_code_V2
+	jam LIGHT_CMD_CLEAR_CODE, mem_FTD_adv_raw
+	setarg LIGHT_FTD_CLEAR_CODE_ADDR
+	store 3, mem_FTD_adv_raw_device_add
+	fetch 1, mem_FTD_adv_raw_packet_num
+	pincrease 1
+	store 1, mem_FTD_adv_raw_packet_num
+	
+	fetch 1,mem_ble_v2_maintype
+	sub pdata,3,null
+	call frmt_fan_lamp,zero
+	fetch 1,mem_ble_v2_maintype
+	sub pdata,5,null
+	call frmt_solar_lamp,zero
+	branch frmt_adv_rear_6bytes_and_whitening
+
+frmt_light_master_on_and_long_press_set0:
+	jam 0, mem_light_num_of_long_press
+	call frmt_light_long_press_flag_reset
+frmt_light_master_on:
+	jam 0, mem_groups_num
+	call frmt_light_master_on_V2
+	fetch 1,mem_special_agreemeet_enable
+	beq 1, gem_light_master_on
+	beq 2, key_light_master_on
+frmt_light_on_without_group_set:
+	jam 1, mem_light_on_and_off_flag
+	jam LIGHT_CMD_TURN_ON, mem_FTD_adv_raw
+	call frmt_light_groups_address_set
+	branch frmt_adv_rear_6bytes_and_whitening_and_set_PDU_common_short_press
+
+frmt_light_master_off_and_long_press_set0:
+	jam 0, mem_light_num_of_long_press
+	call frmt_light_long_press_flag_reset
+	branch frmt_light_master_off
+frmt_light_master_on_and_off:
+	fetch 1, mem_light_on_and_off_flag
+	branch frmt_light_master_on, blank
+frmt_light_master_off:
+	call frmt_light_master_off_V2
+	jam 0, mem_groups_num
+	fetch 1,mem_special_agreemeet_enable
+	beq 1, gem_light_master_off	
+	beq 2, key_light_master_off	
+frmt_light_off_without_group_set:
+	jam 0, mem_light_on_and_off_flag	
+	jam LIGHT_CMD_TURN_OFF, mem_FTD_adv_raw
+	call frmt_light_groups_address_set
+	branch frmt_adv_rear_6bytes_and_whitening_and_set_PDU_common_short_press
+
+frmt_light_on_and_off_1opcode_and_long_press_set0:
+	jam 0, mem_light_num_of_long_press
+	call frmt_light_long_press_flag_reset
+frmt_light_on_and_off_1opcode:
+	call frmt_light_on_and_off_1opcode_v2
+	jam LIGHT_CMD_TURN_ON_AND_OFF, mem_FTD_adv_raw
+	branch frmt_adv_rear_6bytes_and_whitening_and_set_PDU_common_short_press
+
+frmt_light_color_switch_WY_only_payload_set:
+	jam LIGHT_CMD_COLOR_SWTICH, mem_FTD_adv_raw
+	jam LIGHT_DATA_PART_FF, mem_FTD_adv_raw_data
+	jam LIGHT_DATA_PART_FF, mem_FTD_adv_raw_data+1
+	jam LIGHT_CMD_FTD_COLOR_SWTICH_RESERVED, mem_FTD_adv_raw_reserved
+	rtn
+frmt_light_color_switch_W_only_payload_set:
+	jam LIGHT_CMD_COLOR_SWTICH, mem_FTD_adv_raw
+	jam LIGHT_DATA_PART_FF, mem_FTD_adv_raw_data
+	jam LIGHT_CMD_FTD_COLOR_SWTICH_RESERVED, mem_FTD_adv_raw_reserved
+	rtn
+	
+frmt_light_color_switch_Y_only_payload_set:
+	jam LIGHT_CMD_COLOR_SWTICH, mem_FTD_adv_raw
+	jam LIGHT_DATA_PART_FF, mem_FTD_adv_raw_data+1
+	jam LIGHT_CMD_FTD_COLOR_SWTICH_RESERVED, mem_FTD_adv_raw_reserved
+	rtn
+
+frmt_light_color_switch:
+	fetch 1,mem_light_color_switch_cnt
+	sub pdata,3,null
+	call frmt_color_switch_cnt_set0,zero
+	beq 0,frmt_light_color_switch_WY
+	beq 1,frmt_light_color_switch_W
+	beq 2,frmt_light_color_switch_Y
+	rtn
+frmt_color_switch_cnt_set0:
+	setarg 0
+	store 1,mem_light_color_switch_cnt
+	rtn
+frmt_light_color_switch_WY:
+	fetch 1, mem_light_color_switch_cnt
+	pincrease 1
+	store 1,mem_light_color_switch_cnt
+	call frmt_light_color_switch_WY_V2
+	fetch 1,mem_special_agreemeet_enable
+	beq 1,gem_light_color_switch
+	call frmt_light_color_switch_WY_only_payload_set
+	branch frmt_adv_rear_6bytes_and_whitening_and_set_PDU_common_short_press	
+frmt_light_color_switch_W:
+	fetch 1, mem_light_color_switch_cnt
+	pincrease 1
+	store 1,mem_light_color_switch_cnt
+	call frmt_light_color_switch_W_V2
+	fetch 1,mem_special_agreemeet_enable
+	beq 1,gem_light_color_switch
+	call frmt_light_color_switch_W_only_payload_set
+	branch frmt_adv_rear_6bytes_and_whitening_and_set_PDU_common_short_press
+frmt_light_color_switch_Y:
+	fetch 1, mem_light_color_switch_cnt
+	pincrease 1
+	store 1,mem_light_color_switch_cnt
+	call frmt_light_color_switch_Y_V2
+	fetch 1,mem_special_agreemeet_enable
+	beq 1,gem_light_color_switch
+	call frmt_light_color_switch_Y_only_payload_set
+	branch frmt_adv_rear_6bytes_and_whitening_and_set_PDU_common_short_press
+
+frmt_light_aid_turn_on_and_off:
+	fetch 1,mem_light_aid_swtich_flag  // 0:on   1:off
+	beq 0, frmt_light_aid_turn_on
+frmt_light_aid_turn_off:
+	call frmt_light_aid_turn_off_V2
+	jam 0, mem_light_aid_swtich_flag
+	fetch 1,mem_special_agreemeet_enable
+	beq 1,gem_light_aid_turn_onoff
+	beq 2,key_light_Aux_lamp_on_and_off_KY
+	jam LIGHT_CMD_AID_TURN_OFF, mem_FTD_adv_raw 
+	branch frmt_adv_rear_6bytes_and_whitening_and_set_PDU_common_short_press	
+frmt_light_aid_turn_on:
+	call frmt_light_aid_turn_on_V2
+	jam 1,mem_light_aid_swtich_flag
+	fetch 1,mem_special_agreemeet_enable
+	beq 1,gem_light_aid_turn_onoff
+	beq 2,key_light_Aux_lamp_on_and_off_KY
+	jam LIGHT_CMD_AID_TURN_ON, mem_FTD_adv_raw
+	branch frmt_adv_rear_6bytes_and_whitening_and_set_PDU_common_short_press
+
+frmt_light_pcnt_50_and_100percent:
+	fetch 1,mem_light_brightness_switch_flag
+	beq 0, frmt_light_pcnt_50_percent
+frmt_light_pcnt_100_percent:
+	call frmt_light_pcnt_100_percent_V2
+	jam LIGHT_CMD_COLOR_SWTICH, mem_FTD_adv_raw
+	jam LIGHT_DATA_PART_FF,  mem_FTD_adv_raw_data
+	jam LIGHT_DATA_PART_FF,  mem_FTD_adv_raw_data+1
+	jam 0, mem_light_brightness_switch_flag
+	jam 2, mem_FTD_adv_raw_reserved	
+	branch frmt_adv_rear_6bytes_and_whitening_and_set_PDU_common_short_press
+frmt_light_pcnt_50_percent:
+	call frmt_light_pcnt_50_percent_V2
+	jam 1, mem_FTD_adv_raw_reserved
+	jam LIGHT_CMD_COLOR_SWTICH, mem_FTD_adv_raw
+	jam LIGHT_FTD_DATA_PART_PCNT_50PERCENT,  mem_FTD_adv_raw_data
+	jam LIGHT_FTD_DATA_PART_PCNT_50PERCENT,  mem_FTD_adv_raw_data+1
+	jam 1, mem_light_brightness_switch_flag
+	branch frmt_adv_rear_6bytes_and_whitening_and_set_PDU_common_short_press
+
+frmt_light_rgb_auto:
+	fetch 1,mem_special_agreemeet_enable
+	sub pdata,1,null
+	call gem_light_rgb_auto,zero
+	jam 1,mem_light_rgb_on_and_off_flag
+	fetch 1,mem_light_rgb_auto_flag
+	beq 0,frmt_light_rgb_circulation_1e
+frmt_light_rgb_circulation_1f:						//off
+	call frmt_light_rgb_circulation_1f_V2
+	jam LIGHT_CMD_RGB_1F, mem_FTD_adv_raw 
+	jam 0, mem_light_rgb_auto_flag
+	branch frmt_adv_rear_6bytes_and_whitening_and_set_PDU_common_short_press
+frmt_light_rgb_circulation_1e:						//on
+	call frmt_light_rgb_circulation_1e_V2
+	jam LIGHT_CMD_RGB_1E, mem_FTD_adv_raw 
+	jam 1, mem_light_rgb_auto_flag
+	branch frmt_adv_rear_6bytes_and_whitening_and_set_PDU_common_short_press	
+
+frmt_light_rgb_manual:
+	fetch 1,mem_special_agreemeet_enable
+	sub pdata,1,null
+	call gem_light_rgb_step,zero
+	jam LIGHT_CMD_RGB_MANNUL, mem_FTD_adv_raw
+	fetch 1, mem_light_rgb_hand_actuated_flag
+	beq 0,frmt_light_rgb_manual0
+	beq 1,frmt_light_rgb_manual1
+	beq 2,frmt_light_rgb_manual2
+	beq 3,frmt_light_rgb_manual3
+	beq 4,frmt_light_rgb_manual4
+	beq 5,frmt_light_rgb_manual5
+	beq 6,frmt_light_rgb_manual6
+	rtn
+frmt_light_rgb_manual6:	
+	call frmt_light_rgb_manual6_V2
+	jam 0, mem_light_rgb_hand_actuated_flag
+	jam  LIGHT_DATA_PART_FF, mem_FTD_adv_raw_data
+	jam  LIGHT_DATA_PART_FF, mem_FTD_adv_raw_data+1
+	jam  LIGHT_DATA_PART_FF, mem_FTD_adv_raw_data+2
+	branch frmt_adv_rear_6bytes_and_whitening_and_set_PDU_common_short_press
+
+frmt_light_rgb_manual5:
+	call frmt_light_rgb_manual5_V2
+	jam 6, mem_light_rgb_hand_actuated_flag
+	jam  LIGHT_DATA_PART_FF, mem_FTD_adv_raw_data
+	jam  LIGHT_DATA_PART_FF, mem_FTD_adv_raw_data+2
+	branch frmt_adv_rear_6bytes_and_whitening_and_set_PDU_common_short_press
+
+frmt_light_rgb_manual4:
+	call frmt_light_rgb_manual4_V2
+	jam 5, mem_light_rgb_hand_actuated_flag
+	jam  LIGHT_DATA_PART_FF, mem_FTD_adv_raw_data+1
+	jam  LIGHT_DATA_PART_FF, mem_FTD_adv_raw_data+2
+	branch frmt_adv_rear_6bytes_and_whitening_and_set_PDU_common_short_press
+
+frmt_light_rgb_manual3:
+	call frmt_light_rgb_manual3_V2
+	jam 4, mem_light_rgb_hand_actuated_flag
+	jam  LIGHT_DATA_PART_FF, mem_FTD_adv_raw_data
+	jam  LIGHT_DATA_PART_FF, mem_FTD_adv_raw_data+1
+	branch frmt_adv_rear_6bytes_and_whitening_and_set_PDU_common_short_press	
+
+frmt_light_rgb_manual2:
+	call frmt_light_rgb_manual2_V2
+	jam 3, mem_light_rgb_hand_actuated_flag
+	jam  LIGHT_DATA_PART_FF, mem_FTD_adv_raw_data+2
+	branch frmt_adv_rear_6bytes_and_whitening_and_set_PDU_common_short_press
+
+frmt_light_rgb_manual1:
+	call frmt_light_rgb_manual1_V2
+	jam 2, mem_light_rgb_hand_actuated_flag
+	jam  LIGHT_DATA_PART_FF, mem_FTD_adv_raw_data+1
+	branch frmt_adv_rear_6bytes_and_whitening_and_set_PDU_common_short_press
+
+frmt_light_rgb_manual0:
+	call frmt_light_rgb_manual0_V2
+	jam 1, mem_light_rgb_hand_actuated_flag
+	jam  LIGHT_DATA_PART_FF, mem_FTD_adv_raw_data
+	branch frmt_adv_rear_6bytes_and_whitening_and_set_PDU_common_short_press
+
+frmt_light_timing_1min:
+	call frmt_light_timing_1min_V2
+	jam 1, mem_FTD_adv_raw_data	
+frmt_light_timing_off:
+	jam LIGHT_CMD_DELAY_OFF, mem_FTD_adv_raw
+	branch frmt_adv_rear_6bytes_and_whitening_and_set_PDU_common_short_press
+
+frmt_light_group1_on_and_long_press_set1:
+	jam 1, mem_light_num_of_long_press
+	call frmt_light_long_press_flag_reset	
+frmt_light_group1_on:
+	call frmt_light_group1_on_V2
+	jam 1, mem_light_group1_on_and_off_flag
+	jam LIGHT_CMD_TURN_ON, mem_FTD_adv_raw
+	jam 1, mem_groups_num
+	branch frmt_adv_rear_6bytes_and_whitening_and_set_PDU_common_short_press
+
+frmt_light_group2_on_and_long_press_set2:
+	jam 2, mem_light_num_of_long_press
+	call frmt_light_long_press_flag_reset	
+frmt_light_group2_on:
+	call frmt_light_group2_on_V2
+	jam 1, mem_light_group2_on_and_off_flag
+	jam LIGHT_CMD_TURN_ON, mem_FTD_adv_raw
+	jam 2, mem_groups_num
+	branch frmt_adv_rear_6bytes_and_whitening_and_set_PDU_common_short_press
+
+frmt_light_group3_on_and_long_press_set3:
+	jam 3, mem_light_num_of_long_press
+	call frmt_light_long_press_flag_reset	
+frmt_light_group3_on:
+	jam 1, mem_light_group3_on_and_off_flag
+	jam LIGHT_CMD_TURN_ON, mem_FTD_adv_raw
+	jam 3, mem_groups_num
+	branch frmt_adv_rear_6bytes_and_whitening_and_set_PDU_common_short_press
+	
+frmt_light_group4_on_and_long_press_set4:
+	jam 4, mem_light_num_of_long_press
+	call frmt_light_long_press_flag_reset	
+frmt_light_group4_on:
+	call frmt_light_group4_on_V2
+	jam 1, mem_light_group4_on_and_off_flag
+	jam LIGHT_CMD_TURN_ON, mem_FTD_adv_raw
+	jam 4, mem_groups_num
+	branch frmt_adv_rear_6bytes_and_whitening_and_set_PDU_common_short_press
+	
+frmt_light_group1_on_and_off_and_long_press_set1:
+	jam 1, mem_light_num_of_long_press
+	call frmt_light_long_press_flag_reset
+frmt_light_group1_on_and_off:
+	fetch 1, mem_light_group1_on_and_off_flag
+	branch frmt_light_group1_on, blank
+frmt_light_group1_off:
+	call frmt_light_group1_off_V2
+	jam 0, mem_light_group1_on_and_off_flag
+	jam LIGHT_CMD_TURN_OFF, mem_FTD_adv_raw
+	jam 1, mem_groups_num
+	branch frmt_adv_rear_6bytes_and_whitening_and_set_PDU_common_short_press
+
+
+frmt_light_group2_on_and_off_and_long_press_set2:
+	jam 2, mem_light_num_of_long_press
+	call frmt_light_long_press_flag_reset
+frmt_light_group2_on_and_off:
+	fetch 1, mem_light_group2_on_and_off_flag
+	branch frmt_light_group2_on, blank
+frmt_light_group2_off:	
+	call frmt_light_group2_off_V2
+	jam 0, mem_light_group2_on_and_off_flag
+	jam LIGHT_CMD_TURN_OFF, mem_FTD_adv_raw
+	jam 2, mem_groups_num
+	//call p_light_groups_address_set
+	branch frmt_adv_rear_6bytes_and_whitening_and_set_PDU_common_short_press
+
+frmt_light_group3_on_and_off_and_long_press_set3:
+	jam 3, mem_light_num_of_long_press
+	call frmt_light_long_press_flag_reset
+frmt_light_group3_on_and_off:
+	fetch 1, mem_light_group3_on_and_off_flag
+	branch frmt_light_group3_on, blank
+frmt_light_group3_off:
+	call frmt_light_group3_off_V2
+	jam 0, mem_light_group3_on_and_off_flag
+	jam LIGHT_CMD_TURN_OFF, mem_FTD_adv_raw
+	jam 3, mem_groups_num
+	//call p_light_groups_address_set	
+	branch frmt_adv_rear_6bytes_and_whitening_and_set_PDU_common_short_press
+
+frmt_light_group4_on_and_off_and_long_press_set4:
+	jam 4, mem_light_num_of_long_press
+	call frmt_light_long_press_flag_reset
+frmt_light_group4_on_and_off:
+	fetch 1, mem_light_group4_on_and_off_flag
+	branch frmt_light_group4_on, blank
+frmt_light_group4_off:
+	call frmt_light_group4_off_V2
+	jam 0, mem_light_group4_on_and_off_flag
+	jam LIGHT_CMD_TURN_OFF, mem_FTD_adv_raw
+	jam 4, mem_groups_num
+	//call p_light_groups_address_set
+	branch frmt_adv_rear_6bytes_and_whitening_and_set_PDU_common_short_press
+
+frmt_light_pairing_group1:	
+	jam 1, mem_groups_num
+	jam 1, mem_ble_v2_group_index
+	branch frmt_light_pairing_process
+
+frmt_light_pairing_group2:	
+	jam 2, mem_groups_num
+	jam 2, mem_ble_v2_group_index
+	branch frmt_light_pairing_process
+
+frmt_light_pairing_group3:	
+	jam 3, mem_groups_num
+	jam 3, mem_ble_v2_group_index
+	branch frmt_light_pairing_process
+
+frmt_light_pairing_group4:	
+	jam 4, mem_groups_num
+	jam 4, mem_ble_v2_group_index
+	branch frmt_light_pairing_process
+
+
+	
Index: program/app_light/remoter/frmt_fml_remoter_lib_fan.prog
===================================================================
--- /branch/usb/usb_public_base/program/app_light/remoter/frmt_fml_remoter_lib_fan.prog	(revision 0)
+++ /branch/usb/usb_public_base/program/app_light/remoter/frmt_fml_remoter_lib_fan.prog	(working copy)
@@ -0,0 +1,91 @@
+
+frmt_fan_master_off:
+	call frmt_fan_master_off_v2
+	jam FAN_CMD_MASTER_ON_AND_OFF, mem_FTD_adv_raw
+	jam 0, mem_FTD_adv_raw_data	
+	branch frmt_adv_rear_6bytes_and_whitening_and_set_PDU_common_short_press
+
+frmt_fan_turning_forward_and_reverse:
+	fetch 1, mem_fan_direction_alternant
+	branch frmt_fan_turning_reverse, blank
+	jam 0, mem_fan_direction_alternant
+	branch frmt_fan_turning_forward
+frmt_fan_turning_reverse:
+	call frmt_fan_turing_reverse_v2
+	jam 1, mem_fan_direction_alternant
+	jam FAN_CMD_DIRECTION, mem_FTD_adv_raw
+	jam 1, mem_FTD_adv_raw_data
+	branch frmt_adv_rear_6bytes_and_whitening_and_set_PDU_common_short_press
+frmt_fan_turning_forward:
+	call frmt_fan_turing_forward_v2
+	jam FAN_CMD_DIRECTION, mem_FTD_adv_raw
+	jam 0, mem_FTD_adv_raw_data
+	branch frmt_adv_rear_6bytes_and_whitening_and_set_PDU_common_short_press
+
+frmt_fan_natural_wind:
+	call frmt_fan_natural_wind_v2
+	jam FAN_CMD_MODE, mem_FTD_adv_raw
+	jam 2, mem_FTD_adv_raw_data
+	branch frmt_adv_rear_6bytes_and_whitening_and_set_PDU_common_short_press	
+
+frmt_fan_tap_position_1:
+	call frmt_fan_tap_position_1_v2
+	setarg 1
+frmt_fan_tap_position_common:
+	store 1, mem_FTD_adv_raw_data
+	jam FAN_CMD_SPEED_32,mem_FTD_adv_raw
+	jam 6, mem_FTD_adv_raw_data+1	
+	branch frmt_adv_rear_6bytes_and_whitening_and_set_PDU_common_short_press
+
+frmt_fan_tap_position_2:
+	call frmt_fan_tap_position_2_v2
+	setarg 2
+	branch frmt_fan_tap_position_common
+	
+frmt_fan_tap_position_3:
+	call frmt_fan_tap_position_3_v2
+	setarg 3
+	branch frmt_fan_tap_position_common
+	
+frmt_fan_tap_position_4:
+	call frmt_fan_tap_position_4_v2
+	setarg 4
+	branch frmt_fan_tap_position_common
+	
+frmt_fan_tap_position_5:
+	call frmt_fan_tap_position_5_v2
+	setarg 5
+	branch frmt_fan_tap_position_common
+	
+frmt_fan_tap_position_6:
+	call frmt_fan_tap_position_6_v2
+	setarg 6
+	branch frmt_fan_tap_position_common
+
+frmt_fan_stop_fan_and_long_press_set1:
+	jam 1, mem_light_num_of_long_press
+	call frmt_light_long_press_flag_reset
+frmt_fan_stop_fan:
+	call frmt_fan_stop_fan_v2
+	jam FAN_CMD_SPEED_31,mem_FTD_adv_raw
+	jam 0, mem_FTD_adv_raw_data
+	branch frmt_adv_rear_6bytes_and_whitening_and_set_PDU_common_short_press
+
+
+frmt_fan_deflector_on_and_off:
+	fetch 1, mem_fan_deflector_flag
+	branch frmt_fan_deflector_on, blank
+frmt_fan_deflector_off:
+	call frmt_fan_deflector_off_v2
+	jam 0, mem_fan_deflector_flag
+	jam FAN_CMD_DEFLECTOR, mem_FTD_adv_raw
+	jam 0, mem_FTD_adv_raw_data
+	branch frmt_adv_rear_6bytes_and_whitening_and_set_PDU_common_short_press	
+	
+frmt_fan_deflector_on:
+	call frmt_fan_deflector_on_v2
+	jam 1, mem_fan_deflector_flag
+	jam FAN_CMD_DEFLECTOR, mem_FTD_adv_raw
+	jam 1, mem_FTD_adv_raw_data
+	branch frmt_adv_rear_6bytes_and_whitening_and_set_PDU_common_short_press
+
Index: program/app_light/remoter/frmt_fml_remoter_lib_fan_v2.prog
===================================================================
--- /branch/usb/usb_public_base/program/app_light/remoter/frmt_fml_remoter_lib_fan_v2.prog	(revision 0)
+++ /branch/usb/usb_public_base/program/app_light/remoter/frmt_fml_remoter_lib_fan_v2.prog	(working copy)
@@ -0,0 +1,65 @@
+
+
+frmt_fan_master_off_v2:
+	setarg FAN_CMD_MASTER_ON_AND_OFF_V2
+	store 2, mem_ble_v2_cmd
+	branch frmt_ble_v2_encoder_pack
+
+frmt_fan_turing_reverse_v2:
+	jam 1, mem_ble_v2_para+1
+frmt_fan_turing_forward_v2:
+	setarg FAN_CMD_WIND_DIRECTION_V2
+	store 2, mem_ble_v2_cmd
+	branch frmt_ble_v2_encoder_pack
+
+frmt_fan_natural_wind_v2:
+	jam 0x02, mem_ble_v2_para+1
+frmt_fan_mode_sel_common_v2:
+	setarg FAN_CMD_MODE_SEL_V2
+	store 2, mem_ble_v2_cmd
+	branch frmt_ble_v2_encoder_pack
+
+frmt_fan_tap_position_1_v2:
+	setarg 1
+frmt_fan_tap_position_common_v2:
+	store 1, mem_ble_v2_para+2
+	setarg FAN_CMD_WIND_SPEED_V2
+	store 2, mem_ble_v2_cmd
+	jam 0x20, mem_ble_v2_para+1
+	branch frmt_ble_v2_encoder_pack
+
+frmt_fan_tap_position_2_v2:
+	setarg 2
+	branch frmt_fan_tap_position_common_v2
+	
+frmt_fan_tap_position_3_v2:
+	setarg 3
+	branch frmt_fan_tap_position_common_v2	
+
+frmt_fan_tap_position_4_v2:
+	setarg 4
+	branch frmt_fan_tap_position_common_v2	
+
+frmt_fan_tap_position_5_v2:
+	setarg 5
+	branch frmt_fan_tap_position_common_v2	
+	
+frmt_fan_tap_position_6_v2:
+	setarg 6
+	branch frmt_fan_tap_position_common_v2	
+
+frmt_fan_stop_fan_v2:
+	setarg 0
+	branch frmt_fan_tap_position_common_v2
+
+
+frmt_fan_deflector_on_v2:
+	jam 1, mem_ble_v2_para+1
+frmt_fan_deflector_off_v2:	
+	setarg FAN_CMD_DEFLECTOR_V2
+	store 2, mem_ble_v2_cmd
+	branch frmt_ble_v2_encoder_pack
+
+
+
+
Index: program/app_light/remoter/frmt_fml_remoter_lib_v2.prog
===================================================================
--- /branch/usb/usb_public_base/program/app_light/remoter/frmt_fml_remoter_lib_v2.prog	(revision 0)
+++ /branch/usb/usb_public_base/program/app_light/remoter/frmt_fml_remoter_lib_v2.prog	(working copy)
@@ -0,0 +1,234 @@
+
+frmt_light_to_Y_V2:
+	jam 0x18, mem_ble_v2_para+1
+	branch frmt_light_common
+
+frmt_light_to_W_V2:
+	jam 0x24, mem_ble_v2_para+1
+	branch frmt_light_common
+
+
+frmt_light_darken_V2:
+	jam 0x28, mem_ble_v2_para+1
+	branch frmt_light_common
+	
+
+frmt_light_lighten_V2:
+	jam 0x14, mem_ble_v2_para+1
+	branch frmt_light_common
+
+frmt_light_common:
+	setarg LIGHT_CMD_LIGHT_CTL_V2
+	store 2, mem_ble_v2_cmd
+	branch frmt_ble_v2_encoder_pack
+
+frmt_ble_v2_encoder_pack:
+	call frmt_ble_data_set
+	fetch 1,mem_light_manufacture_id2_v2
+	ncall frmt_have_id2_v2,blank
+	rtn
+	
+frmt_have_id2_v2:
+	arg FTD_PDU_LEN, loopcnt
+	arg mem_ble_v2_pdu, contr
+	arg mem_ble_v2_pdu_2, contw
+	call memcpy_fast
+
+	fetch 1,mem_light_manufacture_id2_v2
+	store 1,mem_ble_v2_customer_id
+	fetch 1,mem_ble_v2_packet_num
+	pincrease -1
+	store 1,mem_ble_v2_packet_num
+	call frmt_ble_data_set
+	fetch 1,mem_ble_v2_customer_id_copy
+	store 1,mem_ble_v2_customer_id
+	rtn
+
+frmt_light_night_light_V2:
+	setarg LIGHT_CMD_NIGHT_LIGHT_V2
+	branch frmt_ble_v2_encoder_with_cmd_store_and_para_set0	
+
+
+frmt_light_master_pairing_V2:
+	setarg CMD_PAIRING
+frmt_ble_v2_encoder_with_cmd_store_and_para_set0:
+	store 2, mem_ble_v2_cmd
+	setarg 0
+	store 4, mem_ble_v2_para
+	branch frmt_ble_v2_encoder_pack
+
+frmt_light_clear_code_V2:
+	setarg CMD_CLEAR_CODE
+	branch frmt_ble_v2_encoder_with_cmd_store_and_para_set0	
+
+frmt_light_master_on_V2:
+	jam 0, mem_ble_v2_group_index
+frmt_light_turn_on_common:	
+	setarg LIGHT_CMD_TURN_ON_V2
+	branch frmt_ble_v2_encoder_with_cmd_store_and_para_set0
+
+frmt_light_master_off_V2:
+	jam 0, mem_ble_v2_group_index
+frmt_light_turn_off_common:	
+	setarg LIGHT_CMD_TURN_OFF_V2
+	branch frmt_ble_v2_encoder_with_cmd_store_and_para_set0
+
+frmt_light_on_and_off_1opcode_v2:
+	setarg LIGHT_CMD_TURN_ON_AND_OFF_V2	
+	branch frmt_ble_v2_encoder_with_cmd_store_and_para_set0
+
+frmt_light_color_switch_WY_V2:
+	setarg LIGHT_CMD_LIGHT_CTL_V2
+	store 2, mem_ble_v2_cmd
+	jam 0, mem_ble_v2_para
+	jam LIGHT_CMD_FTD_COLOR_SWTICH_RESERVED, mem_ble_v2_para+1
+	jam LIGHT_DATA_PART_FF, mem_ble_v2_para+2
+	jam LIGHT_DATA_PART_FF, mem_ble_v2_para+3
+	branch frmt_ble_v2_encoder_pack
+
+frmt_light_color_switch_W_V2:
+	setarg LIGHT_CMD_LIGHT_CTL_V2
+	store 2, mem_ble_v2_cmd
+	jam 0, mem_ble_v2_para
+	jam LIGHT_CMD_FTD_COLOR_SWTICH_RESERVED, mem_ble_v2_para+1
+	jam LIGHT_DATA_PART_FF, mem_ble_v2_para+2
+	branch frmt_ble_v2_encoder_pack
+
+frmt_light_color_switch_Y_V2:
+	setarg LIGHT_CMD_LIGHT_CTL_V2
+	store 2, mem_ble_v2_cmd
+	jam 0, mem_ble_v2_para
+	jam LIGHT_CMD_FTD_COLOR_SWTICH_RESERVED, mem_ble_v2_para+1
+	jam LIGHT_DATA_PART_FF, mem_ble_v2_para+3
+	branch frmt_ble_v2_encoder_pack
+
+frmt_light_aid_turn_off_V2:
+	setarg LIGHT_CMD_AIDED_LIGHT_TURN_OFF_V2
+	branch frmt_ble_v2_encoder_with_cmd_store_and_para_set0
+
+frmt_light_aid_turn_on_V2:
+	setarg LIGHT_CMD_AIDED_LIGHT_TURN_ON_V2
+	branch frmt_ble_v2_encoder_with_cmd_store_and_para_set0
+
+frmt_light_pcnt_100_percent_V2:
+	setarg LIGHT_CMD_LIGHT_CTL_V2
+	store 2, mem_ble_v2_cmd
+	jam 0, mem_ble_v2_para
+	jam 0x02, mem_ble_v2_para+1
+	jam LIGHT_DATA_PART_FF, mem_ble_v2_para+2
+	jam LIGHT_DATA_PART_FF, mem_ble_v2_para+3
+	branch frmt_ble_v2_encoder_pack
+
+frmt_light_pcnt_50_percent_V2:
+	setarg LIGHT_CMD_LIGHT_CTL_V2
+	store 2, mem_ble_v2_cmd
+	jam 0, mem_ble_v2_para
+	jam 0x01, mem_ble_v2_para+1
+	jam LIGHT_FTD_DATA_PART_PCNT_50PERCENT, mem_ble_v2_para+2
+	jam LIGHT_FTD_DATA_PART_PCNT_50PERCENT, mem_ble_v2_para+3
+	branch frmt_ble_v2_encoder_pack
+
+frmt_light_rgb_circulation_1f_V2:
+	setarg LIGHT_CMD_RGB_AUTO_TURN_OFF_V2
+	branch frmt_ble_v2_encoder_with_cmd_store_and_para_set0
+
+frmt_light_rgb_circulation_1e_V2:
+	setarg LIGHT_CMD_RGB_AUTO_TURN_ON_V2
+	branch frmt_ble_v2_encoder_with_cmd_store_and_para_set0
+
+frmt_light_rgb_manual0_V2:
+	setarg LIGHT_CMD_RGB_MANUAL_V2
+	store 2, mem_ble_v2_cmd
+	jam LIGHT_DATA_PART_FF, mem_ble_v2_para+1
+	branch frmt_ble_v2_encoder_pack
+	
+frmt_light_rgb_manual1_V2:
+	setarg LIGHT_CMD_RGB_MANUAL_V2
+	store 2, mem_ble_v2_cmd
+	jam LIGHT_DATA_PART_FF, mem_ble_v2_para+2
+	branch frmt_ble_v2_encoder_pack
+
+frmt_light_rgb_manual2_V2:
+	setarg LIGHT_CMD_RGB_MANUAL_V2
+	store 2, mem_ble_v2_cmd
+	jam LIGHT_DATA_PART_FF, mem_ble_v2_para+3
+	branch frmt_ble_v2_encoder_pack
+	
+frmt_light_rgb_manual3_V2:
+	setarg LIGHT_CMD_RGB_MANUAL_V2
+	store 2, mem_ble_v2_cmd
+	jam LIGHT_DATA_PART_FF, mem_ble_v2_para+1
+	jam LIGHT_DATA_PART_FF, mem_ble_v2_para+2
+	branch frmt_ble_v2_encoder_pack	
+	
+frmt_light_rgb_manual4_V2:
+	setarg LIGHT_CMD_RGB_MANUAL_V2
+	store 2, mem_ble_v2_cmd
+	jam LIGHT_DATA_PART_FF, mem_ble_v2_para+1
+	jam LIGHT_DATA_PART_FF, mem_ble_v2_para+3
+	branch frmt_ble_v2_encoder_pack	
+
+frmt_light_rgb_manual5_V2:
+	setarg LIGHT_CMD_RGB_MANUAL_V2
+	store 2, mem_ble_v2_cmd
+	jam LIGHT_DATA_PART_FF, mem_ble_v2_para+2
+	jam LIGHT_DATA_PART_FF, mem_ble_v2_para+3
+	branch frmt_ble_v2_encoder_pack		
+
+frmt_light_rgb_manual6_V2:
+	setarg LIGHT_CMD_RGB_MANUAL_V2
+	store 2, mem_ble_v2_cmd
+	jam LIGHT_DATA_PART_FF, mem_ble_v2_para+1
+	jam LIGHT_DATA_PART_FF, mem_ble_v2_para+2
+	jam LIGHT_DATA_PART_FF, mem_ble_v2_para+3
+	branch frmt_ble_v2_encoder_pack	
+
+frmt_light_timing_1min_V2:
+	setarg 0x01
+frmt_light_timing_off_common_V2:
+	jam PRODUCT_MAINTYPE_LIGHT,mem_ble_v2_maintype
+	store 2, mem_ble_v2_para+1
+	setarg CMD_TIMING_OFF
+	store 2, mem_ble_v2_cmd
+	jam 0, mem_ble_v2_para
+	jam 0, mem_ble_v2_para+3
+	branch frmt_ble_v2_encoder_pack
+
+frmt_light_timing_30s_V2:
+	setarg 0
+	branch frmt_light_timing_off_common_V2
+
+frmt_light_group1_on_V2:
+	jam 1, mem_ble_v2_group_index
+	branch frmt_light_turn_on_common	
+	
+frmt_light_group2_on_V2:
+	jam 2, mem_ble_v2_group_index
+	branch frmt_light_turn_on_common	
+	
+frmt_light_group3_on_V2:
+	jam 3, mem_ble_v2_group_index
+	branch frmt_light_turn_on_common	
+
+frmt_light_group4_on_V2:
+	jam 4, mem_ble_v2_group_index
+	branch frmt_light_turn_on_common
+
+frmt_light_group1_off_V2:
+	jam 1, mem_ble_v2_group_index
+	branch frmt_light_turn_off_common	
+	
+frmt_light_group2_off_V2:
+	jam 2, mem_ble_v2_group_index
+	branch frmt_light_turn_off_common	
+	
+frmt_light_group3_off_V2:
+	jam 3, mem_ble_v2_group_index
+	branch frmt_light_turn_off_common	
+
+frmt_light_group4_off_V2:
+	jam 4, mem_ble_v2_group_index
+	branch frmt_light_turn_off_common
+
+
+
Index: program/app_light/remoter/frmt_fml_remoter_main.prog
===================================================================
--- /branch/usb/usb_public_base/program/app_light/remoter/frmt_fml_remoter_main.prog	(revision 0)
+++ /branch/usb/usb_public_base/program/app_light/remoter/frmt_fml_remoter_main.prog	(working copy)
@@ -0,0 +1,386 @@
+
+
+frmt_apl_idle_process:
+
+	rtn
+
+
+frmt_main:
+	bpatchx patch2d_0,mem_patch2d
+	call frmt_kscan_init
+	call frmt_kscan	
+	fetch 8, mem_kscan_record_keypress
+	ncall frmt_kscan_available, blank
+// 	call ice_break
+	call frmt_judge_reset_last_key
+
+	fetch 1, mem_light_release_adv_flag
+	ncall p_light_released_cb, blank
+
+	call frmt_kscan_keypress_analysis_process
+
+	fetch 1, mem_le_adv_enable
+	call frmt_light_indicator_led_flag_set0, blank
+	
+	fetch 1, mem_indicator_turn_on_enable
+	ncall frmt_light_indicator_led, blank
+
+	fetch 1, mem_indicator_turn_on_enable
+	call frmt_light_indicator_led_off, blank
+
+	bpatchx patch2d_1,mem_patch2d
+
+// 	rtn		
+	branch frmt_app_enter_lpm 
+
+frmt_kscan_keypress_analysis_process:
+	bpatchx patch2d_2,mem_patch2d
+
+	fetch 1,mem_special_agreemeet_enable
+	sub pdata,1,null
+	call frmt_light_gem_long_press_cnt,zero
+	fetch 2, mem_long_press_adv_timeout
+	nrtn blank
+	fetch 8, mem_kscan_record_keypress
+// 	call ice_break
+	rtn blank
+	
+	setarg 0    //clear data part (3 Bytes)
+	store 3, mem_FTD_adv_raw_data
+	store 4, mem_ble_v2_para
+	jam 0, mem_FTD_adv_raw_reserved
+
+	fetch 1, mem_light_release_adv_flag
+	ncall p_light_released_cb, blank
+
+	fetch 2,mem_rmt_keydown_cb
+	branch callback_func
+
+	//branch p_frmt_kscan_keypress_combination_key			//组合键功能
+
+p_light_released_cb:
+	fetch 2,mem_rmt_released_cb
+	branch callback_func
+
+
+frmt_get_current_key:				//获得键值
+	fetch 8, mem_kscan_record_keypress
+	copy pdata, temp   
+	arg KEYBOARD_MAX_KEYS_NUM, loopcnt
+	arg 0, queue
+	call frmt_kscan_keypress_analysis_get_keypress   //queue is the key num
+	deposit queue   //copy queue to pdata
+	store 1, mem_light_current_key
+	setarg 0
+	store 8, mem_kscan_record_keypress
+	branch frmt_light_set_continuous_kps_cnt_reset_timeout    //, blank
+	
+
+frmt_judge_reset_last_key:
+	fetch 1, mem_keypress_analysis_flag
+	nrtn blank
+	
+	jam 0, mem_light_last_key
+	jam 0, mem_light_color_and_lgtness_long_press_adv_enable
+frmt_light_long_press_judge_reset:
+	setarg 0
+	store 2, mem_long_press_timeout
+	store 2,mem_gem_cnt_inces_timeout
+	rtn
+	
+frmt_kscan_keypress_analysis_get_keypress:
+	qisolate1 pdata  
+	rtn true
+	increase 1, queue
+	loop frmt_kscan_keypress_analysis_get_keypress
+	rtn 	
+
+frmt_kscan_available:
+	jam 1, mem_keypress_analysis_flag
+
+	jam 1, mem_indicator_turn_on_enable
+	setarg KEY_PRESS_LED_ON_TIME
+	store 2, mem_indicator_led_turn_on_timeout
+	jam KSCAN_ANALYSIS_INTERVAL, mem_kscan_analysis_interval_timeout
+	rtn
+
+
+frmt_light_indicator_led_flag_set0:
+	bpatchx patch2d_3,mem_patch2d
+	fetch 1, mem_keypress_analysis_flag
+	nrtn blank
+frmt_light_indicator_led_flag_set0_process:	
+	setarg 0
+	store 2, mem_indicator_led_turn_on_timeout
+	jam 0, mem_indicator_turn_on_enable
+	bpatchx patch2d_4,mem_patch2d
+	rtn
+
+frmt_light_indicator_led:		
+	bpatchx patch2d_5,mem_patch2d
+	fetch 1, mem_light_indicator_led
+	rtn blank
+frmt_light_indicator_led_debug:	
+	fetcht 1, mem_light_indicator_led
+	branch gpio_config_output_patch
+	
+
+frmt_light_indicator_led_off:
+	bpatchx patch2d_6,mem_patch2d
+	fetch 1, mem_light_indicator_led
+	rtn blank
+frmt_light_indicator_led_off_debug:
+	fetcht 1, mem_light_indicator_led
+	or temp, 0x80, temp
+	branch gpio_config_output_patch
+
+
+/************************************低功耗************************************/
+
+frmt_app_enter_lpm:	
+	bpatchx patch2d_7,mem_patch2d
+	fetch 2, mem_light_lpm_enable_timeout   
+	nrtn blank
+	fetch 2, mem_indicator_led_turn_on_timeout   
+	nrtn blank
+	call frmt_enter_lpm_gpio_config
+	call frmt_wakeup_low_config
+
+	bpatchx patch2e_0,mem_patch2e
+	arg -1, temp   //
+	branch lpm_sleep
+
+/*
+1306AB:
+SDA：gpio0
+SCL：gpio1
+WP：gpio2
+ice: gpio19
+除开上面的IO, 其他没有被使用到矩阵键盘的IO下拉。
+*/
+frmt_enter_lpm_gpio_config:
+	arg ENTER_LPM_LEISURE_IO_CONFIG_NUM, loopcnt  //避开0,1,2, 19,4个IO 
+	jam ENTER_LPM_LEISURE_IO_CONFIG_START, mem_light_lpm_gpio_config_io_temp   //跳过012,3个IO.iic,wp.
+frmt_drop_down_unused_io_loopcnt:
+	fetcht 1, mem_light_lpm_gpio_config_io_temp
+	copy temp, queue
+	fetch 4, mem_light_lpm_gpio_config_flag    //为1不处理（说明IO被使用）
+	qisolate1 pdata
+	branch frmt_drop_down_unused_io_loopcnt_no_drop_down, true
+	or temp, 0x80, temp
+	call gpio_config_input
+frmt_drop_down_unused_io_loopcnt_no_drop_down:
+	fetch 1, mem_light_lpm_gpio_config_io_temp
+	pincrease 1
+	store 1, mem_light_lpm_gpio_config_io_temp
+	loop frmt_drop_down_unused_io_loopcnt
+	jam gpcfg_pullup, core_gpio03_conf
+	jam gpcfg_pullup, core_gpio19_conf
+	rtn
+
+frmt_wakeup_low_config:
+	fetcht 1, mem_kscan_row_nums
+	copy temp, rega
+	arg 0, regb
+	arg 0, temp
+	storet 8, mem_gpio_wakeup_low	
+	arg mem_kscan_row_gpio_pin, contr
+	call frmt_wakeup_low_config_loop
+	set1 3,temp
+	storet 4, mem_gpio_wakeup_low
+	rtn
+
+frmt_wakeup_low_config_loop:
+	ifetch 1, contr
+	iforce queue
+	qset1 temp
+
+	increase 1, regb
+	deposit rega
+	isub regb, null
+	rtn zero
+	branch frmt_wakeup_low_config_loop
+
+
+
+/************************************发包************************************/
+
+frmt_le_send_adv_ind:
+// call ice_break
+	bpatchx patch2e_1,mem_patch2e
+	fetch 1,mem_special_agreemeet_enable
+	beq 2,key_le_send_adv_ind
+	fetch 1,mem_ble_v2_customer_id
+	nbranch frmt_send_id1_v2,blank
+frmt_judge_send_id1_v1:
+	fetch 1,mem_special_agreemeet_enable
+	beq 1,frmt_send_id1_v1
+	fetch 1,mem_light_manufacture_id
+	nbranch frmt_send_id1_v1,blank
+frmt_judge_send_id2_v1:
+	fetch 1,mem_light_manufacture_id2
+	nbranch frmt_send_id2_v1,blank
+frmt_judge_send_id2_v2:
+	fetch 1,mem_light_manufacture_id2_v2
+	nbranch frmt_send_id2_v2,blank
+frmt_id_flag_set0:
+	setarg 0
+	store 1,mem_adv_manufacturer_switch_flag
+	store 1,mem_adv_manufacturer_switch_flag1
+	store 1,mem_adv_manufacturer_switch_flag2
+	store 1,mem_adv_manufacturer_switch_flag3
+	rtn
+frmt_le_send_adv_ind_pdu1:	
+	bpatchx patch2e_2,mem_patch2e
+// 	jam 05,mem_light_whitening_buffer+2
+	arg FTD_PDU_LEN, loopcnt                	
+	arg mem_le_txheader, contw                 
+	arg mem_light_whitening_buffer, contr
+	call memcpy_fast
+	branch le_send_adv_transmit
+
+frmt_le_send_adv_ind_v2:
+	bpatchx patch2e_3,mem_patch2e
+	arg FTD_PDU_LEN, loopcnt                	
+	arg mem_le_txheader, contw                 
+	arg mem_ble_v2_pdu, contr
+	call memcpy_fast
+	branch le_send_adv_transmit
+
+frmt_le_send_adv_ind_pdu2:
+	bpatchx patch2e_4,mem_patch2e
+	arg FTD_PDU_LEN, loopcnt                
+	arg mem_le_txheader, contw                 
+	arg mem_light_whitening_buffer_2, contr
+	call memcpy_fast
+	branch le_send_adv_transmit
+
+frmt_le_send_adv_ind_v2_2:
+	bpatchx patch2e_5,mem_patch2e
+	arg FTD_PDU_LEN, loopcnt                	
+	arg mem_le_txheader, contw                 
+	arg mem_ble_v2_pdu_2, contr
+	call memcpy_fast
+	branch le_send_adv_transmit
+
+frmt_send_id1_v2:
+	fetch 1, mem_adv_manufacturer_switch_flag
+	beq 3,frmt_judge_send_id1_v1	
+	pincrease 1
+	store 1, mem_adv_manufacturer_switch_flag
+	branch frmt_le_send_adv_ind_v2
+
+frmt_send_id1_v1:
+	fetch 1, mem_adv_manufacturer_switch_flag1
+	beq 3,frmt_judge_send_id2_v1	
+	pincrease 1
+	store 1, mem_adv_manufacturer_switch_flag1
+	fetch 1,mem_special_agreemeet_enable
+	beq 1,gem_le_send_adv_ind
+	branch frmt_le_send_adv_ind_pdu1
+
+frmt_send_id2_v1:
+	fetch 1, mem_adv_manufacturer_switch_flag2
+	beq 3,frmt_judge_send_id2_v2	
+	pincrease 1
+	store 1, mem_adv_manufacturer_switch_flag2
+	branch frmt_le_send_adv_ind_pdu2
+
+frmt_send_id2_v2:
+	fetch 1, mem_adv_manufacturer_switch_flag3
+	beq 3,frmt_id_flag_set0	
+	pincrease 1
+	store 1, mem_adv_manufacturer_switch_flag3
+	branch frmt_le_send_adv_ind_v2_2
+
+gem_le_send_adv_ind:
+	arg GEM_PDU_LEN, loopcnt                   
+	arg mem_le_txheader, contw       
+	arg mem_light_whitening_buffer, contr   
+	call memcpy_fast
+	branch le_send_adv_transmit
+
+key_le_send_adv_ind:					//科云
+// call ice_break
+	fetch 1, mem_adv_cnts
+	pincrease 1
+	store 1, mem_adv_cnts
+	sub pdata,3,null
+	branch frmt_le_send_adv_ind_v2,positive
+	sub pdata, 6, null
+	branch key_le_send_adv_ind_KY1, positive
+	sub pdata, 9, null
+	branch key_le_send_adv_ind_KY,positive
+	setarg 0
+	store 1,mem_adv_cnts
+	branch frmt_le_send_adv_ind_v2
+	
+key_le_send_adv_ind_KY1:
+	arg KEY_PDU_LEN, loopcnt                   
+	arg mem_le_txheader, contw       
+	arg mem_light_JYM_tx_temp, contr   
+	call memcpy_fast
+	branch le_send_adv_transmit
+key_le_send_adv_ind_KY:	
+	arg KEY_PDU_LEN, loopcnt                   
+	arg mem_le_txheader, contw       
+	arg mem_light_whitening_buffer, contr   
+	call memcpy_fast
+	branch le_send_adv_transmit
+
+	
+/************************************通道************************************/
+frmt_le_next_adv_channel:
+	fetch 1,mem_channel_num
+	call frmt_channel_num_init,blank
+	
+	fetch 1,mem_channel_num
+	isolate1 0,pdata
+	branch frmt_le_next_adv_channel_37,true
+
+	fetch 1,mem_channel_num
+	isolate1 1,pdata
+	branch frmt_le_next_adv_channel_38,true
+
+	fetch 1,mem_channel_num
+	isolate1 2,pdata
+	branch frmt_le_next_adv_channel_39,true	
+	rtn
+
+frmt_channel_num_init:
+	fetch 1,mem_channel_enable
+	store 1,mem_channel_num
+	rtn
+
+
+frmt_le_next_adv_channel_37:
+	fetch 1,mem_channel_num
+	set0 0,pdata
+	store 1,mem_channel_num
+	fetcht 1,mem_le_adv_channel_map
+	set1 BIT_ADV_CHANNEL_MAP_37,temp
+	storet 1, mem_le_adv_channel_map
+	jam 37, mem_le_ch_mapped
+	branch le_next_adv_channel+1
+
+frmt_le_next_adv_channel_38:
+	fetch 1,mem_channel_num
+	set0 1,pdata
+	store 1,mem_channel_num
+	fetcht 1,mem_le_adv_channel_map
+	set1 BIT_ADV_CHANNEL_MAP_38,temp
+	storet 1, mem_le_adv_channel_map
+	jam 38, mem_le_ch_mapped
+	branch le_next_adv_channel+1
+
+frmt_le_next_adv_channel_39:
+	fetch 1,mem_channel_num
+	set0 2,pdata
+	store 1,mem_channel_num
+	fetcht 1,mem_le_adv_channel_map
+	set1 BIT_ADV_CHANNEL_MAP_39,temp
+	storet 1, mem_le_adv_channel_map
+	jam 39, mem_le_ch_mapped
+	branch le_next_adv_channel+1
+
+	
Index: program/app_light/remoter/frmt_fml_remoter_obfuscate.prog
===================================================================
--- /branch/usb/usb_public_base/program/app_light/remoter/frmt_fml_remoter_obfuscate.prog	(revision 0)
+++ /branch/usb/usb_public_base/program/app_light/remoter/frmt_fml_remoter_obfuscate.prog	(working copy)
@@ -0,0 +1,419 @@
+
+
+frmt_adv_rear_6bytes_and_whitening_and_set_PDU_common_short_press:
+	call frmt_light_set_PDU_common_short_press
+	branch frmt_adv_rear_6bytes_and_whitening
+
+frmt_light_set_PDU_common_short_press:
+	call frmt_light_flag_set_short_press
+frmt_light_set_PDU_packet_num_and_addr:
+	fetch 1, mem_FTD_adv_raw_packet_num
+	pincrease 1
+	store 1, mem_FTD_adv_raw_packet_num
+
+	fetch 1,mem_ble_v2_maintype
+	sub pdata,3,null
+	call frmt_fan_lamp,zero
+	fetch 1,mem_ble_v2_maintype
+	sub pdata,5,null
+	call frmt_solar_lamp,zero
+	branch frmt_light_groups_address_set
+	
+frmt_fan_lamp:
+	jam 0x83, mem_FTD_adv_raw_data+2
+	rtn
+frmt_solar_lamp:
+	jam 0x88, mem_FTD_adv_raw_data+2
+	rtn
+	
+frmt_light_flag_set_short_press:
+// call ice_break
+	bpatchx patch2e_6,mem_patch2e
+	jam 1, mem_le_adv_enable
+	jam KEY_PRESS_LED_ON_TIME, mem_indicator_led_turn_on_timeout
+	jam 1, mem_indicator_turn_on_enable
+	fetch 2,mem_light_adv_time
+	store 2, mem_ble_light_adv_timeout
+	pincrease 1
+	store 2, mem_light_lpm_enable_timeout
+	rtn
+frmt_light_groups_address_set:   
+	fetch 1, mem_FTD_adv_raw_device_add_temp+1
+	arg 0xf0, temp
+	iand temp,pdata
+	fetcht 1,mem_groups_num
+	iadd temp, pdata
+	store 1, mem_FTD_adv_raw_device_add_temp+1
+	fetch 2, mem_FTD_adv_raw_device_add_temp
+	store 2, mem_FTD_adv_raw_device_add
+	rtn
+	
+/*
+pdu的白化和协议后六个bytes的混淆处理。
+*/
+
+
+
+frmt_adv_rear_6bytes_and_whitening:
+// call ice_break
+	fetch 1,mem_light_manufacture_id
+	ncall frmt_adv_rear_6bytes_and_whitening_pdu2,blank
+
+	fetch 1, mem_FTD_adv_raw
+	sub pdata, LIGHT_CMD_PAIRING_CODE, null
+	call frmt_light_pdu1_manufacturer_id_set, zero
+
+	call frmt_adv_rear_6bytes
+	arg mem_adv_packet_payload, contw 
+	arg mem_FTD_adv_raw, contr 
+	arg 14, loopcnt              
+	call memcpy_fast 	
+
+	arg FTD_PDU_LEN, loopcnt
+	arg mem_adv_packet, contr
+	arg mem_light_whitening_buffer, contw
+	call memcpy_fast
+
+	jam FTD_PDU_LEN, mem_light_recvd_len
+
+	jam 83, mem_light_whitening_i     //channel 37
+
+	call frmt_light_reverse_and_BLE_whitening
+// 	call ice_break
+	fetch 1, mem_light_manufacture_id
+	store 1, mem_light_whitening_buffer+10
+	bpatchx patch2e_7,mem_patch2e
+	rtn
+
+frmt_light_pdu1_manufacturer_id_set:
+	fetch 1, mem_light_manufacture_id
+	store 1, mem_FTD_adv_raw_reserved
+	rtn
+
+frmt_adv_rear_6bytes_and_whitening_pdu2:
+	fetch 1, mem_FTD_adv_raw
+	sub pdata, LIGHT_CMD_PAIRING_CODE, null
+	call frmt_light_pdu2_manufacturer_id_set, zero
+
+	call frmt_adv_rear_6bytes
+	arg mem_adv_packet_payload, contw 
+	arg mem_FTD_adv_raw, contr 
+	arg 14, loopcnt              
+	call memcpy_fast 	
+	
+	arg FTD_PDU_LEN, loopcnt
+	arg mem_adv_packet, contr
+	arg mem_light_whitening_buffer, contw
+	call memcpy_fast
+	
+	jam FTD_PDU_LEN, mem_light_recvd_len
+	jam 83, mem_light_whitening_i
+	call frmt_light_reverse_and_BLE_whitening
+	
+	arg FTD_PDU_LEN, loopcnt
+	arg mem_light_whitening_buffer, contr
+	arg mem_light_whitening_buffer_2, contw
+	call memcpy_fast
+	
+	fetch 1, mem_light_manufacture_id2
+	store 1, mem_light_whitening_buffer_2+10
+// 	call ice_break
+	rtn
+frmt_light_pdu2_manufacturer_id_set:
+	fetch 1, mem_light_manufacture_id2
+	store 1, mem_FTD_adv_raw_reserved
+	rtn
+	
+// frmt_fml_whitening_buffer_bytes_reverse:
+// 	arg mem_light_whitening_buffer, contr
+// 	arg mem_light_whitening_buffer, contw
+// 	arg FTD_PDU_LEN, loopcnt
+// frmt_fml_bytes_reverse_loop:
+// 	ifetch 1, contr
+// 	reverse pdata, pdata
+// 	istore 1, contw
+// 	loop frmt_fml_bytes_reverse_loop
+// 	rtn	
+frmt_adv_rear_6bytes:	
+	jam 1, mem_FTD_adv_raw+8
+
+	jam 0, mem_FTD_adv_raw+9
+	random pdata   
+	rshift8 pdata, temp
+	storet 1, mem_FTD_adv_raw+10 
+	store 1, mem_FTD_adv_raw+11
+	invert pdata, pdata
+	store 2, mem_adv_CRC_False_initValue
+	fetch 1, mem_FTD_adv_raw+11     //add, at 20200107
+	fetcht 1, mem_FTD_adv_raw+8
+	ixor temp, pdata
+	store 1, mem_FTD_adv_raw+8
+	fetcht 1, mem_FTD_adv_raw+9
+	ixor temp, pdata
+	store 1, mem_FTD_adv_raw+9
+//param:mem_adv_CRC_False_initValue
+frmt_CRC16_CCITT_False_FTD:
+	arg mem_FTD_adv_raw, regc 
+// 	call ice_break
+	arg 0x0c, loopcnt
+	fetch 1,mem_special_agreemeet_enable
+	sub pdata,2,null
+	call key_CRC16_CCITT_False1,zero
+	ncall frmt_CRC16_CCITT_False,zero
+
+	fetch 2, mem_adv_CRC_False_initValue  
+	arg 0xff00, rega
+	iand rega, temp
+	rshift8 temp, temp
+	storet 1, mem_FTD_adv_raw+12
+	fetch 1, mem_adv_CRC_False_initValue
+	store 1, mem_FTD_adv_raw+13
+// 	call ice_break
+	rtn 
+	
+/************************************crc16 CCIT************************************/
+
+
+frmt_CRC16_CCITT_False:
+	ifetcht 1, regc
+	lshift8 temp, temp
+	fetch 2, mem_adv_CRC_False_initValue
+	ixor temp, temp
+	arg 0x0, queue
+	call frmt_CRC16_deal_next_8bits
+	storet 2, mem_adv_CRC_False_initValue
+	increase 1, regc
+	loop frmt_CRC16_CCITT_False	
+	rtn
+
+frmt_CRC16_deal_next_8bits:
+	copy temp, pdata    //temp:crc Value
+	rshift8 pdata, rega
+	rshift4 rega, rega
+	rshift3 rega, rega
+	lshift pdata, temp
+	copy rega, pdata
+	ncall frmt_CRC16_xor_ploy, blank
+	increase 1, queue
+	copy queue, pdata
+	bne 0x08, frmt_CRC16_deal_next_8bits
+	rtn 
+	
+frmt_CRC16_xor_ploy:
+	fetch 2, mem_CRC16_polynomial
+	copy pdata, rega
+	copy temp, pdata
+	ixor rega, pdata
+	arg 0xffff, rega
+	iand rega, temp
+	rtn
+
+
+key_CRC16_CCITT_False1:
+	fetch 2, mem_adv_CRC_False_initValue //pdata crc
+	
+key_CRC16_CCITT_False_loop:
+	ifetcht 1, regc
+	increase 1, regc
+	reverse temp, temp
+	lshift8 temp, temp
+	ixor temp,pdata
+	
+key_CRC16_for_byte:
+	copy loopcnt,regb		
+	arg 8,loopcnt
+key_CRC16_for_byte_loop:
+	isolate1 15,pdata
+	lshift pdata,pdata
+	nbranch key_CRC16_for_byte_continue,true
+	fetcht 2, mem_CRC16_polynomial
+	ixor temp,pdata
+key_CRC16_for_byte_continue:
+	loop key_CRC16_for_byte_loop
+	copy regb,loopcnt
+	
+	loop key_CRC16_CCITT_False_loop
+	store 2,mem_adv_CRC_False_initValue
+	fetcht 1, mem_adv_CRC_False_initValue
+	reverse temp, temp
+	fetch 1, mem_adv_CRC_False_initValue+1
+	reverse pdata, pdata
+	storet 1, mem_adv_CRC_False_initValue+1  //交叉着存
+	store 1, mem_adv_CRC_False_initValue
+	rtn
+
+
+
+/************************************crc16 CCIT************************************/
+
+/*
+接收端使用
+*/
+frmt_light_BLE_whitening_and_reverse:
+	call frmt_light_BLE_whitening
+	branch frmt_fml_whitening_buffer_bytes_reverse
+
+
+/*
+发射端使用
+*/
+frmt_light_reverse_and_BLE_whitening:
+	call frmt_fml_whitening_buffer_bytes_reverse
+	branch frmt_light_BLE_whitening
+
+//para:mem_light_recvd_len
+//para:mem_light_whitening_i
+/***********************************************
+jam 115, mem_light_whitening_i     //channel 39
+jam 51, mem_light_whitening_i     //channel 38
+jam 83, mem_light_whitening_i     //channel 37
+***********************************************/
+// frmt_light_ble_whitening:
+// frmt_light_for_loop_end_with_len:
+// 	jam 0, mem_light_for_loop_cnt1
+// frmt_light_for_loop_end_with_len_loop:
+// 	setarg 0
+// 	store 2, mem_light_whitening_k
+// 	call frmt_light_for_loop_8_times
+
+// 	fetcht 1, mem_light_whitening_k
+// 	fetch 1, mem_light_for_loop_cnt1
+// 	arg mem_light_whitening_buffer, contw
+// 	iadd contw, contw
+// 	istoret 1, contw	
+
+// 	fetcht 1, mem_light_for_loop_cnt1
+// 	increase 1, temp
+// 	storet 1, mem_light_for_loop_cnt1
+// 	fetch 1, mem_light_recvd_len
+// 	isub temp, null
+// 	branch frmt_light_for_loop_end_with_len_loop, positive
+// // 	call ice_break
+// 	rtn
+
+// //通过i得到n；通过n得到i1；通过i1得到k；调出for(8)循环,取最终k得到原始数据。	
+// frmt_light_for_loop_8_times:
+// 	//call ice_break
+// 	jam 0, mem_light_for_loop_cnt2
+// frmt_light_for_loop_8_times_loop:
+// 	fetch 1, mem_light_whitening_i
+// 	store 1, mem_light_whitening_n
+// 	lshift pdata, pdata
+// 	store 4, mem_light_whitening_i2
+// 	iforce rega
+// 	rshift3 pdata, pdata
+// 	rshift4 pdata, pdata
+// 	and pdata, 1, temp
+// 	storet 4, mem_light_whitening_i3
+// 	fetch 4, mem_light_para1    //0xFFFFFFFE
+// 	iand rega, pdata
+// 	ior temp, pdata
+// 	store 4, mem_light_whitening_i4
+// 	lshift4 temp, temp
+// 	ixor temp, rega
+// 	and rega, 0x10,rega
+// 	fetcht 4, mem_light_para2   //0xFFFFFFEF ;  pdata:mem_light_whitening_i4
+// 	iand temp, pdata
+// 	ior rega, pdata
+// 	store 1, mem_light_whitening_i     //只需要store 1
+
+// 	fetch 1, mem_light_whitening_n
+// 	and pdata, 0x40, pdata
+// 	rshift3 pdata, pdata
+// 	rshift3 pdata, temp
+// 	storet 1, mem_light_whitening_i1
+// 	fetch 1, mem_light_for_loop_cnt2
+// 	call frmt_light_i1_lshift    //return temp
+
+// 	fetch 1, mem_light_for_loop_cnt1    //外循环的循环变量
+// 	arg mem_light_whitening_buffer, contr
+// 	iadd contr, contr
+// 	ifetch 1, contr
+// // ifdef FTD_PROTOCOL
+// // 	reverse pdata, pdata
+// // endif	
+
+// 	ixor temp, temp
+// 	fetch 1, mem_light_for_loop_cnt2
+// 	arg mem_light_integer_1_lshift_temp, contr
+// 	iadd contr, contr
+// 	ifetch 1, contr
+// 	iand temp, pdata
+// 	fetcht 2,  mem_light_whitening_k
+// 	ior temp, pdata
+// 	store 2, mem_light_whitening_k
+// 	
+// 	fetch 1, mem_light_for_loop_cnt2
+// 	pincrease 1
+// 	store 1, mem_light_for_loop_cnt2
+// 	bbit0 3, frmt_light_for_loop_8_times_loop
+// 	rtn
+
+// //pdata:  value of mem_light_for_loop_cnt2
+// //temp :  value of mem_light_whitening_i1
+// frmt_light_i1_lshift:
+// 	arg mem_light_for_loop_lshift,contr 
+// 	iadd contr,contr
+// 	ifetch 1,contr
+// 	and pdata,0x0f,loopcnt
+// frmt_light_i1_lshift_loop:	
+// 	sub loopcnt,0,null
+// 	rtn zero
+// 	lshift temp,temp
+// 	loop frmt_light_i1_lshift_loop
+// 	rtn
+
+
+frmt_fml_whitening_buffer_bytes_reverse:
+	arg mem_light_whitening_buffer, contr
+	arg mem_light_whitening_buffer, contw
+	arg FTD_PDU_LEN, loopcnt
+	branch frmt_fml_bytes_reverse_loop
+
+frmt_light_BLE_whitening:
+	arg FTD_PDU_LEN, loopcnt
+	arg mem_light_whitening_buffer, regc
+	arg 83, regb
+	fetch 1,mem_special_agreemeet_enable
+	sub pdata,2,null
+	call key_whitening_i_get,zero
+	branch frmt_ble_whitening
+
+frmt_fml_bytes_reverse_loop:
+	ifetch 1, contr
+	reverse pdata, pdata
+	istore 1, contw
+	loop frmt_fml_bytes_reverse_loop
+	rtn	
+/*
+loopcnt:length
+regc:pointer of whitening data
+regb:white init(seed)
+*/
+frmt_ble_whitening:
+
+frmt_ble_whitening_loop:
+	call frmt_ble_whitening_byte
+	increase 1, regc
+	loop frmt_ble_whitening_loop
+	rtn
+frmt_ble_whitening_byte:
+	arg 1, rega     //rega is m
+frmt_ble_whitening_byte_loop:
+	lshift regb, regb    //regb is seed
+	isolate1 7, regb
+	call frmt_ble_whitening_byte_xor, true
+	lshift rega, rega
+	deposit rega
+	rtnbit1 8
+	branch frmt_ble_whitening_byte_loop
+	
+frmt_ble_whitening_byte_xor:	
+	ifetch 1,regc
+	ixor rega, pdata
+	istore 1, regc
+	xor regb, 0x11, regb
+	rtn
+
+
+
Index: program/app_light/remoter/frmt_fml_remoter_timer.prog
===================================================================
--- /branch/usb/usb_public_base/program/app_light/remoter/frmt_fml_remoter_timer.prog	(revision 0)
+++ /branch/usb/usb_public_base/program/app_light/remoter/frmt_fml_remoter_timer.prog	(working copy)
@@ -0,0 +1,98 @@
+
+
+frmt_apl_cb_event_timer:
+	bpatchx patch2f_0,mem_patch2f
+	fetch 1,mem_special_agreemeet_enable
+	sub pdata,1,null
+	call p_light_gem_long_press_cnt_timer,zero
+	call frmt_light_reset_continuous_kps_cnt_timer
+	call frmt_light_kscan_analysis_interval_timer
+	call frmt_light_le_adv_timer
+	call frmt_light_long_press_timer
+	call frmt_light_long_press_adv_timer
+	call frmt_light_indicator_led_timer
+	call frmt_light_enter_lpm_timer
+	branch frmt_light_color_and_lightness_long_press_timer
+
+frmt_light_kscan_analysis_interval_timer:  //100ms
+	arg mem_kscan_analysis_interval_timeout,regc
+	arg frmt_light_kscan_analysis_interval_timeout, regb
+	branch timer_single_step_2B
+frmt_light_kscan_analysis_interval_timeout:
+	rtn	
+
+frmt_light_le_adv_timer:  
+	arg mem_ble_light_adv_timeout,regc
+	arg frmt_light_le_adv_time_timeout, regb
+	branch timer_single_step_2B
+frmt_light_le_adv_time_timeout:
+// call ice_break
+	jam 0, mem_le_adv_enable  
+	rtn
+
+frmt_light_long_press_adv_timer:
+	arg mem_long_press_adv_timeout,regc
+	arg frmt_light_long_press_adv_timeout, regb
+	branch timer_single_step_2B
+frmt_light_long_press_adv_timeout:
+	rtn
+
+frmt_light_indicator_led_timer:
+	arg mem_indicator_led_turn_on_timeout,regc
+	arg frmt_light_indicator_led_timer_timeout, regb
+	branch timer_single_step_2B
+
+frmt_light_indicator_led_timer_timeout:
+	jam 0, mem_indicator_turn_on_enable
+	rtn
+
+frmt_light_enter_lpm_timer:
+	arg mem_light_lpm_enable_timeout,regc
+	arg frmt_light_enter_lpm_timeout, regb
+	branch timer_single_step_2B
+frmt_light_enter_lpm_timeout:
+	rtn
+
+frmt_light_color_and_lightness_long_press_timer:
+	arg mem_light_short_keypress_timeout,regc
+	arg frmt_light_color_and_lightness_long_press_timeout, regb
+	branch timer_single_step_2B
+frmt_light_color_and_lightness_long_press_timeout:
+	jam 1, mem_light_color_and_lgtness_long_press_adv_enable
+	rtn
+	
+frmt_light_long_press_timer:
+	arg mem_long_press_timeout,regc
+	arg p_light_long_press_timeout_cb, regb
+	branch timer_single_step_2B
+
+frmt_light_reset_continuous_kps_cnt_timer:
+	arg mem_light_continuous_kps_cnt_reset_timeout,regc
+	arg p_light_reset_continuous_kps_cnt_timeout_cb, regb
+	branch timer_single_step_2B
+
+p_light_long_press_timeout_cb:
+	fetch 2,mem_rmt_long_press_cb
+	branch callback_func
+
+p_light_reset_continuous_kps_cnt_timeout_cb:
+	fetch 2,mem_rmt_continuous_keydown_cb
+	branch callback_func
+
+
+frmt_light_set_continuous_kps_cnt_reset_timeout:
+	fetch 2,mem_rmt_continuous_kps_time
+	store 2,mem_light_continuous_kps_cnt_reset_timeout
+	rtn
+
+p_light_gem_long_press_cnt_timer:
+	arg mem_gem_cnt_inces_timeout,regc
+	arg p_light_gem_long_press_cnt_timeout, regb
+	branch timer_single_step_2B
+p_light_gem_long_press_cnt_timeout:
+	fetch 2,mem_long_press_timeout
+	rtn blank
+	jam 1,mem_gem_long_cnt_enable
+	rtn
+
+
Index: program/app_module.prog
===================================================================
--- /branch/usb/usb_public_base/program/app_module.prog	(revision 0)
+++ /branch/usb/usb_public_base/program/app_module.prog	(working copy)
@@ -0,0 +1,1373 @@
+
+ifdef COMPILE_MODULE
+
+module_init:	
+	branch module_lpm_init, wake
+	call le_modified_name
+	setarg module_process_idle
+	store 2,mem_cb_idle_process
+	setarg module_process_bb_event
+	store 2,mem_cb_bb_event_process
+	setarg module_lpm_lock
+	store 2,mem_cb_check_wakelock
+	setarg module_hci_cmd_transmit_le_notify
+	store 2,mem_cb_ble_transmit
+	setarg module_le_receive_data
+	store 2,mem_cb_att_write
+	setarg module_bb_event_timer
+	store 2,mem_cb_event_timer
+
+ifdef COMPILE_WECHAT
+	setarg module_wechat_rx_push_data
+	store 2,mem_module_wechat_rx_push_data_cb
+endif
+	bpatch patch07_0,mem_patch07
+	call module_lpm_uart_init
+	call module_gpio_init
+	branch module_hci_event_enter_standby_mode
+
+/*
+	function name:uart init by mem
+	input:
+		mem_module_uart_rx_buffer、mem_module_uart_rx_buffer_end
+		mem_module_uart_tx_buffer、mem_module_uart_tx_buffer_end
+		mem_module_uarta_baud_rate
+		bit0 of mem_module_flag
+*/
+module_lpm_uart_init:
+	fetch 1,core_uart_ctrl
+	set0 BIT_UART_CONTROL_ENABLE,pdata
+	store 1,core_uart_ctrl
+	fetch 8,mem_module_uart_rx_buffer
+	call uarta_init_dma_mem
+	fetch uart_baud_len,mem_module_uarta_baud_rate
+	call uarta_init_baud_rate
+	call uart_clock_select_main_freq_crystal
+	jam gpcfg_uart_txd,core_gpio_conf+HCI_UART_TX_GPIO_NUM
+	jam gpcfg_uart_rxd|gpcfg_pullup,core_gpio_conf+HCI_UART_RX_GPIO_NUM
+	jam gpcfg_uart_rts,core_gpio_conf+HCI_UART_RTS_GPIO_NUM
+	jam gpcfg_uart_cts,core_gpio_conf+HCI_UART_CTS_GPIO_NUM
+
+	arg FUN_UART_CONTROL_ENABLE|FUN_UART_CONTROL_SETTING_RATE_BAUD,temp
+	fetch 2,mem_module_flag
+	isolate1 MODULE_FLAG_UART_FLOW_CONTROL,pdata
+	setflag true,BIT_UART_CONTROL_FLOW_CONTROL,temp
+	storet 1,core_uart_ctrl
+	rtn
+
+/*
+	function:init uart & spp clock by lpm wake
+*/
+module_lpm_init:
+	branch module_lpm_uart_init
+
+
+
+/*
+	function name:module_gpio_init
+	init connect state & lpm wake up
+*/
+module_gpio_init:
+	fetcht 1,mem_module_connect_state_gpio
+	call gpio_config_output
+	call module_set_conn_pin_low
+	fetcht 1,mem_module_wake_up_gpio
+	branch gpio_config_input
+
+module_lpm_lock:
+	fetcht 1,mem_module_wake_up_gpio
+	call gpio_get_bit
+	nbranch app_put_lpm_wake_lock,true
+	branch app_get_lpm_wake_lock
+
+
+/*
+	function name:chip idle process callback
+	check uart Tx buffer from SPP Credit&check l2cap fifo&check uart rx data
+*/
+module_process_idle:
+	call l2cap_malloc_is_fifo_full
+	nrtn blank
+	branch module_process_check_hci_command_complete
+
+	
+module_process_bb_event:
+	copy regc,pdata
+	beq BT_EVT_LE_CONNECTED,module_process_le_conn
+	beq BT_EVT_LE_DISCONNECTED,module_process_bb_even_le_disconn
+	beq BT_EVT_LE_PAIRING_FAIL,module_hci_event_le_pairing_fail
+	beq BT_EVT_LE_PAIRING_SUCCESS,module_hci_event_le_pairing_success
+	beq BT_EVT_LE_START_ENC,module_hci_event_start_enc
+	beq BT_EVT_LE_PAUSE_ENC,module_hci_event_pause_enc
+	beq BT_EVT_LE_TK_GENERATE,module_hci_event_le_tk
+	beq BT_EVT_STORE_NVRAM,module_hci_event_store_device
+	beq BT_EVT_LE_LTK_LOST,module_process_ble_ltk_lost
+	beq BT_EVT_LE_UPDATE_PHY,module_process_ble_update_phy
+	beq BT_EVT_LE_GET_PASSKEY,module_hci_event_passkey_entry_mode
+ifdef SECURE_CONNECTION
+	beq BT_EVT_LE_GKEY_GENERATE,module_hci_event_gkey_generate
+endif
+	rtn
+
+
+	
+module_process_bb_even_le_disconn:
+	call le_clr_config_more_data
+	jam 0,mem_module_hci_notify_len
+	call module_disconn_start
+	branch module_hci_event_le_disconnect
+
+
+
+	
+module_process_le_conn:
+//	call le_send_att_exchange_mtu_requset
+	call module_conn_start
+	fetch 1,mem_module_le_lpm_mult
+	store 1,mem_lpm_mult
+	branch module_hci_event_le_connect
+
+
+
+module_disconn_start:
+	call module_start_adv_discovery_by_command
+	branch module_set_conn_pin_high
+
+
+module_process_ble_ltk_lost:
+	call le_send_reject_ind
+	branch le_send_smp_security_request
+
+module_process_ble_update_phy:
+	branch module_hci_event_le_update_phy
+
+
+module_set_conn_pin_high:
+	fetcht 1,mem_module_connect_state_gpio
+	branch gpio_out_active
+
+module_conn_start:
+	call module_stop_adv_discovery
+	branch module_set_conn_pin_low
+	
+module_stop_adv_discovery:
+	fetch 1,mem_module_state
+	isolate1 MOUDLE_STATE_BLE_BIT,pdata
+	call app_ble_stop_adv,true
+	rtn
+module_set_conn_pin_low:
+	fetcht 1,mem_module_connect_state_gpio
+	branch gpio_out_inactive
+
+
+/*
+	function name:check hci command complete
+	hci command format:
+	typedef struct HciFormat
+	{
+		uint8_t HciType;
+		uint8_t HciOpcode;
+		uint8_t HciPayloadLen;
+		uint8_t HciPayload[HciPayloadLen];
+	}
+*/
+module_process_check_hci_command_complete:
+	fetch 1,core_uart_status
+	rtnbit1 UART_STATUS_RX_FIFO_EMPTY  //rx no data
+	call uarta_prepare_rx
+	ifetch 1,contru
+	bne 0x01,module_hci_in_excp	//HciType != 0x01
+	fetch 2,core_uart_rxitems
+	sub pdata,2,null
+	rtn positive
+	ifetch 1,contru
+	store 1,mem_module_uart_opcode
+	ifetcht 1,contru
+	copy contru,rega
+	storet 1,mem_module_uart_len
+	add temp,3,temp
+	fetch 2,core_uart_rxitems
+	isub temp,temp
+	nrtn positive
+	jam HCI_DISCARD_PACKET,mem_module_temp_nl_discard_packet
+	call module_hci_cmd_control
+	fetch 1,mem_module_temp_nl_discard_packet
+	rtneq HCI_NOT_DISCARD_PACKET
+	branch module_hci_dicard_packet //discard this packet
+
+module_hci_in_excp:
+	call delay_10ms
+	call module_hci_event_invalid_packet
+	branch module_hci_release_except
+
+
+module_hci_release_except:
+	bpatch patch07_1,mem_patch07
+	call uarta_prepare_rx
+	fetch 2,core_uart_rxitems
+	rtn blank
+	iadd contru,contru
+	branch module_hci_dicard_bytes
+
+module_hci_dicard_packet:
+	call uarta_prepare_rx
+	increase 2,contu
+	ifetch 1,contu
+	iadd contu,contu
+module_hci_dicard_bytes:
+	branch uarta_rxdone
+	
+/*********************HCI CONTROL*********************/
+module_hci_cmd_control:
+	bpatch patch07_2,mem_patch07
+	fetch 1,mem_module_uart_opcode
+	beq HCI_CMD_SET_LE_ADDR_REQ,module_hci_cmd_set_le_addr
+	beq HCI_CMD_SET_VISIBILITY_REQ,module_hci_cmd_set_visibility	
+	beq HCI_CMD_SET_LE_NAME_REQ,module_hci_cmd_set_le_name
+	beq HCI_CMD_LE_DATA_REQ,module_hci_cmd_receive_le_data
+	beq HCI_CMD_STATUS_IRQ,module_hci_cmd_inquire_status
+	beq HCI_CMD_SET_UARTCONTROL_REQ,module_hci_cmd_set_uart_control_mode
+	beq HCI_CMD_SET_UART_BAUD_REQ,module_hci_cmd_set_uart_baud
+	beq HCI_CMD_VERSION_REQ,module_hci_cmd_version_request
+	beq HCI_CMD_BLE_DISCONNECT,module_hci_cmd_ble_disconnect
+	beq HCI_CMD_SET_NVRAM_REQ,module_hci_cmd_set_nvram
+	beq HCI_CMD_CONFIRM_GKEY,module_hci_cmd_confirm_gkey
+	beq HCI_CMD_AUTO_ADV_SCAN,module_hci_cmd_auto_adv
+	beq HCI_CMD_POWER_REQ,module_hci_cmd_power_request
+	beq HCI_CMD_POWER_SET,module_hci_cmd_power_set
+	beq HCI_CMD_PASSKEY_ENTRY,module_hci_cmd_passkey_entry
+	beq HCI_CMD_SET_GPIO,module_hci_cmd_set_gpio
+	beq HCI_CMD_READ_GPIO,module_hci_cmd_read_gpio
+	beq HCI_CMD_LE_SET_PAIRING,module_hci_cmd_le_set_pairing_mode
+	beq HCI_CMD_LE_SET_ADV_DATA,module_hci_cmd_le_set_adv_data
+	beq HCI_CMD_LE_SET_SCAN_DATA,module_hci_cmd_le_set_scan_data
+	beq HCI_CMD_LE_SEND_CONN_UPDATE_REQ,module_hci_cmd_le_send_conn_update_req
+	beq HCI_CMD_LE_SET_ADV_PARM,module_hci_cmd_set_le_adv_parameter
+	beq HCI_CMD_LE_START_PAIRING,module_hci_cmd_le_start_pairing
+	beq HCI_CMD_SET_WAKE_GPIO,module_hci_cmd_set_wake_gpio
+	beq HCI_CMD_SET_TX_POWER,module_hci_cmd_set_tx_power
+	beq HCI_CMD_LE_CONFIRM_GKEY,module_hci_cmd_le_confirm_gkey
+//	beq HCI_CMD_REJECT_JUSTWORK,module_hci_cmd_set_reject_justwork_flag
+	beq HCI_CMD_RESET_CHIP_REQ,module_hci_cmd_reset_chip
+	beq HCI_CMD_LE_SET_FIXED_PASSKEY,module_hci_cmd_le_set_fixed_passkey
+	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_PASSKEY_ENTRY_INPUT,module_hci_cmd_le_passkey_entry_input
+	beq HCI_CMD_BLE_SET_PHY,module_hci_cmd_ble_set_phy
+	beq HCI_CMD_BLE_READ_CURRENT_PHY,module_hci_cmd_ble_read_current_phy
+	beq HCI_CMD_BLE_SET_DLE,module_hci_cmd_ble_set_dle
+	beq HCI_CMD_READ_CHIP_DATA,module_hci_cmd_read_chip_data
+	beq HCI_CMD_WRITE_CHIP_DATA,module_hci_cmd_write_chip_data
+ifdef COMPILE_WECHAT
+	beq HCI_CMD_WECHAT_SEND_DATA,module_hci_cmd_wechat_send_data
+endif
+	beq HCI_CMD_CLOSE_LPM,module_hci_cmd_close_lpm
+	branch  module_hci_event_receive_invalid_cmd
+
+/*********************HCI COMMAND*********************/
+
+
+//command opcode 0x01
+module_hci_cmd_set_le_addr:
+	fetch 1,mem_module_uart_len
+	bne 6,module_hci_event_receive_invalid_cmd
+	ifetch 6,contru
+	store 6,mem_le_lap
+	branch module_hci_event_receive_valid_cmd
+
+
+//command opcode 0x02
+module_hci_cmd_set_visibility:
+	fetch 1,mem_module_uart_len
+	bne 1,module_hci_event_receive_invalid_cmd
+	ifetcht 1,contru
+	storet 1,mem_module_bluetooth_stauts_by_command
+	call module_hci_event_receive_valid_cmd
+	fetch 2,mem_ui_state_map
+	rtnbit1 UI_STATE_BLE_CONNECTED
+
+module_start_adv_discovery_by_command:
+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 app_ble_start_adv,true
+	branch app_ble_stop_adv
+
+
+
+//command opcode 0x04
+module_hci_cmd_set_le_name:
+	arg 29,pdata
+	arg mem_le_name_len,contw
+	call module_hci_cmd_receive_store_mem
+	branch le_modified_name
+
+
+
+//command opcode 0x09
+module_hci_cmd_receive_le_data:
+	fetch 2,mem_ui_state_map
+	bbit0 UI_STATE_BLE_CONNECTED,module_hci_event_receive_invalid_cmd
+	call module_check_ble_encrypt_state
+	branch module_hci_event_receive_invalid_cmd,user
+	jam HCI_NOT_DISCARD_PACKET,mem_module_temp_nl_discard_packet 
+	fetch 2,mem_module_flag
+	bbit1 MODULE_FLAG_BLE_DATA_FINISH,module_hci_cmd_receive_le_data_finish
+	fetch 1,mem_module_hci_notify_len
+	nrtn blank
+	jam HCI_DISCARD_PACKET,mem_module_temp_nl_discard_packet 
+	ifetch 2,contru		//handle
+	store 2,mem_module_hci_notify_handle
+	storer contru,2,mem_module_hci_nofiy_addr
+	fetch 1,mem_module_uart_len
+	pincrease -2
+	nbranch module_hci_event_receive_invalid_cmd,positive
+	branch module_hci_event_receive_invalid_cmd,zero
+	store 1,mem_module_hci_notify_len
+	fetcht 2,mem_module_hci_notify_handle
+	increase -1,temp
+	call le_att_get_handle_ptr2
+	branch module_hci_cmd_transmit_handle_error,blank
+	ifetcht 4,contr		//flag
+	setarg 0x01280302
+	isub temp,null
+	nbranch module_hci_cmd_transmit_handle_error,zero
+	ifetch 1,contr
+	store 1,mem_module_hci_notify_type
+	and_into 0x30,pdata
+	branch module_hci_cmd_transmit_handle_error,blank
+	jam HCI_NOT_DISCARD_PACKET,mem_module_temp_nl_discard_packet
+	call le_set_config_more_data
+	call module_hci_cmd_transmit_le_notify
+	call module_hci_cmd_transmit_le_notify
+	call module_hci_cmd_transmit_le_notify
+	fetch 2,mem_module_flag
+	rtnbit0 MODULE_FLAG_BLE_DATA_FINISH
+module_hci_cmd_receive_le_data_finish:
+	jam HCI_DISCARD_PACKET,mem_module_temp_nl_discard_packet 
+	call module_clear_le_tx_data_flag
+	branch module_hci_event_receive_valid_cmd
+
+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
+
+module_hci_cmd_transmit_le_notify:
+	fetch 1,mem_module_hci_notify_len
+	rtn blank
+	call le_fifo_check_nearly_full
+	nrtn blank				//no fifo
+	call module_get_le_remote_mtu
+	bpatch patch07_3,mem_patch07
+	fetch 2,mem_le_local_mtu
+	call not_greater_than
+	copy pdata,temp
+	fetch 1,mem_le_l2cap_att_states
+	rtnbit1 BLE_L2CAP_RECV_CONFIRMATION_PACKET
+	add temp,-3,pdata		//sub handle and opcode
+	arg 251,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
+	call module_hci_cmd_transmit_le_notify_malloc_l2cap
+	fetch 2,mem_module_hci_nofiy_addr
+	copy pdata,contru
+	copy rega,loopcnt
+	call uart_copy_rx_bytes_fast
+	copy contru,pdata
+	store 2,mem_module_hci_nofiy_addr
+	fetch 1,mem_module_hci_notify_len
+	nrtn blank
+	branch module_set_le_tx_data_flag
+
+module_hci_cmd_transmit_le_notify_malloc_l2cap:
+	fetcht 2,mem_module_hci_notify_handle
+	fetch 1,mem_module_hci_notify_type
+	bbit1 BIT_CHARACTERISTIC_INDICATE,le_att_malloc_tx_indication
+	bbit1 BIT_CHARACTERISTIC_NOTIFY,le_att_malloc_tx_notify
+	rtn
+
+
+//output: temp is master mtu
+module_get_le_remote_mtu:
+	arg 0x17,temp
+	fetch 2,mem_module_flag
+	rtnbit1 MODULE_FLAG_BLE_SEND_MTU23
+	fetcht 2,mem_le_remote_mtu
+	rtn
+
+module_check_ble_encrypt_state:
+	fetch 2,mem_module_flag
+	bbit1 MODULE_FLAG_BLE_DATA_ENCRYPT,le_check_encrypt_state
+	branch disable_user
+	
+
+//command opcode 0x0b
+module_hci_cmd_inquire_status:
+	branch module_hci_event_status_res
+
+
+
+
+//command opcode 0x0e
+module_hci_cmd_set_uart_control_mode:
+	ifetch 1,contru
+	fetcht 1,mem_module_flag
+	nsetflag blank,MODULE_FLAG_UART_FLOW_CONTROL,temp
+	storet 1,mem_module_flag
+	fetcht 1,core_uart_ctrl
+	nsetflag blank,BIT_UART_CONTROL_FLOW_CONTROL,temp
+	storet 1,core_uart_ctrl
+ 	branch module_hci_event_receive_valid_cmd
+
+ 	
+//command opcode 0x0f
+module_hci_cmd_set_uart_baud:
+	fetchr loopcnt,1,mem_module_uart_len
+	call string2dec_from_uart
+	call uart_calc_baud_rate_config
+	store uart_baud_len,mem_module_uarta_baud_rate
+	call module_hci_event_receive_valid_cmd
+	call wait_uarttx
+	fetch uart_baud_len,mem_module_uarta_baud_rate
+	branch uarta_init_baud_rate
+
+
+//command opcode 0x10
+module_hci_cmd_version_request:
+	arg 2,rega
+	arg mem_soft_version_num,regb
+	arg 0,temp
+	branch module_hci_event_set_cmd
+
+
+	
+//command opcode 0x12
+module_hci_cmd_ble_disconnect:
+	fetch 2,mem_ui_state_map
+	bbit0 UI_STATE_BLE_CONNECTED,module_hci_event_receive_invalid_cmd
+module_hci_cmd_ble_disconnect_doing:
+	call module_hci_event_receive_valid_cmd
+	branch app_ble_disconnect
+
+
+
+
+//command opcode 0x26
+module_hci_cmd_set_nvram:
+	fetchr loopcnt,1,mem_module_uart_len
+	fetch 2,mem_nv_data_ptr
+	icopy contw
+	call uart_copy_rx_bytes_fast
+	branch module_hci_event_receive_valid_cmd
+
+
+//command opcode 0x28
+module_hci_cmd_confirm_gkey:
+	fetch 2,mem_ui_state_map
+	bbit1 UI_STATE_BLE_CONNECTED,module_hci_cmd_le_confirm_gkey
+	branch module_hci_event_receive_invalid_cmd
+
+
+//command opcode 0x2a
+module_hci_cmd_auto_adv:
+	arg 0x40,loopcnt
+	arg mem_le_adv_data_len,contw
+	call clear_mem
+	setarg 0
+	store 1,mem_regb
+	copy rega,contru
+module_hci_cmd_auto_adv_loop:
+	copy contru,pdata
+	store 2,mem_regc
+	call module_hci_cmd_auto_adv_adv_analys
+
+	fetch 1,mem_regb
+	fetcht 1,mem_temp
+	increase 1,temp
+	iadd temp,pdata
+	store 1,mem_regb
+
+	sub pdata,31,null
+	nbranch module_hci_cmd_auto_adv_store_scan,positive
+module_hci_cmd_auto_adv_store_adv:
+	fetcht 1,mem_le_adv_data_len
+	setarg mem_le_adv_data
+	iadd temp,pdata
+	store 2,mem_contw
+	fetcht 1,mem_temp
+	increase 1,temp
+	fetch 1,mem_le_adv_data_len
+	iadd temp,pdata
+	store 1,mem_le_adv_data_len
+	branch module_hci_cmd_auto_adv_store_common
+module_hci_cmd_auto_adv_store_scan:
+	fetcht 1,mem_le_scan_data_len
+	setarg mem_le_scan_data
+	iadd temp,pdata
+	store 2,mem_contw
+	fetcht 1,mem_temp
+	increase 1,temp
+	fetch 1,mem_le_scan_data_len
+	iadd temp,pdata
+	store 1,mem_le_scan_data_len
+module_hci_cmd_auto_adv_store_common:
+	fetch 2,mem_contw
+	copy pdata,contw
+	fetch 2,mem_regc
+	copy pdata,contru
+
+	copy temp,loopcnt
+	call uart_copy_rx_bytes_fast
+
+	fetch 1,mem_module_uart_len
+	fetcht 1,mem_regb
+	isub temp,null
+	nbranch  module_hci_cmd_auto_adv_loop,zero
+	branch module_hci_event_receive_valid_cmd
+
+//block of adv len in mem_temp
+module_hci_cmd_auto_adv_adv_analys:
+	ifetch 1,contru
+	store 1,mem_temp
+	ifetch 1,contru
+	store 1,mem_rega
+	rtn
+
+
+//command opcode 0x2b
+module_hci_cmd_power_request:
+	arg 0,temp
+	arg 2,rega
+	fetch 2,mem_module_vdd_quotient
+	store 2,mem_event_cmd_response_content
+	arg mem_event_cmd_response_content,regb
+	branch module_hci_event_set_cmd
+
+
+//command opcode 0x2c
+module_hci_cmd_power_set:
+	fetch 1,mem_module_uart_len
+	bne 1,module_hci_event_receive_invalid_cmd
+	ifetch 1,contru
+	store 1,mem_module_read_vdd_flag
+	setarg 0x00
+	store 2,mem_module_vdd_quotient
+	branch module_hci_event_receive_valid_cmd
+
+
+//command opcode 0x30
+module_hci_cmd_passkey_entry:
+	fetch 1,mem_module_uart_len
+	bne 4,module_hci_event_receive_invalid_cmd
+	fetch 2,mem_ui_state_map
+	bbit1 UI_STATE_BLE_CONNECTED,module_hci_cmd_le_passkey_entry_input
+	branch module_hci_event_receive_invalid_cmd
+
+
+
+//command opcode 0x31
+module_hci_cmd_set_gpio:
+	fetch 1,mem_module_uart_len
+	bne 3,module_hci_event_receive_invalid_cmd
+	ifetch 1,contru
+	beq HCI_CMD_CONFIG_GPIO_INPUT,module_set_gpio_input
+	beq HCI_CMD_CONFIG_GPIO_OUTPUT,module_set_gpio_output
+	branch module_hci_event_receive_invalid_cmd
+
+module_set_gpio_input:
+	call module_hci_event_receive_valid_cmd
+	ifetcht 1,contru
+	ifetch 1,contru
+	beq GPIO_INPUT_HIGH_IMPEDANCE,gpio_set_high_impedance
+	nsetflag blank,7,temp
+	branch gpio_config_input
+
+module_set_gpio_output:
+	call module_hci_event_receive_valid_cmd
+	ifetcht 1,contru
+	ifetch 1,contru	
+	branch gpio_out_active,blank
+	branch gpio_out_inactive
+
+
+//command opcode 0x32
+module_hci_cmd_read_gpio:
+	fetch 1,mem_module_uart_len
+	bne 1,module_hci_event_receive_invalid_cmd
+	ifetcht 1,contru
+	call gpio_get_bit
+	setarg 0x0
+	nsetflag true,0,pdata
+	arg 1,rega
+	store 2,mem_event_cmd_response_content
+	arg mem_event_cmd_response_content,regb
+	arg 0,temp
+	branch module_hci_event_set_cmd
+
+
+//command opcode 0x33
+module_hci_cmd_le_set_pairing_mode:
+	ifetch 1,contru
+ifdef SECURE_CONNECTION
+	copy pdata,temp
+	beq LE_PAIRING_MODE_SECURE_CONNECT_JUSTWORK,module_le_set_pairing_mode_secure_justwork
+	beq LE_PAIRING_MODE_SECURE_CONNECT_NUMERIC,module_le_set_pairing_mode_secure_numeric
+	beq LE_PAIRING_MODE_SECURE_CONNECT_PASSKEY,module_le_set_pairing_mode_secure_passkey
+	beq LE_PAIRING_MODE_SECURE_CONNECT_PASSKEY_RES_INPUT,module_le_set_pairing_mode_secure_passkey_res_input
+endif 
+	store 1,mem_le_pairing_mode
+ifdef SECURE_CONNECTION
+	call sc_reset
+	call le_secure_connection_disable
+endif 
+	fetch 1,mem_le_pairing_mode
+	beq LE_PAIRING_MODE_NONE, module_le_set_no_pairing
+	beq LE_PAIRING_MODE_LAGACY_JUSTWORK,module_le_set_pairing_mode_lagacy_just_work
+	beq LE_PAIRING_MODE_LAGACY_PASSKEY,module_le_set_pairing_mode_lagacy_passkey
+	beq LE_PAIRING_MODE_LAGACY_PASSKEY_RES_INPUT,module_le_set_pairing_mode_lagacy_passkey_res_input
+	branch module_hci_event_receive_invalid_cmd
+	
+ifdef SECURE_CONNECTION		
+module_le_set_pairing_mode_secure_justwork:
+	storet 1,mem_le_pairing_mode
+	call le_secure_connection_enable
+	jam FLAG_LE_BONDING_MITM_SECURE,mem_le_pres_auth
+	branch module_le_set_noinputnooutput
+module_le_set_pairing_mode_secure_numeric:
+	storet 1,mem_le_pairing_mode
+	call le_secure_connection_enable
+	jam FLAG_LE_BONDING_MITM_SECURE,mem_le_pres_auth
+	jam FLAG_IOCAP_DISPLAYYESNO,mem_le_pres_iocap
+	branch module_hci_event_receive_valid_cmd	
+module_le_set_pairing_mode_secure_passkey:	
+	storet 1,mem_le_pairing_mode
+	call le_secure_connection_enable
+	jam FLAG_LE_BONDING_MITM_SECURE,mem_le_pres_auth
+	branch module_le_set_displayonly
+module_le_set_pairing_mode_secure_passkey_res_input:
+	storet 1,mem_le_pairing_mode
+	call le_secure_connection_enable
+	jam FLAG_LE_BONDING_MITM_SECURE,mem_le_pres_auth
+	branch module_le_set_keboadonly
+endif 
+
+
+module_le_set_no_pairing:
+	jam FLAG_LE_NO_BONDING_NO_MITM,mem_le_pres_auth
+module_le_set_noinputnooutput:	
+	jam FLAG_IOCAP_NOINPUTNOOUTPUT,mem_le_pres_iocap
+	branch module_hci_event_receive_valid_cmd	
+module_le_set_pairing_mode_lagacy_just_work:
+	jam FLAG_LE_BONDING_NO_MITM,mem_le_pres_auth
+	branch module_le_set_noinputnooutput
+module_le_set_pairing_mode_lagacy_passkey:
+	jam FLAG_LE_BONDING_MITM,mem_le_pres_auth
+	branch module_le_set_displayonly
+module_le_set_pairing_mode_lagacy_passkey_res_input:
+	jam FLAG_LE_BONDING_MITM,mem_le_pres_auth
+	branch module_le_set_keboadonly
+module_le_set_keboadonly:	
+	jam FLAG_IOCAP_KEYBOARDONLY,mem_le_pres_iocap
+	branch module_hci_event_receive_valid_cmd	
+module_le_set_displayonly:	
+	jam FLAG_IOCAP_DISPLAYONLY,mem_le_pres_iocap
+	branch module_hci_event_receive_valid_cmd	
+
+
+//command opcode 0x34
+module_hci_cmd_le_set_adv_data:
+	arg 31,pdata
+	arg mem_le_adv_data_len,contw
+	branch module_hci_cmd_receive_store_mem
+
+
+//command opcode 0x35
+module_hci_cmd_le_set_scan_data:
+	arg 31,pdata
+	arg mem_le_scan_data_len,contw
+	branch module_hci_cmd_receive_store_mem
+
+/*
+	input:contw is store mem ptr
+	pdata is max length
+*/
+module_hci_cmd_receive_store_mem:
+	fetchr loopcnt,1,mem_module_uart_len
+	isub loopcnt,null
+	nbranch module_hci_event_receive_invalid_cmd,positive
+	istorer loopcnt,1,contw
+	call uart_copy_rx_bytes_fast
+	branch module_hci_event_receive_valid_cmd	
+
+	
+//command opcode 0x36
+module_hci_cmd_le_send_conn_update_req:
+	fetch 2,mem_ui_state_map
+	bbit0 UI_STATE_BLE_CONNECTED,module_hci_event_receive_invalid_cmd
+	fetch 1,mem_module_uart_len
+	bne 0x08,module_hci_event_receive_invalid_cmd
+	ifetch 8,contru
+	store 8,mem_le_interval_min
+	jam BT_CMD_LE_UPDATE_CONN,mem_fifo_temp
+	call  ui_ipc_send_cmd
+	branch module_hci_event_receive_valid_cmd
+
+
+//command opcode 0x37
+module_hci_cmd_set_le_adv_parameter:
+	ifetch 2,contru
+	store 2,mem_le_adv_interval
+	branch module_hci_event_receive_valid_cmd
+	
+	
+//command opcode 0x38
+module_hci_cmd_le_start_pairing:
+	fetch 1,mem_le_pairing_mode
+	branch module_hci_event_receive_invalid_cmd,blank
+	fetch 1,mem_le_pairing_state
+	bne FLAG_LE_PAIRING_NULL,module_hci_event_receive_invalid_cmd
+	fetch 1,mem_le_enc_state
+	bne FLAG_LE_ENC_NULL,module_hci_event_receive_invalid_cmd
+	call check_51cmd_le_smp_sec_req
+	branch module_hci_event_receive_valid_cmd	
+
+
+//command opcode 0x40
+module_hci_cmd_set_wake_gpio:
+	fetch 1,mem_module_uart_len
+	bne 5,module_hci_event_receive_invalid_cmd
+	ifetch 1,contru
+	store 1,mem_module_mcu_wake_pin
+	ifetch 4,contru
+	store 4, mem_module_mcu_wake_delay_us
+	fetcht 1,mem_module_mcu_wake_pin
+	call gpio_config_output
+	call module_set_mcu_wake_pin_low
+	branch module_hci_event_receive_valid_cmd
+	
+
+//command opcode 0x42
+module_hci_cmd_set_tx_power:
+	fetch 1,mem_module_uart_len
+	bne 0x01,module_hci_event_receive_invalid_cmd
+	ifetch 1,contru
+	store 1,mem_tx_power
+	branch module_hci_event_receive_valid_cmd
+
+
+//command opcode 0x48
+module_hci_cmd_le_confirm_gkey:
+	ifetch 1,contru
+	beq 0x01,module_hci_cmd_le_confirm_gkey_fail
+	fetch 1,mem_le_secure_connect_state
+	beq LE_SC_STAT_SEND_PUBLIC_KEY,module_hci_cmd_le_confirm_gkey_ok
+	beq LE_SC_STAT_RECEIVE_DHKEY,module_hci_cmd_le_confirm_gkey_ok
+	beq LE_SC_STAT_WAIT_CONFIRM_GKEY,module_hci_cmd_le_confirm_gkey_ok
+	branch module_hci_event_receive_invalid_cmd		
+module_hci_cmd_le_confirm_gkey_ok:
+	jam FLAG_LE_SC_CONFRIM_GKEY_OK,mem_le_sc_confirm_gkey_flag
+	branch module_hci_event_receive_valid_cmd	
+	
+module_hci_cmd_le_confirm_gkey_fail:
+	call le_send_pairing_confirm_value_failed
+	branch module_hci_event_receive_valid_cmd
+
+
+
+
+//command opcode 0x51
+module_hci_cmd_reset_chip:
+	call module_hci_event_receive_valid_cmd
+	call wait_uarttx
+	jam 0x01,core_reset // rest YC1021
+	branch assert
+
+
+//command opcode 0x61
+module_hci_cmd_le_set_fixed_passkey:
+	fetch 1,mem_module_uart_len
+	beq 0,module_hci_event_receive_invalid_cmd
+	ifetch 1,contru
+	branch module_hci_cmd_le_set_random_passkey,blank
+	fetch 1,mem_module_uart_len
+	bne 5,module_hci_event_receive_invalid_cmd
+	ifetch 4,contru
+	arg 1000000,temp
+	isub temp,null
+	branch module_hci_event_receive_invalid_cmd,positive
+	store 4,mem_le_tk
+	call le_set_config_fixed_tk
+	branch module_hci_event_receive_valid_cmd
+
+module_hci_cmd_le_set_random_passkey:
+	call le_clr_config_fixed_tk
+	branch module_hci_event_receive_valid_cmd
+
+
+//command opcode 0x76
+module_hci_cmd_delete_customize_service:
+	ifetcht 2,contru
+	call le_att_get_handle_ptr2
+	add contr,-2,contw
+	setarg 0x0000
+	istore 2,contw
+	branch module_hci_event_receive_valid_cmd
+
+
+//command opcode 0x77
+module_hci_cmd_add_service_uuid:
+	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
+
+
+
+//command opcode 0x78
+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_get_last_handle
+	ifetch 1,contru
+	and pdata,0x1f,loopcnt
+	copy pdata,rega
+	isolate1 BIT_OF_WRITE_AUTHENTICATED,rega
+	setflag true,BIT_OF_ATT_HANDLE_WRITE_AUTHENTICATED,temp
+	isolate1 BIT_OF_READ_AUTHENTICATED,rega
+	setflag true,BIT_OF_ATT_HANDLE_READ_AUTHENTICATED,temp
+	istoret 2,contw
+	copy loopcnt,pdata
+	istore 1,contw
+	call uart_copy_rx_bytes
+	call uart_copy_rx_bytes_len_data		//data
+	setarg 0
+	istore 2,contw
+	and temp,0xff,temp
+	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_get_last_handle
+	isolate1 BIT_OF_NOTIFY_AUTHENTICATED,rega
+	setflag true,BIT_OF_ATT_HANDLE_WRITE_AUTHENTICATED,temp
+	istoret 2,contw
+	setarg 0x02290202
+	istore 8,contw
+	increase -1,temp
+	rtn
+
+
+le_att_creat_new_handle:
+	call le_att_get_last_handle
+	istoret 2,contw
+	rtn
+
+
+uart_copy_rx_bytes_len_data:
+	ifetch 1,contru
+	copy pdata,loopcnt
+	istore 1,contw
+	branch uart_copy_rx_bytes
+
+
+//command opcode 0x7a
+module_hci_cmd_le_passkey_entry_input:
+	fetch 1,mem_le_pairing_state
+	bne FLAG_LE_PAIRING_RECEIVE_PAIRING_CONFIRM,module_hci_event_receive_invalid_cmd
+	fetch 1,mem_le_pairing_mode
+	beq LE_PAIRING_MODE_LAGACY_PASSKEY_RES_INPUT,module_hci_cmd_passkey_entry_res_input
+	beq LE_PAIRING_MODE_SECURE_CONNECT_PASSKEY_RES_INPUT,module_hci_cmd_passkey_entry_sc_res_input
+	branch module_hci_event_receive_invalid_cmd
+
+module_hci_cmd_passkey_entry_sc_res_input:
+	jam LE_SP_FLAG_COMMIT_256,mem_le_secure_connect_flag
+	jam LE_SC_STAT_PASSKEY_WAIT_CONFIRM,mem_le_secure_connect_state	
+	branch module_hci_cmd_receive_ble_passkey
+
+module_hci_cmd_receive_ble_passkey:
+	ifetch 4,contru
+	store 4,mem_le_tk
+	branch module_hci_event_receive_valid_cmd
+	
+module_hci_cmd_passkey_entry_res_input:
+	call module_hci_cmd_receive_ble_passkey
+	branch le_send_smp_pairing_confirm
+
+
+
+//command opcode 0x90
+module_hci_cmd_ble_set_phy:
+	fetch 1,mem_module_uart_len
+	bne 2,module_hci_event_receive_invalid_cmd
+	ifetcht 2,contru
+	call le_set_phys
+	branch module_hci_event_receive_valid_cmd
+
+
+//command opcode 0x91
+module_hci_cmd_ble_read_current_phy:
+	arg 0,temp
+	arg 2,rega
+	arg mem_context+coffset_le_rx_phy,regb
+	branch module_hci_event_set_cmd
+
+
+//command opcode 0x92
+module_hci_cmd_ble_set_dle:
+	fetch 1,mem_module_uart_len
+	bne 8,module_hci_event_receive_invalid_cmd
+	ifetch 8,contru
+	call le_set_dle
+	branch module_hci_event_receive_valid_cmd
+
+
+//command opcode 0x93
+module_hci_cmd_read_chip_data:
+	ifetchr rega,1,contru
+	ifetchr regb,2,contru
+	arg 0,temp
+	branch module_hci_event_set_cmd
+
+
+//command opcode 0x94
+module_hci_cmd_write_chip_data:
+	fetchr loopcnt,1,mem_module_uart_len
+	increase -2,loopcnt
+	ifetch 2,contru
+	copy pdata,contw
+	call uart_copy_rx_bytes_fast
+	branch module_hci_event_receive_valid_cmd
+
+ifdef COMPILE_WECHAT
+//command opcode 0x95
+module_hci_cmd_wechat_send_data:
+	fetch 2,mem_ui_state_map
+	bbit0 UI_STATE_BLE_CONNECTED,module_hci_event_receive_invalid_cmd
+	fetchr loopcnt,1,mem_module_uart_len
+	arg mem_module_wechat_local_data_buffer,contw
+	call uart_copy_rx_bytes_fast
+	fetchr regb,1,mem_module_uart_len
+	arg mem_module_wechat_local_data_buffer,rega
+	call wechat_air_sync_send_wechat_packet
+	jam HCI_NOT_DISCARD_PACKET,mem_module_temp_nl_discard_packet 
+	rtn user
+	jam HCI_DISCARD_PACKET,mem_module_temp_nl_discard_packet 
+	branch module_hci_event_receive_valid_cmd
+endif
+
+
+//command opcode 0xff
+module_hci_cmd_close_lpm:
+	jam 0,mem_lpm_mode
+	branch module_hci_event_receive_valid_cmd
+	
+
+/*********************HCI EVENT*********************/
+
+module_hci_event_receive_invalid_cmd:
+	arg 1,temp
+	arg 0,rega
+	branch module_hci_event_set_cmd
+
+
+module_hci_event_receive_valid_cmd:
+	arg 0,temp
+	arg 0,rega
+	branch module_hci_event_set_cmd
+
+
+//event opcode 0x02
+module_hci_event_le_connect:
+	jam  HCI_EVENT_LE_CONN_REP,mem_module_uart_opcode
+	branch module_hci_event_enter_standby_mode_len0
+
+
+
+//event opcode 0x05
+module_hci_event_le_disconnect:
+	jam  HCI_EVENT_LE_DIS_REP,mem_module_uart_opcode
+	branch module_hci_event_enter_standby_mode_len0
+
+
+//event opcode 0x06
+//input:
+//	temp: success 0; fail 1
+//	rega:Response Content length
+//	regb:Response Content address
+module_hci_event_set_cmd:
+	fetch 1,mem_module_uart_opcode
+	copy pdata,regc
+	jam  HCI_EVENT_CMD_RES,mem_module_uart_opcode
+	setarg 2
+	iadd rega,pdata
+	call module_hci_prepare_tx
+	copy regc,pdata
+	istore 1,contwu
+	istoret 1,contwu
+	copy rega,loopcnt
+	copy regb,contr
+	call uart_copy_tx_bytes
+	branch module_hci_transmit_tx
+
+
+
+
+//event opcode 0x08
+//loopcnt pdata is data length
+module_hci_event_receive_le_data:
+	jam HCI_EVENT_LE_DATA_REP,mem_module_uart_opcode
+	add loopcnt,2,pdata
+	call module_hci_prepare_tx
+	fetch 2,mem_module_le_rx_data_handle // Attribute handle
+	istore 2,contwu
+	fetch 2,mem_module_le_rx_data_address
+	icopy contr
+	call uart_copy_tx_bytes_fast
+	copy contr,pdata
+	store 2,mem_module_le_rx_data_address
+	branch module_hci_transmit_tx
+
+
+//event opcode 0x09
+module_hci_event_enter_standby_mode:
+	jam HCI_EVENT_STANDBY_REP,mem_module_uart_opcode
+module_hci_event_enter_standby_mode_len0:
+	setarg 0
+	call module_hci_prepare_tx
+	branch module_hci_transmit_tx
+
+
+//event opcode 0x0a
+module_hci_event_status_res:
+	jam HCI_EVENT_STATUS_RES,mem_module_uart_opcode
+	setarg 1
+	call module_hci_prepare_tx
+	
+	call module_hci_read_bt_status
+	
+	fetch 2,mem_ui_state_map	
+	arg UI_STATE_BLE_CONNECTED,queue
+	qisolate1 pdata
+	setflag true,5,temp	
+	
+
+	
+	istoret 1,contwu
+	branch module_hci_transmit_tx
+
+//	temp: bit0 3.0 inquiry;bit1 3.0 scan;bit2 ble adv;
+
+module_hci_read_bt_status:
+	arg 0,temp
+	fetch 1,mem_le_adv_enable
+	arg 0,queue
+	qisolate1 pdata
+	setflag true,2,temp	
+	rtn
+
+
+//event opcode 0x0d
+module_hci_event_store_device:
+	jam HCI_EVENT_NVRAM_REP,mem_module_uart_opcode
+	fetch 1,mem_nv_data_number
+	mul32 pdata,34,pdata
+	icopy loopcnt
+	call module_hci_prepare_tx
+	fetch 2,mem_nv_data_ptr
+	icopy contr
+	call uart_copy_tx_bytes_fast
+	branch module_hci_transmit_tx
+
+ifdef SECURE_CONNECTION
+//event opcode 0x0e
+module_hci_event_gkey_generate:
+	jam HCI_EVENT_GKEY,mem_module_uart_opcode
+	setarg 4
+	call module_hci_prepare_tx
+	fetch 4,mem_gkey
+	istore 4,contwu
+	branch module_hci_transmit_tx
+endif
+
+//event opcode 0x0f
+module_hci_event_invalid_packet:
+	jam HCI_EVENT_INVALID_PACKET,mem_module_uart_opcode
+	fetch 2,core_uart_rxitems
+	arg 0x40,temp
+	call not_greater_than
+	copy pdata,rega
+	copy pdata,loopcnt
+	call uarta_prepare_rx
+	arg mem_module_rx_error_data_buffer,contw
+	call uart_copy_rx_bytes_fast
+	copy rega,pdata
+	copy rega,loopcnt
+	call module_hci_prepare_tx
+	arg mem_module_rx_error_data_buffer,contr
+	call uart_copy_tx_bytes_fast
+	branch module_hci_transmit_tx
+
+
+//event opcode 0x10
+module_hci_event_passkey_entry_mode:
+	jam  HCI_EVENT_GET_PASSKEY,mem_module_uart_opcode
+	branch module_hci_event_enter_standby_mode_len0
+
+
+//event opcode 0x11
+module_hci_event_le_tk:
+	jam HCI_EVENT_LE_TK,mem_module_uart_opcode
+	setarg 4
+	call module_hci_prepare_tx
+	fetch 4,mem_le_tk
+	istore 4,contwu
+	branch module_hci_transmit_tx
+
+
+//event opcode 0x14
+module_hci_event_le_pairing_fail:
+	arg FLAG_BLE_PAIRING_FAIL,rega
+	branch module_hci_event_pairing_completed
+
+module_hci_event_le_pairing_success:
+	arg FLAG_BLE_PAIRING_SUCCESS,rega
+	branch module_hci_event_pairing_completed
+
+
+module_hci_event_pairing_completed:
+	jam HCI_EVENT_LE_PAIRING_STATE,mem_module_uart_opcode
+	setarg 2
+	call module_hci_prepare_tx
+	copy rega,pdata
+	istore 2,contwu
+	branch module_hci_transmit_tx
+
+
+//event opcode 0x15
+module_hci_event_pause_enc:
+	arg FLAG_EVENT_PAUSE_ENC,regc
+	branch module_hci_event_enc
+
+module_hci_event_start_enc:
+	arg FLAG_EVENT_START_ENC,regc
+
+module_hci_event_enc:
+	jam HCI_EVENT_LE_ENCRYPTION_STATE,mem_module_uart_opcode
+	setarg 1
+	call module_hci_prepare_tx
+	copy regc,pdata
+	istore 1,contwu
+	branch module_hci_transmit_tx
+
+
+
+//event opcode 0x29
+//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 module_hci_transmit_tx
+
+
+//event opcode 0x2B
+module_hci_event_le_input_passkey:
+	jam HCI_EVENT_LE_INPUT_GKEY,mem_module_uart_opcode
+	branch module_hci_event_enter_standby_mode_len0
+
+
+//event opcode 0x40
+module_hci_event_le_update_phy:
+	jam HCI_BLE_UPDATE_PHY_EVENT,mem_module_uart_opcode
+	setarg 2
+	call module_hci_prepare_tx
+	fetch 2,mem_context+coffset_le_rx_phy
+	istore 2,contwu
+	branch module_hci_transmit_tx
+
+ifdef COMPILE_WECHAT
+//event opcode 0x41
+module_wechat_rx_push_data:
+module_hci_event_ble_wechat_receive_push_data:
+	call wechat_air_sync_check_push_data_struct
+	nrtn user
+	jam HCI_BLE_WECHAT_RECEIVE_PUSH_DATA,mem_module_uart_opcode
+	copy loopcnt,pdata
+	call module_hci_prepare_tx
+	copy regc,contr
+	call uart_copy_tx_bytes_fast
+	branch module_hci_transmit_tx
+endif
+	
+
+//****************************************************************//
+	//module_hci_prepare_tx
+	//function:write hci packet header
+	//input: pdata-----packet length  (1byte)
+	//input: mem_uart_opcode------opcode (1byte)
+	//output:contwu --- pointer to packet payload
+	//use reg: contwu,pdata
+//****************************************************************//	
+module_hci_prepare_tx:
+	jam 0x02,mem_module_uart_cmd
+	store 1,mem_module_uart_len
+	storet 8,mem_temp
+	bpatch patch07_4,mem_patch07
+	call module_set_mcu_wake_pin_high_delay
+	fetcht 8,mem_temp
+	call uarta_prepare_tx_register_push
+	fetch 3,mem_module_uart_cmd
+	istore 3,contwu
+	rtn
+
+module_hci_transmit_tx:
+	bpatch patch07_5,mem_patch07
+	branch uarta_send_register_pop
+
+module_set_mcu_wake_pin_high_delay:
+	call module_check_mcu_wake_pin_high
+	rtn true
+module_set_mcu_wake_pin_h_delay:
+	call module_set_mcu_wake_pin_high
+	fetch 4,mem_module_mcu_wake_delay_us
+	rshift2 pdata,pdata
+	rtn blank
+	branch delay
+
+module_set_mcu_wake_pin_high:
+	fetcht 1,mem_module_mcu_wake_pin
+	branch gpio_out_active
+
+module_check_mcu_wake_pin_high:
+	fetcht 1,mem_module_mcu_wake_pin
+	branch gpio_check_active
+
+module_set_mcu_wake_pin_low:
+	fetcht 1,mem_module_mcu_wake_pin
+	branch gpio_out_inactive
+
+
+
+/*********************hci command end*********************/
+
+/*********************hci ble receive data start*********************/
+
+//rega is le rx data address
+//regb is le rx data length
+//mem_le_att_handle is write handle
+module_le_receive_data:
+	storer rega,2,mem_module_le_rx_data_address
+	storer regb,2,mem_module_le_rx_data_len
+	fetch 2,mem_le_att_handle
+	store 2,mem_module_le_rx_data_handle
+	call module_check_ble_encrypt_state
+	rtn user
+	
+module_le_receive_data_ok:	
+	fetcht 2,mem_module_le_rx_data_len
+	fetch 1,mem_module_ble_data_uart_max_length
+	call not_greater_than
+	copy pdata,loopcnt
+	copy temp,pdata
+	isub loopcnt,pdata
+	store 2,mem_module_le_rx_data_len
+	call module_hci_event_receive_le_data
+	fetch 2,mem_module_le_rx_data_len
+	rtn blank
+	branch module_le_receive_data_ok
+
+/*********************hci ble receive data end*********************/
+
+
+module_bb_event_timer:
+//	branch module_read_vdd_timer
+
+module_read_vdd_timer:
+	fetch 1,mem_module_read_vdd_flag
+	rtn blank
+	fetch 1,mem_module_read_vdd_count
+	rtn blank
+	increase -1,pdata
+	store 1,mem_module_read_vdd_count
+	nrtn blank
+	jam FLAG_MODULE_READ_VDD_COUNT,mem_module_read_vdd_count
+	call enable_adc
+	call vdd_calculate_by_mode
+	div pdata,0x64
+	call get_div_result
+	remainder temp
+	store 1,mem_module_vdd_quotient
+	storet 1,mem_module_vdd_remainder
+	rtn	
+	
+
+
+/**************module state *******************/
+
+module_set_le_tx_data_flag:
+	arg MODULE_FLAG_BLE_DATA_FINISH,queue
+	branch module_set_state
+	
+module_clear_le_tx_data_flag:
+	arg MODULE_FLAG_BLE_DATA_FINISH,queue
+	branch module_clr_state
+
+module_clr_state:
+	fetch 2,mem_module_flag
+	qset0 pdata
+	store 2,mem_module_flag
+	rtn
+
+module_set_state:
+	fetch 2,mem_module_flag
+	qset1 pdata
+	store 2,mem_module_flag
+	rtn
+	
+/**************module state end*******************/
+
+endif
Index: program/app_mouse.prog
===================================================================
--- /branch/usb/usb_public_base/program/app_mouse.prog	(revision 0)
+++ /branch/usb/usb_public_base/program/app_mouse.prog	(working copy)
@@ -0,0 +1,4053 @@
+
+ifdef COMPILE_MOUSE
+mouse_init:
+	call enable_authrom
+	call mouse_setting_config
+	call mouse_init_sunt
+	rtn wake
+	call mouse_dpi_config
+	call mouse_drawing_optima_init
+	call mouse_cb_fuction
+	call mouse_sensor_powerdown
+mouse_init_wireless:	
+	fetch 2,mem_ui_state_map
+	bbit1 UI_STATE_BTN_DOWN,mouse_start_discovery
+	call mouse_check_select_device_by_switch
+	branch mouse_start_work
+
+
+mouse_cb_fuction:
+	setarg mouse_24g_before_lpm_sleep
+	store 2,mem_cb_before_lpm_sleep
+	setarg mouse_24g_package_data
+	store 2,mem_cb_24g_transmit_data
+	setarg mouse_24g_search_dongle
+	store 2,mem_cb_24g_search_receiver
+	setarg mouse_lpm_before_common
+	store 2,mem_cb_24g_lpm_before
+	setarg mouse_le
+	store 2,mem_cb_le_process
+	setarg mouse_process_lpm_before
+	store 2,mem_cb_before_lpm
+	setarg mouse_priority_bb_event
+	store 2,mem_cb_bb_event_process
+	setarg mouse_idle
+	store 2,mem_cb_idle_process
+	setarg mouse_before_hibernate
+	store 2,mem_cb_before_hibernate
+	setarg mouse_le_bb_event_connect_complete
+	store 2,mem_cb_att_write	
+	setarg mouse_bb_event_timer
+	store 2,mem_cb_event_timer
+	setarg mouse_spi_write_flash_cb
+	store 2,mem_cb_spi_flash_write_complate
+	setarg mouse_lpm_check_wake_lock
+	store 2,mem_cb_check_wakelock
+	setarg mouse_le_transmit
+	store 2,mem_cb_ble_transmit
+	setarg mouse_set_lpm_mult
+	store 2,mem_cb_bt_set_mult
+	rtn
+
+
+mouse_setting_config:
+	rtn wake
+	call g24_transmit_init
+	call g24_chmap_param_init
+	call mouse_gpio_init
+	call mouse_param_init
+	call le_set_config_fixed_ltk
+	call le_set_justwork
+	call le_set_fixed_ltk
+	call le_set_config_read_authentication
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	bbit1 MOUSE_ENABLE_EEPROM,mouse_load_eeprom_info_check
+	bbit1 MOUSE_ENABLE_FLASH,mouse_load_flash_info_check
+	rtn
+	
+mouse_xtal_init:
+	jam 0x08,mem_fcomp_div		// 0x08--16M 
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	rtnbit1 MOUSE_ENABLE_16M
+	jam 0x18,mem_fcomp_div		// 0x18--24M
+	rtn
+
+mouse_24g_phy_select:
+	call g24_enable_1M
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	rtnbit0 MOUSE_ENABLE_24G_2M_PHY
+	branch g24_enable_2M
+
+mouse_default_init:
+	fetch 2,mem_mouse_24g_pair_timeout_init
+	store 2,mem_24g_pair_timeout_init
+
+	fetch 1,mem_mouse_24g_reconn_timeout_init
+	store 2,mem_24g_reconn_timeout_init
+
+	fetch 5,mem_rssi_dis_min_24g_init
+	store 5,mem_rssi_dis_min_24g
+
+	fetch 1,mem_mouse_24g_pair_tx_power
+	store 1,mem_24g_pair_tx_power
+
+	fetch 1,mem_mouse_enable_flag
+	isolate1 MOUSE_ADC_ENABLE,pdata
+	call mouse_adc_read_enable,true
+
+	fetch 1,mem_mouse_enable_flag
+	isolate1 MOUSE_24G_250HZ_ENABLE,pdata
+	call mouse_24g_set_250Hz,true
+	fetch 1,mem_mouse_enable_flag
+	isolate1 MOUSE_SEARCH_DONGLE_ENABLE,pdata
+	call mouse_24g_search_dongle_enable,true
+	fetch 1,mem_mouse_enable_flag
+	isolate1 MOUSE_CLK_16M_ENABLE,pdata
+	call mouse_16M_enable,true
+	fetch 1,mem_mouse_enable_flag
+	isolate1 MOUSE_DPI_4_LEVEL_ENABLE,pdata
+	call mouse_dpi_4level_enable,true
+	fetch 1,mem_mouse_enable_flag
+	isolate1 MOUSE_KEYBOARD_ENABLE,pdata
+	call mouse_customer_key_enable,true
+	
+	fetch 1,mem_24g_ch_map_update
+	ncall g24_chamap_param_update,blank
+
+	call mouse_xtal_init
+	call mouse_adc_vol_init	
+	call mouse_24g_phy_select
+	call mouse_24g_long_sleep_set
+	branch g24_pair_param_init
+	
+mouse_param_init:
+	setarg MOUSE_BLE_ATT_LIST_ADDR				//ble attlist start address
+	store 2,mem_ui_le_uuid_table
+	jam 3,mem_lpm_mult_timeout
+	jam 8,mem_lpm_overhead
+	jam DPI_BUTTON_STATE_UP,mem_select_device_button_statue
+	jam PB_BUTTON_STATE_UP,mem_select_device_button_statue
+	jam COMMBINATION_KEY_STATE_UP,mem_commbination_key_statue	
+	setarg 0x0200
+	store 2,mem_lpm_interval
+	jam 0x17,mem_le_local_mtu
+	jam 0x17,mem_le_remote_mtu
+//===========init spi param==============================
+	setarg 0x0a77
+	store 2,mem_spi_init_clk
+	setsect 0,0x1224
+	setsect 1,0x4000
+	setsect 2,0x0
+	istore 5,contw
+//======================================================	
+	setarg mem_le_tx_buffer0_omemalloc
+	store 2,mem_ble_l2cap_tx_buff0_ptr
+	setarg MOUSE_BLE_L2CAP_TXBUFF_SIZE
+	store 2,mem_ble_l2cap_tx_buff_size_ptr
+	
+	call mouse_device_led_all_off
+	call mouse_device_poweron_timer_init
+	call mouse_adc_gpio_mux_init
+
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	bbit0 MOUSE_ENABLE_BT_125Hz,mouse_param_init_intervl_end
+	setarg LE_INTERVAL_7_5MS
+	store 2,mem_le_interval_min
+	store 2,mem_le_interval_min+2
+mouse_param_init_intervl_end:
+	call g24_interval_param_8ms
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	bbit0 MOUSE_ENABLE_24G_250Hz,mouse_24g_short_sleep_set_end
+	call g24_interval_param_4ms
+mouse_24g_short_sleep_set_end:
+	fetch 1,mem_device_flag
+	store 1,mem_device_flag_temp
+	fetch 3,mem_le_lap+3
+	store 3,mem_mouse_le_lap_temp
+	fetch 1,mem_adc_config_flag_init
+	and pdata,0xfe,pdata		// hvin = vinlpm
+	store 1,mem_adc_config_flag_init
+	store 1,mem_adc_config_flag
+	setarg 0
+	store 7,mem_mouse_key
+	fetch 1,mem_ui_button_timeout
+	store 1,mem_bt_discovery_count
+	store 1,mem_select_device_count
+	call le_modified_name_adv
+mouse_sensor_set_angle:
+	bpatchx patch31_2,mem_patch31
+	fetch 1,mem_sensor_angle_default
+	store 1,mem_config_sensor_angle
+	fetch 1,mem_select_sensor_angle_gpio
+	rtneq GPIO_DISABLE
+	fetcht 1,mem_select_sensor_angle_gpio
+	call mouse_gpio_config_input_pu
+	fetcht 1,mem_select_sensor_angle_gpio
+	call gpio_get_bit
+	call mouse_sensor_switch_angle,true
+	branch mouse_gpio_config_input_pd
+mouse_sensor_switch_angle:
+	fetch 1,mem_sensor_angle_switch
+	store 1,mem_config_sensor_angle
+	rtn
+
+mouse_start_work:
+	bpatch patch07_6,mem_patch07
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	bbit1 MOUSE_ENABLE_24G_FIRST_AUTO_PAIRING, mouse_24g_first_start_auto_pair_mode
+	fetch 1,mem_device_flag
+	beq MODE_24G_DEVICE,mouse_24g_start_mode
+	call mouse_wakeup_from_power_check	// wake from hibernate :enble user
+	nbranch mouse_buletooth_fast_conn_init,user
+mouse_start_reconnect_device:
+	bpatch patch07_7,mem_patch07
+	arg mem_device1_type,rega
+	fetch 1,mem_device_flag
+	increase -1,pdata
+	mul32 pdata,29,pdata
+	iadd rega,rega
+	ifetch 1,rega
+	store 1,mem_xrecord_mode
+mouse_start_reconnect:	
+	fetch 1,mem_xrecord_mode
+	beq REC_4_MODE,mouse4_0_check_reconn_target
+	branch mouse_start_discovery
+
+
+mouse_wakeup_from_power_check:
+	bpatch patch08_0,mem_patch08
+	disable user
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	bbit0 MOUSE_ENABLE_WAKEUP_FROM_POWER,mouse_wakeup_from_power
+	fetch 1,mem_wakup_from_power_flag
+	bbit0 BIT_POWER_ON,mouse_wakeup_from_power
+	enable user		// mouse power on
+mouse_wakeup_from_power:
+	fetch 1,mem_reconn_times_init
+	store 1,mem_reconn_times
+	rtn
+
+
+mouse4_0_check_reconn_target:
+	jam 1,mem_mouse_le_reconnect_flag
+	fetcht 1,mem_mouse_fast_direct_timeout
+	fetch 1,mem_mouse_bluetooth_fast_conn_flag
+	beq 0xff,mouse4_0_check_reconn_target_next
+	fetcht 1,mem_mouse_direct_timeout
+mouse4_0_check_reconn_target_next:	
+	storet 1,mem_mouse_direct_timer
+	call app_lpm_mult_disable
+	fetch 3,mem_le_adv_direct_ind
+	store 3,mem_le_adv_data+4
+	call mouse_le_check_adv_flag
+	setarg ADV_FLAG_BREDR_NOT_SUPPORTED
+	istore 1,contr
+	arg mem_le_scan_data,contr
+	call mouse_le_adv_data_update
+	branch check_51cmd_adv
+
+
+/*****************system clk***********************************/
+mouse_lpm_check_wake_lock:
+	bmark1 mark_24g,app_get_lpm_wake_lock
+	fetch 1,mem_mouse_clear_sensor_data_flag
+	branch app_get_lpm_wake_lock,blank
+	fetch 1,mem_mouse_le_conn_param_reject
+	beq LE_LPM_DISABLE,app_get_lpm_wake_lock
+	fetch 1,mem_mouse_wheel_trigger
+	nbranch app_get_lpm_wake_lock,blank
+	branch app_put_lpm_wake_lock
+
+mouse_delay_enter_hibernata:
+	fetch 1,mem_mouse_direct_timeout
+	store 1,mem_mouse_bluetooth_reconnect_timeout
+	rtn
+
+mouse_power_down:
+	call mouse_device_led_all_off
+mouse_app_enter_hibernate:
+	bpatch patch08_1,mem_patch08
+	setarg PAN_REG_CONFIG
+	call twspi_read
+	bbit1 3,mouse_app_enter_hibernate_next
+	call mouse_sensor_reset
+	call mouse_sensor_powerdown
+mouse_app_enter_hibernate_next:
+	call mouse_setgpio_hibernate
+	branch app_enter_hibernate
+
+mouse_before_hibernate:
+	bpatch patch08_2,mem_patch08
+	fetch 4,core_lpm_ctrl
+	set1 26,pdata
+	store 4,core_lpm_reg
+	call lpm_write_ctrl
+	call disable_authrom
+	call mouse_device_led_all_off
+	call mouse_before_hibernate_wheel_gpio_set
+	call mouse_setgpio_hibernate
+	call mouse_flash_power_down
+	fetcht 1,mem_sensor_motion_gpio
+	branch gpio_clr_wake
+
+
+mouse_setgpio_hibernate:
+	bpatch patch08_3,mem_patch08
+	call mouse_set_sdio_high
+	call clear_wake
+	call mouse_lpm_before_common
+	call mouse_gpio_pu_idle
+	fetcht 1,mem_mouse_reuse_2ice_gpio
+	call mouse_gpio_config_input_pu
+	call mouse_gpio_set_high_impedance
+	call mouse_adc_gpio_set_before_hibernate
+	branch mouse_wheel_gpio_set_before_hibernate
+
+mouse_wheel_gpio_set_before_hibernate:
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	rtnbit0 MOUSE_ENABLE_WHEEL_WAKE_UP_CANCEL
+mouse_wheel_gpio_clr_wakeup:	
+	fetcht 1,mem_whee_a_data_gpio
+	call gpio_clr_wake
+	fetcht 1,mem_whee_b_data_gpio
+	call gpio_clr_wake
+	fetch 1,mem_whee_a_data_gpio
+	arg gpcfg_pulldown,temp
+	call gpio_config_function_int
+	fetch 1,mem_whee_b_data_gpio
+	arg gpcfg_pulldown,temp
+	branch gpio_config_function_int
+
+mouse_adc_gpio_set_before_hibernate:
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	rtnbit0 MOUSE_ENABLE_ADC
+	fetch 1,mem_adc_config_flag_init
+	rtnne ADC_CONFIG_GPIO
+	fetch 1,mem_adc_channel_gpio	
+	arg gpcfg_no_ie,temp
+ 	branch gpio_config_function_int
+	
+
+//set all unused gpio to pull up mode to save power	
+mouse_gpio_pu_idle:
+	arg core_gpio_conf,contr
+	arg 19,loopcnt
+mouse_gpio_pu_idle_loop:
+	ifetch 1,contr
+	nbranch mouse_gpio_pu_idle_configured,blank
+	setarg 0x40
+	add contr,-1,contw
+	istore 1,contw
+mouse_gpio_pu_idle_configured:
+	loop mouse_gpio_pu_idle_loop
+	rtn
+	
+	
+mouse_process_lpm_before:
+	rtnmark1 mark_24g
+	call mouse_lpm_before_common
+	fetch 1,mem_lpm_current_mult
+	nrtn blank					// 7.5ms, no gpio wakeup
+	branch gpio_clr_wake
+
+mouse_lpm_before_common:
+	bpatch patch08_4,mem_patch08
+	fetcht 1,mem_whee_a_data_gpio		//reinit gpio pu after disable wheel wakeup
+	call gpio_config_input
+	fetcht 1,mem_whee_b_data_gpio
+	call gpio_config_input
+	
+	call mouse_wheel_check
+	fetch 1,mem_mouse_sensor_sclk_gpio		//set sdio high
+	arg gpcfg_output_high,temp
+ 	call gpio_config_function_int
+	call twspi_disable
+	
+	fetcht 1,mem_lbutton_gpio
+	call gpio_set_wake
+	fetcht 1,mem_rbutton_gpio
+	call gpio_set_wake
+	fetcht 1,mem_mbutton_gpio
+	call gpio_set_wake
+
+	fetcht 1,mem_bk_button_gpio
+	call gpio_set_wake
+	fetcht 1,mem_fw_button_gpio
+	call gpio_set_wake
+	fetcht 1,mem_dpi_button_gpio
+	call gpio_set_wake
+	fetcht 1,mem_config_select_device_button_gpio
+	call gpio_set_wake
+
+	fetcht 1,mem_customer_key_gpio
+	call gpio_set_wake
+	
+	fetcht 1,mem_whee_a_data_gpio
+	call gpio_set_wake_by_current_state
+	fetcht 1,mem_whee_b_data_gpio
+	call gpio_set_wake_by_current_state
+	fetcht 1,mem_whee_ta_data_gpio
+	call gpio_set_wake_by_current_state
+	fetcht 1,mem_whee_tb_data_gpio
+	call gpio_set_wake_by_current_state
+	fetcht 1,mem_sensor_motion_gpio
+	branch gpio_set_wake
+
+
+//short mult: no key 
+mouse_set_mult:
+	fetch 2,mem_ui_state_map
+	bbit1 UI_STATE_BLE_CONNECTED,mouse_set_ble_mult
+	rtn
+mouse_set_ble_mult:
+	copy rega,pdata
+	nbranch le_set_config_short_mult,blank
+	branch le_clr_config_short_mult
+
+	
+/*****************system clk***********************************/
+	
+	
+/****************************adc**************************************/	
+mouse_adc_gpio_set:
+	fetch 1,mem_adc_config_flag
+	rtnne ADC_CONFIG_GPIO
+mouse_adc_gpio_check_output:
+	bpatch patch08_5,mem_patch08
+	fetcht 1,mem_adc_channel
+	sub temp,3,null
+	branch mouse_adc_gpio_4_7_set,positive
+	increase 5,temp
+	storet 1,mem_adc_channel_gpio
+mouse_adc_gpio_set_next:
+	copy temp,rega
+	call gpio_get_config
+	beq gpcfg_output_high,mouse_set_24g_led_statue
+	call mouse_clear_24g_led_statue
+	copy rega,temp
+	branch gpio_set_high_impedance
+
+mouse_adc_gpio_4_7_set:
+	increase 4,temp
+	storet 1,mem_adc_channel_gpio
+	branch mouse_adc_gpio_set_next
+
+mouse_adc_vol_init:
+	fetch 1,mem_adc_config_flag_init
+	beq ADC_CONFIG_GPIO,mouse_adc_gpio_vol_init
+	beq ADC_CONFIG_VINLPM,mouse_adc_gpio_vinlpm_init
+	jam ADC_CONFIG_VINLPM,mem_adc_config_flag_init
+	setarg 0x2c0172		// 0x0172--3.7V  0x012c--3.0V  0x0140--3.2V  0x014a--3.3V
+	store 3,mem_mouse_vdd_full_vol
+	setarg 0x014001
+	istore 3,contw
+	rtn
+mouse_adc_gpio_vol_init:	
+	setarg 0x5d0099		// 0x0099--1.5V   0x005d--0.9V  0x0068--1.0V  0x0071--1.1V
+	store 3,mem_mouse_vdd_full_vol
+	setarg 0x007100
+	istore 3,contw
+	rtn
+mouse_adc_gpio_vinlpm_init:
+	setarg 0xc8012c		// 0x012c--3.0V  0x00c8--2.0V  0x00dc--2.2V
+	store 3,mem_mouse_vdd_full_vol
+	setarg 0x00dc00
+	istore 3,contw
+	rtn
+	
+mouse_adc_gpio_mux_init:
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	rtnbit0 MOUSE_ENABLE_ADC
+	jam MOUSE_ADC_CHECK_MULTIPLE,mem_adc_mux_status
+	rtnbit1 MOUSE_ENABLE_DPI_KEY_CONNECT_ADC
+	rtnbit1 MOUSE_ENABLE_SELECT_DEVICE_BY_SWITCH_ADC
+	jam MOUSE_ADC_CHECK_BATTERY_ONLY,mem_adc_mux_status
+	rtn
+
+mouse_adc_read_interval:	
+	fetch 1,mem_adc_read_timer
+	increase 1,pdata
+	store 1,mem_adc_read_timer
+	fetcht 1,mem_adc_read_time_init	//1s read adc
+	isub temp,null
+	rtn
+
+mouse_adc_read:
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	rtnbit0 MOUSE_ENABLE_ADC
+	call mouse_adc_gpio_set
+	fetch 1,mem_adc_mux_status
+	branch mouse_adc_read_battery,blank
+	fetch 1,mem_adc_config_flag
+	beq ADC_CONFIG_GPIO,mouse_adc_read_gpio_mux_start	// gpio + dpi/switch
+	jam MOUSE_ADC_CHECK_VINLPM_MULTIPLE,mem_adc_mux_status
+	call mouse_adc_read_interval					// vinlpm + dpi/switch
+	branch  mouse_adc_read_gpio, positive
+	call mouse_adc_read_vinlpm
+	branch mouse_adc_read_start
+
+mouse_adc_read_gpio_mux_start:
+	jam MOUSE_ADC_CHECK_GPIO_MULTIPLE,mem_adc_mux_status
+	branch mouse_adc_read_start
+
+mouse_adc_read_gpio:
+	call mouse_adc_gpio_check_output
+	jam ADC_CONFIG_GPIO,mem_adc_config_flag
+	fetch 1,mem_24g_device_led_status
+	ncall mouse_adc_read_vinlpm,blank
+	branch mouse_adc_read_start
+	
+mouse_adc_read_vinlpm:
+	jam 0,mem_adc_read_timer
+	fetch 1,mem_adc_config_flag_init
+	store 1,mem_adc_config_flag
+	rtn	
+	
+mouse_adc_read_battery:		// only get battery
+	fetch 1,mem_adc_config_flag
+	bne ADC_CONFIG_GPIO,mouse_adc_read_battery_start
+	fetch 1,mem_24g_device_led_status
+	nrtn blank
+mouse_adc_read_battery_start:
+	call mouse_adc_read_interval
+	nrtn positive
+mouse_adc_read_start:
+	bpatch patch08_6,mem_patch08
+	fetch 1,mem_24g_device_led_status
+	nrtn blank
+	jam 0,mem_adc_read_timer
+	call enable_adc
+	call vdd_calculate_by_mode
+	store 2,mem_mouse_vdd_now_vol
+	fetch 1,mem_adc_config_flag
+	bne ADC_CONFIG_GPIO, mouse_adc_data_process
+	fetcht 2,mem_mouse_vdd_now_vol	// BAT= 1.5V, R = 200k, a = a*1.8
+	mul32 temp,8,pdata
+	div pdata,10
+	call get_div_result
+	iadd temp,pdata
+	store 2,mem_mouse_vdd_now_vol
+mouse_adc_data_process:	
+	arg mem_mouse_vdd_calculate_set,rega
+	call mouse_adc_bat_percent_lowpower_out
+	fetch 1,mem_adc_power_flag
+	bbit1 2,mouse_adc_button_press
+	bbit1 1,mouse_power_down
+	bbit0 0,mouse_adc_no_low_voltage
+	jam 1,mem_mouse_adc_last_low_voltage_flag
+	branch mouse_adc_low_voltage
+	
+mouse_adc_low_voltage:
+	arg MOUSE_LOW_VOLTAGE_FLAG,queue
+	branch mouse_enable_function_flag
+mouse_adc_no_low_voltage:
+	arg MOUSE_LOW_VOLTAGE_FLAG,queue
+	call mouse_disable_function_flag
+	jam 12,mem_adc_low_volatage_led_timer_count
+	fetch 1,mem_mouse_adc_last_low_voltage_flag
+	rtn blank
+	jam 0,mem_mouse_adc_last_low_voltage_flag
+	fetcht 1,mem_config_low_voltage_alarm_gpio
+	branch mouse_led_off
+
+mouse_adc_bat_percent_lowpower_out:
+	bpatch patch08_7,mem_patch08
+	ifetch 8,rega
+	store 8,mem_pdatatemp
+	fetch 1,mem_adc_mux_status
+	beq MOUSE_ADC_CHECK_BATTERY_ONLY,mouse_adc_bat_percent_lowpower_out_battery
+	beq MOUSE_ADC_CHECK_GPIO_MULTIPLE,mouse_adc_bat_percent_lowpower_out_gpio_multiple
+	beq MOUSE_ADC_CHECK_VINLPM_MULTIPLE,mouse_adc_bat_percent_lowpower_out_vinlpm_multiple
+mouse_adc_bat_percent_lowpower_out_gpio_multiple:
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	bbit0 MOUSE_ENABLE_DPI_KEY_CONNECT_ADC,mouse_adc_bat_percent_lowpower_out_gpio_switch
+	fetch 2,mem_pdatatemp+6		               	//now voltage
+	fetcht 2,mem_mouse_vdd_button_press_vol	// button press check
+	isub temp,null
+	nbranch mouse_adc_set_button_press_flag,positive
+mouse_adc_bat_percent_lowpower_out_gpio_switch:
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	bbit0 MOUSE_ENABLE_SELECT_DEVICE_BY_SWITCH_ADC,mouse_adc_bat_percent_lowpower_out_battery
+	jam 0,mem_mouse_adc_button_press_flag
+	fetch 2,mem_pdatatemp+6				    	        //now voltage	
+	fetcht 2,mem_mouse_vdd_switch_gnd_24g_vol	// switch mode check
+	isub temp,null
+	nbranch mouse_select_24gdevice,positive
+	call mouse_select_btdevice
+	branch mouse_adc_bat_percent_lowpower_out_battery
+
+mouse_select_24gdevice:
+	call mouse_check_select_24gdevice
+mouse_adc_bat_percent_lowpower_out_battery:
+	call mouse_adc_clear_button_press_flag
+	call adc_clear_no_power_flag
+	call adc_clear_low_power_flag
+	fetch 2,mem_pdatatemp+6
+	fetcht 2,mem_pdatatemp+2	        //shutdown voltage
+	isub temp,null
+	ncall adc_set_no_power_flag,positive
+	fetcht 2,mem_pdatatemp+4		//low voltage
+	isub temp,null
+	ncall adc_set_low_power_flag,positive
+mouse_adc_bat_level_set:
+	fetch 2,mem_pdatatemp+6		//now voltage	
+	fetcht 2,mem_pdatatemp		//full voltage
+	isub temp,null
+	branch mouse_adc_bat_level_100_percent,positive		// now >= full
+	fetcht 2,mem_pdatatemp+2	        //shutdown voltage
+	isub temp,pdata
+	nbranch mouse_adc_bat_level_0_percent,positive		// now < shutdown
+	branch mouse_adc_bat_level_0_percent,blank			// now = shutdown
+	mul32 pdata,100,rega								// (now - shutdown)*100 /(full - shutdown)
+	fetch 2,mem_pdatatemp
+	fetcht 2,mem_pdatatemp+2
+	isub temp,temp
+	copy rega,pdata
+	idiv temp
+	call get_div_result
+	store 1,mem_le_battery_level_percentage
+	rtn
+
+mouse_adc_bat_level_100_percent:
+	jam 100,mem_le_battery_level_percentage
+	rtn
+mouse_adc_bat_level_0_percent:	
+	jam 0,mem_le_battery_level_percentage
+	rtn
+
+mouse_adc_bat_percent_lowpower_out_vinlpm_multiple:
+	fetch 1,mem_adc_config_flag
+	beq ADC_CONFIG_GPIO,mouse_adc_bat_percent_lowpower_out_gpio_multiple
+	branch mouse_adc_bat_percent_lowpower_out_battery
+	
+mouse_adc_set_button_press_flag:
+	fetcht 1,mem_adc_power_flag
+	set1 2,temp
+	storet 1,mem_adc_power_flag
+	rtn	
+
+mouse_adc_clear_button_press_flag:
+	fetcht 1,mem_adc_power_flag
+	set0 2,temp
+	storet 1,mem_adc_power_flag
+	rtn		
+
+mouse_adc_button_press:
+	jam 1,mem_mouse_adc_button_press_flag
+	rtn
+	
+/****************************adc**************************************/	
+
+/****************************gpio******************************************/
+mouse_gpio_init:
+	fetcht 1,mem_eeprom_wp_gpio
+	call gpio_config_output
+	call usb_offline_check_init
+	fetcht 1,mem_lbutton_gpio
+	call mouse_gpio_config_input_pu
+	fetcht 1,mem_rbutton_gpio
+	call mouse_gpio_config_input_pu
+	fetcht 1,mem_mbutton_gpio
+	call mouse_gpio_config_input_pu
+	fetcht 1,mem_bk_button_gpio
+	call mouse_gpio_config_input_pu
+	fetcht 1,mem_fw_button_gpio
+	call mouse_gpio_config_input_pu
+	fetcht 1,mem_dpi_button_gpio
+	call mouse_gpio_config_input_pu
+
+	fetcht 1,mem_matrix_public_gpio
+	call mouse_gpio_config_input_pu
+
+	fetcht 1,mem_config_select_device_button_gpio
+	call mouse_gpio_config_input_pu
+
+	fetcht 1,mem_customer_key_gpio
+	call mouse_gpio_config_input_pu
+
+	fetcht 1,mem_whee_a_data_gpio
+	call mouse_gpio_config_input_pu
+
+	fetcht 1,mem_whee_b_data_gpio
+	call mouse_gpio_config_input_pu
+
+	fetcht 1,mem_whee_ta_data_gpio
+	call mouse_gpio_config_input_pu
+	fetcht 1,mem_whee_tb_data_gpio
+	call mouse_gpio_config_input_pu
+
+	fetcht 1,mem_sensor_motion_gpio
+	call mouse_gpio_config_input_pu
+
+	fetcht 1,mem_device_switch_gpio
+	call mouse_gpio_config_input_pu
+	
+	fetcht 1,mem_config_low_voltage_alarm_gpio
+	call gpio_config_output
+
+	fetcht 1,mem_config_device_24g_led_gpio
+	call gpio_config_output
+
+	fetcht 1,mem_config_device_bt1_led_gpio
+	call gpio_config_output
+	
+	fetcht 1,mem_config_device_bt2_led_gpio
+	call gpio_config_output
+
+	fetcht 1,mem_dpi_led_gpio
+	call gpio_config_output
+
+	fetcht 1,mem_select_sensor_angle_gpio
+	branch mouse_gpio_config_input_pu
+
+
+mouse_gpio_set_pupd_by_input:
+	sub temp,UI_BUTTON_GPIO_DISABLE,null
+	rtn zero
+	and temp,0x7f,queue
+	fetch 4,core_gpio_in
+	qisolate1 pdata
+	branch mouse_gpio_config_input_pu,true
+mouse_gpio_config_input_pd:
+	sub temp,UI_BUTTON_GPIO_DISABLE,null
+	rtn zero
+	set1 gpio_active_bit,temp
+	branch gpio_config_input
+
+mouse_gpio_config_input_pu:
+	sub temp,UI_BUTTON_GPIO_DISABLE,null
+	rtn zero 
+	set0 gpio_active_bit,temp
+	branch gpio_config_input
+
+mouse_gpio_set_high_impedance:
+	fetch 3,mem_mouse_set_high_impedance_bit_set
+	store 3,mem_pdatatemp
+	arg 13,loopcnt
+	arg 0,temp
+mouse_gpio_set_high_impedance_bit_loop:	
+	fetch 3,mem_pdatatemp
+	isolate1 0,pdata
+	call gpio_set_high_impedance,true
+	fetch 3,mem_pdatatemp
+	lshift pdata,pdata
+	store 3,mem_pdatatemp
+	increase 1,temp
+	loop mouse_gpio_set_high_impedance_bit_loop
+	rtn
+
+/****************************gpio******************************************/
+
+/*******************spi*****************************/
+mouse_sensor_spi_init:
+	call mouse_spid_init_pin
+	jam 0x73,mem_spi_init_clk
+//	jam 0x1e,mem_spi_init_delay_time
+	call mouse_spi_init
+	branch twspi_enable
+	
+mouse_spi_write_flash_cb:
+mouse_spi_init:
+	branch spid_init
+	
+mouse_spid_init_pin:
+	fetch 1,mem_mouse_sensor_sclk_gpio
+ 	arg gpcfg_spid_sck,temp
+ 	call gpio_config_function_int
+ 	fetch 1,mem_mouse_sensor_sdio_gpio
+ 	arg gpcfg_spid_sdio,temp
+ 	branch gpio_config_function_int
+
+
+/*******************spi*****************************/
+
+
+mouse_motion:
+	bpatch patch09_0,mem_patch09
+	disable user
+	setarg 0
+	store 6,mem_mouse_x
+	call mouse_check_sensor_data
+	call mouse_dpi_config
+	call mouse_zwheel
+	call mouse_t_zwheel
+	call mouse_key
+	fetch 1,mem_mouse_key
+	and_into 0x1f,pdata
+	store 1,mem_mouse_key
+	nbranch mouse_drawing_optima_init,user
+	call mouse_drawing_optima
+	branch mouse_no_data_timer_init
+
+	
+
+/*******************wheel*************************/
+mouse_zwheel:
+	fetch 1,mem_mouse_z_data
+	rtn blank	
+	store 1,mem_mouse_z
+	jam 0,mem_mouse_z_data
+	branch enable_user
+	
+mouse_t_zwheel:
+	fetch 1,mem_mouse_tz_data
+	rtn blank	
+	store 1,mem_mouse_tz
+	jam 0,mem_mouse_tz_data
+	branch enable_user
+
+mouse_wheel_check:
+	call mouse_t_wheel_scan
+	call mouse_wheel_scan
+	fetch 1,mem_wheel_tb_new_pinlevel
+	fetcht 1,mem_wheel_tb_old_pinlevel
+	store 1,mem_wheel_tb_old_pinlevel
+	isub temp,null
+	nbranch app_lpm_wake_auto_lock,zero
+	fetch 1,mem_mwheel_b_new_pinlevel
+	fetcht 1,mem_mwheel_b_old_pinlevel
+	store 1,mem_mwheel_b_old_pinlevel
+	isub temp,null
+	nbranch app_lpm_wake_auto_lock,zero
+	rtn
+mouse_t_wheel_scan:
+	fetch 1,mem_whee_ta_data_gpio
+	rtneq GPIO_DISABLE
+	arg 0,rega
+	fetcht 1,mem_whee_ta_data_gpio
+	call gpio_get_bit
+	setflag true,0,rega
+	fetcht 1,mem_whee_tb_data_gpio
+	call gpio_get_bit
+	setflag true,1,rega
+	copy rega,pdata
+	store 1,mem_wheel_tb_new_pinlevel
+	beq 0x01,mouse_t_wheel_scan_judge1
+	beq 0x02,mouse_t_wheel_scan_judge2
+	fetch 1,mem_wheel_tog
+	bbit1 7,mouse_t_wheel_scan_judge3
+	rtn
+
+mouse_t_wheel_scan_judge1:
+	fetch 1,mem_wheel_tb_old_pinlevel
+	beq 0,mouse_t_wheel_scan_judge11
+	beq 3,mouse_t_wheel_scan_judge12
+	rtn
+mouse_t_wheel_scan_judge2:
+	fetch 1,mem_wheel_tb_old_pinlevel
+	beq 0,mouse_t_wheel_scan_judge21
+	beq 3,mouse_t_wheel_scan_judge22
+	rtn
+mouse_t_wheel_scan_judge11:
+	jam 0x82,mem_wheel_tog
+	rtn
+mouse_t_wheel_scan_judge12:
+	jam 0x81,mem_wheel_tog
+	rtn
+mouse_t_wheel_scan_judge21:
+	jam 0x80,mem_wheel_tog
+	rtn
+mouse_t_wheel_scan_judge22:
+	jam 0x83,mem_wheel_tog
+	rtn
+mouse_t_wheel_scan_judge3:
+	fetch 1,mem_wheel_tog
+	set0 7,pdata
+	store 1,mem_wheel_tog
+	beq 0,mouse_t_wheel_scan_judge30
+	beq 1,mouse_t_wheel_scan_judge31
+	beq 2,mouse_t_wheel_scan_judge32
+	beq 3,mouse_t_wheel_scan_judge33
+	rtn
+mouse_t_wheel_scan_judge30:
+	fetch 1,mem_wheel_tb_new_pinlevel
+	beq 3,mouse_wheel_t_forward
+	rtn
+mouse_t_wheel_scan_judge31:
+	fetch 1,mem_wheel_tb_new_pinlevel
+	beq 0,mouse_wheel_t_forward
+	rtn
+mouse_t_wheel_scan_judge32:
+	fetch 1,mem_wheel_tb_new_pinlevel
+	beq 3,mouse_wheel_t_back
+	rtn
+mouse_t_wheel_scan_judge33:
+	fetch 1,mem_wheel_tb_new_pinlevel
+	beq 0,mouse_wheel_t_back
+	rtn
+mouse_wheel_t_forward:
+	fetch 1,mem_mouse_tz_data
+	increase 1,pdata
+	store 1,mem_mouse_tz_data
+	rtn
+mouse_wheel_t_back:
+	fetch 1,mem_mouse_tz_data
+	increase -1,pdata
+	store 1,mem_mouse_tz_data
+	rtn
+
+
+mouse_wheel_scan:
+	fetch 1,mem_whee_a_data_gpio
+	rtneq GPIO_DISABLE
+	arg 0,rega
+	fetcht 1,mem_whee_a_data_gpio
+	call gpio_get_bit
+	setflag true,0,rega
+	fetcht 1,mem_whee_b_data_gpio
+	call gpio_get_bit
+	setflag true,1,rega
+	copy rega,pdata
+	store 1,mem_mwheel_b_new_pinlevel
+	beq 0x01,mouse_wheel_scan_judge1
+	beq 0x02,mouse_wheel_scan_judge2
+	fetch 1,mem_mwheel_tog
+	bbit1 7,mouse_wheel_scan_judge3
+	rtn
+
+mouse_wheel_scan_judge1:
+	fetch 1,mem_mwheel_b_old_pinlevel
+	beq 0,mouse_wheel_scan_judge11
+	beq 3,mouse_wheel_scan_judge12
+	rtn
+mouse_wheel_scan_judge2:
+	fetch 1,mem_mwheel_b_old_pinlevel
+	beq 0,mouse_wheel_scan_judge21
+	beq 3,mouse_wheel_scan_judge22
+	rtn
+mouse_wheel_scan_judge11:
+	jam 0x82,mem_mwheel_tog
+	rtn
+mouse_wheel_scan_judge12:
+	jam 0x81,mem_mwheel_tog
+	rtn
+mouse_wheel_scan_judge21:
+	jam 0x80,mem_mwheel_tog
+	rtn
+mouse_wheel_scan_judge22:
+	jam 0x83,mem_mwheel_tog
+	rtn
+mouse_wheel_scan_judge3:
+	fetch 1,mem_mwheel_tog
+	set0 7,pdata
+	store 1,mem_mwheel_tog
+	beq 0,mouse_wheel_scan_judge30
+	beq 1,mouse_wheel_scan_judge31
+	beq 2,mouse_wheel_scan_judge32
+	beq 3,mouse_wheel_scan_judge33
+	rtn
+mouse_wheel_scan_judge30:
+	fetch 1,mem_mwheel_b_new_pinlevel
+	beq 3,mouse_wheel_forward
+	rtn
+mouse_wheel_scan_judge31:
+	fetch 1,mem_mwheel_b_new_pinlevel
+	beq 0,mouse_wheel_forward
+	rtn
+mouse_wheel_scan_judge32:
+	fetch 1,mem_mwheel_b_new_pinlevel
+	beq 3,mouse_wheel_back
+	rtn
+mouse_wheel_scan_judge33:
+	fetch 1,mem_mwheel_b_new_pinlevel
+	beq 0,mouse_wheel_back
+	rtn
+mouse_wheel_forward:
+	fetch 1,mem_mouse_z_data
+	increase 1,pdata
+	store 1,mem_mouse_z_data
+	rtn
+mouse_wheel_back:
+	fetch 1,mem_mouse_z_data
+	increase -1,pdata
+	store 1,mem_mouse_z_data
+	rtn
+
+
+mouse_wheel_gpio_set_wake:
+	fetcht 1,mem_whee_a_data_gpio
+	call gpio_set_wake_by_current_state
+	fetcht 1,mem_whee_b_data_gpio
+	call gpio_set_wake_by_current_state
+	fetcht 1,mem_whee_ta_data_gpio
+	call gpio_set_wake_by_current_state
+	fetcht 1,mem_whee_tb_data_gpio
+	branch gpio_set_wake_by_current_state
+	
+mouse_before_hibernate_wheel_gpio_set:
+	fetcht 1,mem_whee_a_data_gpio
+	call mouse_gpio_set_pupd_by_input
+	fetcht 1,mem_whee_b_data_gpio
+	call mouse_gpio_set_pupd_by_input
+	fetcht 1,mem_whee_ta_data_gpio
+	call mouse_gpio_set_pupd_by_input
+	fetcht 1,mem_whee_tb_data_gpio
+	branch mouse_gpio_set_pupd_by_input
+
+mouse_wheel_trigger:
+	fetch 2,mem_mouse_z
+	rtn blank
+	jam 1,mem_mouse_wheel_trigger
+	jam 10,mem_mouse_wheel_trigger_timer
+	rtn
+
+mouse_wheel_trigger_timer:
+	arg mem_mouse_wheel_trigger_timer,regc
+	arg mouse_wheel_trigger_disable,regb
+	branch timer_single_step
+mouse_wheel_trigger_disable:
+	jam 0,mem_mouse_wheel_trigger
+	rtn
+
+
+/*
+mouse_set_qdecoder_x:
+	arg MOUSE_DEFAULT_XA_GPIO,temp
+	call mouse_gpio_config_input_pu
+	arg MOUSE_DEFAULT_XA_GPIO,temp
+	call gpio_get_bit
+	rtn true
+	fetch 1,core_qdec_cntx
+	set1 4,pdata
+	store 1,core_qdec_cntx
+	rtn
+*/	
+	
+/*******************wheel*************************/
+
+
+
+/********************dpi******************************/
+mouse_dpi_check:
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	bbit1 MOUSE_ENABLE_DPI_KEY_CONNECT_ADC,mouse_dpi_check_connect_adc
+	fetch 1,mem_dpi_button_gpio
+	rtneq GPIO_DISABLE
+	arg 0,rega
+	jam MOUSE_DPI_KEY,mem_mouse_key_temp
+	fetcht 1,mem_dpi_button_gpio
+	call mouse_dpi_key_check
+	store 1,mem_mouse_dpikey_press_status
+	fetch 1,mem_matrix_public_gpio
+	beq GPIO_DISABLE,mouse_3io6key_dpi_check_end
+	call mouse_matrix_public_gpio_reset
+mouse_dpi_check_exit:	
+	copy rega,pdata
+	bbit1 MOUSE_DPI_KEY,mouse_dpi_down
+	branch mouse_dpi_up
+	
+mouse_dpi_key_check:
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	bbit1 MOUSE_ENABLE_DPI_KEY_CONNECT_GND,mouse_dpi_key_connect_gnd
+	fetch 1,mem_mouse_dpikey_press_status
+	copy pdata,regc
+	fetch 1,mem_matrix_public_gpio
+	beq GPIO_DISABLE,mouse_3io6key_check
+	fetch 1,mem_mouse_ghost_flag
+	nbranch mouse_dpi_check_end,blank
+mouse_dpi_key_connect_matrix:
+	call gpio_get_bit
+	fetcht 1,mem_matrix_public_gpio
+	branch mouse_dpi_key_connect_gnd,true
+	fetcht 1,mem_matrix_public_gpio
+	call gpio_out_active
+	fetcht 1,mem_dpi_button_gpio
+	fetch 1,mem_mouse_dpikey_press_status
+	branch mouse_check_key_connect_gnd
+
+mouse_3io6key_dpi_check_end:
+	fetcht 1,mem_dpi_button_gpio
+	call mouse_gpio_config_input_pu
+	branch mouse_dpi_check_exit
+
+mouse_dpi_check_end:
+	jam DPI_BUTTON_STATE_UP,mem_mouse_dpi_button_state
+	jam 0,mem_mouse_dpikey_press_status
+	rtn
+
+mouse_dpi_key_connect_gnd:
+	fetch 1,mem_mouse_dpikey_press_status
+	branch mouse_check_key_connect_gnd
+
+mouse_dpi_check_connect_adc:
+	fetch 1,mem_mouse_adc_button_press_flag
+	branch mouse_dpi_up,blank
+mouse_dpi_down:
+	fetch 1,mem_mouse_dpi_button_state
+	rtneq DPI_BUTTON_STATE_DOWN
+	jam DPI_BUTTON_STATE_DOWN,mem_mouse_dpi_button_state
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	rtnbit1 MOUSE_ENABLE_SELECT_DEVICE_BY_DPI_BUTTON
+	rtnbit1 MOUSE_ENABLE_DPI_KEY_LONG_PRESS_DISCONVERY
+	branch mouse_dpi_process
+
+mouse_dpi_up:
+	fetch 1,mem_mouse_dpi_button_state
+	rtneq DPI_BUTTON_STATE_UP
+	jam DPI_BUTTON_STATE_UP,mem_mouse_dpi_button_state
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	bbit1 MOUSE_ENABLE_SELECT_DEVICE_BY_DPI_BUTTON,mouse_dpi_up_next
+	bbit1 MOUSE_ENABLE_DPI_KEY_LONG_PRESS_DISCONVERY,mouse_dpi_up_next
+	rtn
+mouse_dpi_up_next:	
+	fetch 1,mem_mouse_dpi_long_press_flag
+	nbranch mouse_dpi_up_after_long_press,blank
+	fetch 1,mem_select_device_count
+	ncall mouse_dpi_process,blank
+mouse_dpi_up_after_long_press:	
+	jam 0,mem_mouse_dpi_long_press_flag
+	fetch 1,mem_ui_button_timeout
+	store 1,mem_select_device_count	
+	store 1,mem_bt_discovery_count	
+	rtn
+	
+mouse_dpi_process:	
+	bpatch patch09_1,mem_patch09
+	call mouse_dpi_ghost_check
+	rtn user
+	fetch 1,mem_mouse_dpi
+	increase 1,pdata
+	and pdata,0x03,pdata
+	store 1,mem_mouse_dpi
+	call mouse_seting_dpi
+	branch mouse_store_device_info_delay
+
+mouse_dpi_ghost_check:
+	disable user
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	rtnbit1 MOUSE_ENABLE_DPI_KEY_CONNECT_GND
+	rtnbit1 MOUSE_ENABLE_DPI_KEY_CONNECT_ADC
+	fetch 1,mem_mouse_lkey_press_status
+	rtn blank
+	fetch 1,mem_mouse_rkey_press_status
+	rtn blank
+	enable user
+	rtn
+	
+mouse_dpi_key_check_long_press:
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	bbit1 MOUSE_ENABLE_SELECT_DEVICE_BY_DPI_BUTTON,mouse_select_device_by_dpi_button
+	bbit1 MOUSE_ENABLE_DPI_KEY_LONG_PRESS_DISCONVERY,mouse_discovery_by_dpi_button
+	rtn
+
+mouse_select_device_by_dpi_button:
+	fetch 1,mem_mouse_dpi_button_state
+	rtnne DPI_BUTTON_STATE_DOWN	
+	arg mem_select_device_count,regc
+	arg mouse_ready_reconnection_by_dpi_button,regb
+	branch timer_single_step
+
+mouse_ready_reconnection_by_dpi_button:
+	jam 1,mem_mouse_dpi_long_press_flag
+	branch mouse_ready_reconnection_by_button
+
+mouse_discovery_by_dpi_button:
+	fetch 1,mem_mouse_dpi_button_state
+	rtnne DPI_BUTTON_STATE_DOWN	
+	arg mem_bt_discovery_count,regc
+	arg mouse_long_dpi_button_bt_discovery,regb
+	branch timer_single_step
+
+mouse_long_dpi_button_bt_discovery:
+	jam 1,mem_mouse_dpi_long_press_flag
+	branch mouse_long_button_bt_discovery
+
+mouse_dpi_config:
+	branch mouse_seting_sensor_type
+
+mouse_setting_dpi_4_level:
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	rtnbit1 MOUSE_ENABLE_DPI_LEVEL_4
+	fetch 1,mem_mouse_dpi
+	rtnne MOUSE_DPI_LEVEL4
+	jam MOUSE_DPI_LEVEL1,mem_mouse_dpi
+	rtn
+	
+mouse_seting_dpi:
+	bpatch patch09_2,mem_patch09
+	call mouse_setting_dpi_4_level
+	call mouse_dpi_led_blink_delay
+mouse_seting_sensor_type:
+	fetch 1,mem_config_sensor_type
+	beq P3212,mouse_seting_3212_dpi
+	beq KA8G2,mouse_seting_ka8g2_dpi
+	fetch 1,mem_mouse_dpi
+	beq MOUSE_DPI_LEVEL1,mouse_set_cpi0		//1200
+	beq MOUSE_DPI_LEVEL2,mouse_set_cpi1		//1600
+	beq MOUSE_DPI_LEVEL3,mouse_set_cpi2		//800
+	beq MOUSE_DPI_LEVEL4,mouse_set_cpi3		//1000
+mouse_set_cpi1:	//320x+8009
+	fetcht 1,mem_320x_dpi_1
+	branch mouse_dpi_store
+mouse_set_cpi0:
+	fetcht 1,mem_320x_dpi_0
+	branch mouse_dpi_store
+mouse_set_cpi2:
+	fetcht 1,mem_320x_dpi_2
+	branch mouse_dpi_store
+mouse_set_cpi3:
+	fetcht 1,mem_320x_dpi_3
+mouse_dpi_store:
+	fetch 1,mem_config_sensor_type
+	beq P3065_XY,mouse_3065xy_set_dpi
+	beq MX8650,mouse_3065xy_set_dpi
+	beq KA8,mouse_ka8_set_dpi
+	beq P6520,mouse_ka8_set_dpi
+	beq P8009,mouse_3065xy_set_dpi
+mouse_dpi_write:		// 3205  1  2  3  4
+	storet 1,mem_mouse_cpi_count
+	setarg MOUSE_DPI_ADDRESS
+	call twspi_read
+	and pdata,0xf8,temp
+	fetch 1,mem_mouse_cpi_count
+	iadd temp,pdata
+	lshift8 pdata,pdata
+	add pdata,MOUSE_DPI_ADDRESS,pdata
+	branch twspi_write
+
+mouse_3065xy_set_dpi:	// 0 1 2 3
+	increase -1,temp
+	branch mouse_dpi_write
+
+mouse_ka8_set_dpi:	// 3 4 5 6
+	increase 2,temp
+	branch mouse_dpi_write
+
+mouse_seting_3212_dpi:
+	fetch 1,mem_mouse_dpi
+	beq MOUSE_DPI_LEVEL1,mouse_set_p3212_cpi0	//1200
+	beq MOUSE_DPI_LEVEL2,mouse_set_p3212_cpi1	//1600
+	beq MOUSE_DPI_LEVEL3,mouse_set_p3212_cpi2	//2400
+	beq MOUSE_DPI_LEVEL4,mouse_set_p3212_cpi3	//800
+mouse_set_p3212_cpi1:
+	fetch 1,mem_3212_dpi_1
+	branch mouse_p3212_dpi
+mouse_set_p3212_cpi0:
+	fetch 1,mem_3212_dpi_0
+	branch mouse_p3212_dpi
+mouse_set_p3212_cpi2:
+	fetch 1,mem_3212_dpi_2
+	branch mouse_p3212_dpi
+mouse_set_p3212_cpi3:
+	fetch 1,mem_3212_dpi_3
+mouse_p3212_dpi:
+	store 1,mem_mouse_cpi_count
+	lshift8 pdata,pdata
+	copy pdata,rega
+	add pdata,MOUSE_P3212_DPI_XADDRESS,pdata
+  	call twspi_write
+ 	copy rega,pdata
+  	add pdata,MOUSE_P3212_DPI_YADDRESS,pdata
+	branch twspi_write
+
+mouse_seting_ka8g2_dpi:
+	fetch 1,mem_mouse_dpi
+	beq MOUSE_DPI_LEVEL1,mouse_set_pka8g2_cpi0		//1600
+	beq MOUSE_DPI_LEVEL2,mouse_set_pka8g2_cpi1		//2400
+	beq MOUSE_DPI_LEVEL3,mouse_set_pka8g2_cpi2		//3200
+	beq MOUSE_DPI_LEVEL4,mouse_set_pka8g2_cpi3		//800
+mouse_set_pka8g2_cpi1:
+	fetch 1,mem_ka8g2_dpi_1
+	branch mouse_p3212_dpi
+
+mouse_set_pka8g2_cpi0:
+	fetch 1,mem_ka8g2_dpi_0
+	branch mouse_p3212_dpi
+	
+mouse_set_pka8g2_cpi2:
+	fetch 1,mem_ka8g2_dpi_2
+	branch mouse_p3212_dpi
+
+mouse_set_pka8g2_cpi3:
+	fetch 1,mem_ka8g2_dpi_3
+	branch mouse_p3212_dpi
+
+		
+/********************dpi******************************/		
+
+
+/***********************key******************************/
+
+mouse_key:
+	call mouse_check_key_gpio
+	call mouse_ghost_key_check
+	call mouse_set_mult
+	call mouse_24g_key
+	copy rega,pdata
+	fetcht 1,mem_mouse_key_last
+	store 1,mem_mouse_key_last
+	store 1,mem_mouse_key
+	ixor temp,pdata
+	sub pdata,0,null
+	rtn zero
+	branch enable_user
+
+mouse_24g_key:
+	rtnmark0 mark_24g
+	copy rega,pdata
+	rtn blank
+	store 1,mem_mouse_key
+	branch enable_user
+
+mouse_ghost_key_check:
+	jam 0,mem_mouse_matrix_key_cow_count
+	jam 0,mem_mouse_matrix_key_row_count
+	jam 0,mem_mouse_ghost_flag
+	copy pdata,temp
+	call mouse_ghost_key_check_L_BK
+	call mouse_ghost_key_check_M_FW
+	call mouse_ghost_key_check_BK_FW
+	call mouse_ghost_key_check_LMR
+	fetch 1,mem_mouse_matrix_key_row_count
+	rtn blank
+	fetch 1,mem_mouse_matrix_key_cow_count
+	rtn blank
+	jam 1,mem_mouse_ghost_flag
+	fetch 1,mem_mouse_key_last		// matrix have ghost key
+	copy pdata,rega
+	rtn
+
+mouse_ghost_key_check_L_BK:
+	and temp,MOUSE_L_BK_BUTTON,pdata
+	beq MOUSE_L_BK_BUTTON,mouse_matrix_cow_more_than_one_key
+	rtn
+mouse_ghost_key_check_M_FW:
+	and temp,MOUSE_M_FW_BUTTON,pdata
+	beq MOUSE_M_FW_BUTTON,mouse_matrix_cow_more_than_one_key
+	rtn
+mouse_ghost_key_check_BK_FW:
+	and temp,MOUSE_BK_FW_BUTTON,pdata
+	beq MOUSE_BK_FW_BUTTON,mouse_matrix_row_more_than_one_key
+	rtn	
+
+mouse_ghost_key_check_LMR:
+	and temp,MOUSE_LMR_BUTTON,pdata	// key LMR press
+	beq MOUSE_LR_BUTTON,mouse_matrix_row_more_than_one_key
+	beq MOUSE_LM_BUTTON,mouse_matrix_row_more_than_one_key
+	beq MOUSE_RM_BUTTON,mouse_matrix_row_more_than_one_key
+	beq MOUSE_LMR_BUTTON,mouse_matrix_row_more_than_one_key
+	rtn
+
+
+mouse_matrix_row_more_than_one_key:
+	jam 1,mem_mouse_matrix_key_row_count
+	rtn
+
+mouse_matrix_cow_more_than_one_key:
+	jam 1,mem_mouse_matrix_key_cow_count
+	rtn
+
+mouse_key_check_once:
+	call mouse_check_key_gpio_once
+	call mouse_check_key_gpio
+	setarg 0x00
+	store 3,mem_mouse_lkey_press_status
+	rtn
+	
+mouse_check_key_gpio:
+	bpatch patch09_3,mem_patch09
+	fetch 1,mem_sensor_shutdown_flag
+	ncall mouse_check_key_gpio_once,blank
+	arg 0,rega
+	call mouse_check_lkey_gpio
+	call mouse_check_rkey_gpio
+	call mouse_check_mkey_gpio
+	call mouse_check_bkkey_gpio
+	call mouse_check_fwkey_gpio
+	call mouse_check_customerkey_gpio
+	copy rega,pdata
+	rtn
+
+mouse_check_key_gpio_once:
+	setarg 0x030303
+	store 3,mem_mouse_lkey_press_status
+	rtn
+
+mouse_check_lkey_gpio:
+	jam MOUSE_L_KEY,mem_mouse_key_temp
+	fetcht 1,mem_lbutton_gpio
+	fetch 1,mem_mouse_lkey_press_status
+	call mouse_check_key_connect_gnd
+	store 1,mem_mouse_lkey_press_status
+	rtn
+
+mouse_check_rkey_gpio:
+	jam MOUSE_R_KEY,mem_mouse_key_temp
+	fetcht 1,mem_rbutton_gpio
+	fetch 1,mem_mouse_rkey_press_status
+	call mouse_check_key_connect_gnd
+	store 1,mem_mouse_rkey_press_status
+	rtn
+	
+mouse_check_mkey_gpio:
+	jam MOUSE_M_KEY,mem_mouse_key_temp
+	fetcht 1,mem_mbutton_gpio
+	fetch 1,mem_mouse_mkey_press_status
+	call mouse_check_key_connect_gnd
+	store 1,mem_mouse_mkey_press_status
+	rtn
+
+mouse_check_bkkey_gpio:
+	fetch 1,mem_bk_button_gpio
+	rtneq GPIO_DISABLE
+	jam MOUSE_BK_KEY,mem_mouse_key_temp
+	fetch 1,mem_mouse_bkkey_press_status
+	copy pdata,regc
+	fetcht 1,mem_bk_button_gpio
+	fetch 1,mem_matrix_public_gpio
+	beq GPIO_DISABLE,mouse_3io6key_bk_check
+	call gpio_get_bit
+	branch mouse_check_bk_button_connect_gnd,true
+	fetcht 1,mem_matrix_public_gpio
+	call gpio_out_active
+	fetcht 1,mem_bk_button_gpio
+	fetch 1,mem_mouse_bkkey_press_status
+	call mouse_check_key_connect_gnd
+mouse_check_bkkey_gpio_end:	
+	store 1,mem_mouse_bkkey_press_status
+	branch mouse_matrix_public_gpio_reset
+
+mouse_check_bk_button_connect_gnd:
+	fetcht 1,mem_matrix_public_gpio
+	fetch 1,mem_mouse_bkkey_press_status
+	call mouse_check_key_connect_gnd
+	branch mouse_check_bkkey_gpio_end
+
+mouse_3io6key_bk_check:
+	call mouse_3io6key_check
+	store 1,mem_mouse_bkkey_press_status
+	fetcht 1,mem_bk_button_gpio
+	branch mouse_gpio_config_input_pu
+
+
+mouse_check_fwkey_gpio:
+	fetch 1,mem_fw_button_gpio
+	rtneq GPIO_DISABLE
+	jam MOUSE_FW_KEY,mem_mouse_key_temp
+	fetch 1,mem_mouse_fwkey_press_status
+	copy pdata,regc
+	fetcht 1,mem_fw_button_gpio
+	fetch 1,mem_matrix_public_gpio
+	beq GPIO_DISABLE,mouse_3io6key_fw_check
+	call gpio_get_bit
+	branch mouse_check_fw_button_connect_gnd,true
+	fetcht 1,mem_matrix_public_gpio
+	call gpio_out_active
+	fetcht 1,mem_fw_button_gpio
+	fetch 1,mem_mouse_fwkey_press_status
+	call mouse_check_key_connect_gnd
+mouse_check_fwkey_gpio_end:	
+	store 1,mem_mouse_fwkey_press_status
+mouse_matrix_public_gpio_reset:	
+	fetcht 1,mem_matrix_public_gpio
+	branch mouse_gpio_config_input_pu
+
+mouse_check_fw_button_connect_gnd:
+	fetcht 1,mem_matrix_public_gpio
+	fetch 1,mem_mouse_fwkey_press_status
+	call mouse_check_key_connect_gnd
+	branch mouse_check_fwkey_gpio_end	
+
+mouse_3io6key_fw_check:
+	call mouse_3io6key_check
+	store 1,mem_mouse_fwkey_press_status
+	fetcht 1,mem_fw_button_gpio
+	branch mouse_gpio_config_input_pu
+
+mouse_check_customerkey_gpio:
+	jam 0,mem_customer_key
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	rtnbit0 MOUSE_ENABLE_KEYBOARD
+	fetch 1,mem_customer_key_gpio
+	rtneq GPIO_DISABLE
+	jam MOUSE_CUSTOMER_KEY,mem_mouse_key_temp
+	fetcht 1,mem_customer_key_gpio
+	fetch 1,mem_mouse_customerkey_press_status
+	call mouse_check_key_connect_gnd
+	store 1,mem_mouse_customerkey_press_status
+	copy rega,pdata
+	bbit1 MOUSE_CUSTOMER_KEY,mouse_customerkey_press
+	call mouse_customerkey_release
+mouse_check_customerkey_gpio_exit:
+	fetch 1,mem_customer_data_trigger
+	store 1,mem_customer_data_trigger_last
+	rtn
+
+mouse_customerkey_press:
+	jam 1,mem_customer_data_trigger
+	call mouse_customer_key_need_send
+	branch mouse_check_customerkey_gpio_exit
+
+mouse_customerkey_release:
+	jam 0,mem_customer_data_trigger
+	fetch 1,mem_customer_data_trigger_last
+	rtn blank
+mouse_customer_key_need_send:	
+	jam 1,mem_customer_key
+	rtn	
+
+mouse_check_matrix_button_connect_gnd:	
+	call gpio_get_bit
+	fetcht 1,mem_mouse_key_temp
+	copy temp,queue	
+	branch  mouse_key_press,true
+mouse_key_release:
+	qset0 rega
+	rtn	
+
+mouse_check_key_connect_gnd:	
+	lshift pdata,pdata
+	copy pdata,regb
+	call gpio_get_bit
+	setflag true,0,regb
+	and regb,0x07,pdata
+mouse_check_key_connect_gnd_next:
+	fetcht 1,mem_mouse_key_temp
+	copy temp,queue
+	beq 0x07,mouse_key_press		//  about 17~22ms three times
+	beq 0x00,mouse_key_release
+	rtn
+
+mouse_key_press:
+	qset1 rega
+	rtn
+
+mouse_3io6key_check:
+	bpatch patch09_4,mem_patch09
+	copy regc,pdata
+	store 1,mem_mouse_key_status
+	lshift pdata,pdata
+	copy pdata,regb
+	copy temp,regc
+	call mouse_gpio_config_input_pd
+	copy regc,temp
+	call gpio_get_bit
+	nsetflag true,0,regb
+	call mouse_check_press
+	branch mouse_check_key_connect_gnd_next
+
+mouse_check_press:
+	fetcht 1,mem_mouse_key_status
+	and_into 0x01,temp
+	and regb,0x01,pdata
+	isub temp,null
+	nbranch mouse_current_mult_update,zero
+	rtn
+	
+/*************************key***************************************/
+
+/**********************sensor******************************/	
+mouse_init_sunt:
+	bpatch patch09_5,mem_patch09
+	call mouse_sensor_spi_init
+	rtn wake
+mouse_init_sensor_wakeup:	
+	call mouse_sensor_poweron
+mouse_init_sensor:
+	bpatch patch09_6,mem_patch09
+	call mouse_read_sensor_id
+	beq P32XX_ID1,mouse_init_p32xx_id2_judge
+	beq P3065_ID1,mouse_init_p3065
+	beq PKA8G2_ID1,mouse_ka8g2_id2_judge
+	call mouse_twspi_reset
+	nop 6900
+	branch mouse_init_sensor
+mouse_twspi_reset:
+	fetch 1,mem_mouse_sensor_sclk_gpio
+	call twspi_reset 
+	branch mouse_spid_init_pin
+
+mouse_read_sensor_id:
+	setarg PAN_REG_PID_H
+	call twspi_read
+	store 1,mem_sensor_id2
+	setarg PAN_REG_PID_L
+	call twspi_read
+	store 1,mem_sensor_id1
+	rtn
+
+mouse_init_p32xx_id2_judge:
+	fetch 1,mem_sensor_id2
+	beq P_MX8650,mouse_mx8650_init_param
+	beq P8009_ID2,mouse_8009_init_param
+	beq P3205_TJ3T_ID2,mouse_3205_3t_init_param
+	beq P3204_TJ3L_ID2,mouse_3204_3l_init_param
+	beq P3212_ID2,mouse_3212_init_param
+	beq PKA8_ID2,mouse_ka8_init_param_check
+	beq P6520A_ID2,mouse_p6520_init_param
+	branch mouse_init_sensor
+	
+mouse_mx8650_init_param:
+	jam MX8650,mem_config_sensor_type
+	call mouse_sensor_reset
+	call delay_10ms
+	arg mem_sensor_8650_init,regc
+	call mouse_sensor_wr_seq
+	branch mouse_dpi_config
+
+mouse_8009_init_param:
+	setarg 0x16
+	call twspi_read
+	sub pdata,0xbd,null 
+	nbranch mouse_init_sunt,zero
+	setarg 0x19
+	call twspi_read
+	sub pdata,0x55,null 
+	nbranch mouse_init_sunt,zero
+	setarg 0x1b
+	call twspi_read
+	sub pdata,0x1d,null 
+	nbranch mouse_init_sunt,zero
+	jam P8009,mem_config_sensor_type
+	arg mem_sensor_8009_init,regc
+	branch mouse_sensor_wr_seq
+
+mouse_3205_3t_init_param:
+	jam P3205,mem_config_sensor_type
+	arg mem_sensor_3205_init,regc
+	call mouse_sensor_wr_seq
+	arg mem_sensor_32xx_init,regc
+	call mouse_sensor_wr_seq
+	setarg 0x0943
+	call twspi_write
+	arg mem_sensor_32xx_init_1,regc
+	branch mouse_sensor_wr_seq	
+
+mouse_3204_3l_init_param:
+	jam P3204,mem_config_sensor_type
+	arg mem_sensor_3204_init,regc
+	call mouse_sensor_wr_seq
+	arg mem_sensor_32xx_init,regc
+	call mouse_sensor_wr_seq
+	arg mem_sensor_32xx_init_1,regc
+	branch mouse_sensor_wr_seq	
+
+mouse_3212_init_param:
+	jam P3212,mem_config_sensor_type
+	arg mem_sensor_3212_init,regc
+mouse_sensor_wr_seq:
+	ifetch 2,regc
+	arg 0xffff,temp
+	isub temp,null
+	rtn zero
+	call twspi_write
+	increase 2,regc
+	branch mouse_sensor_wr_seq
+
+mouse_ka8_init_param_check:	
+	call mouse_sensor_disable_wp
+	setarg 0x9a5b
+	call twspi_write
+	setarg 0x0d
+	call twspi_read
+	sub pdata,0x12,null
+	branch mouse_ka8ul_init_param,zero
+	sub pdata,0x0a,null
+	nbranch mouse_ka8hd_sensor_judge,zero
+	setarg 0x0e
+	call twspi_read
+	sub pdata,0xe5,null
+	nbranch mouse_init_sensor,zero
+	setarg 0x10
+	call twspi_read
+	sub pdata,0xa5,null
+	branch mouse_ka8ul_init_param,zero
+	call mouse_enable_ka8_sensor_wp
+mouse_ka8_init_param:
+	jam KA8,mem_config_sensor_type	
+	rtn
+mouse_ka8ul_init_param:
+	jam KA8_UL,mem_config_sensor_type	
+	arg mem_sensor_ka8ul_init,regc
+	branch mouse_sensor_wr_seq
+mouse_ka8hd_sensor_judge:
+	sub pdata,0x10,null
+	nbranch mouse_init_sensor,zero
+	setarg 0x0e
+	call twspi_read
+	sub pdata,0xc5,null
+	nbranch mouse_init_sensor,zero
+	setarg 0x10
+	call twspi_read
+	sub pdata,0x38,null
+	nbranch mouse_init_sensor,zero
+mouse_ka8hd_init_param:
+	call mouse_enable_ka8_sensor_wp
+	jam KA8_HD,mem_config_sensor_type
+	rtn
+mouse_enable_ka8_sensor_wp:
+	setarg 0x005b
+	call twspi_write
+	branch mouse_sensor_enable_wp
+	
+mouse_p6520_init_param:
+	jam P6520,mem_config_sensor_type
+	arg mem_sensor_p6520_init,regc
+	branch mouse_sensor_wr_seq
+	
+mouse_init_p3065:
+	call mouse_sensor_poweron
+	fetch 1,mem_sensor_id2
+	beq P3065_XY_ID2,mouse_p3065xy_init_param
+	beq P3065_ID2,mouse_p3065_init_param
+	branch mouse_init_sensor
+	
+mouse_p3065_init_param:	
+	jam P3065,mem_config_sensor_type
+	rtn
+
+mouse_p3065xy_init_param:
+	jam P3065_XY,mem_config_sensor_type
+	rtn
+	
+mouse_ka8g2_id2_judge:
+	call mouse_sensor_poweron
+	fetch 1,mem_sensor_id2
+	beq PKA8G2_ID2,mouse_ka8g2_init_param
+	branch mouse_init_p32xx_id2_judge
+mouse_ka8g2_init_param:
+	jam KA8G2,mem_config_sensor_type
+	arg mem_sensor_ka8g2_init,regc
+	branch mouse_sensor_wr_seq
+	
+mouse_sensor_enable_wp:
+	setarg 0x0009
+	branch twspi_write
+mouse_sensor_disable_wp:
+	setarg 0x5a09
+	branch twspi_write
+
+mouse_sensor_reset:
+	setarg 0x8006		// reset to factory settings
+	call twspi_write
+	nop 12000
+	rtn
+	
+mouse_sensor_poweron:
+	bpatch patch09_7,mem_patch09
+	call mouse_sensor_spi_init
+	call mouse_sensor_reset
+	arg mem_sensor_poweron_init,regc
+	call mouse_sensor_wr_seq
+	branch mouse_dpi_config
+
+mouse_sensor_powerdown:
+	bpatch patch0a_0,mem_patch0a
+	call mouse_init_sunt
+	call mouse_sensor_spi_init
+	setarg 0x0806
+	branch twspi_write
+/*********sensor init*************/	
+
+
+
+/*********sensor motion*************/
+mouse_check_sensor_data:
+	fetch 1,mem_spi_write_flash_sm
+	rtnne FLASH_SM_NO_BUYS
+	fetch 1,mem_config_sensor_type
+	beq P3205,mouse_p32xx_sensor_motion
+	beq P3065,mouse_p32xx_sensor_motion
+	beq KA8,mouse_p32xx_sensor_motion
+	beq P3204,mouse_p32xx_sensor_motion
+	beq P3212,mouse_p3212_sensor_motion
+	beq P3065_xy,mouse_p32xx_sensor_motion
+	beq P8009,mouse_p8009_sensor_motion	
+	beq KA8G2,mouse_pka8g2_sensor_motion
+	branch mouse_p32xx_sensor_motion
+
+
+mouse_p32xx_sensor_motion:
+	call mouse_clear_sensor_data
+	disable user
+	fetch 1,mem_sensor_motion_gpio
+	beq GPIO_DISABLE,mouse_p32xx_sensor_motion_2
+	fetcht 1,mem_sensor_motion_gpio
+	call gpio_get_bit
+	nrtn true
+mouse_p32xx_sensor_motion_2:
+	setarg PAN_REG_PID_L
+	call twspi_read
+	bne P32XX_ID1,mouse_p3065_judge   
+mouse_p32xx_sensor_motion_1:
+	setarg PAN_REG_MOTION_STAUS
+	call twspi_read
+	rtnbit0 7
+	call mouse_read_sensor_common
+	fetch 1,mem_mouse_x
+	call mouse_data_extsign
+	store 2,mem_mouse_x
+	fetch 1,mem_mouse_y
+	call mouse_data_extsign
+	store 2,mem_mouse_y
+	fetch 1,mem_config_sensor_angle
+	beq MOUSE_6CLK_ANGLE,mouse_motion32xx_6clk_direction_selection
+	beq MOUSE_9CLK_ANGLE,mouse_motion32xx_9clk_direction_selection
+	beq MOUSE_12CLK_ANGLE,mouse_motion32xx_12clk_direction_selection
+	beq MOUSE_3CLK_ANGLE,mouse_motion32xx_3clk_direction_selection
+	rtn
+
+mouse_p3065_judge:
+	beq P3065_ID1,mouse_p32xx_sensor_motion_1
+	branch mouse_twspi_reset
+	
+mouse_motion32xx_6clk_direction_selection:
+	call mouse_motion_6clk_direction_dispose
+	branch mouse_sensor_sdio_low
+mouse_motion32xx_9clk_direction_selection:
+	call mouse_motion_9clk_direction_dispose
+	branch mouse_sensor_sdio_low
+mouse_motion32xx_12clk_direction_selection:
+	call mouse_motion_12clk_direction_dispose
+	branch mouse_sensor_sdio_low
+mouse_motion32xx_3clk_direction_selection:
+	call mouse_motion_3clk_direction_dispose
+	branch mouse_sensor_sdio_low
+
+
+	
+mouse_p3212_sensor_motion:
+	call mouse_clear_sensor_data
+	fetch 1,mem_sensor_motion_gpio
+	beq GPIO_DISABLE,mouse_p3212_sensor_motion_1
+	fetcht 1,mem_sensor_motion_gpio
+	call gpio_get_bit
+	nrtn true
+mouse_p3212_sensor_motion_1:	
+	setarg PAN_REG_PID_L
+	call twspi_read
+	bne P32XX_ID1,mouse_twspi_reset
+mouse_p3212_sensor_motion_2:
+	setarg PAN_REG_MOTION_STAUS
+	call twspi_read
+	rtnbit0 7
+	call mouse_read_sensor_common
+	call mouse_read_3212sensor_xy_high
+	store 1,mem_mouse_xy_h
+	rshift4 pdata,pdata
+	call mouse_data_extsign_bit3
+	store 1,mem_mouse_x+1
+	fetch 1,mem_mouse_xy_h
+	and pdata,0x0f,pdata
+	call mouse_data_extsign_bit3
+	store 1,mem_mouse_y+1
+	fetch 1,mem_config_sensor_angle
+	beq MOUSE_6CLK_ANGLE,mouse_motion_6clk_direction_dispose
+	beq MOUSE_9CLK_ANGLE,mouse_motion_9clk_direction_dispose
+	beq MOUSE_12CLK_ANGLE,mouse_motion_12clk_direction_dispose
+	beq MOUSE_3CLK_ANGLE,mouse_motion_3clk_direction_dispose
+	rtn
+
+mouse_read_3212sensor_xy_high:
+	setarg 0x12
+	branch twspi_read
+
+mouse_pka8g2_sensor_motion:
+	call mouse_clear_sensor_data
+	fetch 1,mem_sensor_motion_gpio
+	beq GPIO_DISABLE,mouse_pka8g2_sensor_motion_1
+	fetcht 1,mem_sensor_motion_gpio
+	call gpio_get_bit
+	nrtn true
+mouse_pka8g2_sensor_motion_1:
+	branch mouse_p3212_sensor_motion_2
+
+
+mouse_p8009_sensor_motion:
+	call mouse_clear_sensor_data
+	disable user
+	setarg PAN_REG_MOTION_STAUS
+	call twspi_read
+	rtnbit0 7
+	setarg PAN_REG_OPRATION_STATE
+	call twspi_read
+	branch mouse_p32xx_sensor_motion_1+3,blank
+	setarg 0
+	store 6,mem_mouse_x
+	rtn
+
+mouse_motion_6clk_direction_dispose:
+	fetch 2,mem_mouse_x
+	sub pdata,0,pdata
+	store 2,mem_mouse_x
+	branch enable_user
+mouse_motion_12clk_direction_dispose:
+	fetch 2,mem_mouse_y
+	sub pdata,0,pdata
+	store 2,mem_mouse_y
+	branch enable_user
+mouse_motion_9clk_direction_dispose:
+	fetch 2,mem_mouse_y
+	sub pdata,0,pdata
+	store 2,mem_mouse_y
+	fetch 2,mem_mouse_x
+	sub pdata,0,pdata
+	store 2,mem_mouse_x
+	call mouse_sensor_data_swap_places
+	branch enable_user
+mouse_motion_3clk_direction_dispose:
+	call mouse_sensor_data_swap_places
+	branch enable_user
+
+mouse_sensor_data_swap_places:
+	fetch 2, mem_mouse_y
+	fetcht 2,mem_mouse_x
+	store 2,mem_mouse_x
+	storet 2,mem_mouse_y
+	rtn
+
+	
+mouse_clear_sensor_data:
+	fetch 1,mem_mouse_move_flag
+	call mouse_read_sensor_common,blank
+	jam 1,mem_mouse_move_flag
+	rtn
+
+mouse_clear_sensor_data_by_reset:
+	jam 1,mem_mouse_clear_sensor_data_flag
+	call le_set_config_more_data
+mouse_init_sensor_reset:
+	branch mouse_init_sunt
+
+mouse_data_xy_release:
+	fetch 1,mem_sensor_motion_gpio
+	rtnne GPIO_DISABLE
+	fetch 1,mem_mouse_long_mult_flag
+	rtnne 1
+	setarg 0
+	store 1,mem_mouse_long_mult_flag
+	store 4,mem_mouse_x
+	branch mouse_init_sensor_reset
+
+mouse_data_extsign:
+	rtnbit0 7
+	arg 0xff00,temp
+	ior temp,pdata
+	rtn
+
+mouse_data_extsign_bit3:
+	rtnbit0 3
+	arg 0xf0,temp
+	ior temp,pdata
+	rtn
+
+mouse_read_sensor_common:
+	arg PAN_REG_DELTA_X,pdata
+	call twspi_read
+	store 2,mem_mouse_x
+	arg PAN_REG_DELTA_Y,pdata
+	call twspi_read
+	store 2,mem_mouse_y
+	rtn
+
+	/* sdio high will cost extra 9mA */
+mouse_sensor_sdio_low:
+	fetcht 1,mem_mouse_sensor_sdio_gpio
+	call gpio_get_bit
+	rtn true
+	setarg 0x0a
+	call twspi_read
+	nop 1000
+	branch mouse_sensor_sdio_low
+
+mouse_set_sdio_high:		// make sdio high to make 100uA less
+	setarg 0x8100
+	branch twspi_write
+	
+/****************************sensor*************************/
+
+/*******************mouse fast connect******************/
+mouse_buletooth_fast_conn_init:
+	jam 0xff,mem_mouse_bluetooth_fast_conn_flag
+mouse_ble_fast_conn_init:	
+	jam 0x34,mem_xrecord_mode
+	setarg 0x0f0f0f
+	store 3,mem_le_lap
+	store 3,mem_le_lap+3
+	branch mouse_start_reconnect
+
+mouse_buletooth_fast_conn_end:
+	bpatch patch0a_1,mem_patch0a
+	call mouse_select_reconn_device
+	call mouse_bluetooth_fast_conn_disable
+	fetch 1,mem_device_flag
+	beq MODE_BT_DEVICE1,mouse_device1_check_auto_discover
+	beq MODE_BT_DEVICE2,mouse_device2_check_auto_discover
+	rtn
+mouse_device1_check_auto_discover:
+	fetch 6,mem_device1_addr
+	branch mouse_device_check_auto_discover
+mouse_device2_check_auto_discover:
+	fetch 6,mem_device2_addr
+mouse_device_check_auto_discover:	
+	fetcht 6,mem_mouse_compare_addr_ff
+	isub temp,null
+	branch mouse_start_discovery ,zero
+	branch mouse_start_reconnect_device
+
+mouse_bluetooth_fast_conn_disable:
+	jam 0x5a,mem_mouse_bluetooth_fast_conn_flag
+	rtn	
+/*******************mouse fast connect******************/
+
+mouse_stop_bluetooth_mode:
+	fetch 2,mem_ui_state_map
+	bbit1 UI_STATE_BLE_CONNECTED,app_ble_disconnect
+	branch mouse_stop_discovery
+mouse_disconnect:
+	setarg 0
+	store 2,mem_mouse_no_data_timer
+	fetch 2,mem_ui_state_map
+	bbit1 UI_STATE_BLE_CONNECTED,app_ble_disconnect
+	rtn
+	
+mouse_check_125Hz:
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	rtnbit0 MOUSE_ENABLE_BT_125Hz
+mouse_bluetooth_125Hz:
+	nbranch mouse_bluetooth_125hz_clear,user
+	fetch 1,mem_bluetooth_125hz_cnt
+	increase 1,pdata
+	and_into 0x0f,pdata
+	store 1,mem_bluetooth_125hz_cnt
+	nrtn blank
+mouse_bluetooth_125hz_clear:
+	jam 0,mem_bluetooth_125hz_cnt
+	disable user
+	rtn
+
+mouse_current_mult_update:
+	fetch 1,mem_sensor_motion_gpio
+	rtnne GPIO_DISABLE
+	jam 0,mem_lpm_mult
+	jam 30,mem_mouse_current_mult_timer
+	rtn
+
+
+mouse_priority_bb_event:	
+	bpatch patch0a_2,mem_patch0a
+	copy regc,pdata
+	beq BT_EVT_LE_CONNECTED,mouse_le_bb_event_connected
+	beq BT_EVT_LE_DISCONNECTED,mouse_le_bb_disconnected
+	beq BT_EVT_BUTTON_LONG_PRESSED,mouse_bb_event_discovery_btn
+	beq BT_EVT_LE_PAIRING_SUCCESS,mouse_le_pairing_success
+	beq BT_EVT_LE_ENC_INFO,mouse_le_enc_info
+	beq BT_EVT_LE_START_ENC,mouse_le_ll_start_encryt
+	beq BT_EVT_LE_PAIRING_COMPLETE,app_ble_store_reconn_info
+	beq BT_EVT_LE_PARSE_CONN_PAPA_UPDATE_RSP,mouse_le_conn_param_update_rsp_recieved
+	beq BT_EVT_24G_PAIRING_COMPLETE,mouse_24g_pairing_complete
+	beq BT_EVT_24G_ATTEMPT_FAIL,mouse_24g_attempt_fail
+	beq BT_EVT_24G_ATTEMPT_SUCCESS,mouse_24g_attempt_success
+	beq BT_EVT_LE_PARSE_CONN_PARAM_ACCEPTED,mouse_le_parse_conn_param_accepted
+	rtn
+
+/***************************le*************************/
+mouse_le_bb_event_connected:
+	jam 0,mem_mouse_long_mult_flag
+	call mouse_init_sensor_reset
+	jam 1,mem_mouse_le_bb_connected_flag
+	call mouse_24g_first_store_reconn_info
+	fetch 1,mem_mouse_le_reconnect_flag
+	nbranch mouse_le_bb_event_connected_next,blank
+	jam 0x14,mem_mouse_send_secutiry_request_timer
+mouse_le_bb_event_connected_next:
+	fetch APP_DISC_RSN_SIZE,mem_app_disconn_reason_flag
+	set0 APP_DISC_BY_BUTTON ,pdata
+	store APP_DISC_RSN_SIZE,mem_app_disconn_reason_flag
+	jam 0,mem_mouse_direct_timer
+	fetch 2,mem_le_battery_level_updata_timer_init
+	store 2,mem_le_battery_level_updata_timer
+	call mouse_no_data_timer_init
+	branch mouse_stop_discovery
+
+mouse_le_bb_disconnected:
+	setarg 0
+	store 2,mem_le_battery_level_updata_timer
+	jam 0,mem_mouse_le_bb_connected_flag
+	arg LE_INTERVAL_7_5MS,temp
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	bbit1 MOUSE_ENABLE_BT_125Hz,mouse_le_bb_disconnected_next
+	arg LE_INTERVAL_8_75MS,temp
+mouse_le_bb_disconnected_next:	
+	storet 2,mem_le_interval_min
+	storet 2,mem_le_interval_min+2
+	jam LE_LPM_ENABLE,mem_mouse_le_conn_param_reject
+	jam 0,mem_mouse_clear_sensor_data_flag
+	call le_clr_config_more_data
+	branch mouse_bb_disconnected
+
+mouse_le_pairing_success:
+	arg LL_PAIRING_SUCCESS_FLAG,queue
+	branch mouse_le_enable_connect_flag
+
+mouse_le_enc_info:
+mouse_updata_le_param:
+	jam BT_CMD_LE_UPDATE_CONN,mem_fifo_temp
+	branch ui_ipc_send_cmd
+	
+mouse_le_ll_start_encryt:
+	fetch 1,mem_mouse_le_reconnect_flag
+	beq 1,mouse_le_ll_reconn_start_encryt
+	branch mouse_le_ll_enable_start_enc_flag
+mouse_le_ll_reconn_start_encryt:
+	call mouse_updata_le_param
+	jam 20,mem_le_start_encrypt_timer
+mouse_le_ll_enable_start_enc_flag:
+	arg LL_START_ENC_FLAG,queue
+	branch mouse_le_enable_connect_flag
+
+mouse_le_enable_connect_flag:
+	fetch 1,mem_le_connect_status_flag
+	qset1 pdata
+	store 1,mem_le_connect_status_flag
+	rtn
+
+mouse_le_conn_param_update_rsp_recieved:
+	fetch 2,mem_le_l2cap_signaling_conn_param_update_rsp_result
+	rtneq BLE_SIGNALING_CONNECT_PARAMETER_UPDATE_ACCEPTED
+	fetch 1,mem_le_tsniff
+	rshift2 pdata,pdata
+	sub pdata,LE_INTERVAL_15MS,null
+	rtn positive
+	setarg LE_INTERVAL_11_25MS
+	store 2,mem_le_interval_min
+	store 2,mem_le_interval_min+2
+	call mouse_updata_le_param
+mouse_le_conn_param_lpm_disable:
+	jam LE_LPM_DISABLE,mem_mouse_le_conn_param_reject
+	rtn
+
+mouse_le_bb_event_connect_complete:
+	fetch 1,mem_mouse_le_reconnect_flag
+	nrtn blank
+	fetch 1,mem_le_att_handle
+	sub pdata,34,pdata
+	nrtn zero
+	jam 0,mem_le_start_encrypt_timer
+mouse_le_write_enable:	
+	arg WRITE_REQ_ENABLE_FLAG,queue
+	branch mouse_le_enable_connect_flag
+
+mouse_le_parse_conn_param_accepted:
+	fetch 1,mem_le_new_conninterval
+	sub pdata,LE_INTERVAL_15MS,null
+	nbranch mouse_le_conn_param_lpm_disable,positive
+	store 2,mem_le_interval_min
+	store 2,mem_le_interval_min+2
+	fetch 1,mem_le_new_connslavelatency
+	branch mouse_le_lpm_mult_reinit,blank
+	fetcht 1,mem_lpm_mult_init
+	isub temp,null
+	branch mouse_le_lpm_mult_reinit,positive
+	fetch 1,mem_le_new_connslavelatency
+	store 1,mem_lpm_mult
+	branch mouse_le_conn_param_lpm_enable
+mouse_le_lpm_mult_reinit:
+	fetch 1,mem_lpm_mult_init
+	store 1,mem_lpm_mult
+mouse_le_conn_param_lpm_enable:
+	jam LE_LPM_ENABLE,mem_mouse_le_conn_param_reject
+	rtn
+	
+/*
+mouse_le_disable_connect_flag:
+	fetch 1,mem_le_connect_status_flag
+	qset0 pdata
+	store 1,mem_le_connect_status_flag
+	rtn
+*/
+mouse_le_clean_connect_flag:
+	jam 0,mem_le_connect_status_flag
+	rtn
+
+/*
+mouse_le_reconn_write_enable_timer_reinit:
+	fetch 1,mem_mouse_le_reconnect_flag
+	rtn blank
+	fetch 1,mem_le_connect_status_flag
+	and pdata,0x03,pdata
+	rtneq 0x03
+	jam 2,mem_le_start_encrypt_timer
+	rtn
+*/
+mouse_le:
+	bpatch patch0a_3,mem_patch0a
+	call le_fifo_check_nearly_full
+	nrtn blank
+	fetch 1,mem_mouse_bluetooth_fast_conn_flag
+	beq 0xff,mouse_le_next
+	fetch 1,mem_le_connect_status_flag
+	and pdata,0x03,pdata
+	rtnne 0x03
+mouse_le_next:	
+	fetch 1,mem_mouse_clear_sensor_data_flag
+	call mouse_clear_sensor_data_by_reset,blank
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	bbit1 MOUSE_24G_PAIRING_FLAG,mouse_le_send_empty_packet
+	bbit1 MOUSE_SELECT_DEVICE_FLAG,mouse_le_send_empty_packet
+	bbit1 MOUSE_BT_DISCOVERY_BUTTON_DOWN_FLAG,mouse_le_send_empty_packet
+	bbit1 MOUSE_BT_DISCOVERY_BUTTON_LONG_DOWN_FLAG,mouse_le_send_empty_packet
+	call mouse_motion
+	call mouse_check_125Hz
+	nrtn user
+	call mouse_current_mult_update
+	call mouse_data_xy_release
+	call mouse_wheel_trigger
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	bbit0 MOUSE_ENABLE_KEYBOARD,mouse_le_send_mouse_data
+	fetch 1,mem_customer_key
+	beq 1,mouse_le_send_keyboard_package_data		
+mouse_le_send_mouse_data:
+	branch mouse_fill_mouse_data_le
+
+
+mouse_le_send_keyboard_package_data:
+	fetch 1,mem_customer_data_trigger
+	branch mouse_le_release_keyboard_data,blank
+	fetch 8,mem_customer_key_press+1
+mouse_fill_keyboard_package_data_le:
+	store 8,mem_pdatatemp
+	fetch 1,mem_customer_key_press
+	beq KB_MULTIKEY_REPORT_ID,mouse_fill_multimedia_key_data_le
+	beq KB_SYSTEM_CONCTRL_REPORT_ID,mouse_fill_systemctrl_key_data_le
+	jam 8,mem_le_data_len
+	fetcht 2,mem_le_keyboard_handle
+mouse_fill_data_le:
+	fetch 1,mem_le_data_len
+	copy pdata,rega
+	call le_att_malloc_tx_notify
+	fetcht 1,mem_le_data_len
+	copy temp,loopcnt
+	arg mem_pdatatemp,contr
+	branch memcpy
+	
+mouse_le_release_keyboard_data:
+	fetch 8,mem_customer_key_release+1
+	branch mouse_fill_keyboard_package_data_le
+
+mouse_fill_multimedia_key_data_le:
+	jam 3,mem_le_data_len
+	fetcht 2,mem_le_multimedia_handle
+	branch mouse_fill_data_le
+
+mouse_fill_systemctrl_key_data_le:
+	jam 2,mem_le_data_len
+	fetcht 2,mem_le_systemctrl_handle
+	branch mouse_fill_data_le
+
+mouse_fill_battery_level_le:
+	arg 1,rega
+	fetcht 2,mem_le_battery_level_handle
+	call le_att_malloc_tx_notify
+	fetch 1,mem_le_battery_level_percentage
+	istore 1,contw
+	rtn
+
+mouse_le_send_empty_packet:
+	setarg 0
+	store 7,mem_mouse_key
+mouse_fill_mouse_data_le:
+	jam 7,mem_le_data_len
+	fetch 7,mem_mouse_key
+	store 7,mem_pdatatemp
+	fetcht 2,mem_le_notify_handle
+	branch mouse_fill_data_le
+
+mouse_check_51cmd_adv:
+	jam 0,mem_mouse_le_reconnect_flag
+	fetch 3,mem_le_adv_ind
+	store 3,mem_le_adv_data+4
+	call mouse_le_check_adv_flag
+	setarg ADV_FLAG_BREDR_NOT_SUPPORTED |ADV_FLAG_LIMITED_DISCOVERABLE
+	istore 1,contr
+	arg mem_le_adv_swift_pair,contr
+	call mouse_le_adv_data_update
+	branch check_51cmd_adv
+
+mouse_le_check_adv_flag:
+	arg mem_le_adv_data,rega
+mouse_le_check_adv_flag_loop:
+	ifetch 1,rega	//length
+	rtn blank
+	iadd contr,rega
+	ifetch 1,contr	//type
+	rtneq 0x01
+	branch mouse_le_check_adv_flag_loop
+	
+mouse_le_adv_data_update:
+	arg mem_le_adv_data+11,contw
+	arg 19,loopcnt
+	call memcpy
+	branch le_modified_name_adv
+	
+/***************************le*************************/
+
+
+
+mouse_bb_disconnected:
+	call mouse_bb_discon_clear_stack
+	fetch APP_DISC_RSN_SIZE,mem_app_disconn_reason
+	bbit1 APP_DISC_BLE,mouse4_0_event_bb_disconn
+	bbit1 APP_DISC_BY_BUTTON,app_disconn_reason_clear
+	branch mouse_start_discovery
+	
+mouse_bb_discon_clear_stack:
+	setarg 0
+	store 8,mem_wheel_tb_old_pinlevel
+	istore 4,contw             //clean wheel statue
+	jam 0,mem_mouse_move_flag
+	jam 0,mem_ltk_exists
+	rtn
+
+mouse4_0_event_bb_disconn:
+	call mouse_le_clean_connect_flag
+	fetch APP_DISC_RSN_SIZE,mem_app_disconn_reason
+	bbit1 APP_DISC_BY_BUTTON,app_disconn_reason_clear
+	branch mouse_app_enter_hibernate
+
+
+/********************mouse 100ms timer*****************/
+mouse_bb_event_timer:
+	bpatch patch0a_4,mem_patch0a
+	call mouse_adc_read
+	call mouse_low_voltage_led_timer
+	//24g
+	call g24_pair_timeout_timer
+	call g24_reconn_timeout_timer
+	call mouse_24g_long_sleep_param_update_timer
+	//led
+	call mouse_device_poweron_timer
+	call mouse_dpi_led_blink_delay_timer
+	//poll
+	call mouse_dpi_key_check_long_press
+	call mouse_bt_discovery_check
+	call mouse_commbination_key_process
+	call mouse_check_discovery_timeout_timer
+	//ble
+	call mouse_check_direct_timeout_timer
+	call mouse_le_enable_att_list_timer
+	call mouse_le_battery_updata_timer
+	call mouse_le_send_smp_security_request_timer
+	//bt
+	call mouse_check_reconnect_delay_long_sleep		//delete 3.0,reconnect fail
+	call mouse_current_mult_update_timer
+	call mouse_wheel_trigger_timer
+	call mouse_store_information_delay_timer
+	branch mouse_check_no_data_timeout_timer
+
+mouse_bt_discovery_check:
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	bbit1 MOUSE_ENABLE_PB_BUTTON_LONG_PRESS_DISCONVERY,mouse_bt_discovery_by_pb_button
+	rtn
+
+mouse_bt_discovery_by_pb_button:
+	fetch 1,mem_select_device_button_statue
+	rtnne PB_BUTTON_STATE_DOWN
+	arg mem_bt_discovery_count,regc
+	arg mouse_long_button_bt_discovery,regb
+	branch timer_single_step
+		
+mouse_long_button_bt_discovery:
+	fetch 1,mem_device_flag
+	rtneq MODE_24G_DEVICE
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	rtnbit1 MOUSE_BT_DISCOVERY_BUTTON_LONG_DOWN_FLAG
+	arg MOUSE_BT_DISCOVERY_BUTTON_LONG_DOWN_FLAG,queue
+	call mouse_enable_function_flag
+	call app_evt_button_long_pressed
+	branch mouse_bb_event_discovery_btn
+		
+mouse_commbination_key_process:
+	fetch 1,mem_device_flag
+	beq MODE_24G_DEVICE,mouse_24g_commbination_key_process
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	rtnbit0 MOUSE_ENABLE_COMMBINATION_KEY_BY_BT_DISCOVERY
+	fetcht 1,mem_mouse_commbination_key_bt
+	branch mouse_commbination_key_start
+
+mouse_24g_commbination_key_process:
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	rtnbit0 MOUSE_ENABLE_COMMBINATION_KEY_BY_24G_PAIRING
+	fetcht 1,mem_mouse_commbination_key_24g
+mouse_commbination_key_start:
+	storet 1,mem_mouse_commbination_key
+	call mouse_check_key_gpio
+	and pdata,0x07,pdata
+	fetcht 1,mem_mouse_commbination_key
+	isub temp,null
+	branch mouse_commbination_key_down,zero
+mouse_commbination_key_up:
+	fetch 1,mem_ui_button_timeout
+	store 1,mem_combination_ui_button_count	//combination key timer init 
+	fetch 1,mem_commbination_key_statue
+	rtneq COMMBINATION_KEY_STATE_UP
+	jam COMMBINATION_KEY_STATE_UP,mem_commbination_key_statue	
+	rtn
+		
+mouse_commbination_key_down:
+	call mouse_combination_ui_timer
+	fetch 1,mem_commbination_key_statue
+	rtneq COMMBINATION_KEY_STATE_DOWN
+	jam COMMBINATION_KEY_STATE_DOWN,mem_commbination_key_statue
+	rtn
+
+mouse_combination_ui_timer:
+	arg mouse_24g_start_pair_mode,regb
+	arg mem_combination_ui_button_count,regc
+	fetch 1,mem_device_flag
+	beq MODE_24G_DEVICE,timer_single_step
+	arg mouse_long_button_bt_discovery,regb
+	call timer_single_step
+	fetch 1,mem_combination_ui_button_count
+	beq 1,mouse_bt_discovery_button_down_enable	// ble release key press
+	rtn
+
+mouse_check_discovery_timeout_timer:	
+	arg mem_mouse_discovery_timer,regc
+	arg mouse_check_discovery_timeout,regb
+	branch timer_single_step_2B
+
+mouse_check_discovery_timeout:
+	call mouse_stop_discovery
+	branch mouse_app_enter_hibernate
+
+mouse_check_direct_timeout_timer:	
+	arg mem_mouse_direct_timer,regc
+	arg mouse_check_direct_timeout,regb
+	call timer_single_step_2B
+	fetch 1,mem_mouse_direct_timer
+	beq 1,app_ble_stop_direct_adv
+	rtn
+
+mouse_check_direct_timeout:
+	fetch 1,mem_mouse_bluetooth_fast_conn_flag
+	beq 0xff,mouse_buletooth_fast_conn_end
+	fetch 1,mem_reconn_times
+	nbranch mouse_polling_device,blank
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	bbit1 MOUSE_ENABLE_BT_RECONNECT_TIMEOUT_ENTER_DISCOVERY,mouse_start_discovery
+	bbit1 MOUSE_ENABLE_24G_FIRST_AUTO_PAIRING,mouse_24g_first_bb_event_reconn_timeout
+	branch mouse_app_enter_hibernate
+	
+mouse_le_enable_att_list_timer:
+	arg mem_le_start_encrypt_timer,regc
+	arg mouse_le_write_enable,regb
+	branch timer_single_step
+
+mouse_le_send_smp_security_request_timer:
+	fetch 1,mem_mouse_le_bb_connected_flag
+	rtn blank
+	arg mem_mouse_send_secutiry_request_timer,regc
+	arg mouse_le_pairing_sm_start_check,regb
+	branch timer_single_step
+mouse_le_pairing_sm_start_check:
+	fetch 1,mem_mouse_le_reconnect_flag
+	nrtn blank
+	fetch 1,mem_le_pairing_state
+	rtnne FLAG_LE_PAIRING_NULL
+	branch le_pairing_sm_start
+
+mouse_le_battery_updata_timer:
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	rtnbit1 MOUSE_ENABLE_LE_BATTERY_SERVICE_CANCEL
+	arg mem_le_battery_level_updata_timer,regc
+	arg mouse_le_battery_level_updata,regb
+	branch timer_single_step
+
+mouse_le_battery_level_updata:
+	fetch 2,mem_le_battery_level_updata_timer_init
+	store 2,mem_le_battery_level_updata_timer
+	branch mouse_fill_battery_level_le
+	
+mouse_le_enable_att_list:	
+	fetch 1,mem_le_connect_status_flag
+	rtnbit1 LL_PAIRING_SUCCESS_FLAG
+	call mouse_updata_le_param
+	arg WRITE_REQ_ENABLE_FLAG,queue
+	branch mouse_le_enable_connect_flag
+
+mouse_check_reconnect_delay_long_sleep:
+	arg mem_mouse_bluetooth_reconnect_timeout,regc
+	arg mouse_app_enter_hibernate,regb
+	branch timer_single_step
+
+mouse_current_mult_update_timer:
+	arg mem_mouse_current_mult_timer,regc
+	arg mouse_current_mult_reinit,regb
+	branch timer_single_step
+mouse_current_mult_reinit:
+	fetch 1,mem_lpm_mult_init
+	store 1,mem_lpm_mult
+	jam 1,mem_mouse_long_mult_flag
+	rtn
+
+
+mouse_check_no_data_timeout_timer:	
+	arg mem_mouse_no_data_timer,regc
+	arg mouse_check_no_data_timeout,regb
+	branch timer_single_step_2B
+
+mouse_check_no_data_timeout:
+	fetch 1,mem_device_flag
+	beq MODE_24G_DEVICE,mouse_24g_hibernate_set
+	branch mouse_disconnect
+	
+mouse_no_data_timer_init:
+	fetch 2,mem_mouse_no_data_timeout
+	store 2,mem_mouse_no_data_timer
+	rtn
+
+mouse_store_information_delay_timer:
+	arg mem_store_information_delay_timer,regc
+	arg mouse_store_device_info_check,regb
+	branch timer_single_step
+
+mouse_store_device_info_check:
+	call mouse_store_device_info
+	fetch 1,mem_mouse_need_soft_reset
+	nbranch mouse_soft_reset,blank
+	rtn
+
+mouse_bb_event_discovery_btn:
+	isolate1 mark_24g,mark
+	call mouse_24g_stop,true
+	call mouse_disconnect
+	call mouse_le_clean_connect_flag
+	branch mouse_start_discovery
+	
+mouse_start_discovery:
+	bpatch patch0a_5,mem_patch0a
+	fetch 2,mem_ui_state_map
+	isolate1 UI_STATE_BLE_ADV,pdata
+	call mouse_stop_le_adv,true		//reconnect adv
+	call mouse_bluetooth_fast_conn_disable
+	fetch 2,mem_ui_state_map
+	bbit1 UI_STATE_BLE_ADV,mouse_start_discovery_norandom
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	bbit0 MOUSE_ENABLE_BLE_RANDOM_ADDRE,mouse_start_discovery_norandom
+	fetcht 2,mem_random_addr_increase_count
+	increase 1,temp
+	storet 2,mem_random_addr_increase_count
+	storet 2,mem_le_lap+1
+	random pdata					//random ble addr
+	store 1,mem_le_lap
+mouse_start_discovery_norandom:
+	fetch 3,mem_mouse_le_lap_temp
+	store 3,mem_le_lap+3
+	call app_lpm_mult_disable
+	fetch 2,mem_mouse_discovery_timeout
+	store 2,mem_mouse_discovery_timer
+	setarg 0
+	store 2,mem_mouse_no_data_timer
+	store 2,mem_le_battery_level_updata_timer
+	store 1,mem_mouse_direct_timer
+	store 1,mem_mouse_bluetooth_reconnect_timeout
+	store 1,mem_mouse_device_poweron_timer_count
+	store 1,mem_mouse_clear_sensor_data_flag
+	arg MOUSE_STORE_EEPROM_FLAG,queue
+	call mouse_enable_function_flag
+	call mouse_bt_discovery_button_down_disable
+	call mouse_check_51cmd_adv
+	call mouse_low_voltage_led_blink_disable
+	branch mouse_discover_setting_led_gpio
+
+mouse_stop_discovery:
+	bpatch patch0a_6,mem_patch0a
+	arg MOUSE_BT_DISCOVERY_BUTTON_LONG_DOWN_FLAG,queue
+	call mouse_disable_function_flag
+	jam 0,mem_mouse_bluetooth_reconnect_timeout
+	call mouse_stop_le_adv
+	branch mouse_device_led_off
+mouse_stop_le_adv:
+	jam 0,mem_mouse_direct_timer
+	branch check_51cmd_stop_adv
+
+mouse_store_remote_bdaddr:
+	bpatch patch0a_7,mem_patch0a
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	rtnbit0 MOUSE_STORE_EEPROM_FLAG
+	call mouse_device_poweron_timer_init
+	arg MOUSE_STORE_EEPROM_FLAG,queue
+	call mouse_disable_function_flag
+	call mouse_check_device_addr
+mouse_unplug_clean_bdaddr:
+	call mouse_before_store_reconn_info
+	branch mouse_store_device_info_delay
+
+mouse_check_device_addr:
+	fetch 1,mem_record_bt_mode
+	beq REC_4_MODE,mouse_check_le_device_addr
+	rtn
+mouse_check_le_device_addr:
+	store 1,mem_device_addr_temp
+	fetch 6,mem_le_plap
+mouse_check_bt_device_addr_common:
+	store 6,mem_device_addr_temp+1
+	fetch 7,mem_device_addr_temp
+	arg mem_device1_type,contr
+	arg 3,loopcnt
+mouse_check_device_addr_end:
+	ifetcht 7,contr
+	isub temp,null
+	branch mouse_clean_addr,zero
+	increase 22,contr
+	loop mouse_check_device_addr_end
+	rtn
+mouse_before_store_reconn_info:
+	arg mem_device1_type,rega
+	fetch 1,mem_device_flag
+	increase -1,pdata
+	mul32 pdata,29,pdata
+	iadd rega,rega
+	fetch 1,mem_record_bt_mode
+	istore 1,rega
+	beq REC_4_MODE,mouse_store_le_device
+	rtn
+	
+mouse_store_le_device:
+	fetch 6,mem_le_plap
+	istore 6,contw
+	arg mem_le_ltk,contr
+	call memcpy16
+	fetch 6,mem_le_lap
+	istore 6,contw
+	rtn
+
+mouse_clean_addr:
+	increase -6,contr
+	copy contr,contw
+	fetcht 6,mem_device_addr_temp+1
+	increase 3,temp
+	istoret 6,contw
+	rtn
+	
+mouse_select_reconn_device:
+	arg mem_device1_type,rega
+	fetch 1,mem_device_flag
+	rtneq MODE_24G_DEVICE
+	increase -1,pdata
+	mul32 pdata,29,pdata
+	iadd rega,rega
+	ifetch 1,rega
+	store 1,mem_xrecord_mode
+	beq REC_4_MODE,mouse_load_le_device
+	rtn
+
+mouse_load_le_device:
+	ifetch 6,contr
+mouse_load_le_device_end:
+	store 6,mem_hci_plap
+	arg mem_le_ltk,contw
+	call memcpy16
+	ifetch 6,contr
+	store 6,mem_le_lap
+	rtn
+
+mouse_app_initflag_check:
+	fetch 2,mem_store_flag
+	arg EEPROM_INIT_FLAG,temp
+	isub temp,null
+	branch mouse_load_device_info,zero
+	storet 2,mem_store_flag
+	call mouse_ble_init_address
+	fetch 1,mem_device_flag_temp
+	store 1,mem_device_flag
+	fetch 1,mem_config_sensor_dpi
+	store 1,mem_mouse_dpi
+	fetch 4,mem_24g_fast_conn_addr
+	store 4,mem_24g_receiver_addr
+	store 4,mem_24g_addr	
+	rtn
+
+mouse_load_device_info:
+	call mouse_select_reconn_device
+	fetch 4,mem_mouse_24g_addr
+	store 4,mem_24g_receiver_addr
+	store 4,mem_24g_addr
+	rtn
+	
+mouse_ble_init_address:
+	fetch 6,mem_le_lap
+	store 6,mem_device1_locall_addr
+	add pdata,0x0100,pdata
+	store 6,mem_device2_locall_addr
+	add pdata,0x0100,pdata
+	store 6,mem_device3_locall_addr
+	rtn
+	
+mouse_store_device_info_delay:	
+	fetch 1,mem_store_information_delay_timer_init
+	store 1,mem_store_information_delay_timer
+	rtn
+
+mouse_store_device_info:
+	bpatch patch0b_0,mem_patch0b
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	bbit1 MOUSE_ENABLE_EEPROM,mouse_store_eeprom_device_info
+	bbit1 MOUSE_ENABLE_FLASH,mouse_store_flash_device_info
+	rtn
+
+mouse_load_flash_info_check:
+	call spid_init_flash
+	call mouse_spid_flash_release_form_powerdown
+	call mouse_information_flash_parameters
+	call spid_read_flash
+	call mouse_spid_flash_powerdown
+	call mouse_app_initflag_check
+	branch mouse_sensor_spi_init
+
+mouse_information_flash_parameters:
+	setarg mem_mouse_information_end
+	arg mem_mouse_information_start,temp
+	isub temp,temp
+	fetch 3,mem_flash_base
+	arg mem_mouse_information_start,rega
+	rtn
+	
+mouse_store_flash_device_info:
+	call spid_init_flash
+	call mouse_spid_flash_release_form_powerdown
+	call mouse_flash_erase_sector
+
+	call mouse_information_flash_parameters
+	call mouse_spid_write_flash
+	call mouse_spid_flash_powerdown
+	branch mouse_sensor_spi_init
+
+mouse_spid_flash_release_form_powerdown:
+	jam FLASH_COMMAND_RELEASE_FROM_POWERDOWN,mem_temp
+mouse_spid_write_flash_cmd:
+	call delay_nop100
+	call spid_unlock_flash
+	arg mem_write_flash_head_temp,rega
+	fetcht 1,mem_temp
+	call mouse_spid_write_flash_cmd_common
+	branch delay_nop100
+
+mouse_spid_flash_powerdown:
+	jam FLASH_COMMAND_POWERDOWN,mem_temp
+	branch mouse_spid_write_flash_cmd
+
+mouse_spid_write_flash_cmd_common:
+	istoret 1,rega
+	rshift16 pdata,temp
+	istoret 1,contw
+	rshift8 pdata,temp
+	istoret 1,contw
+	istore 1,contw
+	deposit rega
+	store 2,core_spid_txaddr
+	setarg 0
+	store 2,core_spid_rxlen
+	jam spid_start,core_misc_ctrl
+	branch wait_spid_done
+		
+mouse_flash_erase_sector:
+	fetch 3,mem_flash_base
+	store 3,mem_spi_write_addr
+	branch spid_flash_erase_sector+2
+
+mouse_spid_write_flash:
+	copy pdata,regc
+	copy rega,pdata
+	increase -4,pdata
+	copy pdata,regb
+	ifetch 4,regb
+	store 4,mem_write_flash_head_temp
+	copy regc,pdata
+	call spid_write_flash
+	fetch 4,mem_write_flash_head_temp
+	istore 4,regb
+	rtn
+
+mouse_flash_power_down:
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	rtnbit0 MOUSE_ENABLE_FLASH
+	call mouse_spid_flash_powerdown
+	call twspi_enable	// 2 wire mode
+	fetcht 1,mem_spi_cs_gpio		//disable flash
+	call gpio_out_inactive
+	fetcht 1,mem_spi_hold_gpio
+	branch mouse_gpio_config_input_pd
+
+mouse_load_eeprom_info_check:
+	call iicd_read_init_pin
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	isolate1 MOUSE_ENABLE_2K_EEPROM,pdata
+	ncall clear_eeprom_size_2k,true
+	call mouse_eeprom_load_recon_info
+	branch mouse_app_initflag_check
+
+mouse_eeprom_load_recon_info:
+	arg 128,temp
+	arg mem_device_flag,rega
+	arg MOUSE_INFO_EEPROM_OFFECT,regb
+	branch iicd_read_eep_data
+
+mouse_store_eeprom_device_info:
+	arg 128,temp
+	arg mem_device_flag,rega
+	arg MOUSE_INFO_EEPROM_OFFECT,regb
+	branch iicd_write_protect_eep_data
+
+mouse_store_eerpom_dpi:
+	arg 1,temp
+	arg mem_mouse_dpi,rega
+	arg MOUSE_DPI_EEPROM_OFFECT,regb
+	branch iicd_write_protect_eep_data
+
+mouse_load_eeprom_dpi:
+	arg 1,temp
+	arg mem_mouse_dpi,rega
+	arg MOUSE_DPI_EEPROM_OFFECT,regb
+	branch iicd_read_eep_data
+
+mouse_idle:
+	bpatch patch0b_1,mem_patch0b
+	call mouse_low_voltage_led_no_enter_lpm
+	call ui_check_paring_button
+	call mouse_dpi_check
+	call mouse_select_device_check
+	call mouse_check_select_device_by_switch
+	call mouse_bt_button_check
+	branch mouse_wheel_check
+	
+mouse_select_device_check:
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	bbit1 MOUSE_ENABLE_SELECT_DEVICE_BY_PB_BUTTON,mouse_select_device_by_pb_button
+	bbit1 MOUSE_ENABLE_PB_BUTTON_LONG_PRESS_DISCONVERY,mouse_select_device_by_pb_button
+	rtn
+
+mouse_select_device_by_pb_button_check_once:
+	jam 0x03,mem_mouse_pbkey_press_status
+mouse_select_device_by_pb_button:	
+	fetch 1,mem_config_select_device_button_gpio
+	rtneq GPIO_DISABLE
+	arg 0,rega
+	jam MOUSE_PB_KEY,mem_mouse_key_temp
+	fetcht 1,mem_config_select_device_button_gpio
+	call mouse_pb_button_check
+	store 1,mem_mouse_pbkey_press_status
+	fetch 1,mem_matrix_public_gpio
+	beq GPIO_DISABLE,mouse_3io6key_pb_button_check_end	
+	call mouse_matrix_public_gpio_reset
+mouse_select_device_by_pb_button_exit:	
+	copy rega,pdata
+	bbit1 MOUSE_PB_KEY,mouse_select_device_button_down
+	branch mouse_select_device_button_up
+
+mouse_3io6key_pb_button_check_end:
+	fetcht 1,mem_config_select_device_button_gpio
+	call mouse_gpio_config_input_pu
+	branch mouse_select_device_by_pb_button_exit
+
+mouse_pb_button_check:
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	bbit1 MOUSE_ENABLE_PB_BUTTON_CONNECT_GND,mouse_pb_button_connect_gnd
+	fetch 1,mem_mouse_pbkey_press_status
+	copy pdata,regc
+	fetch 1,mem_matrix_public_gpio
+	beq GPIO_DISABLE,mouse_3io6key_check
+	fetch 1,mem_mouse_ghost_flag
+	nbranch mouse_select_device_by_pb_button_end,blank
+	branch mouse_pb_button_connect_matrix
+
+mouse_select_device_by_pb_button_end:
+	jam PB_BUTTON_STATE_UP,mem_select_device_button_statue
+	jam 0,mem_mouse_pbkey_press_status
+	rtn
+
+mouse_pb_button_connect_gnd:
+	fetch 1,mem_mouse_pbkey_press_status
+	branch mouse_check_key_connect_gnd
+
+mouse_pb_button_connect_matrix:
+	call gpio_get_bit
+	fetcht 1,mem_matrix_public_gpio
+	branch mouse_pb_button_connect_gnd,true
+	fetcht 1,mem_matrix_public_gpio
+	call gpio_out_active
+	fetcht 1,mem_config_select_device_button_gpio
+	fetch 1,mem_mouse_pbkey_press_status
+	branch mouse_check_key_connect_gnd
+	
+mouse_select_device_button_up:
+	fetch 1,mem_select_device_button_statue
+	rtneq PB_BUTTON_STATE_UP
+	jam PB_BUTTON_STATE_UP,mem_select_device_button_statue	
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	rtnbit1 MOUSE_ENABLE_PB_BUTTON_SHORT_PRESS_ENTER_DISCOVERY
+	fetch 1,mem_bt_discovery_count
+	sub pdata,20,null
+	ncall mouse_ready_reconnection_by_button,positive		// press button less than 30-20=1000ms
+	fetch 1,mem_ui_button_timeout
+	store 1,mem_bt_discovery_count
+	rtn
+
+mouse_select_device_button_down:
+	call mouse_select_device_ghost_check
+	rtn user
+	fetch 1,mem_select_device_button_statue
+	rtneq PB_BUTTON_STATE_DOWN
+	jam PB_BUTTON_STATE_DOWN,mem_select_device_button_statue
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	bbit1 MOUSE_ENABLE_PB_BUTTON_SHORT_PRESS_ENTER_DISCOVERY,mouse_long_button_bt_discovery
+	fetch 1,mem_mouse_direct_timer
+	rtn blank
+	fetch 1,mem_mouse_direct_timeout
+	store 1,mem_mouse_direct_timer
+	rtn
+
+mouse_select_device_ghost_check:
+	disable user
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	rtnbit1 MOUSE_ENABLE_PB_BUTTON_CONNECT_GND
+	fetch 1,mem_mouse_lkey_press_status
+	rtn blank
+	fetch 1,mem_mouse_rkey_press_status
+	rtn blank
+	enable user
+	rtn
+	
+mouse_check_select_device_by_switch:
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	bbit1 MOUSE_ENABLE_SELECT_DEVICE_BY_SWITCH_GPIO,mouse_check_select_device_by_switch_gpio
+	bbit1 MOUSE_ENABLE_SELECT_DEVICE_BY_SWITCH_ADC,mouse_adc_read
+	rtn
+mouse_check_select_device_by_switch_gpio:	
+	fetcht 1,mem_device_switch_gpio
+	call mouse_gpio_config_input_pu
+	fetcht 1,mem_device_switch_gpio
+	call gpio_get_bit
+	branch mouse_check_select_24gdevice,true
+mouse_select_btdevice:
+	fetch 1,mem_device_flag
+	rtneq MODE_BT_DEVICE1
+	jam MODE_BT_DEVICE1,mem_device_flag
+	branch mouse_stop_bluetooth_mode
+	
+mouse_check_select_24gdevice:
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	bbit0 MOUSE_ENABLE_SELECT_DEVICE_BY_SWITCH_ADC,mouse_check_select_24g_device
+	fetch 6,mem_mouse_vdd_switch_gnd_full_vol
+	store 6,mem_mouse_vdd_calculate_set
+mouse_check_select_24g_device:	
+	fetch 1,mem_device_flag
+	rtneq MODE_24G_DEVICE
+	jam MODE_24G_DEVICE,mem_device_flag
+	branch mouse_24g_stop
+
+mouse_ready_reconnection_by_button:
+	bpatch patch0b_2,mem_patch0b
+	fetch 1,mem_device_number
+	rtneq 1		// 1channel
+	call mouse_select_device_number
+	storet 1,mem_device_flag
+mouse_store_device_number_before_reset:	
+//	jam 0,mem_link_key_exists
+	call mouse_select_device_enable
+	call mouse_stop_bluetooth_mode
+	call mouse_select_device_disable
+	jam 1,mem_mouse_need_soft_reset
+	branch mouse_store_device_info_delay
+
+mouse_soft_reset:
+	call mouse_select_device_enable
+	branch soft_reset_chip
+
+mouse_select_device_number:
+	fetcht 1,mem_device_flag
+	increase 1,temp
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	bbit1 MOUSE_ENABLE_24G,mouse_select_device_number_24g
+	sub temp,2,null
+	ncall mouse_select_device_count_clean_bt,positive
+	rtn
+	
+mouse_select_device_number_24g:	
+	fetch 1,mem_device_number
+	increase -1,pdata
+	isub temp,null
+	ncall mouse_select_device_count_clean_24g,positive
+	rtn
+
+mouse_select_device_count_clean_24g:
+	arg 0,temp
+	rtn
+mouse_select_device_count_clean_bt:
+	arg 1,temp
+	rtn
+
+mouse_store_device_number2eeprom:
+	arg 1,temp
+	arg mem_device_flag,rega
+	arg 0,regb
+	branch iicd_write_protect_eep_data
+		
+mouse_bt_button_check:
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	rtnbit0 MOUSE_ENABLE_PB_BUTTON_SHORT_PRESS_ENTER_DISCOVERY
+	branch mouse_select_device_by_pb_button
+	
+mouse_select_device_enable:
+	arg MOUSE_SELECT_DEVICE_FLAG,queue
+	branch mouse_enable_function_flag
+mouse_select_device_disable:
+	arg MOUSE_SELECT_DEVICE_FLAG,queue
+	branch mouse_disable_function_flag
+mouse_bt_cannel_reconn_enable:
+	arg MOUSE_BT_CANNEL_RECONN_FLAG,queue
+	branch mouse_enable_function_flag
+mouse_bt_cannel_reconn_disable:
+	arg MOUSE_BT_CANNEL_RECONN_FLAG,queue
+	branch mouse_disable_function_flag
+mouse_bt_discovery_button_down_enable:
+	arg MOUSE_BT_DISCOVERY_BUTTON_DOWN_FLAG,queue
+	branch mouse_enable_function_flag
+mouse_bt_discovery_button_down_disable:
+	arg MOUSE_BT_DISCOVERY_BUTTON_DOWN_FLAG,queue
+	branch mouse_disable_function_flag
+
+mouse_adc_read_enable:
+	arg MOUSE_ENABLE_ADC,queue
+	branch mouse_enable_function_flag
+
+mouse_24g_set_250Hz:
+	arg MOUSE_ENABLE_24G_250Hz,queue
+	branch mouse_enable_function_flag
+
+mouse_24g_search_dongle_enable:
+	arg MOUSE_ENABLE_24G_SEARCH_DONGLE,queue
+	branch mouse_enable_function_flag
+	
+mouse_16M_enable:
+	arg MOUSE_ENABLE_16M,queue
+	branch mouse_enable_function_flag
+	
+mouse_dpi_4level_enable:
+	arg MOUSE_ENABLE_DPI_LEVEL_4,queue
+	branch mouse_enable_function_flag
+
+mouse_enable_function_flag:
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	qset1 pdata
+	store MOUSE_FLAG_LEN,mem_mouse_flag
+	rtn
+
+mouse_disable_function_flag:
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	qset0 pdata
+	store MOUSE_FLAG_LEN,mem_mouse_flag
+	rtn
+
+mouse_customer_key_enable:
+	arg MOUSE_ENABLE_KEYBOARD,queue
+	call mouse_enable_function_flag
+	setarg 0
+	store 8,mem_customer_key_press
+	store 8,mem_customer_key_release
+	fetch 1,mem_mouse_enable_flag	// 00--win+d     01--ctrl+alt+a    02--AC home    03--play
+	and pdata,0xc0,pdata
+	beq 0x40,mouse_customer_key_ctrl_alt_a
+	beq 0x80,mouse_customer_AC_home
+	beq 0xc0,mouse_customer_key_play
+	setarg 0x070008
+mouse_customer_standrad_key_set:	
+	store 8,mem_customer_key_press+1		// win + d
+	rtn
+
+mouse_customer_key_ctrl_alt_a:
+	setarg 0x040005
+	branch mouse_customer_standrad_key_set
+
+mouse_customer_AC_home:
+	setarg 0x022303
+mouse_customer_media_key_set:	
+	store 8,mem_customer_key_press
+	setarg 0x03
+	store 8,mem_customer_key_release
+	rtn
+	
+mouse_customer_key_play:
+	setarg 0x00cd03
+	branch mouse_customer_media_key_set
+
+	
+mouse_polling_device:
+	bpatch patch0b_3,mem_patch0b
+	fetch 1,mem_reconn_times
+	increase -1,pdata
+	store 1,mem_reconn_times
+	fetcht 1,mem_device_flag
+	sub temp,1,null
+	ncall mouse_select_device_number,zero
+	storet 1,mem_device_flag
+	call mouse_store_device_number2eeprom
+	call mouse_before_store_reconn_info
+	branch mouse_start_reconnect_device
+
+	
+//notice: need to call p_mouse_drawing_optima_init when waked from mult
+mouse_drawing_optima:
+	bpatchx patch30_6,mem_patch30
+	fetch 1,mem_config_sensor_type
+	rtneq P3212
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	rtnbit0 MOUSE_ENABLE_SMOOTHER
+	fetch 4,mem_mouse_x
+	rtn blank
+	call mouse_data_abs_check
+	setarg 0x03	//asm_flag enable condition
+	call mouse_pdata_greater_than_check
+	call mouse_disable_asm,blank
+	ncall mouse_enable_asm,blank
+	setarg 0x02	//asm_flag disable condition
+	call mouse_data_less_than_check
+	call mouse_disable_asm,blank
+	fetch 1,mem_mouse_asm_flag
+	beq 1,mouse_drawing_optima_modify
+mouse_drawing_optima_init:
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	rtnbit0 MOUSE_ENABLE_SMOOTHER
+	arg 5,loopcnt
+	arg mem_mouse_asm_flag,contw
+	branch clear_mem
+
+mouse_drawing_optima_modify:
+	call mouse_drawing_optima_xy_offset_modify
+	fetch 2,mem_mouse_x_pre
+	store 2,mem_data_pre
+	fetch 2,mem_mouse_x
+	store 2,mem_data_current
+	call mouse_drawing_optima_data_x
+	fetch 2,mem_data_pre
+	store 2,mem_mouse_x_pre
+	fetch 2,mem_data_current
+	store 2,mem_mouse_x
+
+	fetch 2,mem_mouse_y_pre
+	store 2,mem_data_pre
+	fetch 2,mem_mouse_y
+	store 2,mem_data_current
+	call mouse_drawing_optima_data_y
+	fetch 2,mem_data_pre
+	store 2,mem_mouse_y_pre
+	fetch 2,mem_data_current
+	store 2,mem_mouse_y
+	rtn
+
+mouse_drawing_optima_xy_offset_modify:
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	rtnbit0 MOUSE_ENABLE_XY_OFFSET
+	bpatchx patch31_1,mem_patch31
+	fetch 2,mem_mouse_x_pre
+	store 2,mem_data_value
+	call mouse_pre_xy_data_judge
+	store 2,mem_mouse_x_pre
+	fetch 2,mem_mouse_x
+	store 2,mem_data_value
+	call mouse_current_xy_data_judge
+	store 2,mem_mouse_x
+	fetch 2,mem_mouse_y_pre
+	store 2,mem_data_value
+	call mouse_pre_xy_data_judge
+	store 2,mem_mouse_y_pre
+	fetch 2,mem_mouse_y
+	store 2,mem_data_value
+	call mouse_current_xy_data_judge
+	store 2,mem_mouse_y
+	rtn
+
+mouse_pre_xy_data_judge:	
+	fetch 1,mem_data_value+1
+	branch mouse_pre_xy_pdata_offset,blank
+	branch mouse_pre_xy_ndata_offset
+
+mouse_pre_xy_pdata_offset:
+	fetch 1,mem_data_value
+	call mouse_pre_xy_get_0_4_times
+	store 1,mem_data_value
+mouse_xy_data_offset_new:
+	fetch 2,mem_data_value
+	rtn
+mouse_pre_xy_ndata_offset:
+	fetch 1,mem_data_value
+	call mouse_pdata_invert
+	call mouse_pre_xy_get_0_4_times
+	call disable_blank,blank
+	call mouse_pdata_get_new_value
+	branch mouse_xy_data_offset_new
+	
+mouse_current_xy_data_judge:
+	fetch 1,mem_data_value+1
+	branch mouse_current_xy_pdata_offset,blank
+	branch mouse_current_xy_ndata_offset
+mouse_current_xy_pdata_offset:
+	fetch 1,mem_data_value
+	call mouse_current_xy_get_0_6_times
+	store 1,mem_data_value
+	branch mouse_xy_data_offset_new
+mouse_current_xy_ndata_offset:	
+	fetch 1,mem_data_value
+	call mouse_pdata_invert
+	call mouse_current_xy_get_0_6_times
+	call disable_blank,blank
+	call mouse_pdata_get_new_value
+	branch mouse_xy_data_offset_new
+	
+mouse_pre_xy_get_0_4_times:
+	mul32 pdata,4,pdata
+	div pdata,5
+	call wait_div_end
+	quotient pdata
+	rtn
+mouse_current_xy_get_0_6_times:	//0.6 times
+	mul32 pdata,12,pdata
+	div pdata,10
+	call wait_div_end
+	quotient pdata
+	rtn	
+	
+mouse_drawing_optima_data_x:
+	fetch 2,mem_data_pre
+	fetcht 2,mem_data_current
+	iadd temp,pdata
+	fetcht 1,mem_mouse_data_xtemp
+	iadd temp,pdata
+	and pdata,0x01,temp
+	storet 1,mem_mouse_data_xtemp
+	branch mouse_drawing_optima_data
+
+mouse_drawing_optima_data_y:
+	fetch 2,mem_data_pre
+	fetcht 2,mem_data_current
+	iadd temp,pdata
+	fetcht 1,mem_mouse_data_ytemp
+	iadd temp,pdata
+	and pdata,0x01,temp
+	storet 1,mem_mouse_data_ytemp
+	branch mouse_drawing_optima_data
+
+/**********
+input:data_pre,data_current
+output:data_pre,data_current after optima
+***********/
+mouse_drawing_optima_data:
+	store 3,mem_data_sum
+	isolate1 16,pdata
+	branch mouse_data_sum_overflow,true
+	fetch 1,mem_data_sum+1
+	beq 0xff,mouse_data_sum_n
+	fetch 1,mem_data_sum
+mouse_data_store_pre:
+	rshift pdata,pdata
+	store 2,mem_data_pre
+	store 2,mem_data_current
+	rtn
+mouse_data_sum_overflow:
+	fetch 1,mem_data_sum+1	//sum positive
+	beq 0,mouse_data_sum_overflow_p
+	fetch 3,mem_data_sum	
+	branch mouse_data_store_pre
+mouse_data_sum_overflow_p:
+	jam 0,mem_data_sum+2
+	fetch 1,mem_data_sum
+	branch mouse_data_store_pre
+
+mouse_data_sum_n:
+	fetch 1,mem_data_sum	//sum negetive
+	call mouse_pdata_get_half
+	store 1,mem_data_pre
+	store 1,mem_data_current
+	branch mouse_data_zero,blank
+	setarg 0xff
+mouse_data_set_direction:	
+	store 1,mem_data_pre+1
+	store 1,mem_data_current+1
+	rtn
+mouse_data_zero:
+	setarg 0
+	branch mouse_data_set_direction
+
+mouse_pdata_get_half:
+	call mouse_pdata_invert
+	rshift pdata,pdata
+mouse_pdata_get_new_value:	
+	call mouse_rega_in_out
+	sub pdata,0,pdata
+	store 1,mem_data_value	
+	rtn
+
+mouse_pdata_invert:
+	sub pdata,0,pdata
+mouse_rega_in_out:	
+	store 1,mem_rega
+	fetch 1,mem_rega
+	rtn
+
+mouse_disable_asm:
+	jam 0,mem_mouse_asm_flag
+	rtn
+mouse_enable_asm:
+	jam 1,mem_mouse_asm_flag
+	rtn
+
+//rega mouse_x, regb mouse_y, pdata refer
+mouse_pdata_greater_than_check:
+	isub rega,null
+	nbranch disable_blank,positive
+	isub regb,null
+	nbranch disable_blank,positive
+	branch enable_blank
+mouse_data_less_than_check:
+	isub rega,null
+	nrtn positive
+	isub regb,null
+	nrtn positive
+	branch enable_blank
+
+mouse_data_abs_check:
+	fetch 2,mem_mouse_x
+	call mouse_data_abs
+	copy pdata,rega
+	fetch 2,mem_mouse_y
+	call mouse_data_abs
+	copy pdata,regb
+	rtn
+
+/***********
+input: data_current
+output:pdata,abs
+************/
+mouse_data_abs:
+	store 2,mem_data_current
+	fetch 1,mem_data_current+1
+	beq 0xff,mouse_data_reversal
+	fetch 1,mem_data_current
+mouse_data_abs_store:
+	and_into 0xff,pdata
+	//output:pdata
+	rtn
+mouse_data_reversal:
+	fetch 2,mem_data_current
+	sub pdata,0,pdata
+	branch mouse_data_abs_store
+
+mouse_24g_long_sleep_param_update_timer:
+	arg mem_24g_long_sleep_param_update_timer,regc
+	arg mouse_24g_long_sleep_normal_param,regb
+	branch timer_single_step
+mouse_24g_long_sleep_normal_param:
+	fetch 4,mem_24g_long_sleep_set1
+	store 4,mem_24g_enter_hibernate
+	jam 1,mem_mouse_long_mult_flag
+	rtn
+
+
+mouse_24g_long_sleep_set:
+	fetch 1,mem_24g_long_sleep_set_level
+	beq 0x00,mouse_24g_long_sleep_set_30ms
+	beq 0x01,mouse_24g_long_sleep_set_50ms
+	beq 0x02,mouse_24g_long_sleep_set_80ms
+	beq 0x03,mouse_24g_long_sleep_set_100ms
+mouse_24g_long_sleep_set_80ms:
+	setarg 0x0ea600
+mouse_24g_long_sleep_set_end:	
+	store 4,mem_24g_long_sleep_set1
+	rtn
+mouse_24g_long_sleep_set_30ms:
+	setarg 0x05e740
+	branch mouse_24g_long_sleep_set_end
+mouse_24g_long_sleep_set_50ms:
+	setarg 0x0927c0
+	branch mouse_24g_long_sleep_set_end
+mouse_24g_long_sleep_set_100ms:
+	setarg 0x124f80
+	branch mouse_24g_long_sleep_set_end
+
+mouse_24g_hibernate_set:
+	bpatchx patch30_7,mem_patch30
+	jam 0,mem_24g_attempt_fail_flag
+	call g24_transmit_next_packet
+	setarg -1
+	store 4,mem_24g_enter_hibernate
+	setarg 0
+	store 7,mem_mouse_key
+	jam 1,mem_sensor_shutdown_flag
+	call mouse_sensor_powerdown
+	call mouse_setgpio_hibernate
+mouse_24g_long_sleep:
+	fetch 1,mem_sensor_shutdown_flag
+	ncall mouse_setgpio_hibernate,blank
+	fetch 8,mem_24g_enter_hibernate
+	branch g24_long_seep2
+
+mouse_wakeup_24g:
+	fetch 1,mem_sensor_shutdown_flag
+	ncall mouse_wakeup_24g_from_long_sleep,blank
+	jam 0,mem_sensor_shutdown_flag
+	branch g24_transmit_no_ack
+
+mouse_wakeup_24g_from_long_sleep:
+	call mouse_init_sensor_wakeup
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	rtnbit0 MOUSE_ENABLE_WHEEL_WAKE_UP_CANCEL
+mouse_wheel_gpio_init:
+	fetch 1,mem_whee_a_data_gpio
+	arg gpcfg_pullup,temp
+ 	call gpio_config_function_int
+	fetch 1,mem_whee_b_data_gpio
+	arg gpcfg_pullup,temp
+ 	branch gpio_config_function_int	
+
+mouse_24g_transmit_start:
+	fetch 1,mem_sensor_shutdown_flag
+	nbranch g24_short_sleep,blank
+	branch g24_transmit_start_next
+
+mouse_24g_stop:
+	set0 mark_24g,mark
+	jam STATE_24G_STOP,mem_24g_conn_sm
+	arg MOUSE_24G_PAIRING_FLAG,queue
+	branch mouse_disable_function_flag
+
+mouse_24g_start_mode:
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	bbit0 MOUSE_ENABLE_24G,mouse_24g_mode_setup_error
+	call mouse_wakeup_from_power_check	// wake from hibernate :enble user
+	branch mouse_24g_reconn_dongle_start,user
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	bbit1 MOUSE_ENABLE_AUTO_24G_PARING,mouse_24g_reconn_general_dongle
+	bbit0 MOUSE_ENABLE_24G_POWER_ON_PAIRING,mouse_24g_reconn_general_dongle
+	call mouse_key_check_once
+	and rega,0x07,pdata
+	fetcht 1,mem_mouse_commbination_key_24g
+	isub temp,null
+	branch mouse_24g_start_pair_mode,zero
+	branch mouse_24g_reconn_general_dongle
+
+mouse_24g_mode_setup_error:
+	fetch 1,mem_reconn_times
+	nbranch mouse_polling_device,blank
+	rtn
+
+mouse_24g_first_start_auto_pair_mode:
+	call mouse_wakeup_from_power_check
+	branch mouse_24g_first_start_reconn,user  	// wake from hibernate :enble user
+mouse_24g_reconn_general_dongle:	
+	jam MODE_24G_DEVICE,mem_device_flag
+	fetch 2,mem_mouse_24g_power_on_fast_conn_timer
+	store 2,mem_24g_reconn_timeout
+	jam FAST_CONN_AND_3_0_ADDR,mem_24g_reconn_type
+	branch g24_reconn_start
+
+mouse_24g_start_auto_pair:
+	call mouse_discover_setting_led_gpio
+	fetch 2,mem_24g_pair_timeout_init
+	store 2,mem_24g_reconn_timeout
+	jam PAIR_AND_3_0_ADDR,mem_24g_reconn_type
+	branch g24_reconn_start
+
+mouse_24g_first_start_reconn:
+	fetch 1,mem_device_flag
+	beq MODE_24G_DEVICE,mouse_24g_reconn_dongle_start
+	call mouse_bluetooth_fast_conn_disable
+mouse_24g_first_bluetooth_reconnect:
+	call mouse_24g_stop
+	call mouse_device_led_all_off
+	jam MODE_BT_DEVICE1,mem_device_flag
+	call mouse_select_reconn_device
+	branch mouse_start_reconnect_device
+
+mouse_24g_first_bb_event_reconn_timeout:
+	call mouse_wakeup_from_power_check
+	branch mouse_app_enter_hibernate,user
+	branch mouse_start_discovery
+
+mouse_24g_first_store_reconn_info:
+	call mouse_wakeup_from_power_check
+	rtn user
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	bbit1 MOUSE_ENABLE_24G_FIRST_AUTO_PAIRING,mouse_store_device_info_delay
+	rtn
+
+mouse_24g_start_pair_mode:
+	arg MOUSE_24G_PAIRING_FLAG,queue
+	call mouse_enable_function_flag
+	setarg 0
+	store 2,mem_24g_reconn_timeout	
+	call mouse_stop_discovery
+	call mouse_low_voltage_led_blink_disable
+	call mouse_discover_setting_led_gpio
+	jam TYPE_MS,mem_24g_data_type
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	bbit0 MOUSE_ENABLE_KEYBOARD,g24_pair_start
+	jam TYPE_KB,mem_24g_data_type
+	branch g24_pair_start
+
+mouse_24g_attempt_fail:
+	fetch 1,mem_24g_attempt_fail_flag
+	nbranch mouse_24g_hibernate_set,blank
+	fetch 1,mem_24g_reconn_type
+	beq FAST_CONN_AND_3_0_ADDR,mouse_24g_fast_conn_attempt_fail
+	beq PAIR_AND_3_0_ADDR,mouse_24g_auto_pair_attempt_fail
+	beq RECEIVER_AND_3_0_ADDR,mouse_reconn_dongle_attempt_fail
+mouse_24g_attempt_fail_enter_hibernate:
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	bbit1 MOUSE_ENABLE_WHEEL_WAKE_UP_CANCEL,mouse_24g_hibernate_set
+	call mouse_device_led_off
+	call mouse_24g_stop
+	fetch 1,mem_reconn_times
+	nbranch mouse_polling_device,blank
+	fetch 1,mem_device_flag
+	beq MODE_24G_DEVICE,mouse_app_enter_hibernate
+	rtn
+
+mouse_24g_fast_conn_attempt_fail:
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag 
+	bbit1 MOUSE_ENABLE_24G_FIRST_AUTO_PAIRING,mouse_24g_start_auto_pair
+	bbit1 MOUSE_ENABLE_AUTO_24G_PARING,mouse_24g_start_auto_pair
+	bbit0 MOUSE_ENABLE_24G_AUTO_PAIR_NERVER_BEEN_PAIRED,mouse_24g_reconn_dongle_start
+	fetch 4,mem_mouse_24g_addr		// auto pair first time
+	fetcht 4,mem_mouse_compare_addr_ff
+	isub temp,null
+	branch mouse_24g_start_pair_mode,zero
+mouse_24g_reconn_dongle_start:
+	fetch 2,mem_24g_reconn_timeout_init
+	store 2,mem_24g_reconn_timeout
+	jam RECEIVER_AND_3_0_ADDR,mem_24g_reconn_type
+	branch g24_reconn_start
+
+mouse_24g_auto_pair_attempt_fail:
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag 
+	bbit0 MOUSE_ENABLE_24G_FIRST_AUTO_PAIRING,mouse_24g_attempt_fail_enter_hibernate
+	fetch 1,mem_device_number
+	beq 1,mouse_24g_attempt_fail_enter_hibernate		//24g first mode and only 2.4g device
+	branch mouse_24g_first_bluetooth_reconnect
+
+mouse_reconn_dongle_attempt_fail:
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	bbit0 MOUSE_ENABLE_24G_FIRST_AUTO_PAIRING,mouse_24g_attempt_fail_enter_hibernate
+	bbit1 MOUSE_ENABLE_EEPROM,mouse_24g_attempt_fail_enter_hibernate
+	bbit1 MOUSE_ENABLE_FLASH,mouse_24g_attempt_fail_enter_hibernate
+	branch mouse_24g_start_auto_pair+1
+	
+mouse_24g_attempt_success:
+	fetch 4,mem_24g_addr
+	store 4,mem_24g_receiver_addr
+	store 4,mem_mouse_24g_addr		// if need store 24g address to eeprom/flash,need get mem_24g_addr
+	call g24_ch_syncword_crc8_init
+	call mouse_device_poweron_timer_init
+	call mouse_no_data_timer_init
+	call mouse_init_sensor_reset
+	jam 0,mem_mouse_long_mult_flag
+	jam 0,mem_24g_conn_sm
+	jam 0,mem_24g_reconn_type
+	fetch 4,mem_24g_receiver_addr
+	fetch 4,mem_24g_fast_conn_addr
+	isub temp,null
+	rtn zero
+	branch mouse_24g_first_store_reconn_info
+	
+mouse_24g_pairing_complete:
+	call mouse_no_data_timer_init
+	arg MOUSE_24G_PAIRING_FLAG,queue
+	call mouse_disable_function_flag
+	call mouse_device_poweron_timer_init
+	setarg 0
+	store 2,mem_24g_pair_timeout
+	store 2,mem_24g_reconn_timeout
+	store 1,mem_24g_conn_sm
+	store 1,mem_mouse_move_flag
+	store 1,mem_24g_reconn_type
+
+	call mouse_init_sensor_reset
+	call mouse_read_sensor_common
+	fetch 4,mem_24g_addr
+	store 4,mem_24g_receiver_addr
+	store 4,mem_mouse_24g_addr
+	branch mouse_store_device_info_delay
+
+mouse_24g_package_data:
+	bpatchx patch31_0,mem_patch31
+	rtnmark0 mark_24g
+	call mouse_motion
+	nrtn user
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	bbit0 MOUSE_ENABLE_KEYBOARD,mouse_24g_mouse_package_data
+	fetch 1,mem_customer_key
+	nbranch mouse_24g_keyboard_package_data,blank
+mouse_24g_mouse_package_data:
+	call mouse_data_xy_release
+	fetch 1,mem_24g_data_type
+	bbit1 1,mouse_24g_mouse_package_data_now	// last package is keyboard data
+	fetcht 1,mem_24g_txbuf+1
+	fetch 1,mem_mouse_key
+	ior temp,pdata
+	store 1,mem_mouse_key
+	fetcht 1,mem_24g_txbuf+6
+	fetch 1,mem_mouse_z
+	iadd temp,pdata
+	store 1,mem_mouse_z
+	fetcht 1,mem_24g_txbuf+7
+	fetch 1,mem_mouse_tz
+	iadd temp,pdata
+	store 1,mem_mouse_tz	
+mouse_24g_mouse_package_data_now:	
+	jam TYPE_MS,mem_24g_data_type
+	arg 7,rega	//length
+	arg mem_mouse_key,regb //tx buff
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	bbit1 MOUSE_ENABLE_24G_250Hz,g24_transmit_by_interrupt_enable
+	fetch 2,mem_mouse_z
+	rtn blank
+	branch g24_transmit_by_interrupt_enable
+
+mouse_24g_keyboard_package_data:
+	jam TYPE_KB,mem_24g_data_type
+	arg 9,rega	//length
+	fetch 1,mem_customer_data_trigger
+	nbranch mouse_customer_key_press,blank
+	arg mem_customer_key_release,regb	//tx buff
+	rtn
+mouse_customer_key_press:
+	arg mem_customer_key_press,regb
+	rtn
+
+
+
+/**************************************g24 search receiver*****************************************/
+
+mouse_24g_search_dongle_init:
+	setarg 0
+	store 3,mem_mouse_search_dongle_action
+	rtn
+
+mouse_24g_search_dongle:
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	rtnbit0 MOUSE_ENABLE_24G_SEARCH_DONGLE
+	fetch 1,mem_mouse_long_mult_flag
+	rtn blank
+	fetch 1,mem_24g_abort_pac
+	rtn blank
+	fetch 1,mem_mouse_search_dongle_interval
+	increase 1,pdata
+	and_into 3,pdata
+	store 1,mem_mouse_search_dongle_interval
+	nrtn blank	//400ms
+	jam 0,mem_mouse_search_dongle_ch
+mouse_24g_search_dongle_loop:
+	bpatch patch0b_4,mem_patch0b
+	fetch 1,mem_mouse_search_dongle_ch
+	increase 1,pdata
+	store 1,mem_mouse_search_dongle_ch
+	sub pdata,G24_CH_NUMBER,null
+	nbranch mouse_24g_search_dongle_loop_end,positive
+	call g24_reconn_data_prep
+	call g24_transmit_receive_ack
+	nbranch mouse_24g_search_dongle_loop_retry,sync
+	nbranch mouse_24g_search_dongle_loop_retry,user3
+	call mouse_g24_ackpayload_parse
+	call mouse_24g_search_dongle_success
+mouse_24g_search_dongle_loop_end:
+	call g24_txbuf_clear
+	fetch 1,mem_mouse_search_dongle_count
+	increase 1,pdata
+	store 1,mem_mouse_search_dongle_count
+	beq G24_CH_POLL_COUNT,mouse_24g_search_dongle_check
+	rtn
+
+mouse_24g_search_dongle_loop_retry:
+	call g24_ch
+	branch mouse_24g_search_dongle_loop
+
+mouse_24g_search_dongle_check:
+	jam 0,mem_mouse_search_dongle_count
+	fetch 1,mem_mouse_search_dongle_action
+	rtnbit1 G24_DISCONN_STATE
+	set1 G24_DISCONN_STATE,pdata
+	store 1,mem_mouse_search_dongle_action
+	fetch 2,mem_mouse_24g_search_dongle_time_init		//3min
+	store 2,mem_mouse_no_data_timer
+	branch mouse_sensor_powerdown
+	
+mouse_24g_search_dongle_success:
+	fetch 1,mem_24g_abort_pac
+	branch mouse_24g_search_dongle_init,blank
+	jam 0,mem_mouse_search_dongle_count
+	fetch 1,mem_mouse_search_dongle_action
+	rtnbit0 G24_DISCONN_STATE
+	set0 G24_DISCONN_STATE,pdata
+	store 1,mem_mouse_search_dongle_action
+	call mouse_no_data_timer_init
+	branch mouse_init_sensor_wakeup
+
+mouse_g24_ackpayload_parse:
+	call g24_ackpayload_parse
+	fetch 1,mem_24g_rxbuf+1
+	compare 0x08,pdata,0xf8
+	nrtn true
+	fetch 1,mem_24g_rxbuf+2		// pc sleep mouse ackpayload: 01 08 ff
+	beq 0xff,mouse_24g_hibernate_set
+	rtn
+
+/**************************************g24 search receiver*****************************************/
+
+
+/**************************************g24 new process start********************************************/
+mouse_24g_before_lpm_sleep:
+	fetch 1,mem_device_flag
+	bne MODE_24G_DEVICE,lpm_sleep_skip_cb_function
+	fetch 1,mem_24g_disable_fec1
+	rtn blank
+mouse_peripheral_clock_off:
+	jam 2,core_clksel			//use rc clock
+	fetch 1,core_lpm_ctrl		//close xtal en reg
+	and pdata,0xfc,pdata
+	store 1,core_lpm_reg
+	branch lpm_write_ctrl
+
+/**************************************g24 new process end********************************************/
+
+
+/*******************led*************************/
+mouse_device_poweron_timer:
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	rtnbit0 MOUSE_ENABLE_POWER_ON_LED
+	fetch 1,mem_mouse_device_poweron_timer_count
+	rtn blank
+	increase -1,pdata
+	store 1,mem_mouse_device_poweron_timer_count
+	branch mouse_device_led_off,blank
+	branch mouse_device_led_on
+	
+mouse_device_poweron_timer_init:
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	rtnbit0 MOUSE_ENABLE_POWER_ON_LED
+	call mouse_low_voltage_led_blink_disable
+	fetch 1,mem_mouse_device_poweron_timer_count_init
+	store 1,mem_mouse_device_poweron_timer_count
+	rtn	
+
+mouse_discover_setting_led_gpio:
+	jam 0,mem_mouse_device_poweron_timer_count
+	fetch 2,mem_mouse_disconvey_led_blink_time
+	store 2,mem_mouse_on_time
+	store 2,mem_mouse_off_time	
+mouse_setting_led_gpio_comman:
+	fetch 1,mem_device_flag
+	beq MODE_24G_DEVICE,mouse_device_led_24g
+	beq MODE_BT_DEVICE1,mouse_device_led_bt1
+	beq MODE_BT_DEVICE2,mouse_device_led_bt2
+	rtn
+mouse_device_led_24g:
+	fetch 1,mem_config_device_24g_led_gpio
+	branch mouse_led_blink
+mouse_device_led_bt1:
+	fetch 1,mem_config_device_bt1_led_gpio
+	branch mouse_led_blink
+mouse_device_led_bt2:
+	fetch 1,mem_config_device_bt2_led_gpio
+mouse_led_blink:
+	store 1,mem_temp
+	call mouse_device_led_off
+	fetch 1,mem_temp
+	store 1,mem_mouse_struct_led_gpio
+	arg 0,rega
+	jam UI_LED_STATE_BLINK_START,mem_mouse_led_type
+	branch ui_led_blink_start_global
+
+mouse_dpi_led_blink_delay:
+	fetch 1,mem_dpi_led_gpio
+	rtneq GPIO_DISABLE
+	fetch 2,mem_mouse_discovery_timer
+	nrtn blank
+	fetch 2,mem_24g_pair_timeout
+	nrtn blank
+	fetch 2,mem_24g_reconn_timeout
+	nrtn blank
+	fetch 1,mem_mouse_device_poweron_timer_count
+	nrtn blank
+	fetch 1,mem_mouse_dpi_led_delay_count_init
+	branch mouse_dpi_led_blink_init,blank
+	store 1,mem_mouse_dpi_led_delay_count  //delay 1s led blink
+	rtn
+
+mouse_dpi_led_blink_delay_timer:
+	arg mem_mouse_dpi_led_delay_count,regc
+	arg mouse_dpi_led_blink_init,regb
+	branch timer_single_step	
+	
+mouse_dpi_led_blink_init:
+	fetch 1,mem_dpi_led_gpio
+	store 1,mem_mouse_struct_led_gpio
+	fetch 2,mem_mouse_dpi_led_blink_time
+	store 2,mem_mouse_on_time
+	store 2,mem_mouse_off_time
+	arg 0,rega
+	fetcht 1,mem_mouse_dpi
+	increase 1,temp
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	bbit0 MOUSE_ENABLE_DPI_LEVEL_4,mouse_dpi_led_blink_init_end
+	increase 1,temp
+	sub temp,4,null
+	ncall mouse_dpi_led_blink_count_clean,positive		// blink count:2 3 4 1
+mouse_dpi_led_blink_init_end:	
+	storet 1,mem_mouse_blink_count
+	jam UI_LED_STATE_BLINK_START,mem_mouse_led_type
+	rtn
+
+mouse_dpi_led_blink_count_clean:
+	arg 1,temp
+	rtn
+
+mouse_check_dpi_blink:
+	disable user
+	fetch 1,mem_dpi_led_gpio
+	fetcht 1,mem_mouse_struct_led_gpio
+	isub temp,null
+	nrtn zero
+	fetch 1,mem_mouse_blink_count
+	rtn blank
+	jam 0,mem_adc_low_volatage_led_blink_enable
+	enable user
+	rtn
+
+mouse_device_led_all_off:
+	call mouse_dpi_led_off
+	call mouse_device_24g_led_off
+	call mouse_device_bt1_led_off
+	branch mouse_device_bt2_led_off
+
+mouse_device_led_off:
+	fetch 1,mem_device_flag
+	beq MODE_24G_DEVICE,mouse_device_24g_led_off
+	beq MODE_BT_DEVICE1,mouse_device_bt1_led_off
+	beq MODE_BT_DEVICE2,mouse_device_bt2_led_off
+	rtn
+
+mouse_device_24g_led_off:
+	jam 0,mem_24g_device_led_status
+	fetcht 1,mem_config_device_24g_led_gpio
+	branch mouse_led_off
+
+mouse_device_bt1_led_off:
+	fetcht 1,mem_config_device_bt1_led_gpio
+	branch mouse_led_off
+	
+mouse_device_bt2_led_off:
+	fetcht 1,mem_config_device_bt2_led_gpio
+	branch mouse_led_off
+
+mouse_dpi_led_off:
+	fetcht 1,mem_dpi_led_gpio
+	branch mouse_led_off
+
+mouse_device_led_on:
+	fetch 1,mem_device_flag
+	beq MODE_24G_DEVICE,mouse_device_24g_led_on
+	beq MODE_BT_DEVICE1,mouse_device_bt1_led_on
+	beq MODE_BT_DEVICE2,mouse_device_bt2_led_on
+	rtn
+
+mouse_device_24g_led_on:
+	fetcht 1,mem_config_device_24g_led_gpio
+	branch mouse_led_on
+mouse_device_bt1_led_on:
+	fetcht 1,mem_config_device_bt1_led_gpio
+	branch mouse_led_on
+mouse_device_bt2_led_on:
+	fetcht 1,mem_config_device_bt2_led_gpio
+	branch mouse_led_on
+
+mouse_led_off:
+	bpatch patch0b_5,mem_patch0b
+	storet 1,mem_mouse_struct_led_gpio
+	arg 0,rega
+	branch ui_led_off_global
+mouse_led_on:
+	bpatch patch0b_6,mem_patch0b
+	storet 1,mem_mouse_struct_led_gpio
+	arg 0,rega
+	branch ui_led_on_global
+
+mouse_ui_led_off_static:
+	bpatch patch0b_7,mem_patch0b
+	fetch 1,mem_config_device_24g_led_gpio
+	isub temp,null
+	call mouse_clear_24g_led_statue,zero
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	bbit0 MOUSE_ENABLE_4_LED,gpio_out_inactive
+	call mouse_check_bt2_led_off
+	call mouse_check_dpi_led_off
+	call mouse_check_low_v_led_off
+	fetch 1,mem_mouse_led_off_4_led
+	branch gpio_out_inactive,blank
+	jam 0,mem_mouse_led_off_4_led
+	branch gpio_set_high_impedance
+
+mouse_ui_led_on_static:
+	bpatch patch0c_0,mem_patch0c
+	fetch 1,mem_config_device_24g_led_gpio
+	isub temp,null
+	call mouse_set_24g_led_statue,zero
+	branch gpio_out_active 
+
+mouse_check_bt2_led_off:
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	rtnbit0 MOUSE_ENABLE_BT2_FOR_4_LED
+	fetch 1,mem_config_device_bt2_led_gpio
+	branch mouse_check_1gpio_2led_off
+mouse_check_dpi_led_off:
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	rtnbit0 MOUSE_ENABLE_DPI_FOR_4_LED
+	fetch 1,mem_dpi_led_gpio
+	branch mouse_check_1gpio_2led_off
+mouse_check_low_v_led_off:
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	rtnbit0 MOUSE_ENABLE_LOW_V_FOR_4_LED
+	fetch 1,mem_config_low_voltage_alarm_gpio
+mouse_check_1gpio_2led_off:
+	isub temp,null
+	nrtn zero
+	jam 1,mem_mouse_led_off_4_led
+	rtn
+
+mouse_clear_24g_led_statue:
+	jam 0,mem_24g_device_led_status
+	rtn
+
+mouse_set_24g_led_statue:
+	jam 1,mem_24g_device_led_status
+	rtn
+
+mouse_low_voltage_led_timer:
+	fetch 2,mem_mouse_discovery_timer
+	nrtn blank
+	fetch 2,mem_24g_pair_timeout
+	nrtn blank
+	fetch 2,mem_24g_reconn_timeout
+	nrtn blank
+	fetch 1,mem_mouse_device_poweron_timer_count
+	nrtn blank
+	call mouse_check_dpi_blink
+	rtn user
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	rtnbit0 MOUSE_ENABLE_LOW_VOLTAGE_LED
+	rtnbit0 MOUSE_LOW_VOLTAGE_FLAG
+	bbit1 MOUSE_ENABLE_LOW_VOLTAGE_LED_BLINK_N_SECOND,mouse_low_voltage_led_blink_new_data
+	fetch 1,mem_adc_low_volatage_led_timer_count
+	increase 1,pdata
+	store 1,mem_adc_low_volatage_led_timer_count
+	sub pdata,20,null
+	ncall mouse_adc_low_volatage_led_timer_count_clean,positive
+	beq 2,mouse_low_voltage_led_on
+	beq 4,mouse_low_voltage_led_off
+	beq 6,mouse_low_voltage_led_on
+	beq 8,mouse_low_voltage_led_off
+	rtn
+mouse_adc_low_volatage_led_timer_count_clean:
+	jam 1,mem_adc_low_volatage_led_timer_count
+	branch mouse_low_voltage_led_off
+mouse_low_voltage_led_on:
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	bbit1 MOUSE_ENABLE_LOW_VOLTAGE_USE_MODE_LED,mouse_device_led_on
+	fetch 1,mem_config_low_voltage_alarm_gpio
+	rtneq GPIO_DISABLE
+	fetcht 1,mem_config_low_voltage_alarm_gpio
+	branch mouse_led_on
+mouse_low_voltage_led_off:
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	bbit1 MOUSE_ENABLE_LOW_VOLTAGE_USE_MODE_LED,mouse_device_led_off
+	fetch 1,mem_config_low_voltage_alarm_gpio
+	rtneq GPIO_DISABLE
+	fetcht 1,mem_config_low_voltage_alarm_gpio
+	branch mouse_led_off
+
+mouse_low_voltage_led_blink_new_data:
+	fetch 2,mem_mouse_no_data_timeout
+	fetcht 2,mem_mouse_no_data_timer
+	isub temp,temp
+	fetch 2,mem_adc_low_volatage_led_blink_timer
+	isub temp,null
+	nbranch mouse_low_voltage_led_blink_disable,positive
+	fetch 1,mem_adc_low_volatage_led_blink_enable
+	nrtn blank
+	jam 1,mem_adc_low_volatage_led_blink_enable
+	branch mouse_low_voltage_led_blink_init
+	
+mouse_low_voltage_led_blink_init:
+	fetch 2,mem_mouse_low_v_led_blink_time
+	store 2,mem_mouse_on_time
+	store 2,mem_mouse_off_time
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	bbit1 MOUSE_ENABLE_LOW_VOLTAGE_USE_MODE_LED,mouse_setting_led_gpio_comman
+	fetch 1,mem_config_low_voltage_alarm_gpio
+	rtneq GPIO_DISABLE
+	branch mouse_led_blink
+
+mouse_low_voltage_led_blink_disable:
+	jam 0,mem_adc_low_volatage_led_blink_enable
+	branch mouse_low_voltage_led_off
+
+
+mouse_low_voltage_led_no_enter_lpm:	
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	rtnbit0 MOUSE_ENABLE_LOW_VOLTAGE_LED
+	rtnbit0 MOUSE_LOW_VOLTAGE_FLAG
+	bbit1 MOUSE_ENABLE_LOW_VOLTAGE_LED_BLINK_N_SECOND,mouse_low_voltage_led_no_enter_lpm_blink
+	fetch 1,mem_adc_low_volatage_led_timer_count
+	sub pdata,10,null
+	branch mouse_lpm_mode_clear,positive
+mouse_low_voltage_led_no_enter_lpm_next:	
+	fetch 1,mem_device_flag
+	beq MODE_24G_DEVICE,g24_transmit_by_interrupt_exit_check
+	jam 1,mem_lpm_mode
+	rtn
+
+g24_transmit_by_interrupt_exit_check:
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag	
+	rtnbit1 MOUSE_ENABLE_24G_250Hz	
+	branch g24_transmit_by_interrupt_exit
+
+mouse_lpm_mode_clear:
+	fetch 1,mem_device_flag
+	beq MODE_24G_DEVICE,g24_transmit_by_interrupt_enable
+	jam 0,mem_lpm_mode
+	rtn
+
+mouse_low_voltage_led_no_enter_lpm_blink:
+	fetch 1,mem_adc_low_volatage_led_blink_enable
+	nbranch mouse_lpm_mode_clear,blank
+	branch mouse_low_voltage_led_no_enter_lpm_next
+	
+	
+/*******************led*************************/	
+mouse_store_signal_rssi:
+	call rssi_hex2dec
+	fetch 1,mem_rssi
+	branch rssi_signal
+
+mouse_le_transmit:
+	call mouse_store_signal_rssi
+	branch power_ctrl_start
+
+mouse_le_set_lpm_mult:
+	fetch 1,mem_le_connect_status_flag
+	compare 3,pdata,3
+	nbranch disable_blank,true
+	call app_lpm_mult_enable
+	branch enable_blank
+
+mouse_set_lpm_mult:
+	fetch 2,mem_ui_state_map
+	bbit1 UI_STATE_BLE_CONNECTED,mouse_le_set_lpm_mult
+	rtn
+
+/*****************close define  COMPILE_MOUSE**********/
+else
+
+endif
+
+
+
Index: program/app_shutter.prog
===================================================================
--- /branch/usb/usb_public_base/program/app_shutter.prog	(revision 0)
+++ /branch/usb/usb_public_base/program/app_shutter.prog	(working copy)
@@ -0,0 +1,648 @@
+
+ifdef COMPILE_SHUTTER
+
+shutter_init:
+	call enable_authrom
+
+	rtn wake
+	setarg shutter_le_before_hibernate
+	store 2,mem_cb_before_hibernate
+
+	setarg shutter_process_lpm_before
+	store 2,mem_cb_before_lpm
+		
+	setarg shutter_process_idle
+	store 2,mem_cb_idle_process
+		
+	setarg shutter_process_bb_event 
+	store 2,mem_cb_bb_event_process
+
+	setarg shutter_le_scale_lpm_lock
+	store 2,mem_cb_check_wakelock
+	
+	setarg ble_shutter_receive_data
+	store 2,mem_cb_att_write
+
+	setarg shutter_le_bb_event_timer
+	store 2,mem_cb_event_timer
+
+	setarg shutter_key_change
+	store 2,mem_cb_shutter_keycan
+
+	setarg shutter_soft_swtich_power_on
+	store 2,mem_shutter_soft_switch_poweron_callback_function
+	setarg shutter_soft_swtich_power_off
+	store 2,mem_shutter_soft_switch_poweroff_callback_function
+
+	call shutter_set_ble_version
+	call le_modified_name_adv
+	call shutter_init_param	
+	call keyscan_key_init
+	call queue_init
+	call ui_led_init_global
+	
+	bpatch patch0c_1,mem_patch0c
+	call shutter_load_buffer_config_form_DataRom
+
+	fetch 1, mem_shutter_hard_soft_switch_case
+	beq HARD_SWITCH, shutter_hart_swtich_power_on
+	fetch 1,mem_shutter_soft_switch_button_gpio
+	store 1,mem_ui_button_gpio
+	branch ui_soft_swtich_init
+
+shutter_set_ble_version:
+	//set ble version  4.1 
+	jam 7,mem_version
+	rtn
+
+/**************hard swtich function**************/
+shutter_hart_swtich_power_on:
+	jam UI_BUTTON_GPIO_DISABLE,mem_ui_button_gpio
+	jam SS_STATE_POWER_ON,mem_shutter_soft_switch_power_state
+	branch shutter_start_reconnect
+/****************************/
+
+/**************lpm lock callback function**************/
+shutter_le_scale_lpm_lock:
+	fetch 1,mem_shutter_soft_switch_power_state
+	beq SS_STATE_POWER_OFF,app_get_lpm_wake_lock
+	call l2cap_malloc_get_full_map
+	fetch 1,mem_used_map
+	nbranch app_get_lpm_wake_lock,blank
+	branch app_put_lpm_wake_lock
+/****************************/
+
+/**************c512bt event callback function*************/
+shutter_process_bb_event:
+	copy regc,pdata
+	
+/**************ble shutter event*****************/
+	beq BT_EVT_LE_CONNECTED,ble_shutter_process_baseband_connect
+	beq BT_EVT_LE_DISCONNECTED,ble_shutter_process_baseband_disconnect
+	beq BT_EVT_LE_RECONNECT_COMPLETE,ble_shutter_process_reconnect_complete
+	beq BT_EVT_LE_PARSE_CONN_PAPA_UPDATE_RSP,ble_shutter_process_parse_connect_parameter_update_response
+/***************soft swtich event****************/
+	beq BT_EVT_BUTTON_LONG_PRESSED,shutter_process_soft_swtich_button_long_press
+	beq BT_EVT_BUTTON_DOWN,shutter_process_soft_swtich_button_down
+	beq BT_EVT_BUTTON_UP,shutter_process_soft_swtich_button_up
+	rtn
+/****************************/
+
+
+/******************ble shutter event**********************/
+ble_shutter_process_baseband_connect:
+	call shutter_stop_bluetooth_discovery
+	setarg 0
+	store 2,mem_ble_shutter_reconn_timer
+	branch app_led_off
+
+
+ble_shutter_process_baseband_disconnect:
+	call queue_init
+	jam 0,mem_ble_shutter_enable_notify
+	branch shutter_start_reconnect
+
+
+ble_shutter_process_reconnect_complete:
+	call queue_init
+	jam 1,mem_ble_shutter_enable_notify
+	fetch 8,mem_ble_shutter_interval_min
+	store 8,mem_le_interval_min
+	call app_lpm_mult_enable
+	branch le_l2cap_tx_update_req
+
+
+ble_shutter_process_parse_connect_parameter_update_response:
+	fetch 2,mem_le_l2cap_signaling_conn_param_update_rsp_result
+	rtneq BLE_SIGNALING_CONNECT_PARAMETER_UPDATE_ACCEPTED
+	fetch 8,mem_ble_shutter_interval_min_new
+	rtn blank
+	store 8,mem_le_interval_min
+	branch le_l2cap_tx_update_req
+/**************************************/
+
+/******************soft swtich event**********************/
+shutter_process_soft_swtich_button_long_press:
+	branch ui_soft_switch_botton_long_press
+
+shutter_process_soft_swtich_button_down:
+	fetch 1,mem_shutter_hard_soft_switch_case
+	rtneq HARD_SWITCH
+	fetch 1,mem_shutter_soft_switch_power_state
+	rtnne SS_STATE_POWER_ON
+	call shutter_store_currenct_led_state
+	branch app_led_on
+	
+shutter_store_currenct_led_state:
+	jam 1,mem_shutter_soft_swtich_botton_down
+	arg 11,loopcnt
+	arg mem_shutter_soft_swtich_led_struct_temp,contw
+	arg mem_shutter_led_struct_app_led,contr
+	branch memcpy
+	
+shutter_process_soft_swtich_button_up:
+	fetch 1,mem_shutter_hard_soft_switch_case
+	rtneq HARD_SWITCH
+	fetch 1,mem_shutter_soft_switch_power_state
+	beq SS_STATE_POWER_ON,shutter_load_currenct_led_state
+	branch ui_soft_switch_botton_up
+
+shutter_load_currenct_led_state:
+	fetch 1,mem_shutter_soft_swtich_botton_down
+	rtnne 1
+	jam 0,mem_shutter_soft_swtich_botton_down
+	fetch 2,mem_ui_state_map
+	bbit1 UI_STATE_BLE_CONNECTED,app_led_off
+	arg 11,loopcnt
+	arg mem_shutter_soft_swtich_led_struct_temp,contr
+	arg mem_shutter_led_struct_app_led,contw
+	branch memcpy
+	
+/**************************************/
+
+
+shutter_le_bb_event_timer:
+/**************shutter check sleep timer**********************/
+	call shutter_check_sleep_timer
+/************************************/
+/**************soft reset power off timer**********************/
+	call shutter_check_power_off_timer
+/************************************/
+
+/**************ble shutter timer**********************/
+	branch ble_shutter_reconn_timer
+/************************************/
+
+/**************shutter check sleep timer**********************/
+shutter_check_sleep_timer:
+	arg mem_shutter_sleep_timer,regc
+	arg shutter_sleep_timeout,regb
+	branch timer_single_step_2B
+shutter_sleep_timeout:
+	jam SS_STATE_POWER_OFF,mem_shutter_soft_switch_power_state
+	call app_led_off
+	call shutter_disconnect_current_connection
+	branch shutter_wait_power_off
+
+/**************soft reset power off timer**********************/
+shutter_check_power_off_timer:
+	arg mem_shutter_power_off_timer,regc
+	arg shutter_check_power_off_timeout,regb
+	branch timer_single_step
+
+shutter_check_power_off_timeout:
+	fetch 2,mem_ui_state_map
+	bbit1 UI_STATE_BLE_CONNECTED,shutter_wait_power_off
+	fetch 1,mem_shutter_led_struct_app_led_type
+	beq UI_LED_STATE_BLINK_START,shutter_wait_power_off
+	beq UI_LED_STATE_BLINK_LIGHTING,shutter_wait_power_off
+	beq UI_LED_STATE_BLINK_DARKING,shutter_wait_power_off
+	branch app_enter_hibernate
+/************************************/
+
+/**************ble shutter timer**********************/
+ble_shutter_reconn_timer:
+	fetch 1,mem_shutter_soft_switch_power_state
+	rtnne SS_STATE_POWER_ON
+	arg mem_ble_shutter_reconn_timer,regc
+	arg shutter_start_bluetooth_discovery,regb
+	branch timer_single_step_2B
+/************************************/
+
+shutter_process_idle:
+	call shutter_send_data_to_master
+	branch keyscan_key_process
+
+
+shutter_process_lpm_before:
+	call gpio_set_before_lpm
+	branch keyscan_process_lpm_before
+
+shutter_le_before_hibernate:
+	call gpio_set_before_lpm
+	branch disable_authrom
+
+//////////////////////////////////////////////////////////////////////////////////////////
+
+
+/****************shutter bluetooth control**********************/
+shutter_stop_bluetooth_discovery:
+	fetch 1,mem_shutter_bluetooth_type
+
+	bbit1 BLE_SHUTTER,ble_shutter_stop_bluetooth_discovery
+	rtn
+
+ble_shutter_stop_bluetooth_discovery:
+	fetch 2,mem_ble_shutter_connect_timeout
+	store 2,mem_shutter_sleep_timeout
+	store 2,mem_shutter_sleep_timer
+	branch app_ble_stop_adv
+	
+
+shutter_start_bluetooth_discovery:
+	fetch 1,mem_shutter_soft_switch_power_state
+	rtnne SS_STATE_POWER_ON
+	fetch 1,mem_shutter_bluetooth_type
+
+	bbit1 BLE_SHUTTER,ble_shutter_start_discovery
+	rtn
+ble_shutter_start_discovery:
+	fetch 2,mem_ui_state_map
+	rtnbit1 UI_STATE_BLE_CONNECTED
+	fetch 2,mem_ble_shutter_discovery_timeout
+	store 2,mem_shutter_sleep_timeout
+	store 2,mem_shutter_sleep_timer
+	fetch 2,mem_ble_shutter_discovery_adv_interval
+	call shutter_ble_adv_interval_set
+	call app_led_start_blink
+	fetch 4,mem_ble_shutter_discovery_blink_on_time
+	store 4,mem_shutter_led_struct_app_led_on_time
+	fetch 2,mem_ui_state_map
+	rtnbit1 UI_STATE_BLE_ADV
+	branch app_ble_start_adv
+
+
+shutter_start_reconnect:
+	fetch 1,mem_shutter_soft_switch_power_state
+	rtnne SS_STATE_POWER_ON
+	fetch 1,mem_shutter_bluetooth_type
+	bbit1 BLE_SHUTTER,ble_shutter_start_reconnect
+	rtn
+ble_shutter_start_reconnect:
+	fetch 2,mem_ble_shutter_reconn_timer
+	fetcht 2,mem_ble_shutter_reconn_timeout
+	storet 2,mem_ble_shutter_reconn_timer
+	nrtn blank
+	fetch 2,mem_ble_shutter_reconn_adv_interval
+	call shutter_ble_adv_interval_set
+	call app_led_start_blink
+	fetch 4,mem_ble_shutter_reconn_blink_on_time
+	store 4,mem_shutter_led_struct_app_led_on_time
+	fetch 2,mem_ui_state_map
+	rtnbit1 UI_STATE_BLE_ADV
+	branch app_ble_start_adv
+
+shutter_disconnect_current_connection:
+	fetch 2,mem_ui_state_map
+	bbit1 UI_STATE_BLE_CONNECTED,app_ble_disconnect
+	branch shutter_stop_bluetooth_discovery
+/**************************************/
+/////////////////////////////////////////////////////////////////////////
+//output:if user is enable,mean,can send data
+shutter_check_data_enable:
+	call disable_user
+	fetch 2,mem_ui_state_map
+	bbit1 UI_STATE_BLE_CONNECTED,shutter_check_ble_data_enable
+	rtn
+
+shutter_check_ble_data_enable:
+	fetch 1,mem_ble_shutter_enable_notify
+	rtn blank
+	branch enable_user
+/////////////////////////////////////////////////////////////////////////
+
+/////////////////////////////////////////////////////////////////////////
+//output:if user is enable,mean,bluetooth disconnect
+shutter_check_bluetooth_conn:
+	call disable_user
+	fetch 2,mem_ui_state_map
+	rtnbit1 UI_STATE_BLE_CONNECTED
+	branch enable_user
+/////////////////////////////////////////////////////////////////////////
+
+/////////////////////////////////////////////////////////////////////////
+shutter_change_bluetooth_status_bt_disconn:
+	fetch 1,mem_shutter_bluetooth_type
+	bbit1 BLE_SHUTTER,ble_shutter_change_bluetooth_status_bt_disconn
+	rtn
+
+ble_shutter_change_bluetooth_status_bt_disconn:
+	branch shutter_start_reconnect
+
+/////////////////////////////////////////////////////////////////////////
+
+shutter_check_send_data:
+	disable user2
+	fetch 2,mem_shutter_sleep_timeout
+	store 2,mem_shutter_sleep_timer
+
+	call shutter_check_bluetooth_conn
+	branch shutter_change_bluetooth_status_bt_disconn,user
+	
+	call shutter_check_data_enable
+	nrtn user
+	enable user2
+	rtn
+
+//queue = key index
+//rega =1 press, =0 release
+shutter_key_change:
+	call shutter_check_send_data
+	nrtn user2
+	deposit rega
+	branch shutter_key_release,blank
+shutter_key_press:
+	call app_led_on
+	arg mem_key0_press,regc
+	branch push_queue_press_or_release
+
+shutter_key_release:
+	call app_led_off
+	arg mem_key0_release,regc
+
+push_queue_press_or_release:
+	arg MAX_QUEUE_NUM,pdata
+	imul32 queue,pdata
+	iadd regc,regc
+	
+//input:regc the address that want push to queue buffer
+push_buffer_in_queue:
+	ifetch 1,regc
+	rtn blank
+	call queue_push_one_byte
+	increase 1,regc
+	branch push_buffer_in_queue
+
+
+shutter_send_data_to_master:
+	fetch 2,mem_ui_state_map
+	bbit1 UI_STATE_BLE_CONNECTED,pop_queue_to_ble_data
+	rtn
+
+pop_queue_to_ble_data:
+	call le_fifo_check_nearly_full
+	nrtn blank
+	call queue_pop_one_byte
+	nrtn user
+	pincrease -1
+	mul32 pdata,SHUTTER_BLE_DATA_BUFFER,pdata
+	arg mem_ble_data_buffer1,temp
+	iadd temp,contr
+	branch le_send_notify_from_list
+
+///////////queue function////////////
+//input:pdata is data that want push
+queue_push_one_byte:
+	store 1,mem_pdatatemp
+	arg mem_pdatatemp,rega
+	branch queue_push
+
+queue_pop_one_byte:
+	arg mem_pdatatemp,rega
+	call queue_pop
+	nrtn user
+	fetch 1,mem_pdatatemp
+	rtn
+
+///////////queue function ending////////////
+ble_shutter_receive_data:
+	fetch 2,mem_le_att_handle
+	beq GATT_KEYBOARD_WRITE_HANDLE,ble_shutter_process_reconnect_complete
+	rtn
+
+shutter_init_param:
+	setarg 0x02
+	store 1,mem_shutter_power_off_timeout
+/////////////ble connect interval//////////////
+	setarg 0x00200008
+	store 4,mem_ble_shutter_interval_min		//set min interval is 10ms,set max interval is 40ms
+	setarg 0x012c0005
+	istore 4,contw
+///////////////////////////////////////
+//////////////////MTU/////////////
+	jam 0x17,mem_le_local_mtu
+///////////////////////////////////////
+////////////////justwork/////////
+	setarg 0x1b
+ 	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
+///////////////////////////////////////
+
+shutter_load_buffer_config_form_DataRom:
+///////load data Rom/////////
+	arg BLE_KEY_VALUE_LIST_SIZE,loopcnt
+	arg mem_ble_data_buffer1,contw
+	arg BLE_SHUTTER_KEY_VALUE_LIST_ADDR,contr
+	branch memcpy_fast
+
+shutter_load_ble_gatt_form_DataRom:
+	arg BLE_GATT_LIST_SIZE,loopcnt
+	arg BLE_SHUTTER_GATT_LIST_ADDR,contr
+	branch memcpy_fast
+
+
+/////////////////////////////////////////////////////////////////
+shutter_soft_swtich_power_on:
+	branch shutter_start_reconnect
+
+
+shutter_soft_swtich_power_off:
+	arg 0,rega
+	arg mem_shutter_power_off_led_style,regc
+	call ui_led_set_style_global
+	call shutter_disconnect_current_connection
+shutter_wait_power_off:
+	fetch 1,mem_shutter_power_off_timeout
+	store 1,mem_shutter_power_off_timer
+	rtn
+	
+
+/*************soft swtich ui config*********************/
+ui_soft_swtich_init:
+	setarg SS_STATE_POWER_UP
+	call ui_soft_swtich_init_power_on_time
+	jam UI_BUTTON_STATE_UP,mem_ui_button_last_state
+	call ui_button_init
+	call ui_button_polling
+ui_soft_switch_first_power_on:
+	fetch 1,mem_shutter_soft_switch_first_power_on
+	branch ui_soft_swtich_init_next, blank
+	fetch 1,mem_wakup_from_power_flag	
+	bbit0 2,ui_soft_switch_power_on	
+ui_soft_swtich_init_next:		
+	fetch 2,mem_ui_state_map
+	rtnbit1 UI_STATE_BTN_DOWN
+	branch app_enter_hibernate
+
+ui_soft_swtich_init_power_on_time:
+	fetcht 2,mem_power_param_ptr
+	istore 1,temp		//init power state 
+	ifetch 1,contw		//power on time
+	store 1,mem_ui_button_timeout
+	rtn
+
+
+ui_soft_switch_botton_up:
+	fetch 2,mem_power_param_ptr
+	ifetch 1,pdata
+	rtnne SS_STATE_POWER_UP
+	branch app_enter_hibernate
+
+
+ui_soft_switch_botton_long_press:
+	fetcht 2,mem_power_param_ptr
+	ifetch 1,temp
+	beq SS_STATE_POWER_ON,ui_soft_switch_power_off
+ui_soft_switch_power_on:
+	setarg SS_STATE_POWER_ON
+	fetcht 2,mem_power_param_ptr
+	istore 1,temp		//init power state 
+	add temp,SS_POWER_OFF_TIME,contr
+	ifetch 1,contr
+	istore 1,mem_ui_button_timeout
+	ifetch 2,contr
+	branch callback_func
+
+ui_soft_switch_power_off:
+	setarg SS_STATE_POWER_OFF
+	call ui_soft_swtich_init_power_on_time
+	add temp,SS_POWER_OFF_CB,contr
+	ifetch 2,contr
+	branch app_enter_hibernate,blank		//no call back function , just enter hibernate
+	branch callback_func
+	
+/*************soft swtich ui config ending*********************/
+
+//pdata:adv interval value
+shutter_ble_adv_interval_set:
+	store 2,mem_lpm_interval
+	increase -4,pdata
+	store 2,mem_le_adv_interval
+	rtn
+
+le_send_notify_from_list:
+	ifetch 1,contr	//length 
+	copy pdata,rega
+	ifetcht 2,contr	//handle
+	call store_contr
+	call le_att_malloc_tx_notify
+	copy rega,loopcnt
+	call get_contr
+	branch memcpy
+
+/*************shutter default_init starting*********************/
+shutter_default_init:
+	fetch 2,mem_shutter_key_conf0_temp
+	store 2,mem_shutter_key_conf0
+	fetch 1,mem_shutter_led_struct_app_led_gpio_temp
+	store 1,mem_shutter_led_struct_app_led_gpio
+	store 1,mem_shutter_power_off_led_style_gpio
+	fetch 1,mem_shutter_hard_soft_switch_case_temp
+	store 1,mem_shutter_hard_soft_switch_case
+	fetch 1,mem_shutter_soft_switch_button_gpio_temp
+	store 1,mem_shutter_soft_switch_button_gpio
+	jam 0x01,mem_shutter_bluetooth_type
+	setarg 0x0030
+	store 2,mem_classic_shutter_random_mac_offset_addr
+	setarg 0x0000
+	store 2,mem_shutter_config_eeprom_offset_addr
+	setarg 0x0002
+	store 2,mem_key0_press
+	store 2,mem_key1_press
+	setarg 0x0006
+	store 2,mem_key0_release
+	store 2,mem_key1_release
+	setarg 0x0007
+	store 2,mem_key2_press
+	setarg 0x0008
+	store 2,mem_key2_release
+	setarg mem_shutter_soft_switch_power_state
+	store 2,mem_power_param_ptr
+	setarg 0x201400
+	store 3,mem_shutter_soft_switch_power_state
+	jam 0x01,mem_lpm_mode
+	setarg 0x0100
+	store 2,mem_lpm_interval
+	jam 0x08,mem_lpm_overhead
+	jam 0x05,mem_lpm_mult
+	jam 0x02,mem_lpm_mult_timeout
+	setarg 0x0096
+	store 2,mem_ble_shutter_reconn_blink_on_time
+	istore 2,contw
+	setarg 0x0296
+	store 2,mem_ble_shutter_discovery_blink_on_time
+	istore 2,contw
+	setsect 0,0x10
+	setsect 1,0x8008
+	setsect 2,0x2c000
+	setsect 3,0x04
+	store 8,mem_ble_shutter_interval_min_new
+	jam 0x01,mem_ui_led_struct_num
+	setarg mem_shutter_led_struct_app_led
+	store 2,mem_ui_led_struct_ptr
+	setarg 0x0000
+	store 2,mem_shutter_led_struct_app_led
+	setsect 0,0x1a0
+	setsect 1,0x68
+	setsect 2,0x00
+	setsect 3,0x00
+	store 8,mem_shutter_led_struct_app_led_on_time
+	setarg 0x0301
+	store 2,mem_shutter_power_off_led_style
+	setsect 0,0x1a0
+	setsect 1,0xe8
+	setsect 2,0x00
+	setsect 3,0x00
+	store 8,mem_shutter_power_off_led_style_on_time
+	setarg 0x000e
+	store 2,mem_ble_shutter_reconn_adv_interval
+	setarg 0x0140
+	store 2,mem_ble_shutter_discovery_adv_interval
+	store 2,mem_le_adv_interval
+	setarg 0x0050
+	store 2,mem_ble_shutter_reconn_timeout
+	jam 0x07,mem_le_adv_channel_map
+	jam 0x00,mem_le_adv_enable
+	setsect 0,0xfb
+	setsect 1,0x2c212
+	setsect 2,0x800f
+	setsect 3,0x21
+	store 8,mem_local_rx_max_octets
+	setsect 0,0x0bb8
+	setsect 1,0x02ee
+	store 4,mem_ble_shutter_discovery_timeout
+	setarg mem_queue_each_size
+	store 2,mem_queue_ptr
+	setarg 0x2001
+	store 2,mem_queue_each_size
+	jam 0x1f,mem_le_adv_data_len
+	setsect 0,0x10102
+	setsect 1,0x80c1
+	setsect 2,0x18120
+	setsect 3,0x640c
+	store 9,mem_le_adv_data
+	setsect 0,0x3c1
+	istore 2,contw
+	jam 0x1f,mem_le_scan_data_len
+	setsect 0,0x2090d
+	setsect 1,0x34c15
+	setsect 2,0x28532
+	setsect 3,0x1d1d5
+	store 9,mem_le_scan_data
+	setsect 0,0x26574
+	setsect 1,0x1c
+	istore 3,contw
+	setarg mem_shutter_keyscan
+	store 2,mem_keyscan_ptr
+	jam 0x02,mem_shutter_key_num
+	setarg mem_shutter_nv_data
+	store 2,mem_nv_data_ptr
+	jam 0x05,mem_nv_data_number
+	setarg BLE_SHUTTER_GATT_LIST_ADDR	//BLE ATT LIST 
+	store 2,mem_ui_le_uuid_table	//BLE ATT LIST END
+	rtn	
+	
+
+/*************shutter default_init ending*********************/
+
+
+
+
+
+else
+	branch assert
+	
+endif
Index: program/ble_protocol_stack/le.prog
===================================================================
--- /branch/usb/usb_public_base/program/ble_protocol_stack/le.prog	(revision 0)
+++ /branch/usb/usb_public_base/program/ble_protocol_stack/le.prog	(working copy)
@@ -0,0 +1,2005 @@
+ifdef COMPILE_LE
+//******************************************//
+//*************LE INIT ****************//
+//******************************************//
+
+le_init_conn:
+	bpatch patch19_0,mem_patch19
+	disable wake
+	jam 1,mem_le_conn_handle
+	jam 3,mem_le_state
+	jam 1,mem_le_arq
+	setarg -1
+	store 2,mem_le_event_count
+	force 0,pdata
+	store 1,mem_le_ch
+	store 1,mem_le_op
+	store 3,mem_sniff_rcv
+	store 3,mem_sniff_lost
+	call le_clear_enc
+	jam 1,mem_le_txheader
+	jam 0,mem_le_txlen
+	jam FUN_RX_LL_1M_PHY,mem_le_rx_phy
+	jam FUN_TX_LL_1M_PHY,mem_le_tx_phy
+	jam 0,mem_le_l2cap_att_states
+	branch le_supervision_flush
+
+le_init_master:
+	bpatch patch19_1,mem_patch19
+	enable master
+	jam lemode_master,mem_le_mode
+	jam 1,mem_le_att_handle
+	jam 1,mem_le_search_handle_start
+	setarg 0xffff
+	store 2,mem_le_search_handle_end
+	force 0,pdata
+	store 5,mem_ccm_pcnt_rx
+	set1 LE_CCM_DIRECTIONBIT,pdata
+	store 5,mem_ccm_pcnt_tx	
+	branch le_init_conn
+
+
+le_init_slave:
+	bpatch patch19_2,mem_patch19
+	disable master
+ 	setarg 0x17
+ 	store 2,mem_le_remote_mtu
+	increase 4,pdata
+	store 2,mem_remote_rx_max_octets
+	jam lemode_slave,mem_le_mode
+	jam 0,mem_le_adv_enable
+	jam 0,mem_lpm_current_mult
+	call le_clear_pairing_state
+	fetch 2,mem_le_superto
+	store 2,mem_le_init_superto
+	fetch 2,mem_le_tsniff
+	mul32 pdata,5,pdata
+	rshift4 pdata,pdata
+	store 2,mem_le_superto			// vol.6 part B 4.5.2 only 6*conninterval before establish
+	branch le_init_conn
+	
+
+//******************************************//
+//*************LE main process*********//
+//******************************************//
+
+le_conn_dispatch:
+	bpatch patch19_3,mem_patch19
+	call le_enable
+ 	fetch 1,mem_le_state
+ 	isolate1 lestate_encryption,pdata
+ 	setflag true,mark_ble_encryption,mark
+	call app_process_ble
+	fetch 1,mem_le_mode
+	bbit1 mode_master,le_master_dispatch
+	branch le_slave_dispatch
+	
+//******************************************//
+//***********LE master process*********//
+//******************************************//
+	
+le_master_dispatch:
+	bpatch patch19_4,mem_patch19
+	enable master
+	call le_supervision_update
+	branch le_master_disconn,positive
+	call le_setup
+	call le_prepare_tx
+	disable match
+	call le_transmit_receive_sifs
+	nrtn match
+	fetch 1,mem_le_conn_rcv
+	increase 1,pdata
+	store 1,mem_le_conn_rcv
+	call le_acknowledge
+	disable master
+	rtn
+	
+le_master_disconn:
+	call le_disconnect
+	disable master
+	rtn
+	
+//******************************************//
+//***********LE slave process***********//
+//******************************************//
+le_slave_dispatch:
+	bpatch patch19_5,mem_patch19
+	jam 0,mem_le_md_count
+	set0 mark_ble_crc_fail,mark
+ifdef SECURE_CONNECTION
+	call sp_calc_sequence_256
+	call le_secure_connect_sm
+endif
+	disable attempt
+	call le_supervision_update
+	branch le_slave_disconn,positive
+	fetch 1,mem_le_rx_phy
+	call le_enable_phy_by_pdata
+	call le_setup
+	call le_receive_slave
+	nbranch le_slave_unsync,sync	// vol.6 part B 4.5.1 respond even crc error
+	call le_got_first_packet
+	branch le_slave_match,match
+	bmark1 mark_ble_crc_fail,le_slave_crc_fail
+	branch le_slave_cont
+	
+
+le_slave_crc_fail:
+le_slave_match:
+	bpatch patch19_6,mem_patch19
+	fetch 1,mem_le_md_count
+	pincrease 1
+	store 1,mem_le_md_count
+	beq LE_MD_MAX_COUNT,le_slave_cont
+	call le_acknowledge
+	call le_prepare_tx
+	fetch 1,mem_le_tx_phy
+	call le_enable_phy_by_pdata
+	call le_transmit
+	call le_parse
+	fetch 2,mem_cb_ble_transmit
+	call callback_func
+	call le_check_md
+	branch le_slave_more_data,user
+le_slave_cont:
+	bpatch patch19_7,mem_patch19
+	call le_pairing_sm
+ 	call le_check_paring_time
+	call check_51cmd
+	fetch 1,mem_le_op
+	bbit1 op_disconn,le_slave_disconn
+le_slave_unsync:
+	bpatch patch1a_0,mem_patch1a
+	call end_of_packet
+	call le_lpm_set_mult
+	branch calc_clke_offset
+
+
+le_check_md:
+	disable user
+	bmark1 mark_ble_rx_md,enable_user
+	bmark1 mark_ble_tx_md,enable_user
+	bmark1 mark_ble_crc_fail,enable_user
+	rtn
+
+
+le_slave_more_data:
+	bpatch patch1a_1,mem_patch1a
+	enable attempt
+	call le_transmit_receive_sifs_notx
+	branch le_slave_match,match
+	bmark1 mark_ble_crc_fail,le_slave_crc_fail
+	branch le_slave_cont
+
+le_slave_disconn:
+
+	//fall through
+le_disconnect:
+	bpatch patch1a_2,mem_patch1a
+	call le_clear_connection_info
+	call app_disconn_reason_collect_ble
+	call le_clear_pairing_state
+ifdef SECURE_CONNECTION
+	call le_sc_state_clear
+endif
+	jam BT_EVT_LE_DISCONNECTED,mem_fifo_temp
+	branch ui_ipc_send_event
+
+le_clear_connection_info:
+	arg mem_used_map,contw
+	call memset0_16
+	jam 0,mem_le_conn_handle
+	jam lemode_idle,mem_le_mode
+	jam 0,mem_le_state
+le_clear_pairing_state:
+	bpatch patch1a_3,mem_patch1a
+	jam FLAG_LE_ENC_NULL,mem_le_enc_state
+	jam FLAG_LE_PAIRING_NULL,mem_le_pairing_state 
+ifdef SECURE_CONNECTION
+	call sp_clear_flags
+endif
+	rtn
+	
+le_got_first_packet:
+	bpatch patch1a_4,mem_patch1a
+	fetch 1,mem_le_conn_rcv
+	increase 1,pdata
+	store 1,mem_le_conn_rcv
+	fetch 1,mem_le_state
+	rtnbit1 lestate_got_first_packet
+	set1 lestate_got_first_packet,pdata
+	store 1,mem_le_state
+	fetch 2,mem_le_init_superto
+	store 2,mem_le_superto
+	setarg 0
+	store 4,mem_le_transmit_window
+	rtn
+
+
+//input: pdata is phy mode
+//bit0 is le 1M phy
+//bit1 is le 2M phy
+//bit2 is le coded phy s2
+//bit7 is le coded phy s8
+le_enable_phy_by_pdata:
+	copy pdata,temp
+	bpatch patch1a_5,mem_patch1a
+	copy temp,pdata
+	bbit1 BIT_LE_1M_PHY,le_enable
+	bbit1 BIT_LE_2M_PHY,le_enable_2M
+	bbit0 BIT_LE_CODED_PHY,le_enable
+	bbit1 BIT_LE_CODED_PHY_S8,le_enable_coded_s8
+	bbit1 BIT_LE_CODED_PHY_S2,le_enable_coded_s2
+	branch le_enable
+
+le_enable_2M:
+	call le_enable
+	set1 mark_ble_2M,mark
+	set0 mark_ble_lr,mark
+	jam 0x03,0x8901
+	jam 0x84,0x8920
+	rtn
+
+le_enable_coded_s2:
+le_enable_coded:
+	call le_enable
+	set1 mark_ble_lr,mark
+	set0 mark_ble_lr_s8,mark
+	jam 0x05,0x8901
+	jam 0x80,0x8920
+	jam 0x20,0x8930
+	rtn
+
+le_enable_coded_s8:
+	call le_enable_coded
+	set1 mark_ble_lr_s8,mark
+	rtn
+
+le_enable:
+	bpatch patch1a_6,mem_patch1a
+	set0 mark_ble_2M,mark
+	set0 mark_ble_lr,mark
+	jam 0x01,0x8901
+	jam 0x80,0x8920
+	jam 0x03,0x8930
+	rtn
+
+
+le_disable:
+	bpatch patch1a_7,mem_patch1a
+	set0 mark_ble_encryption,mark
+	jam 0x01,0x8901
+	jam 0x80,0x8920
+	jam 0x03,0x8930
+	rtn
+	
+le_prep:
+	bpatch patch1b_0,mem_patch1b
+	disable enable_crc
+	disable enable_white
+	fetch 3,mem_le_crcinit
+	iforce crc24_init
+	fetch 1,mem_le_ch_mapped
+le_prep_next:
+	reverse pdata,temp
+	set1 1,temp
+	rshift temp,white_init
+	rtn
+	
+
+le_rx_setfreq:
+	call le_setfreq
+le_rf_rx_enable:	
+	call set_freq_rx
+	fetch 2,mem_param_pll_setup
+	call sleep
+	branch rf_rx_enable
+
+le_tx_setfreq:
+	branch txon,match
+	bmark1 mark_ble_crc_fail,txon
+le_tx_setfreq0:
+	call le_setfreq
+	branch set_freq_tx
+	
+le_setfreq:
+	bpatch patch1b_1,mem_patch1b
+	call set_sync_on
+	fetch 1, mem_le_testtype
+	nbranch le_ctf_test,blank
+	fetch 1,mem_le_ch_mapped
+	sub pdata,36,null
+	branch le_ctf_normal,positive
+	force 0,temp
+	rtneq 37
+	force 24,temp
+	rtneq 38
+	force 78,temp
+	rtn
+	
+le_ctf_normal:
+	sub pdata,10,null
+	branch le_ctf_low,positive
+	increase 1,pdata
+	
+le_ctf_low:	
+	lshift pdata,pdata
+	add pdata,2,temp
+	rtn
+	
+le_ctf_test:
+	fetch 1,mem_le_ch_mapped
+	lshift pdata,temp
+	rtn
+
+le_sca_map:
+	arg 500,temp
+	rtn blank
+	arg 250,temp
+	rtneq 1
+	arg 150,temp
+	rtneq 2
+	arg 100,temp
+	rtneq 3
+	arg 75,temp
+	rtneq 4
+	arg 50,temp
+	rtneq 5
+	arg 40,temp
+	rtneq 6
+	arg 20,temp
+	rtn
+
+
+	
+le_setup:
+	bpatch patch1b_2,mem_patch1b
+	enable swfine
+	fetch 4,mem_le_access
+	iforce access
+	call le_map_channel
+	setarg 0x200
+	branch le_setup_master,master
+	fetch 2,mem_le_receive_window
+	rshift pdata,pdata
+le_setup_master:
+	fetcht 2,mem_param_pll_setup
+	iadd temp,pdata
+	call ahead_window
+	deposit clke
+	rtn
+
+
+le_context_nextevent:
+	bpatch patch1b_3,mem_patch1b
+	call push_stack_rega_b_c
+	storer loopcnt ,2,mem_loopcnt
+	add rega,coffset_mode,contr
+	ifetch 1,contr
+	rtnbit0 mode_le
+	add rega,coffset_le_event_cnt,contw
+	ifetch 2,contw
+	increase 1,pdata
+	istore 2,contw
+	call le_update_param
+	call le_update_channel_map
+	call le_update_phy	
+	call le_context_nexthop
+	call pop_stack_rega_b_c
+	fetchr loopcnt ,2,mem_loopcnt
+	rtn
+	
+le_context_nexthop:	
+	add rega,coffset_le_hop,contr
+	ifetch 1,contr
+	add rega,coffset_le_ch,contw
+	ifetcht 1,contw
+	iadd temp,pdata
+	sub pdata,36,null
+	branch le_nexthop_nowrap,positive
+	increase -37,pdata
+le_nexthop_nowrap:
+	istore 1,contw
+	rtn
+
+//input rega
+le_calc_channel_map:
+	add rega,coffset_le_channel_map,contr
+	ifetch 5,contr
+	force 0,temp
+	force 37,loopcnt
+le_count_channels_loop:
+	bbit0 0,le_count_channels_notused
+	increase 1,temp
+le_count_channels_notused:
+	rshift pdata,pdata
+	loop le_count_channels_loop
+	add temp,-1,pdata
+	add rega,coffset_le_channels,contw
+	istore 1,contw
+	rtn
+
+le_map_channel:
+	bpatch patch1b_4,mem_patch1b
+	fetch 1,mem_le_ch
+	iforce queue
+	fetcht 5,mem_le_channel_map
+	qisolate1 temp
+	branch le_map_channel_end,true
+le_map_channel_next:
+	fetch 1,mem_le_channels
+	isub queue,pdata
+	branch le_map_channel_cont,positive
+	sub pdata,-1,queue
+	branch le_map_channel_next
+le_map_channel_cont:
+	copy queue,loopcnt
+	force 0,queue
+le_map_channel_loop:
+	qisolate1 temp
+	branch le_map_channel_skip,true
+	increase 1,loopcnt
+le_map_channel_skip:
+	deposit loopcnt
+	branch le_map_channel_end,blank
+	increase 1,queue
+	increase -1,loopcnt
+	branch le_map_channel_loop
+le_map_channel_end:
+	deposit queue
+	store 1,mem_le_ch_mapped
+	rtn
+
+
+le_wait_tx:
+	branch le_wait_master,master
+	until null,timeout
+	rtn
+	
+le_wait_master:
+	arg 0xea0,timeup
+	until clkn_rt,meet
+	rtn
+
+le_receive_adv:
+	disable swfine
+	fetch 2,mem_le_scan_window
+	copy pdata,timeup
+	branch le_receive_packet
+
+
+le_receive_slave:
+	bpatch patch1b_5,mem_patch1b
+ 	call le_dec_init
+	enable swfine
+	fetch 2,mem_le_receive_window
+	fetcht 4,mem_le_transmit_window
+	iadd temp,timeup
+le_receive_packet:
+	call le_rx_setfreq
+le_receive_rxon:
+	bpatch patch1b_6,mem_patch1b
+	call le_prep
+	bmark0 mark_ble_lr,le_receive_nolr
+	pulse dewhiten_code_calc
+	nop 30
+	call le_prep
+	lshift3 timeup,timeup
+le_receive_nolr:
+	disable match
+	enable decode_fec0
+	enable is_rx
+	disable is_tx
+	copy timeup,stop_watch
+	correlate null,timeout
+	branch le_receive_on_attempt,attempt
+	copy clke,temp
+	storet 6,mem_sync_clke
+le_receive_on_attempt:
+	nbranch le_unsync_end,sync
+	bpatch patch1b_7,mem_patch1b
+	enable swfine
+	arg PARAM_T_IFS_150US+PARAM_20MS_INIT+PARAM_SYNC_TIME_DIFFERENCE,stop_watch
+	fetch 1,mem_system_clk
+	imul32 stop_watch,stop_watch
+	call rf_debug_rx_sync_line	//L-H
+	branch le_receive_skip,attempt
+	call calc_clke_all_modem
+	fetch 1,mem_le_state
+	bbit0 lestate_got_first_packet,le_receive_skip
+	fetcht 6,mem_sync_clke
+	call lpm_adjust_clk,wake
+le_receive_skip:
+	call save_rssi
+	enable enable_white
+	enable enable_crc
+	parse demod,bucket,8
+	rshift3 pwindow,pdata
+	store 1,mem_le_rxbuf_data_header
+	parse demod,bucket,8
+	rshift3 pwindow,pdata
+	store 1,mem_le_rxbuf_data_length
+ 	copy pdata,loopcnt
+	branch le_rx_nopayload,zero
+
+	bmark1 mark_ble_encryption,le_rx_dec
+
+le_rx_loop:
+	parse demod,bucket,8
+	rshift3 pwindow,pdata
+	istore 1,contw
+	loop le_rx_loop
+	branch le_rx_nopayload
+
+le_rx_dec: 
+	copy contw,regb
+	bpatch patch1c_0,mem_patch1c
+	call le_check_retransmit	
+//	bmark1 mark_old_packet,le_retransmit_end_of_packet
+	fetchr rega, 1,mem_le_rxbuf_data_length
+	increase -4,rega
+	nbranch le_mic_error,positive
+//	storer rega, 1,mem_le_rxbuf_data_length
+	call le_dec_start	
+	copy regb,contw
+	arg 0,temp
+	fetchr loopcnt, 1,mem_le_rxbuf_data_length
+	increase -4,loopcnt
+	branch le_rx_dec_loop_end,zero
+le_rx_dec_loop:
+	
+	parse demod,bucket,8
+	rshift3 pwindow,pdata
+	istore 1,contw
+	increase 1,temp
+	and temp,0xf,null
+	call le_dec,zero
+	loop le_rx_dec_loop
+le_rx_dec_loop_end:
+	call le_dec_end	
+	copy regb,contw
+	
+
+le_rx_nopayload:
+	bpatch patch1c_1,mem_patch1c
+	parse demod,bucket,24	
+	rshift32 pdata,pdata
+	rshift16 pdata,pdata
+	istore 3,contw
+	enable swfine
+	call le_set_until_tx_timer
+	branch le_crc_fail,crc_failed
+	bmark0 mark_ble_encryption,le_rx_match
+	fetch 1,mem_le_rxbuf_data_length
+	branch le_rx_match,blank
+	increase -4,pdata
+	store 1,mem_le_rxbuf_data_length
+	call wait_ccm_done
+ 	fetch 1,core_misc_status
+	bbit0 7, le_mic_error
+ 	force regidx_result,regext_index
+	storer regext, 4,mem_le_peer_mic
+le_rx_match:
+	call rf_debug_rx_crc_line	//L
+	enable match
+	set0 mark_ble_crc_fail,mark
+le_crc_fail_tx:
+	bpatch patch1c_2,mem_patch1c
+	call ccm_ctrl_clr
+	fetch 1,mem_le_rx_phy
+	nsetflag ble_coded_info,BIT_LE_CODED_PHY_S8,pdata
+	store 1,mem_le_rx_phy
+	call le_match_set_txfreq
+le_match_set_sync_on:	
+	disable decode_fec0
+	branch set_sync_on
+	
+le_match_set_txfreq:
+	bpatch patch1c_3,mem_patch1c
+	fetcht 1,mem_last_freq
+	add temp,2,rega
+	bmark1 mark_ble_2M,rf_tx_write_freq
+	add temp,1,rega
+	branch  rf_tx_write_freq	// set frequency to tx mode freq
+
+
+le_dec_init:
+	rtnmark0 mark_ble_encryption
+	call load_sk
+	force regidx_result,regext_index
+	call aes_clear
+	branch aes_clear_data
+	
+	
+le_dec_start:
+	bpatch patch1c_4,mem_patch1c
+	jam 0,core_ccm_aad0 
+	jam 1,core_ccm_aad1
+	fetch 1,mem_le_rxbuf_data_header
+	and_into 0x3,pdata
+	store 1,core_ccm_aad2
+	
+	setarg mem_le_rxbuf_data_payload
+	store 2,core_ccm_input_playload_addr
+	store 2,core_ccm_output_playload_addr
+
+	fetchr rega, 1,mem_le_rxbuf_data_length
+	increase -4,rega
+
+	fetcht 5,mem_ccm_pcnt_rx	
+	isolate1 mark_old_packet,mark
+	call le_pcnt_rx_sub1,true
+	call ccm_b0
+	setarg 0
+	store 2,core_ccm_inptr
+	jam 6,core_ccm_ctrl
+	jam 7,core_ccm_ctrl	
+	rtn	
+
+le_pcnt_rx_sub1:
+	sub temp,0,null
+	branch le_pcnt_rx_sub1_0,zero
+	increase -1,temp
+	set1 LE_CCM_DIRECTIONBIT,temp
+	rtn
+
+le_pcnt_rx_sub1_0:
+	setarg 0xffffff
+	lshift16 pdata,pdata
+	arg 0xffff,temp
+	ior temp,temp
+	rtn
+
+le_dec:
+	copy contw,regb
+	fetch 1,mem_le_rxbuf_data_length
+	increase -4,pdata
+	isub temp,null
+	rtn zero
+	storet 2,core_ccm_inptr
+	copy regb,contw
+	rtn
+	
+le_dec_end://mic
+	parse demod,bucket,32
+	rshift32 pdata,pdata
+	rshift8 pdata,pdata
+	istore 4,contw
+	copy contw,regb
+//	store 4,mem_le_peer_mic
+	force regidx_data,regext_index
+	copy  pdata,regext
+	storet 2,core_ccm_inptr
+	rtn
+
+le_mic_error:
+	branch le_end_of_packet
+
+le_retransmit_end_of_packet:
+	call le_set_until_tx_timer	// start SIFS timer after last bit of crc
+	call end_of_packet
+	branch le_rx_match
+
+le_crc_fail:
+	call rf_debug_rx_crc_fail_line
+	bmark1 mark_ble_crc_fail,le_crc_fail_consecutive //two consecutive packets received with an invalid CRC match within a connection event shall close the event
+	set1 mark_ble_crc_fail,mark
+	branch le_crc_fail_tx
+	
+le_unsync_end:	
+le_crc_fail_consecutive:
+	set0 mark_ble_crc_fail,mark
+	branch le_end_of_packet
+
+le_end_of_packet:
+	bpatch patch1c_5,mem_patch1c
+	call ccm_ctrl_clr
+	branch end_of_packet
+	
+calc_clke_all_modem:
+	bmark1 mark_ble_lr,calc_clke_modem_coded
+	bmark1 mark_ble_2M,calc_clke_modem_2M
+	fetch 2,mem_param_clke_cal_le_1m
+	copy pdata,clke_rt
+	copy bt_clk,clke_bt
+	rtn
+
+
+calc_clke_modem_coded:
+	fetch 2,mem_param_clke_cal_le_coded
+	copy pdata,clke_rt
+	add bt_clk,1,clke_bt
+	rtn
+
+calc_clke_modem_2M:
+	fetch 2,mem_param_clke_cal_le_2m
+	copy pdata,clke_rt
+	copy bt_clk,clke_bt
+	rtn
+
+
+le_set_until_tx_timer:
+	fetch 1,mem_le_rxbuf_data_length
+	add pdata,5,temp	//PDU Length
+	lshift3 temp,temp	//PDU bit size
+	fetch 1,mem_le_rx_phy
+	bmark1 mark_ble_lr,le_set_until_tx_timer_rx_lr
+	bbit1 BIT_LE_1M_PHY,le_set_until_tx_timer_rx_1M
+	bbit1 BIT_LE_2M_PHY,le_set_until_tx_timer_rx_2M
+le_set_until_tx_timer_rx_lr:
+	branch le_set_until_tx_timer_rx_coded_s2,ble_coded_info
+	branch le_set_until_tx_timer_rx_coded_s8
+
+le_set_until_tx_timer_rx_1M:
+	branch le_calc_stop_watch
+
+le_set_until_tx_timer_rx_2M:
+	rshift temp,temp
+	branch le_calc_stop_watch
+
+le_set_until_tx_timer_rx_coded_s2:
+	add temp,3,temp	//term2
+	lshift temp,temp
+	branch le_set_until_tx_timer_rx_coded
+
+le_set_until_tx_timer_rx_coded_s8:
+	add temp,3,temp	//term2
+	lshift3 temp,temp
+le_set_until_tx_timer_rx_coded:
+	setarg PARAM_CODED_C1_TERM1_TIME_40US
+	iadd temp,temp
+	branch le_calc_stop_watch
+
+le_calc_stop_watch:
+	fetch 1,mem_system_clk
+	imul32 temp,temp		//mips cpu
+	arg PARAM_20MS_INIT,rega
+	imul32 rega,pdata
+	isub temp,temp
+	copy stop_watch,pdata
+	isub temp,stop_watch
+	rtn
+
+le_transmit_receive_sifs_without_change_mode:
+	call le_transmit
+	fetcht 1,mem_last_freq
+	call set_freq_rx
+	call rf_rx_enable
+	enable swfine
+	arg 5500,timeup
+	branch le_receive_rxon
+
+
+le_transmit_receive_sifs:
+	bpatch patch1c_6,mem_patch1c
+	fetch 1,mem_le_tx_phy
+	call le_enable_phy_by_pdata
+	call le_transmit
+le_transmit_receive_sifs_notx:
+	fetch 1,mem_le_rx_phy
+	call le_enable_phy_by_pdata
+
+	fetcht 1,mem_last_freq
+	call set_freq_rx
+	call rf_rx_enable
+	enable swfine
+	arg 5500,timeup
+	bmark0 mark_ble_lr,le_receive_rxon
+	arg 8500,timeup
+	branch le_receive_rxon
+
+le_transmit_norx:
+	bpatch patch1c_7,mem_patch1c
+	call le_transmit
+	branch end_of_packet
+	
+le_transmit:
+	bpatch patch1d_0,mem_patch1d
+	call le_prep
+	call le_tx_setfreq
+	call rf_debug_tx_on_line	//H
+	set1 TXGFSK,radio_ctrl
+	enable encode_fec0
+	enable is_tx
+	disable is_rx
+	call le_wait_tx
+	disable lr_s2en
+	bmark1 mark_ble_lr,le_transmit_lr
+	bmark1 mark_ble_2M,le_transmit_2M
+	rshift16 access,pdata
+	rshift8 pdata,pdata
+	rshift4 pdata,pdata
+	inject mod,40
+le_transmit_packet:
+	enable enable_white
+	enable enable_crc
+	bpatch patch1d_1,mem_patch1d
+	fetch 1,mem_le_txheader
+	inject mod,8
+	ifetch 1,contr
+	copy pdata,loopcnt
+	inject mod,8
+	sub loopcnt,0,null
+	branch le_tr_nopayload,zero
+
+	fetch 1,core_ccm_ctrl
+	branch le_transmit_packet_not_enc,blank 
+	bmark1 mark_ble_encryption,le_transmit_packet_enc
+le_transmit_packet_not_enc:	
+	arg mem_le_txpayload,contr
+le_tr_loop:
+	ifetch 1,contr
+	inject mod,8
+	loop le_tr_loop
+	
+le_tr_nopayload:
+	enable enable_parity
+	inject mod,24
+	disable enable_parity
+	bmark0 mark_ble_lr,le_transmit_skip
+	disable enable_white
+	setarg 0
+	inject mod,3
+le_transmit_skip:
+	until null,tx_clear
+	nop 100          /* flush out the last bit */
+	bpatch patch1d_2,mem_patch1d
+	disable encode_fec0
+	disable encode_fec3
+	call set_sync_on
+	call rf_debug_tx_off_line	//L
+le_check_start_pause_enc:
+	fetch 1,mem_le_txheader
+	and pdata,LLID_LE_LL,pdata
+	rtnne LLID_LE_LL
+	fetch 1,mem_le_enc_state
+	beq  FLAG_LE_ENC_PAUSE,le_clear_enc
+	rtnne FLAG_LE_SEND_START_ENC_REQ
+	fetch 1,mem_le_txpayload
+	beq LL_START_ENC_REQ,le_set_enc
+	rtn
+	
+
+le_transmit_packet_enc:
+	increase -4,loopcnt
+	copy loopcnt,temp	
+	call ccm_wait_enc	
+	arg mem_le_txpayload,contr
+le_transmit_packet_enc_loop:
+	ifetch 1,contr
+	inject mod,8
+	loop le_transmit_packet_enc_loop
+	call ccm_check_enc_done
+	copy regext,pdata
+	inject mod,32
+	branch le_tr_nopayload
+
+le_transmit_lr:
+	arg 10,loopcnt
+le_transmit_lr_preamble_loop:
+	setarg 0x3c
+	inject mod,8
+	loop le_transmit_lr_preamble_loop
+	disable encode_fec0
+	enable encode_fec3
+	rshift16 access,pdata
+	rshift16 pdata,pdata
+	rshift4 pdata,pdata
+	inject mod,32
+	bmark1 mark_ble_lr_s8,le_transmit_lr_s8
+le_transmit_lr_s2:
+	setarg 1
+	inject mod,5
+	enable lr_s2en
+	branch le_transmit_packet
+
+le_transmit_lr_s8:
+	setarg 0
+	inject mod,5
+	branch le_transmit_packet
+
+le_transmit_2M:
+	fetch 1,mem_system_clk
+	rshift pdata,loopcnt
+le_transmit_2M_dealy:
+	nop 2
+	loop le_transmit_2M_dealy
+//	nop 36	//2M 前端发送比1M快3us左右
+	rshift16 access,pdata
+	rshift8 pdata,pdata
+	rshift4 pdata,temp
+	copy temp,pdata
+	inject mod,8
+	copy temp,pdata
+	inject mod,40
+	branch le_transmit_packet
+	
+
+le_update_param:
+	arg le_update_param_ahead1_cb,regc
+	arg le_update_param_cb,regb
+	arg lestate_update_param,queue
+	branch le_check_update_flag
+
+le_update_param_ahead1_cb:
+	add rega,coffset_sniff_anchor,contr
+	ifetcht 4,contr
+	add rega,coffest_le_new_transmitwindowsize,contr
+	ifetch 1,contr
+	add rega,coffset_le_window_size,contw
+	istore 1,contw
+	ifetch 2,contr
+	lshift2 pdata,pdata
+	iadd temp,timeup	//add windowsize
+	add rega,coffset_sniff_anchor,contw  
+	deposit timeup
+	istore 4,contw
+	ifetch 2,contr
+	lshift2 pdata,pdata
+	add rega,coffset_tsniff,contw
+	istore 2,contw
+	ifetch 2,contr
+	add rega,coffset_le_slave_latency,contw
+	istore 2,contw
+	ifetch 2,contr
+	store 2,mem_le_init_superto
+	branch le_receive_window_size
+
+le_update_param_cb:
+	ifetch 1,rega
+	set0 lestate_got_first_packet,pdata
+	istore 1,rega
+	storer rega,2,mem_rega
+	jam BT_EVT_LE_PARSE_CONN_PARAM_ACCEPTED,mem_fifo_temp
+	call ui_ipc_send_event
+	fetchr rega,2,mem_rega
+	rtn	
+
+le_update_channel_map:
+	arg 0,regc
+	arg le_update_channel_map_cb,regb
+	arg lestate_update_map,queue
+	branch le_check_update_flag
+	
+le_update_channel_map_cb:
+	add rega,coffset_le_new_map,contr
+	ifetch 5,contr
+	add rega,coffset_le_channel_map,contw
+	istore 5,contw
+	branch le_calc_channel_map
+	
+
+le_update_phy:
+	arg 0,regc
+	arg le_update_phy_cb,regb
+	arg lestate_update_phy,queue
+	branch le_check_update_flag
+	
+le_update_phy_cb:
+	add rega,coffset_le_new_m2s_phy,contr
+	ifetch 1,contr
+	call le_update_phy_cb_m2s
+	istore 1,contw
+	add rega,coffset_le_new_s2m_phy,contr
+	ifetch 1,contr
+	call le_update_phy_cb_s2m
+	istore 1,contw
+	storer rega,2,mem_rega
+	jam BT_EVT_LE_UPDATE_PHY,mem_fifo_temp
+	call ui_ipc_send_event
+	fetchr rega,2,mem_rega
+	rtn	
+
+le_update_phy_cb_m2s:
+	call le_update_phy_cb_m2s_no_change,blank
+	add rega,coffset_le_rx_phy,contw
+	nrtn master
+	fetcht 1,mem_le_tx_phys
+	isolate1 BIT_LE_CODED_PHY_S8,temp
+	setflag true,BIT_LE_CODED_PHY_S8,pdata
+	add rega,coffset_le_tx_phy,contw
+	rtn
+
+le_update_phy_cb_m2s_no_change:
+	add rega,coffset_le_rx_phy,contr
+	ifetch 1,contr
+	nrtn master
+	add rega,coffset_le_tx_phy,contr
+	ifetch 1,contr
+	rtn
+
+le_update_phy_cb_s2m:
+	call le_update_phy_cb_s2m_no_change,blank
+	fetcht 1,mem_le_tx_phys
+	isolate1 BIT_LE_CODED_PHY_S8,temp
+	setflag true,BIT_LE_CODED_PHY_S8,pdata
+	add rega,coffset_le_tx_phy,contw
+	nrtn master
+	set0 BIT_LE_CODED_PHY_S8,pdata
+	add rega,coffset_le_rx_phy,contw
+	rtn
+
+le_update_phy_cb_s2m_no_change:
+	add rega,coffset_le_tx_phy,contr
+	ifetch 1,contr
+	nrtn master
+	add rega,coffset_le_rx_phy,contr
+	ifetch 1,contr
+	rtn
+	
+
+//regb regc is cb function
+//queue is state flag
+le_check_update_flag:
+	bpatch patch1d_3,mem_patch1d
+	ifetch 1,rega
+	qisolate0 pdata
+	rtn true
+	add rega,coffset_le_event_cnt,contr
+	ifetcht 2,contr
+	add rega,coffset_le_instant,contr
+	ifetch 2,contr
+	
+	isub temp,pdata
+	branch le_update,zero
+	nbranch le_check_update_small,positive
+	sub pdata,1,null
+	branch le_update_ahead1,zero
+	rtn
+	
+le_update_ahead1:
+	copy regc,pdata
+	branch callback_func
+
+le_update:
+	ifetch 1,rega
+	qset0 pdata
+	istore 1,rega
+	copy regb,pdata
+	branch callback_func
+	
+le_check_update_small:
+	add rega,coffset_le_event_cnt,contr
+	ifetch 2,contr
+	add rega,coffset_le_instant,contr
+	ifetch 2,contr
+	isub temp,pdata
+	arg 0xffff,temp
+	isub temp,null
+	branch le_update,zero
+	arg 0xf000,temp
+	isub temp,null
+	nbranch le_update,positive
+	rtn
+	
+
+le_check_retransmit:
+	fetcht 1,mem_le_arq
+	fetch 1,mem_le_rxbuf_data_header
+//	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 */
+	rtn
+
+
+le_acknowledge:
+	bpatch patch1d_4,mem_patch1d
+	call le_supervision_flush
+	rtnmark1 mark_ble_crc_fail
+	call le_check_wak
+	fetch 1,mem_le_rxbuf_data_header
+	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_data_length
+	branch le_ack_unenc,blank		/* empty packet, no decryption */
+	fetch 1,mem_le_state
+	bbit0 lestate_encryption,le_ack_unenc
+	fetcht 4,mem_le_peer_mic
+	fetch 4,mem_ccm_last_mic			
+	isub temp,null
+	branch assert,zero
+	storet 4,mem_ccm_last_mic
+	fetch 5,mem_ccm_pcnt_rx
+	increase 1,pdata
+	set1 LE_CCM_DIRECTIONBIT,pdata
+	store 5,mem_ccm_pcnt_rx
+	
+le_ack_unenc:
+	fetcht 1,mem_le_arq
+	setflip nesn,temp
+	storet 1,mem_le_arq
+	fetch 1,mem_le_configuration
+	rtnbit0 BIT_BLE_DEAL_BB_PACKET
+	bpatch patch1d_5,mem_patch1d
+	fetch 1,mem_le_rxbuf_data_length
+	rtn blank		//empty packet
+	fetch 1,mem_le_rxbuf_data_header
+	compare LLID_CONTINUE,pdata,3
+	branch le_parse_writing_attribute_continue,true //ACL-U continue
+	compare LLID_START,pdata,3
+	branch le_parse_writing_attribute_start,true
+	rtn
+
+	
+le_check_wak:
+	bpatch patch1d_6,mem_patch1d
+	fetcht 1,mem_le_arq
+	isolate0 wak,temp
+	rtn true
+	fetch 1,mem_le_rxbuf_data_header
+	lshift pdata,pdata
+	ixor temp,pdata
+	rtnbit0 sn			/* received NESN is same as SN, NAK */
+	set0 wak,temp
+	setflip sn,temp
+	storet 1,mem_le_arq
+	compare 3,temp,3
+	nrtn true
+	rtn
+	
+
+le_set_enc:
+	fetch 1,mem_le_state
+	set1 lestate_encryption,pdata
+	store 1,mem_le_state
+	set1 mark_ble_encryption,mark
+	rtn	
+	
+le_clear_enc:
+	bpatch patch1d_7,mem_patch1d
+	jam FLAG_LE_ENC_NULL,mem_le_enc_state
+	arg 0,pdata
+	store 4,mem_ccm_last_mic
+	store 5,mem_ccm_pcnt_tx
+	set1 LE_CCM_DIRECTIONBIT,pdata
+	store 5,mem_ccm_pcnt_rx
+	fetch 1,mem_le_state
+	set0 lestate_encryption,pdata
+	store 1,mem_le_state
+	set0 mark_ble_encryption,mark
+	rtn
+
+
+
+
+le_scan_check_sender_addr_type:
+	arg 1,rega// sender_addr_type
+	fetch 1,mem_le_rxbuf_adv_connect_ind_header
+	rtnbit1 LE_SENDER_ADDR_BIT
+	arg 0,rega
+	rtn
+
+
+le_get_master_rx_max:
+	copy contr,contw
+	fetcht 2,mem_remote_rx_max_octets
+	copy contw,contr
+	rtn
+
+
+le_prepare_tx:
+	bpatch patch1e_0,mem_patch1e
+	fetch 1,mem_le_arq
+	rtnbit1 wak
+	call le_check_tx_md
+	call le_fifo_get_first_tx_ptr	//no packet to send
+	branch le_send_empty,blank
+	ifetch 2,contr
+	ifetcht 2,contr
+	copy temp,rega
+	isub rega,pdata
+	call le_get_master_rx_max
+	call not_greater_than
+	copy pdata,temp
+	ifetchr type,1,contr
+	copy rega,pdata
+	iadd contr,pdata
+	store 2,mem_contr
+	call le_update_tx_type
+	call le_send_packet
+	
+	call le_fifo_get_first_tx_ptr
+	ifetch 2,contr
+	copy pdata,rega	//rega:total length
+	copy contr,regc
+	ifetcht 2,contr
+	copy temp,regb	//temp&regb is offset
+	isub regb,pdata
+	call le_get_master_rx_max
+	call not_greater_than
+	iadd regb,pdata
+	istore 2,regc
+	isub rega,null
+	nrtn zero
+	branch le_fifo_release_first_node
+
+	
+le_check_tx_md:
+	call le_check_continue
+	rtnmark1 mark_ble_tx_md
+	fetch 1,mem_le_configuration
+	bbit0 BIT_BLE_TRANSMIT_PACKET_BY_MD,le_clear_md
+	call le_fifo_get_second_tx_ptr	//no packet to send
+	branch le_clear_md,blank
+	branch le_set_md
+
+	
+le_check_continue:
+	call le_fifo_get_first_tx_ptr	//no packet to send
+	branch le_clear_md,blank
+	ifetch 2,contr				//pdata:length
+	ifetcht 2,contr				//temp:offest
+	isub temp,rega			//pdata:length - offset
+	call le_get_master_rx_max
+	copy temp,pdata
+	isub rega,null
+	branch le_clear_md,positive				//27 > length -offset
+le_set_md:
+	set1 mark_ble_tx_md,mark
+	rtn
+
+le_clear_md:
+	set0 mark_ble_tx_md,mark
+	rtn
+
+le_update_tx_type:
+	copy rega,pdata
+	rtn blank
+	arg LLID_CONTINUE,type
+	rtn
+
+
+le_att_check_notification_enable: // temp ->handle,output-> pdata,output :contr->rega
+	bpatch patch1e_1,mem_patch1e
+	increase 1,temp
+	call le_att_get_handle_ptr
+	increase -2,contr
+	ifetch 2,contr
+	arg CLIENT_CHARACTERTIC_CONFIGURATION,temp
+	isub temp,null
+	nrtn zero
+	increase 1,contr
+	copy contr,rega
+	ifetch 1,contr
+	rtn
+	
+
+le_send_empty:
+	force 0,temp
+	force 1,type
+	
+le_send_packet:
+	bpatch patch1e_2,mem_patch1e
+	storet 1,mem_le_txlen
+	fetcht 1,mem_le_arq
+	set1 wak,temp
+	and temp,0xfc,pdata
+	ior type,pdata
+	store 1,mem_le_arq
+	and_into 0x1f,pdata
+	isolate1 mark_ble_tx_md,mark
+	setflag true,md,pdata
+	store 1,mem_le_txheader
+
+	fetch 1,mem_le_txheader
+	compare 1,type,3
+	nbranch le_send_no_txlen,true
+	fetch 1,mem_le_txlen
+	rtn blank
+	
+le_send_no_txlen:	
+	bmark1 mark_ble_encryption,le_send_packet_enc
+	fetchr loopcnt,1,mem_le_txlen
+	fetch 2,mem_contr
+	copy pdata,contr
+	arg mem_le_txpayload,contw
+	branch memcpy_fast
+	
+le_send_packet_enc:
+	call load_sk
+	branch le_encrypt_new_start
+
+get_lpm_wake_ble_rx_lock:
+	arg wake_lock_ble_rx,queue
+	branch lpm_get_wake_lock
+
+put_lpm_wake_ble_rx_lock:
+	arg wake_lock_ble_rx,queue
+	branch lpm_put_wake_lock
+
+
+le_parse:
+	bpatch patch1e_3,mem_patch1e
+	rtnmark1 mark_old_packet
+	rtnmark1 mark_ble_crc_fail
+	fetch 1,mem_le_rxbuf_data_header
+	and pdata,0x3,pdata
+	store 1,mem_le_packet_llid
+	fetch 1,mem_le_rxbuf_data_length
+	rtn blank							//empty rtn
+	setarg mem_le_rxbuf_data_payload
+	store 2,mem_le_payload_ptr
+	bpatch patch1e_4,mem_patch1e
+	fetch 1,mem_le_packet_llid
+	beq LLID_LE_LL,le_parse_ll
+le_parse_l2cap:
+	call le_check_l2cap_complete
+	nbranch get_lpm_wake_ble_rx_lock,user
+	call put_lpm_wake_ble_rx_lock
+	setarg 0
+	store 2,mem_le_packet_len_recved
+	fetch 2,mem_le_payload_ptr
+	add pdata,2,contr	//l2cap length
+	bpatch patch1e_5,mem_patch1e
+	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
+
+
+le_check_l2cap_complete:
+	fetch 1,mem_le_packet_llid
+	beq LLID_START,le_check_l2cap_llid_start
+	beq LLID_CONTINUE,le_check_l2cap_llid_continue
+	rtn
+
+//input: pdata is CID number
+//output: 	if CID is legal ,enable user
+//		if ICD is illegal,disable user 
+le_check_l2cap_CID_legal:
+	call enable_user
+	arg LE_L2CAP_CID_ATT,temp
+	isub pdata,null
+	rtn zero
+	arg LE_L2CAP_CID_SIGNAL,temp
+	isub pdata,null
+	rtn zero
+	arg LE_L2CAP_CID_SMP,temp
+	isub pdata,null
+	rtn zero
+	branch disable_user
+
+	
+le_check_l2cap_llid_start:
+	fetch 2,mem_le_payload_ptr
+	copy pdata,contr
+	ifetch 2,contr
+	store 2,mem_le_l2cap_size
+	ifetch 2,contr			//CID
+	call le_check_l2cap_CID_legal
+	nrtn user		//CID error
+	fetcht 1,mem_le_rxbuf_data_length
+	storet 2,mem_le_packet_len_recved
+	fetch 2,mem_le_l2cap_size
+	increase 4,pdata		//CID:2 L2cap length 2
+	isub temp,null
+	branch enable_user,zero
+	fetchr loopcnt,1,mem_le_rxbuf_data_length
+	arg mem_le_l2cap_buf,contw
+	fetch 2,mem_le_payload_ptr
+	copy pdata,contr
+	call memcpy_fast
+	branch disable_user
+
+//no input
+//output: 	if CID is legal ,enable user
+//		if ICD is illegal,disable user 
+le_check_l2cap_continue_legal:
+	call enable_user
+	fetch 2,mem_le_packet_len_recved
+	nrtn blank
+	branch disable_user
+
+le_check_l2cap_llid_continue:
+	call le_check_l2cap_continue_legal
+	nrtn user		//check receive start packet
+	fetch 2,mem_le_packet_len_recved
+	arg mem_le_l2cap_buf,contw
+	iadd contw,rega
+	fetcht 1,mem_le_rxbuf_data_length
+	iadd temp,pdata
+	store 2,mem_le_packet_len_recved
+	fetchr loopcnt,1,mem_le_rxbuf_data_length
+	copy rega,contw
+	fetch 2,mem_le_payload_ptr
+	copy pdata,contr
+	call memcpy_fast
+	setarg mem_le_l2cap_buf
+	store 2,mem_le_payload_ptr		//update ptr->mem_le_l2capbuff
+	fetch 2,mem_le_l2cap_size
+	increase 4,pdata
+	fetcht 2,mem_le_packet_len_recved
+	isub temp,null
+	branch enable_user,zero
+	branch disable_user
+
+
+
+
+
+le_get_search_att_uuid:
+	call store_contr
+	arg mem_le_search_uuid_length,contw
+	branch le_get_search_common
+
+
+	/* rega pointers to data, regb is length */
+le_writeatt_cb:
+	fetch 2,mem_cb_att_write
+	branch callback_func
+	
+le_supervision_update:
+	bpatch patch1e_6,mem_patch1e
+	fetcht 4,mem_le_supervision_timer
+	call get_clkbt
+	isub temp,timeup					/* and to 28 bits */
+	deposit timeup
+	fetcht 2,mem_le_superto
+	lshift4 temp,temp
+	lshift temp,temp
+	isub temp,pdata
+	rtn
+	
+le_supervision_flush:
+	call get_clkbt
+	store 4,mem_le_supervision_timer
+	rtn
+
+	
+//input rega
+le_receive_window_size:
+	bpatch patch1e_7,mem_patch1e
+	add rega, coffset_le_peer_sca,contr
+	ifetch 1,contr
+	call le_sca_map
+	add rega, coffset_tsniff,contr
+	ifetch 2,contr
+	imul32 temp,pdata
+	fetcht 2,mem_param_rt_rthalfslot
+	imul32 temp,pdata
+	arg 1000000,temp
+	idiv temp
+	arg PARAM_WINDOWN_SIZE,temp
+	fetch 1,mem_system_clk
+	imul32 temp,temp
+	add rega, coffset_le_window_size,contr
+	ifetch 1,contr
+	imul32 temp,pdata
+	iadd temp,pdata
+	store 4,mem_le_transmit_window	
+	fetch 2,mem_rx_window_sniff
+	call wait_div_end
+	quotient temp
+	iadd temp,pdata
+	add rega, coffset_rx_window,contw
+	istore 2,contw
+	rtn
+
+	
+
+le_init_attlist_search:
+	bpatch patch1f_0,mem_patch1f
+	fetch 2,mem_le_search_handle_start
+	iforce regb
+	fetch 2,mem_le_search_handle_end
+	iforce regc
+	fetch 2,mem_ui_le_uuid_table
+	iforce contr
+	enable user
+	rtn
+
+	/* return handle in pdata, blank:end of list, positive:in range */
+le_att_handle_inrange:
+	ifetch 2,contr
+	and_into 0xff,pdata
+	rtn blank
+	isub regb,null			/* less than start ? */
+	nrtn positive
+	isub regc,null			/* greater than end ? */
+	rtn zero
+	branch le_att_handle_blank,positive
+	force 1,null
+	rtn
+le_att_handle_blank:
+	force 0,pdata
+	rtn
+
+
+	/* handle in temp, return pointer in contr to length, blank not found */
+le_att_get_handle_ptr:
+	call le_att_get_handle_ptr2
+	branch le_att_get_handle_ptr_found,zero
+	rtn
+	
+le_att_get_handle_ptr2:
+	bpatch patch1f_1,mem_patch1f
+	fetch 2,mem_ui_le_uuid_table
+	iforce contr
+le_att_get_handle_loop1:
+	ifetch 2,contr
+	and_into 0xff,pdata
+	rtn blank
+	isub temp,null
+	rtn zero
+	ifetch 1,contr
+	iadd contr,contr	
+	ifetch 1,contr			// length  
+	iadd contr,contr
+	branch le_att_get_handle_loop1
+le_att_get_handle_ptr_found:
+	ifetch 1,contr
+	iadd contr,contr	
+	rtn	
+
+
+
+le_att_get_short_uuid_ptr:
+	bpatch patch1f_2,mem_patch1f
+	fetch 2,mem_ui_le_uuid_table
+	iforce contr
+le_att_get_short_uuid_loop:
+	ifetch 2,contr
+	and_into 0xff,pdata
+	rtn blank
+	ifetch 1,contr
+	iadd contr,contr
+	increase -2,contr
+	ifetch 2,contr
+	isub temp,null
+	rtn zero
+	ifetch 1,contr			 
+	iadd contr,contr
+	branch le_att_get_short_uuid_loop	
+
+
+//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
+	and_into 0xff,pdata
+	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
+
+
+le_att_get_handle_info_from_ptr:
+	fetch 2, mem_le_cur_attlist_start_ptr
+	branch le_att_get_handle_info_fast
+
+le_att_get_handle_info:
+	bpatch patch1f_3,mem_patch1f
+	fetch 2,mem_ui_le_uuid_table
+le_att_get_handle_info_fast:
+	iforce contr
+le_att_get_handle_loop:
+	ifetch 2,contr
+	and_into 0xff,pdata
+	branch le_att_unfind_handle,blank
+	isub temp,null
+	branch le_att_finded_handle, zero
+	ifetch 1,contr			// length  
+	iadd contr,contr	
+	ifetch 1,contr			//length 
+	iadd contr,contr
+	branch le_att_get_handle_loop
+le_att_unfind_handle:
+	branch disable_blank
+
+le_att_finded_handle:
+	ifetch 1,contr
+	store 1,mem_le_cur_uuid_length
+	copy pdata,loopcnt
+	arg mem_le_cur_uuid,contw
+	call memcpy_fast
+	ifetch 1,contr
+	store 1,mem_le_curr_att_len
+	call store_contr
+	branch enable_blank
+
+	
+le_modified_name:
+	bpatch patch1f_4,mem_patch1f
+	call le_modified_name_att_list
+	branch le_modified_name_adv
+
+le_modified_name_att_list:
+	arg UUID_CHRCTR_DEVICE_NAME,temp
+	call le_att_get_short_uuid_ptr
+	rtn blank
+	ifetch 1,contr						// attribute length
+	copy contr,contw
+	fetcht 1,mem_le_name_len
+	copy temp,loopcnt
+	isub temp,null
+	nbranch le_name_length_longer_than_att,positive
+	isub temp,temp
+	arg mem_le_name,contr
+	call memcpy_fast
+	copy temp,loopcnt
+	ncall memcpy_empty,zero
+	rtn
+le_name_length_longer_than_att:
+	copy pdata,loopcnt
+	arg mem_le_name,contr
+	branch memcpy_fast
+
+
+le_modified_name_adv:
+	arg mem_le_adv_data_len+32,regc
+	arg mem_le_adv_data,rega
+	call le_modified_name_adv_and_scan
+	setarg 0
+	setflag user,0,pdata
+	store 1,mem_pdatatemp
+	arg mem_le_scan_data_len+32,regc
+	arg mem_le_scan_data,rega
+	call le_modified_name_adv_and_scan
+	rtn user
+	fetch 1,mem_pdatatemp
+	branch assert,blank
+	rtn
+
+
+le_modified_name_adv_and_scan:
+	bpatch patch1f_5,mem_patch1f
+	call enable_user
+	call clear_temp_block
+	arg 0,regb	//current length
+	arg mem_le_data_temp,contw
+	call le_modified_name_adv_loop
+	fetch 1,mem_le_name_len
+	add pdata,1,temp
+	iadd regb,rega	
+	increase 2,rega
+	sub rega,0x1f,null
+	nbranch le_modified_name_adv_and_scan_name_overflow,positive
+	istoret 1,contw		//store ble name length
+	arg GAP_ADTYPE_LOCAL_NAME_COMPLETE,temp
+	istoret 1,contw		//store ble name type
+	iforce loopcnt
+	call memcpy_fast
+	copy rega,regb
+le_modified_name_adv_and_scan_store_data:
+	deposit regb
+	store 1,mem_le_data_len_temp
+	arg mem_le_data_len_temp,contr
+	setarg -32
+	iadd regc,contw
+	branch memcpy32
+
+le_modified_name_adv_and_scan_name_overflow:
+	call disable_user
+	branch le_modified_name_adv_and_scan_store_data
+	
+le_modified_name_adv_loop:
+	ifetch 1,rega		//pdata:length
+	rtn blank			//length is zero,ending find
+	pincrease 1		//length += 1
+	ifetcht 1,contr		//pdata:type
+	sub temp,GAP_ADTYPE_LOCAL_NAME_COMPLETE,null
+	branch le_modified_name_adv_found_name,zero
+	iadd regb,regb	
+	copy rega,contr
+	iforce loopcnt
+	call memcpy_fast
+	copy contr,rega
+le_modified_name_adv_loop2:
+	deposit rega
+	isub regc,null
+	rtn positive
+	branch le_modified_name_adv_loop
+
+le_modified_name_adv_found_name:
+	iadd rega,rega
+	branch le_modified_name_adv_loop2
+
+
+memcpy_empty:
+	setarg SPACE
+	istore 1,contw
+	loop memcpy_empty
+	rtn
+
+	
+le_lpm_set_mult:
+	bpatch patch1f_6,mem_patch1f
+	disable wake
+	branch le_lpm_set_mult_attempt,attempt
+	nbranch le_lpm_lost,match
+le_lpm_set_mult_attempt:
+	call lpm_match
+	fetch 2,mem_rx_window_sniff
+	store 2,mem_le_receive_window
+	fetch 1,mem_le_configuration
+	bbit1 BIT_BLE_SHORT_MULT,lpm_mult_short	//check flag,if flag is 1,always short mult
+	bmark1 mark_old_packet,lpm_mult_short
+	fetch 1,mem_le_rxbuf_data_length
+	nbranch lpm_mult_short,blank		// rx not empty, short interval
+	fetch 1,mem_le_txlen
+	nbranch lpm_mult_short,blank		// tx not empty, short interval
+	
+	fetch 1,mem_le_state
+	bbit1 lestate_update_param,lpm_mult_short
+	bbit1 lestate_update_phy,lpm_mult_short
+	bbit1 lestate_update_map,lpm_mult_short
+	branch lpm_mult_wait_timeout
+	
+le_lpm_lost:
+	fetch 1,mem_sniff_unint_lost
+	sub pdata,30,null
+	nbranch lpm_lost,positive
+	fetcht 2,mem_rx_window_sniff
+	rshift temp,temp
+	fetch 2,mem_le_receive_window
+	iadd temp,pdata
+	store 2,mem_le_receive_window
+	branch lpm_lost
+
+///////////////////////////////BLE CONFIG//////////////////////////////////////////
+le_set_config_fixed_tk:
+	arg BIT_BLE_PASSKEY_FIXED_KEY,queue
+	branch le_set_config
+
+le_clr_config_fixed_tk:
+	arg BIT_BLE_PASSKEY_FIXED_KEY,queue
+	branch le_clr_config
+
+le_set_config_fixed_ltk:
+	arg BIT_BLE_PAIRING_FIXED_LTK,queue
+	branch le_set_config
+
+le_clr_config_fixed_ltk:
+	arg BIT_BLE_PAIRING_FIXED_LTK,queue
+	branch le_clr_config
+
+le_set_config_more_data:
+	arg BIT_BLE_TRANSMIT_PACKET_BY_MD,queue
+	branch le_set_config
+
+le_clr_config_more_data:
+	arg BIT_BLE_TRANSMIT_PACKET_BY_MD,queue
+	branch le_clr_config
+
+le_set_config_read_authentication:
+	arg BIT_BLE_READ_AUTH,queue
+	branch le_set_config
+
+le_clr_config_read_authentication:
+	arg BIT_BLE_READ_AUTH,queue
+	branch le_clr_config
+
+le_set_config_write_authentication:
+	arg BIT_BLE_WRITE_AUTH,queue
+	branch le_set_config
+
+le_clr_config_write_authentication:
+	arg BIT_BLE_WRITE_AUTH,queue
+	branch le_clr_config
+
+le_set_config_short_mult:
+	arg BIT_BLE_SHORT_MULT,queue
+	branch le_set_config
+
+le_clr_config_short_mult:
+	arg BIT_BLE_SHORT_MULT,queue
+	branch le_clr_config
+
+
+le_set_config:
+	fetch 1,mem_le_configuration
+	qset1 pdata
+	store 1,mem_le_configuration
+	rtn
+
+le_clr_config:
+	fetch 1,mem_le_configuration
+	qset0 pdata
+	store 1,mem_le_configuration
+	rtn
+
+le_set_fixed_ltk:
+	setarg 0x112233
+	store 3,mem_le_fixed_ltk
+	setarg 0x445566
+	istore 3,contw
+	setarg 0x778899
+	istore 3,contw
+	setarg 0x001122
+	istore 3,contw
+	setarg 0x334455
+	istore 3,contw
+	setarg 0x66
+	istore 1,contw
+	rtn
+
+
+le_set_justwork:
+	setarg 0x01000302
+	store 4,mem_le_pres
+	setarg 0x010010
+	store 3,mem_le_pres_max_keysize
+	jam 1,mem_le_pairing_mode
+	rtn
+
+/////////////////////////////////////////////////////////////////////////
+
+le_fifo_malloc_tx_empty:
+	arg 0,rega
+	arg LLID_EMPTY,type
+	branch le_fifo_malloc_tx
+
+
+//rega:len regb:ll opcode
+le_fifo_malloc_tx_ll:
+	bpatch patch1f_7,mem_patch1f
+	arg LLID_LE_LL,type
+	call le_fifo_malloc_tx
+	copy regb,pdata
+	istore 1,contw
+	rtn
+	
+
+//rega:len regb:cid
+le_fifo_malloc_tx_l2cap:
+	bpatchx patch20_0,mem_patch20
+	force LLID_START,type
+	increase 4,rega
+	call le_fifo_malloc_tx
+	increase -4,rega
+	copy rega,pdata
+	istore 2,contw
+	copy regb,pdata
+	istore 2,contw
+	rtn
+
+
+//rega:len type:llid
+le_fifo_malloc_tx:
+	bpatchx patch20_1,mem_patch20
+	increase 5,rega
+	call ble_l2cap_malloc
+	increase -5,rega
+	copy rega,pdata
+	istore 2,contw				//lengh
+	setarg 0
+	istore 2,contw				//offset
+	copy type,pdata
+	istore 1,contw				//LLID
+	rtn
+
+
+le_fifo_get_first_tx_ptr:
+	bpatchx patch20_2,mem_patch20
+	call l2cap_malloc_fifo_out
+	copy pdata,contr
+	rtn
+
+le_fifo_get_second_tx_ptr:
+	fetch 2,mem_tx_fifo2_ptr
+	rtn
+
+le_fifo_get_last_tx_ptr:
+	call le_fifo_get_last_tx_ptr0
+	copy pdata,contr
+	rtn
+
+
+le_fifo_get_last_tx_ptr0:
+	fetch 2,mem_tx_fifo3_ptr
+	rtn
+
+
+le_fifo_get_first_l2cap_ptr:
+	call le_fifo_get_first_tx_ptr
+	increase 5,contr
+	rtn
+
+le_fifo_get_first_att_ptr:
+	call le_fifo_get_first_tx_ptr
+	increase 9,contr
+	rtn
+
+le_fifo_get_last_att_ptr:
+	call le_fifo_get_last_tx_ptr
+	increase 9,contr
+	rtn
+
+le_fifo_get_last_l2cap_ptr:
+	call le_fifo_get_last_tx_ptr
+	increase 5,contr
+	rtn
+
+
+le_fifo_check_full:
+	branch l2cap_malloc_is_fifo_full
+
+
+le_fifo_check_nearly_full:
+	branch l2cap_malloc_is_fifo_nearly_full
+
+	
+le_fifo_check_empty:
+	branch l2cap_malloc_is_fifo_empty
+
+
+le_fifo_release_first_node:
+	branch l2cap_malloc_free
+
+
+/*
+	function name:le_set_dle (data packet length extension)
+	input:pdata is dle params
+	bit0~bit15 max rx octets
+	bit16~bit31 max rx time
+	bit32~bit47 max tx octets
+	bit48~bit63 max tx time
+*/
+le_set_dle:
+	store 8,mem_local_rx_max_octets
+	branch le_set_feature_data_packet_length_extension
+
+
+/*
+	function name:le_set_phys
+	input:temp is tx & rx phys
+	bit0~bit7 is tx phys
+	bit8~bit15 is rx phys
+*/
+le_set_phys:
+	and temp,0xff,rega
+	call le_set_tx_phy
+	rshift8 temp,rega
+//	branch le_set_rx_phy
+le_set_rx_phy:
+	storer rega,1,mem_le_rx_phys
+	branch le_set_phy_common
+
+le_set_tx_phy:
+	storer rega,1,mem_le_tx_phys
+le_set_phy_common:	
+	isolate1 BIT_LE_2M_PHY,rega
+	call le_set_feature_2M_phy,true
+	isolate1 BIT_LE_CODED_PHY,rega
+	call le_set_feature_coded_phy,true
+	rtn
+
+
+
+le_set_feature_2M_phy:
+	arg BIT_LL_FEATURE_LE_2M_PHY,queue
+	branch le_set_feature
+
+
+le_set_feature_coded_phy:
+	arg BIT_LL_FEATURE_LE_CODED_PHY,queue
+	branch le_set_feature
+
+le_set_feature_data_packet_length_extension:
+	arg BIT_LL_FEATURE_LE_DATA_PACKET_LENGTH_EXTENSION,queue
+//	branch le_set_feature
+le_set_feature:
+	fetch 8,mem_le_local_feature
+	qset1 pdata
+	store 8,mem_le_local_feature
+	rtn
+
+
+
Index: program/ble_protocol_stack/le_advertising.prog
===================================================================
--- /branch/usb/usb_public_base/program/ble_protocol_stack/le_advertising.prog	(revision 0)
+++ /branch/usb/usb_public_base/program/ble_protocol_stack/le_advertising.prog	(working copy)
@@ -0,0 +1,392 @@
+
+/*
+ble core spec advertising
+*/
+
+le_advertising_dispatch:
+	jam FUN_RX_LL_1M_PHY,mem_le_rx_phy
+	jam FUN_TX_LL_1M_PHY,mem_le_tx_phy
+	call le_enable
+	call le_scan
+	call le_adv
+	branch le_disable
+
+le_scan:
+	bpatchx patch20_3,mem_patch20
+	fetch 1,mem_le_scan_enable
+	rtnne LE_SCAN_ENABLE
+	arg le_scan_interval_timer,queue
+	call timer_check
+	nrtn blank
+	fetch 2,mem_le_scan_interval
+	fetcht 2,mem_le_scan_window
+	isub temp,pdata
+	arg le_scan_interval_timer,queue
+	call timer_init
+	disable master
+	call le_init_adv
+	call le_wait_adv
+	nrtn match
+	bpatchx patch20_4,mem_patch20
+	fetch 6,mem_le_rxbuf+2
+	store 6,mem_le_plap
+//	call le_scan_dongle
+
+	fetch 1,mem_le_adv_rcv
+	increase 1,pdata
+	store 1,mem_le_adv_rcv
+	call le_create_conn
+	rtn master
+	call le_send_scan_request
+	nrtn match
+	fetch 1,mem_le_scanrsp_rcv
+	increase 1,pdata
+	store 1,mem_le_scanrsp_rcv
+	fetch 9,mem_le_rxbuf+8
+	store 9,mem_temp_block0
+	rtn
+
+
+le_wait_adv:
+	bpatchx patch20_5,mem_patch20
+	call le_next_adv_channel
+	call le_receive_adv
+	fetch 1,mem_le_adv_waitcnt
+	increase 1,pdata
+	store 1,mem_le_adv_waitcnt
+	rtn
+
+
+le_create_conn:
+	bpatchx patch20_6,mem_patch20
+	fetch 1,mem_cmd_le_create_conn
+	rtnne hci_cmd_le_create_conn
+	fetch 6,mem_le_plap
+	fetcht 6,mem_le_conn_peer_addr
+	isub temp,null
+	nrtn zero
+	call context_new
+	nrtn zero
+	call le_connect_request
+	call le_init_master
+	jam 0,mem_hci_cmd
+	jam 0,mem_le_peer_sca
+	jam 0,mem_le_scan_enable
+	jam 0,mem_cmd_le_create_conn
+	branch context_save
+
+le_connect_request:
+	bpatchx patch20_7,mem_patch20
+	force -1,pdata
+	setsect 2,1
+	store 5,mem_le_channel_map
+	arg mem_le_state,rega	
+	call le_calc_channel_map	
+	force 4,loopcnt
+	arg mem_le_access,contw
+	call generate_random_loop
+	fetch 2,mem_le_timeout
+	store 2,mem_le_superto
+le_con_req_hop_retry:
+	random pdata
+	and_into 0xf,pdata
+	sub pdata,4,null
+	branch le_con_req_hop_retry,positive
+	store 1,mem_le_hop
+//	store 1,mem_tmp1
+	bpatchx patch21_0,mem_patch21
+	fetcht 2,mem_le_conn_interval
+	storet 2,mem_le_tsniff	
+	copy temp,regc			// tsniff in regc
+	add clkn_bt,7,pdata			// leave space for offset
+	idiv regc
+	call wait_div_end
+	remainder rega
+	isub rega,pdata
+	iadd regc,pdata
+	fetcht 2,mem_le_dsniff
+	iadd temp,pdata
+	store 4,mem_le_anchor
+	isub clkn_bt,rega
+	increase -6,rega			// window offset
+	arg 0x2205,regb			// length & CONN_REQ PDU
+	fetch 1,mem_le_conn_own_addr_type
+	nsetflag blank,LE_SENDER_ADDR_BIT,regb
+	fetch 1,mem_le_conn_peer_addr_type
+	nsetflag blank,LE_RECEIVER_ADDR_BIT,regb
+	copy regb,pdata
+	store 2,mem_le_txheader
+	fetch 6,mem_le_lap
+	istore 6,contw//own addr
+	fetch 6,mem_le_plap
+	istore 6,contw// peer addr
+	fetch 4,mem_le_access
+	istore 4,contw
+	random pdata
+	istore 2,contw				/* crc init */
+	random pdata
+	istore 1,contw
+	force 2,pdata				/* window size */	
+	istore 1,contw
+	rshift2 rega,pdata
+	istore 2,contw				/* window offset */
+	rshift2 regc,pdata			
+	istore 2,contw				/* conn Interval */
+	bpatchx patch21_1,mem_patch21
+	setarg 0					/* slave latency */
+	istore 2,contw
+	fetch 2,mem_le_timeout
+	istore 2,contw
+	fetch 5,mem_le_channel_map
+	istore 5,contw				/* channel map */
+	fetch 1,mem_le_hop
+	arg param_le_sca,temp
+	ior temp,pdata
+	istore 1,contw
+	call le_transmit_norx
+	setarg mem_le_txheader
+	add pdata,18,contr
+	ifetch 3,contr
+	store 3,mem_le_crcinit
+	rtn
+		
+
+le_adv:
+	jam 36,mem_le_ch_mapped
+	jam 0,mem_le_adv_channel_map_temp
+	call le_send_adv_protect_txbuf
+	call le_adv_loop
+	branch le_send_adv_recover_txbuf
+	
+le_adv_loop:
+	bpatchx patch21_2,mem_patch21
+	fetch 1,mem_le_adv_enable
+	rtn blank
+	arg le_adv_interval_timer,queue
+	call timer_check
+	nrtn blank
+	enable swfine
+	call le_init_adv
+	call le_next_adv_channel
+	call le_send_adv_ind
+	nbranch le_adv_not_match,match
+	fetch 1,mem_le_req_rcv
+	increase 1,pdata
+	store 1,mem_le_req_rcv
+	fetch 1,mem_le_rxbuf_adv_header
+	and pdata,0x0f,pdata
+	beq SCAN_REQ,le_send_scan_response
+	beq CONNECT_REQ,le_parse_connect_req
+le_adv_not_match:
+	bpatchx patch21_3,mem_patch21
+	fetch 1,mem_le_adv_channel_map_temp
+	fetcht 1,mem_le_adv_channel_map
+	isub temp,null
+	nbranch le_adv_loop,zero
+	random pdata 
+	arg 0x1ff,temp
+	iand temp,pdata
+	add pdata,250,pdata
+	call delay
+	arg le_adv_interval_timer,queue
+	fetch 2,mem_le_adv_interval
+	branch timer_init
+
+le_send_adv_protect_txbuf:
+	arg mem_le_tx_buf_temp,contw
+	arg mem_le_txheader,contr	
+	branch memcpy48
+	
+le_send_adv_recover_txbuf:
+	arg mem_le_tx_buf_temp,contr
+	arg mem_le_txheader,contw
+	branch memcpy48
+
+le_init_adv:
+	bpatchx patch21_4,mem_patch21
+	disable master
+le_adv_access:
+	setarg 0x8e89be
+	lshift8 pdata,pdata
+	or_into 0xd6,pdata
+	iforce access
+	setarg 0x555555
+	store 3,mem_le_crcinit
+	rtn
+
+
+
+le_send_adv_ind:
+	bpatchx patch21_5,mem_patch21
+	fetch 1,mem_le_adv_type
+	fetcht 1,mem_le_adv_own_addr_type
+	lshift4 temp,temp
+	lshift2 temp,temp
+	iadd temp,temp
+	storet 1,mem_le_txheader
+	beq ADV_DIRECT_IND,le_send_adv_direct_ind
+	fetcht 1,mem_le_adv_data_len
+	add temp,6,pdata
+	store 1,mem_le_txlen
+	fetch 6,mem_le_lap
+	store 6,mem_le_txpayload
+	copy temp,loopcnt
+	arg mem_le_adv_data,contr
+	call memcpy_fast
+	branch le_send_adv_transmit
+
+le_send_adv_direct_ind:
+	setarg 12
+	store 1,mem_le_txlen
+	fetch 6,mem_le_lap
+	store 6,mem_le_txpayload
+	fetch 6,mem_hci_plap
+	istore 6,contw
+le_send_adv_transmit:
+	bpatchx patch21_6,mem_patch21
+	fetch 1,mem_le_adv_transmit
+	increase 1,pdata
+	store 1,mem_le_adv_transmit
+	arg 1800,stop_watch
+	disable match
+	branch le_transmit_receive_sifs_without_change_mode
+
+
+le_send_scan_request:
+	bpatchx patch21_7,mem_patch21
+	fetch 1,mem_le_scan_type
+	rtnne LE_SCAN_TYPE_ACTIVE
+	fetch 1,mem_le_adv_transmit
+	increase 1,pdata
+	store 1,mem_le_adv_transmit
+	arg 0x0c03,temp// length + SCAN_REQ PDU
+	fetch 1,mem_le_scan_own_addr_type
+	nsetflag blank,LE_SENDER_ADDR_BIT,temp
+	copy rega,pdata
+	nsetflag blank,LE_RECEIVER_ADDR_BIT,temp	
+	storet 2,mem_le_txheader
+	fetch 6,mem_le_lap
+	istore 6,contw
+	fetch 6,mem_le_plap
+	istore 6,contw
+	branch le_transmit_receive_sifs_without_change_mode
+
+le_send_scan_response:
+	fetch 6,mem_le_rxbuf_adv_scan_req_adv_address
+	fetcht 6,mem_le_lap
+	isub temp,null
+	nrtn zero
+	arg SCAN_RSP,temp
+	fetch 1,mem_le_adv_own_addr_type
+	nsetflag blank,LE_SENDER_ADDR_BIT,temp
+	storet 1,mem_le_txheader
+	fetcht 1,mem_le_scan_data_len
+	add temp,6,pdata
+	store 1,mem_le_txlen
+	fetch 6,mem_le_lap
+	store 6,mem_le_txpayload
+	arg mem_le_scan_data,contr
+	copy temp,loopcnt
+	call memcpy_fast
+	call le_transmit_norx
+	branch le_adv_not_match
+
+le_parse_connect_req:
+	fetch 6,mem_le_rxbuf_adv_connect_ind_adv_address
+	fetcht 6,mem_le_lap
+	isub temp,null
+	nrtn zero
+	call le_scan_check_sender_addr_type
+	storer rega,1,mem_le_conn_peer_addr_type
+	fetch 6,mem_le_rxbuf_adv_connect_ind_init_address
+	store 6,mem_le_plap
+	fetch 8,mem_le_rxbuf_adv_connect_ind_access_address
+	store 8,mem_le_access 	// and crcinit & window size
+	fetcht 2,mem_le_rxbuf_adv_connect_ind_win_offset	// transmit offset
+	bpatchx patch22_0,mem_patch22
+	lshift2 temp,temp
+	fetch 2,mem_le_rxbuf_adv_connect_ind_interval	// connInterval
+	lshift2 pdata,pdata
+	store 2,mem_le_tsniff
+	store 4,mem_le_anchor
+	isub temp,pdata
+	add pdata,-2,clke_bt
+	fetch 9,mem_le_rxbuf_adv_connect_ind_latency
+	store 9,mem_le_slave_latency// and super to & channel map
+	fetch 1,mem_le_rxbuf_adv_connect_ind_hop_and_sca
+	and pdata,0x1f,temp
+	storet 1,mem_le_hop
+	rshift4 pdata,temp
+	rshift temp,temp
+	storet 1,mem_le_peer_sca
+	arg mem_le_state,rega
+	call le_receive_window_size
+	arg mem_le_state,rega	
+	call le_calc_channel_map
+	call le_init_slave
+	call context_new
+	nrtn zero
+	bpatchx patch22_1,mem_patch22
+	call calc_clke_offset
+	call le_l2cap_reset_signaling_identifier
+	jam BT_EVT_LE_CONNECTED,mem_fifo_temp
+	call ui_ipc_send_event
+	branch context_save
+
+
+le_next_adv_channel:
+	bpatchx patch22_2,mem_patch22
+	fetch 1,mem_le_ch_mapped
+	beq 37,le_next_adv_channel_curr_channel_37
+	beq 38,le_next_adv_channel_curr_channel_38
+	beq 39,le_next_adv_channel_curr_channel_39
+	branch le_next_adv_channel_curr_channel_39
+
+le_next_adv_channel_curr_channel_37:
+	fetcht 1,mem_le_adv_channel_map
+	isolate1 BIT_ADV_CHANNEL_MAP_38,temp		//check 38 channel enable
+	branch set_le_next_adv_channel_38,true
+	isolate1 BIT_ADV_CHANNEL_MAP_39,temp		//check 39 channel enable
+	branch set_le_next_adv_channel_39,true
+	branch set_le_next_adv_channel_37
+
+
+le_next_adv_channel_curr_channel_38:
+	fetcht 1,mem_le_adv_channel_map
+	isolate1 BIT_ADV_CHANNEL_MAP_39,temp		//check 39 channel enable
+	branch set_le_next_adv_channel_39,true
+	isolate1 BIT_ADV_CHANNEL_MAP_37,temp		//check 37 channel enable
+	branch set_le_next_adv_channel_37,true
+	branch set_le_next_adv_channel_38
+
+
+le_next_adv_channel_curr_channel_39:
+	fetcht 1,mem_le_adv_channel_map
+	isolate1 BIT_ADV_CHANNEL_MAP_37,temp		//check 37 channel enable
+	branch set_le_next_adv_channel_37,true
+	isolate1 BIT_ADV_CHANNEL_MAP_38,temp		//check 38 channel enable
+	branch set_le_next_adv_channel_38,true
+	branch set_le_next_adv_channel_39
+
+set_le_next_adv_channel_37:
+	jam 37,mem_le_ch_mapped
+	fetch 1,mem_le_adv_channel_map_temp
+	set1 BIT_ADV_CHANNEL_MAP_37,pdata
+	store 1,mem_le_adv_channel_map_temp
+	rtn
+
+set_le_next_adv_channel_38:
+	jam 38,mem_le_ch_mapped
+	fetch 1,mem_le_adv_channel_map_temp
+	set1 BIT_ADV_CHANNEL_MAP_38,pdata
+	store 1,mem_le_adv_channel_map_temp
+	rtn
+
+set_le_next_adv_channel_39:
+	jam 39,mem_le_ch_mapped
+	fetch 1,mem_le_adv_channel_map_temp
+	set1 BIT_ADV_CHANNEL_MAP_39,pdata
+	store 1,mem_le_adv_channel_map_temp
+	rtn
+
+
Index: program/ble_protocol_stack/le_l2cap_att.prog
===================================================================
--- /branch/usb/usb_public_base/program/ble_protocol_stack/le_l2cap_att.prog	(revision 0)
+++ /branch/usb/usb_public_base/program/ble_protocol_stack/le_l2cap_att.prog	(working copy)
@@ -0,0 +1,884 @@
+
+
+le_parse_att:
+	ifetch 3,contr
+	store 3,mem_le_att_opcode
+	beq ATTOP_EXCHANGE_MTU_REQUEST,le_parse_att_exchange_mtu_request
+	beq ATTOP_EXCHANGE_MTU_RESPONSE,le_parse_att_exchange_mtu_response
+	beq ATTOP_FIND_INFORMATION_REQUEST,le_parse_att_find_information_request
+	beq ATTOP_FIND_BY_TYPE_VALUE_REQUEST,le_parse_att_find_by_type_value_request
+	beq ATTOP_READ_BY_TYPE_REQUEST,le_parse_att_read_by_type_request
+	beq ATTOP_READ_REQUEST,le_parse_att_read_request
+	beq ATTOP_READ_BLOB_REQUEST,le_parse_att_read_blob_request
+	beq ATTOP_READ_BY_GROUP_TYPE_REQUEST,le_parse_att_read_by_group_type_request
+	beq ATTOP_WRITE_REQUEST,le_parse_att_write_request
+	beq ATTOP_PREPARE_WRITE_REQUEST,le_parse_att_prepare_write_request
+	beq ATTOP_EXECUTE_WRITE_REQUEST,le_parse_att_execute_write_request
+	beq ATTOP_HANDLE_VALUE_CONFIRMATION,le_parse_handle_value_confirmation
+	beq ATTOP_WRITE_COMMAND,le_parse_att_write_command
+	rtn
+
+
+le_send_att_exchange_mtu_requset:
+	force 3,rega
+	call le_fifo_malloc_tx_l2cap_gatt
+	setarg ATTOP_EXCHANGE_MTU_REQUEST
+	istore 1,contw
+	fetch 2,mem_le_local_mtu
+	istore 2,contw
+	rtn
+
+
+le_parse_att_exchange_mtu_request:
+	call le_parse_att_exchange_mtu_response
+le_send_att_exchange_mtu_response:
+	force 3,rega
+	call le_fifo_malloc_tx_l2cap_gatt
+	setarg ATTOP_EXCHANGE_MTU_RESPONSE
+	istore 1,contw
+	fetch 2,mem_le_local_mtu
+	istore 2,contw
+	rtn
+
+le_parse_att_exchange_mtu_response:
+	rshift8 pdata,pdata
+	store 2,mem_le_remote_mtu
+	rtn
+
+le_parse_att_find_information_request:
+	call le_get_search_handle_start_end_common
+	call enable_user
+	branch le_send_att_find_information_response
+	
+le_send_att_find_information_response:
+	arg 3,timeup
+	call le_init_attlist_search
+le_send_att_find_information_res_loop:
+	call le_att_handle_inrange
+	branch le_send_att_find_information_res_end,blank
+	nbranch le_send_att_find_information_res_next,positive
+	increase -2,contr
+	call store_contr
+	call get_contw
+	nbranch le_send_att_find_information_res_store_info,user
+	call push_stack_rega_b_c
+	call disable_user
+	storer timeup,4,mem_timeup
+	force 20,rega
+	call le_fifo_malloc_tx_l2cap_gatt
+	fetchr timeup,4,mem_timeup
+	call pop_stack_rega_b_c
+	setarg ATTOP_FIND_INFORMATION_RESPONSE
+	istore 1,contw
+	setarg UUID_SIZE_16BIT
+	istore 1,contw
+le_send_att_find_information_res_store_info:
+	call get_contr
+	ifetch 2,contr
+	and_into 0xff,pdata
+	istore 2,contw
+	ifetch 1,contr
+	copy pdata,loopcnt
+	call memcpy
+	call store_contw
+	increase -1,timeup
+	branch le_send_att_find_information_res_end,zero
+le_send_att_find_information_res_cont:
+	ifetch 1,contr
+	iadd contr,contr
+	branch le_send_att_find_information_res_loop
+le_send_att_find_information_res_next:
+	ifetch 1,contr
+	iadd contr,contr
+	branch le_send_att_find_information_res_cont
+le_send_att_find_information_res_end:
+	branch le_send_att_error_response_notfound,user
+	branch le_send_auto_len_by_mem
+
+
+le_parse_att_find_by_type_value_request:
+	call le_get_search_handle_start_end_common
+	ifetch 2,contr
+	store 2,mem_le_search_uuid
+	call store_contr
+	arg mem_le_search_att_type_length,contw
+	fetch 2,mem_le_l2cap_size
+	increase -7,pdata
+	call le_get_search_common2
+	branch le_send_att_find_by_type_value_response
+
+
+le_start_end_handle_check_1:
+	disable user
+	fetcht 2,mem_le_search_handle_start
+	fetch 2,mem_le_search_handle_end
+	isub temp,null
+	nbranch le_start_end_handle_check_1_fail,positive
+	deposit temp
+	rtnne 0
+le_start_end_handle_check_1_fail:
+	enable user
+	jam ATT_ERR_INVALID_HANDLE,mem_le_err_code
+	branch le_send_att_error_response
+
+
+le_send_att_find_by_type_value_response:
+	call le_start_end_handle_check_1
+	rtn user
+	fetcht 2,mem_le_search_uuid
+	setarg UUID_GATT_PRIMARY_SERVICE
+	isub temp,null
+	branch le_send_att_find_by_type_value_res_primary,zero
+	branch le_send_att_error_response_notfound
+	
+
+le_send_att_find_by_type_value_res_primary:
+	jam LE_FIND_BY_TYPE_VAL_RES_NOT_FOUND,mem_le_search_res
+	fetcht 2,mem_le_search_handle_start
+	storet 2,mem_temp
+	call le_att_get_handle_info
+	nbranch le_send_att_error_response_notfound,blank
+le_send_att_find_primary_search_loop:
+	fetcht 2,mem_temp
+	call le_att_get_handle_info
+	nbranch le_send_att_error_response_notfound2,blank	
+	copy contr,rega
+	fetch 1,mem_le_curr_att_len
+	copy pdata,loopcnt
+	fetcht 1,mem_le_search_att_type_length
+	isub temp,null
+	nbranch le_send_att_find_primary_search_loop1,zero
+	arg mem_le_search_att_type,regb
+	call string_compare
+
+	branch le_send_att_find_primary_search_end_start_handle_found,zero
+
+	fetch 2,mem_le_cur_uuid
+	fetcht 2,mem_le_search_uuid
+	isub temp,null
+	branch le_send_att_find_primary_search_end_ending_handle_found,zero
+le_send_att_find_primary_search_loop1:
+	fetch 2,mem_temp
+	increase 1,pdata
+	store 2,mem_temp
+	branch le_send_att_find_primary_search_loop
+
+le_send_att_error_response_notfound2:
+	fetch 1,mem_le_search_res
+	beq LE_FIND_BY_TYPE_VAL_RES_FOUND_STARTING_HANDLE,le_send_att_find_primary_search_end_ending_handle_found
+	branch le_send_att_error_response_notfound
+
+	
+le_send_att_find_primary_search_end_start_handle_found:
+	fetch 2,mem_le_cur_uuid
+	fetcht 2,mem_le_search_uuid
+	isub temp,null
+	nbranch  le_send_att_find_primary_search_loop1,zero
+	jam LE_FIND_BY_TYPE_VAL_RES_FOUND_STARTING_HANDLE,mem_le_search_res
+//	copy rega,temp
+	fetcht 2,mem_temp
+	storet 2,mem_le_cur_handle_start
+	branch le_send_att_find_primary_search_loop1
+
+le_send_att_find_primary_search_end_ending_handle_found:
+	fetch 1,mem_le_search_res
+	beq LE_FIND_BY_TYPE_VAL_RES_NOT_FOUND,le_send_att_find_primary_search_loop1
+	jam LE_FIND_BY_TYPE_VAL_RES_FOUND_ENDING_HANDLE,mem_le_search_res
+	fetcht 2,mem_temp
+	increase -1,temp
+	storet 2,mem_le_cur_handle_end
+	
+le_send_att_find_primary_search_end:
+	arg 5,rega
+	call le_fifo_malloc_tx_l2cap_gatt
+	setarg ATTOP_FIND_BY_TYPE_VALUE_RESPONSE
+	istore 1,contw
+	fetch 2,mem_le_cur_handle_start
+	istore 2,contw
+	fetch 2,mem_le_cur_handle_end
+	istore 2,contw
+	rtn
+
+
+
+le_parse_att_read_by_type_request:
+	call le_get_search_handle_start_end_common
+	call le_get_search_att_type
+	branch le_send_att_read_by_type_response
+	
+le_send_att_read_by_type_response:
+	fetcht 2,mem_le_search_handle_start
+	storet 2,mem_temp
+	call le_init_attlist_search
+	call le_att_get_handle_ptr2
+	increase -2,contr
+	copy contr,pdata
+	store 2,mem_le_cur_attlist_start_ptr
+
+	fetcht 2,mem_le_search_att_type
+	setarg UUID_CHRCTR_DEVICE_NAME
+	isub temp,null
+	branch le_send_att_read_by_type_res_device_name,zero
+	setarg UUID_GATT_CHARACTERISTIC
+	isub temp,null
+	nbranch le_send_att_read_by_type_res_not_characteristic,zero
+	arg 2,timeup
+le_send_att_read_by_type_response_loop:
+	call le_att_check_handle_end
+	nbranch le_send_att_read_by_type_response_end,positive
+	fetcht 2,mem_temp
+	call le_att_get_handle_info_from_ptr
+	nbranch le_send_att_read_by_type_response_end,blank
+	call le_att_same_type
+	nbranch le_send_att_read_by_type_response_next_handle,zero
+	nbranch le_send_att_read_by_type_res_found_next,user
+	disable user
+	arg 20,rega
+	call le_fifo_malloc_tx_l2cap_gatt
+	setarg ATTOP_READ_BY_TYPE_RESPONSE
+	istore 1,contw
+	copy contw,alarm
+	increase 1,contw
+	
+	call le_send_att_read_by_type_write_properties
+	call le_att_next_handle
+	call le_att_get_handle_info_from_ptr
+	call le_send_att_read_by_type_write_uuid
+	fetch 1,mem_le_cur_uuid_length
+	add pdata,5,rega
+	istorer rega,1,alarm
+	
+	sub rega,7,null
+	ncall enable_user2,zero
+	call disable_user2,zero
+ 	call le_get_search_max_mtu_data
+	idiv rega
+	call wait_div_end
+	quotient timeup
+	increase -1,timeup
+	branch le_send_att_read_by_type_response_end,zero
+le_send_att_read_by_type_response_next_handle:
+	call le_att_next_handle
+	branch le_send_att_read_by_type_response_loop
+le_send_att_read_by_type_response_end:
+	branch le_send_att_error_response_notfound,user
+	branch le_send_auto_len_by_mem
+
+le_send_att_read_by_type_res_found_next:
+	call le_store_att_record
+	call le_att_next_handle
+	call le_att_get_handle_info_from_ptr
+	call le_send_att_read_by_type_res_check_pair_length_type
+	nbranch le_send_att_read_by_type_response_end,blank
+
+	call get_contw
+	fetch 2,mem_temp
+	increase -1,pdata
+	istore 2,contw
+	call le_write_att_record_common
+	call le_send_att_read_by_type_write_uuid
+	increase -1,timeup
+	branch le_send_att_read_by_type_response_end,zero
+	branch le_send_att_read_by_type_response_next_handle
+
+	
+le_send_att_read_by_type_write_properties:
+	fetch 2,mem_temp
+	istore 2,contw
+	
+	fetch 1,mem_le_curr_att_len
+	copy pdata,loopcnt
+	call get_contr
+	call memcpy_fast
+	branch store_contw
+le_send_att_read_by_type_write_uuid:
+	call get_contw
+	fetch 2,mem_temp
+	istore 2,contw
+	call store_contw
+	fetch 1,mem_le_cur_uuid_length
+	copy pdata,loopcnt
+	call get_contw	
+	call get_contr
+	isub loopcnt,contr
+	increase -1,contr
+	call memcpy_fast
+	branch store_contw
+
+
+
+le_send_att_read_by_type_res_not_characteristic:
+	call le_att_get_short_uuid_ptr
+	branch le_send_att_error_response_notfound,blank
+	copy contr,regc
+	increase -5,contr // point to handle
+	ifetch 2,contr
+	store 2,mem_temp
+	arg 20,rega
+	call le_fifo_malloc_tx_l2cap_gatt
+	setarg ATTOP_READ_BY_TYPE_RESPONSE
+	istore 1,contw
+	ifetch 1,regc
+	copy pdata,loopcnt
+	increase 2,pdata
+	istore 1,contw
+	fetch 2,mem_temp
+	istore 2,contw
+	add regc,1,contr
+	call memcpy_fast
+	call store_contw
+	branch le_send_auto_len_by_mem
+
+	
+
+le_send_att_read_by_type_res_device_name:
+	arg UUID_CHRCTR_DEVICE_NAME,temp
+	call le_att_get_short_uuid_ptr
+	rtn blank
+	increase -5,contr // point to handle
+	ifetch 2,contr		
+	store 2,mem_temp
+	arg 20,rega
+	call le_fifo_malloc_tx_l2cap_gatt
+	setarg ATTOP_READ_BY_TYPE_RESPONSE
+	istore 1,contw
+	fetch 1,mem_le_name_len
+	copy pdata,loopcnt
+	increase 2,pdata
+	istore 1,contw
+	fetch 2,mem_temp
+	istore 2,contw
+	arg mem_le_name,contr
+	call memcpy_fast
+	call store_contw
+	branch le_send_auto_len_by_mem
+
+
+
+le_parse_att_read_request:
+	call le_check_encrypt_state
+	fetcht 2,mem_le_att_handle
+	fetch 1,mem_le_configuration
+	bbit1 BIT_BLE_READ_AUTH,le_send_att_read_response_check_auth
+
+//input:temp is handle
+le_send_att_read_response:
+	call le_att_get_handle_ptr2
+	nbranch le_send_att_error_response_notfound,zero
+	call le_send_att_read_response_check_handle,user
+	rtn user
+	call le_att_get_handle_ptr_found
+	increase -2,contr
+	ifetch 2,contr
+	arg UUID_CHRCTR_DEVICE_NAME,temp
+	isub temp,null
+	branch le_send_device_name,zero
+	ifetch 1,contr
+	sub pdata,22,null
+	branch le_send_att_read_response_less,positive
+	force 22,pdata
+le_send_att_read_response_less:
+	copy pdata,regc
+	call store_contr
+	add regc,1,rega
+	call le_fifo_malloc_tx_l2cap_gatt
+	setarg ATTOP_READ_RESPONSE
+	istore 1,contw
+	copy regc,loopcnt
+	call get_contr
+	branch memcpy
+
+le_send_device_name:
+	call store_contr
+	fetch 1,mem_le_name_len
+	add pdata,1,rega
+	call le_fifo_malloc_tx_l2cap_gatt
+	setarg ATTOP_READ_RESPONSE
+	istore 1,contw
+	fetch 1,mem_le_name_len
+	copy pdata,loopcnt
+	arg mem_le_name,contr
+	branch memcpy
+	
+	
+le_send_att_read_response_check_auth:
+	fetch 2,mem_le_pairing_handle
+	isub temp,null
+	nbranch le_send_att_read_response,zero
+	nbranch le_send_att_read_response,user
+le_send_att_read_response_error_insufficient_auth:
+	jam ATT_ERR_INSUFFICIENT_AUTHENTICATION,mem_le_err_code
+	branch le_send_att_error_response
+
+le_send_att_read_response_check_handle:
+	increase -2,contr
+	ifetch 2,contr
+	bbit1 BIT_OF_ATT_HANDLE_READ_AUTHENTICATED,le_send_att_read_response_error_insufficient_auth
+	branch disable_user
+
+le_parse_att_read_blob_request:
+	ifetch 2,contr
+	store 2,mem_le_att_offset
+le_send_att_read_blob_response:
+	arg 20,rega
+	call le_fifo_malloc_tx_l2cap_gatt
+	setarg ATTOP_READ_BLOB_RESPONSE
+	istore 1,contw
+	fetch 2,mem_le_att_offset
+	iforce rega
+	fetcht 2,mem_le_att_handle
+	call le_att_get_handle_ptr 
+	branch le_send_att_error_response_notfound,blank
+	ifetch 1,contr
+	isub rega,loopcnt
+	nbranch le_send_att_error_response_notfound,positive
+	sub loopcnt,22,null
+	branch le_send_att_read_blob_response_less,positive
+	force 22,loopcnt
+le_send_att_read_blob_response_less:
+	deposit rega
+	iadd contr,contr
+	call memcpy_fast
+	call store_contw
+	branch le_send_auto_len_by_mem
+
+
+//查询server
+le_parse_att_read_by_group_type_request:
+	call le_get_search_handle_start_end_common
+ 	call le_get_search_att_type
+	branch le_send_att_read_by_group_type_response
+
+
+//mem_le_search_att_type
+//mem_le_search_handle_start
+//mem_le_search_handle_end
+le_send_att_read_by_group_type_response:
+	arg 2,timeup
+	fetcht 2,mem_le_search_handle_start
+	storet 2,mem_temp
+	call le_att_get_handle_ptr2
+	increase -2,contr
+	copy contr,pdata
+	store 2,mem_le_cur_attlist_start_ptr
+le_send_att_read_by_group_type_response_loop:
+	call le_att_check_handle_end		//check current handle >= ending handle
+	nbranch le_send_att_read_by_group_type_end0,positive
+	fetcht 2,mem_temp
+	call le_att_get_handle_info_from_ptr	//get current handle info
+	nbranch le_send_att_read_by_group_type_end1,blank
+
+	call le_att_same_type				//compair attr group type
+	nbranch le_send_att_read_by_group_type_next_handle,zero
+	copy timeup,pdata
+	beq 0,le_send_att_read_by_group_type_end1	//loop count
+	nbranch le_send_att_read_by_group_type_store_write_record,user		//un first
+	disable user
+	//first att uuid
+	arg 20,rega
+	call le_fifo_malloc_tx_l2cap_gatt
+	setarg ATTOP_READ_BY_GROUP_TYPE_RESPONSE
+	istore 1,contw
+	fetch 1,mem_le_curr_att_len
+	add pdata,4,rega
+	istorer rega,1,contw
+	call store_contw
+	sub rega,6,null
+	ncall enable_user2,zero
+	call disable_user2,zero
+ 	call le_get_search_max_mtu_data
+	idiv rega
+	call wait_div_end
+	quotient timeup
+	branch le_send_att_read_by_group_type_store_record
+le_send_att_read_by_group_type_store_write_record:
+	call le_send_att_read_by_group_type_check_pair_length_type
+	nbranch le_send_att_read_by_group_type_end1,blank
+	fetch 2,mem_temp
+	increase -1,pdata
+	store 2,mem_le_cur_handle_end
+	call le_write_att_record
+le_send_att_read_by_group_type_store_record:
+	fetch 2,mem_temp
+	store 2,mem_le_cur_handle_start
+	call le_store_att_record
+	increase -1,timeup
+//	branch le_send_att_read_by_group_type_last_find,zero		
+le_send_att_read_by_group_type_next_handle:
+	call le_att_next_handle
+	branch le_send_att_read_by_group_type_response_loop
+
+le_send_att_read_by_type_res_check_pair_length_type:
+	fetch 1,mem_le_cur_uuid_length
+	branch le_send_att_read_by_group_type_check_pair_length_type+1
+
+//output:blank is same
+le_send_att_read_by_group_type_check_pair_length_type:
+	fetch 1,mem_le_curr_att_len
+	branch le_send_att_read_by_group_type_check_pair_length_type_16byte,user2
+	increase -2,pdata
+	rtn
+
+le_send_att_read_by_group_type_check_pair_length_type_16byte:
+	increase -16,pdata
+	rtn
+
+le_send_att_read_by_group_type_end0:	//> att handle end
+	fetch 2,mem_temp
+	store 2,mem_le_cur_handle_end
+	branch le_send_att_read_by_group_type_end_common
+le_send_att_read_by_group_type_end1:	//>att max list handle or diff len 
+	fetch 2,mem_temp
+	increase -1,pdata
+	store 2,mem_le_cur_handle_end
+	branch le_send_att_read_by_group_type_end_common
+le_send_att_read_by_group_type_end_common:
+	branch le_send_att_error_response_notfound,user
+	call le_write_att_record
+	branch le_send_auto_len_by_mem
+
+
+
+
+le_parse_att_write_request:
+	copy contr,rega
+	fetch 2,mem_le_l2cap_size
+	add pdata,-3,regb
+	call le_writeatt_cb
+le_send_att_write_response_check_auth:
+	bpatchx patch22_3,mem_patch22
+	call le_check_encrypt_state
+	fetcht 2,mem_le_att_handle
+	call le_att_get_handle_ptr2
+	nbranch le_send_att_write_response_error_invalid_handle,zero
+	call le_send_att_write_response_check_handle,user
+	rtn user
+
+	fetch 1,mem_le_configuration
+	bbit0 BIT_BLE_WRITE_AUTH,le_send_att_write_response
+
+	fetcht 2,mem_le_att_handle
+	fetch 2,mem_le_pairing_handle
+	isub temp,null
+	nbranch le_send_att_write_response,zero
+	call le_check_encrypt_state
+	nbranch le_send_att_write_response,user
+	branch le_send_att_read_response_error_insufficient_auth
+
+
+le_send_att_write_response:
+	force 1,rega
+	call le_fifo_malloc_tx_l2cap_gatt
+	setarg ATTOP_WRITE_RESPONSE
+	istore 1,contw
+	rtn
+
+le_send_att_write_response_check_handle:
+	increase -2,contr
+	ifetch 2,contr
+	bbit1 BIT_OF_ATT_HANDLE_WRITE_AUTHENTICATED,le_send_att_read_response_error_insufficient_auth
+	branch disable_user
+
+le_send_att_write_response_error_invalid_handle:
+	jam ATT_ERR_INVALID_HANDLE,mem_le_err_code
+	branch le_send_att_error_response
+
+
+le_check_encrypt_state:
+	bpatchx patch22_4,mem_patch22
+	call disable_user
+	fetch 1,mem_le_pairing_mode
+	rtneq LE_PAIRING_MODE_NONE
+	fetch 1,mem_context
+	rtnbit1 lestate_encryption
+	branch enable_user
+
+
+le_parse_att_prepare_write_request:
+	add contr,2,rega
+	fetch 2,mem_le_l2cap_size
+	add pdata,-5,regb
+	call le_writeatt_cb
+	branch le_send_att_prepare_write_response
+
+
+le_send_att_prepare_write_response:
+	fetch 2,mem_le_l2cap_size
+	copy pdata,rega
+	call le_fifo_malloc_tx_l2cap_gatt
+	setarg ATTOP_PREPARE_WRITE_RESPONSE
+	istore 1,contw
+	fetch 2,mem_le_att_handle
+	istore 2,contw
+	fetch 2,mem_le_l2cap_size
+	add pdata,-5,loopcnt	
+	fetch 2,mem_le_payload_ptr
+	add pdata,7,contr
+	ifetch 2,contr		//offset
+	istore 2,contw
+	branch memcpy_fast
+
+
+
+le_parse_att_execute_write_request:
+
+le_send_att_execute_write_response:
+	force 1,rega
+	call le_fifo_malloc_tx_l2cap_gatt
+	setarg ATTOP_EXECUTE_WRITE_RESPONSE
+	istore 1,contw
+	rtn
+
+le_parse_handle_value_confirmation:
+	fetch 1,mem_le_l2cap_att_states
+	set0 BLE_L2CAP_RECV_CONFIRMATION_PACKET,pdata
+	store 1,mem_le_l2cap_att_states
+	rtn
+
+le_parse_att_write_command:
+	copy contr,rega
+	fetch 2,mem_le_l2cap_size
+	add pdata,-3,regb
+	branch le_writeatt_cb
+
+
+
+//rga:len temp:handle;rgea,regb,regc already used
+le_att_malloc_tx_notify:
+	copy temp,regc
+	increase 3,rega
+	call le_fifo_malloc_tx_l2cap_gatt
+	increase -3,rega
+	setarg ATTOP_HANDLE_VALUE_NOTIFICATION
+	istore 1,contw
+	copy regc,temp
+	istoret 2,contw
+	rtn
+
+//rga:len temp:handle;rgea,regb,regc already used
+le_att_malloc_tx_indication:
+	fetch 1,mem_le_l2cap_att_states
+	set1 BLE_L2CAP_SEND_INDICATION_PACKET,pdata
+	store 1,mem_le_l2cap_att_states
+	copy temp,regc
+	increase 3,rega
+	call le_fifo_malloc_tx_l2cap_gatt
+	increase -3,rega
+	setarg ATTOP_HANDLE_VALUE_INDICATION
+	istore 1,contw
+	copy regc,temp
+	istoret 2,contw
+	rtn
+
+
+///////////////////////////ATT common function////////////////////////////////////
+
+le_send_att_error_response_notfound:	
+	bpatchx patch22_5,mem_patch22
+	jam ATT_ERR_ATTRIBUTE_NOT_FOUND,mem_le_err_code
+le_send_att_error_response:	
+	force 5,rega
+	call le_fifo_malloc_tx_l2cap_gatt
+	setarg ATTOP_ERROR_RESPONSE
+	istore 1,contw
+	fetch 1,mem_le_att_opcode
+	istore 1,contw
+	fetch 2,mem_le_att_handle
+	istore 2,contw
+	fetch 1,mem_le_err_code
+	istore 1,contw
+	rtn
+
+
+le_fifo_malloc_tx_l2cap_gatt:
+	bpatchx patch22_6,mem_patch22
+	force LE_L2CAP_CID_ATT,regb
+	branch le_fifo_malloc_tx_l2cap
+
+
+le_att_next_handle:
+	fetcht 2,mem_temp
+	increase 1,temp
+	storet 2,mem_temp
+	rtn
+
+le_att_check_handle_end:
+	fetcht 2,mem_temp
+	fetch 2,mem_le_search_handle_end
+	isub temp,null
+	rtn
+
+
+le_att_same_type:
+	bpatchx patch22_7,mem_patch22
+	fetcht 1,mem_le_search_att_type_length
+	arg mem_le_search_att_type,rega
+le_att_check_same_common:
+	fetch 1,mem_le_cur_uuid_length
+	copy pdata,loopcnt
+	isub temp,null
+	nrtn zero
+	arg mem_le_cur_uuid ,regb
+	branch string_compare
+
+le_att_same_uuid:
+	fetcht 1,mem_le_search_uuid_length
+	arg mem_le_search_uuid,rega
+	branch le_att_check_same_common
+
+
+le_store_att_record:
+	bpatchx patch23_0,mem_patch23
+	fetch 1,mem_le_curr_att_len
+	store 1, mem_temp_block0
+	copy pdata,loopcnt
+	call get_contr
+	branch memcpy_fast
+
+
+le_write_att_record:
+	bpatchx patch23_1,mem_patch23
+	call get_contw
+	fetch 2,mem_le_cur_handle_start
+	istore 2,contw
+	fetch 2,mem_le_cur_handle_end
+	istore 2,contw
+le_write_att_record_common:
+	fetch 1,mem_temp_block0
+	copy pdata,loopcnt
+	call memcpy_fast
+	branch store_contw
+
+
+
+le_send_auto_len_by_mem:
+	bpatchx patch23_2,mem_patch23
+	call get_contw
+	call le_fifo_get_last_att_ptr
+	copy contw,pdata
+	isub contr,rega
+	call le_fifo_get_last_l2cap_ptr
+	copy rega,pdata
+	istore 2,contr
+	increase 4,rega
+	call le_fifo_get_last_tx_ptr
+	copy rega,pdata
+	istore 1,contr
+	rtn
+
+
+le_get_search_handle_start_end_common:
+	rshift8 pdata,pdata
+	store 2,mem_le_search_handle_start
+	ifetch 2,contr
+	store 2,mem_le_search_handle_end
+	rtn
+
+le_get_search_max_mtu_data:
+	bpatchx patch23_3,mem_patch23
+	fetch 2,mem_le_remote_mtu
+	increase -2,pdata
+	//-2原因
+	//uint8_t attribute opcode
+	//uint8_t length
+	fetcht 2,mem_le_local_mtu
+	increase -2,temp
+	call not_greater_than
+	arg 240,temp
+	call not_greater_than
+	//pdata is max mtu size
+	rtn
+
+le_get_search_att_type:
+	bpatchx patch23_4,mem_patch23
+	call store_contr
+	arg mem_le_search_att_type_length,contw
+le_get_search_common:	
+	fetch 2,mem_le_l2cap_size
+	increase -5,pdata
+le_get_search_common2:		
+	istore 1,contw
+	copy pdata,loopcnt
+	call get_contr
+	branch memcpy_fast	
+
+
+
+le_parse_writing_attribute_start:
+	fetch 2,mem_le_rxbuf_data_att_cid//CID
+	rtnne LE_L2CAP_CID_ATT
+	fetch 1,mem_le_l2cap_att_states
+	set1 BLE_L2CAP_DEAL_WITH_CONTINUE_PACKET,pdata
+	store 1,mem_le_l2cap_att_states
+	fetch 3,mem_le_rxbuf_data_att_opcode
+	store 3,mem_le_att_opcode
+	set1 mark_old_packet,mark
+	beq ATTOP_WRITE_REQUEST,le_parse_attribute_write_request
+	beq ATTOP_WRITE_COMMAND,le_parse_attribute_write_command
+	beq ATTOP_EXECUTE_WRITE_REQUEST,le_parse_att_execute_write_request
+	beq ATTOP_EXCHANGE_MTU_REQUEST,le_parse_att_exchange_mtu_request
+	beq ATTOP_HANDLE_VALUE_CONFIRMATION,le_parse_handle_value_confirmation
+	set0 mark_old_packet,mark
+le_clear_l2cap_att_states_deal_with_contiune_packet:
+	fetch 1,mem_le_l2cap_att_states
+	set0 BLE_L2CAP_DEAL_WITH_CONTINUE_PACKET,pdata
+	store 1,mem_le_l2cap_att_states
+	rtn
+
+le_parse_writing_attribute_continue:
+	fetch 1,mem_le_l2cap_att_states
+	rtnbit0 BLE_L2CAP_DEAL_WITH_CONTINUE_PACKET
+	set1 mark_old_packet,mark
+	call le_parse_l2cap_continue_common
+	call le_parse_attribute_check_complete_packet
+	call le_clear_l2cap_att_states_deal_with_contiune_packet,user
+	fetch 1,mem_le_att_opcode
+	beq ATTOP_WRITE_REQUEST,le_send_att_write_response_check_auth
+	rtn
+
+
+le_parse_attribute_write_request:
+	call le_parse_attribute_write_command
+	branch le_send_attribute_write_response_check_auth
+
+le_send_attribute_write_response_check_auth:
+	call le_parse_attribute_check_complete_packet
+	nrtn user
+	branch le_send_att_write_response_check_auth
+
+
+le_parse_attribute_write_command:
+	bpatchx patch23_5,mem_patch23
+	call le_parse_attribute_check_complete_packet_init
+	arg mem_le_rxbuf_data_att_write_payload,rega
+	branch le_writeatt_cb
+
+
+le_parse_attribute_check_complete_packet_init:
+	fetch 1,mem_le_rxbuf_data_att_write_length
+	add pdata,-7,regb
+	increase -4,pdata
+	store 2,mem_le_packet_len_recved	//payload length
+	fetcht 2,mem_le_rxbuf_data_att_write_l2cap_length	//l2cap length
+	storet 2,mem_le_l2cap_size
+	rtn
+
+
+le_parse_l2cap_continue_common:
+	fetchr regb,1,mem_le_rxbuf_data_continue_length
+	fetch 2,mem_le_packet_len_recved
+	iadd regb,temp
+	storet 2,mem_le_packet_len_recved
+	arg mem_le_rxbuf_data_continue_payload,rega
+	branch le_writeatt_cb
+
+
+//enable user,recevie complete packet
+le_parse_attribute_check_complete_packet:
+	call disable_user
+	fetch 2,mem_le_packet_len_recved
+	fetcht 2,mem_le_l2cap_size
+	isub temp,null
+	nrtn zero
+	branch enable_user
+
Index: program/ble_protocol_stack/le_l2cap_att_wechat.prog
===================================================================
--- /branch/usb/usb_public_base/program/ble_protocol_stack/le_l2cap_att_wechat.prog	(revision 0)
+++ /branch/usb/usb_public_base/program/ble_protocol_stack/le_l2cap_att_wechat.prog	(working copy)
@@ -0,0 +1,276 @@
+
+ifdef COMPILE_WECHAT
+
+/*
+	function name:le_l2cap_att_receive_data_check_wechat_air_sync_protocol
+	依据微信蓝牙外设协议1.0.4
+	输入:
+		rega is le rx data address
+		regb is le rx data length
+		mem_le_att_handle is write handle
+	输出:
+		user enable 是微信协议
+		disable不是微信协议
+*/
+le_l2cap_att_receive_data_check_wechat_air_sync_protocol:
+	call enable_user
+	fetch 2,mem_le_wechat_air_sync_ptr
+	rtn blank
+	arg le_l2cap_att_receive_data_deal_wechat_air_sync_protocol,regc
+	branch wechat_air_sync_calc_function
+le_l2cap_att_receive_data_deal_wechat_air_sync_protocol:
+	fetcht 2,mem_le_att_handle
+	fetch 1,mem_wechat_indication_handle
+	pincrease 1
+	isub temp,null
+	branch wechat_air_sync_enable_indicate_chara,zero
+	fetch 1,mem_wechat_write_handle
+	isub temp,null
+	branch wechat_air_sync_receive_wechat_data,zero
+	branch disable_user
+	
+wechat_air_sync_enable_indicate_chara:
+	call wechat_air_sync_reset_nSeq
+wechat_air_sync_send_request_auth:
+	call wechat_air_sync_init_authreq_base_request
+	arg mem_wechat_authreq_base_request,rega
+	arg ECI_REQ_AUTH_MESSAGE_LENGTH,loopcnt
+	arg ECI_REQ_AUTH,temp
+	branch wechat_air_sync_send_message
+
+wechat_air_sync_receive_wechat_data:
+	fetch 1,mem_wechat_receive_push_data
+	beq 1,wechat_air_sync_receive_wechat_data_contiune_packet
+	ifetch 2,rega
+	arg WECHAT_RX_HEAD,temp
+	isub temp,null
+	branch wechat_air_sync_receive_wechat_data_head_packet,zero
+wechat_air_sync_receive_wechat_data_contiune_packet:
+	fetch 2,mem_wechat_rx_len
+	iadd regb,pdata
+	store 2,mem_wechat_rx_len	
+	fetch 2,mem_wechat_rx_address
+	copy pdata,contw
+	copy rega,contr
+	copy regb,loopcnt
+	call memcpy_fast
+	copy contw,pdata
+	store 2,mem_wechat_rx_address
+	branch wechat_air_sync_receive_wechat_packet_complete
+
+
+wechat_air_sync_receive_wechat_data_head_packet:
+	fetch 2,mem_wechat_rx_buffer_ptr
+	copy pdata,contw
+	copy rega,contr
+	copy regb,loopcnt
+	call memcpy_fast
+	copy contw,pdata
+	store 2,mem_wechat_rx_address
+	storer regb,2,mem_wechat_rx_len
+	fetchr regc,2,mem_wechat_rx_buffer_ptr
+	add regc,WECHAT_PROTOCOL_MESSAGE_N_CMD_ID,contr
+	ifetch 2,contr
+	arg ECI_PUSH_RECEIVE_DATA,temp
+	isub temp,null
+	call wechat_air_sync_receive_wechat_push_data,zero
+	branch wechat_air_sync_receive_wechat_packet_complete
+
+wechat_air_sync_receive_wechat_push_data:
+	jam 1,mem_wechat_receive_push_data
+	rtn
+
+wechat_air_sync_receive_wechat_packet_complete:
+	fetch 2,mem_wechat_rx_len
+	fetchr regc,2,mem_wechat_rx_buffer_ptr
+	add regc,WECHAT_PROTOCOL_MESSAGE_N_LENGTH,contr
+	ifetcht 2,contr
+	byteswap temp,temp
+	isub temp,null
+	nrtn positive
+	jam 0,mem_wechat_receive_push_data
+	fetchr regc,2,mem_wechat_rx_buffer_ptr
+	add regc,WECHAT_PROTOCOL_MESSAGE_N_CMD_ID,contr
+	ifetch 2,contr
+	arg ECI_RESPONSE_AUTH,temp
+	isub temp,null
+	branch wechat_air_sync_receive_wechat_data_auth_respone,zero
+	arg ECI_PUSH_RECEIVE_DATA,temp
+	isub temp,null
+	branch wechat_air_sync_receive_wechat_data_push_receive_data,zero
+	rtn
+
+wechat_air_sync_receive_wechat_data_auth_respone:
+wechat_air_sync_wechat_send_request_init:
+	call wechat_air_sync_init_authreq_base_request
+	arg mem_wechat_initreq_base_request,rega
+	arg ECI_REQ_INIT_MESSAGE_LENGTH,loopcnt
+	arg ECI_REQ_INIT,temp
+	branch wechat_air_sync_send_message
+
+
+//接收数据的回调，可以使用wechat_air_sync_check_push_data_struct解析函数
+wechat_air_sync_receive_wechat_data_push_receive_data:
+
+	fetch 2,mem_wechat_rx_push_data_cb
+	branch callback_func
+
+/*
+数据解析默认函数，不能保证全部数据格式都能解析
+输出:disable user is no data
+	loopcnt is data length
+	contr is data ptr
+*/
+wechat_air_sync_check_push_data_struct:
+	call disable_user
+	fetchr regc,2,mem_wechat_rx_buffer_ptr
+	add regc,WECHAT_PROTOCOL_MESSAGE_PAYLOAD,contr
+	ifetch 2,contr
+	rtnne TAG_RecvDataPush_BasePush
+	ifetch 1,contr
+	rtnne TAG_RecvDataPush_Data
+	ifetch 1,contr
+	rtn blank
+	copy pdata,loopcnt
+	copy contr,regc
+	branch enable_user
+
+
+wechat_air_sync_send_message:
+	call enable_user2
+wechat_air_sync_send_message_without_payload:
+	fetch 2,mem_wechat_tx_buffer_ptr
+	store 2,mem_wechat_tx_address
+	copy pdata,contw
+	setarg WECHAT_HEAD_MAGIC_NUMBER
+	istore 1,contw			//bMagicNumber
+	setarg WECAHT_HEAD_VERSION
+	istore 1,contw			//bVer
+	add loopcnt,8,regd	//nLength
+	byteswap regd,pdata
+	istore 2,contw			//nLength
+	istoret 2,contw			//nCmdId
+	fetcht 2,mem_wechat_tx_nSeq
+	istoret 2,contw			//Tx nSeq
+	copy contw,regc
+	copy rega,contr
+	call memcpy_fast,user2
+	storer regd,2,mem_wechat_tx_len
+	branch wechat_air_sync_update_nSeq
+	
+wechat_air_sync_update_nSeq:
+	byteswap temp,pdata
+	pincrease 1
+	byteswap pdata,pdata
+	nbranch wechat_air_sync_store_nSeq,blank
+wechat_air_sync_reset_nSeq:
+	setarg 0x0100
+wechat_air_sync_store_nSeq:
+	store 2,mem_wechat_tx_nSeq
+	rtn
+
+
+wechat_air_sync_init_authreq_base_request:
+	setarg 0x000a
+	store 2,mem_wechat_authreq_base_request
+	setarg 0x048084
+	lshift8 pdata,pdata
+	or pdata,0x18,pdata
+	store 4,mem_wechat_authreq_protocol_version
+	setarg 0x0120
+	store 2,mem_wechat_authreq_auth_protocol
+	setarg 0x0228
+	store 2,mem_wechat_authreq_eam_mac_no_encrypt
+	setarg 0x063a
+	store 2,mem_wechat_authreq_mac_address
+	fetch 6,mem_le_lap
+	call inverse_data_6Byte
+	store 6,mem_wechat_authreq_device_address
+	rtn
+
+wechat_air_sync_ble_transmit_wechat_message:
+	fetch 1,mem_le_l2cap_att_states
+	rtnbit1 BLE_L2CAP_RECV_CONFIRMATION_PACKET
+	call le_fifo_check_nearly_full
+	nrtn blank				//no fifo
+	fetch 2,mem_le_wechat_air_sync_ptr
+	rtn blank
+	arg wechat_air_sync_ble_send_wechat_message,regc
+	branch wechat_air_sync_calc_function
+
+wechat_air_sync_ble_send_wechat_message:
+	call module_get_le_remote_mtu
+	fetch 2,mem_wechat_tx_len
+	rtn blank
+	add temp,-3,pdata		//sub handle and opcode
+	fetcht 2,mem_wechat_tx_len
+	call not_greater_than
+	copy pdata,rega
+	copy temp,pdata
+	isub rega,pdata
+	store 2,mem_wechat_tx_len
+	fetcht 1,mem_wechat_indication_handle
+	call le_att_malloc_tx_indication
+	fetch 2,mem_wechat_tx_address
+	copy pdata,contr
+	copy rega,loopcnt
+	call memcpy_fast
+	copy contr,pdata
+	store 2,mem_wechat_tx_address
+	rtn
+
+
+wechat_air_sync_calc_function:
+	call wechat_air_sync_load_in_local_buffer
+	copy regc,pdata
+	call callback_func
+	branch wechat_air_sync_store_in_global_buffer
+
+
+wechat_air_sync_load_in_local_buffer:
+	fetch 2,mem_le_wechat_air_sync_ptr
+	rtn blank
+	copy pdata,contr
+	arg WECHAT_AIR_SYNC_STRUCT_SIZE,loopcnt
+	arg mem_wechat_indication_handle,contw
+	branch memcpy_fast
+
+wechat_air_sync_store_in_global_buffer:
+	fetch 2,mem_le_wechat_air_sync_ptr
+	rtn blank
+	copy pdata,contw
+	arg WECHAT_AIR_SYNC_STRUCT_SIZE,loopcnt
+	arg mem_wechat_indication_handle,contr
+	branch memcpy_fast
+
+
+//input:rega is data ptr
+//regb is data length
+wechat_air_sync_send_wechat_packet:
+	call enable_user
+	fetch 2,mem_le_wechat_air_sync_ptr
+	rtn blank
+	arg wechat_air_sync_send_wechat_packet_cb,regc
+	branch wechat_air_sync_calc_function
+
+wechat_air_sync_send_wechat_packet_cb:
+	fetch 2,mem_wechat_tx_len
+	nrtn blank
+	call disable_user
+	call disable_user2
+	add regb,6,loopcnt
+	arg ECI_REQ_SEND_DATA,temp
+	call wechat_air_sync_send_message_without_payload
+	copy regc,contw
+	setarg 0x12000a
+	istore 3,contw
+	istorer regb,1,contw
+	copy rega,contr
+	copy regb,loopcnt
+	call memcpy_fast
+	setarg 0x0018
+	istore 2,contw
+	rtn
+
+endif
+
Index: program/ble_protocol_stack/le_l2cap_signalling.prog
===================================================================
--- /branch/usb/usb_public_base/program/ble_protocol_stack/le_l2cap_signalling.prog	(revision 0)
+++ /branch/usb/usb_public_base/program/ble_protocol_stack/le_l2cap_signalling.prog	(working copy)
@@ -0,0 +1,54 @@
+
+
+le_parse_signaling:
+	ifetch 1,contr
+	ifetcht 1,contr //id
+	ifetcht 2,contr //length
+	beq L2CAP_CONNECTION_PARAMETER_UPDATE_RESPONSE,le_l2cap_parse_conn_parameter_update_rsp
+	rtn
+le_l2cap_parse_conn_parameter_update_rsp:
+	ifetch 2,contr	//result
+	store 2,mem_le_l2cap_signaling_conn_param_update_rsp_result
+	jam BT_EVT_LE_PARSE_CONN_PAPA_UPDATE_RSP,mem_fifo_temp
+	branch ui_ipc_send_event
+
+
+//mem_le_interval_min:the ptr that connection parameter,
+//include 	ConnIntervalMin,ConnIntervalMax,
+//		ConnSlaveLatency,ConnSupervisionTimeout
+le_l2cap_tx_update_req:
+	arg 0x0c,rega
+	arg L2CAP_CONNECTION_PARAMETER_UPDATE_REQUEST,regc
+	call le_fifo_malloc_tx_l2cap_signaling
+	setarg 0x08
+	istore 2,contw
+	fetch 8,mem_le_interval_min
+	istore 8,contw
+	rtn
+
+
+//rega:len regc:signaling opcode
+le_fifo_malloc_tx_l2cap_signaling:
+	call le_l2cap_update_signaling_identifier
+	arg LE_L2CAP_CID_SIGNAL,regb
+	call le_fifo_malloc_tx_l2cap
+	copy regc,pdata
+	istore 1,contw
+	fetch 1,mem_le_signaling_identifier
+	istore 1,contw
+	rtn
+
+
+le_l2cap_update_signaling_identifier:
+	fetch 1,mem_le_signaling_identifier
+	//beq 0xff,le_l2cap_signaling_identifier_set_1
+	pincrease 1
+	store 1,mem_le_signaling_identifier
+	rtnne 0
+	
+le_l2cap_reset_signaling_identifier:
+	jam 1,mem_le_signaling_identifier
+	rtn
+
+
+
Index: program/ble_protocol_stack/le_l2cap_smp.prog
===================================================================
--- /branch/usb/usb_public_base/program/ble_protocol_stack/le_l2cap_smp.prog	(revision 0)
+++ /branch/usb/usb_public_base/program/ble_protocol_stack/le_l2cap_smp.prog	(working copy)
@@ -0,0 +1,612 @@
+
+le_pairing_mode_init:
+	fetch  1,mem_le_pairing_mode
+	beq LE_PAIRING_MODE_NONE, le_set_no_pairing
+	beq LE_PAIRING_MODE_LAGACY_JUSTWORK,le_set_pairing_mode_lagacy_just_work
+	beq LE_PAIRING_MODE_LAGACY_PASSKEY,le_set_pairing_mode_lagacy_passkey
+ifdef SECURE_CONNECTION				
+	beq LE_PAIRING_MODE_SECURE_CONNECT_JUSTWORK,le_set_pairing_mode_secure_justwork
+	beq LE_PAIRING_MODE_SECURE_CONNECT_NUMERIC,le_set_pairing_mode_secure_numeric
+	beq LE_PAIRING_MODE_SECURE_CONNECT_PASSKEY,le_set_pairing_mode_secure_passkey
+endif
+	rtn
+	
+ifdef SECURE_CONNECTION				
+le_set_pairing_mode_secure_justwork:
+	jam FLAG_LE_BONDING_MITM_SECURE,mem_le_pres_auth
+	branch le_set_noinputnooutput
+le_set_pairing_mode_secure_numeric:
+	jam FLAG_LE_BONDING_MITM_SECURE,mem_le_pres_auth
+	jam FLAG_IOCAP_DISPLAYYESNO,mem_le_pres_iocap
+	rtn
+le_set_pairing_mode_secure_passkey:	
+	jam FLAG_LE_BONDING_MITM_SECURE,mem_le_pres_auth
+	branch le_set_displayonly
+endif
+
+le_set_no_pairing:
+	jam FLAG_LE_NO_BONDING_NO_MITM,mem_le_pres_auth
+le_set_noinputnooutput:	
+	jam FLAG_IOCAP_NOINPUTNOOUTPUT,mem_le_pres_iocap
+	rtn
+le_set_pairing_mode_lagacy_just_work:
+	jam FLAG_LE_BONDING_MITM,mem_le_pres_auth
+	branch le_set_noinputnooutput
+le_set_pairing_mode_lagacy_passkey:
+	jam FLAG_LE_BONDING_MITM,mem_le_pres_auth
+le_set_displayonly:	
+	jam FLAG_IOCAP_DISPLAYONLY,mem_le_pres_iocap
+	rtn
+
+ifdef SECURE_CONNECTION			
+le_secure_connection_enable:
+	fetch 1,mem_secure_connections_enable
+	set1 SECURE_CONNECTIONS_LE_BIT,pdata
+	store 1,mem_secure_connections_enable
+	rtn
+	
+le_secure_connection_disable:
+	fetch 1,mem_secure_connections_enable
+	set0 SECURE_CONNECTIONS_LE_BIT,pdata
+	store 1,mem_secure_connections_enable
+	rtn
+endif
+
+le_parse_smp:
+	ifetch 1,contr
+	beq SMP_PAIRING_REQUEST,le_parse_smp_pairing_request
+//	beq SMP_PAIRING_RESPONSE,le_parse_smp_pairing_response
+	beq SMP_PAIRING_CONFIRM,le_parse_smp_pairing_confirm
+	beq SMP_PAIRING_RANDOM,le_parse_smp_pairing_random
+	beq SMP_PAIRING_FAILED,le_parse_smp_pairing_failed
+//	beq SMP_ENCRYPTION_INFORMATION,le_parse_smp_encryption_information
+	beq SMP_MASTER_IDENTIFICATION,le_parse_smp_master_identification
+	beq SMP_IDENTITY_INFORMATION,le_parse_smp_identity_information
+	beq SMP_IDENTITY_ADDRESS_INFORMATION,le_parse_smp_identity_address_information
+	beq SMP_SIGNING_INFORMATION,le_parse_smp_signing_information
+	beq SMP_SECURITY_REQUEST,le_parse_smp_security_request
+ifdef SECURE_CONNECTION			
+	beq SMP_PAIRING_PUBLIC_KEY,le_parse_smp_public_key
+	beq SMP_PAIRING_DHKEY_CHECK,le_parse_smp_dhkey_check
+endif 	
+	rtn
+
+
+
+le_send_smp_security_request:
+	force 2,rega
+	call le_fifo_malloc_tx_l2cap_smp
+	setarg SMP_SECURITY_REQUEST
+	istore 1,contw
+	fetch 1,mem_le_pres_auth
+	istore 1,contw
+	rtn
+		
+le_parse_smp_pairing_request:
+	store 1,mem_le_preq
+	ifetch 6,contr
+	istore 6,contw
+	fetch 1,mem_le_pairing_mode
+	beq  LE_PAIRING_MODE_NONE,le_smp_pairing_fail_reason_not_support_pairing
+	call le_send_smp_pairing_response
+ifdef 	SECURE_CONNECTION
+	fetch 1,mem_sc_only_mode
+	branch le_parse_smp_pairing_request2, blank
+	fetch 1,mem_le_preq_auth
+	bbit0  LE_AUTH_SECURE_CONNECTION_PAIRING_BIT,app_ble_disconnect
+	fetch 1,mem_le_pairing_mode
+	bbit0 LE_PAIRING_MODE_SECURE_CONNECT_BIT,app_ble_disconnect
+endif	
+le_parse_smp_pairing_request2:	
+	jam FLAG_LE_PAIRING_RCV_PAIRING_REQ,mem_le_pairing_state
+	fetch 1,mem_le_preq_iocap
+	beq  FLAG_IOCAP_DISPlAYONLY,le_set_tk_0
+	beq  FLAG_IOCAP_DISPLAYYESNO,le_set_tk_0
+	beq  FLAG_IOCAP_NOINPUTNOOUTPUT,le_set_tk_0
+	fetch 1,mem_le_pairing_mode	
+	beq LE_PAIRING_MODE_LAGACY_PASSKEY,le_parse_smp_pairing_req_passkey
+	rtneq LE_PAIRING_MODE_SECURE_CONNECT_PASSKEY
+le_set_tk_0:
+	arg 0,pdata
+	store 4,mem_le_tk
+	rtn
+
+le_parse_smp_pairing_req_passkey:
+	fetch 1,mem_le_configuration
+	bbit1 BIT_BLE_PASSKEY_FIXED_KEY,le_parse_smp_pairing_req_fixed_passkey
+le_genernate_tk:
+	arg mem_le_tk,rega
+	copy rega,contw
+	arg 3,loopcnt
+	call generate_random_loop
+	fetch 2,mem_le_tk + 2
+	and_into 0x7,pdata
+	store 2,mem_le_tk + 2
+le_parse_smp_pairing_req_fixed_passkey:
+	jam BT_EVT_LE_TK_GENERATE,mem_fifo_temp
+	branch ui_ipc_send_event
+
+
+
+le_send_smp_pairing_response:
+	force 7,rega
+	call le_fifo_malloc_tx_l2cap_smp
+	fetch 7,mem_le_pres
+	istore 7,contw
+	rtn
+		
+
+le_parse_smp_pairing_confirm:
+	jam FLAG_LE_PAIRING_RECEIVE_PAIRING_CONFIRM,mem_le_pairing_state
+	arg mem_le_rconfirm,contw
+	call memcpy16
+	fetch 1,mem_le_pairing_mode
+	beq LE_PAIRING_MODE_LAGACY_PASSKEY_RES_INPUT,le_parse_smp_pairing_confirm_passkey_res_input
+ifdef SECURE_CONNECTION				
+	beq LE_PAIRING_MODE_SECURE_CONNECT_PASSKEY,le_parse_smp_pairing_confirm_secure_passkey
+	beq LE_PAIRING_MODE_SECURE_CONNECT_PASSKEY_RES_INPUT,le_parse_smp_pairing_confirm_sc_passkey_res_input
+endif
+	branch le_send_smp_pairing_confirm
+
+	
+le_parse_smp_pairing_confirm_passkey_res_input:
+	jam BT_EVT_LE_GET_PASSKEY,mem_fifo_temp
+	branch ui_ipc_send_event
+	
+ifdef SECURE_CONNECTION				
+le_parse_smp_pairing_confirm_secure_passkey:
+	jam LE_SP_FLAG_COMMIT_256,mem_le_secure_connect_flag
+	jam LE_SC_STAT_PASSKEY_WAIT_CONFIRM,mem_le_secure_connect_state	
+	rtn
+
+le_parse_smp_pairing_confirm_sc_passkey_res_input:
+	fetch 4,mem_le_tk
+	branch le_parse_smp_pairing_confirm_passkey_res_input,blank
+	branch le_parse_smp_pairing_confirm_secure_passkey
+endif
+
+le_send_smp_pairing_confirm:
+	jam FLAG_LE_PAIRING_SEND_PAIRING_CONFIRM,mem_le_pairing_state
+ifdef SECURE_CONNECTION				
+	fetch 1,mem_le_pairing_mode
+	bbit1 LE_PAIRING_MODE_SECURE_CONNECT_BIT,le_send_smp_pairing_confirm_sc
+endif 
+	call generate_confirm
+	force 17,rega
+	call le_fifo_malloc_tx_l2cap_smp
+	setarg SMP_PAIRING_CONFIRM
+	istore 1,contw
+	branch  store_aes_result
+
+ifdef SECURE_CONNECTION					
+le_send_smp_pairing_confirm_sc:
+	arg mem_le_srand,contw	
+	call generate_random
+	call function_f4_cb
+	force 17,rega
+	call le_fifo_malloc_tx_l2cap_smp
+	setarg SMP_PAIRING_CONFIRM
+	istore 1,contw
+	branch  load_inverse_result
+endif
+	
+le_parse_smp_pairing_random:	
+	copy contr,rega
+ifdef SECURE_CONNECTION				
+	fetch 1,mem_le_pairing_mode
+	bbit1 LE_PAIRING_MODE_SECURE_CONNECT_BIT,le_parse_smp_pairing_random_sc
+endif
+	copy rega,contr
+	call authenticate_rconfirm
+	branch le_parse_smp_pairing_random_success,zero
+le_send_pairing_confirm_value_failed:
+	jam PAIRING_FAILED_CONFIRM_VALUE_FAILED,mem_le_ll_pairing_fail_reason
+le_send_pairing_failed:
+	force 2,rega
+	call le_fifo_malloc_tx_l2cap_smp
+	setarg SMP_PAIRING_FAILED
+	istore 1,contw
+	fetch 1,mem_le_ll_pairing_fail_reason
+	istore 1,contw	
+le_parse_smp_pairing_failed:
+	bpatchx patch23_6,mem_patch23
+	force smp_pairing_timer,queue
+	call timer_stop
+	jam FLAG_LE_PAIRING_NULL,mem_le_pairing_state
+	jam BT_EVT_LE_PAIRING_FAIL,mem_fifo_temp
+	branch ui_ipc_send_event
+
+le_smp_pairing_fail_reason_not_support_pairing:
+	jam PAIRING_FAILED_PAIRING_NOT_SUPPORTED,mem_le_ll_pairing_fail_reason
+	branch le_send_pairing_failed
+	
+ifdef SECURE_CONNECTION				
+le_parse_smp_pairing_random_sc:
+	arg mem_le_mrand,contw
+	copy rega,contr
+	call memcpy16	
+	fetch 1,mem_le_pairing_mode
+	beq LE_PAIRING_MODE_SECURE_CONNECT_PASSKEY,le_parse_smp_pairing_random_sc_passkey
+	beq LE_PAIRING_MODE_SECURE_CONNECT_PASSKEY_RES_INPUT,le_parse_smp_pairing_random_sc_passkey
+	call function_g2
+	call le_send_smp_pairing_random
+	fetch 1,mem_le_pairing_mode
+	rtnne LE_PAIRING_MODE_SECURE_CONNECT_NUMERIC
+	jam BT_EVT_LE_GKEY_GENERATE,mem_fifo_temp
+	branch ui_ipc_send_event	
+	
+le_parse_smp_pairing_random_sc_passkey:
+	call function_f4_ca
+	arg mem_AES_CMAC_temp,contw
+	call load_inverse_result	
+	arg mem_AES_CMAC_temp,rega
+	arg mem_le_rconfirm ,regb
+	arg 16,loopcnt
+	call string_compare
+	nbranch le_send_pairing_confirm_value_failed,zero
+	branch le_send_smp_pairing_random
+endif 
+
+le_parse_smp_pairing_random_success:
+	call generate_stk
+	jam BT_EVT_LE_PAIRING_SUCCESS,mem_fifo_temp
+	call ui_ipc_send_event
+	jam 1,mem_ltk_exists
+	jam FLAG_LE_PAIRING_AFTER_AUTH,mem_le_pairing_state
+	
+le_send_smp_pairing_random:
+	force 17,rega
+	call le_fifo_malloc_tx_l2cap_smp
+	setarg SMP_PAIRING_RANDOM
+	istore 1,contw
+	arg mem_le_srand,contr
+	branch memcpy16
+
+le_send_smp_encryption_information:
+	force 17,rega
+	call le_fifo_malloc_tx_l2cap_smp
+	setarg SMP_ENCRYPTION_INFORMATION
+	istore 1,contw
+	fetch 1,mem_le_configuration
+	bbit1 BIT_BLE_PAIRING_FIXED_LTK,le_send_fixed_ltk
+	arg mem_le_ltk,contr
+	branch memcpy16
+
+le_send_fixed_ltk:
+	arg mem_le_fixed_ltk,contr
+	branch memcpy16
+
+
+le_send_smp_master_identification:
+	arg mem_le_ediv,contw
+	force 10,loopcnt
+	call generate_random_loop
+	force 11,rega
+	call le_fifo_malloc_tx_l2cap_smp
+	setarg SMP_MASTER_IDENTIFICATION
+	istore 1,contw
+	fetch 2,mem_le_ediv
+	istore 2,contw
+	fetch 8,mem_le_rand
+	istore 8,contw
+	rtn
+
+le_send_smp_identity_information:
+	force 17,rega
+	call le_fifo_malloc_tx_l2cap_smp
+	setarg SMP_IDENTITY_INFORMATION
+	istore 1,contw
+	setarg 0
+	istore 8,contw
+	istore 8,contw
+	rtn
+	
+
+le_send_smp_identity_address_information:
+	force 8,rega
+	call le_fifo_malloc_tx_l2cap_smp
+	setarg SMP_IDENTITY_ADDRESS_INFORMATION
+	istore 1,contw
+	fetch 1,mem_le_conn_own_addr_type
+	istore 1,contw
+	fetch 6,mem_le_lap	
+	istore 6,contw
+	rtn	
+
+
+le_send_pairing_fail_unspecified_reason:
+	jam PAIRING_FAILED_UNSPECIFIED_REASON,mem_le_ll_pairing_fail_reason
+	branch le_send_pairing_failed
+
+le_check_init_key_distribution:
+	fetch 1,mem_le_pres_init_key_distribution
+	fetcht 1,mem_le_pres_init_key_distribution
+	iand temp,pdata
+	rtn	
+
+le_parse_smp_identity_information:
+	arg mem_le_irk,contw
+	call memcpy16
+	call le_check_init_key_distribution
+	isolate0 LE_INITATOR_IRK_BIT,pdata
+	branch le_send_pairing_fail_unspecified_reason,true
+	fetch 1,mem_device_option
+	rtnne dvc_op_module
+	call le_check_master_addr_type
+	nrtn user
+	branch app_ble_store_reconn_info
+
+//output:user is enable ,random addr type
+le_check_master_addr_type:
+	call disable_user
+	fetch 1,mem_le_conn_peer_addr_type
+	rtneq MASTER_PUBLIC_ADDR
+	fetch 1,mem_le_preq_init_key_distribution
+	rtnbit0 LE_INITATOR_IRK_BIT
+	branch enable_user
+
+le_parse_smp_identity_address_information:
+	call le_check_init_key_distribution
+	isolate0 LE_INITATOR_IRK_BIT,pdata
+	branch le_send_pairing_fail_unspecified_reason,true
+	rtn
+
+le_parse_smp_master_identification:
+le_parse_smp_signing_information:	
+le_parse_smp_security_request:
+	rtn
+	
+ifdef SECURE_CONNECTION				
+le_parse_smp_public_key:
+	arg mem_le_pubkey_remote_x_256,contw	
+	call memcpy64
+	jam LE_SP_FLAG_COMMIT_256,mem_le_secure_connect_flag
+	jam LE_SC_STAT_RECEIVE_PUBLIC_KEY,mem_le_secure_connect_state
+	rtn
+
+le_parse_smp_dhkey_check:
+	arg mem_sp_confirm_remote,contw
+	call memcpy16	
+	jam LE_SC_STAT_RECEIVE_DHKEY,mem_le_secure_connect_state
+	jam LE_SP_FLAG_COMMIT_256,mem_le_secure_connect_flag
+	rtn	
+
+le_send_smp_pairing_public_key:
+	force 65,rega
+	call le_fifo_malloc_tx_l2cap_smp
+	setarg SMP_PAIRING_PUBLIC_KEY
+	istore 1,contw	
+	arg mem_sc_pubkey_local_x_256,contr
+	branch memcpy64
+	
+le_send_smp_pairing_dhkey_check:
+	call function_f6_eb	
+	force 17,rega
+	call le_fifo_malloc_tx_l2cap_smp
+	setarg SMP_PAIRING_DHKEY_CHECK
+	istore 1,contw
+	branch load_inverse_result
+endif	
+
+le_check_paring_time:
+	fetch 1,mem_le_pairing_state
+	rtneq FLAG_LE_PAIRING_END
+	arg FLAG_LE_PAIRING_RCV_PAIRING_REQ,temp
+	isub temp,null
+	nrtn positive
+	arg smp_pairing_timer,queue
+	call timer_check
+	nrtn blank
+	branch le_send_pairing_fail_unspecified_reason
+
+le_pairing_sm:
+	bpatchx patch23_7,mem_patch23
+	call le_fifo_check_nearly_full
+	nrtn blank	
+	fetch 1,mem_le_pairing_state
+	beq FLAG_LE_PAIRING_NULL,le_pairing_sm_null
+	beq FLAG_LE_PAIRING_START,le_pairing_sm_start
+	beq FLAG_LE_PAIRING_SEND_RECURITY_REQ,le_pairing_sm_send_sec_req
+	beq FLAG_LE_PAIRING_RCV_PAIRING_REQ,le_pairing_sm_rcv_pairing_req
+	beq FLAG_LE_PAIRING_AFTER_AUTH,le_pairing_sm_after_auth
+	beq FLAG_LE_PARING_SEND_ENC_INFORMATION,le_pairng_sm_send_enc_information
+	beq FLAG_LE_PARING_SEND_MASTER_IDENTIFICATION,le_pairng_sm_send_master_indentification
+	beq FLAG_LE_PARING_SEND_INDENTITY_INFORMATION,le_pairng_sm_send_indentity_information
+	rtn
+
+le_pairing_sm_null:
+le_pairing_sm_send_sec_req:
+	fetch 1,mem_le_enc_state
+	rtnne FLAG_LE_SEND_START_ENC_RSP
+	jam FLAG_LE_ENC_END,mem_le_enc_state
+	jam FLAG_LE_PAIRING_END,mem_le_pairing_state
+	jam BT_EVT_LE_RECONNECT_COMPLETE ,mem_fifo_temp
+	branch ui_ipc_send_event	
+	
+	
+le_pairing_sm_start:
+	jam FLAG_LE_PAIRING_SEND_RECURITY_REQ,mem_le_pairing_state
+	branch le_send_smp_security_request
+
+le_pairing_sm_rcv_pairing_req:
+	jam FLAG_LE_PAIRING_WAIT_STK_GENERATION,mem_le_pairing_state
+	setarg TIMER_SMP_PAIRING_TIMEOUT
+	arg smp_pairing_timer,queue
+	branch timer_init
+	
+le_pairing_sm_after_auth:
+	fetch 1,mem_le_enc_state
+	beq FLAG_LE_SEND_START_ENC_RSP,le_pairing_sm_after_auth_start_enc
+	rtn
+	
+le_pairing_sm_after_auth_start_enc:
+	fetch 1,mem_le_pairing_mode
+	bbit1 LE_PAIRING_MODE_SECURE_CONNECT_BIT,le_pairing_sm_after_auth_start_enc_sc
+
+	jam FLAG_LE_PARING_SEND_ENC_INFORMATION,mem_le_pairing_state
+	call le_send_smp_encryption_information
+le_pairing_sm_after_auth_start_enc_common:
+	jam BT_EVT_LE_ENC_INFO,mem_fifo_temp
+	call ui_ipc_send_event
+	fetch 1,mem_device_option
+	rtnne dvc_op_module
+	call le_check_master_addr_type
+	rtn user
+	branch app_ble_store_reconn_info
+
+le_pairing_sm_after_auth_start_enc_sc:
+	jam FLAG_LE_PARING_SEND_MASTER_IDENTIFICATION,mem_le_pairing_state
+	branch le_pairing_sm_after_auth_start_enc_common
+
+le_pairng_sm_send_enc_information:	
+	jam FLAG_LE_PARING_SEND_MASTER_IDENTIFICATION,mem_le_pairing_state
+	branch le_send_smp_master_identification
+
+le_pairng_sm_send_master_indentification:	
+	fetch 1,mem_le_preq_resp_key_distribution
+	fetcht 1,mem_le_pres_resp_key_distribution
+	iand temp,pdata
+	isolate0 LE_INITATOR_IRK_BIT,pdata
+	branch le_parse_start_enc_rsp_after_auth_end,true
+	jam FLAG_LE_PARING_SEND_INDENTITY_INFORMATION,mem_le_pairing_state
+	branch le_send_smp_identity_information
+
+le_pairng_sm_send_indentity_information:		
+	call le_send_smp_identity_address_information
+	branch le_parse_start_enc_rsp_after_auth_end
+
+
+le_parse_start_enc_rsp_after_auth_end:
+	bpatchx patch24_0,mem_patch24
+	force smp_pairing_timer,queue
+	call timer_stop
+	jam FLAG_LE_ENC_END,mem_le_enc_state
+	jam FLAG_LE_PAIRING_END,mem_le_pairing_state
+	jam BT_EVT_LE_PAIRING_COMPLETE ,mem_fifo_temp
+	branch ui_ipc_send_event	
+	
+
+ifdef SECURE_CONNECTION
+
+le_secure_connect_sm:
+	bpatchx patch24_1,mem_patch24
+	fetch 1,mem_le_pairing_mode
+	rtnbit0 LE_PAIRING_MODE_SECURE_CONNECT_BIT
+	fetch 1,mem_le_secure_connect_flag
+	rtnne LE_SP_FLAG_COMMIT_256
+	jam SP_FLAG_STANDBY,mem_le_secure_connect_flag
+	fetch 1,mem_le_secure_connect_state
+	beq  LE_SC_STAT_RECEIVE_PUBLIC_KEY,le_sc_sm_receive_public_key
+	beq LE_SC_STAT_WAIT_SEND_PUBLIC_KEY,le_sc_sm_wait_send_public_key
+	beq LE_SC_STAT_SEND_PUBLIC_KEY,le_sc_sm_send_public_key
+	beq LE_SC_STAT_RECEIVE_DHKEY,le_sc_sm_receive_dhkey
+	beq LE_SC_STAT_WAIT_CONFIRM_GKEY,le_sc_sm_wait_confirm_gkey
+	beq  LE_SC_STAT_PASSKEY_WAIT_CONFIRM,le_sc_sm_passkey_wait_confirm
+	rtn	
+
+le_sc_state_clear:
+	jam SP_FLAG_STANDBY,mem_le_secure_connect_flag
+	jam LE_SC_STAT_NULL,mem_le_secure_connect_state
+	jam FLAG_LE_SC_CONFRIM_NULL,mem_le_sc_confirm_gkey_flag
+	rtn
+	
+le_sc_sm_passkey_wait_confirm:
+	fetch 1,mem_authentication_passkey_times
+	copy pdata,queue
+	increase 1,pdata
+	store 1,mem_authentication_passkey_times
+	fetch 4,mem_le_tk
+	qisolate1 pdata
+	setarg 0x80
+	setflag true,0,pdata
+	store 1,mem_passkey_1bit
+	branch le_sc_sm_ready_send_pairing_confirm
+	
+le_sc_sm_wait_confirm_gkey:
+	fetch 1,mem_le_sc_confirm_gkey_flag
+	jam FLAG_LE_SC_CONFRIM_NULL,mem_le_sc_confirm_gkey_flag
+	beq FLAG_LE_SC_CONFRIM_GKEY_OK,le_sc_confirm_gkey_ok
+	jam LE_SP_FLAG_COMMIT_256,mem_le_secure_connect_flag
+	rtn
+	
+le_sc_confirm_gkey_ok:
+	jam BT_EVT_LE_PAIRING_SUCCESS,mem_fifo_temp
+	call ui_ipc_send_event	
+	jam FLAG_LE_PAIRING_AFTER_AUTH,mem_le_pairing_state
+	branch le_send_smp_pairing_dhkey_check
+
+le_sc_sm_receive_dhkey:
+	fetch 1,mem_sp_dhkey_invalid
+	beq SP_KEY_VALID_256,le_dhkey_ready
+	jam LE_SP_FLAG_COMMIT_256,mem_le_secure_connect_flag
+	rtn
+
+le_dhkey_ready:
+	call function_f5
+	fetch 1,mem_le_pairing_mode
+	beq LE_PAIRING_MODE_SECURE_CONNECT_PASSKEY ,le_dhkey_ready_common
+	beq LE_PAIRING_MODE_SECURE_CONNECT_PASSKEY_RES_INPUT ,le_dhkey_ready_common
+	call le_set_tk_0 
+le_dhkey_ready_common:
+	call function_f6_ea
+	arg mem_AES_CMAC_temp,rega
+	arg mem_sp_confirm_remote ,regb
+	arg 16,loopcnt
+	call string_compare
+	branch le_dhkey_check_ok,zero
+le_dhkey_check_fail:	
+	jam PAIRING_FAILED_DHKEY_CHECK_FAILED,mem_le_ll_pairing_fail_reason
+	branch le_send_pairing_failed
+
+	
+le_dhkey_check_ok:
+	call sp_calc_check_publickey_256
+	nbranch le_dhkey_check_fail,zero
+	jam 1,mem_ltk_exists
+	fetch 1,mem_le_pairing_mode
+	beq LE_PAIRING_MODE_SECURE_CONNECT_JUSTWORK,le_sc_confirm_gkey_ok
+	beq LE_PAIRING_MODE_SECURE_CONNECT_PASSKEY ,le_sc_confirm_gkey_ok	
+	beq LE_PAIRING_MODE_SECURE_CONNECT_PASSKEY_RES_INPUT ,le_sc_confirm_gkey_ok	
+	jam LE_SP_FLAG_COMMIT_256,mem_le_secure_connect_flag
+	jam LE_SC_STAT_WAIT_CONFIRM_GKEY,mem_le_secure_connect_state	
+	rtn	
+
+le_sc_sm_send_public_key:
+	fetch 1,mem_le_pairing_mode
+	beq LE_PAIRING_MODE_SECURE_CONNECT_PASSKEY,le_sc_sm_send_public_key_passkey
+	beq LE_PAIRING_MODE_SECURE_CONNECT_PASSKEY_RES_INPUT,le_sc_sm_send_public_key_passkey
+	jam 0,mem_passkey_1bit
+le_sc_sm_ready_send_pairing_confirm:
+	branch le_send_smp_pairing_confirm
+
+le_sc_sm_send_public_key_passkey:
+	jam 0,mem_authentication_passkey_times
+	rtneq LE_PAIRING_MODE_SECURE_CONNECT_PASSKEY_RES_INPUT
+	branch le_parse_smp_pairing_req_passkey
+
+	
+le_sc_sm_receive_public_key:
+	jam LE_SP_FLAG_COMMIT_256,mem_le_secure_connect_flag
+	fetch 1,mem_sc_local_key_invalid
+	beq SP_KEY_VALID_256,le_public_key_ready
+	rtn
+	
+le_public_key_ready:
+	jam LE_SC_STAT_WAIT_SEND_PUBLIC_KEY,mem_le_secure_connect_state	
+	jam SP_KEY_INVALID,mem_sp_dhkey_invalid
+	branch sp_dhkey_calc_256	
+
+le_sc_sm_wait_send_public_key:
+	jam LE_SP_FLAG_COMMIT_256,mem_le_secure_connect_flag
+	jam LE_SC_STAT_SEND_PUBLIC_KEY,mem_le_secure_connect_state
+	branch le_send_smp_pairing_public_key
+
+endif
+
+
+le_fifo_malloc_tx_l2cap_smp:
+	bpatchx patch24_2,mem_patch24
+	force LE_L2CAP_CID_SMP,regb
+	branch le_fifo_malloc_tx_l2cap
+
+
Index: program/ble_protocol_stack/le_ll.prog
===================================================================
--- /branch/usb/usb_public_base/program/ble_protocol_stack/le_ll.prog	(revision 0)
+++ /branch/usb/usb_public_base/program/ble_protocol_stack/le_ll.prog	(working copy)
@@ -0,0 +1,339 @@
+
+le_parse_ll:
+	fetch 1,mem_le_rxbuf_data_ll_opcode
+	beq LL_CONNECTION_UPDATE_IND,le_parse_connection_update_ind
+	beq LL_CHANNEL_MAP_IND,le_parse_channel_map_ind
+	beq LL_TERMINATE_IND,le_parse_terminate_ind
+	beq LL_ENC_REQ,le_parse_enc_req
+	beq LL_ENC_RSP,le_parse_enc_rsp
+	beq LL_START_ENC_REQ,le_parse_start_enc_req
+	beq LL_START_ENC_RSP,le_parse_start_enc_rsp
+	beq LL_UNKNOWN_RSP,le_parse_unknown_rsp
+	beq LL_FEATURE_REQ,le_parse_feature_req
+	beq LL_FEATURE_RSP,le_parse_feature_rsp
+	beq LL_PAUSE_ENC_REQ,le_parse_pause_enc_req
+	beq LL_PAUSE_ENC_RSP,le_parse_pause_enc_rsp
+	beq LL_VERSION_IND,le_parse_version_ind
+	beq LL_REJECT_IND,le_parse_reject_ind
+	beq LL_PING_REQ,le_parse_ping_req
+	beq LL_PING_RSP,le_parse_ping_rsp
+	beq LL_LENGTH_REQ,le_parse_length_req
+	beq LL_LENGTH_RSP,le_parse_length_rsp
+	beq LL_PHY_REQ,le_parse_phy_req
+	beq LL_PHY_UPDATE_IND,le_parse_phy_update_ind
+	fetchr regc,1,mem_le_rxbuf_data_ll_opcode
+	branch le_send_unknown_rsp
+
+
+//LL Opcode:0x00
+le_parse_connection_update_ind:
+	ifetch 9,contr
+	store 9,mem_le_new_param
+	ifetch 2,contr
+	store 2,mem_le_instant
+	fetch 1,mem_le_state
+	set1 lestate_update_param,pdata
+	store 1,mem_le_state
+	rtn
+
+
+//LL Opcode:0x01
+le_parse_channel_map_ind:
+	ifetch 5,contr
+	store 5,mem_le_new_map
+	ifetch 2,contr
+	store 2,mem_le_instant
+le_update_map_enable:
+	fetch 1,mem_le_state
+	set1 lestate_update_map,pdata
+	store 1,mem_le_state
+	rtn
+
+
+//LL Opcode:0x02
+le_parse_terminate_ind:
+	setarg 20 // 200ms
+	store 2,mem_le_superto
+	store 2,mem_le_init_superto
+	rtn
+
+
+//LL Opcode:0x03
+le_parse_enc_req:
+	ifetch 8,contr
+	store 8,mem_le_rand
+	ifetch 2,contr
+	store 2,mem_le_ediv
+	ifetch 8,contr
+	store 8,mem_le_skdm
+	ifetch 4,contr
+	store 4,mem_ccm_ivm
+	call le_send_enc_rsp
+	bpatchx patch24_3,mem_patch24
+	fetch 1,mem_le_pairing_state
+	beq FLAG_LE_PAIRING_AFTER_AUTH,le_parse_enc_req_after_auth
+	fetch 1,mem_le_configuration
+	bbit1  BIT_BLE_PAIRING_FIXED_LTK,le_parse_enc_req_fixed_ltk
+	fetch 1,mem_nv_data_number
+	ncall load_device_list_mode_4,blank
+	fetch 1,mem_ltk_exists
+	beq 0,le_ltk_lost
+le_parse_enc_req_after_auth:
+	jam FLAG_LE_RCV_ENC_START,mem_le_enc_state
+	call  le_send_start_enc_req
+	branch generate_sk
+le_parse_enc_req_fixed_ltk:
+	jam 1,mem_ltk_exists
+	arg mem_le_fixed_ltk,contr
+	arg mem_le_ltk,contw
+	call memcpy16
+	branch le_parse_enc_req_after_auth
+	
+le_ltk_lost:
+	jam FLAG_LE_ENC_NULL,mem_le_enc_state
+	jam FLAG_LE_ENC_NULL,mem_le_pairing_state
+	jam BT_EVT_LE_LTK_LOST,mem_fifo_temp
+	branch ui_ipc_send_event
+
+//LL Opcode:0x04
+le_parse_enc_rsp:
+	ifetch 8,contr
+	store 8,mem_le_skds
+	ifetch 4,contr
+	store 4,mem_ccm_ivs
+	branch generate_sk
+
+
+//LL Opcode:0x05
+le_parse_start_enc_req:
+	fetch 1,mem_le_state
+	set1 lestate_encryption,pdata
+	store 1,mem_le_state
+	rtn
+
+//LL Opcode:0x06
+le_parse_start_enc_rsp:
+	rtn master
+	jam BT_EVT_LE_START_ENC,mem_fifo_temp
+	call ui_ipc_send_event	
+	jam FLAG_LE_SEND_START_ENC_RSP,mem_le_enc_state
+	branch le_send_start_enc_rsp
+
+
+//LL Opcode:0x07
+le_parse_unknown_rsp:
+	rtn
+
+
+//LL Opcode:0x08
+le_parse_feature_req:
+	branch le_send_feature_rsp
+
+
+//LL Opcode:0x09
+le_parse_feature_rsp:
+	rtn
+
+
+//LL Opcode:0x0a
+le_parse_pause_enc_req:
+	jam FLAG_LE_ENC_PAUSE,mem_le_enc_state
+	call le_send_pause_enc_rsp	
+	jam BT_EVT_LE_PAUSE_ENC,mem_fifo_temp
+	branch ui_ipc_send_event	
+
+
+//LL Opcode:0x0b
+le_parse_pause_enc_rsp:
+	rtn
+
+
+//LL Opcode:0x0c
+le_parse_version_ind:
+	rtn master
+	branch le_send_version_ind
+
+
+//LL Opcode:0x0d
+le_parse_reject_ind:
+	rtn
+
+
+//LL Opcode:0x13
+le_parse_ping_req:
+	branch le_send_ping_rsp
+
+
+//LL Opcode:0x14
+le_parse_ping_rsp:
+	rtn
+
+
+le_parse_length_req:
+	call le_parse_length_rsp
+	branch le_send_data_length_res
+
+le_parse_length_rsp:
+	ifetch 8,contr
+	store 8,mem_remote_rx_max_octets
+	fetch 2,mem_remote_rx_max_octets
+	fetcht 2,mem_local_tx_max_octets
+	call not_greater_than
+	store 2,mem_remote_rx_max_octets
+	
+	fetch 2,mem_remote_tx_max_octets
+	fetcht 2,mem_local_rx_max_octets
+	call not_greater_than
+	store 2,mem_remote_tx_max_octets
+	rtn
+
+
+//LL Opcode:0x16
+le_parse_phy_req:
+	branch le_send_phy_rsp
+
+
+//LL Opcode:0x18
+le_parse_phy_update_ind:
+	ifetch 2,contr
+	store 2,mem_le_new_m2s_phy
+	ifetch 2,contr
+	store 2,mem_le_instant
+	rtn blank
+	fetch 1,mem_le_state
+	set1 lestate_update_phy,pdata
+	store 1,mem_le_state	
+	rtn
+
+
+///////////////////send ll packet//////////////
+//LL Opcode:0x02
+le_send_terminate_ind_user_terminated:
+	arg ERROR_REMOTE_USER_TERMINATED_CONNECTION,regc
+
+//regc:The ErrorCode field shall be set to inform the remote device why the connection is about to be terminated.
+le_send_terminate_ind:
+	arg 2,rega
+	arg LL_TERMINATE_IND,regb
+	call le_fifo_malloc_tx_ll
+	copy regc,pdata
+	istore 1,contw
+	rtn
+
+
+//LL Opcode:0x04
+le_send_enc_rsp:
+	arg mem_le_skds,contw
+	force 8,loopcnt
+	call generate_random_loop
+	arg mem_ccm_ivs,contw
+	force 4,loopcnt
+	call generate_random_loop
+	arg 13,rega
+	arg LL_ENC_RSP,regb
+	call le_fifo_malloc_tx_ll
+	fetch 8,mem_le_skds
+	istore 8,contw
+	fetch 4,mem_ccm_ivs
+	istore 4,contw
+	rtn
+
+
+//LL Opcode:0x05
+le_send_start_enc_req:
+	jam FLAG_LE_SEND_START_ENC_REQ,mem_le_enc_state
+	arg LL_START_ENC_REQ,regb
+	branch le_send_ll_one_lenth
+
+
+//LL Opcode:0x06
+le_send_start_enc_rsp:
+	arg LL_START_ENC_RSP,regb
+	branch le_send_ll_one_lenth
+
+
+//LL Opcode:0x07
+//input:regc is receive ll opcode
+le_send_unknown_rsp:
+	arg 2,rega
+	arg LL_UNKNOWN_RSP,regb
+	call le_fifo_malloc_tx_ll
+	istorer regc,1,contw
+	rtn	
+
+
+//LL Opcode:0x09
+le_send_feature_rsp:
+	arg 9,rega
+	arg LL_FEATURE_RSP,regb
+	call le_fifo_malloc_tx_ll
+	fetch 8,mem_le_local_feature
+	or pdata,FUN_LL_FEATURE_LE_ENCRYPTION,pdata
+	istore 8,contw
+	rtn
+
+
+//LL Opcode:0x0B
+le_send_pause_enc_rsp:
+	arg LL_PAUSE_ENC_RSP,regb
+	branch le_send_ll_one_lenth
+
+
+//LL Opcode:0x0C
+le_send_version_ind:
+	arg 6,rega
+	arg LL_VERSION_IND,regb
+	call le_fifo_malloc_tx_ll
+	fetch 5,mem_version
+	istore 5,contw
+	rtn
+
+//LL Opcode:0x0D
+le_send_reject_ind:
+	arg 2,rega
+	arg LL_REJECT_IND,regb
+	call le_fifo_malloc_tx_ll
+	setarg LE_ERR_PIN_OR_KEY_MISSING
+	istore 1,contw
+	rtn		
+
+
+//LL Opcode:0x13
+le_send_ping_rsp:
+	arg LL_PING_RSP,regb
+	branch le_send_ll_one_lenth
+	
+le_send_data_length_req:
+	arg LL_LENGTH_REQ,regb
+	branch le_send_data_length
+
+le_send_data_length_res:
+	arg LL_LENGTH_RSP,regb
+le_send_data_length:
+	arg 9,rega
+	call le_fifo_malloc_tx_ll
+	fetch 8,mem_local_rx_max_octets
+	istore 8,contw
+	rtn
+
+
+//LL Opcode:0x17
+le_send_phy_rsp:
+	arg 3,rega
+	arg LL_PHY_RSP,regb
+	call le_fifo_malloc_tx_ll
+	fetch 1,mem_le_tx_phys
+	and pdata,0x07,pdata
+	istore 1,contw
+	fetch 1,mem_le_rx_phys
+	and pdata,0x07,pdata
+	istore 1,contw
+	rtn		
+
+
+//regb:ll opcode
+le_send_ll_one_lenth:
+	arg 1,rega
+	branch le_fifo_malloc_tx_ll
+
+
Index: program/bt.prog
===================================================================
--- /branch/usb/usb_public_base/program/bt.prog	(revision 0)
+++ /branch/usb/usb_public_base/program/bt.prog	(working copy)
@@ -0,0 +1,1650 @@
+//define RAM_VERSION
+//define CLK24M
+//define ACL_DEBUG
+//define SECURE_CONNECTION
+define COMPILE_KEYSCAN
+
+define DEBUG_RF_INIT
+
+define COMPILE_SHUTTER
+define COMPILE_MOUSE
+define COMPILE_MODULE
+define COMPILE_USB
+define COMPILE_DONGLE
+define COMPILE_LE
+define COMPILE_24G
+define COMPILE_CAR
+define COMPILE_REMOTE_CAR
+//define COMPILE_WECHAT
+//define COMPLIE_TEST
+define FUNC_FAN_MODULE
+define FCC_AUTH
+INCLUDE "bt_format"
+
+org 0x0000		// start from patch ram address start
+ifdef SIM
+include sim.prog
+else
+include patch.prog
+endif
+
+/******************************************/
+/***********   ROM Start   ***************/
+/******************************************/
+
+org 0x3800		// start from rom address start
+start:
+	call lpmstate
+
+soft_reset:
+	bpatch patch00_0,mem_patch00
+	clear_stack
+	call app_param_init
+	call initialize_radio
+	call iic_init_360khz
+	call init_param
+	call l2cap_init
+	bpatch patch00_1,mem_patch00
+	call ui_init
+	call ldo_abb_en_init
+	call app_init
+ifdef SECURE_CONNECTION
+	call publickey_init
+//	call sp_wait_pubkey_calc_done
+endif
+	call lpm_recover_clk,wake
+main_loop:	
+	bpatch patch00_2,mem_patch00
+ifdef SECURE_CONNECTION
+	call sp_calc_sequence_256
+	call sp_calc_sequence_256_check
+endif
+	call le_advertising_dispatch
+	call idle_dispatch
+	call app_process_idle
+	call connection_dispatch
+	call g24_dispatch
+	call lpm_dispatch
+	branch main_loop
+
+connection_dispatch:
+	call connection_incontext
+	rtnmark0 mark_context
+	set0 mark_context,mark
+	call context_save
+	branch le_disable
+	
+connection_incontext:
+	bpatch patch00_3,mem_patch00
+	call context_search_insniff
+	nbranch connection_nosniff,zero
+	call context_load
+	add rega,coffset_mode,contr
+	ifetch 1,contr
+	bbit1 mode_le,le_conn_dispatch
+//	bbit1 mode_master, master_dispatch
+//	branch slave_dispatch
+	rtn
+	
+connection_nosniff:
+	call context_get_next
+	copy loopcnt,null
+	rtn zero
+	branch assert
+
+
+/**************************************/
+/**************idle dispatch*********/
+/**************************************/
+	
+idle_dispatch:
+	fetch 1,mem_hci_cmd
+	rtn blank
+	beq hci_cmd_le_create_conn,idle_le_create_conn
+	call context_search_conn_handle
+	rtn zero
+	call context_search_plap
+	rtn zero
+idle_exit:
+	jam 0,mem_hci_cmd
+	rtn
+
+idle_le_create_conn:
+	jam hci_cmd_le_create_conn,mem_cmd_le_create_conn
+	jam 0,mem_hci_cmd
+	rtn
+
+
+
+context_load:
+	bpatch patch00_4,mem_patch00
+	set1 mark_context,mark
+	deposit rega
+	store 2,mem_context_ptr
+	force context_size,loopcnt
+	arg mem_le_state,contw
+	add rega,coffset_mode,contr
+	ifetch 1,contr
+	copy rega,contr
+	bbit1 mode_le,memcpy
+	rtn
+	
+context_save:
+	bpatch patch00_5,mem_patch00
+	fetch 2,mem_context_ptr
+	iforce contw
+	force context_size,loopcnt
+	arg mem_le_state,contr
+	branch memcpy
+	
+	
+
+context_get_next:
+	arg context_num,loopcnt
+	fetcht 1,mem_current_context
+context_get_next_loop:
+	increase 1,temp
+	compare context_num,temp,0xff
+	nbranch context_get_next_cont,true
+	arg 0,temp
+context_get_next_cont:
+	storet 1,mem_current_context
+	mul32 temp,context_size,pdata
+	arg mem_context,rega
+	iadd rega,rega
+	ifetch 1,rega
+	bbit1 state_insniff,context_get_next_sniff
+	rtnbit1 state_inconn
+context_get_next_sniff:
+	loop context_get_next_loop
+	rtn
+	
+context_new:
+	bpatch patch00_6,mem_patch00
+	arg context_search_empty,regc
+	call context_search
+	nrtn zero					// all occupied
+	deposit rega
+	store 2,mem_context_ptr
+	force 0,null
+	rtn
+	
+
+	
+	//rtn nzero if idle(no conn)
+context_check_idle:
+	arg context_check_inconn,regc
+	branch context_search
+	
+
+	
+	/* return zero if conn handle is found */
+context_search_conn_handle:
+	fetcht 1,mem_hci_conn_handle
+context_search_conn_handle2:
+	arg context_search_handle,regc
+	branch context_search
+	
+	/* return zero if plap is found */
+context_search_plap:
+	bpatch patch00_7,mem_patch00
+	fetcht 6,mem_hci_plap
+context_search_plap2:
+	arg context_search_lap,regc
+	branch context_search
+	/* return zero if sniff anchor is meet and rega pointers to context */
+context_search_insniff:
+	arg context_search_sniff,regc
+	branch context_search
+	/* return zero if sniff window is in content with current transaction */
+context_search_sniff_window:
+	arg context_search_window,regc
+context_search:
+	bpatch patch01_0,mem_patch01
+	arg mem_context,rega
+	arg context_num,loopcnt
+context_search_loop:
+	ifetch 1,rega
+	copy regc,pc
+context_search_next:
+	bpatch patch01_1,mem_patch01
+	increase context_size,rega
+	loop context_search_loop
+	force 1,null
+	rtn
+
+context_search_empty:
+	bbit1 state_inconn,context_search_next
+	force 0,null
+	rtn
+	
+context_search_lap:
+	bbit0 state_inconn,context_search_next
+context_search_lap_cont:
+	add rega,coffset_plap,contr
+	ifetch 6,contr
+	isub temp,null
+	rtn zero
+	branch context_search_next
+
+context_search_handle:
+	bbit0 state_inconn,context_search_next
+	add rega,coffset_conn_handle,contr
+	ifetch 1,contr
+	isub temp,null
+	rtn zero
+	branch context_search_next
+
+context_search_sniff:
+	bbit0 state_insniff,context_search_next
+context_search_sniff_loop:
+	call context_get_anchor
+	call sign_pdata_temp
+	isub temp,pdata
+	increase 1,pdata
+	branch context_search_sniff_miss,positive
+	copy contr,regb
+	store 9,mem_temp
+	bpatch patch01_2,mem_patch01
+ifdef SECURE_CONNECTION
+	fetch 1,mem_sc_calc
+	nbranch context_search_sniff_sc,blank
+endif	
+	fetch 9,mem_temp
+	copy regb,contr
+	increase 5,pdata  
+	branch context_search_meet1
+	
+ifdef SECURE_CONNECTION
+context_search_sniff_sc:
+	fetch 9,mem_temp
+	copy regb,contr	
+	increase 20,pdata  
+endif	
+context_search_meet1:
+	nbranch context_search_next,positive
+context_search_meet:
+	copy temp,bt_clk
+	call context_next_anchor
+	force 0,null
+	rtn
+	
+	
+context_search_sniff_miss:
+	iforce regb
+	add rega,coffset_tsniff,contr
+	ifetch 2,contr
+	branch context_search_meet,blank
+	call context_next_anchor
+	branch context_search_sniff_loop
+
+sign_pdata_temp:
+	rshift16 pdata,timeup    
+	rshift8 timeup,timeup    
+	branch sign_pdata_temp_p0,zero    
+	compare 0xf,timeup,0xf    
+	nrtn true    
+	rshift16 temp,timeup    
+	rshift8 timeup,timeup    
+	nrtn zero    
+	set1 28,temp    
+	rtn
+sign_pdata_temp_p0:    
+	rshift16 temp,timeup    
+	rshift8 timeup,timeup    
+	compare 0xf,timeup,0xf    
+	nrtn true    
+	set1 28,pdata    
+	rtn
+
+context_check_inconn:
+	bbit0 state_inconn,context_search_next
+	force 0,null 				// found
+	rtn
+	
+context_check_a_wack:
+	bbit0 state_inconn,context_search_next
+	add rega,coffset_mode,contr
+	ifetch 1,contr
+	bbit1 mode_le,context_search_next
+	rtn
+
+context_get_anchor:
+	add rega,coffset_mode,contr
+	ifetcht 1,contr
+	deposit clkn_bt
+	isolate1 mode_master,temp
+	add rega,coffset_sniff_anchor,contr
+	ifetcht 4,contr
+	rtn true
+	add rega,coffset_clk_offset,contr
+	ifetch 6,contr
+	call calc_clke2
+	deposit clke_bt
+	rtn
+
+context_next_anchor:
+	add rega,coffset_tsniff,contr
+	add rega,coffset_sniff_anchor,contw
+	ifetch 2,contr
+	iadd temp,timeup			/* wrap to 28 bits */
+	deposit timeup
+	istore 4,contw
+	branch le_context_nextevent
+	
+
+context_search_window:
+	bbit0 state_insniff,context_search_next
+	call context_get_anchor
+	iadd stop_watch,pdata
+	iadd stop_watch,pdata
+	iadd queue,pdata
+	isub temp,null
+	nbranch context_search_next,positive
+	force 0,null
+	rtn
+
+
+
+end_of_packet:
+	bpatch patch01_3,mem_patch01
+	disable encode_fec0
+	disable encode_fec2
+	disable decode_fec0
+	disable decode_fec2
+	disable enable_crc
+	disable encrypt
+	disable enable_white
+	branch shutdown_radio,is_rx
+	until null,tx_clear
+	nop 100          /* flush out the last bit */
+	branch shutdown_radio
+
+
+
+	/* enable user if sniff window vialation, queue is extra overhead */
+sniff_check_window:
+	bpatch patch01_4,mem_patch01
+	disable swfine
+	copy temp,stop_watch
+	call context_search_sniff_window
+	disable user
+	nrtn zero
+	force 0,stop_watch
+	enable user
+	rtn
+
+
+
+calc_slot_offset:
+	bpatch patch01_5,mem_patch01
+	until null,halfslot
+	deposit clke
+	iforce contr
+	rshift16,pdata,pdata
+	isub clkn_bt,loopcnt
+	and_into 3,loopcnt			/* bt portion */
+	nbranch calc_bt_portion,zero
+	force 0,pdata
+	branch calc_skip_bt
+calc_bt_portion:
+	fetcht 2,mem_param_rt_rthalfslot
+	force 0,pdata
+calc_slot_offset_loop:
+	iadd temp,pdata
+	loop calc_slot_offset_loop
+calc_skip_bt:
+	iadd contr,pdata			/* add rt portion */
+	div pdata,12
+	call get_div_result
+	store 2,mem_slot_offset
+	rtn
+
+calc_clke_offset:
+	bpatch patch01_6,mem_patch01
+	deposit clke
+	copy clkn,temp
+	isub temp,null
+	nsetflag positive,44,pdata
+	isub temp,temp
+	fetch 2,mem_param_rt_rthalfslot
+	isolate0 15,temp
+	branch calc_clke_pos,true
+	copy temp,alarm
+	arg 0x10000,temp
+	fetch 2,mem_param_rt_rthalfslot
+	isub temp,pdata
+	iadd alarm,temp
+	
+calc_clke_pos:
+	storet 6,mem_le_clk_offset
+	rtn
+
+calc_clke:
+	disable clknt
+	fetch 6,mem_le_clk_offset
+calc_clke2:
+	iadd clkn,alarm
+	increase 10,alarm
+	fetch 2,mem_param_rt_rthalfslot
+	isub alarm,pdata
+	isolate0 15,pdata
+	branch calc_clke_pos_adj,true
+	setarg 0x10000
+	fetchr regd,2,mem_param_rt_rthalfslot
+	isub regd,pdata
+	iadd alarm,alarm
+calc_clke_pos2:
+	copy alarm,clke
+	rtn
+calc_clke_pos_adj:		/* add 2 clock */
+	force 0,null
+	branch calc_clke_pos2
+	
+/******************************************/
+/********* RF related functions ***********/
+/******************************************/
+
+
+shutdown_radio:
+	bpatch patch01_7,mem_patch01
+	call rf_debug_shutdown_radio_line	//L-H-L
+	force 0x08,radio_ctrl
+	force 0,radio_ctrl
+	disable is_rx
+	disable is_tx
+	pulse packet_end
+	jam 0x5,modem_en
+	nop 2
+	jam 0x0,modem_en
+	call set_sync_on
+	jam 0,core_syn_en
+	jam 0x80,core_rf_ldo_en0
+	fetch 1,core_clkpll_cfg6
+	set0 7,pdata
+	store 1,core_clkpll_cfg6
+	jam 0,core_rf_ldo_en1
+	branch gain_control
+
+
+
+set_sync_on:
+	bpatch patch02_0,mem_patch02
+	jam 0x5,modem_en
+	nop 2
+	jam 0x0,modem_en					/* if called from tx or rx */
+	fetch 1,mem_fcomp_div
+	beq XTAL_24M,set_sync_on_24m
+	beq XTAL_16M,set_sync_on_16m
+set_sync_on_24m:
+	jam 0xaa,core_rf_ldo_cfg4
+	jam 0xaa,core_rf_ldo_cfg5
+	jam 0x15,core_rf_ldo_cfg6
+	
+	jam 0x78,core_rf_ldo_en0 //ldo en
+	fetch 1,core_clkpll_cfg6
+	set1 7,pdata
+	store 1,core_clkpll_cfg6
+	jam 0x04,core_rf_ldo_en1
+	nop 60
+	jam 0x7a,core_syn_en //module en
+	jam 0,core_rx_en0
+	jam 0,core_rx_en1    
+	jam 0,core_tx_en0
+	jam 0,core_tx_en1
+
+	jam 0x2a,core_rf_ldo_cfg5  //ldo bleeding current disable
+	jam 0x78,core_rf_ldo_en0
+set_sync_on_next:
+	fetch 1,core_clkpll_cfg6
+	set0 7,pdata
+	store 1,core_clkpll_cfg6
+	jam 0,core_syn_cal_ctrl
+	rtn
+
+set_sync_on_16m:
+	jam 0x29,core_syn_afc_cfg1
+	jam 0xe6,core_syn_aac_cfg1
+
+	jam 0xaa,core_rf_ldo_cfg4
+	jam 0xaa,core_rf_ldo_cfg5
+	jam 0x15,core_rf_ldo_cfg6
+	
+	jam 0x78,core_rf_ldo_en0 //ldo en
+	fetch 1,core_clkpll_cfg6
+	set1 7,pdata
+	store 1,core_clkpll_cfg6
+	jam 0x04,core_rf_ldo_en1
+	nop 60
+	jam 0x3a,core_syn_en //module en
+	jam 0,core_rx_en0                 
+	jam 0,core_rx_en1       
+	jam 0,core_tx_en0
+	jam 0,core_tx_en1
+
+	jam 0x2a,core_rf_ldo_cfg5  //ldo bleeding current disable
+	jam 0x38,core_rf_ldo_en0
+	branch set_sync_on_next
+
+set_freq_rx:
+	bpatch patch02_1,mem_patch02
+	
+	fetch 1,mem_fcomp_div
+	sub pdata,XTAL_24M,null
+	call rf_rx_write_freq_24m,zero
+	ncall rf_rx_write_freq_16m,zero
+
+	storet 1,mem_last_freq
+	add temp,0,pdata
+	bmark1 mark_ble_2M,set_rxfreq_2M_offset
+	add temp,1,pdata
+set_rxfreq_2M_offset:
+	branch rf_rx_write_freq
+
+
+rf_rx_write_freq_24m:
+	jam 0,core_syn_cal_ctrl
+	jam 0x04,core_syn_top_ctrl
+	jam 0,core_syn_mmd_cp_ctrl
+	jam 0x03,core_syn_cp_lpf_cfg
+	jam 0x40,core_syn_afc_cfg3
+	rtn
+rf_rx_write_freq_16m:
+	jam 0x30,core_syn_cal_ctrl
+	jam 0x06,core_syn_top_ctrl
+	jam 0,core_syn_mmd_cp_ctrl
+	jam 0x20,core_syn_cp_lpf_cfg
+	jam 0x15,core_syn_afc_cfg3
+	rtn
+
+rf_rx_enable:
+	bpatch patch02_2,mem_patch02
+	call rf_debug_rx_gpio_high
+	
+	fetch 1,mem_gain_fix
+	beq 0xff,rf_rx_enable_no_soft_agc 
+	arg mem_gain_table,contr
+	iadd contr,contr
+	ifetch 1,contr
+	store 1,core_rf_rx_gain_fix
+	jam 0x27,core_rf_rx_agc_ctrl
+	
+rf_rx_enable_no_soft_agc:
+	fetcht 1,mem_gain_second_agc_en	//0x00 or 0x08
+	fetch 1,core_rf_rx_agc_ctrl
+	ior temp,pdata
+	store 1,core_rf_rx_agc_ctrl
+
+	jam 0xaa,core_rf_ldo_cfg4 //ldo config set
+	jam 0x2a,core_rf_ldo_cfg5
+	jam 0x13,core_rf_ldo_cfg6
+	jam 0x7f,core_rf_ldo_en0
+	fetch 1,core_clkpll_cfg6
+	set0 7,pdata
+	store 1,core_clkpll_cfg6
+	nop 60
+	jam 0x1f,core_rx_en0
+	jam 0xf8,core_rx_en1
+	jam 0x18,core_tx_en0
+	jam 0x00,core_rf_ldo_cfg4
+	jam 0x20,core_rf_ldo_cfg5
+	nop 10
+	jam 0x04,modem_en
+	nop 2
+	jam 0x0c,modem_en
+	rtn
+
+
+	/* pdata is frequency, 00=2400Mhz */
+rf_rx_write_freq:
+	bpatch patch02_3,mem_patch02
+	arg 2400,contr
+	iadd contr,pdata
+	fetcht 1,mem_fcomp_div
+	branch rf_write_freq_calc
+
+	/* rega is frequency, 00=2400Mhz */
+rf_tx_write_freq:
+	bpatch patch02_4,mem_patch02
+	fetch 1,mem_fcomp_div
+	sub pdata,XTAL_24M,null
+	call rf_tx_write_freq_24m,zero
+	ncall rf_tx_write_freq_16m,zero
+	
+	setarg 2400
+	iadd rega,pdata
+	lshift pdata,pdata
+	fetcht 1,mem_fcomp_div
+	mul32 temp,0x03,temp
+rf_write_freq_calc:	
+	lshift temp,temp
+	idiv temp
+	call wait_div_end
+	quotient pdata
+	store 1,core_syn_divr_int
+	remainder pdata		
+	lshift16 pdata,pdata
+	lshift8 pdata,pdata
+	idiv temp
+	call wait_div_end
+	quotient pdata
+	store 1,core_syn_divr_int+3
+	rshift8 pdata,pdata
+	store 1,core_syn_divr_int+2
+	rshift8 pdata,pdata
+	store 1,core_syn_divr_int+1
+	fetcht 1,core_syn_cal_ctrl		//reg syn_cal_ctrl[3:0] = 2??谐写b0000, reset
+	and_into 0xf0,temp
+	storet 1,core_syn_cal_ctrl
+	nop 12
+	fetch 1,mem_fcomp_div
+	beq XTAL_24M,rf_write_freq_calc_24m
+	beq XTAL_16M,rf_write_freq_calc_16m
+rf_write_freq_calc_24m:	
+	or_into 0x0c,temp
+	storet 1,core_syn_cal_ctrl
+	nop 12
+	or_into 0x03,temp
+	storet 1,core_syn_cal_ctrl
+	rtn
+
+rf_write_freq_calc_16m:
+	or_into 0x3c,temp
+	storet 1,core_syn_cal_ctrl
+	nop 12
+	or_into 0x33,temp
+	storet 1,core_syn_cal_ctrl
+	rtn
+
+
+rf_tx_write_freq_24m:
+	jam 0,core_syn_cal_ctrl
+	jam 0x12,core_syn_top_ctrl
+	jam 0,core_syn_mmd_cp_ctrl
+	jam 0x03,core_syn_cp_lpf_cfg
+	jam 0xa6,core_syn_aac_cfg1
+	jam 0x40,core_syn_afc_cfg3
+	rtn
+
+rf_tx_write_freq_16m:
+	jam 0x30,core_syn_cal_ctrl
+	jam 0x15,core_syn_top_ctrl
+	jam 0,core_syn_mmd_cp_ctrl
+	jam 0x20,core_syn_cp_lpf_cfg
+	jam 0xa6,core_syn_aac_cfg1
+	jam 0x15,core_syn_afc_cfg3
+	rtn
+
+
+set_freq_tx:
+	bpatch patch02_5,mem_patch02
+
+	jam 0x12,core_syn_top_ctrl
+	storet 1,mem_last_freq
+	add temp,2,rega
+	call rf_tx_write_freq
+	nop 0x3c0
+
+txon:
+	bpatch patch02_6,mem_patch02
+	
+	jam 0xaa,core_rf_ldo_cfg4 //ldo config set
+	jam 0x2a,core_rf_ldo_cfg5
+	jam 0x10,core_rf_ldo_cfg6
+	
+	jam 0x7f,core_rf_ldo_en0	//ldo en
+	fetch 1,core_clkpll_cfg6
+	set0 7,pdata
+	store 1,core_clkpll_cfg6
+	jam 0x07,core_rf_ldo_en1 
+	nop 60
+
+	jam 0x0d,core_tx_en0
+	jam 0xf9,core_tx_en1		// reg tx_en1[7:0] = 8??谐写b11011001
+	jam 0x00,core_rf_ldo_cfg4
+	jam 0x20,core_rf_ldo_cfg5
+	nop 10
+	jam 0x01, modem_en
+	nop 2
+	jam 0x03, modem_en
+	
+	bpatch patch02_7,mem_patch02
+	fetch 1,mem_tx_power
+	beq TX_POWER_3DB,set_tx_power_3db
+	beq TX_POWER_5DB,set_tx_power_5db
+	beq TX_POWER_6DB,set_tx_power_6db
+	beq TX_POWER_7DB,set_tx_power_7db
+	beq TX_POWER_10DB,set_tx_power_10db
+	beq TX_POWER_F3DB,set_tx_power_f3db
+	beq TX_POWER_F5DB,set_tx_power_f5db
+	beq TX_POWER_F20DB,set_tx_power_f20db
+	beq TX_POWER_F30DB,set_tx_power_f30db
+set_tx_power_0db:
+	jam 0x6a,core_tx_pwr_ctrl0
+	jam 0x07,core_tx_pwr_ctrl1
+set_rf_ldo_cfg89:
+	jam 0xa3,core_rf_ldo_cfg8
+	jam 0x07,core_rf_ldo_cfg9
+	rtn
+
+set_tx_power_3db:
+	jam 0x66,core_tx_pwr_ctrl0
+	jam 0x0b,core_tx_pwr_ctrl1
+set_rf_ldo_cfg89_2:
+	jam 0xaa,core_rf_ldo_cfg8
+	jam 0x0a,core_rf_ldo_cfg9
+	rtn
+
+set_tx_power_5db:
+	jam 0x6c,core_tx_pwr_ctrl0
+	jam 0x0d,core_tx_pwr_ctrl1
+	branch set_rf_ldo_cfg89_2
+
+set_tx_power_6db:
+	jam 0x6b,core_tx_pwr_ctrl0
+	jam 0x0f,core_tx_pwr_ctrl1
+	branch set_rf_ldo_cfg89_2
+
+set_tx_power_7db:
+	jam 0xa7,core_tx_pwr_ctrl0
+	jam 0x0f,core_tx_pwr_ctrl1
+	branch set_rf_ldo_cfg89_2
+
+set_tx_power_10db:
+	jam 0xb6,core_tx_pwr_ctrl0
+	jam 0x0f,core_tx_pwr_ctrl1
+	branch set_rf_ldo_cfg89_2
+
+set_tx_power_f3db:
+	jam 0x68,core_tx_pwr_ctrl0
+	jam 0x05,core_tx_pwr_ctrl1
+	branch set_rf_ldo_cfg89
+	
+set_tx_power_f5db:
+	jam 0x60,core_tx_pwr_ctrl0
+	jam 0x05,core_tx_pwr_ctrl1
+	branch set_rf_ldo_cfg89
+
+set_tx_power_f20db:
+	jam 0x53,core_tx_pwr_ctrl0
+	jam 0x01,core_tx_pwr_ctrl1
+	branch set_rf_ldo_cfg89
+
+set_tx_power_f30db:
+	jam 0x4c,core_tx_pwr_ctrl0
+	jam 0x00,core_tx_pwr_ctrl1
+	branch set_rf_ldo_cfg89
+
+
+initialize_radio:
+	jam clksel_rc,core_clksel
+initialize_radio_wait:
+	fetch 2,mem_rf_init_ptr
+	bbit0 14,initialize_radio_wait
+	iforce contr
+	arg 0x8a00,temp
+initialize_radio_loop:
+	ifetch 1,contr
+	beq 0xff,initialize_radio_cont
+	ior temp,contw
+	ifetch 1,contr
+	istore 1,contw
+	branch initialize_radio_loop
+	
+initialize_radio_cont:
+	bpatch patch03_0,mem_patch03
+	fetch 1,mem_wdt_always_work
+	call wdt_set_disable,blank
+
+	jam 0x05,core_clkpll_cfg0
+	jam 0x94,core_rx_iqadc_cfg
+	call initialize_rc_cal
+	call initialize_rf_ldo_cfg1
+	call initialize_syn_afc_cfg1
+	jam 0xe6,core_syn_aac_cfg1
+
+	//optimize RX SX pn
+	jam 0x90,core_syn_pfd_lkd_cfg
+	jam 0x0b,core_rf_ldo_cfg2
+	jam 0x05,core_rf_ldo_cfg3
+
+	//Improve auto agc
+	jam 0x76,core_agc_wb_sat_th
+	jam 0x76,core_agc_nb_sat_th
+
+	fetch 1,mem_fcomp_div
+	bne XTAL_16M,initialize_radio_cont_next
+	jam 0x34,core_clkpll_cfg5		//16M XTAL
+initialize_radio_cont_next:
+	jam 0xff,core_clkpll_ctrl1
+	nop 100
+	jam 0x0e,core_clkpll_ctrl2
+	jam 0x03,core_clkpll_ctrl0
+	
+	call set_tx_power_0db
+	
+	jam 0x2b,core_tx_mixer_cfg1
+	jam 0x13,core_tx_mixer_cfg2
+
+	call init_lpm_ctrl
+	nop 100
+	jam clksel_dpll,core_clksel
+	jam SYSTEM_CLK_12M,mem_system_clk
+	branch le_disable
+	
+
+initialize_syn_afc_cfg1:
+	fetch 1,mem_syn_afc_cfg1
+	nbranch initialize_syn_afc_cfg1_set,blank
+	setarg 0x29
+initialize_syn_afc_cfg1_set:	
+	store 1,core_syn_afc_cfg1
+	rtn
+
+initialize_rf_ldo_cfg1:
+	fetch 1,mem_rf_ldo_cfg1
+	nbranch initialize_rf_ldo_cfg1_set,blank
+	setarg 0x00
+initialize_rf_ldo_cfg1_set:
+	store 1,core_rf_ldo_cfg1
+	rtn
+
+initialize_rc_cal:
+	fetch 1,mem_rc_cal
+	branch initialize_rc_cal_set,blank
+	setarg 0xd3
+initialize_rc_cal_set:	
+	store 1,core_rx_bq_bw_cal
+	rtn
+	
+	
+save_rssi:
+	bpatch patch03_1,mem_patch03
+	 // bit6 is signed bit.
+	fetch 1,modem_nb_pow
+	isolate1 6,pdata
+	setflag true,7,pdata
+	store 1,mem_modem_rssi
+
+	fetch 1,modem_gain
+	and pdata,0x0f,temp
+	lshift temp,temp
+	rshift4 pdata,pdata
+	iadd temp,temp
+	mul32 temp,3,rega // (abb_gain + lna_gain*2)*3
+
+	fetch 1,mem_modem_rssi
+	call byte_sign_extern
+	sub pdata,0,pdata //-modem_nb_pow
+	iadd rega,pdata // (abb_gain + lna_gain*2)*3 + (-modem_nb_pow)
+	increase -9,pdata // (abb_gain + lna_gain*2)*3 + (-modem_nb_pow) - 9
+	and pdata,0x1ff,pdata
+	isolate1 8,pdata
+	nbranch save_rssi_store,true
+	setarg 0	 
+save_rssi_store:
+	store 1,mem_rssi_hex
+	branch rssi_hex2dec
+ 
+byte_sign_extern:
+	isolate1 7,pdata
+	nrtn true
+	arg 0xff00,temp
+	ior temp,pdata
+	rtn
+ 
+rssi_hex2dec:
+	fetch 1,mem_rssi_hex
+	call bcd
+	store 1,mem_rssi			 
+	rtn
+
+bcd:
+	and_into 0xff,pdata
+	div pdata,10
+	call get_div_result
+	lshift4 pdata,pdata
+	remainder temp
+	ior temp,pdata
+	rtn
+
+gain_control:
+	bpatch patch03_2,mem_patch03
+	fetch 1,mem_gain_fix
+	rtneq 0xff
+	nbranch  gain_increase,sync
+	fetch 1,mem_modem_rssi
+	sub pdata,0xf0,null
+	nbranch gain_descend,positive
+	sub pdata,0x7f,null
+	branch gain_descend,positive
+	
+	fetchr rega, 1,core_rf_rx_gain_fix
+	fetch 1,mem_gain_fix
+	rtneq 0	
+	arg mem_gain_table,contr
+	iadd contr,contr
+	ifetch 1,contr
+	isub rega,null
+	nrtn zero
+	increase -2,contr
+	ifetcht  1,contr
+	rshift4 temp,pdata
+	rshift4 rega,regb
+	isub regb,regb
+	and temp,0xf,pdata
+	and rega,0xf,rega
+	isub rega,rega
+	lshift rega,pdata
+	iadd regb,regb
+	mul32 regb,3,regb
+	fetcht 1,mem_modem_rssi
+	and temp,0x80,pdata
+	rtn blank
+add_negative:
+	setarg 0x100
+	isub temp,temp
+	copy regb,pdata
+	isub temp,pdata
+	rtn positive
+	and pdata,0xff,pdata
+	rtneq 0xff
+	rtneq 0xfe
+	
+gain_increase:	
+	fetch 1,mem_gain_fix
+	beq 1,set_rx_gain0
+	beq 2,set_rx_gain1
+//	beq 0,set_rx_gain0
+	branch set_rx_gain0
+	
+gain_descend:
+	fetch 1,mem_gain_fix
+	beq 0,set_rx_gain1
+	beq 1,set_rx_gain2
+//	beq 2,set_rx_gain2
+set_rx_gain2:
+	jam 2,mem_gain_fix
+	rtn
+
+set_rx_gain0:
+	jam 0,mem_gain_fix
+	rtn
+	
+set_rx_gain1:
+	jam 1,mem_gain_fix
+	rtn
+
+	
+xtal_fast_wake:
+	setarg 0xf0f
+	branch lpm_write_config
+
+init_lpm_ctrl:
+	setarg 0x80f
+	branch lpm_write_config
+
+
+
+	/* pdata = clks ahead of bt_clk */
+ahead_window:
+	copy pdata,temp
+	bpatch patch03_3,mem_patch03
+	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 clk2rt
+	iforce stop_watch
+	until null,timeout
+	rtn
+
+
+get_clk:
+	copy clkn,temp
+	rtn master
+	copy clke,temp
+	rtn
+
+get_clkbt:
+	deposit clkn_bt
+	rtn master
+	deposit clke_bt
+	rtn
+
+
+assert:
+	bpatch patch03_4,mem_patch03
+	branch assert
+	
+
+sleep:	
+	rtn blank
+	/* sleep pdata clocks, only even clocks are accurate */
+	rshift pdata,pdata
+	increase -3,pdata
+sleep_loop:	
+	increase -1,pdata
+	nbranch sleep_loop,zero
+	force 0,pdata
+	rtn
+
+
+
+init_param:
+	// clear specified sched ram 
+	setarg 0 
+	store 6,mem_le_adv_transmit
+	arg mem_le_state,contw
+	arg 10,loopcnt
+	call memset0
+	jam 0,mem_fifo_temp
+	jam 0,mem_le_testtype
+
+	setarg param_tx_setup
+	store 2,mem_param_tx_setup
+	setarg param_rf_setup
+	store 2,mem_param_rf_setup
+	setarg param_conn_access
+	store 2,mem_param_conn_access
+	setarg param_rx_setup
+	store 2,mem_param_rx_setup
+	setarg param_clke_cal
+	store 2,mem_param_clke_cal
+	setarg param_pll_setup
+	store 2,mem_param_pll_setup
+	setarg param_dpll_start_delay
+	store 2,mem_param_dpll_start_delay
+	setarg param_rt_rthalfslot
+	store 2,mem_param_rt_rthalfslot
+	setarg param_clke_cal_le_1m
+	store 2,mem_param_clke_cal_le_1m
+	setarg param_clke_cal_le_2m
+	store 2,mem_param_clke_cal_le_2m
+	setarg param_clke_cal_le_coded
+	store 2,mem_param_clke_cal_le_coded
+	
+//	call init_memp	
+ifdef SECURE_CONNECTION 
+	setarg mem_sp_state_end
+	arg mem_sp_state_start,contw
+	isub contw,loopcnt
+	call clear_mem
+endif
+
+	bpatch patch03_5,mem_patch03
+	rtn wake
+	setarg mem_ble_tx_buff0
+	store 2,mem_ble_l2cap_tx_buff0_ptr
+	setarg mem_ble_l2cap_tx_buff_size
+	store 2,mem_ble_l2cap_tx_buff_size_ptr	
+	rshift clkn_bt,pdata
+	store 4,mem_last_clkn
+	rtn
+
+
+/*
+这是1308/7/6芯片设计需要绕过的一个问题,如果芯片同事确认修复后，可以删除。
+修复的问题是，解决在lpm模式下，芯片会随机出现几十微安的异常电流。
+*/
+ldo_abb_en_init:
+	rtn wake
+	bpatch patch03_6,mem_patch03
+	fetch 1, core_rf_ldo_en0
+	set1 3, pdata
+	store 1, core_rf_ldo_en0
+	nop 1200
+	set0 3, pdata
+	store 1, core_rf_ldo_en0
+	rtn
+
+
+clk24m_init:
+	jam 6,core_clksel
+	jam 1,core_clksel
+	nop 10
+	setarg 7498
+	store 2,core_halfslot
+	rtn
+
+
+/*****************************************LPO************************************************/
+
+lpmstate:
+	setarg 0xee21
+	store 2,core_clkoff			// disable unused peripherals
+	fetch 4,core_gpio_in
+	store 4,mem_saved_gpio_in
+	jam 0x83,core_otp_ctrl		/* otp ceb rstn high before power on */
+	fetch 1,core_lpm_ctrl+3
+	store 1,mem_wakup_from_power_flag	//power up bit2 = 0
+	fetch 1,core_lpm_ldocnt
+	bbit0 gpio_latch,loadcode		// power up boot
+	enable wake
+	bbit0 cold_wake,lpmwake		
+	disable wake
+	deposit auxcnt
+	nbranch lpmwake,blank		// sleep interrupted, wakeup
+	fetch 1,core_lpm_ctrl+3
+	bbit1 reload_code,lpmwake
+	arg param_hibernate_clks,temp
+	branch lpm_enter_sleep
+lpmwake:
+	fetch 4,core_lpm_ctrl2
+	store 4,core_lpm_reg
+	fetch 1,core_lpm_ctrl2+1
+	and_into 0xe0,pdata			//digital aon ldo vout sel: 1.2v
+	store 1,core_lpm_reg+1
+	call lpm_write_ctrl3
+	fetch 3,core_lpm_xtalcnt
+	store 3,core_lpm_reg
+	ifetch 1,contr
+	or_into isogate_mask,pdata		// open all isolation gate&power switch
+	istore 1,contw
+	call lpm_write_ctrl2
+	fetch 1,core_lpm_isogate
+	set1 enable_retmem,pdata
+	store 1,core_lpm_isogate
+	call lpm_write_ctrl2
+	call lpm_load_context,wake
+	fetch 1,core_lpm_reg+2
+	set0 gpio_latch,pdata			// enable gpio fuction
+	store 1,core_lpm_reg+2
+	call lpm_write_ctrl2
+	nbranch loadcode,wake		// wakeup from hibernate
+	rtnmark0 mark_otp_encrypt
+	jam lock_otp,core_misc_ctrl	// disable further read/write of key
+	rtn 
+
+
+lpm_ctrl3_cfg_dig_vsel:
+	fetch 1,mem_dig_aon_vsel
+	beq 1,lpm_ctrl3_cfg_vsel_108
+	beq 2,lpm_ctrl3_cfg_vsel_096
+	beq 3,lpm_ctrl3_cfg_vsel_084
+lpm_ctrl3_cfg_vsel_120:
+	fetch 1,mem_lpm_ctrl3_aon_vsel
+	and_into 0xe0,pdata
+lpm_ctrl3_cfg_vsel_store:	
+	store 1,mem_lpm_ctrl3_aon_vsel
+	rtn
+lpm_ctrl3_cfg_vsel_108:
+	fetch 1,mem_lpm_ctrl3_aon_vsel
+	and_into 0xe0,pdata
+	or_into 0x1d,pdata
+	branch lpm_ctrl3_cfg_vsel_store
+lpm_ctrl3_cfg_vsel_096:
+	fetch 1,mem_lpm_ctrl3_aon_vsel
+	and_into 0xe0,pdata
+	or_into 0x1b,pdata
+	branch lpm_ctrl3_cfg_vsel_store
+lpm_ctrl3_cfg_vsel_084:
+	fetch 1,mem_lpm_ctrl3_aon_vsel
+	and_into 0xe0,pdata
+	or_into 0x17,pdata
+	branch lpm_ctrl3_cfg_vsel_store
+
+lpm_load_context:
+	fetch 1,mem_saved_spidctrl
+	store 1,core_spid_ctrl
+	arg mem_saved_gpio,contr
+	arg core_gpio_conf,contw
+	arg GPIO_NUMBER,loopcnt
+	call memcpy
+	fetch 8,mem_saved_mark
+	iforce mark
+	fetch 8,core_gpio_wakeup_low
+	store 8,mem_gpio_wakeup_low
+	branch load_ucode
+
+lpm_save_context:
+	deposit mark
+	store 8,mem_saved_mark
+	arg core_gpio_conf,contr
+	arg mem_saved_gpio,contw
+	arg GPIO_NUMBER,loopcnt
+	call memcpy
+	fetch 1,core_spid_ctrl
+	store 1,mem_saved_spidctrl
+	branch lpm_write_gpio_wakeup
+
+lpo_calibration:
+	fetch 1,core_aes_en
+	rshift2 pdata,pdata
+	and pdata,0xf,pdata
+	nbranch lpo_cal_inited,blank
+	fetch 3,mem_clks_per_lpo
+	nrtn blank
+	fetch 1,core_aes_en
+	or_into 0x30,pdata
+	store 1,core_aes_en
+	jam ccnt_start,core_misc_ctrl
+lpo_cal_inited:
+	fetch 1,core_perf_status
+	rtnbit0 1
+	fetch 3,core_clk_counter
+	store 3,mem_clks_per_lpo
+	rtn
+
+
+	/* temp is synced clke */
+lpm_adjust_clk:
+	bpatch patch03_7,mem_patch03
+	deposit clke
+	call clk_diff_rt
+	fetcht 4,mem_sleep_counter_all
+	sub temp,0xff,null
+	rtn positive				// interval too small
+	lshift8 pdata,pdata
+	lshift4 pdata,pdata
+	idiv temp
+	call get_div_result
+	arg param_lpm_adjmax,temp
+	call ceiling
+	store 1,mem_lpm_adjust
+	nbranch lpm_adjust_positive,user
+	sub pdata,0,pdata
+lpm_adjust_positive:
+	fetcht 3,mem_clks_per_lpo
+	iadd temp,pdata
+	store 3,mem_clks_per_lpo
+lpm_clear_counter:
+	setarg 0
+	store 4,mem_sleep_counter_all
+	rtn
+
+
+	/* temp is lpo counter for doze */
+//lpm_doze:
+//	fetch 1,mem_lpm_config+2
+//	set1 reload_code,pdata
+//	store 1,mem_lpm_config+2
+//	branch lpm_hibernate_normal
+	
+
+	/* no retention memory at all */
+lpm_hibernate:
+	arg param_hibernate_clks,temp
+	fetch 1,mem_lpm_config+1
+	set0 7,pdata					/* lowest lpo */
+	store 1,mem_lpm_config+1
+lpm_hibernate_normal:
+	bpatch patch04_0,mem_patch04
+	call lpm_write_gpio_wakeup
+	fetch 1,mem_lpm_hibernate_switch
+	store 1,mem_lpm_xtalcnt + 4
+	fetch 1,mem_lpm_xtalcnt + 2
+	set1 cold_wake,pdata
+	store 1,mem_lpm_xtalcnt + 2
+
+	/* temp is lpo clocks to sleep */
+lpm_sleep:
+	bpatch patch04_1,mem_patch04
+	call xtal_fast_wake
+	fetch 2,mem_cb_before_lpm_sleep
+	call callback_func
+lpm_sleep_skip_cb_function:
+	fetch 4,mem_sleep_counter_all
+	iadd temp,pdata
+	store 4,mem_sleep_counter_all
+	call lpm_save_context
+	call lpm_ctrl3_cfg_dig_vsel
+	fetch 4,mem_lpm_ctrl3
+	copy pdata,regb
+	fetch 5,mem_lpm_xtalcnt
+	store 4,core_lpm_reg
+	rshift32 pdata,rega
+	until null,lpo_edge
+	deposit clkn
+	store 6,mem_sleep_clkn
+	jam lpmreg_sel_ctrl2,core_lpm_wr
+	until null,lpo_edge
+	until null,lpo_edge
+	deposit rega
+	store 1,core_lpm_isogate
+	jam lpmreg_sel_ctrl2,core_lpm_wr
+	until null,lpo_edge
+	until null,lpo_edge
+	storer regb,4,core_lpm_reg
+	jam lpmreg_sel_ctrl3,core_lpm_wr
+lpm_enter_sleep:
+	until null,lpo_edge
+	until null,lpo_edge
+	storet 4,core_lpm_reg
+	jam lpmreg_sel_counter,core_lpm_wr
+	until null,never
+
+
+
+
+lpm_recover_clk:
+	bpatch patch04_2,mem_patch04
+	setarg 0
+	copy auxcnt,null
+	branch lpm_recover_timeout,zero
+	fetch 1,core_lpm_xtalcnt
+	fetcht 1,core_lpm_buckcnt
+	isub temp,null
+	branch lpm_recover_xtal,positive
+	deposit temp
+lpm_recover_xtal:
+	isub auxcnt,pdata
+	increase 1,pdata
+lpm_recover_timeout:
+	increase 10,pdata
+	until null,lpo_edge
+	iadd lpo_time,pdata
+	fetcht 4,mem_sleep_counter
+	iadd temp,pdata
+	fetcht 3,mem_clks_per_lpo
+	imul32 temp,pdata
+	rshift8 pdata,pdata
+	rshift4 pdata,pdata
+	increase param_lpm_fix,pdata
+	fetcht 2,mem_param_rt_rthalfslot
+	idiv temp
+	call get_div_result
+	lshift16 pdata,pdata
+	remainder temp
+	ior temp,pdata
+	fetcht 6,mem_sleep_clkn
+	call clk_add
+	copy temp,clkn
+	fetch 6,mem_context + coffset_clk_offset
+	call calc_clke2
+	deposit clke
+	store 6,mem_pdatatemp
+	deposit auxcnt
+	istore 1,contw
+	fetch 1,core_gpio_in1
+	or_into 0xf0,pdata
+	istore 1,contw
+	rtn
+	
+lpm_dispatch:
+	bpatch patch04_3,mem_patch04
+	call lpo_calibration
+	fetch 3,mem_clks_per_lpo
+	rtn blank
+	fetch 1,mem_lpm_mode
+	rtn blank
+ifdef 	SECURE_CONNECTION
+	fetch 1,mem_secure_connections_enable
+	branch lpm_dispatch_next,blank
+	fetch 1,mem_sc_local_key_invalid 	// simple pairing is not ready
+	rtn blank
+lpm_dispatch_next:
+	fetch 1,mem_sc_calc
+	nrtn blank	
+endif
+	arg context_check_a_wack,regc
+	call context_search
+	rtn zero
+	call lpm_check_wake_lock
+	nrtn blank
+	call context_check_idle						
+	nbranch lpm_dispatch_unconn,zero
+	rtn wake
+	bpatch patch04_4,mem_patch04
+	fetcht 1,mem_lpm_current_mult
+	fetch 2,mem_context + coffset_tsniff
+	imul32 temp,pdata
+	rshift4 temp,temp
+	rshift2 temp,temp
+	isub temp,pdata
+	fetcht 4,mem_context + coffset_sniff_anchor
+	iadd temp,pdata
+	fetcht 1,mem_lpm_overhead
+	isub temp,pdata
+	lshift16 pdata,alarm
+	fetch 2,mem_context + coffset_rx_window
+	rshift pdata,pdata
+	call clk2bt
+	deposit alarm
+	call clk_diff
+	copy clke,temp
+	call clk_diff_rt
+	rtn user
+lpm_dispatch_sleep:
+	call clk2lpo
+lpm_dispatch_lpo:
+	bpatch patch04_5,mem_patch04
+	fetch 1,mem_lpm_xtalcnt
+	isub temp,null
+	branch lpm_clear_counter,positive
+	storet 4,mem_sleep_counter
+	call app_will_enter_lpm
+//	call l2cap_lpm_save_txbuf
+	fetcht 4,mem_sleep_counter
+	branch lpm_sleep
+	
+lpm_dispatch_unconn:
+	bpatch patch04_6,mem_patch04
+	fetch 1,mem_le_adv_enable
+	nbranch lpm_unconn_cont,blank
+	rtn
+	
+lpm_unconn_cont:
+	fetch 2,mem_lpm_interval
+	rtn blank
+lpm_sleep_btclk:
+	fetcht 1,mem_lpm_overhead
+	isub temp,pdata
+	arg 7500,temp				
+	imul32 temp,pdata
+	branch lpm_dispatch_sleep
+
+	
+lpm_mult_wait_timeout:
+	fetch 2,mem_cb_bt_set_mult
+	call callback_func
+	nbranch lpm_mult_short,blank
+	jam 0,mem_lpm_current_mult
+	bmark0 mark_lpm_mult_enable,lpm_mult_short
+	fetch 1,mem_lpm_mult_cnt
+	branch lpm_mult_long,blank
+	increase -1,pdata
+	store 1,mem_lpm_mult_cnt
+	rtn
+
+
+
+
+lpm_match:
+	jam 0,mem_sniff_unint_lost
+	fetch 3,mem_sniff_rcv
+	increase 1,pdata
+	store 3,mem_sniff_rcv
+	rtn
+
+
+lpm_lost:
+	bpatch patch04_7,mem_patch04
+	jam 0,mem_lpm_current_mult
+	fetch 3,mem_sniff_lost
+	increase 1,pdata
+	store 3,mem_sniff_lost
+	fetch 1,mem_sniff_unint_lost
+	increase 1,pdata
+	store 1,mem_sniff_unint_lost
+	rtn
+
+lpm_mult_short:
+	jam 0,mem_lpm_current_mult
+	fetch 1,mem_lpm_mult_timeout
+	store 1,mem_lpm_mult_cnt
+	rtn
+
+lpm_mult_long:
+	fetcht 1,mem_lpm_mult
+	storet 1,mem_lpm_current_mult
+	rtn
+
+lpm_cal_xtal_startup:
+	fetch 1,mem_lpm_xtalcnt
+	nrtn blank
+	jam clksel_rc,core_clksel
+	setarg 0xf0c
+	call lpm_write_config
+	setarg 200000
+	call sleep
+	until null,lpo_edge
+	copy lpo_time,alarm
+	call xtal_fast_wake
+	jam clksel_xtal,core_clksel
+	nop 10
+	until null,lpo_edge
+	deposit lpo_time
+	isub alarm,pdata
+	increase 0x30,pdata
+	arg 0xff,temp
+	call ceiling
+	store 1,mem_lpm_xtalcnt
+	nop 30000
+	nop 30000
+	nop 30000	
+	rtn
+
+//lpm_cal_xtal_startup_by_snooze:
+//	fetch 1,mem_lpm_xtalcnt
+//	nrtn blank
+//	jam 0xff,core_xtal_stable_time
+//	jam clksel_rc,core_clksel
+//	call xtal_fast_wake
+//	setarg 1000
+//	iadd lpo_time,alarm
+//	snooze
+//	deposit lpo_time
+//	nop 12000	//delay about 1ms
+//	nop 12000	//delay about 1ms
+//	nop 12000	//delay about 1ms
+//	nop 12000	//delay about 1ms
+//	nop 12000	//delay about 1ms
+//	nop 12000	//delay about 1ms
+//	nop 12000	//delay about 1ms
+//	nop 12000	//delay about 1ms
+//	nop 12000	//delay about 1ms
+//	isub alarm,pdata
+//	add pdata,0x30,pdata
+//	arg 0xff,temp
+//	call ceiling
+//	store 1,mem_lpm_xtalcnt
+//	nop 30000
+//	nop 30000
+//	nop 30000	//delay 90000 nop
+//	rtn
+
+
+
+	/* pdata is lpm_reg[11:0] */
+lpm_write_config:
+	arg 0xfff,contw
+	iand contw,contw
+	fetch 1,mem_lpm_config
+	and_into 0xf0,pdata
+	lshift8 pdata,pdata
+	ior contw,pdata
+	store 2,core_lpm_reg
+	ifetch 2,contr
+	istore 2,contw
+
+lpm_write_ctrl:
+	bpatch patch05_0,mem_patch05
+	setarg lpmreg_sel_ctrl
+	branch lpm_write
+
+lpm_write_ctrl2:
+	bpatch patch05_1,mem_patch05
+	setarg lpmreg_sel_ctrl2
+lpm_write:
+	until null,lpo_edge
+	store 1,core_lpm_wr
+	until null,lpo_edge
+	until null,lpo_edge
+	rtn
+
+lpm_write_sel_vdd:
+	bpatch patch05_2,mem_patch05
+	fetch 4,core_lpm_ctrl2
+	store 4,core_lpm_reg
+	fetch 1,core_lpm_ctrl2
+	and_into 0x41,pdata
+	fetcht 1,mem_lpm_ctrl3_app_vsel
+	ior temp,pdata
+	store 1,core_lpm_reg
+lpm_write_ctrl3:
+	setarg lpmreg_sel_ctrl3
+	branch lpm_write
+
+
+lpm_write_gpio_wakeup:
+	bpatch patch05_3,mem_patch05
+	fetch 4,mem_gpio_wakeup_low
+	store 4,core_lpm_reg
+	setarg lpmreg_sel_gpiolow
+	call lpm_write
+	fetch 4,mem_gpio_wakeup_high
+	store 4,core_lpm_reg
+	setarg lpmreg_sel_gpiohigh
+	branch lpm_write
+
+lpm_get_wake_lock:
+	fetch 2,mem_lpm_wake_lock
+	qset1 pdata
+	store 2,mem_lpm_wake_lock
+	rtn
+
+lpm_put_wake_lock:
+	fetch 2,mem_lpm_wake_lock
+	qset0 pdata
+	store 2,mem_lpm_wake_lock
+	rtn
+
+
+
+lpm_check_wake_lock:
+	bpatch patch05_4,mem_patch05
+	call app_check_wake_lock
+	fetch 2,mem_lpm_wake_lock
+	copy pdata,rega
+	fetch 3,mem_tx_fifo3
+	nsetflag blank,wake_lock_ble_tx,rega
+	fetch UTIL_FIFO_LEN,mem_ipc_fifo_bt2c51
+	nsetflag blank,wake_lock_ipc_bt2c51,rega
+	fetch UTIL_FIFO_LEN,mem_ipc_fifo_c512bt
+	nsetflag blank,wake_lock_ipc_c512bt,rega
+	fetch 1,mem_hci_cmd
+	nsetflag blank,wake_lock_cmd,rega
+	fetch 1,mem_device_option
+	compare dvc_op_module,pdata,0xff
+	call lpm_uart_wake_lock,true
+	copy rega,pdata
+	store 2,mem_lpm_wake_lock
+	rtn
+
+lpm_uart_wake_lock:
+	fetch 2,core_uart_rxitems
+	nsetflag blank,wake_lock_uart_rx ,rega
+	fetch 2,core_uart_txitems
+	nsetflag blank,wake_lock_uart_tx ,rega
+	rtn
+
+lpm_shut_down:
+	fetch 4,core_lpm_ctrl
+	set0 27,pdata
+	store 4,core_lpm_reg
+	call lpm_write_ctrl
+	branch assert
+	
+lpm_disable_exen_output:
+	fetch 4,core_lpm_xtalcnt
+	set0 20,pdata
+	store 4,core_lpm_reg
+	branch lpm_write_ctrl2
+
+
Index: program/debug.prog
===================================================================
--- /branch/usb/usb_public_base/program/debug.prog	(revision 0)
+++ /branch/usb/usb_public_base/program/debug.prog	(working copy)
@@ -0,0 +1,66 @@
+
+// Rf debug
+
+/*****************************************************************************************************************************************************************************************
+    txon     txoff       rxon		      sync             crc pass    shutdown radio          match
+     _________          ______________    _________________     ___        ___                     
+    |         |        |              |  |                 |   |   |      |   |                   
+    |	      |        |              |  |                 |   |   |      |   |                   
+____|tx data  |________|   rx window  |__| rx data         |___|   |______|   |_______       __________
+
+*****************************************************************************************************************************************************************************************/
+
+rf_debug_rx_gpio_low:
+	fetch 1,mem_rf_debug_rx_gpio
+rf_debug_gpio_low:
+	arg gpcfg_output_low,temp
+	branch gpio_config_function
+
+rf_debug_rx_on_line:
+rf_debug_rx_gpio_high:
+	fetch 1,mem_rf_debug_rx_gpio
+rf_debug_gpio_high:
+	arg gpcfg_output_high,temp
+	branch gpio_config_function
+
+rf_debug_rx_gpio_h_l_h:
+	call rf_debug_rx_gpio_high
+rf_debug_rx_gpio_l_h:
+	call rf_debug_rx_gpio_low
+	branch rf_debug_rx_gpio_high
+
+rf_debug_rx_gpio_l_h_l:
+rf_debug_shutdown_radio_line:
+	call rf_debug_rx_gpio_l_h
+rf_debug_rx_crc_line:
+	branch rf_debug_rx_gpio_low
+
+rf_debug_rx_sync_line:
+	branch rf_debug_rx_gpio_l_h
+
+rf_debug_rx_crc_fail_line:
+	call rf_debug_rx_gpio_l_h
+	branch rf_debug_rx_gpio_l_h_l
+
+rf_debug_rx_match_line:
+rf_debug_rx_crc_error_line:
+rf_debug_rx_sync_timeout_line:
+	branch rf_debug_rx_gpio_low
+
+
+rf_debug_tx_off_line:
+rf_debug_tx_gpio_low:
+	fetch 1,mem_rf_debug_tx_gpio
+	branch rf_debug_gpio_low
+
+rf_debug_tx_on_line:
+rf_debug_tx_gpio_high:
+	fetch 1,mem_rf_debug_tx_gpio
+	branch rf_debug_gpio_high
+
+rf_debug_tx_gpio_l_h_l:
+	call rf_debug_tx_gpio_low
+	call rf_debug_tx_gpio_high
+	branch rf_debug_tx_gpio_low
+
+	
Index: program/fcc_auth.prog
===================================================================
--- /branch/usb/usb_public_base/program/fcc_auth.prog	(revision 0)
+++ /branch/usb/usb_public_base/program/fcc_auth.prog	(working copy)
@@ -0,0 +1,264 @@
+
+
+
+ifdef FCC_AUTH
+/*
+input:
+mem_fcc_ch     //选择频点:frequence = 2402MHz + mem_fcc_ch
+mem_fcc_txrx   //选择收发模式:发射模式(FCC_TX); 接收模式(FCC_RX)
+mem_fcc_data   //选择测试模式:发射载波(FCC_CARRIER); 发射数据/调制波(FCC_DATA)
+mem_fcc_tx_power   //选择发射功率
+mem_fcc_config_cb   //函数指针，可以把认证中的实现切换逻辑的函数地址赋值给它
+*/
+fcc_auth_config:
+	call pp_pn9
+	branch fcc_auth_procedures
+
+
+
+fcc_auth_procedures:
+	bpatch patch0c_5,mem_patch0c
+//以下变量保持默认值
+	jam FCC_DATA_RATE_1Mbps, mem_fcc_mod
+	jam FCC_BT_MODE, mem_fcc_btble
+	jam FCC_LEN_DH1, mem_fcc_data_length
+	jam FCC_FIXED_FREQ, mem_fcc_hop
+	
+	fetch 2, mem_fcc_config_cb
+	call callback_func
+	
+	fetch FCC_PARA_LEN,mem_fcc_param
+	store FCC_PARA_LEN,mem_fcc_param_new
+	fetch 1, mem_fcc_tx_power
+	store 1, mem_tx_power
+	
+	fetch 1, mem_fcc_txrx
+	beq FCC_TX, fcc_auth_tx_start
+	beq FCC_RX, fcc_auth_rx_start
+fcc_auth_tx_start:
+	fetcht 1,mem_fcc_ch
+	fetch 1,mem_fcc_btble
+	beq FCC_BLE_MODE,fcc_auth_ble_tx_on
+	beq FCC_BT_MODE,fcc_auth_bt_tx_on
+fcc_auth_ble_tx_on:
+	bpatch patch0c_6,mem_patch0c
+	call fcc_set_sync_on
+	call set_freq_tx
+	//disable enable_white
+	call fcc_le_enable
+	set1 TXGFSK,radio_ctrl
+	enable encode_fec0
+	enable is_tx
+	disable is_rx
+	call le_wait_tx
+	fetch 1,mem_fcc_data
+	store 1,core_tx_test_mode
+	branch fcc_auth_tx_data
+fcc_auth_tx_data:
+	bpatch patch0c_7,mem_patch0c
+	fetch 1,mem_fcc_mod
+	beq FCC_DATA_RATE_1Mbps,calculate_GFSK_modulation_length
+calculate_GFSK_modulation_length:	
+	fetch 1,mem_fcc_data_length
+	beq FCC_LEN_DH1,calculate_gfsk_modulation_length_dh1
+	beq FCC_LEN_DH3,calculate_gfsk_modulation_length_dh3
+	beq FCC_LEN_DH5,calculate_gfsk_modulation_length_dh5
+calculate_gfsk_modulation_length_dh1:
+	arg 53,loopcnt
+	arg mem_pn9,contr
+	branch pnloop_stable
+calculate_gfsk_modulation_length_dh3:
+	arg 203,loopcnt
+	arg mem_pn9,contr
+	branch pnloop_stable
+calculate_gfsk_modulation_length_dh5:
+	arg 354,loopcnt
+	arg mem_pn9,contr
+	branch pnloop_stable
+
+
+fcc_auth_bt_tx_on:
+	bpatch patch0d_0,mem_patch0d
+	//call p_test_ble_bt_rx_off	//close rx
+	call fcc_set_sync_on
+	call set_freq_tx
+	disable enable_white
+	enable encode_fec0
+	enable is_tx
+//call ice_break
+	fetcht 1,mem_fcc_mod
+	copy temp,radio_ctrl
+	fetch 1,mem_fcc_data
+	store 1,core_tx_test_mode
+	beq 0,fcc_auth_tx_data	
+test_tx_carrier_loop:
+	bpatch patch0d_1,mem_patch0d
+	fetch 1,mem_fcc_data_length
+	copy pdata,loopcnt
+	arg mem_pn9,contr
+pnloop_carrier:
+	ifetch 1,contr
+	inject mod,8
+	loop pnloop_carrier
+	
+	fetch 2, mem_fcc_config_cb
+	call callback_func
+	fetch FCC_PARA_LEN,mem_fcc_param
+	fetcht FCC_PARA_LEN,mem_fcc_param_new
+	isub temp,null
+	branch test_tx_carrier_loop,zero
+	branch fcc_auth_procedures
+
+pp_pn9:
+	arg mem_pn9_size,loopcnt
+ 	arg mem_pn9,contw
+  	setarg 0x1ff
+    	force 0,regb
+pp_pn9_loop:    
+    rshift3 pdata,rega
+    rshift rega,rega
+    ixor rega,rega
+    isolate1 0,rega
+    setflag true,9,pdata
+    rshift temp,temp
+    isolate1 0,pdata
+    setflag true,7,temp
+    rshift pdata,pdata
+    increase 1,regb
+    compare 0,regb,0x7
+    nbranch pp_pn9_loop,true
+    //copy temp,pdata
+    istoret 1,contw
+ //   inject mod,8
+    loop pp_pn9_loop
+    rtn
+
+
+
+
+fcc_le_enable:
+	bpatch patch0d_2,mem_patch0d
+	set0 mark_ble_lr,mark
+	jam 0x03,0x8901
+	jam 0x84,0x8920
+	jam 0xa7,0x8925
+	jam 0x03,0x8930
+	//jam 0x58,0x8933
+	//jam 0x0a,0x8934
+	jam 0x40,0x8937
+    jam 0x85,0x8a6d
+	jam 0x89,core_rx_bq_cfg0
+	fetch 1,mem_le_mode
+	rtnbit1 mark_ble_2M
+	jam 0x01,0x8901
+	jam 0x80,0x8920
+    jam 0x05,0x8a6d
+	jam 0x09,core_rx_bq_cfg0
+//	rtnbit0 mode_lr
+	set1 mark_ble_lr,mark
+	jam 0x05,0x8901
+	jam 0x24,0x8930
+    jam 0x0a,0x8934
+    	rtn
+
+fcc_shutdown_radio:
+	bpatch patch0d_3,mem_patch0d
+	force 0x08,radio_ctrl
+	force 0,radio_ctrl
+	disable is_rx
+	disable is_tx
+	pulse packet_end
+	jam 0x5,modem_en
+	nop 2
+	jam 0x0,modem_en
+	call fcc_set_sync_on
+	jam 0,core_syn_en
+	jam 0x10,core_rf_ldo_en0
+	jam 0,core_rf_ldo_en1	
+	rtn		
+fcc_test_ble_bt_tx_off:
+	branch fcc_shutdown_radio
+	
+pnloop_stable:
+	ifetch 1,contr
+	inject mod,8
+	loop pnloop_stable
+	call fcc_test_ble_bt_tx_off
+	enable swfine
+	arg 0x350,stop_watch
+stable_stop:
+	branch fcc_auth_procedures,timeout
+
+	fetch 2, mem_fcc_config_cb
+	call callback_func
+	fetch FCC_PARA_LEN,mem_fcc_param
+	fetcht FCC_PARA_LEN,mem_fcc_param_new
+	isub temp,null
+	branch stable_stop,zero
+	call fcc_test_ble_bt_tx_off
+	branch fcc_auth_procedures
+
+fcc_set_sync_on:
+	bpatch patch0d_4,mem_patch0d
+	jam 0x5,modem_en
+	nop 2
+	jam 0x0,modem_en					/* if called from tx or rx */
+	jam 0xaa,core_rf_ldo_cfg4
+	jam 0xaa,core_rf_ldo_cfg5
+	jam 0x15,core_rf_ldo_cfg6
+	jam 0xf8,core_rf_ldo_en0    //rom 0x78------ldo en
+
+	//rom
+//	fetch 1,core_clkpll_cfg6
+//	set1 7,pdata
+//	store 1,core_clkpll_cfg6
+	
+	jam 4,core_rf_ldo_en1
+	nop 120
+	jam 0x7a,core_syn_en
+	jam 0,core_rx_en0
+	jam 0,core_rx_en1
+	jam 0,core_tx_en0
+	jam 0,core_tx_en1
+	jam 0x2a,core_rf_ldo_cfg5
+	jam 0x78,core_rf_ldo_en0
+	//rom
+//	fetch 1,core_clkpll_cfg6
+//	set0 7,pdata
+//	store 1,core_clkpll_cfg6	
+	jam 0,core_syn_cal_ctrl
+	rtn
+
+
+fcc_auth_rx_start:
+	call fcc_test_ble_rx_on
+fcc_test_rx_loop:
+	bpatch patch0d_5,mem_patch0d
+//	call hci_rx_packet
+//	call p_interface_for_usb_cmd
+	fetch 2, mem_fcc_config_cb
+	call callback_func
+	fetch FCC_PARA_LEN,mem_fcc_param
+	fetcht FCC_PARA_LEN,mem_fcc_param_new
+	isub temp,null
+	branch fcc_test_rx_loop,zero
+	branch fcc_auth_procedures
+fcc_test_ble_rx_on:
+	bpatch patch0d_6,mem_patch0d
+	call fcc_test_ble_bt_tx_off	//close tx
+	call set_freq_rx
+	setarg param_pll_setup
+	call sleep
+	branch rf_rx_enable
+endif
+
+
+
+
+
+
+
+
+
+
+
Index: program/g24_protocol_stack/24g.prog
===================================================================
--- /branch/usb/usb_public_base/program/g24_protocol_stack/24g.prog	(revision 0)
+++ /branch/usb/usb_public_base/program/g24_protocol_stack/24g.prog	(working copy)
@@ -0,0 +1,545 @@
+
+
+g24_dispatch:
+	bpatchx patch24_4,mem_patch24
+	bmark1 mark_24g_rxmode,g24_receive_dispatch
+	branch g24_transmit_dispatch
+
+
+/****************************g24 base transceiver start********************************/
+
+g24_prep:
+	bpatchx patch24_5,mem_patch24
+	disable enable_crc
+	disable enable_white
+	setarg 0x555555
+	iforce crc24_init
+	fetch 1,mem_24g_ch
+	branch le_prep_next
+
+g24_receive_packet:
+	bpatchx patch24_6,mem_patch24
+	fetch 1,mem_24g_rx_phy
+	call le_enable_phy_by_pdata
+	fetch 4,mem_24g_addr
+	iforce access
+	call set_sync_on
+	fetcht 1,mem_24g_ch
+	call le_rf_rx_enable
+g24_receive_rxon:
+	call g24_prep
+	bmark0 mark_ble_lr,g24_receive_nolr
+	pulse dewhiten_code_calc
+	nop 30
+	call g24_prep
+g24_receive_nolr:
+	disable user3
+	enable decode_fec0
+	enable is_rx
+	disable is_tx
+	enable swfine
+	fetch 2,mem_24g_rx_window
+	iforce stop_watch
+	correlate null,timeout
+	nbranch g24_sync_timeout,sync
+	call rf_debug_rx_sync_line
+	bmark1 mark_ble_lr,g24_receive_skip_fec1
+	fetch 1,mem_24g_disable_fec1
+	nbranch g24_receive_skip_fec1,blank
+	disable decode_fec0	
+	enable decode_fec1	//lr do not use fec1
+g24_receive_skip_fec1:
+	enable enable_white
+	enable enable_crc
+	call g24_receive_byte
+	store 1,mem_24g_get_syncword_crc8
+	fetcht 1,mem_24g_syncword_crc8
+	isub temp,null
+	nbranch g24_end_of_packet,zero
+	bpatchx patch24_7,mem_patch24
+	disable user7
+	isolate1 mark_ble_lr,mark
+	call g24_lr_receive_pdu_len,true
+	branch g24_end_of_packet,user7
+	call g24_receive_byte
+	store 1,mem_24g_rxbuf	//device id
+	bmark1 mark_24g_rxmode,g24_receive_skip
+	fetch 1,mem_24g_rxbuf
+	fetcht 1,mem_24g_data_type
+	icompare bits_data,temp
+	nbranch g24_end_of_packet,true
+g24_receive_skip:
+	call g24_receive_byte
+	isolate1 mark_ble_lr,mark
+	call g24_lr_receive_payload_len,true
+	istore 1,contw
+	rshift3 pdata,pdata
+	sub pdata,0x1f,null
+	nbranch g24_end_of_packet,positive	//max payload: 32bytes
+	copy pdata,loopcnt
+	branch g24rx_nopayload,zero
+g24rx_loop:
+	call g24_receive_byte
+	istore 1,contw
+	loop g24rx_loop
+g24rx_nopayload:
+	bmark1 mark_24g_rxmode,g24_receive_skip_rssi
+	copy contw,rega
+	call g24_receive_byte
+	store 1,mem_rssi_hex_received	//receive rssi hex
+	copy rega,contw
+g24_receive_skip_rssi:
+	parse demod,bucket,24
+	rshift32 pdata,pdata
+	rshift16 pdata,pdata
+	istore 3,contw
+	fetch 1,mem_24g_disable_fec1
+	nbranch g24_receive_skip_disable_fec1,blank
+	disable decode_fec1
+g24_receive_skip_next:
+	isolate1 mark_24g_rxmode,mark
+	call save_rssi_dec,true
+	branch g24_end_of_packet,crc_failed
+	call rf_debug_rx_crc_line	//L
+	enable user3
+	call le_match_set_txfreq
+	bpatchx patch25_0,mem_patch25
+	rtnmark1 mark_24g_rxmode
+	fetch 1,mem_rssi_hex_received
+	fetcht 1,mem_rssi_hex_received_max_value
+	isub temp,null
+	call copy_temp2pdata,positive
+	branch rssi_signal
+
+g24_receive_skip_disable_fec1:
+	disable decode_fec0
+	branch g24_receive_skip_next
+	
+
+g24_lr_receive_pdu_len:
+	call g24_receive_byte
+	sub pdata,1,null
+	branch enable_user7,positive
+	increase -2,pdata	//minus hec and pdu length
+	bmark1 mark_24g_rxmode,g24_lr_receive_pdu_norssi
+	branch enable_user7,blank
+	increase -1,pdata	//minus rssi_hex length
+g24_lr_receive_pdu_norssi:
+	store 1,mem_temp	//payload length
+	rtn
+
+g24_lr_receive_payload_len:
+	and_into 0x07,pdata	//pdata[7:3]:length
+	fetcht 1,mem_temp	//payload length
+	lshift3 temp,temp
+	ior temp,pdata
+	rtn
+	
+g24_receive_byte:
+	parse demod,bucket,8
+	rshift3 pwindow,pdata
+	rtn
+
+g24_sync_timeout:
+	isolate1 mark_24g_rxmode,mark
+	call rssi_noise,true
+g24_end_of_packet:
+	bpatchx patch25_1,mem_patch25
+	call le_disable
+	disable encode_fec1
+	disable decode_fec1
+	branch end_of_packet
+
+g24_set_freq_tx:
+	call set_sync_on
+	fetcht 1,mem_24g_ch
+	branch set_freq_tx
+
+g24_transmit:
+	bpatchx patch25_2,mem_patch25
+	fetch 1,mem_24g_tx_phy
+	call le_enable_phy_by_pdata
+	fetch 4,mem_24g_addr
+	iforce access
+	call g24_prep
+	call g24_set_freq_tx
+	set1 TXGFSK,radio_ctrl
+	enable encode_fec0
+	enable is_tx
+	disable is_rx
+	call rf_debug_tx_on_line
+	disable lr_s2en
+	bmark1 mark_ble_lr,g24_transmit_lr
+	bmark1 mark_ble_2M,g24_transmit_2M
+	rshift16 access,pdata
+	rshift8 pdata,pdata
+	rshift4 pdata,pdata
+	inject mod,40
+g24_transmit_packet:
+	bpatchx patch25_3,mem_patch25
+	bmark1 mark_ble_lr,g24_transmit_nolr
+	fetch 1,mem_24g_disable_fec1
+	nbranch g24_transmit_nolr,blank
+	disable encode_fec0	
+	enable encode_fec1	////lr use encode_fec3
+g24_transmit_nolr:
+	enable enable_white
+	enable enable_crc
+	fetch 1,mem_24g_txlen
+	iforce loopcnt
+	arg mem_24g_txpayload,contr
+g24tr_loop:
+	ifetch 1,contr
+	inject mod,8
+	loop g24tr_loop
+	enable enable_parity
+	inject mod,24	//crc
+	disable enable_parity
+	bmark0 mark_ble_lr,g24_transmit_skip
+	disable enable_white
+	setarg 0
+	inject mod,3
+g24_transmit_skip:	
+	until null,tx_clear
+	nop 100
+	disable lr_s2en
+	disable encode_fec0
+	fetch 1,mem_24g_disable_fec1
+	nbranch g24_transmit_skip_disable_fec1,blank
+	disable encode_fec1
+g24_transmit_skip_disable_fec1:
+	disable encode_fec3
+	call set_sync_on
+	branch rf_debug_tx_off_line
+
+g24_transmit_lr:
+	arg 10,loopcnt
+g24_transmit_lr_preamble_loop:
+	setarg 0x3c
+	inject mod,8
+	loop g24_transmit_lr_preamble_loop
+	disable encode_fec0
+	enable encode_fec3
+	rshift16 access,pdata
+	rshift16 pdata,pdata
+	rshift4 pdata,pdata
+	inject mod,32
+	bmark1 mark_ble_lr_s8,g24_transmit_lr_s8
+g24_transmit_lr_s2:
+	setarg 1
+	inject mod,5
+	enable lr_s2en
+	branch g24_transmit_packet
+
+g24_transmit_lr_s8:
+	setarg 0
+	inject mod,5
+	branch g24_transmit_packet
+
+g24_transmit_2M:
+	fetch 1,mem_system_clk
+	rshift pdata,loopcnt
+g24_transmit_2M_dealy:
+	nop 2
+	loop g24_transmit_2M_dealy
+//	nop 36	//2M 前端发送比1M快3us左右
+	rshift16 access,pdata
+	rshift8 pdata,pdata
+	rshift4 pdata,temp
+	copy temp,pdata
+	inject mod,8
+	copy temp,pdata
+	inject mod,40
+	branch g24_transmit_packet
+
+/****************************g24 base transceiver end********************************/
+
+
+
+/****************************g24 general func start********************************/
+
+g24_transmit_prep:
+	bpatchx patch25_4,mem_patch25
+	fetch 1,mem_24g_tx_phy
+	bbit1 BIT_LE_CODED_PHY,g24_lr_transmit_prep
+// total length
+	fetch 1,mem_24g_datalen
+	increase 3,pdata	//hec/type/control
+	store 1,mem_24g_txlen
+//hec
+	fetch 1,mem_24g_syncword_crc8
+	store 1,mem_24g_txpayload
+// data type
+	fetch 1,mem_24g_data_type
+	istore 1,contw
+//prepare 5bit payload length, 2bit PID, 1bit NO_ACK
+	fetch 1,mem_24g_datalen
+g24_transmit_prep_pdu:
+	lshift3 pdata,pdata
+	fetcht 1,mem_24g_pid
+	and temp,0x03,temp
+	lshift temp,temp
+	ior temp,pdata
+	fetcht 1,mem_24g_no_ack
+	iadd temp,pdata
+	istore 1,contw
+//prepare payload data
+	fetch 1,mem_24g_datalen
+	iforce loopcnt
+	arg mem_24g_txbuf,contr
+	call memcpy
+	bpatchx patch25_5,mem_patch25
+//rssi hex	
+	rtnmark0 mark_24g_rxmode
+	fetch 1,mem_rssi_hex
+	istore 1,contw
+	fetch 1,mem_24g_tx_phy
+	rtnbit1 BIT_LE_CODED_PHY
+	fetch 1,mem_24g_txlen
+	increase 1,pdata	//plus rssi_hex length
+	store 1,mem_24g_txlen
+	rtn
+	
+g24_lr_transmit_prep:
+// total length
+	fetch 1,mem_24g_datalen
+	increase 4,pdata	//hec/pdu/type/control
+	bmark0 mark_24g_rxmode,g24_lr_transmit_prep_skip
+	increase 1,pdata	//mem_rssi_hex
+g24_lr_transmit_prep_skip:
+	store 1,mem_24g_txlen
+//hec
+	fetch 1,mem_24g_syncword_crc8
+	store 1,mem_24g_txpayload
+// pdu length
+	fetch 1,mem_24g_txlen
+	increase -2,pdata	//minus hec and pdu length
+	istore 1,contw
+// data type
+	fetch 1,mem_24g_data_type
+	istore 1,contw
+	setarg 0
+	branch g24_transmit_prep_pdu
+
+g24_read_len_pid_crc:
+	bpatchx patch25_6,mem_patch25
+//read control
+	fetch 1,mem_24g_rxbuf+1
+	rshift3 pdata,pdata
+	store 1,mem_24g_rxdata_length
+//get crc
+	increase 1,pdata
+	arg mem_24g_rxbuf+1,contr
+	iadd contr,contr
+	ifetch 3,contr
+	store 3,mem_24g_sta_crc
+//read pid
+	fetch 1,mem_24g_rxbuf+1
+	rshift pdata,pdata
+	and pdata,0x03,pdata
+	store 1,mem_24g_sta_pid
+	rtn
+
+	
+g24_ch:
+	bpatchx patch25_7,mem_patch25
+	fetcht 1,mem_24g_current_ch_number
+	call g24_ch_map_size
+	storet 1,mem_24g_current_ch_number
+	rtn
+
+g24_ch_map_size:
+	bpatchx patch26_0,mem_patch26
+	call g24_ch_calc
+	increase 1,temp
+	and_into 3,temp //map size =4
+	rtn
+	
+g24_ch_calc:
+	bpatchx patch26_1,mem_patch26
+	fetch 1,mem_24g_addr	
+	and_into 0x03,pdata
+	mul32 pdata,4,rega			//24addr low bit0 bit1 ,00-map1,01-map2,10-map3,11-map4
+	setarg mem_24g_ch_map1
+	iadd rega,pdata
+	iadd temp,contr
+	ifetch 1,contr
+	store 1,mem_24g_ch
+	rtn
+
+
+g24_update_addr_and_synccrc8:
+	store 4,mem_24g_addr
+//output: 1BYTE crc8
+	bpatchx patch26_2,mem_patch26
+g24_syncword_crc8:
+	arg 0,rega
+	arg 4,loopcnt
+	arg mem_24g_addr,contr
+g24_syncword_crc8_loop:
+	ifetch 1,contr
+	iadd rega,rega
+	loop 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
+
+
+g24_timer_check:
+	bpatchx patch26_3,mem_patch26
+	call disable_user
+	fetcht 4,mem_24g_tx_btclk
+	copy clkn_bt,pdata
+	isub temp,null
+	ncall g24_timer_timeout,positive
+	copy pdata,regb
+	fetch 4,mem_24g_tx_btclk
+	fetcht 1,mem_24g_interval
+	iadd temp,temp
+	copy regb,pdata
+	isub temp,null
+	nrtn positive
+	set0 28,pdata
+	store 4,mem_24g_tx_btclk
+	branch enable_user
+	
+g24_timer_timeout:
+	rtn zero
+	set1 28,pdata
+	rtn
+	
+g24_timer_init:
+	setarg 0
+	store 4,mem_24g_tx_btclk
+	rtn
+
+
+
+//mem_24g_ch_map1:00 13 2c 42
+//mem_24g_ch_map2:06 15 36 48
+//mem_24g_ch_map3:0f 1a 3a 4c
+//mem_24g_ch_map4:11 23 31 4d
+g24_chmap_param_init:
+	bpatchx patch26_4,mem_patch26
+	setsect 0,0x1300
+	setsect 1,0x1908b
+	setsect 2,0x36150
+	setsect 3,0x3d20
+	store 9,mem_24g_ch_map1
+	setsect 0,0x3a1a
+	setsect 1,0xc453
+	setsect 2,0xd312
+	setsect 3,0x1
+	istore 7,contw
+	fetch 1,mem_24g_ch_map_update
+	rtn blank
+	arg mem_24g_ch_update_map1,contr
+	arg mem_24g_ch_map1,contw
+	branch memcpy16
+
+
+
+//mem_24g_ch_update_map1:00 1e 00 4e
+//mem_24g_ch_update_map2:03 23 03 42
+//mem_24g_ch_update_map3:06 25 06 4c
+//mem_24g_ch_update_map4:09 27 09 3c
+g24_chamap_param_update:
+	bpatchx patch26_5,mem_patch26
+	setarg 0x4e001e
+	store 3,mem_24g_ch_update_map1+1
+	setarg 0x032303
+	istore 3,contw
+	setarg 0x250642
+	istore 3,contw
+	setarg 0x094c06
+	istore 3,contw
+	setarg 0x3c0927
+	istore 3,contw
+	jam 1,mem_24g_ch_map_update
+	rtn
+
+
+g24_rx_window_init:
+	bpatchx patch26_6,mem_patch26
+	arg 0x6978,temp
+	bmark1 mark_24g_rxmode,g24_rx_window_store
+	arg 0x12c0,temp
+	fetch 1,mem_24g_rx_phy
+	bbit0 2,g24_rx_window_store	//uncoded phy
+	arg 0x2ee0,temp
+g24_rx_window_store:	
+	storet 2,mem_24g_rx_window
+	rtn
+
+g24_enable_1M:
+	jam 0x01,mem_24g_rx_phy
+	jam 0x01,mem_24g_tx_phy
+	rtn
+
+g24_enable_2M:
+	jam 0x02,mem_24g_rx_phy
+	jam 0x02,mem_24g_tx_phy
+	rtn
+	
+//g24_enable_coded_s2:
+//	jam 0x04,mem_24g_rx_phy
+//	jam 0x04,mem_24g_tx_phy
+//	rtn
+
+//g24_enable_coded_s8:
+//	jam 0x84,mem_24g_rx_phy
+//	jam 0x84,mem_24g_tx_phy
+//	rtn
+
+
+/****************************g24 general func end********************************/
+
+
+
+/****************************g24 sim start********************************/
+/*
+g24_sim_rx:
+	set1 mark_24g_rxmode,mark
+	jam 1,mem_24g_rx_phy	//0x01:1M/0x02:2M/0x04:S2/0x84:S8
+	fetch 1,mem_24g_rx_phy
+	call le_enable_phy_by_pdata
+	jam 0,mem_24g_ch
+	setarg 0x123456
+	store 3,mem_24g_addr
+	istore 1,contw
+	call g24_syncword_crc8
+	setarg 0x3000
+	store 2,mem_24g_rx_window
+g24_sim_rx_loop:
+	call g24_receive_packet
+	call g24_read_len_pid_crc
+	call g24_end_of_packet
+	branch g24_sim_rx_loop
+
+g24_sim_tx:
+	jam 1,mem_24g_tx_phy
+	fetch 1,mem_24g_tx_phy
+	call le_enable_phy_by_pdata
+	jam 0,mem_24g_ch
+	setarg 0x123456
+	store 3,mem_24g_addr
+	istore 1,contw
+	call g24_syncword_crc8
+	jam 1,mem_24g_datalen
+	jam 1,mem_24g_txbuf
+	jam 0x88,mem_rssi_hex
+	call g24_transmit_prep
+g24_sim_tx_loop:
+	call g24_transmit
+	call g24_end_of_packet
+	branch g24_sim_tx_loop
+
+*/
+
+/****************************g24 sim end********************************/
+
+	
Index: program/g24_protocol_stack/24g_pair.prog
===================================================================
--- /branch/usb/usb_public_base/program/g24_protocol_stack/24g_pair.prog	(revision 0)
+++ /branch/usb/usb_public_base/program/g24_protocol_stack/24g_pair.prog	(working copy)
@@ -0,0 +1,401 @@
+
+
+g24_pair_param_init:
+	bpatchx patch26_7,mem_patch26
+	jam 0x4e,mem_24g_pair_ch
+	setarg 0x101520
+	store 3,mem_24g_pair_addr
+	setarg 0x05
+	istore 1,contw
+	rtn
+
+
+
+/****************************g24 pair transmitter start********************************/
+
+g24_pair_timeout_timer:
+	arg mem_24g_pair_timeout,regc
+	arg g24_stop_24g_mode,regb
+	branch timer_single_step_2B
+
+g24_pair_start:
+	set1 mark_24g,mark
+	fetch 1,mem_24g_conn_sm
+	set0 STATE_24G_RECONN,pdata
+	set1 STATE_24G_PAIR,pdata
+	store 1,mem_24g_conn_sm
+	setarg 0
+	store 2,mem_24g_reconn_timeout
+	fetch 2,mem_24g_pair_timeout_init
+	store 2,mem_24g_pair_timeout
+	jam 0,mem_24g_pair_no_ack
+	call g24_pair_sm_reinit
+g24_pair_init_param:
+	jam 0,mem_24g_pid
+	fetch 1,mem_24g_pair_ch
+	store 1,mem_24g_ch
+	fetch 1,mem_24g_pair_tx_power
+	store 1,mem_tx_power
+	fetch 4,mem_24g_pair_addr
+	branch g24_update_addr_and_synccrc8
+
+
+g24_pair_dispatch:
+	bpatchx patch27_0,mem_patch27
+	fetch 1,mem_24g_pair_sm
+	beq STATE_24G_PAIRING_SUCCESS,g24_pair_exit
+	beq STATE_24G_PAIRING_1,g24_pair_sm_1
+	beq STATE_24G_PAIRING_2,g24_pair_sm_2
+	beq STATE_24G_PAIRING_3,g24_pair_sm_3
+	beq STATE_24G_PAIRING_4,g24_pair_sm_4
+	rtn
+
+g24_pair_sm_1:
+	jam DATATYPE_ATTEMP,mem_24g_txbuf
+	branch g24_pair_sm_prep
+
+g24_pair_sm_2:
+	fetch 1,mem_24g_pair_switch
+	branch g24_pair_sm_2_skip,blank
+	fetch 4,mem_24g_device_addr
+	call g24_update_addr_and_synccrc8	//use transmitter addr
+g24_pair_sm_2_skip:
+	jam DATATYPE_BIND,mem_24g_txbuf	
+	branch g24_pair_sm_prep
+
+g24_pair_sm_3:
+	jam DATATYPE_CONFIG,mem_24g_txbuf	
+	fetch 1,mem_24g_pair_switch
+	branch g24_pair_sm_prep,blank
+	fetch 4,mem_24g_receiver_addr		//prep receiver addr
+	store 4,mem_24g_txbuf+2
+	branch g24_pair_sm_common
+
+g24_pair_sm_4:
+	jam DATATYPE_OK,mem_24g_txbuf
+g24_pair_sm_prep:
+	fetch 4,mem_24g_device_addr
+	store 4,mem_24g_txbuf+2
+g24_pair_sm_common:
+	fetch 1,mem_24g_data_type
+	and_into bits_data,pdata
+	store 1,mem_24g_txbuf+1
+	jam 0,mem_24g_txbuf+6
+	jam 7,mem_24g_datalen
+	call g24_transmit_prep
+	call g24_transmit_receive_ack
+	nrtn sync
+	nrtn user3
+	call g24_txbuf_clear
+	call g24_ackpayload_parse
+	bpatchx patch27_1,mem_patch27
+	fetch 1,mem_24g_pair_sm
+	rtneq STATE_24G_PAIRING_SUCCESS
+	beq STATE_24G_PAIRING_1,g24_pair_sm_1_waiting_ack
+	beq STATE_24G_PAIRING_2,g24_pair_sm_2_waiting_ack
+	beq STATE_24G_PAIRING_3,g24_pair_sm_3_waiting_ack
+	beq STATE_24G_PAIRING_4,g24_pair_sm_4_waiting_ack
+	rtn
+
+g24_pair_sm_reinit:	
+	jam STATE_24G_PAIRING_2,mem_24g_pair_sm
+	fetch 1,mem_24g_pair_switch
+	rtn blank
+	jam STATE_24G_PAIRING_1,mem_24g_pair_sm
+	rtn
+
+g24_pair_sm_1_waiting_ack:
+	jam STATE_24G_PAIRING_2,mem_24g_pair_sm
+	branch g24_transmit_abandon
+	
+g24_pair_sm_2_waiting_ack:
+	fetch 1,mem_24g_pair_switch
+	branch g24_pair_sm_2_waiting_ack_skip,blank
+	fetch 4,mem_24g_rxpayload+2
+	store 4,mem_24g_receiver_addr
+g24_pair_sm_2_waiting_ack_skip:	
+	jam STATE_24G_PAIRING_3,mem_24g_pair_sm
+	branch g24_transmit_abandon
+
+g24_pair_sm_3_waiting_ack:
+	fetch 1,mem_24g_pair_switch
+	branch g24_pair_sm_3_waiting_ack_skip,blank
+	fetch 4,mem_24g_rxpayload+2
+	fetcht 4,mem_24g_device_addr
+	isub temp,null
+	nrtn zero
+g24_pair_sm_3_waiting_ack_skip:	
+	jam STATE_24G_PAIRING_4,mem_24g_pair_sm
+	branch g24_transmit_abandon	
+	
+g24_pair_sm_4_waiting_ack:
+	fetch 1,mem_24g_pair_switch
+	branch g24_pair_sm_4_waiting_ack_skip,blank
+	fetch 4,mem_24g_rxpayload+2
+	fetcht 4,mem_24g_receiver_addr
+	isub temp,null
+	nrtn zero
+g24_pair_sm_4_waiting_ack_skip:	
+	jam STATE_24G_PAIRING_SUCCESS,mem_24g_pair_sm
+	jam BT_EVT_24G_PAIRING_COMPLETE,mem_fifo_temp
+	call ui_ipc_send_event
+	setarg 0
+	store 2,mem_24g_pair_timeout
+	fetch 4,mem_24g_rxpayload+2
+	call g24_update_addr_and_synccrc8
+g24_pair_exit:
+	fetch 1,mem_24g_conn_sm
+	set0 STATE_24G_PAIR,pdata
+	store 1,mem_24g_conn_sm
+	branch g24_transmit_abandon
+
+
+
+
+/****************************g24 pair transmitter end********************************/
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+/****************************g24 pair receiver start********************************/
+
+
+g24_bind_mode_enable:
+	jam DONGLE_BIND,mem_24g_work_mode
+	jam CLEAR_INIT,mem_24g_mode_init
+	rtn
+
+g24_bind_init:
+	fetch 1,mem_24g_mode_init
+	rtnbit1 DONGLE_BIND
+	set1 DONGLE_BIND,pdata
+	store 1,mem_24g_mode_init
+	setarg 0
+	store 3,mem_24g_device1_bind_step
+	store 4,mem_24g_transmitter_addr
+	jam 1,mem_24g_ackpayload_enable
+	branch g24_pair_init_param
+
+
+g24_bind_ackpayload_prep:
+	jam 1,mem_24g_ackpayload_enable
+	jam 0x08,mem_24g_datalen
+	arg mem_24g_bind_payload,contr
+	arg mem_24g_txbuf,contw
+	branch memcpy8
+
+
+g24_bind_data_process:
+	bpatchx patch27_2,mem_patch27
+	call g24_rx_interrupt_clear
+	call g24_receive_packet
+	nbranch g24_rx_interrupt_clear,user3
+	call g24_bind_data_parse
+	call g24_transmit_ack
+	call g24_bind_device_status_check
+	call dongle_kb_bind_soft_reset
+	fetch 1,mem_24g_pair_switch
+	rtn blank
+	fetch 4,mem_24g_transmitter_addr
+	rtn blank
+	branch g24_update_addr_and_synccrc8
+
+g24_bind_data_error:
+	call g24_rx_interrupt_clear
+	branch g24_end_of_packet
+
+g24_bind_data_parse:
+	jam BIND_MODE_CONTINUE,mem_24g_bind_mode_continue	//about 400ms
+	arg mem_24g_rxbuf,contr
+	arg mem_24g_rxdata_temp,contw
+	call memcpy8
+	bpatchx patch27_3,mem_patch27
+g24_bind_data_parse_next:
+	fetch 1,mem_24g_rxdata_temp+2
+	beq DATATYPE_BIND,g24_bind_first_step	//bind step 1
+	beq DATATYPE_CONFIG,g24_bind_second_step
+	beq DATATYPE_OK,g24_bind_third_step
+	beq DATATYPE_ATTEMP,g24_data_attemp
+	rtn
+
+
+g24_bind_first_step:
+	fetch 1,mem_24g_rxdata_temp+3
+	beq DATATYPE_DEVICE1,g24_bind_first_step_device1
+	beq DATATYPE_DEVICE2,g24_bind_first_step_device2
+	rtn
+
+g24_bind_first_step_device1:
+	jam 1,mem_24g_device1_bind_step
+g24_bind_dvc1_payload_cfg:
+	jam DATATYPE_DEVICE1,mem_24g_bind_payload
+g24_bind_payload_cfg:
+	jam 0x80,mem_24g_bind_payload+1
+	fetch 6,mem_24g_lap
+	store 6,mem_24g_bind_payload+2
+	rtn
+
+g24_bind_first_step_device2:
+	jam 1,mem_24g_device2_bind_step
+g24_bind_dvc2_payload_cfg:
+	jam DATATYPE_DEVICE2,mem_24g_bind_payload
+	branch g24_bind_payload_cfg
+
+
+g24_bind_second_step:
+	fetch 1,mem_24g_pair_switch
+	branch g24_bind_second_step_skip,blank
+	fetch 4,mem_24g_rxdata_temp+4
+	fetcht 4,mem_24g_lap
+	isub temp,null
+	nrtn zero
+g24_bind_second_step_skip:	
+	fetch 1,mem_24g_rxdata_temp+3
+	beq DATATYPE_DEVICE1,g24_bind_second_step_device1
+	beq DATATYPE_DEVICE2,g24_bind_second_step_device2
+	rtn
+
+g24_bind_second_step_device1:
+	fetch 1,mem_24g_device1_bind_step
+	beq 1,g24_bind_dvc1_step_set2
+	rtn
+g24_bind_dvc1_step_set2:
+	jam 2,mem_24g_device1_bind_step
+	fetch 1,mem_24g_pair_switch
+	branch g24_bind_dvc1_payload_cfg,blank
+g24_bind_dvc1_payload_cfg_transmitter_addr:
+	jam DATATYPE_DEVICE1,mem_24g_bind_payload
+g24_bind_payload_cfg_transmitter_addr:
+	jam 0x80,mem_24g_bind_payload+1
+	fetch 4,mem_24g_transmitter_addr
+	store 4,mem_24g_bind_payload+2
+	branch enable_user
+
+g24_bind_second_step_device2:
+	fetch 1,mem_24g_device2_bind_step
+	beq 1,g24_bind_dvc2_step_set2
+	rtn
+g24_bind_dvc2_step_set2:
+	jam 2,mem_24g_device2_bind_step
+	fetch 1,mem_24g_pair_switch
+	branch g24_bind_dvc2_payload_cfg,blank	
+	jam DATATYPE_DEVICE2,mem_24g_bind_payload
+	branch g24_bind_payload_cfg_transmitter_addr
+
+
+g24_bind_third_step:
+	fetch 1,mem_24g_pair_switch
+	branch g24_bind_third_step_skip,blank
+	fetch 4,mem_24g_rxdata_temp+4
+	fetcht 4,mem_24g_transmitter_addr
+	isub temp,null
+	nrtn zero
+g24_bind_third_step_skip:
+	fetch 1,mem_24g_rxdata_temp+3
+	beq DATATYPE_DEVICE1,g24_bind_third_step_device1
+	beq DATATYPE_DEVICE2,g24_bind_third_step_device2
+	rtn
+
+g24_bind_third_step_device1:
+	fetch 1,mem_24g_device1_bind_step
+	beq 2,g24_bind_dvc1_step_success
+	rtn
+g24_bind_dvc1_step_success:
+	call g24_binding_dvc1_living	//works on auto pair only
+	call g24_bind_dvc1_payload_cfg
+	fetch 1,mem_24g_bind_device_status
+	or_into 0x01,pdata
+	store 1,mem_24g_bind_device_status
+g24_bind_exit:
+	setarg 0
+	store 2,mem_24g_device1_bind_step
+	rtn
+	
+g24_bind_third_step_device2:
+	fetch 1,mem_24g_device2_bind_step
+	bne 0,g24_bind_dvc2_step_success
+	rtn
+g24_bind_dvc2_step_success:
+	call g24_binding_dvc2_living	//works on auto pair only
+	call g24_bind_dvc2_payload_cfg
+	fetch 1,mem_24g_bind_device_status
+	or_into 0x02,pdata
+	store 1,mem_24g_bind_device_status
+	call g24_bind_exit
+	branch dongle_g24_store_dvc2_bind_flag
+
+g24_binding_device_check:	//works on auto pair
+	fetch 1,mem_24g_work_mode
+	rtnne DONGLE_BIND
+	fetch 1,mem_24g_pair_mode
+	nrtn blank
+	fetch 1,mem_24g_rxbuf+3
+	beq DATATYPE_DEVICE1,g24_binding_dvc1_status	//bit0
+	beq DATATYPE_DEVICE2,g24_binding_dvc2_status	//bit1
+	rtn
+g24_binding_dvc1_status:
+	fetch 1,mem_24g_bind_device_living
+	rtnbit0 0
+disable_user3:
+	disable user3
+	rtn 
+g24_binding_dvc2_status:
+	fetch 1,mem_24g_bind_device_living
+	rtnbit0 1
+	branch disable_user3
+
+g24_binding_dvc1_living:
+	fetch 1,mem_24g_pair_mode
+	nrtn blank
+	fetch 1,mem_24g_bind_device_living
+	or_into 0x01,pdata
+	store 1,mem_24g_bind_device_living
+	rtn
+
+g24_binding_dvc2_living:
+	fetch 1,mem_24g_pair_mode
+	nrtn blank
+	fetch 1,mem_24g_bind_device_living
+	or_into 0x02,pdata
+	store 1,mem_24g_bind_device_living
+	rtn
+
+
+g24_bind_device_status_check:
+	fetch 1,mem_24g_bind_device_status
+	rtn blank
+g24_bind_device_status:
+	fetch 1,mem_24g_rxdata_temp+3
+	beq DATATYPE_DEVICE1,g24_binding_dvc1_living
+	beq DATATYPE_DEVICE2,g24_binding_dvc2_living
+	rtn
+
+
+
+/****************************g24 pair receiver end********************************/
+
+
+
+
+
+
+
+
+
+
+
+
+
Index: program/g24_protocol_stack/24g_receiver.prog
===================================================================
--- /branch/usb/usb_public_base/program/g24_protocol_stack/24g_receiver.prog	(revision 0)
+++ /branch/usb/usb_public_base/program/g24_protocol_stack/24g_receiver.prog	(working copy)
@@ -0,0 +1,564 @@
+
+g24_receive_init:
+	set1 mark_24g_rxmode,mark
+	fetch 1,mem_tx_power
+	store 1,mem_tx_power_temp
+	call g24_rx_window_init
+	branch rssi_receiver_buff_init
+
+g24_receive_dispatch:
+	fetch 2,mem_cb_24g_receive_process
+	branch callback_func
+
+g24_ackpayload_prep:
+	bpatchx patch27_4,mem_patch27
+	jam 0,mem_24g_datalen
+	fetch 1,mem_24g_ackpayload_enable
+	rtn blank
+	fetch 2,mem_cb_24g_ackpayload
+	branch callback_func
+
+
+g24_receive_packet_start:
+	call g24_receive_transmit_ack
+	nbranch g24_rx_interrupt_clear,user3
+g24_receive_packet_parse:
+	call g24_receive_packet_parse_pid_crc
+	nbranch g24_rx_interrupt_clear,user
+	fetch 1,mem_24g_rxdata_length
+	branch g24_rx_interrupt_clear,blank
+	increase 2,pdata
+	iforce loopcnt
+	arg mem_24g_rxbuf,contr
+	arg mem_24g_rxdata_temp,contw
+	call memcpy
+	jam 0,mem_24g_mode_switch
+	fetch 1,mem_24g_pair_mode
+	call g24_enable_nodata_timer,blank
+	bpatchx patch27_5,mem_patch27
+	fetch 1,mem_24g_rxdata_temp+2
+	beq DATATYPE_DEVICE1,g24_data_device1	//mouse
+	beq DATATYPE_DEVICE2,g24_data_device2	//keyboard
+	beq DATATYPE_ATTEMP,g24_data_receive_attemp	//reconn packet
+g24_rx_interrupt_clear:
+	bpatchx patch27_6,mem_patch27
+	arg mem_24g_rxbuf,contw
+	arg 66,loopcnt
+	branch clear_mem
+
+g24_data_receive_attemp:
+	call g24_bind_device_status		//works on auto pair only
+	branch g24_data_attemp
+
+g24_data_device1:
+	call g24_binding_dvc1_living	//works on auto pair only
+	call g24_ch_timer_reinit
+	fetch 1,mem_24g_abort_packet
+	fetcht 1,mem_24g_rxdata_temp
+	isolate1 bit_abort,temp
+	setflag true,0,pdata
+	store 1,mem_24g_abort_packet
+	beq 1,g24_data_attemp_device1_abort
+	fetch 1,mem_24g_hop_packet
+	fetcht 1,mem_24g_rxdata_temp
+	isolate1 bit_hop,temp
+	setflag true,0,pdata
+	store 1,mem_24g_hop_packet
+	fetch 2,mem_cb_24g_data_device1
+	branch callback_func
+
+g24_data_device2:
+	call g24_binding_dvc2_living	//works on auto pair only
+	fetcht 1,mem_24g_rxdata_temp
+	isolate1 bit_abort,temp
+	branch g24_data_attemp_device2_abort,true
+	fetch 2,mem_cb_24g_data_device2
+	branch callback_func
+
+g24_data_attemp_device1_abort:
+	fetch 1,mem_device_option
+	sub pdata,dvc_op_car,null
+	call car_stop_blink,zero
+	fetch 4,mem_24g_rxdata_temp+10
+	branch g24_store_device1_addr
+g24_data_attemp_device2_abort:
+	fetch 4,mem_24g_rxdata_temp+10
+	branch g24_store_device2_addr	
+
+
+g24_receive_packet_parse_pid_crc:
+	call disable_user
+	fetch 1,mem_24g_sta_pid
+	fetcht 1,mem_24g_last_pid
+	isub temp,null
+	ncall enable_user,zero
+	fetch 1,mem_24g_sta_pid
+	store 1,mem_24g_last_pid
+	fetch 3,mem_24g_sta_crc
+	fetcht 3,mem_24g_last_crc
+	isub temp,null
+	ncall enable_user,zero
+	fetch 3,mem_24g_sta_crc
+	store 3,mem_24g_last_crc
+	rtn
+
+g24_receive_transmit_ack:
+	call g24_rx_interrupt_clear
+	call g24_receive_packet
+	nrtn user3
+g24_transmit_ack:
+//data type
+	fetch 1,mem_24g_rxbuf
+	store 1,mem_24g_data_type
+//read len pid crc
+	call g24_read_len_pid_crc
+//read ack
+	fetch 1,mem_24g_rxbuf+1
+	isolate1 bit_ack_24g,pdata
+	branch g24tx_no_ack,true
+g24tx_with_ack:
+	call g24_ackpayload_prep
+	call g24_transmit_prep
+	call g24_transmit
+g24tx_no_ack:
+	branch g24_end_of_packet
+
+
+g24_enable_nodata_timer:
+	jam 1,mem_24g_nodata_timer_enable
+g24_enable_nodata_timer_init:
+	setarg TIMER_NODATA_DELAY
+	arg G24_TIMER_NODATA,queue
+	branch timer_init
+
+
+
+/****************************g24 receiver mode switch start********************************/
+
+g24_mode_switch_init:
+	bpatchx patch27_7,mem_patch27
+	jam 1,mem_24g_mode_switch
+	jam 0,mem_24g_time_slice
+	jam 0xff,mem_24g_interval
+	branch g24_timer_init
+	
+g24_mode_switch_bind_work:
+	bpatchx patch28_0,mem_patch28
+	fetch 1,mem_24g_mode_switch
+	rtn blank
+	call g24_timer_check
+	nrtn user	//80ms
+	call g24_bind_mode_continue
+	fetch 1,mem_24g_time_slice
+	increase 1,pdata
+	and_into 1,pdata
+	store 1,mem_24g_time_slice
+	beq 0,g24_work_mode_switch
+	beq 1,g24_bind_mode_switch
+	rtn
+
+g24_bind_mode_continue:
+	fetch 1,mem_24g_bind_mode_continue
+	rtn blank
+	increase -1,pdata
+	store 1,mem_24g_bind_mode_continue
+	rtn
+
+g24_work_mode_switch:
+	fetch 1,mem_24g_bind_mode_continue
+	nrtn blank
+	branch g24_switch_work_mode
+
+g24_bind_mode_switch:
+	fetch 1,mem_24g_bind_mode_continue
+	nrtn blank
+	branch g24_bind_mode_enable
+
+
+g24_mode_B_S_switch_init:	//bind and search
+	fetch 1,mem_24g_B_S_mode_switch_disable
+	nrtn blank
+	fetch 1,mem_24g_mode_B_S_switch_exit
+	call g24_mode_B_S_switch_start,blank
+	fetch 1,mem_24g_mode_B_S_switch_init
+	rtnbit1 0
+	set1 0,pdata
+	store 1,mem_24g_mode_B_S_switch_init
+	jam 1,mem_24g_mode_B_S_switch
+	jam 0,mem_24g_B_S_time_slice
+	setarg 0
+	store 2,mem_24g_mode_B_S_switch_cnt
+	jam 0x60,mem_24g_interval	//30ms
+	branch g24_timer_init
+
+g24_mode_switch_bind_search:
+	bpatchx patch28_1,mem_patch28
+	fetch 1,mem_24g_work_mode
+	rtneq DONGLE_WORK
+	fetch 1,mem_24g_B_S_mode_switch_disable
+	nrtn blank
+	fetch 1,mem_24g_mode_B_S_switch_exit
+	nrtn blank
+	fetch 1,mem_24g_mode_B_S_switch
+	rtn blank
+	call g24_timer_check
+	nrtn user
+	fetch 2,mem_24g_mode_B_S_switch_cnt
+	increase 1,pdata
+	store 2,mem_24g_mode_B_S_switch_cnt
+	arg 0x7d0,temp	//1min
+	isub temp,null
+	branch g24_mode_B_S_switch_exit,positive
+	call g24_bind_mode_continue
+	fetch 1,mem_24g_B_S_time_slice
+	increase 1,pdata
+	and_into 1,pdata
+	store 1,mem_24g_B_S_time_slice
+	beq 0,g24_mode_switch_search
+	beq 1,g24_bind_mode_enable
+	rtn
+
+g24_mode_switch_search:
+	fetch 1,mem_24g_bind_mode_continue
+	nbranch g24_bind_mode_enable,blank
+	branch g24_search_mode_enable
+
+g24_mode_B_S_switch_exit:
+	jam 1,mem_24g_mode_B_S_switch_exit
+	branch g24_search_mode_enable
+
+g24_mode_B_S_switch_stop:
+	jam 0,mem_24g_mode_B_S_switch
+	rtn
+g24_mode_B_S_switch_start:
+	jam 1,mem_24g_mode_B_S_switch
+	rtn
+
+
+
+/****************************g24 receiver mode switch end********************************/
+
+
+
+
+/****************************g24 receiver work mode start********************************/
+
+g24_work_init:
+	bpatchx patch28_2,mem_patch28
+	fetch 1,mem_24g_mode_init
+	rtnbit1 DONGLE_WORK
+	set1 DONGLE_WORK,pdata
+	store 1,mem_24g_mode_init
+	fetch 1,mem_tx_power_temp
+	store 1,mem_tx_power
+	jam 0,mem_24g_ackpayload_enable
+	jam 0,mem_usb_tx_enable
+	jam 1,mem_24g_abort_packet
+	jam 0,mem_24g_pid
+	fetch 4,mem_24g_lap
+	call g24_update_addr_and_synccrc8
+	call g24_ch
+	branch g24_rx_interrupt_clear
+
+
+g24_switch_work_mode:
+	jam 0,mem_24g_ackpayload_enable
+g24_work_mode_enable:
+	jam DONGLE_WORK,mem_24g_work_mode
+	jam CLEAR_INIT,mem_24g_mode_init	
+	rtn
+
+
+g24_work_mode_start:
+	fetch 1,mem_24g_work_mode
+	rtnne DONGLE_WORK
+	call g24_work_init
+	call g24_ch_process
+	branch g24_receive_packet_start
+
+
+
+/****************************g24 receiver work mode end********************************/
+
+
+
+
+
+
+/****************************g24 receiver bind mode start********************************/
+
+g24_bind_mode_auto:
+	bpatchx patch28_3,mem_patch28
+	fetch 1,mem_24g_work_mode
+	rtnne DONGLE_BIND
+	call g24_bind_init
+	call g24_bind_data_process
+	fetch 1,mem_24g_pair_mode
+	nrtn blank
+	fetch 1,mem_24g_bind_device_status
+	rtn blank
+	jam 0,mem_24g_mode_switch
+	call g24_switch_work_mode
+	call g24_enable_nodata_timer
+	branch g24_timer_init
+
+
+/****************************g24 receiver bind mode end********************************/
+
+
+
+
+
+
+/****************************g24 receiver search mode start********************************/
+
+g24_search_mode_init:
+	fetch 1,mem_24g_mode_init
+	rtnbit1 DONGLE_SEARCH
+	set1 DONGLE_SEARCH,pdata
+	store 1,mem_24g_mode_init
+	jam 0,mem_24g_time_slice
+	jam 1,mem_24g_ackpayload_enable
+	setarg 0
+	store 3,mem_rssi_noise_self_index
+	store 7,mem_24g_self_config_ch_once
+	call g24_receiver_addr_check
+	nrtn zero
+	fetch 1,mem_24g_current_ch_number
+	store 1,mem_24g_self_ch_number
+	fetch 1,mem_24g_ch
+	store 1,mem_24g_self_last_ch
+	rtn
+
+
+g24_search_mode_auto:
+	bpatchx patch28_4,mem_patch28
+	fetch 1,mem_24g_work_mode
+	rtnne DONGLE_SEARCH
+	call g24_search_mode_init
+	call g24_auto_addr_ch_search
+	call g24_receive_transmit_ack
+	nbranch g24_rx_interrupt_clear,user3
+	//dongle addr,then parse rxdata
+	call g24_receiver_addr_check
+	call g24_receive_packet_parse,zero
+
+	fetch 1,mem_24g_abort_packet
+	call g24_mode_B_S_switch_stop,blank	//works on auto pair only
+	
+	//receive data,then go to paired
+	jam DONGLE_WORK,mem_24g_work_mode
+	fetch 1,mem_24g_mode_init
+	set1 DONGLE_WORK,pdata
+	store 1,mem_24g_mode_init
+
+	fetch 1,mem_24g_ackpayload_enable
+	sub pdata,2,null
+	ncall g24_ackpayload_disable,zero
+
+	call g24_rx_interrupt_clear
+	call g24_enable_nodata_timer
+	call g24_receiver_addr_check
+	branch g24_self_ch_num_reinit,zero
+	fetch 4,mem_24g_addr
+	fetcht 4,mem_24g_device2_addr
+	isub temp,null
+	branch g24_device2_ch_num_reinit,zero		
+	fetch 4,mem_24g_addr
+	fetcht 4,mem_24g_device1_addr
+	isub temp,null
+	branch g24_device1_ch_num_reinit,zero
+	rtn
+
+
+g24_self_ch_num_reinit:
+	fetch 1,mem_24g_self_ch_number
+g24_current_ch_num_reinit:
+	store 1,mem_24g_current_ch_number
+	rtn
+
+g24_device2_ch_num_reinit:
+	fetch 1,mem_24g_device2_ch_number
+	branch g24_current_ch_num_reinit
+
+g24_device1_ch_num_reinit:
+	fetch 1,mem_24g_device1_ch_number
+	branch g24_current_ch_num_reinit
+
+
+g24_auto_addr_ch_search:
+	bpatchx patch28_5,mem_patch28
+	fetch 1,mem_24g_time_slice
+	increase 1,pdata
+	and_into 3,pdata
+	store 1,mem_24g_time_slice
+	//pairing address and channel come first
+	beq 0,g24_auto_bind_config_device2
+	beq 1,g24_auto_bind_config_self
+	beq 2,g24_auto_bind_config_device1
+	beq 3,g24_auto_bind_config_self
+	rtn
+
+g24_auto_bind_config_device1:
+	call g24_bind_dvc1_payload_cfg
+	fetch 4,mem_24g_device1_addr
+	branch g24_auto_addr_ch_search,blank
+	call g24_update_addr_and_synccrc8
+	fetch 1,mem_24g_device1_config_ch_once
+	call g24_device1_config_ch_once,blank
+	fetch 1,mem_24g_device1_last_ch
+	store 1,mem_24g_ch
+	fetcht 1,mem_rssi_noise_device1_index
+	fetchr rega,2,mem_rssi_noise_device1_buffer_ptr
+	call rssi_store
+	storet 1,mem_rssi_noise_device1_index
+	call rssi_average
+	storet 1,mem_rssi_noise_device1_avg
+	sub temp,RSSI_THRESH_NOISE,null
+	nrtn positive
+	fetcht 1,mem_24g_device1_ch_number
+	call g24_ch_map_size
+	storet 1,mem_24g_device1_ch_number
+	store 1,mem_24g_device1_last_ch
+	rtn
+
+g24_device1_config_ch_once:
+	jam 1,mem_24g_device1_config_ch_once
+	arg 0,temp
+	call g24_ch_calc
+	store 1,mem_24g_device1_last_ch
+	rtn
+	
+g24_auto_bind_config_device2:
+	call g24_bind_dvc2_payload_cfg
+	fetch 4,mem_24g_device2_addr
+	branch g24_auto_addr_ch_search,blank
+	call g24_update_addr_and_synccrc8
+	fetch 1,mem_24g_device2_config_ch_once
+	call g24_device2_config_ch_once,blank
+	fetch 1,mem_24g_device2_last_ch
+	store 1,mem_24g_ch
+	fetcht 1,mem_rssi_noise_device2_index
+	fetchr rega,2,mem_rssi_noise_device2_buffer_ptr
+	call rssi_store
+	storet 1,mem_rssi_noise_device2_index
+	call rssi_average
+	storet 1,mem_rssi_noise_device2_avg
+	sub temp,RSSI_THRESH_NOISE,null
+	nrtn positive
+	fetcht 1,mem_24g_device2_ch_number
+	call g24_ch_map_size
+	storet 1,mem_24g_device2_ch_number
+	store 1,mem_24g_device2_last_ch
+	rtn
+
+g24_device2_config_ch_once:
+	jam 1,mem_24g_device2_config_ch_once
+	arg 0,temp
+	call g24_ch_calc
+	store 1,mem_24g_device2_last_ch
+	rtn	
+
+g24_auto_bind_config_self:
+	call g24_bind_dvc1_payload_cfg
+	fetch 4,mem_24g_lap
+	call g24_update_addr_and_synccrc8
+	fetch 1,mem_24g_self_config_ch_once
+	call g24_self_config_ch_once,blank
+	fetch 1,mem_24g_self_last_ch
+	store 1,mem_24g_ch
+	fetcht 1,mem_rssi_noise_self_index
+	fetchr rega,2,mem_rssi_noise_self_buffer_ptr
+	call rssi_store
+	storet 1,mem_rssi_noise_self_index
+	call rssi_average
+	storet 1,mem_rssi_noise_self_avg
+	sub temp,RSSI_THRESH_NOISE,null
+	nrtn positive
+	fetcht 1,mem_24g_self_ch_number
+	call g24_ch_map_size
+	storet 1,mem_24g_self_ch_number
+	store 1,mem_24g_self_last_ch
+	rtn
+
+g24_self_config_ch_once:
+	jam 1,mem_24g_self_config_ch_once
+	fetch 1,mem_24g_self_last_ch
+	store 1,mem_24g_ch
+	rtn
+
+
+g24_ackpayload_disable:
+	jam 0,mem_24g_ackpayload_enable
+	rtn
+
+
+g24_receiver_addr_check:
+	fetch 4,mem_24g_addr
+	fetcht 4,mem_24g_lap
+	isub temp,null
+	rtn
+
+/****************************g24 receiver search mode end********************************/
+
+
+
+
+
+
+/****************************g24 receiver nodata process start********************************/
+
+
+g24_nodata_process:
+	fetch 1,mem_24g_ackpayload_enable
+	rtneq 2
+	fetch 1,mem_24g_nodata_timer_enable
+	rtn blank
+	arg G24_TIMER_NODATA,queue
+	call timer_check
+	nrtn blank
+	jam 0,mem_24g_nodata_timer_enable
+	jam 0,mem_24g_bind_mode_continue
+	call g24_mode_B_S_switch_init	//works on auto pair only	
+	//no data for more than 100ms,then go to search
+g24_search_mode_enable:	
+	bpatchx patch28_6,mem_patch28
+	jam DONGLE_SEARCH,mem_24g_work_mode
+	jam CLEAR_INIT,mem_24g_mode_init
+	branch g24_rx_interrupt_clear
+
+
+/****************************g24 receiver nodata process end********************************/
+
+
+g24_ch_process:
+	bpatchx patch28_7,mem_patch28
+	fetch 1,mem_24g_abort_packet
+	beq 1,rssi_noise_monitor
+	fetch 1,mem_24g_hop_packet
+	beq 1,g24_ch_receive_hop_pac
+	fetcht 4,mem_24g_hop_btclk
+	copy clkn_bt,pdata
+	isub temp,null
+	ncall g24_timer_timeout,positive
+	copy pdata,regb
+	fetch 4,mem_24g_hop_btclk
+	fetcht 1,mem_24g_hop_interval
+	iadd temp,temp
+	copy regb,pdata
+	isub temp,null
+	nrtn positive
+	set0 28,pdata
+	store 4,mem_24g_hop_btclk
+	jam 1,mem_24g_abort_packet
+	branch g24_ch
+
+g24_ch_receive_hop_pac:
+	jam 0,mem_24g_hop_packet
+	branch g24_ch
+
+g24_ch_timer_reinit:
+	copy clkn_bt,pdata
+	store 4,mem_24g_hop_btclk
+	rtn
+
Index: program/g24_protocol_stack/24g_reconn.prog
===================================================================
--- /branch/usb/usb_public_base/program/g24_protocol_stack/24g_reconn.prog	(revision 0)
+++ /branch/usb/usb_public_base/program/g24_protocol_stack/24g_reconn.prog	(working copy)
@@ -0,0 +1,162 @@
+
+/****************************g24 reconn transmitter start********************************/
+
+g24_reconn_timeout_timer:
+	arg mem_24g_reconn_timeout,regc
+	arg g24_stop_24g_mode,regb
+	branch timer_single_step_2B
+
+
+g24_reconn_start:
+	bpatchx patch29_0,mem_patch29
+	set1 mark_24g,mark
+	fetch 1,mem_24g_conn_sm
+	set0 STATE_24G_PAIR,pdata
+	set1 STATE_24G_RECONN,pdata
+	store 1,mem_24g_conn_sm
+	fetch 1,mem_24g_fast_conn_enable
+	branch g24_reconn_receiver_addr,blank
+	fetch 1,mem_24g_reconn_type
+	beq FAST_CONN_AND_RECEIVER,g24_reconn_fast_conn
+	beq FAST_CONN_AND_3_0_ADDR,g24_reconn_fast_conn
+	beq RECEIVER_AND_3_0_ADDR,g24_reconn_device_3_0_addr
+	beq PAIR_AND_3_0_ADDR,g24_reconn_device_3_0_addr
+g24_reconn_fast_conn:
+	fetch 1,mem_24g_pair_tx_power
+	store 1,mem_tx_power
+	fetcht 1,mem_24g_fast_conn_temp_ch
+	storet 1,mem_24g_current_ch_number
+	fetch 4,mem_24g_fast_conn_addr
+	call g24_ch_syncword_crc8_init
+	storet 1,mem_24g_fast_conn_temp_ch
+	rtn
+	 
+g24_reconn_receiver_addr:
+	jam TX_POWER_3DB,mem_tx_power
+	fetcht 1,mem_24g_receiver_temp_ch
+	storet 1,mem_24g_current_ch_number
+	fetch 4,mem_24g_receiver_addr
+	call g24_ch_syncword_crc8_init
+	storet 1,mem_24g_receiver_temp_ch
+	rtn
+
+g24_reconn_device_3_0_addr:
+	jam TX_POWER_3DB,mem_tx_power
+	fetcht 1,mem_24g_device_temp_ch
+	storet 1,mem_24g_current_ch_number
+	fetch 4,mem_24g_device_addr
+	call g24_ch_syncword_crc8_init
+	storet 1,mem_24g_device_temp_ch
+	rtn	
+
+g24_store_receiver_addr:
+	fetch 4,mem_24g_rxpayload+2
+	store 4,mem_24g_receiver_addr	
+g24_ch_syncword_crc8_init:	
+	call g24_update_addr_and_synccrc8
+	branch g24_ch
+
+
+g24_reconn_dispatch:
+	bpatchx patch29_1,mem_patch29
+	call g24_reconn_data_prep
+	call g24_transmit_receive_ack
+	nbranch g24_reconn_device_fail,sync
+	nbranch g24_reconn_device_fail,user3
+	call g24_ackpayload_parse
+g24_reconn_receiver_succ:
+	fetch 1,mem_24g_conn_sm
+	set0 STATE_24G_RECONN,pdata
+	store 1,mem_24g_conn_sm
+	setarg 0
+	store 2,mem_24g_pair_timeout
+	store 2,mem_24g_reconn_count
+	store 2,mem_24g_reconn_timeout	
+	fetch 4,mem_24g_pair_addr
+	fetcht 4,mem_24g_addr
+	isub temp,null
+	branch g24_pair_start,zero
+	fetch 4,mem_24g_device_addr
+	fetcht 4,mem_24g_addr
+	isub temp,null
+	call g24_store_receiver_addr,zero
+	jam BT_EVT_24G_ATTEMPT_SUCCESS,mem_fifo_temp
+	call ui_ipc_send_event
+g24_txbuf_clear:
+	bpatchx patch29_2,mem_patch29
+	arg 4,loopcnt
+	arg mem_24g_txbuf,contw
+	branch memset0
+
+g24_reconn_data_prep:
+	jam DATATYPE_ATTEMP,mem_24g_txbuf
+	fetch 1,mem_24g_data_type
+	store 1,mem_24g_txbuf+1
+	fetch 4,mem_24g_device_addr
+	store 4,mem_24g_txbuf+2
+	jam 6,mem_24g_datalen
+	branch g24_transmit_prep
+
+g24_reconn_device_fail:
+	fetch 1,mem_24g_fast_conn_enable
+	branch g24_ch,blank
+	fetch 2,mem_24g_reconn_count
+	increase 1,pdata
+	store 2,mem_24g_reconn_count
+	isolate1 3,pdata	// each 8 times switch
+	fetch 1,mem_24g_reconn_type
+	beq FAST_CONN_AND_RECEIVER,g24_reconn_fast_conn_and_receiver
+	beq FAST_CONN_AND_3_0_ADDR,g24_reconn_fast_conn_and_3_0
+	beq RECEIVER_AND_3_0_ADDR,g24_reconn_receiver_and_3_0
+	beq PAIR_AND_3_0_ADDR,g24_reconn_pair_and_3_0
+	branch g24_reconn_receiver_addr
+
+
+g24_reconn_fast_conn_and_receiver:
+	branch g24_reconn_receiver_addr,true
+	branch g24_reconn_fast_conn
+
+g24_reconn_fast_conn_and_3_0:
+	branch g24_reconn_device_3_0_addr,true
+	branch g24_reconn_fast_conn
+	
+g24_reconn_receiver_and_3_0:
+	branch g24_reconn_device_3_0_addr,true
+	branch g24_reconn_receiver_addr
+
+g24_reconn_pair_and_3_0:
+	branch g24_pair_init_param,true
+	branch g24_reconn_device_3_0_addr
+
+
+/****************************g24 reconn transmitter end********************************/
+
+
+
+
+
+/****************************g24 reconn receiver start********************************/
+
+g24_data_attemp:
+	fetch 1,mem_24g_rxdata_temp+3
+	beq DATATYPE_DEVICE1,g24_data_attemp_device1
+	beq DATATYPE_DEVICE2,g24_data_attemp_device2
+	rtn
+g24_data_attemp_device1:
+	fetch 4,mem_24g_rxdata_temp+4
+	store 4,mem_24g_transmitter_addr
+g24_store_device1_addr:
+	store 4,mem_24g_device1_addr
+	rtn
+g24_data_attemp_device2:
+	fetch 4,mem_24g_rxdata_temp+4
+	store 4,mem_24g_transmitter_addr	
+g24_store_device2_addr:
+	store 4,mem_24g_device2_addr
+	rtn
+
+/****************************g24 reconn receiver end********************************/
+
+
+
+
Index: program/g24_protocol_stack/24g_rssi.prog
===================================================================
--- /branch/usb/usb_public_base/program/g24_protocol_stack/24g_rssi.prog	(revision 0)
+++ /branch/usb/usb_public_base/program/g24_protocol_stack/24g_rssi.prog	(working copy)
@@ -0,0 +1,112 @@
+
+/****************************g24 rssi general start********************************/
+
+rssi_store:
+	bpatchx patch29_3,mem_patch29
+	copy rega,pdata
+	iadd temp,contw
+	fetch 1,mem_rssi
+	istore 1,contw
+	increase 1,temp
+	fetch 1,mem_rssi_buff_index	//buff len minus 1
+	iand temp,temp
+	rtn
+	
+rssi_average:
+	bpatchx patch29_4,mem_patch29
+	fetch 1,mem_rssi_buff_index
+	increase 1,pdata
+	store 2,mem_loopcnt
+	copy pdata,loopcnt
+	copy rega,contr
+	arg 0,pdata
+rssi_average_loop:
+	ifetcht 1,contr
+	iadd temp,pdata
+	loop rssi_average_loop
+	fetcht 2,mem_loopcnt
+	idiv temp
+	call wait_div_end
+	quotient temp
+	rtnmark1 mark_24g_rxmode
+	copy temp,pdata
+	rtnmark0 mark_24g
+	call bcd
+	copy pdata,temp
+	rtn
+
+save_rssi_dec:
+	call save_rssi
+	branch rssi_hex2dec
+
+/****************************g24 rssi general end********************************/
+
+
+
+
+
+/****************************g24 transmitter rssi start********************************/
+rssi_transmitter_buff_init:
+	fetch 2,mem_rssi_signal_buf_ptr
+	branch rssi_buff_clear
+
+rssi_signal:
+	copy pdata,rega
+	fetcht 1,mem_rssi_signal_index
+	fetch 2,mem_rssi_signal_buf_ptr
+	iadd temp,contw
+	copy rega,pdata
+	istore 1,contw
+	increase 1,temp
+	fetch 1,mem_rssi_buff_index	//buff len minus 1
+	iand temp,temp
+	storet 1,mem_rssi_signal_index
+	rtn
+
+/****************************g24 transmitter rssi end********************************/
+
+
+
+
+
+/****************************g24 receiver rssi start********************************/
+
+rssi_receiver_buff_init:
+	fetch 2,mem_rssi_noise_buffer_ptr
+	call rssi_buff_clear
+	fetch 2,mem_rssi_noise_self_buffer_ptr
+	call rssi_buff_clear
+	fetch 2,mem_rssi_noise_device1_buffer_ptr
+	call rssi_buff_clear
+	fetch 2,mem_rssi_noise_device2_buffer_ptr
+rssi_buff_clear:
+	rtn blank
+	copy pdata,contw
+	fetch 1,mem_rssi_buff_index
+	increase 1,pdata
+	copy pdata,loopcnt
+	branch clear_mem
+
+
+rssi_noise:
+	call save_rssi_dec
+	rtn blank
+	fetcht 1,mem_rssi_noise_index
+	fetchr rega,2,mem_rssi_noise_buffer_ptr
+	call rssi_store
+	storet 1,mem_rssi_noise_index
+	rtn
+
+
+rssi_noise_monitor:
+	fetchr rega,2,mem_rssi_noise_buffer_ptr
+	call rssi_average
+	storet 1,mem_rssi_noise_avg
+	sub temp,RSSI_THRESH_NOISE,null
+	nrtn positive
+	branch g24_ch
+
+
+/****************************g24 receiver rssi end********************************/
+
+	
Index: program/g24_protocol_stack/24g_transmitter.prog
===================================================================
--- /branch/usb/usb_public_base/program/g24_protocol_stack/24g_transmitter.prog	(revision 0)
+++ /branch/usb/usb_public_base/program/g24_protocol_stack/24g_transmitter.prog	(working copy)
@@ -0,0 +1,384 @@
+
+
+g24_transmit_init:
+	fetch 4,mem_24g_lap		//need to roll this address
+	store 4,mem_24g_device_addr
+	call g24_rx_window_init
+	branch rssi_transmitter_buff_init
+
+g24_interval_param_4ms:
+	setarg G24_4MS_INTERVAL_PARAM
+	store 3,mem_24g_short_sleep_set
+	setarg 0x100c0c
+	store 3,mem_24g_interval
+	setarg 0x00bb80
+	store 3,mem_24g_long_sleep_set
+	jam 5,mem_24g_fast_hop_count
+	rtn
+
+g24_interval_param_8ms:
+	setarg G24_8MS_INTERVAL_PARAM
+	store 3,mem_24g_short_sleep_set
+	setarg 0x1c1919
+	store 3,mem_24g_interval
+	setarg 0x017700
+	store 3,mem_24g_long_sleep_set
+	jam 11,mem_24g_fast_hop_count
+	rtn
+
+
+g24_transmit_dispatch:
+	rtnmark0 mark_24g
+	fetch 1,mem_24g_conn_sm
+	bbit1 STATE_24G_PAIR,g24_pair_dispatch
+	bbit1 STATE_24G_RECONN,g24_reconn_dispatch
+	fetch 1,mem_24g_transmit_by_interrupt
+	beq G24_TX_TIMER_INT_ENABLE,g24_transmit_by_interrupt
+g24_transmit_no_interrupt:
+	bpatchx patch29_5,mem_patch29
+	call g24_txdata_prep
+	nbranch g24_nodata_transmit,user
+g24_transmit_start:
+	call g24_transmit_process
+	call power_ctrl_start
+	fetch 1,mem_device_option
+	beq dvc_op_mouse,mouse_24g_transmit_start
+g24_transmit_start_next:	
+	fetch 8,mem_24g_long_sleep_set
+	store 8,mem_24g_enter_hibernate
+	fetch 2,mem_24g_long_sleep_param_update_timer_init
+	store 2,mem_24g_long_sleep_param_update_timer
+g24_short_sleep:
+	bpatchx patch29_6,mem_patch29
+	call g24_lpm_wait
+	nrtn user
+	call clear_wake
+	fetch 3,mem_24g_short_sleep_set
+	branch g24_long_seep2
+
+
+
+
+/****************************g24 transmitter data prep start********************************/
+
+g24_txdata_prep:
+	call g24_package_data
+	nrtn user
+	branch g24_transmit_prep
+
+
+g24_package_data:
+	fetch 2,mem_cb_24g_transmit_data
+	call callback_func
+	branch g24_accumulate_data,user
+	fetch 7,mem_24g_txbuf+1	//mouse data
+	rtn blank
+	branch enable_user	// retransmit
+	
+g24_accumulate_data:
+	jam 0,mem_24g_abort_pac
+	add rega,1,pdata
+	store 1,mem_24g_datalen
+	call g24_transmit_rf_ctrl_clear
+	store 1,mem_24g_txbuf
+	copy regb,contr
+	copy rega,loopcnt
+	branch memcpy
+
+g24_transmit_rf_ctrl_clear:	
+	fetch 1,mem_24g_data_type
+	and_into bits_data,pdata
+	store 1,mem_24g_data_type
+	rtn
+
+/****************************g24 transmitter data prep end********************************/
+
+
+
+
+/****************************g24 transmitter data transmit start********************************/
+
+g24_transmit_process:
+	jam 0,mem_24g_retry
+g24_transmit_loop:
+	fetchr timeup,2,mem_param_rx_setup
+	until clkn_rt,meet
+	call g24_transmit_receive_ack
+	fetch 1,mem_24g_no_ack	//tx noack
+	beq no_ack_24g,g24_transmit_no_ack
+	nbranch g24_retransmit,sync
+	nbranch g24_retransmit,user3
+	call g24_ackpayload_parse
+	fetch 1,mem_device_option
+	beq dvc_op_mouse,mouse_wakeup_24g
+g24_transmit_no_ack:
+	call power_ctrl_pac_succ_incrs
+g24_transmit_next_packet:
+	call g24_txbuf_clear
+	fetch 1,mem_24g_pid
+	increase 1,pdata
+	store 1,mem_24g_pid
+	call g24_hop_enable_packet
+g24_transmit_abandon:
+	bpatchx patch29_7,mem_patch29
+	setarg 0
+	store 1,mem_24g_ensure
+	store 2,mem_24g_txfail_cnt
+	rtn
+
+g24_transmit_receive_ack:
+	bpatchx patch2a_0,mem_patch2a
+	disable user3
+	call g24_transmit
+	fetch 1,mem_24g_no_ack
+	beq no_ack_24g,g24_end_of_packet
+	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 g24_receive_rxon
+	call g24_end_of_packet,user3
+	rtn
+
+g24_retransmit:
+	fetch 1,mem_24g_abort_pac
+	nrtn blank
+	fetch 2,mem_24g_txfail_cnt
+	increase 1,pdata
+	store 2,mem_24g_txfail_cnt	
+	fetch 1,mem_24g_txfail_cnt+1
+	bbit1 4,g24_tx_attempt_fail
+	call g24_transmit_hop_process
+	branch g24_transmit_loop
+
+
+g24_ackpayload_parse:
+	bpatchx patch2a_1,mem_patch2a
+	call g24_read_len_pid_crc
+	fetch 1,mem_24g_rxdata_length	//ack payload length 
+	rtn blank
+	iforce loopcnt
+	arg mem_24g_rxbuf+2,contr
+	arg mem_24g_rxpayload,contw	//ack payload buffer 
+	branch memcpy
+
+
+g24_tx_attempt_fail:
+	bpatchx patch2a_2,mem_patch2a
+	setarg 0
+	store 2,mem_24g_txfail_cnt
+	jam 1,mem_24g_attempt_fail_flag
+g24_stop_24g_mode:	
+	jam BT_EVT_24G_ATTEMPT_FAIL,mem_fifo_temp
+	branch ui_ipc_send_event
+
+/****************************g24 transmitter data transmit end********************************/
+
+
+
+
+
+/****************************g24 transmitter hop start********************************/
+
+g24_transmit_hop_process:
+	bpatchx patch2a_3,mem_patch2a
+	fetcht 1,mem_24g_retry
+	fetch 1,mem_24g_fast_hop_count			// 125Hz=11  250Hz=5
+	isub temp,null
+	nbranch g24_tx_fast_hop,positive		// >= (6+6)or(3+3) hop fast    fail packet count >= 2
+	increase 1,temp
+	storet 1,mem_24g_retry
+	fetch 1,mem_24g_fast_hop_count
+	beq 5,g24_transmit_hop_process_4ms
+	fetch 1,mem_24g_retry
+	beq 6,g24_hop_ch_disable
+	beq 12,g24_hop_ch_disable
+	rtn	
+
+
+g24_transmit_hop_process_4ms:
+	fetch 1,mem_24g_retry
+	beq 3,g24_hop_ch_disable
+	beq 6,g24_hop_ch_disable
+	rtn	
+
+
+
+g24_hop_ch_enable:
+	//fetch 1,mem_24g_data_type
+	//set1 bit_hop,pdata
+	//store 1,mem_24g_data_type
+	//update txpayload
+g24_txpayload_type_update:	
+	bmark1 mark_ble_lr,g24_lr_type_update
+	store 1,mem_24g_txpayload+OFFSET_DATA_TYPE
+	rtn
+g24_lr_type_update:
+	store 1,mem_24g_txpayload+OFFSET_LR_DATA_TYPE
+	rtn
+
+g24_hop_enable_packet:
+	fetch 1,mem_24g_data_type
+	rtnbit0 bit_hop
+g24_hop_ch_disable:
+	fetch 1,mem_24g_data_type
+	set0 bit_hop,pdata
+	store 1,mem_24g_data_type
+	call g24_txpayload_type_update
+	call power_ctrl_pac_succ_decrs
+	branch g24_ch
+
+g24_tx_fast_hop:
+	call power_ctrl_txpower_incrs
+	call power_ctrl_pac_succ_decrs
+	branch g24_ch
+	
+/****************************g24 transmitter hop end********************************/
+
+
+
+
+
+
+
+
+
+
+
+
+
+/****************************g24 transmitter long lpm prep start********************************/
+
+g24_search_receiver:
+	fetch 2,mem_cb_24g_search_receiver
+	branch callback_func
+
+g24_nodata_transmit:
+	fetch 1,mem_24g_abort_pac
+	call g24_send_abort_packet,blank
+	call g24_transmit_by_interrupt_exit
+	call g24_search_receiver
+	branch g24_long_sleep
+
+g24_send_abort_packet:
+	jam TYPE_MS,mem_24g_data_type
+	jam 1,mem_24g_abort_pac
+	call g24_transmit_rf_ctrl_clear
+	store 1,mem_24g_txbuf
+	setarg 0
+	store 7,mem_24g_txbuf+1
+	fetch 4,mem_24g_device_addr
+	store 4,mem_24g_txbuf+8
+	jam 12,mem_24g_datalen
+	fetch 1,mem_24g_data_type
+	set1 bit_abort,pdata
+	store 1,mem_24g_data_type
+	call g24_transmit_prep
+	branch g24_transmit_start
+	
+g24_long_sleep:
+	bpatchx patch2a_4,mem_patch2a
+	call g24_lpm_wait
+	nrtn user
+	fetch 1,mem_device_option
+	beq dvc_op_mouse,mouse_24g_long_sleep
+	fetch 8,mem_24g_enter_hibernate
+g24_long_seep2:
+	call clk2lpo
+	storet 4,mem_sleep_counter
+	branch lpm_sleep
+
+g24_lpm_wait:
+	bpatchx patch2a_5,mem_patch2a
+	enable user
+	call lpo_calibration
+	fetch 3,mem_clks_per_lpo
+	branch disable_user,blank
+	fetch 1,mem_lpm_mode
+	branch disable_user,blank
+g24_setgpio_lpm_before:
+	fetch 2,mem_cb_24g_lpm_before
+	branch callback_func
+
+
+/****************************g24 transmitter long lpm prep end********************************/
+
+
+
+
+
+
+
+/****************************g24 transmit by interrupt start********************************/
+
+g24_transmit_by_interrupt:
+	call g24_timer_check
+	nrtn user
+	call g24_interval_calibrate
+	fetch 2,mem_24g_transmit_by_interrupt_exit_count
+	increase 1,pdata
+	store 2,mem_24g_transmit_by_interrupt_exit_count
+	fetcht 2,mem_24g_transmit_by_interrupt_exit_count_init
+	isub temp,null
+	call g24_transmit_by_interrupt_exit,zero
+	branch g24_transmit_no_interrupt
+
+	
+g24_transmit_by_interrupt_exit:
+	jam G24_TX_TIMER_INT_DISABLE,mem_24g_transmit_by_interrupt
+	setarg 0
+	store 2,mem_24g_transmit_by_interrupt_exit_count
+	setarg 100
+	store 2,mem_24g_transmit_by_interrupt_exit_count_init
+g24_interval_min:
+	jam 0,mem_24g_pac_index
+	fetch 1,mem_24g_interval_min
+g24_interval_store:
+	store 1,mem_24g_interval
+	rtn
+g24_interval_max:
+	fetch 1,mem_24g_interval_max
+	branch g24_interval_store
+	
+g24_interval_calibrate:
+	fetch 1,mem_24g_pac_index
+	increase 1,pdata
+	store 1,mem_24g_pac_index
+	beq 4,g24_interval_max
+	beq 5,g24_interval_min
+	rtn
+
+g24_transmit_by_interrupt_enable:
+	jam G24_TX_TIMER_INT_ENABLE,mem_24g_transmit_by_interrupt
+	setarg 0
+	store 2,mem_24g_transmit_by_interrupt_exit_count
+	rtn
+
+
+/****************************g24 transmit by interrupt end********************************/
+
+
+
+
+/****************************g24 transmitter fac check start********************************/
+
+g24_factory_check:
+	arg 2,loopcnt
+	arg mem_24g_addr,contr
+pdata_0xff_check:
+	call enable_user
+	setarg 0xffff
+pdata_0xff_check_loop:
+	ifetcht 2,contr
+	isub temp,null
+	ncall disable_user,zero
+	loop pdata_0xff_check_loop
+	rtn
+
+/****************************g24 transmitter fac check end********************************/
+
+
+
+	
Index: program/g24_protocol_stack/24g_txpower_ctrl.prog
===================================================================
--- /branch/usb/usb_public_base/program/g24_protocol_stack/24g_txpower_ctrl.prog	(revision 0)
+++ /branch/usb/usb_public_base/program/g24_protocol_stack/24g_txpower_ctrl.prog	(working copy)
@@ -0,0 +1,95 @@
+
+/****************************g24 transmitter tx power start********************************/
+
+power_ctrl_start:
+	bpatchx patch2a_6,mem_patch2a
+	fetch 2,mem_ui_state_map
+	rtnbit1 UI_STATE_BLE_ADV
+//	rtnbit1 UI_STATE_BT_RECONNECT
+//	rtnbit1 UI_STATE_BT_DISCOVERY
+	fetchr rega,2,mem_rssi_signal_buf_ptr
+	call rssi_average
+	storet 1,mem_rssi_avg_received
+	fetch 1,mem_rssi_dis_max_24g
+	bmark1 mark_24g,power_ctrl_start_next
+	fetch 1,mem_rssi_dis_max_ble
+power_ctrl_start_next:
+	isub temp,null
+	nbranch power_ctrl_txpower_incrs_force,positive
+	fetch 1,mem_power_ctrl_pac_succ_cnt
+	sub pdata,2,null
+	nbranch power_ctrl_txpower_decrs_check,positive
+	fetch 1,mem_power_ctrl_pac_succ_cnt
+	beq 0,power_ctrl_txpower_incrs
+	rtn
+
+power_ctrl_txpower_decrs_check:
+	fetch 1,mem_power_ctrl_pac_succ_cnt
+	fetcht 1,mem_power_ctrl_pac_succ_cnt_init
+	isub temp,null
+	nrtn zero
+	jam 0,mem_power_ctrl_pac_succ_cnt
+power_ctrl_txpower_decrs:
+	fetcht 1,mem_rssi_avg_received
+	fetch 1,mem_rssi_dis_min_24g
+	bmark1 mark_24g,power_ctrl_txpower_decrs_next
+	fetch 1,mem_rssi_dis_min_ble
+power_ctrl_txpower_decrs_next:	
+	isub temp,null
+	nrtn positive
+	fetch 1,mem_power_ctrl_level
+	beq 0,power_ctrl_decrs_level0
+	increase -1,pdata
+	store 1,mem_power_ctrl_level
+	beq 0,power_ctrl_decrs_level0
+power_ctrl_decrs_level1:
+power_ctrl_incrs_level1:	//0dBm
+	jam TX_POWER_0DB,mem_tx_power
+	rtn
+
+power_ctrl_txpower_incrs_force:
+	jam 0,mem_power_ctrl_pac_succ_cnt
+power_ctrl_txpower_incrs:
+	fetch 1,mem_power_ctrl_level
+	beq 2,power_ctrl_incrs_level2
+	increase 1,pdata
+	store 1,mem_power_ctrl_level
+	beq 1,power_ctrl_incrs_level1
+power_ctrl_incrs_level2:	//+6dBm
+	jam TX_POWER_6DB,mem_tx_power
+	rtn
+	
+power_ctrl_decrs_level0: //-5dBm
+	jam TX_POWER_f5DB,mem_tx_power
+	rtn
+
+power_ctrl_pac_succ_cnt_init:
+	jam 1,mem_power_ctrl_level
+	jam 0,mem_power_ctrl_pac_succ_cnt
+	rtn
+
+power_ctrl_pac_succ_incrs:
+	fetch 1,mem_power_ctrl_pac_succ_cnt
+	increase 1,pdata
+	store 1,mem_power_ctrl_pac_succ_cnt
+	rtn
+
+power_ctrl_pac_succ_decrs:
+	fetch 1,mem_power_ctrl_pac_succ_cnt
+	sub pdata,2,null
+	ncall power_ctrl_pac_succ_cnt_reinit,positive
+	fetch 1,mem_power_ctrl_pac_succ_cnt
+	rtneq 0
+	increase -1,pdata
+	store 1,mem_power_ctrl_pac_succ_cnt
+	rtn
+
+power_ctrl_pac_succ_cnt_reinit:
+	jam 3,mem_power_ctrl_pac_succ_cnt
+	rtn
+
+/****************************g24 transmitter tx power end********************************/
+
+
+
+
Index: program/hci_main.prog
===================================================================
--- /branch/usb/usb_public_base/program/hci_main.prog	(revision 0)
+++ /branch/usb/usb_public_base/program/hci_main.prog	(working copy)
@@ -0,0 +1,302 @@
+/*********************************/
+/**********   HCI  *****************/
+/*********************************/
+
+hci_init:
+	clear_stack		//清空堆栈
+	call wdt_set_disable
+	call hci_init_clksel_xtal
+	call hci_init_uart_default_config
+	call hci_init_uart_config
+	call hci_init_pwm_default_config
+	call hci_init_pwm
+
+	jam 1,mem_hci_command_complete_num_hci_command_packet
+	jam HCI_H4_TYPE_EVENT,mem_hci_event_head_type
+
+hci_process_loop:
+	call hci_process_check_uart_rx
+	branch hci_process_loop
+	
+hci_init_clksel_xtal:
+	jam clksel_xtal,core_clksel
+	rtn
+
+hci_init_uart_default_config:
+	call hci_init_uart_default_config_tx
+	call hci_init_uart_default_config_rx
+	call hci_init_uart_default_config_rts
+	branch hci_init_uart_default_config_cts
+
+hci_init_uart_default_config_tx:
+	fetch 1,mem_hci_uart_tx_gpio
+	nrtn blank
+	jam HCI_UART_TX_GPIO_NUM,mem_hci_uart_tx_gpio
+	rtn	
+
+hci_init_uart_default_config_rx:
+	fetch 1,mem_hci_uart_rx_gpio
+	nrtn blank
+	jam HCI_UART_RX_GPIO_NUM,mem_hci_uart_rx_gpio
+	rtn	
+hci_init_uart_default_config_rts:
+	fetch 1,mem_hci_uart_rts_gpio
+	nrtn blank
+	jam HCI_UART_RTS_GPIO_NUM,mem_hci_uart_rts_gpio
+	rtn	
+hci_init_uart_default_config_cts:
+	fetch 1,mem_hci_uart_cts_gpio
+	nrtn blank
+	jam HCI_UART_CTS_GPIO_NUM,mem_hci_uart_cts_gpio
+	rtn	
+
+
+hci_init_uart_config:
+	setarg mem_h5rx_buf
+	store 2,mem_pdatatemp
+	setarg mem_h5rx_buf_end
+	istore 2,contw
+	setarg mem_h5tx_buf
+	istore 2,contw
+	setarg mem_h5tx_buf_end
+	istore 2,contw	
+	fetch 8,mem_pdatatemp
+	call uarta_init_dma_mem
+	call uart_clock_select_main_freq_crystal
+	arg 115200,temp
+	call uarta_calc_baud_rate_config
+	fetch 1,mem_hci_uart_tx_gpio
+	arg gpcfg_uart_txd,temp
+	call gpio_config_function_int
+	fetch 1,mem_hci_uart_rx_gpio
+	arg gpcfg_uart_rxd|gpcfg_pullup,temp
+	call gpio_config_function_int
+	fetch 1,mem_hci_uart_rts_gpio
+	arg gpcfg_uart_rts,temp
+	call gpio_config_function_int
+	fetch 1,mem_hci_uart_cts_gpio
+	arg gpcfg_uart_cts,temp
+	call gpio_config_function_int
+
+	arg FUN_UART_CONTROL_ENABLE|FUN_UART_CONTROL_SETTING_RATE_BAUD,temp
+	storet 1,core_uart_ctrl
+	branch clean_mem
+
+hci_init_pwm_default_config:
+	fetch 1,mem_hci_pwm_12mhz_gpio
+	nrtn blank
+	jam HCI_PMW_12MHZ_GPIO_NUM,mem_hci_pwm_12mhz_gpio
+	rtn	
+
+hci_init_pwm:
+	fetch 1,mem_hci_pwm_12mhz_gpio
+	arg gpcfg_pwm_out0,temp
+	call gpio_config_function_int
+	arg 0x40,rega
+	call pwm_init
+	arg 0,rega
+	arg 0,regb
+	setarg 0
+	call pwm_duty_cycle_set
+	arg 0,queue
+	branch pwm_set_select
+
+
+hci_process_check_uart_rx:
+	fetch 2,core_uart_rxitems
+	add pdata,-4,rega
+	nrtn positive
+	call uarta_prepare_rx
+	ifetch 1,contru
+	beq HCI_H4_TYPE_CMD,hci_parse_packet_cmd
+//	beq HCI_H4_TYPE_ACL,hci_parse_packet_acl
+	call delay_10ms
+	branch uarta_clear_current_rx
+
+//hci_parse_packet_acl:
+//	rtn
+hci_parse_packet_cmd:
+	ifetch 2,contru	// Opcode
+	store 2,mem_hci_opcode
+	arg 0x3ff,temp
+	iand temp,temp	//low 10bit
+	storet 2,mem_hci_opcode_ocf
+	rshift2 pdata,pdata
+	rshift8 pdata,pdata	//high 6bit
+	store 1,mem_hci_opcode_ogf
+	ifetch 1,contru	// parameter total length
+	pincrease -1		//大于等于
+	isub rega,null
+	rtn positive
+	call hci_parse_complete_packet
+	branch hci_drop_current_packet
+
+hci_parse_complete_packet:
+	fetch 1,mem_hci_opcode_ogf
+//	beq HCI_OGF_LINK_CONTROL,hci_parse_packet_cmd_ogf_link_control
+//	beq HCI_OGF_LINK_POLICY,hci_parse_packet_cmd_ogf_link_policy
+//	beq HCI_OGF_CONTROLLER_AND_BASEBAND,hci_parse_packet_cmd_ogf_controller_and_baseband
+//	beq HCI_OGF_INFOMATIONAL_PARAM,hci_parse_packet_cmd_ogf_infomational_parameters
+//	beq HCI_OGF_STATUS_PARAM,hci_parse_packet_cmd_ogf_status_parameters
+//	beq HCI_OGF_TEST,hci_parse_packet_cmd_ogf_testing
+//	beq HCI_OGF_LE_CONTROLLER,hci_parse_packet_cmd_ogf_le_controller
+	beq HCI_OGF_VENDOR_SPECIFIC_DEBUG,hci_parse_packet_cmd_ogf_vendorspecific_debug
+	branch hci_send_event_command_complete_error_command_nuknown
+
+//hci_parse_packet_cmd_ogf_link_control:
+//hci_parse_packet_cmd_ogf_link_policy:
+//hci_parse_packet_cmd_ogf_controller_and_baseband:
+//hci_parse_packet_cmd_ogf_infomational_parameters:
+//hci_parse_packet_cmd_ogf_status_parameters:
+//hci_parse_packet_cmd_ogf_testing:
+//hci_parse_packet_cmd_ogf_le_controller:
+
+hci_parse_packet_cmd_ogf_vendorspecific_debug:
+	bpatch patch0d_7,mem_patch0d
+	fetch 1,mem_hci_opcode_ocf
+	beq HCI_VENDOR_CMD_RESET,hci_normal_reply
+	beq HCI_VENDOR_CMD_CHIPID,phci_grp_vendor_chipid
+	beq HCI_VENDOR_CMD_BAUD,phci_grp_vendor_baud
+	beq HCI_VENDOR_CMD_PATCH,phci_grp_vendor_patch
+	beq HCI_VENDOR_CMD_PATCH_DONE,phci_grp_vendor_done
+	beq HCI_VENDOR_CMD_ECHO,hci_normal_reply
+	beq HCI_VENDOR_CMD_MEM,phci_grp_vendor_mem
+	beq HCI_VENDOR_CMD_SET_FLOW_CONTROL,phci_grp_vendor_flow_control
+	branch hci_normal_reply
+
+	
+phci_grp_vendor_chipid:
+	jam COMMAND_SUCCEEDED,mem_hci_command_complete_return_parameter
+	fetch 2,core_chipid
+	store 2,mem_hci_command_complete_return_parameter_chip_id
+	arg 3,loopcnt
+	branch hci_send_event_command_complete
+	
+phci_grp_vendor_baud:
+	ifetch 2,contu
+	store 2,core_uart_baud
+	rtn
+
+
+phci_grp_vendor_patch_common:
+	ifetch 1,contu
+	copy pdata,temp //check sum via temp
+	store 1,core_ucode_low
+	ifetch 1,contu
+	iadd temp,temp
+	set1 7,pdata
+	store 1,core_ucode_ctrl
+	ifetch 1,contu
+	iadd temp,temp
+	copy pdata,loopcnt
+	rtn
+	
+phci_grp_vendor_patch:
+	call phci_grp_vendor_patch_common
+phci_grp_vendor_patch_loop:
+	ifetch 1,contu
+	store 1,core_ucode_data
+	iadd temp,temp
+	loop phci_grp_vendor_patch_loop
+phci_grp_vendor_patch_check_sum:	
+	and temp,0xff,temp
+	ifetch 1,contu
+	isub temp,null
+	nbranch phci_grp_vendor_patch_bad,zero
+	branch hci_normal_reply
+
+phci_grp_vendor_done:
+	arg 0x20,loopcnt    //patch switch length
+	arg mem_patch00,contw
+	arg 0,temp //checksum
+phci_grp_vendor_done_loop:
+	ifetch 1,contu
+	istore 1,contw
+	iadd temp,temp
+	loop phci_grp_vendor_done_loop
+	and temp,0xff,temp
+	ifetch 1,contu
+	isub temp,null
+	nbranch phci_grp_vendor_patch_bad,zero
+	jam 0,core_ucode_ctrl
+	call hci_normal_reply
+	call wait_uarttx
+	branch soft_reset
+
+phci_grp_vendor_patch_bad:
+	jam 0,core_ucode_ctrl
+	branch hci_send_event_command_complete_error_command_nuknown
+	
+
+phci_grp_vendor_mem:
+	ifetch 1,contu
+	copy pdata,loopcnt
+	ifetch 2,contu
+	copy pdata,contw
+	call uart_copy_rx_bytes
+	branch hci_normal_reply
+
+phci_grp_vendor_flow_control:
+	fetch 1,core_uart_ctrl
+	set1 BIT_UART_CONTROL_FLOW_CONTROL,pdata
+	store 1,core_uart_ctrl
+	branch hci_normal_reply
+
+	
+hci_normal_reply:
+	branch hci_send_event_command_complete_without_payload
+
+hci_send_event_command_complete_error_command_nuknown:
+	jam COMMAND_UNKNOWN,mem_hci_command_complete_return_parameter
+	branch hci_send_event_command_complete_without_payload+1
+hci_send_event_command_complete_error_command_disallowed:
+	jam COMMAND_DISALLOWED,mem_hci_command_complete_return_parameter
+	branch hci_send_event_command_complete_without_payload+1
+hci_send_event_command_complete_without_payload:
+	jam COMMAND_SUCCEEDED,mem_hci_command_complete_return_parameter
+	arg 1,loopcnt
+	branch hci_send_event_command_complete
+
+/***************
+function:send command complete event to host
+input:
+mem_mesh_command_complete_num_hci_command_packet:
+Num Hci Command Packet Commonly used 1
+mem_mesh_hci_opcode:command opcode ,OCF & OGF
+loopcnt:return parameters data length
+mem_mesh_command_complete_return_parameter
+:return parameters data point
+***************/
+hci_send_event_command_complete:
+	jam HCI_EVENT_COMMAND_COMPLETE,mem_hci_event_head_event_code
+	add loopcnt,3,pdata
+	store 1,mem_hci_event_para_total_length
+	call hci_prepare_send_event
+	fetch 3,mem_hci_command_complete_num_hci_command_packet
+	istore 3,contwu
+//	copy rega,contr
+	arg mem_hci_command_complete_return_parameter,contr
+	call uart_copy_tx_bytes
+	branch uarta_send_register_pop
+
+//mem_mesh_event_head_event_code:event code
+//mem_mesh_event_para_total_length:parameter total length
+hci_prepare_send_event:
+	call uarta_prepare_tx_register_push
+	fetch 3,mem_hci_event_head_type
+	istore 3,contwu
+	rtn
+
+hci_drop_current_packet:
+	call uarta_prepare_rx
+	increase 3,contru
+	ifetch 1,contru
+	iadd contru,contru
+	branch uarta_rxdone
+
+cmd_exit:
+	jam 0,mem_hci_cmd
+	rtn
+
+
+
Index: program/kscan_peipherals.prog
===================================================================
--- /branch/usb/usb_public_base/program/kscan_peipherals.prog	(revision 0)
+++ /branch/usb/usb_public_base/program/kscan_peipherals.prog	(working copy)
@@ -0,0 +1,152 @@
+
+
+
+ifdef COMPILE_KEYSCAN
+/****************************************key scan***************************************/
+/******the key_scan use explain******
+
+* First:call kscan_init
+* Second:call kscan_main
+* Finally: the key scanning reault is mem_kscan_value.
+
+******
+***************************************************************************************
+*/
+kscan_init:  
+	fetch 2,mem_kscan_ptr
+	copy pdata,regc
+	call kscan_row_num_select
+	branch kscan_col_num_select
+
+kscan_col_init:
+	setarg 0
+	add regc,KEYSCAN_OFFECT_SHIFT_COUNT,rega
+	istore 1,rega
+	add regc,KEYSCAN_OFFECT_COL_NUM,rega
+	ifetch 1,rega
+	branch kscan_value_init,blank
+	copy pdata,loopcnt
+	add regc,KEYSCAN_OFFECT_COL_CONF_PIN,regb
+kscan_col_loop: 
+	ifetcht 1, regb
+	call gpio_config_output
+	ifetcht 1, regb
+	call gpio_out_active
+	call kscan_value_init             
+	ifetcht 1,regb
+	call gpio_config_input
+	increase 1,regb
+	loop kscan_col_loop
+	rtn  
+kscan_row_num_select:          
+	add regc,KEYSCAN_OFFECT_ROW_NUM,contw
+	ifetch 1,contw 
+	rtn blank
+	copy pdata,loopcnt
+	add regc,KEYSCAN_OFFECT_ROW_CONF_PIN,rega
+	branch kscan_ioselect_input   
+kscan_col_num_select:           
+	add regc,KEYSCAN_OFFECT_COL_NUM,contw
+	ifetch 1,contw 
+	rtn blank
+	copy pdata,loopcnt
+	add regc,KEYSCAN_OFFECT_COL_CONF_PIN,rega
+	branch kscan_ioselect_input
+kscan_ioselect_input: 
+	ifetcht 1,rega
+	call gpio_config_input 
+	increase 1,rega
+	loop kscan_ioselect_input
+	rtn
+kscan_value_init:
+	setarg 0
+	add regc,KEYSCAN_OFFECT_ROW_COUNT,rega
+	istore 1,rega
+	add regc,KEYSCAN_OFFECT_ROW_CONF_PIN,rega
+kscan_save_vaule:
+	ifetcht 1,rega       
+	call gpio_get_bit   
+	add regc,KEYSCAN_OFFECT_VALUE_TEMP,temp
+	ifetch 2,temp
+ 	add regc,KEYSCAN_OFFECT_SHIFT_COUNT,contr
+	ifetcht 1,contr
+	copy temp,queue
+	qsetflag true,pdata
+
+	add regc,KEYSCAN_OFFECT_VALUE_TEMP,temp
+ 	istore 2,temp
+	increase 1,rega
+    
+	add regc,KEYSCAN_OFFECT_SHIFT_COUNT,contw
+	ifetch 1,contw 
+	increase 1,pdata
+	istore 1,contw
+    
+	add regc,KEYSCAN_OFFECT_ROW_COUNT,contw
+	ifetcht 1,contw 
+	increase 1,temp
+	istoret 1,contw
+	add regc,KEYSCAN_OFFECT_ROW_NUM,contw
+	ifetch 1,contw 
+	ixor temp,null  
+	nbranch kscan_save_vaule,zero
+	rtn       
+	
+	
+kscan_lpm_berfore:
+	fetch 2,mem_kscan_ptr
+	copy pdata,regc
+ 	add regc,KEYSCAN_OFFECT_ROW_NUM,contw
+ 	ifetch 1,contw 
+	copy pdata,loopcnt
+	add regc,KEYSCAN_OFFECT_COL_CONF_PIN,rega
+kscan_select_wake:    
+	ifetcht 1,rega
+	call gpio_set_wake   
+	increase 1,rega
+	loop kscan_select_wake
+	rtn
+
+kscan_clkn_bt_timer_check:
+	ifetcht 4,rega
+	copy clkn_bt,pdata
+	isub temp,null
+	rtn positive
+	setarg 0
+	istore 4,rega
+	rtn
+
+kscan_process:
+	fetch 2,mem_kscan_ptr
+	copy pdata,regc
+	add regc,KEYSCAN_OFFECT_BTCLK,rega
+	call kscan_clkn_bt_timer_check
+	ifetch 4,rega
+	add regc,KEYSCAN_OFFECT_BTCLK_INTERVAL,regb
+	ifetcht 1,regb
+	iadd temp,temp
+	copy clkn_bt,pdata
+	isub temp,null
+	nrtn positive
+	istore 4,rega
+	call kscan_col_init  
+	add regc,KEYSCAN_OFFECT_VALUE_TEMP,rega
+	ifetch 2,rega
+	add regc,KEYSCAN_OFFECT_LASVALUE,rega
+	ifetcht 2,rega
+	istore 2,rega
+	iand temp,pdata
+	add regc,KEYSCAN_OFFECT_VALUE,rega    
+	istore 2,rega 
+	rtn  
+
+endif
+	
+	
+
+
+
+	
+    
+	
+
Index: program/l2cap.prog
===================================================================
--- /branch/usb/usb_public_base/program/l2cap.prog	(revision 0)
+++ /branch/usb/usb_public_base/program/l2cap.prog	(working copy)
@@ -0,0 +1,376 @@
+/************************************/
+/*initialize L2CAP related variables*/
+/************************************/
+l2cap_init:
+	branch l2cap_init_wake,wake
+	setarg mem_l2cap_xmem_end
+	arg mem_l2cap_xmem_start,contw
+	isub contw,loopcnt
+	call clear_mem
+l2cap_init_wake:	
+//	branch l2cap_lpm_load_txbuf
+	rtn
+	
+
+
+l2cap_check_map:
+//	call l2cap_malloc_is_fifo_full
+//	nrtn blank
+	bpatch patch0e_0,mem_patch0e
+	call l2cap_malloc_get_full_map
+	fetch 1,mem_used_map
+	beq 0,set_pdata_0
+	beq 1,set_pdata_0
+	beq 2,set_pdata_0
+	beq 3,set_pdata_0
+	beq 0x81,set_pdata_0
+	beq 0xc0,set_pdata_0
+	beq 0x80,set_pdata_0
+	beq 0x40,set_pdata_0
+	rtn
+
+
+check_l2cap_map:
+	arg 0,queue
+	arg 0,regb
+
+check_l2cap_map_loop:
+	sub queue,7,null
+	nrtn positive
+	qisolate1 rega
+	branch check_l2cap_map_used,true
+	branch check_l2cap_map_used2
+
+check_l2cap_map_used:
+	copy temp,pdata
+	branch check_l2cap_map_used2,blank
+	qset1 regb
+	increase -1,temp
+
+check_l2cap_map_used2:
+	increase 1,queue
+	branch check_l2cap_map_loop
+
+
+
+/*********************************************************/
+//char* malloc(short len)
+//input: rega -> len
+//rtn: regb -> pbuff;return from pdata
+//val: queue -> i
+//val: timeup -> buff_cnt
+/*********************************************************/
+
+
+ble_l2cap_malloc:
+	fetchr regd,2,mem_ble_l2cap_tx_buff0_ptr
+	fetchr rege,2,mem_ble_l2cap_tx_buff_size_ptr
+	call disable_user
+	branch host_l2cap_malloc
+
+/*
+	malloc l2cap buffer
+	input:
+	BT is enable user
+	BLE is disable user
+	rega is want malloc buffer size
+	regd is l2cap buffer start ptr
+	rege is l2cap buffer size
+	output:
+	pdata & contw is buffer ptr
+*/
+host_l2cap_malloc:
+	bpatch patch0e_1,mem_patch0e
+	call l2cap_malloc_is_fifo_full
+	nbranch assert,blank//assert when fifo full
+	call l2cap_malloc_get_full_map
+	arg 8,loopcnt
+host_l2cap_malloc_loop:
+	fetcht 1,mem_used_map
+	sub loopcnt,8,queue
+	qisolate1 temp
+	branch host_l2cap_malloc_next_buffer,true//if(1 == (used_map & (1 << i)))goto next;
+	call host_l2cap_malloc_check_buffer_enough
+	nbranch host_l2cap_malloc_next_buffer,positive//if(buff_cnt <= 0)goto next;
+	call host_l2cap_malloc_into_fifo
+	branch host_l2cap_malloc_succ//return (pbuff);
+host_l2cap_malloc_next_buffer:
+	copy rege,pdata
+	iadd regd,regd		//pbuff += BUFF_SIZE;//point to next buff
+	loop host_l2cap_malloc_loop
+	branch assert	//return NULL
+host_l2cap_malloc_succ:
+	copy regd,pdata
+	copy regd,contw
+	rtn//return pointer via pdata
+
+/*********************************************************/
+//char is_size_enough(char buff_index, short len)
+//input: rega -> len
+//input: loopcnt -> 8-buff_index
+//rtn: positive is diable mean no buffer
+//positive is enable mean get buffer
+/*********************************************************/
+host_l2cap_malloc_check_buffer_enough:
+	bpatch patch0e_2,mem_patch0e
+	sub loopcnt,8,queue
+	arg 0,temp
+	arg 0,timeup
+host_l2cap_malloc_check_buffer_enough_loop:
+	copy queue,pdata
+	beq 8,host_l2cap_malloc_check_buffer_enough_end
+	fetch 1,mem_used_map
+	qisolate1 pdata		//the buffer is used
+	branch host_l2cap_malloc_check_buffer_enough_end,true
+	qset1 timeup
+	copy rege,pdata
+	iadd temp,temp
+	increase 1,queue
+	copy rega,pdata
+	isub temp,null
+	branch host_l2cap_malloc_check_buffer_enough_end,zero//(max_size_fom_buff_index ==  len)
+	branch host_l2cap_malloc_check_buffer_enough_loop,positive//(max_size_fom_buff_index <  len)
+host_l2cap_malloc_check_buffer_enough_end:
+	copy temp,pdata
+	isub rega,null
+	nrtn zero
+	qset1 timeup
+	rtn
+
+/*********************************************************/
+//void buff_into_fifo(char buff_index, char buff_cnt, short len)
+//input: rega -> len
+//input: regc -> buff_index
+//input: timeup -> buff_cnt
+//val:temp ->   (fifo->map)
+/*********************************************************/
+host_l2cap_malloc_into_fifo:
+	bpatch patch0e_3,mem_patch0e
+	call l2cap_malloc_is_fifo_full
+	nbranch assert,blank //fifo full
+	call l2cap_malloc_is_fifo_empty
+	branch host_l2cap_malloc_into_fifo_no_push,blank//fifo empty, no need to push
+	fetch 9,mem_tx_fifo1
+	store 9,mem_tx_fifo0
+	setarg 0
+	istore 3,contw//mem_tx_fifo3
+host_l2cap_malloc_into_fifo_no_push:
+	storer timeup,1,mem_tx_fifo3_map
+	storer regd,2,mem_tx_fifo3_ptr
+	rtn
+
+
+/*********************************************************/
+//void* l2cap_malloc_fifo_out(void)
+//output:len -> temp
+//output:ptr ->pdata
+//only get ptr,not free
+/*********************************************************/
+l2cap_malloc_fifo_out:
+	bpatch patch0e_4,mem_patch0e
+	call l2cap_malloc_fifo_get_first_ptr
+	increase 1,contr
+	ifetch 2,contr //ptr ->pdata
+	rtn
+
+
+/*********************************************************/
+//void free_first_buff_in_fifo(void)
+//only free the first one
+/*********************************************************/
+l2cap_malloc_free:
+	bpatch patch0e_5,mem_patch0e
+	call l2cap_malloc_fifo_get_first_ptr
+	copy contr,contw
+	copy contr,temp
+	setarg 0
+	istore 3,contw
+	rtn
+
+
+/*********************************************************/
+//void l2cap_malloc_discard(void)
+//discard the latest malloc
+/*********************************************************/
+l2cap_malloc_discard:
+	bpatch patch0e_6,mem_patch0e
+	call l2cap_malloc_is_fifo_empty
+	branch assert,blank
+	fetch 3,mem_tx_fifo2
+	store 3,mem_tx_fifo3
+	fetch 3,mem_tx_fifo1
+	store 3,mem_tx_fifo2
+	fetch 3,mem_tx_fifo0
+	store 3,mem_tx_fifo1
+	rtn
+
+
+/*********************************************************/
+//bool fifo_is_full(void)
+//blank == 1: not full
+//blank == 0: full
+/*********************************************************/
+l2cap_malloc_is_fifo_full:
+	bpatch patch0e_7,mem_patch0e
+	fetch 3,mem_tx_fifo0
+	rtn
+
+
+/*********************************************************/
+//bool fifo_nearly_full(void)
+//blank == 1: nearly full
+//blank == 0: not nearly full
+/*********************************************************/
+l2cap_malloc_is_fifo_nearly_full:
+	bpatch patch0f_0,mem_patch0f
+	fetch 3,mem_tx_fifo1
+	rtn
+
+
+/*********************************************************/
+//bool fifo_is_empty(void)
+//blank == 1: empty
+//blank == 0: not empty
+/*********************************************************/
+l2cap_malloc_is_fifo_empty:
+	bpatch patch0f_1,mem_patch0f
+	fetch 3,mem_tx_fifo3
+	rtn
+
+
+/*********************************************************/
+//char* l2cap_malloc_fifo_get_first_ptr(void)
+//output:contr  -->ptr
+/*********************************************************/	
+l2cap_malloc_fifo_get_first_ptr:
+	call l2cap_malloc_is_fifo_empty
+	branch l2cap_malloc_fifo_get_first_ptr_empty,blank // fifo is empty
+	arg mem_tx_fifo0,contr
+l2cap_malloc_free_loop:
+	ifetch 3,contr
+	branch l2cap_malloc_free_loop,blank
+l2cap_malloc_fifo_get_first_ptr_empty:
+	increase -3,contr
+	rtn
+
+
+/*********************************************************/
+//char* l2cap_malloc_get_full_map(void)
+//output:mem_used_map  -->full_map
+//add all maps into one
+/*********************************************************/	
+l2cap_malloc_get_full_map:
+	bpatch patch0f_2,mem_patch0f
+	arg 4,loopcnt
+	arg mem_tx_fifo0_map,contr
+	arg 0,temp
+l2cap_malloc_get_full_map_loop:	
+	ifetch 3,contr
+	and pdata,0xff,pdata
+	ior temp,temp
+	loop l2cap_malloc_get_full_map_loop
+	storet 1,mem_used_map
+	rtn
+
+l2cap_util_pdata_to_contw:
+	branch assert,blank
+	copy pdata,contw
+	rtn
+	
+
+l2cap_lpm_save_calc_len:
+	bpatch patch0f_3,mem_patch0f
+	arg 0,regb
+	arg mem_tx_fifo0_map,rega
+	increase -2,rega
+l2cap_lpm_save_calc_len_loop:
+	increase 2,rega
+	setarg mem_tx_fifo_end
+	isub rega,null
+	branch l2cap_lpm_save_calc_len_end,zero //end of 2lcap tx fifo
+	ifetch 1,rega
+	increase 1,rega
+	branch l2cap_lpm_save_calc_len_loop,blank
+	ifetcht 2,rega
+	ifetch 2,temp
+	iadd regb,regb
+	increase 4,regb //l2cap header len
+	branch l2cap_lpm_save_calc_len_loop
+l2cap_lpm_save_calc_len_end:
+	copy regb,pdata
+	rtn
+
+
+l2cap_lpm_get_wake_lock:
+	arg wake_lock_l2cap_tx,queue
+	branch lpm_get_wake_lock
+
+l2cap_lpm_put_wake_lock:
+	arg wake_lock_l2cap_tx,queue
+	branch lpm_put_wake_lock
+	
+
+l2cap_lpm_save_txbuf:
+	call l2cap_malloc_get_full_map
+	fetch 1,mem_used_map
+	rtn blank
+	call l2cap_lpm_save_calc_len
+	arg l2cap_lpm_txbuf_len,temp
+	isub temp,null
+	branch l2cap_lpm_get_wake_lock,positive //no enougth space to save l2cap tx data
+	call l2cap_lpm_put_wake_lock
+//	arg mem_l2cap_lpm_txbuf,contw
+	fetch 2,mem_l2cap_lpm_txbuf_ptr
+	copy contr,contw
+	arg mem_tx_fifo0,rega
+l2cap_lpm_save_txbuf_loop:
+	setarg mem_tx_fifo_end
+	isub rega,null
+	rtn zero //end of 2lcap tx fifo
+	ifetch 1,rega  //mem_tx_fifoX_map
+	increase 1,rega
+	nbranch l2cap_lpm_save_txbuf_nempty,blank
+	istore 2,contw // length = 0
+	increase 2,rega
+	branch l2cap_lpm_save_txbuf_loop
+l2cap_lpm_save_txbuf_nempty:
+	ifetch 2,rega //ptr
+	increase 2,rega
+	copy pdata,contr
+	ifetch 2,contr  //l2cap len
+	istore 2,contw
+	copy pdata,loopcnt
+	increase 2,loopcnt //add CID len
+	call memcpy
+	branch l2cap_lpm_save_txbuf_loop
+
+l2cap_lpm_load_txbuf:
+	call l2cap_malloc_get_full_map
+	fetch 1,mem_used_map
+	rtn blank
+	arg mem_tx_fifo0_ptr,rega
+	increase -3,rega //mem_tx_fifo0_ptr -3
+//	arg mem_l2cap_lpm_txbuf,contr
+	copy contr,contw
+	fetch 2,mem_l2cap_lpm_txbuf_ptr
+	copy contw,contr
+l2cap_lpm_load_txbuf_loop:
+	increase 3,rega //mem_tx_fifoX_ptr
+	setarg mem_tx_fifo_end+1
+	isub rega,null
+	rtn zero //end of 2lcap tx fifo
+	ifetch 2,contr
+	branch l2cap_lpm_load_txbuf_loop,blank
+	increase 4,pdata //l2cap header len
+	copy pdata,loopcnt
+	copy contr,regb
+	ifetch 2,rega //ptr
+	copy pdata,contw
+	copy regb,contr
+	increase -2,contr
+	call memcpy
+	branch l2cap_lpm_load_txbuf_loop
+	
+
+
+	
Index: program/patch.prog
===================================================================
--- /branch/usb/usb_public_base/program/patch.prog	(revision 0)
+++ /branch/usb/usb_public_base/program/patch.prog	(working copy)
@@ -0,0 +1,241 @@
+
+	bbit1 8,pf_patch_ext
+	beq patch00_0,p_soft_reset
+	beq patch00_3,p_connection_incontext
+	beq patch02_7,set_tx_power_10db
+	beq patch06_6,p_dongle_usb_dispatch
+	beq patch0c_2,p_app_init
+	beq patch12_5,p_enable_adc
+	beq patch17_1,p_usb_init
+	beq patch1a_5,p_le_enable_phy_by_pdata
+	beq patch1b_6,p_le_receive_rxon
+	beq patch1c_2,p_le_crc_fail_tx
+	beq patch1d_0,p_le_transmit
+	branch assert
+
+pf_patch_ext:
+	rtneq patch3f_7
+	beq patch27_3,p_g24_bind_data_parse_next
+	branch assert
+
+
+p_soft_reset:
+	branch soft_reset+1,wake
+	fetch 4,mem_lpm_ctrl3
+	store 4,core_lpm_reg
+	call lpm_write_ctrl3
+	branch soft_reset+1
+
+p_app_init:
+	fetch 1,mem_device_option
+	branch app_init,blank
+p_dongle_init:
+	rtn wake
+	jam HVIN_VIN_GREATER_THAN_4V2,mem_lpm_ctrl3
+	call lpm_write_sel_vdd
+	call dongle_init
+
+	//watch dog enable
+	call wdt_set_enable
+p_wdt_kick:
+	//about 125ms
+	setarg 16
+	branch wdt_init_config
+
+p_dongle_usb_dispatch:
+	call p_wdt_kick
+	branch dongle_usb_dispatch+1
+
+p_usb_init:
+	call enable_authrom
+	call usb_init_param
+	jam 0x03,mem_devicedesc+17	//enable iSerialNumber
+	jam 0x00,core_usb_config
+	nop 10000
+	jam 0x00,core_usb_trig
+	fetch 2,core_clkoff
+	set0 CLOCK_OFF_USB,pdata
+	store 2,core_clkoff
+	jam 0x0,core_usb_hmode
+	jam 0x3c,core_usb_config
+	setarg mem_usb_rxbuf_new
+	store 2,core_usb_rx_saddr
+	store 2,core_usb_rxptr
+	setarg mem_usb_rxbuf_new_end
+	store 2,core_usb_rx_eaddr
+	branch usb_init+16
+
+
+p_g24_bind_data_parse_next:
+	fetch 1,mem_24g_rxdata_temp+2
+	beq DATATYPE_BIND,p_g24_bind_first_step	//bind step 1
+	beq DATATYPE_CONFIG,p_g24_bind_second_step
+	beq DATATYPE_OK,p_g24_bind_third_step
+	branch g24_bind_data_parse_next+4
+
+p_g24_bind_first_step:
+	fetch 1,mem_24g_rxdata_temp+3
+	beq DATATYPE_DEVICE1,p_g24_bind_first_step_device1
+	beq DATATYPE_DEVICE2,p_g24_bind_first_step_device2
+	rtn
+p_g24_bind_first_step_device1:
+	fetch 1,mem_24g_device1_bind_disable
+	nrtn blank
+	branch g24_bind_first_step_device1
+p_g24_bind_first_step_device2:
+	fetch 1,mem_24g_device2_bind_disable
+	nrtn blank
+	branch g24_bind_first_step_device2
+
+p_g24_bind_second_step:
+	fetch 1,mem_24g_pair_switch
+	branch p_g24_bind_second_step_skip,blank
+	fetch 4,mem_24g_rxdata_temp+4
+	fetcht 4,mem_24g_lap
+	isub temp,null
+	nrtn zero
+p_g24_bind_second_step_skip:	
+	fetch 1,mem_24g_rxdata_temp+3
+	beq DATATYPE_DEVICE1,p_g24_bind_second_step_device1
+	beq DATATYPE_DEVICE2,p_g24_bind_second_step_device2
+	rtn
+p_g24_bind_second_step_device1:
+	fetch 1,mem_24g_device1_bind_disable
+	nrtn blank
+	branch g24_bind_second_step_device1
+p_g24_bind_second_step_device2:
+	fetch 1,mem_24g_device2_bind_disable
+	nrtn blank
+	branch g24_bind_second_step_device2
+
+p_g24_bind_third_step:
+	fetch 1,mem_24g_pair_switch
+	branch p_g24_bind_third_step_skip,blank
+	fetch 4,mem_24g_rxdata_temp+4
+	fetcht 4,mem_24g_transmitter_addr
+	isub temp,null
+	nrtn zero
+p_g24_bind_third_step_skip:
+	fetch 1,mem_24g_rxdata_temp+3
+	beq DATATYPE_DEVICE1,p_g24_bind_third_step_device1
+	beq DATATYPE_DEVICE2,p_g24_bind_third_step_device2
+	rtn
+p_g24_bind_third_step_device1:
+	fetch 1,mem_24g_device1_bind_disable
+	nrtn blank
+	fetch 1,mem_24g_device1_bind_step
+	beq 2,p_g24_bind_dvc1_step_success
+	rtn
+p_g24_bind_dvc1_step_success:
+	jam 1,mem_24g_device1_bind_disable	
+	branch g24_bind_dvc1_step_success
+
+p_g24_bind_third_step_device2:
+	fetch 1,mem_24g_device2_bind_disable
+	nrtn blank
+	fetch 1,mem_24g_device2_bind_step
+	bne 0,p_g24_bind_dvc2_step_success
+	rtn	
+p_g24_bind_dvc2_step_success:
+	jam 1,mem_24g_device2_bind_disable
+	branch g24_bind_dvc2_step_success
+
+	
+
+p_le_enable_phy_by_pdata:
+	copy temp,pdata
+	bbit1 BIT_LE_2M_PHY,p_le_enable_2M
+	branch le_enable_phy_by_pdata+3
+p_le_enable_2M:
+	jam 0x89,core_rx_bq_cfg0	//bit7 set1,improve 2M rx sensitivity
+	branch le_enable_2M
+	
+p_le_receive_rxon:
+	call le_prep
+	bmark0 mark_ble_lr,p_le_receive_nolr
+	pulse dewhiten_code_calc
+	nop 30
+	call le_prep
+	lshift3 timeup,timeup
+p_le_receive_nolr:
+	disable match
+	enable decode_fec0
+	enable is_rx
+	disable is_tx
+	copy timeup,stop_watch
+	correlate null,timeout	
+	branch p_le_receive_on_attempt,attempt
+	copy clke,temp
+	storet 6,mem_sync_clke
+//	branch p_le_receive_on_attempt	
+p_le_receive_on_attempt:
+	nbranch le_unsync_end,sync
+	enable swfine
+	arg PARAM_T_IFS_150US+PARAM_20MS_INIT+PARAM_SYNC_TIME_DIFFERENCE,stop_watch
+	fetch 1,mem_system_clk
+	imul32 stop_watch,temp
+//	rshift pdata,pdata
+	iadd temp,stop_watch
+	branch le_receive_on_attempt+6
+
+
+p_connection_nosniff:
+	jam 0,mem_current_context
+	branch connection_nosniff
+	
+p_connection_incontext:
+	call context_search_insniff
+	nbranch p_connection_nosniff,zero
+	branch connection_incontext+3
+
+p_le_crc_fail_tx:
+	call ccm_ctrl_clr
+	fetch 1,mem_le_rx_phy
+	nsetflag ble_coded_info,BIT_LE_CODED_PHY_S8,pdata
+	store 1,mem_le_rx_phy
+	disable decode_fec0
+	call set_sync_on
+	jam 0x12,core_syn_top_ctrl
+	fetcht 1,mem_last_freq
+	add temp,2,rega
+	branch rf_tx_write_freq
+
+p_le_transmit:
+//	bpatch patch1d_0,mem_patch1d
+	call le_prep
+	call le_tx_setfreq
+	call rf_debug_tx_on_line	//H
+	set1 TXGFSK,radio_ctrl
+	enable encode_fec0
+	enable is_tx
+	disable is_rx
+	call le_wait_tx
+	disable lr_s2en
+	bmark1 mark_ble_lr,le_transmit_lr
+	bmark1 mark_ble_2M,p_le_transmit_2M
+	branch le_transmit+12
+	
+p_le_transmit_2M:
+	fetchr loopcnt, 1,mem_system_clk
+p_le_transmit_2M_dealy:
+	nop 1
+	loop p_le_transmit_2M_dealy
+	branch le_transmit_2M_dealy+2
+
+p_enable_adc:
+	fetchr regb,1,core_rf_ldo_cfg6
+	jam 0x3d,core_rf_ldo_cfg6
+	jam 0xaa,core_rf_ldo_cfg5
+	jam 0x0c,core_rf_ldo_en0
+	fetch 1,core_clkpll_cfg6
+	set1 7,pdata
+	store 1,core_clkpll_cfg6
+	jam 0x04,core_rf_ldo_en1
+	nop 60
+	jam 0,core_syn_en
+	jam 6,core_rx_en0
+	call read_adc_mode
+	store 1,core_gpadc_ctrl
+	branch enable_adc+15
+	
+
Index: program/peripherals.prog
===================================================================
--- /branch/usb/usb_public_base/program/peripherals.prog	(revision 0)
+++ /branch/usb/usb_public_base/program/peripherals.prog	(working copy)
@@ -0,0 +1,2936 @@
+
+define NEC
+
+
+/* ===================== two wire SPI gpio ======================= */
+
+//pdata:gpio number
+twspi_reset:
+	bpatch patch0f_4,mem_patch0f
+	and_into 0xff,pdata
+	sub pdata,GPIO_NUMBER+-1,null
+	nbranch assert,positive
+	arg core_gpio_conf,contw
+twspi_reset_next:
+	iadd contw,contw
+	copy contw,rega
+	arg gpcfg_output_low,temp
+	istoret 1,contw
+	call twspi_disable
+	nop 30
+	copy rega,contw
+	arg gpcfg_output_high,temp
+	istoret 1,contw
+	branch twspi_enable
+
+
+
+twspi_disable:
+	fetch 1,core_spid_delay
+	and_into 0x7f,pdata
+	store 1,core_spid_delay
+	rtn
+
+twspi_enable:
+	fetch 1,core_spid_delay
+	or_into 0x80,pdata
+	store 1,core_spid_delay
+	rtn
+
+twspi_write:
+	branch spid_write_reg
+
+twspi_read:
+	branch spid_read_reg
+
+
+/* ===================== code loading ======================= */
+aes_disable:
+	fetch 1,core_aes_en
+	and_into 0xfd,pdata   	// disable aes
+	store 1,core_aes_en
+	rtn
+
+read_function_aes:
+	nbranch read_function,user
+	fetch 1,core_aes_en
+	or_into 0x2,pdata   	// enable aes 
+	store 1,core_aes_en
+read_function:
+	copy temp,null //length
+	branch read_fuction_zero,zero
+	copy regc,pc  //branch pc
+	
+read_fuction_zero:
+	isolate0 0,null  // always true
+	branch set_ucode_status
+	
+/* return temp = block length */
+get_block_header:
+	force 4,temp
+get_block_header0:
+	arg mem_ucode_buf,rega
+	call aes_disable	// disable aes for header
+	call read_function
+	arg 0x55aa,rega
+	fetch 2,mem_ucode_buf
+	ifetcht 2,contr
+	isub rega,null
+	rtn
+
+
+read_first_block:
+	call load_aes_reinit,user
+	arg 2,temp
+	arg mem_ucode_ptr,rega
+	call read_function
+	fetch 2,mem_ucode_ptr
+	store 2,mem_addr_mi
+	call get_iv,user
+	rtn
+	
+get_iv:
+	arg 16,temp
+	arg mem_ucode_keybuf,rega
+	call aes_disable	// disable aes for iv
+	call read_function
+set_iv:
+	arg mem_ucode_keybuf,contr
+	arg 16,loopcnt
+	call aes_load_data
+	call aes_init
+	call aes_clear_data
+	branch do_aes_cbc			// generate first IV 
+
+load_aes_reinit:
+	jam 0x0, core_ucode_ctrl
+	call aes_disable
+	branch aes_clear_data
+
+load_storage:
+	setarg 0
+	store 2,mem_queue	//data checksum
+	disable match
+	call get_block_header
+	nrtn zero
+	enable match
+	jam 0x80, core_ucode_ctrl
+	jam 0,core_ucode_hi
+	jam 0,core_ucode_low
+	arg core_ucode_data,rega
+	call read_function_aes
+	jam 0x0, core_ucode_ctrl
+	fetch 1,mem_ucode_status
+	rtnbit0 0           //rtn if load code fail
+load_storage_loop:
+	arg 6,temp
+	call get_block_header0
+	nbranch load_data_checksum_compare,zero
+	ifetch 2,contr
+	iforce rega
+	call read_function
+	call load_data_checksum_calc
+	branch load_storage_loop
+
+
+load_data_checksum_calc:
+	fetch 2,mem_queue
+	arg 6,loopcnt
+	arg mem_ucode_buf,contr
+	call cal_sum
+	fetchr loopcnt,2,mem_ucode_len
+	copy rega,contr
+	call cal_sum
+	store 2,mem_queue
+	rtn
+
+load_data_checksum_compare:
+	fetch 1,mem_load_check_sum
+	beq 0x5a,load_data_checksum_ok //skip check sum 
+	arg 0xaa55,rega
+	fetch 2,mem_ucode_buf
+	isub rega,null
+	nbranch load_data_checksum_compare_fail, zero
+	arg 0x55aa,rega
+	fetch 2,mem_ucode_len
+	isub rega,null
+	nbranch load_data_checksum_compare_fail, zero
+	fetch 2,mem_sched_addr
+	fetcht 2,mem_queue	//calc  sum
+	isub temp,null
+	nbranch load_data_checksum_compare_fail, zero
+load_data_checksum_ok:	
+	set1 15,rega
+	branch read_fuction_zero
+
+load_data_checksum_compare_fail:
+	jam 0,mem_ucode_status
+	rtn
+	
+
+	/* only load memory data from eeprom */
+reload_eeprom:
+	call clean_mem
+	setarg 0x1000
+	store 2,mem_addr_mi
+	arg iicd_read_eep,regc
+	arg 2,loopcnt
+reload_eeprom_loop:
+	call get_block_header
+	nrtn zero
+	fetch 2,mem_addr_mi
+	byteswap pdata,pdata
+	iadd temp,pdata
+	byteswap pdata,pdata
+	store 2,mem_addr_mi
+	loop reload_eeprom_loop
+	branch load_storage_loop
+
+
+loadcode_lock:
+	fetch 2,core_ucode_flag
+	store 2,mem_ucode_device_flag
+	set0 lpmreg_ice_mode_bit,pdata
+	nrtn blank 	
+	
+	setarg OTP_OFFSET_DEVICE_FLAG 
+	arg mem_ucode_device_flag,rega
+	arg 2,temp
+	call otpd_read_data
+	
+	fetch 1,mem_ucode_ptr
+	rshift4 pdata,temp
+	fetch 1,mem_ucode_device_flag
+	lshift4 pdata,pdata
+	ior temp,pdata
+	store 1,mem_ucode_device_flag
+	branch  app_lpm_peripheral_lock_check
+
+
+loadcode:
+	jam 0x25,core_clkoff			// disable debug uart
+	call clean_mem
+	disable user
+	jam 0,mem_ucode_status
+	call otp_read_pwr_on
+	call app_read_efuse_app_vsel	
+	setarg OTP_OFFSET_UCODE_FLAG 
+	arg mem_ucode_ptr,rega
+	arg 2,temp
+	call otpd_read_data
+	call loadcode_lock
+	setarg OTP_OFFSET_LOADCODE_DELAY
+	arg mem_load_delay ,rega
+	arg 2,temp
+	call otpd_read_data	
+
+	fetch 1,mem_ucode_device_flag
+	bbit0 OTP_UFLAG_AES, loadcode_otp
+	setarg OTP_OFFSET_UCODE_KEY
+	arg mem_ucode_keybuf,rega
+	arg 16,temp
+	call otpd_read_data
+	jam LOCK_OTP,core_misc_ctrl	// disable further read/write of key
+	set1 mark_otp_encrypt,mark	
+	arg mem_ucode_keybuf,contr
+	call load_key
+	enable user			// set user for aes
+
+loadcode_otp:
+	jam 0,mem_loadcode_times
+loadcode_otp_loop:
+	call loadcode_timeout
+	nbranch loadcode_error,positive	
+	call load_aes_reinit,user
+	fetch 2,mem_ucode_ptr
+	byteswap pdata,pdata
+	arg 0x7ff,temp
+	iand temp,pdata
+	branch loadcode_iic, zero  //no otp 
+	call otp_set_addr
+	arg otpd_read_code,regc
+	call get_iv,user
+	call load_storage
+	nbranch loadcode_iic,match
+	fetch 1,mem_ucode_status
+	compare 3,pdata,3
+	nbranch loadcode_otp_loop,true	// crc error, try again
+	call run_otp_code
+	
+loadcode_iic:
+	call otp_pwr_off
+	jam 0,mem_loadcode_times
+loadcode_iic_loop:	
+	call loadcode_timeout
+	nbranch loadcode_error,positive	
+	call iicd_load_gpio_init
+	call clear_eeprom_size_2k
+	fetch 1,mem_ucode_device_flag
+	bbit1 OTP_UFLAG_SKIP_EEP,loadcode_spi
+	call loadcode_iic_by_eeprom
+	nbranch loadcode_iic_eeprom_2k,match
+	fetch 1,mem_ucode_status
+	compare 3,pdata,3
+	nbranch loadcode_iic_loop,true		// crc error, try again
+	branch loadcode_spi
+	
+run_otp_code:
+	setarg 0x1ff //patch3f_7
+	arg 0,pc
+	rtn
+	
+loadcode_iic_eeprom_2k:
+	call set_eeprom_size_2k
+	fetch 1,mem_ucode_device_flag
+	bbit1 OTP_UFLAG_SKIP_EEP,loadcode_spi
+	call loadcode_iic_by_eeprom
+	nbranch loadcode_spi,match
+	fetch 1,mem_ucode_status
+	compare 3,pdata,3
+	nbranch loadcode_iic_loop,true		// crc error, try again
+	branch loadcode_hci
+	
+loadcode_spi:
+	jam 0,mem_loadcode_times
+loadcode_spi_loop:
+	call loadcode_timeout
+	nbranch loadcode_error,positive	
+	fetch 1,mem_ucode_device_flag
+	bbit1 OTP_UFLAG_SKIP_FLASH, loadcode_hci
+	call spid_init_flash
+	nop 200						// some flash will fail if no delay here
+	call spid_flash_release_form_powerdown
+	nop 100	
+	arg spid_load_flash,regc
+	call read_first_block
+	call load_storage
+	nbranch loadcode_hci,match
+	fetch 1,mem_ucode_status
+	compare 3,pdata,3
+	nbranch loadcode_spi_loop,true		// crc error, try again
+
+loadcode_hci:
+	call clear_key_buf
+	fetch 1,mem_ucode_device_flag
+	rtnbit0 OTP_UFLAG_HCI
+	branch hci_init
+	
+clear_key_buf:
+	setarg 0
+	store 8,mem_ucode_keybuf
+	store 8,mem_ucode_keybuf+8
+	force regidx_key,regext_index
+	call aes_clear
+	jam 0x21,core_clkoff		// enable debug uart
+	rtn
+
+iicd_load_gpio_init:
+	fetch 1,mem_eeprom_sda_gpio
+	fetcht 1,mem_eeprom_scl_gpio
+	isub temp,null
+	nbranch iicd_read_init_pin,zero
+iicd_load_default_gpio:
+	jam 2,mem_eeprom_wp_gpio
+	jam 1,mem_eeprom_scl_gpio
+	jam 0,mem_eeprom_sda_gpio
+	branch iicd_read_init_pin
+
+
+
+loadcode_iic_by_eeprom:
+	setarg 0x0
+	store 2,mem_addr_mi
+	arg iicd_read_eep,regc
+	call iic_init_600khz
+	call read_first_block
+	branch load_storage
+
+
+
+//output: positive 1:continue load ;0:load timeout
+loadcode_timeout:
+	call loadcode_error_delay
+	fetch 1,mem_loadcode_times
+	increase 1,pdata
+	sub pdata,3,null
+	store 1,mem_loadcode_times	 
+	rtn
+	
+loadcode_error_delay:
+	fetch 1,mem_loadcode_times
+	rtn blank
+	fetch 1,mem_load_delay
+	rtn blank
+	copy pdata,loopcnt
+	branch delay_ms_wait
+	
+/*
+loadcode_check_times:
+	fetch 1,mem_loadcode_times
+	increase 1,pdata
+	sub pdata,3,null
+	nbranch loadcode_error,positive
+	store 1,mem_loadcode_times
+	rtn
+*/
+	
+loadcode_error:
+	call clear_key_buf
+//	call ice_break_disable_wdt
+	call ice_break
+	rtn
+	
+
+
+/* true flag is set into status,rega pointers to buf, */
+set_ucode_status:
+	fetch 1,mem_ucode_status
+	lshift pdata,pdata
+	setflag true,0,pdata
+	isolate0 15,rega  // load code if rega.15 = 1
+	rtn true
+	store 1,mem_ucode_status
+	rtn
+
+	/* queue is bit position of hw done status */
+decrypt_code:
+	fetch 1,core_aes_en
+	rtnbit0 1
+	branch decrypt_code_skip	/* skip to key generation at first for speed */
+decrypt_code_loop:
+	fetch 1,core_dma_status
+	qisolate1 pdata
+	rtn true
+decrypt_code_skip:
+	fetch 1,core_misc_status
+	bbit0 1,decrypt_code_loop
+	call do_aes_cbc
+	branch decrypt_code_loop
+
+	/* loopcnt is ucode instruction count, pdata is buffer ptr */
+//save_ucode:
+//	copy loopcnt,temp
+//	storet 2,mem_patch_len
+//	jam 0x80, core_ucode_ctrl
+//	jam 0,core_ucode_hi
+//	jam 0,core_ucode_low
+//	store 2,mem_patch_ptr
+//	iforce contw
+//	lshift2 loopcnt,loopcnt
+//save_ucode_loop:
+//	fetch 1,core_ucode_data
+//	istore 1,contw
+//	loop save_ucode_loop
+//	jam 0x0, core_ucode_ctrl
+//	rtn
+
+
+load_ucode:
+	fetch 2,mem_patch_ptr
+	rtn blank
+	jam 0x80, core_ucode_ctrl
+	jam 0,core_ucode_hi
+	jam 0,core_ucode_low
+	fetcht 2,mem_patch_len
+	lshift2 temp,loopcnt
+	iforce contr
+load_ucode_loop:
+	ifetch 1,contr
+	store 1,core_ucode_data
+	loop load_ucode_loop
+	jam 0x0, core_ucode_ctrl
+	rtn
+
+/* ===================== OTP ======================= */
+
+
+otp_prog_pwr_on:
+	jam 0x4,rfen_chgpump
+	jam 0x33,rfen_chgpump_ctrl1
+	jam 0x1,rfen_chgpump_ctrl2
+	branch otp_pwr_on
+
+otp_read_pwr_on:
+	jam 0xc,rfen_chgpump    
+	jam 0xfb,rfen_chgpump_ctrl1
+	jam 0x3,rfen_chgpump_ctrl2   
+
+otp_pwr_on:
+	store 2,mem_timeup
+	bpatch patch0f_5,mem_patch0f
+	jam 0xff,core_clkpll_ctrl1
+
+	fetch 1,core_rf_ldo_en1
+	store 1,mem_timeup+2
+	or_into 0x4,pdata
+	store 1,core_rf_ldo_en1
+
+	fetch 1,core_rf_ldo_cfg7
+	store 1,mem_timeup+3
+	
+	jam 0x11,core_rf_ldo_cfg7
+	
+	nop 1000
+	fetch 1,core_clkpll_ctrl2
+	or_into 0x1,pdata
+	store 1,core_clkpll_ctrl2
+	jam 0x03,core_clkpll_ctrl0
+	bpatch patch0f_6,mem_patch0f
+	fetch 1,rfen_chgpump
+	or_into 0xd0,pdata
+	store 1,rfen_chgpump
+	nop 6000  //delay 500us
+	fetch 1,rfen_chgpump
+	or_into 0x20,pdata
+	store 1,rfen_chgpump
+	nop 12000   //delay 1ms
+	fetch 2,mem_timeup
+	rtn
+	
+otp_pwr_off:
+	bpatch patch0f_7,mem_patch0f
+	jam 0x4,rfen_chgpump
+	jam 0x43,rfen_chgpump_ctrl1
+	jam 0x1,rfen_chgpump_ctrl2
+	fetch 1,core_clkpll_ctrl2
+	and_into 0xfe,pdata
+	store 1,core_clkpll_ctrl2
+	fetch 1,mem_timeup+2
+	store 1,core_rf_ldo_en1
+	fetch 1,mem_timeup+3
+	store 1,core_rf_ldo_cfg7
+	rtn
+
+
+otp_set_addr:
+	lshift3 pdata,pdata
+	store 2,core_otp_addr
+	jam 0,core_otpd_ctrl
+	rtn	
+
+/* pdata = otp address, rega pointers data, loopcnt is count */
+otp_write:
+	call otp_prog_pwr_on
+	call otp_set_addr
+	call otp_ce
+otp_program:
+	ifetcht 1,rega
+	increase 1,rega
+	force 0,queue
+otp_program_bit:
+	qisolate0 temp
+	branch otp_skip_0,true
+	fetch 1,core_otp_din
+	set1 6,pdata				/* din */
+	set1 7,pdata				/* dle */
+	store 1,core_otp_din
+	jam 0x02,core_otp_ctrl	/* web */
+	jam 0x82,core_otp_ctrl
+	set0 7,pdata				/* dle */
+	store 1,core_otp_din
+	jam 0x8a,core_otp_ctrl	/* pgmen */
+	nop 11
+	jam 0xca,core_otp_ctrl	/* vppen */
+	nop 33
+	jam 0x4a,core_otp_ctrl	/* web 2nd */
+	nop 44
+	jam 0xca,core_otp_ctrl	/* release web */
+	nop 22
+	jam 0x8a,core_otp_ctrl	/* release vppen */
+	nop 33
+	jam 0x82,core_otp_ctrl	/* release pgmen */
+	nop 1
+	jam 0x92,core_otp_ctrl	/* pgmvfy */
+	nop 10
+	jam 0xb2,core_otp_ctrl	/* readen */
+	fetch 1,core_otp_rdata
+	jam 0x92,core_otp_ctrl	/* release readen */
+	nop 1
+	jam 0x82,core_otp_ctrl	/* release pgmvfy */
+	qisolate0 pdata
+	branch otp_program_bit,true	/* program error */
+otp_skip_0:
+	fetch 2,core_otp_addr
+	increase 1,pdata
+	store 2,core_otp_addr
+	increase 1,queue
+	compare 8,queue,0xf
+	nbranch otp_program_bit,true
+	loop otp_program
+	jam 0x83,core_otp_ctrl	/* release ceb */
+	branch otp_pwr_off
+
+otp_ce:
+	jam 0x82,core_otp_ctrl	/* ceb */
+	nop 12
+	jam 0x80,core_otp_ctrl	/* rstn */
+	jam 0x82,core_otp_ctrl	/* release rstn */
+	nop 150					/* waiting for vdd25 stable */
+	rtn
+
+	/* rega points to data, temp is count */
+otpd_read_init:
+	call otp_ce
+	jam 0xa2,core_otp_ctrl	/* readen */
+	deposit rega
+	store 2,core_otpd_addr
+	set1 11,temp
+	isolate0 15,pdata
+	setflag true,15,temp
+	storet 2,core_otpd_len
+	jam otpd_start,core_otp_rdata
+	rtn
+
+otpd_wait_end:
+	fetch 1,core_dma_status
+	bbit0 otpd_done,otpd_wait_end
+	jam 0x83,core_otp_ctrl	/* release ceb */
+	rtn
+
+/* pdata=otp address, rega points to data, temp is count */
+otpd_read_data_with_pwr_operation:
+	bpatch patch10_0,mem_patch10
+	call otp_read_pwr_on
+	call otpd_read_data
+	branch otp_pwr_off
+
+	/* pdata=otp address, rega points to data, temp is count */
+otpd_read_data:
+	call otp_set_addr
+	call otpd_read_init
+	call otpd_wait_end
+	rtn
+
+
+/* rega pointers to buf, temp is length */
+otpd_read_code:	
+	call otp_read_pwr_on
+	fetch 2,core_current_otp_addr
+	store 2,core_otp_addr
+	call otpd_read_init
+	arg otpd_done,queue
+	call decrypt_code
+	call otpd_wait_end
+	isolate1 otpd_crcok,pdata	
+	call set_ucode_status
+	branch otp_pwr_off
+
+/* ===================== LOCK ======================= */
+
+//0x04: 3V3; 0x3A: 5V
+app_read_efuse_app_vsel:
+	setarg OTP_OFFSET_APP_VDD_SEL 
+	arg mem_lpm_ctrl3_app_vsel,rega
+	arg 1,temp
+	call otpd_read_data
+	fetch 1,mem_lpm_ctrl3_app_vsel
+	nbranch app_set_app_vsel,blank
+	jam 0x04,mem_lpm_ctrl3_app_vsel	//3V3
+app_set_app_vsel:
+	branch lpm_write_sel_vdd
+
+app_lpm_peripheral_lock_check:
+	fetch 2,mem_ucode_device_flag
+	rshift4 pdata,pdata
+	rtn blank
+	fetch 1,mem_ucode_device_flag
+	rshift4 pdata,pdata
+	beq dvc_op_module,app_lpm_peripheral_lock_module
+	beq dvc_op_dongle,app_lpm_peripheral_lock_dongle
+//	beq dvc_op_test,app_lpm_peripheral_lock_test
+	beq dvc_op_light,app_lpm_peripheral_lock_light
+	beq dvc_op_mouse,app_lpm_peripheral_lock_mouse
+	beq dvc_op_shutter,app_lpm_peripheral_lock_shutter
+	beq dvc_op_hci_boot,app_lpm_peripheral_lock_hciboot
+	beq dvc_op_remote_car,app_lpm_peripheral_lock_remote_car
+	beq dvc_op_car,app_lpm_peripheral_lock_car
+	branch app_lpm_mpu_lock_24g_ble
+	
+app_lpm_peripheral_lock_module:
+app_lpm_peripheral_lock_hciboot:
+	call app_lpm_mpu_lock_24g
+	branch lpm_write_lock
+
+	
+app_lpm_peripheral_lock_dongle:
+	arg module_init,pdata //module
+	arg ui_soft_switch_power_off,temp  //shutter
+	call app_mpu_s0_lock
+	branch lpm_write_lock
+
+app_lpm_peripheral_lock_test:
+	branch lpm_write_lock
+
+app_lpm_peripheral_lock_light:
+	arg car_init,pdata //
+	arg shutter_default_init,temp  //shutter
+	call app_mpu_s0_lock    
+	branch lpm_write_lock
+
+app_lpm_peripheral_lock_mouse:
+	arg car_init,pdata //
+	arg module_set_state,temp  //module
+	call app_mpu_s0_lock
+	branch lpm_write_lock
+	
+app_lpm_peripheral_lock_shutter:
+	arg car_init,pdata  //
+	arg remote_car_moto_data_enable_user,temp //car remote
+	call app_mpu_s0_lock
+	branch lpm_write_lock
+	
+	
+app_lpm_peripheral_lock_remote_car:
+app_lpm_peripheral_lock_car:
+	arg dongle_init,pdata  //dongle
+	arg ui_soft_switch_power_off,temp //shutter
+	call app_mpu_s0_lock
+	branch lpm_write_lock
+	
+app_lpm_peripheral_lock_antilost:
+	arg car_init,pdata  //dongle
+	arg ui_soft_switch_power_off,temp //shutter
+	call app_mpu_s0_lock
+	branch lpm_write_lock
+
+app_lpm_mpu_lock_module:
+	arg module_init,pdata
+	arg module_set_state,temp
+app_mpu_s0_lock:
+	lshift16 temp,temp
+	ior temp,pdata
+	store 4,core_lpm_reg
+	branch lpm_write2_mpu_s0
+	
+app_lpm_mpu_lock_app:	
+	arg car_init,pdata  //
+	arg ui_soft_switch_power_off,temp //shutter
+	branch app_mpu_s0_lock
+
+
+
+app_lpm_mpu_lock_ble:	
+	arg le_parse_att,pdata
+	arg le_send_ll_one_lenth,temp
+app_mpu_s1_lock:
+	lshift16 temp,temp
+	ior temp,pdata
+	store 4,core_lpm_reg
+	branch lpm_write2_mpu_s1
+	
+app_lpm_mpu_lock_24g:	
+	arg g24_prep,pdata
+	arg g24_enable_1M,temp
+	branch app_mpu_s1_lock
+	
+app_lpm_mpu_lock_24g_ble:
+	call app_lpm_mpu_lock_24g
+	arg le_parse_att,pdata
+	arg le_send_ll_one_lenth,temp
+	call app_mpu_s0_lock
+	branch	lpm_write_lock
+
+
+lpm_write_lock:
+	fetch 2,mem_ucode_device_flag
+	set1 lpmreg_rom_lock_bit,pdata
+	set1 lpmreg_ice_mode_bit,pdata
+	store 4,core_lpm_reg
+	call lpm_write2_ctrl_option
+	jam 8,core_encrypt
+	rtn
+
+lpm_write2_ctrl_option:
+	setarg lpmreg2_sel_option
+lpm_write2:
+	until null,lpo_edge
+	store 1,core_lpm_wr2
+	until null,lpo_edge
+	until null,lpo_edge
+	rtn
+
+
+lpm_write_ice_disable:
+	fetch 2,core_ucode_flag
+	set0 lpmreg_ice_mode_bit,pdata
+	store 4,core_lpm_reg
+	branch lpm_write2_ctrl_option
+
+lpm_write_ice_enable:
+	fetch 2,core_ucode_flag
+	set1 lpmreg_ice_mode_bit,pdata
+	store 4,core_lpm_reg
+	branch lpm_write2_ctrl_option
+	
+	
+lpm_write2_mpu_s0:
+	setarg lpmreg2_sel_mpu_s0
+	branch lpm_write2
+
+lpm_write2_mpu_s1:
+	setarg lpmreg2_sel_mpu_s1
+	branch lpm_write2
+
+
+
+/* ===================== SPI dma ======================= */
+
+spid_init:
+	bpatch patch10_1,mem_patch10
+spid_init_common:
+	fetch 1,mem_spi_init_clk
+	store 1,core_spid_ctrl	// A7530 should at least 34, or write fail
+	fetch 1,mem_spi_init_delay_time
+	store 1,core_spid_delay	// 4us delay
+	setarg mem_spid_tbuf
+	store 2,core_spid_txaddr
+	setarg mem_spid_rbuf
+	store 2,core_spid_rxaddr
+	branch twspi_disable
+	
+
+
+/* pdata 6:0 is reg address, 15:8 is data to write */
+spid_write_reg:
+	set1 7,pdata
+	store 2,mem_spid_tbuf
+	bpatch patch10_2,mem_patch10
+	jam 2,core_spid_txlen
+	jam 0,core_spid_rxlen
+	jam spid_start,core_misc_ctrl
+	branch wait_spid_done
+
+/* pdata 6:0 is reg address, temp is bytes to read */
+spid_read_reg:
+	force 1,temp
+spid_read_regs:	
+	store 1,mem_spid_tbuf
+	bpatch patch10_3,mem_patch10
+	jam 1,core_spid_txlen
+	storet 2,core_spid_rxlen
+	jam spid_start,core_misc_ctrl
+	call wait_spid_done
+	fetch 1,mem_spid_rbuf
+	rtn
+
+
+wait_spid_done:
+//	fetch 2,mem_afh_error_total
+//	increase 1,pdata
+//	store 2,mem_afh_error_total
+	nop 5
+	fetch 1,core_dma_status
+	bbit0 spid_done,wait_spid_done
+	rtn
+
+	
+
+
+
+
+/**
+ ******************************************************************************
+ ** \brief  write flash
+ **
+ ** \param [in]  rega: 2byte write ptr    
+ **			pdata:3byte flash address  
+ ** 			temp:2byte write data length
+ **
+ ** \retval user  0: flash buys 1:write flash setting complate
+ **
+ ******************************************************************************/
+
+flash_write:
+	disable user
+	copy pdata,regb
+	fetch 1,mem_spi_write_flash_sm
+	rtnne FLASH_SM_NO_BUYS
+	enable user
+	copy regb,pdata
+	branch spid_flash_write_start
+
+
+flash_write_spi_sm_timer:
+	fetch 1,mem_spi_write_flash_sm 	
+	beq FLASH_SM_START,spid_flash_write_start
+	beq FLASH_SM_ERASE_SECTOR,spid_flash_erase_sector
+	beq FLASH_SM_WAIT_ERASE_SECTOR,spid_flash_wait_erase_sector
+	beq FLASH_SM_WRITE_DATA,spid_flash_write_data
+	beq FLASH_SM_WAIT_WRITE_DATA,spid_flash_wait_write_data
+	rtn
+
+spid_flash_write_start:
+	store 3,mem_spi_write_addr
+	copy rega,pdata
+	store 2,mem_spi_write_ptr
+	storet 2,mem_spi_write_len
+	jam FLASH_SM_ERASE_SECTOR,mem_spi_write_flash_sm
+	branch spid_init_flash
+spid_flash_erase_sector:
+	call spid_init_flash
+	jam FLASH_SM_WAIT_ERASE_SECTOR,mem_spi_write_flash_sm
+	call spid_unlock_flash
+	arg mem_spid_tbuf,rega
+	jam 4,core_spid_txlen
+	fetch 3,mem_spi_write_addr
+	arg FLASH_COMMAND_SECTOR_ERASE,temp
+	branch spid_write_flash_common
+	
+spid_flash_wait_erase_sector:
+	call spid_init_flash
+	call wait_spid_flash_done
+	jam FLASH_SM_WRITE_DATA,mem_spi_write_flash_sm
+	rtn
+
+
+spid_flash_write_data:
+	bpatch patch10_4,mem_patch10
+	call spid_init_flash
+	jam FLASH_SM_WAIT_WRITE_DATA,mem_spi_write_flash_sm
+	call spid_unlock_flash
+	call spid_flash_data_preserve
+	call spid_write_flash
+	branch spid_flash_data_recover
+spid_flash_wait_write_data:
+	call spid_init_flash
+	call spid_unlock_flash
+	setarg FLASH_READ_SATUS
+	call spid_read_reg
+	rtnbit1 FLASH_STATUS_WIP
+	jam FLASH_SM_NO_BUYS,mem_spi_write_flash_sm
+	fetch 2,mem_cb_spi_flash_write_complate
+	branch callback_func
+spid_flash_data_recover:
+	fetch 4,mem_temp
+	fetcht 2,mem_spi_write_ptr
+spid_flash_data_recover_comm:
+	increase -4,temp
+	istore 4,temp
+	rtn
+	
+spid_flash_data_preserve:
+	fetcht 2,mem_spi_write_ptr
+	copy temp,rega
+	increase -4,temp
+	ifetch 4,temp
+	store 4,mem_temp
+	fetcht 2,mem_spi_write_len
+	fetch 3,mem_spi_write_addr
+	rtn
+
+spid_init_flash:
+	bpatch patch10_5,mem_patch10
+	call spi_gpio_init
+	call twspi_disable
+	setarg 0
+	store 4,mem_spid_tbuf
+	rtn
+
+spid_unlock_flash:
+	jam FLASH_COMMAND_WRITE_ENABLE,mem_spid_tbuf
+spid_sendcmd_common:	
+	setarg 0
+	store 2,core_spid_rxlen
+	setarg 1
+	store 2,core_spid_txlen
+	setarg mem_spid_tbuf
+	store 2,core_spid_txaddr
+	jam spid_start,core_misc_ctrl
+	branch wait_spid_done
+	
+spid_flash_release_form_powerdown:
+	jam FLASH_COMMAND_RELEASE_FROM_POWERDOWN,mem_spid_tbuf
+	branch spid_sendcmd_common
+	
+spid_flash_powerdown:
+	jam FLASH_COMMAND_POWERDOWN,mem_spid_tbuf
+	branch spid_sendcmd_common
+	
+/* pdata is flash address, rega pointers to txdata(4 ahead bytes should be left), temp is length */
+spid_write_flash:
+	increase 4,temp
+	storet 2,core_spid_txlen
+	arg FLASH_COMMAND_WRITE_DATA,temp
+	increase -4,rega
+
+spid_write_flash_common:
+	istoret 1,rega
+	rshift16 pdata,temp
+	istoret 1,contw
+	rshift8 pdata,temp
+	istoret 1,contw
+	istore 1,contw
+	deposit rega
+	store 2,core_spid_txaddr
+	setarg 0
+	store 2,core_spid_rxlen
+	jam spid_start,core_misc_ctrl
+	call wait_spid_done
+	branch wait_spid_flash_done
+
+
+/* temp is length, rega pointers to buf   */
+spid_read_flash:
+	storet 2,core_spid_rxlen
+	rshift16 pdata,temp
+	storet 1,mem_addr_hi
+	rshift8 pdata,temp
+	storet 1,mem_addr_mi
+	store 1,mem_addr_lo
+	setarg 4
+	store 2,core_spid_txlen
+	jam FLASH_COMMAND_READ_DATA,mem_spid_tbuf
+	setarg mem_spid_tbuf
+	store 2,core_spid_txaddr
+	deposit rega
+	store 2,core_spid_rxaddr
+	fetch 1,core_spid_ctrl
+	isolate0 15,rega
+	setflag true,6,pdata
+	store 1,core_spid_ctrl
+	jam spid_start,core_misc_ctrl
+spid_read_flash_wait:
+	fetch 1,core_dma_status
+	bbit1 7,spid_read_flash_wait			// waiting for spid write
+	arg spid_done,queue
+	branch wait_spid_done
+
+wait_spid_flash_done:
+	setarg 2000
+	call sleep
+	call spid_unlock_flash
+	setarg mem_spid_rbuf
+	store 2,core_spid_rxaddr
+	setarg FLASH_READ_SATUS
+	call spid_read_reg
+	bbit1 FLASH_STATUS_WIP,wait_spid_flash_done
+	rtn
+
+
+/* temp is length, rega pointers to buf  */
+spid_load_flash:
+	storet 2,core_spid_rxlen
+	setarg 4
+	store 2,core_spid_txlen
+	jam 3,mem_spid_tbuf
+	setarg mem_spid_tbuf
+	store 2,core_spid_txaddr
+	deposit rega
+	store 2,core_spid_rxaddr
+	fetch 1,core_spid_ctrl
+	isolate0 15,rega
+	setflag true,6,pdata
+	store 1,core_spid_ctrl
+	jam spid_start,core_misc_ctrl
+spi_load_flash_wait:
+	fetch 1,core_dma_status
+	bbit1 7,spi_load_flash_wait			// waiting for spid write
+	arg spid_done,queue
+	call decrypt_code
+	call wait_spid_done
+	isolate1 spid_crcok,pdata
+	call set_ucode_status
+	fetch 1,mem_addr_hi
+	lshift16 pdata,regb
+	fetch 1,mem_addr_mi
+	lshift8 pdata,pdata
+	ior regb,regb
+	fetch 1,mem_addr_lo
+	ior regb,pdata
+	iadd temp,pdata
+	store 1,mem_addr_lo
+	rshift8 pdata,pdata
+	store 1,mem_addr_mi
+	rshift8 pdata,pdata
+	store 1,mem_addr_hi
+	rtn
+	
+spi_gpio_init:
+	fetch 1,mem_spi_cs_gpio
+	fetcht 1,mem_spi_so_gpio
+	isub temp,null
+	nbranch spi_pin_set,zero
+	call spi_gpio_default_init
+	
+spi_pin_set:
+	fetch 1,mem_spi_cs_gpio
+	arg gpcfg_spid_ncs,temp
+	call gpio_config_function_int
+	fetch 1,mem_spi_sclk_gpio
+	arg gpcfg_spid_sck,temp
+	call gpio_config_function_int
+	fetch 1,mem_spi_si_gpio
+	arg gpcfg_spid_mosi,temp
+	call gpio_config_function_int
+	fetch 1,mem_spi_so_gpio
+	arg gpcfg_spid_miso,temp
+	branch gpio_config_function_int
+
+spi_gpio_default_init:
+	jam 1,mem_spi_cs_gpio
+	jam 3,mem_spi_si_gpio
+	jam 0,mem_spi_so_gpio
+	jam 2,mem_spi_sclk_gpio
+	jam 11,mem_spi_wp_gpio
+	jam 10,mem_spi_hold_gpio
+	rtn
+
+
+/*****************************************************************************
+*soft reset chip
+*****************************************************************************/
+soft_reset_chip:
+	jam 1,core_reset
+	rtn
+
+
+
+/* ===================== I2C dma ======================= */
+
+/* scl high time: scl_high + 2 clks, scl low time:scl_low + 6 clks
+data setup time: data_setup + 2 clks, data hold time: scl_low-setup-hold+4 clks */
+iic_init_600khz:
+	jam 5,core_iicd_scl_low
+ 	jam 7,core_iicd_scl_high
+	jam 7,core_iicd_start_setup
+	jam 7,core_iicd_start_hold
+	jam 7,core_iicd_stop_setup
+	jam 5,core_iicd_data_setup
+	jam 0,core_iicd_data_hold
+	rtn
+	
+iic_init_360khz:	//360khz
+	jam 12,core_iicd_scl_low
+	jam 13,core_iicd_scl_high
+	jam 13,core_iicd_start_setup
+	jam 13,core_iicd_start_hold
+	jam 13,core_iicd_stop_setup
+	jam 12,core_iicd_data_setup
+	jam 0,core_iicd_data_hold	
+  	rtn
+
+iicd_init_pin:
+	call iicd_eeprom_write_enable
+iicd_init_pin_scl_sda:
+	fetch 1,mem_eeprom_scl_gpio
+	arg gpcfg_iic_scl|gpcfg_pullup,temp
+	call gpio_config_function_int
+	fetch 1,mem_eeprom_sda_gpio
+	arg gpcfg_iic_sda|gpcfg_pullup,temp
+	branch gpio_config_function_int
+
+iicd_read_init_pin:
+	call iicd_eeprom_write_disable
+	branch iicd_init_pin_scl_sda
+
+wait_iicd_done:
+	fetch 1,core_dma_status
+	bbit0 iicd_done,wait_iicd_done
+	rtn
+
+	/* pdata is iic addr, rega points to buf, temp is length */
+iicd_read_data:
+	store 1,mem_iicd_addr
+	setarg mem_iicd_addr
+	store 2,core_iicd_txaddr
+	setarg 1
+	store 2,core_iicd_txlen
+	storet 2,core_iicd_rxlen
+	storer rega,2,core_iicd_rxaddr
+	jam 1,core_iicd_ctrl
+	jam iicd_start,core_misc_ctrl
+	branch wait_iicd_done
+
+	/* rega points to buf, temp is length */
+iic_write_data:
+	setarg 0
+	store 2,core_iicd_rxlen
+	store 2,core_iicd_rxaddr
+	storet 2,core_iicd_txlen
+	storer rega,2,core_iicd_txaddr
+	jam 1,core_iicd_ctrl
+	jam iicd_start,core_misc_ctrl
+	branch wait_iicd_done
+
+set_eeprom_size_2k:
+	set1 mark_eeprom_size,mark
+	jam 0x08,mem_eeprom_block_size
+	rtn
+
+clear_eeprom_size_2k:
+	set0 mark_eeprom_size,mark
+	jam 0x20,mem_eeprom_block_size
+	rtn
+
+
+iicd_read_eep_data_size_2k:
+ 	fetch 1,mem_eeprom_base
+	iadd regb,pdata
+	store 1,mem_addr_mi
+	branch iicd_read_eep_size_2k
+
+iicd_read_eep_size_2k_lcadcode:
+	fetch 2,mem_addr_mi
+	byteswap pdata,pdata
+	store 1,mem_addr_mi
+	
+//length:temp 
+//mem ptr:rega
+//eeprom addr:pdata
+iicd_read_eep_size_2k:
+ 	setarg 3
+	store 2,core_iicd_txlen
+	jam 0xa0,mem_iicd_tbuf
+	jam 0xa1,mem_iicd_tbuf+2
+	branch iicd_read_eep_common
+
+
+//length:temp 
+//mem ptr:rega
+//eeprom addr:regb
+iicd_write_protect_eep_data:
+	storet 2,mem_temp
+	call iicd_eeprom_write_enable
+	fetcht 2,mem_temp
+	call iicd_write_eep_data
+	branch iicd_eeprom_write_disable
+	
+iicd_eeprom_write_enable:
+	fetch 1,mem_eeprom_wp_gpio
+	rtneq GPIO_DISABLE
+	bbit0 6,iicd_wp_gpio_output_low
+	setarg 150000
+	call sleep
+iicd_wp_gpio_output_low:
+	fetcht 1,mem_eeprom_wp_gpio
+	branch gpio_out_active
+	
+iicd_eeprom_write_disable:
+	fetcht 1,mem_eeprom_wp_gpio
+	branch gpio_out_inactive
+	
+//length:temp 
+//mem ptr:rega
+//eeprom addr offset:regb
+iicd_read_eep_data:
+	bpatch patch10_6,mem_patch10
+	bmark1 mark_eeprom_size,iicd_read_eep_data_size_2k
+	fetch 2,mem_eeprom_base
+	iadd regb,pdata
+	byteswap pdata,pdata
+	store 2,mem_addr_mi
+
+/* rega pointers to buf, temp is length  */
+iicd_read_eep:
+	bpatch patch10_7,mem_patch10
+	bmark1 mark_eeprom_size,iicd_read_eep_size_2k_lcadcode
+	setarg 4
+	store 2,core_iicd_txlen
+	jam 0xa0,mem_iicd_tbuf
+	jam 0xa1,mem_iicd_tbuf+3
+iicd_read_eep_common:	
+	setarg mem_iicd_tbuf
+	store 2,core_iicd_txaddr
+	storet 2,core_iicd_rxlen
+	storer rega,2,core_iicd_rxaddr
+	setarg 2
+	isolate0 15,rega
+	setflag true,0,pdata
+	store 1,core_iicd_ctrl
+	jam iicd_start,core_misc_ctrl
+	arg iicd_done,queue
+	call decrypt_code
+	call wait_iicd_done
+	isolate1 iicd_crcok,pdata
+	call set_ucode_status
+	bmark1 mark_eeprom_size,iicd_read_eep_load_code_size_2k
+	fetch 2,mem_addr_mi
+	byteswap pdata,pdata
+	iadd temp,pdata
+	byteswap pdata,pdata
+	store 2,mem_addr_mi
+	rtn
+
+iicd_read_eep_load_code_size_2k:
+	fetch 1,mem_addr_mi
+	iadd temp,pdata
+	byteswap pdata,pdata
+	store 2,mem_addr_mi
+	rtn
+	
+
+//length:temp 
+//mem ptr:rega
+//eeprom addr offset:regb
+iicd_write_eep_data:
+	fetch 2,mem_eeprom_base
+	iadd regb,pdata
+
+//cuur ptr:pdata length:temp buf:rega
+iicd_write_ota_data:
+	store 2,mem_pdatatemp //curr ptr
+	bpatch patch11_0,mem_patch11
+	storet 2,mem_temp	//len
+	storer rega,2,mem_contr
+iicd_write_eep_loop:
+	call iicd_eep_transparency
+
+	fetcht 2,mem_regb
+	fetchr rega,2,mem_contr
+	fetch 2,mem_pdatatemp
+	
+	call iicd_write_eep
+	
+	fetch 2,mem_regb
+	fetcht 2,mem_contr
+	iadd temp,temp
+	storet 2,mem_contr
+	fetcht 2,mem_pdatatemp
+	iadd temp,temp
+	storet 2,mem_pdatatemp
+	fetch 2,mem_temp
+	nbranch iicd_write_eep_loop,blank
+	rtn
+	
+//in:
+//1.size 2.len 3.src 4.des
+//mem_regc page's area
+//mem_pdatatemp curr ptr
+//mem_temp all len      
+//mem_regb curr len
+iicd_eep_transparency:
+	bpatch patch11_1,mem_patch11
+	fetch 1,mem_eeprom_block_size
+	increase -1,pdata
+	fetcht 2,mem_pdatatemp
+	ior temp,pdata
+	increase 1,pdata
+	store 3,mem_regc
+
+	fetch 2,mem_temp
+	iadd temp,pdata
+
+	fetcht 3,mem_regc
+	isub temp,pdata
+	nbranch iicd_eep_deal_short_packet,positive
+	store 2,mem_temp
+	fetch 3,mem_regc
+	fetcht 2,mem_pdatatemp
+	isub temp,pdata
+	store 2,mem_regb
+	rtn
+iicd_eep_deal_short_packet:
+	fetch 2,mem_temp
+	store 2,mem_regb
+	setarg 0
+	store 2,mem_temp
+	rtn
+
+iicd_write_eep_size_2k:
+	copy regb,pdata
+	increase 2,temp
+	storet 2,core_iicd_txlen
+	increase -2,rega
+	ifetcht 3,rega
+	copy temp,regb
+	arg 0xa0,temp
+	istoret 1,rega
+	istore 1,contw
+	branch iicd_write_eep_common
+
+	/* pdata is eeprom address, rega pointers to txdata(3 ahead bytes should be left), temp is length */
+iicd_write_eep:
+	copy pdata,regb
+	bpatch patch11_2,mem_patch11
+	bmark1 mark_eeprom_size,iicd_write_eep_size_2k
+	copy regb,pdata
+	increase 3,temp
+	storet 2,core_iicd_txlen
+	increase -3,rega
+	ifetcht 3,rega
+	copy temp,regb
+	arg 0xa0,temp
+	istoret 1,rega
+	byteswap pdata,pdata
+	istore 2,contw
+iicd_write_eep_common:	
+	storer rega,2,core_iicd_txaddr
+	setarg 0
+	store 2,core_iicd_rxlen
+	jam 1,core_iicd_ctrl
+	jam iicd_start,core_misc_ctrl
+	call wait_iicd_done
+	istorer regb,3,rega
+iic_check_eeprom_standby:
+	bpatch patch11_3,mem_patch11
+	jam 0,mem_iicd_tbuf+3
+iic_check_eeprom_standby_wait:
+	setarg 1
+	store 2,core_iicd_txlen
+	jam 0xa0,mem_iicd_tbuf
+	setarg mem_iicd_tbuf
+	store 2,core_iicd_txaddr
+	setarg 0
+	store 2,core_iicd_rxlen
+	store 2,core_iicd_rxaddr
+	setarg 3
+	store 1,core_iicd_ctrl
+	jam iicd_start,core_misc_ctrl
+	call wait_iicd_done
+	fetch 1,core_dma_status
+	rtnbit0 iicd_ack
+	nop 1500
+	fetch 1,mem_iicd_tbuf+3
+	increase 1,pdata
+	store 1,mem_iicd_tbuf+3
+	sub pdata,40,null
+	nrtn positive//polling timeout 6ms
+	branch iic_check_eeprom_standby_wait
+
+
+/* ===================== uart dma ======================= */
+uarta_init_dma_mem:
+	call enable_user
+	branch uart_init_dma_mem
+
+/*
+function name:uart_init_dma_mem
+input:
+	pdata is dma memory config
+	bit[0-15]:rx start memory address
+	bit[16-31]:rx ending memory address
+	bit[32-47]:tx start memory address
+	bit[48-63]:tx ending memory address
+	user is choice uart road
+	enable is mean check uart A
+	disable user is mean check uart B
+*/
+uart_init_dma_mem:
+	rshift16 pdata,temp
+	call uarta_init_rx,user
+	rshift32 pdata,pdata
+	rshift16 pdata,temp
+	call uarta_init_tx,user
+	fetch 2,core_clkoff
+	set0 CLOCK_OFF_UART,pdata
+	store 2,core_clkoff
+	rtn
+
+
+/*
+function name:uarta_init_baud_rate
+input:
+	pdata is uart A baud rate
+*/
+uarta_init_baud_rate:
+	store uart_baud_len,core_uart_baud
+	rtn
+
+
+/*
+function name:uarta_calc_baud_rate_config
+input:
+	temp is uart A baud rate,Decimal data
+	E.g:115200 input arg 115200,temp
+*/
+uarta_calc_baud_rate_config:
+	call uart_calc_baud_rate_config
+	branch uarta_init_baud_rate
+
+
+/*
+function name:uart_calc_baud_rate_config
+input:
+	temp is uart baud rate,Decimal data
+	E.g:115200 input arg 115200,temp
+output:
+	pdata is CPU config uart baud rate
+*/
+uart_calc_baud_rate_config:
+	call uart_calc_baud_rate_config_choice_uart_clock
+	idiv temp
+	call wait_div_end
+	quotient pdata
+	rtn
+
+uart_calc_baud_rate_config_choice_uart_clock:
+	fetch 1,core_uart_clksel
+	bbit0 UART_CLOCK_SELECT_BIT,uart_calc_baud_rate_config_choice_uart_clock_crystal
+	setarg uart_clock_freq_48M
+	rtn
+uart_calc_baud_rate_config_choice_uart_clock_crystal:
+	setarg uart_clock_freq_24M
+	rtn
+
+uart_clock_select_main_freq_crystal:
+	fetch 1,core_uart_clksel
+	and pdata,UART_CLOCK_SELECT_CRYSTAL,pdata
+	store 1,core_uart_clksel
+	rtn
+
+uart_clock_select_main_freq_dpll:
+	fetch 1,core_uart_clksel
+	or pdata,UART_CLOCK_SELECT_DPLL,pdata
+	store 1,core_uart_clksel
+	rtn
+
+
+	// pdata: tx buffer start, temp: tx buffer end
+uarta_init_tx:
+	store 2,core_uart_tsaddr
+	store 2,core_uart_twptr
+	storet 2,core_uart_teaddr
+	rtn
+
+	// pdata: rx buffer start, temp: rx buffer end
+uarta_init_rx:
+	store 2,core_uart_rsaddr
+	store 2,core_uart_rrptr
+	storet 2,core_uart_readdr
+	rtn
+
+uarta_prepare_tx:
+	fetchr contus,2,core_uart_tsaddr
+	fetchr contue,2,core_uart_teaddr
+	fetchr contu,2,core_uart_twptr
+	rtn
+
+uarta_prepare_rx:
+	fetchr contus,2,core_uart_rsaddr
+	fetchr contue,2,core_uart_readdr
+	fetchr contu,2,core_uart_rrptr
+	rtn
+
+uarta_send:
+	storer contu,2,core_uart_twptr
+	rtn
+
+uarta_rxdone:
+	storer contu,2,core_uart_rrptr
+	rtn
+
+uarta_clear_current_rx:
+	call uarta_prepare_rx
+	fetch 2,core_uart_rxitems
+	iadd contu,contu
+	branch uarta_rxdone
+
+uarta_prepare_tx_register_push:
+	call uart_register_push
+	branch uarta_prepare_tx
+
+uarta_send_register_pop:
+	call uarta_send
+	branch uart_register_pop
+
+
+uart_register_push:
+	storer contu,2,mem_contu
+	storer contus,2,mem_contue
+	storer contue,2,mem_contus
+	rtn
+
+uart_register_pop:
+	fetchr contu,2,mem_contu
+	fetchr contus,2,mem_contue
+	fetchr contue,2,mem_contus
+	rtn
+
+
+uart_copy_tx_bytes_fast:
+	deposit loopcnt
+	rtn blank
+uart_copy_tx_bytes_fast_loop:
+	increase -8,loopcnt
+	call uart_tx_8_bytes,positive
+	rtn zero
+	branch uart_copy_tx_bytes_fast_loop,positive
+	increase 8,loopcnt
+uart_copy_tx_bytes_fast_loop_four:
+	increase -4,loopcnt
+	call uart_tx_4_bytes,positive
+	rtn zero
+	branch uart_copy_tx_bytes_fast_loop_four,positive
+	increase 4,loopcnt
+	branch uart_copy_tx_bytes
+
+uart_tx_8_bytes:
+	ifetch 8,contr
+	istore 8,contu
+	rtn
+
+uart_tx_4_bytes:
+	ifetch 4,contr
+	istore 4,contu
+	rtn
+
+uart_copy_tx_bytes:
+	deposit loopcnt
+	rtn blank
+uart_copy_tx_bytes_loop:
+	ifetch 1,contr
+	istore 1,contu
+	loop uart_copy_tx_bytes_loop
+	rtn
+
+uart_copy_rx_bytes_fast:
+	deposit loopcnt
+	rtn blank
+uart_copy_rx_bytes_fast_loop:
+	increase -8,loopcnt
+	call uart_rx_8_bytes,positive
+	rtn zero
+	branch uart_copy_rx_bytes_fast_loop,positive
+	increase 8,loopcnt
+uart_copy_rx_bytes_fast_loop_four:
+	increase -4,loopcnt
+	call uart_rx_4_bytes,positive
+	rtn zero
+	branch uart_copy_rx_bytes_fast_loop_four,positive
+	increase 4,loopcnt
+	branch uart_copy_rx_bytes
+
+
+uart_rx_8_bytes:
+	ifetch 8,contu
+	istore 8,contw
+	rtn
+
+uart_rx_4_bytes:
+	ifetch 4,contu
+	istore 4,contw
+	rtn
+
+
+uart_copy_rx_bytes:
+	deposit loopcnt
+	rtn blank
+uart_copy_rx_bytes_loop:
+	ifetch 1,contu
+	istore 1,contw
+	loop uart_copy_rx_bytes_loop
+	rtn
+
+
+/* ===================== eeprom data ======================= */
+
+app_store_nvram_event:
+	jam BT_EVT_STORE_NVRAM,mem_fifo_temp
+	branch ui_ipc_send_event
+
+check_51cmd_update_device_record:
+	bpatch patch11_4,mem_patch11
+	fetch 1,mem_nv_data_number
+	rtn blank		// not nv data
+	call check_nvram
+	call init_device_list,zero
+	call disable_user2
+	call nvram_find_addr_from_bd_list
+write_device_record:
+	fetch 1,mem_nv_data_number
+	icopy regc
+	fetcht 2,mem_nv_data_ptr
+	storet 2,mem_list_item_ptr
+write_device_loop_find:
+	copy regc,pdata
+	branch app_store_nvram_event,blank  //EEPROM
+	increase -1,regc
+	copy temp,rega
+	ifetch 1,rega
+	fetcht 1,mem_select_list_item
+	isub temp,null
+	call set_index_finded_device,zero
+	branch write_device_loop_find0,positive
+	ifetch 1,rega
+	increase 1,pdata
+	istore 1,rega
+write_device_loop_find0:
+	fetcht 2,mem_list_item_ptr
+	increase NV_DATA_LEN,temp
+	storet 2,mem_list_item_ptr
+	branch write_device_loop_find
+
+set_index_finded_device:
+	setarg 0
+	istore 1,rega
+	fetch 1,mem_temp_reconn_record
+	istore 1,contw	
+	bne REC_3_MODE,set_index_finded_device_ble_mode
+//	arg mem_link_key,regb
+set_index_find_device_MASTER_ADDR:
+	ifetch 6,contr
+	istore 8,contw
+	setarg 0
+	istore 8,contw
+	copy regb,contr
+store_rec_data_common:
+	call memcpy16
+	force 1,null
+	rtn
+
+set_index_finded_device_ble_mode:
+	beq REC_4_MODE_RANDOM_RESOLVABLE_PRIVATE_ADDRESS,set_index_finded_device_IRK
+	beq REC_4_MODE_RANDOM_NON_RESOLVABLE_PRIVATE_ADDRESS,set_index_finded_device_EDIV
+	arg mem_le_ltk,regb
+	branch set_index_find_device_MASTER_ADDR
+
+set_index_finded_device_IRK:
+	arg mem_le_irk,contr
+	call memcpy16
+store_ble_rec_data_common:
+	arg mem_le_ltk,contr
+	branch store_rec_data_common
+
+set_index_finded_device_EDIV:
+	arg mem_le_rand,contr
+	call memcpy16
+	branch store_ble_rec_data_common
+
+
+//enable user2 reconnect
+//disable user2 pairing
+nvram_find_addr_from_bd_list:
+	bpatch patch11_5,mem_patch11
+	call disable_user
+	fetch 1,mem_nv_data_number
+	rtn blank		// not nv data
+	bpatch patch11_6,mem_patch11
+	fetch 2,mem_ui_state_map
+	rtnbit0 UI_STATE_BLE_CONNECTED
+find_addr_from_bd_list_ble_mode:
+	fetch 1,mem_le_conn_peer_addr_type
+	beq MASTER_PUBLIC_ADDR,find_addr_from_bd_list_public_device_addr
+	fetch 1,mem_le_plap+5
+	compare 0xc0,pdata,0xc0
+	branch find_addr_from_bd_list_static_addr,true
+	compare 0x40,pdata,0xc0
+	branch find_addr_from_bd_list_random_addr,true
+	branch find_addr_from_bd_list_random_non_resolvable_private_address_sc_or_legacy
+
+find_addr_from_bd_list_static_addr:
+	branch find_addr_from_bd_list_static_addr_reconnect,user2
+	fetch 1,mem_le_preq_init_key_distribution
+	bbit0 LE_INITATOR_IRK_BIT,find_addr_from_bd_list_public_device_addr
+	branch find_addr_from_bd_list_static_addr_sc_or_legacy
+
+find_addr_from_bd_list_static_addr_reconnect:
+	call find_addr_from_bd_list_public_device_addr
+	rtn user
+	branch find_addr_from_bd_list_static_addr_sc_or_legacy
+
+
+find_addr_from_bd_list_static_addr_sc_or_legacy:
+find_addr_from_bd_list_random_non_resolvable_private_address_sc_or_legacy:
+	fetch 1,mem_le_pairing_mode
+	bbit1 LE_PAIRING_MODE_SECURE_CONNECT_BIT,find_addr_from_bd_list_random_non_resolvable_private_address_sc
+	branch find_addr_from_bd_list_random_non_resolvable_private_address
+
+find_addr_from_bd_list_static_addr_sc:
+find_addr_from_bd_list_random_non_resolvable_private_address_sc:
+	fetch 6,mem_le_plap
+	store 8,mem_le_rand
+	branch find_addr_from_bd_list_random_non_resolvable_private_address
+
+
+find_addr_from_bd_list_public_device_addr:
+	jam REC_4_MODE_STATIC_ADDRESS,mem_temp_reconn_record
+	fetch 6,mem_le_plap
+	branch find_addr_from_bd_list_common
+	
+find_addr_from_bd_list_random_non_resolvable_private_address:	
+	jam REC_4_MODE_RANDOM_NON_RESOLVABLE_PRIVATE_ADDRESS,mem_temp_reconn_record
+	branch find_addr_from_bd_list_common
+
+//input :pdata EDIV and rands
+find_addr_from_bd_list_random_addr:
+	jam REC_4_MODE_RANDOM_RESOLVABLE_PRIVATE_ADDRESS,mem_temp_reconn_record
+	branch find_addr_from_bd_list_common
+	
+find_addr_from_bd_list_common:
+	bpatch patch11_7,mem_patch11
+//	store 6,mem_temp_lap
+	fetch 2,mem_nv_data_ptr
+	ifetcht 1,pdata
+	pincrease 1
+	store 2,mem_list_item_ptr
+	storet 1,mem_select_list_item
+	fetch 1,mem_nv_data_number
+	icopy regc
+nvram_find_addr_from_list:
+	fetch 2,mem_list_item_ptr
+	copy pdata,rega
+	call nvram_find_addr_from_list_compare
+	rtn user
+	fetcht 2,mem_list_item_ptr
+	increase NV_DATA_LEN,temp
+	storet 2,mem_list_item_ptr
+	increase -1,temp
+	ifetch 1,temp
+	store 1,mem_select_list_item
+	increase -1,regc
+	nbranch nvram_find_addr_from_list,zero
+	fetch 1,mem_nv_data_number
+	pincrease DECREASED_ONE
+	store 1,mem_select_list_item
+	rtn
+nvram_find_addr_from_list_compare:
+	fetch 1,mem_temp_reconn_record
+	bne REC_3_MODE,find_addr_from_list_compare_ble_mode
+find_master_addr_from_list_compare:
+	arg mem_temp_reconn_record,regb
+	arg 7,loopcnt
+	call string_compare
+	branch enable_user,zero
+	rtn
+
+find_addr_from_list_compare_ble_mode:
+	beq REC_4_MODE_RANDOM_RESOLVABLE_PRIVATE_ADDRESS,find_irk_form_list_compare
+	beq REC_4_MODE_RANDOM_NON_RESOLVABLE_PRIVATE_ADDRESS,find_ediv_form_list_compare
+	branch find_master_addr_from_list_compare
+
+find_irk_form_list_compare:
+	ifetcht 1,rega
+	isub temp,null
+	nrtn zero
+	arg mem_le_prand,contw
+	arg 16,loopcnt
+	call clear_mem
+	fetch 3,mem_le_plap+3
+	store 3,mem_le_prand
+	call genernate_master_MacAddress
+	fetch 2,mem_le_aes_128+13
+	byteswap pdata,pdata
+	lshift8 pdata,temp
+	ifetch 1,contr
+	iadd temp,pdata
+	fetcht 3,mem_le_plap
+	isub temp,null
+	branch enable_user,zero
+	rtn
+
+
+genernate_master_MacAddress:
+	arg mem_le_prand ,contr
+	call load_data128
+//	arg mem_le_irk,contr
+	ifetch 1,rega
+	call load_regext
+	force 0x38,aes_ctrl
+	force 0x0,aes_ctrl
+	call wait_aes
+	arg mem_le_aes_128,contw
+	branch store_aes_result
+
+find_ediv_form_list_compare:
+	ifetcht 1,rega
+	isub temp,null
+	nrtn zero
+	copy contr,rega
+	add contr,8,regc
+	arg mem_le_rand,regb
+	arg 8,loopcnt
+	call string_compare
+	branch enable_user,zero
+	copy regc,rega
+	arg mem_le_irk,regb
+	arg 8,loopcnt
+	call string_compare
+	branch enable_user,zero
+	rtn
+
+check_nvram:
+	fetch 2,mem_nv_data_ptr
+	ifetcht 1,pdata
+	pincrease NV_DATA_LEN
+	ifetch 1,pdata
+	isub temp,null
+	rtn
+
+init_device_list:
+	fetch 1,mem_nv_data_number
+	icopy loopcnt
+	fetcht 2,mem_nv_data_ptr
+	setarg 0
+init_device_list_loop:
+	istore 1,temp
+	increase NV_DATA_LEN,temp
+	pincrease 1
+	loop init_device_list_loop
+	rtn
+
+load_device_list_mode_4:
+//	fetch 9,mem_le_ediv
+//	branch clear_ltk_exists,blank
+	call enable_user2
+	call nvram_find_addr_from_bd_list
+	nbranch clear_ltk_exists,user
+	fetch 2,mem_list_item_ptr
+	add pdata,1,contr
+	arg mem_le_irk,contw
+	call  memcpy16
+	arg mem_le_ltk,contw
+	call  memcpy16
+	jam 1,mem_ltk_exists
+	rtn
+
+clear_ltk_exists:
+	jam 0,mem_ltk_exists
+	rtn
+
+
+eeprom_store_le_reconn_info:
+	jam REC_4_MODE,mem_record_bt_mode
+	branch eeprom_store_reconn_info
+
+eeprom_store_reconn_info:
+	fetch 1,mem_device_option
+	beq dvc_op_module,check_51cmd_update_device_record
+	beq dvc_op_mouse,mouse_store_remote_bdaddr
+	rtn
+	
+
+
+/* =============== GPIO CONTROL ================= */
+
+
+//temp [4:0]=GPIO number, 0-31, 
+gpio_set_wake_by_current_state:
+	bpatch patch12_0,mem_patch12
+	set1 gpio_active_bit,temp
+	call gpio_get_bit
+	nsetflag true,gpio_active_bit,temp
+
+//temp [4:0]=GPIO number, 0-31, [7]=0, low active
+gpio_set_wake:
+	bpatch patch12_1,mem_patch12
+	sub temp,UI_BUTTON_GPIO_DISABLE,null
+	rtn zero
+	isolate0 gpio_active_bit,temp
+	and temp,0x1f,queue
+	fetch 4,mem_gpio_wakeup_low
+	qsetflag true,pdata
+	store 4,mem_gpio_wakeup_low
+	fetch 4,mem_gpio_wakeup_high
+	nqsetflag true,pdata
+	store 4,mem_gpio_wakeup_high
+	rtn
+	
+//temp [4:0]=GPIO number, 0-31, [7]=0, low active
+gpio_clr_wake:
+	bpatch patch12_2,mem_patch12
+	sub temp,UI_BUTTON_GPIO_DISABLE,null
+	rtn zero
+	isolate0 gpio_active_bit,temp
+	and temp,0x1f,queue
+	fetch 4,mem_gpio_wakeup_low
+	qset0 pdata
+	store 4,mem_gpio_wakeup_low
+	fetch 4,mem_gpio_wakeup_high
+	qset0 pdata
+	store 4,mem_gpio_wakeup_high
+	rtn
+
+gpio_config_input_nowake:
+	call gpio_clr_wake
+	branch gpio_config_input_without_wake
+
+//temp [4:0]=GPIO number, 0-31, [7]=0, low active
+gpio_config_input:
+	sub temp,UI_BUTTON_GPIO_DISABLE,null
+	rtn zero
+	ncall gpio_set_wake,wake
+gpio_config_input_without_wake:
+	call gpio_addr
+	setarg 0
+	isolate1 gpio_active_bit,temp
+	nsetflag true,6,pdata
+	setflag true,7,pdata
+	branch gpio_write
+
+//temp is gpio number, return true if gpio active
+gpio_get_bit:
+	bpatch patch12_3,mem_patch12
+	arg core_gpio_in,contw
+	and temp,0x07,queue
+	rshift3 temp,pdata
+	and_into 3,pdata
+	iadd contw,contw
+	ifetch 1,contw
+	isolate1 gpio_active_bit,temp
+	branch gpio_get_bit_reverse,true
+	qisolate0 pdata
+	rtn
+gpio_get_bit_reverse:
+	qisolate1 pdata
+	rtn
+
+//temp [5:0]=GPIO number, 0-39, [7]=0, low active. set gpio to inactive state
+gpio_out_inactive:
+	sub temp,UI_BUTTON_GPIO_DISABLE,null
+	rtn zero
+	isolate1 gpio_active_bit,null
+	branch gpio_out_flag
+
+gpio_config_output:
+gpio_out_active:
+	sub temp,UI_BUTTON_GPIO_DISABLE,null
+	rtn zero
+	isolate0 gpio_active_bit,null
+
+//temp is gpio number,  [7]=1,set out equa true flag if gpio active
+gpio_out_flag:
+	setarg 0
+	nsetflag true,gpio_active_bit,pdata
+	ixor temp,temp
+
+//temp is gpio number,0-31, [7]=out bit value
+gpio_out:
+	call gpio_addr
+	setarg gpcfg_output_high
+	isolate1 gpio_active_bit,temp
+	setflag true,0,pdata
+	branch gpio_write
+
+//check output status
+gpio_check_active:
+	sub temp,UI_BUTTON_GPIO_DISABLE,null
+	branch  disable_true,zero
+	call gpio_addr
+	ifetch 1,contw
+	bbit1 0,gpio_check_active_high
+	isolate0 gpio_active_bit,temp
+	rtn
+gpio_check_active_high:
+	isolate1 gpio_active_bit,temp
+	rtn
+
+gpio_set_analog:
+	call gpio_addr
+	setarg gpcfg_no_ie
+gpio_write:
+	istore 1,contw
+	rtn
+
+gpio_set_high_impedance:
+	call gpio_addr
+	setarg gpcfg_high_impedance
+	branch gpio_write
+
+gpio_addr:
+	and temp,0x3f,pdata
+	sub pdata,GPIO_NUMBER+-1,null
+	nbranch assert,positive
+	arg core_gpio_conf,contw
+gpio_addr_next:
+	iadd contw,contw
+	rtn
+	
+
+
+
+
+gpio_config_param:
+	and pdata,0xff,temp
+	rshift8 pdata,pdata
+	branch gpio_config_function_int
+
+//pdata: gpio number bit7=1, temp: function type
+gpio_config_function:
+	rtnbit0 gpio_active_bit
+gpio_config_function_int:
+	and_into 0x3f,pdata
+	sub pdata,GPIO_NUMBER+-1,null
+	nbranch assert,positive
+	arg core_gpio_conf,contw
+gpio_config_function_int_next:
+	iadd contw,contw
+	istoret 1,contw
+	rtn
+
+
+
+//temp:gpio num
+gpio_get_config:
+	and_into 0x3f,temp
+	setarg core_gpio_conf
+	iadd temp,contr
+	ifetch 1,contr
+	rtn
+
+
+//The default as shutter and remote
+gpio_set_before_lpm:
+	arg GPIO_NUMBER,loopcnt
+	arg core_gpio_conf,contr
+setgpio_loop:
+	copy contr,contw
+	ifetch 1,contr
+	beq gpcfg_spid_miso,setgpio_pullup
+	beq gpcfg_spid_ncs,setgpio_pullup
+	beq gpcfg_spid_sck,setgpio_pullup
+	beq gpcfg_spid_mosi,setgpio_pullup
+	beq gpcfg_spid_sdio,setgpio_pullup
+	beq gpcfg_iic_scl,setgpio_pullup
+	beq gpcfg_iic_sda,setgpio_pullup
+	beq gpcfg_input,setgpio_pullup
+setgpio_loop_end:
+	loop setgpio_loop
+	rtn
+	
+	
+setgpio_pullup:
+	setarg gpcfg_pullup
+	istore 1,contw
+	branch setgpio_loop_end
+setgpio_pulldown:
+	setarg gpcfg_pulldown
+	istore 1,contw	
+	branch setgpio_loop_end
+
+/*************************************ADC*************************************/
+
+
+//mem_adc_config_flag 0:vinlpm 1:Hvin 2: GPIO
+adc_init_data:
+	bpatch patch12_4,mem_patch12
+	setarg OTP_OFFSET_ADC_PARAM
+	arg mem_3v_adc_io_data,rega
+	arg 12,temp
+	call otpd_read_data_with_pwr_operation
+	fetch 8,mem_3v_adc_io_data
+	nrtn blank
+adc_init_cal_data_default:
+	setarg 0x469a
+	store 2,mem_3v_adc_io_data
+	setarg 0xab77
+	store 2,mem_1v_adc_io_data
+	setarg 0x73d0
+	store 2,mem_3v_adc_vinlpm_data
+	setarg 0x9658
+	store 2,mem_2v_adc_vinlpm_data
+	rtn	
+
+	
+enable_adc:
+	bpatch patch12_5,mem_patch12
+	fetchr regb,1,core_rf_ldo_cfg6
+	jam 0x3d,core_rf_ldo_cfg6
+	jam 0xaa,core_rf_ldo_cfg5
+	jam 0x0c,core_rf_ldo_en0
+	fetch 1,core_clkpll_cfg6
+	set1 7,pdata
+	store 1,core_clkpll_cfg6
+	jam 0x04,core_rf_ldo_en1
+	nop 60
+	jam 0,core_syn_en
+	jam 6,core_rx_en0
+	call read_adc_mode
+	store 1,core_gpadc_ctrl
+	jam 0x03,core_sum_ctrl
+	nop 60
+	fetch 1,core_sum_en
+	set1 7,pdata
+	store 1,core_sum_en
+	nop 1000  // 1/24ms
+	fetch 2,core_adc_sum
+	store 2,mem_adc_current_value
+	fetch 1,core_sum_en
+	set0 7,pdata
+	store 1,core_sum_en
+	jam 0,core_gpadc_ctrl
+	storer regb,1,core_rf_ldo_cfg6
+	rtn
+
+	
+read_adc_mode:	
+	bpatch patch12_6,mem_patch12
+	fetch 1,mem_adc_config_flag
+	beq ADC_CONFIG_VINLPM,adc_mode_vdcdc
+	beq ADC_CONFIG_HVIN,adc_adc_mode_vbat
+//	beq ADC_CONFIG_GPIO,adc_check_gpio
+adc_check_gpio:
+	fetch 1,mem_adc_channel
+	lshift3 pdata,pdata
+	or pdata,7,pdata
+	rtn
+
+adc_mode_vdcdc:
+	setarg 0x57
+	rtn
+	
+adc_adc_mode_vbat:
+	setarg 0x4f
+	rtn
+
+vdd_calculate_by_mode:
+	bpatch patch12_7,mem_patch12
+	fetch 1,mem_adc_config_flag
+	beq ADC_CONFIG_VINLPM,vdd_calculate_vinlpm
+	beq ADC_CONFIG_HVIN,vdd_calculate_hvin
+	beq ADC_CONFIG_GPIO,vdd_calculate_io
+	rtn
+
+vdd_calculate_vinlpm:
+	setarg 100
+	store 2,mem_reference_voltage //diff
+	fetcht 2,mem_3v_adc_vinlpm_data
+	fetch 2,mem_2v_adc_vinlpm_data
+	arg 300,regc
+	branch vdd_calculate
+
+vdd_calculate_hvin:
+	setarg 100
+	store 2,mem_reference_voltage //diff
+	fetcht 2,mem_3v_adc_hvin_data
+	fetch 2,mem_2v_adc_hvin_data
+	arg 300,regc
+	branch vdd_calculate
+
+vdd_calculate_io:
+	setarg 200
+	store 2,mem_reference_voltage //diff
+	fetcht 2,mem_3v_adc_io_data
+	fetch 2,mem_1v_adc_io_data
+	arg 300,regc //max vol
+	
+vdd_calculate:
+	isub temp,rega
+	fetch 2,mem_adc_current_value
+	isub temp,pdata
+	nbranch vdd_calculate1,positive
+	fetcht 2,mem_reference_voltage
+	imul32 temp,regb
+	copy regc,pdata
+	imul32 rega,pdata
+	isub regb,pdata
+	bpatch patch13_0,mem_patch13
+	nbranch set_pdata_0, positive   //adc在测0v电压时会超量程。这里做个异常判断
+vdd_calculate2:
+	idiv rega
+	call wait_div_end
+	quotient pdata	
+	rtn
+
+
+vdd_calculate1:
+	copy temp,pdata
+	fetcht 2,mem_adc_current_value
+	isub temp,pdata
+	fetcht 2,mem_reference_voltage
+	imul32 temp,regb
+	copy regc,pdata
+	imul32 rega,pdata
+	iadd regb,pdata
+	branch vdd_calculate2
+
+
+/*	typedef struct
+*	{
+*		uint16 full_vol
+*		uint16 empty_vol
+*		uint16 low_vol
+*		uint16 now_vol
+*	}bat_calculate;
+*/
+//out:	pdata->bat percent
+adc_bat_percent_lowpower_out:
+	ifetch 8,rega
+	store 8,mem_pdatatemp
+	fetch 2,mem_pdatatemp
+	fetcht 2,mem_pdatatemp+2
+	isub temp,rega
+	fetch 2,mem_pdatatemp+6
+	isub temp,regb
+	fetcht 2,mem_pdatatemp+4
+	isub temp,null
+	ncall adc_set_low_power_flag,positive
+	mul32 regb,100,pdata
+	idiv rega
+	call wait_div_end
+	quotient pdata
+	call adc_set_no_power_flag,blank
+	rtn
+adc_set_low_power_flag:
+	fetch 1,mem_adc_power_flag
+	set1 0,pdata
+	store 1,mem_adc_power_flag
+	rtn
+
+adc_clear_low_power_flag:
+	fetch 1,mem_adc_power_flag
+	set0 0,pdata
+	store 1,mem_adc_power_flag
+	rtn	
+	
+adc_set_no_power_flag:
+	fetcht 1,mem_adc_power_flag
+	set1 1,temp
+	storet 1,mem_adc_power_flag
+	rtn
+
+adc_clear_no_power_flag:
+	fetcht 1,mem_adc_power_flag
+	set0 1,temp
+	storet 1,mem_adc_power_flag
+	rtn	
+
+
+
+/****************************************key scan***************************************/
+keyscan_key_init:
+	fetch 2,mem_key_num_ptr
+	ifetch 1,pdata
+keyscan_key_init_next:
+	rtn blank
+	copy pdata,loopcnt
+//	copy contr,rega
+	fetch 2,mem_keyscan_ptr
+	increase 3,pdata	//mem_key_conf0_pin
+	copy pdata,rega
+keyscan_key_init_lp1:
+	ifetcht 1, rega
+	call gpio_config_input
+	increase KEY_CONF_STRUCT_LEN,rega
+	loop keyscan_key_init_lp1
+keyscan_key_init_end:
+	rtn
+	
+keyscan_scan_key:
+	fetch 2,mem_keyscan_ptr
+	increase 3,pdata	//mem_key_conf0_pin
+	copy pdata,rega
+//	arg mem_key_conf0_pin,rega
+	force 0,regb
+	setarg 0
+	store 2,mem_key_value_temp
+keyscan_scan_key_lp1:
+	ifetcht 1, rega
+	call gpio_get_bit
+	bpatch patch13_1,mem_patch13
+	fetch 2,mem_key_value_temp
+	copy regb,queue
+	qsetflag true,pdata
+	store 2, mem_key_value_temp
+	increase KEY_CONF_STRUCT_LEN,rega
+	increase 1,regb
+	fetch 2,mem_key_num_ptr
+	ifetch 1,pdata
+keyscan_scan_key_lp1_next:
+	ixor regb,null
+	nbranch keyscan_scan_key_lp1,zero
+	fetch 2,mem_key_value_temp
+	fetcht 2,mem_key_value_retention
+	ixor temp,null
+	rtn zero
+	enable user
+	rtn
+
+keyscan_process_lpm_before:
+	fetch 2,mem_key_num_ptr
+	ifetch 1,pdata
+keyscan_process_lpm_before_next:
+	rtn blank
+	copy pdata,loopcnt
+	fetch 2,mem_keyscan_ptr 
+	increase 3,pdata	//mem_key_conf0_pin
+	copy pdata,rega
+keyscan_process_lpm_before_lp1:
+	ifetcht 1, rega
+	call gpio_set_wake_by_current_state
+	increase KEY_CONF_STRUCT_LEN,rega
+	loop keyscan_process_lpm_before_lp1
+keyscan_process_lpm_before_end:
+	rtn
+
+keyscan_key_process:
+	arg key_scan_timer,queue
+	call timer_check
+	nrtn blank
+	setarg 0x20
+	arg key_scan_timer,queue
+	call timer_init
+	disable user
+	call keyscan_process_lpm_before
+	bpatch patch13_2,mem_patch13
+	fetch 2,mem_key_num_ptr
+	ifetch 1,pdata
+keyscan_key_process_next:
+	rtn blank
+	call keyscan_scan_key
+	nbranch lpm_button_clean_wake_lock,user
+	call lpm_button_get_wake_lock
+	disable user
+	fetch 2,mem_key_value_temp
+	store 2,mem_key_value_temp4
+	jam 0,mem_key_value_temp6
+	force 0,queue
+keyscan_key_lp1:
+	fetch 2, mem_key_value_retention
+	rshift pdata,temp
+	storet 2,mem_key_value_retention
+	and pdata,0x01,pdata
+	fetcht 2, mem_key_value_temp4
+	and temp,0x01,rega
+	rshift temp,temp
+	storet 2,mem_key_value_temp4
+	ixor rega,null
+	ncall keyscan_send_key_data,zero
+	fetch 2,mem_key_num_ptr
+	ifetch 1,pdata
+keyscan_key_lp1_next:
+	fetcht 1, mem_key_value_temp6
+	increase 1,temp
+	storet 1, mem_key_value_temp6
+	copy temp,queue
+	ixor queue,null
+	nbranch keyscan_key_lp1,zero
+	fetch 2,mem_key_value_temp
+	store 2,mem_key_value_retention
+	rtn
+keyscan_send_key_data:
+	bpatch patch13_3,mem_patch13
+	fetch 2,mem_keyscan_ptr
+	increase 1,pdata
+	ifetch 2,pdata
+	branch callback_func
+
+
+/*************************************pwm*************************************/
+
+//rega:clk select(0:system clk; 1:system clk undivied; 2:lpo)
+/*rega:clk select
+			0x00:select system clock 12M;
+			0x40:select undivied system clock 24M/48M;
+			0x80:select lpo clock:33K
+*/
+pwm_init:
+	fetch 1,core_clksel
+	ior rega,pdata
+	store 1,core_clksel
+	fetch 2,core_clkoff
+	set0 CLOCK_OFF_PWM,pdata
+	store 2,core_clkoff
+delay_nop100:
+	nop 100
+	rtn
+
+/*	typedef struct
+*	{
+*		uint8 gpio_num
+*		uint8 pwm_channel
+*		uint24 frequency
+*		uint8 duty_cycle   //0-100
+*	}PWM_Style;
+	addr: mem_pdatatemp
+*/
+pwm_clk_set:
+	fetch 1,core_clksel
+	bbit1 6,pwm_24m_clk_set
+	bbit1 7,pwm_33k_clk_set
+pwm_12m_clk_set:
+	setarg PWM_12MHZ
+	rtn
+pwm_24m_clk_set:
+	setarg PWM_24MHZ
+	rtn
+pwm_33k_clk_set:
+	setarg PWM_33KHZ
+	rtn
+
+
+/*
+input:
+mem_pdatatemp:
+byte[0]: pwm gpio selected
+byte[1]: pwm channel selected
+byte[2-4]: pwm frequency, little-endian
+byte[5]: duty cycle, percentage
+*/
+pwm_out_set:
+	fetcht 3,mem_pdatatemp+2
+	call pwm_clk_set
+	idiv temp
+	call wait_div_end
+	quotient temp
+	fetch 1,mem_pdatatemp+5
+	imul32 temp,pdata
+	div pdata,100
+	call wait_div_end
+	quotient rega
+	copy temp,pdata
+	isub rega,regb
+
+	fetch 1,mem_pdatatemp+1
+	call pwm_duty_cycle_set
+	fetch 1,mem_pdatatemp
+	fetcht 1,mem_pdatatemp+1
+	and_into 0x0f,temp
+	lshift8 temp,temp
+	ior temp,pdata
+	branch pwm_enable
+
+/*
+input:
+rega:pcnt ;
+regb:ncnt;
+pdata:pwm channel select.
+*/
+pwm_duty_cycle_set:
+	iforce queue
+	call pwm_duty_cycle_set_without_autoload
+	branch pwm_autoload_set
+
+/*
+input:
+queue: pwm channel
+*/
+pwm_autoload_set:	
+	fetch 1, core_pwm_autoload
+	qset1 pdata
+	store 1, core_pwm_autoload
+	fetcht 1, core_clksel
+	isolate1 7, temp
+	call delay_1clk_of_33k, true
+	qset0 pdata
+	store 1, core_pwm_autoload
+	rtn	
+
+
+delay_1clk_of_33k:
+	nop 480
+	rtn
+
+/*
+input:
+rega:pcnt ;
+regb:ncnt;
+pdata:pwm channel select.
+*/	
+pwm_duty_cycle_set_without_autoload:
+	and_into 0x0f,pdata
+	arg core_pwm_pcnt0,contw
+	mul32 pdata,4,pdata
+	iadd contw,contw
+	copy rega,pdata
+	istore 2,contw
+	copy regb,pdata
+	istore 2,contw
+	rtn
+
+
+
+
+/*
+rega: even pwm channel select & gpio select 
+regb: odd pwm channel select & gpio select 
+
+note:
+byte of even pwm channel:
+bit[7]: force to set even sync bit to 1;
+bit[6]: for even bit, reserved
+
+byte of odd pwm channel:
+bit[7]: 1: set odd sync bit to 1; 0: set odd sync bit to 0; 
+bit[6]: 1: set odd pwm init to 1; 0: set odd pwm init to 0;
+
+setarg 0x0008, rega
+0x00:pwm0 selected
+0x08:gpio select
+
+arg 0x4109, regb
+0x41:pwm1 selected and set pwm1 init bit to 1
+0x09:gpio select
+*/
+pwm_enable_in_syncmode:
+	rshift8 regb, queue
+	call pwm_init_bit_set
+	rshift8 regb, queue
+	call pwm_syncmode_set
+	rshift8 rega, queue
+	enable true
+	call pwm_syncmode_set_process
+
+	deposit rega
+	call pwm_gpio_select
+	deposit regb
+	branch pwm_enable
+
+pwm_disable_in_syncmode:
+	deposit rega
+	call pwm_disable
+	deposit regb
+	call pwm_disable
+
+	rshift8 rega, queue
+	disable true
+	call pwm_syncmode_set_process
+	rshift8 regb, queue
+	disable true
+	call pwm_init_bit_set_process
+	rshift8 regb, queue
+	disable true
+	branch pwm_syncmode_set_process
+	
+
+/*
+input:
+queue: pwm channel
+
+note:
+for even bit, 
+0: PWM0/1 work independent
+1: PWM0 output is synchronized to PWM1
+for odd bit,
+Only used when pwm0_syn_to_pwm1 =1, PWM0/1 out inverse
+*/
+pwm_syncmode_set:
+	isolate1 7, queue
+pwm_syncmode_set_process:	
+	and queue, 0x0f,queue
+	fetch 1,core_pwm_sync
+   	qsetflag true,pdata
+   	store 1,core_pwm_sync
+   	rtn
+
+/*
+input:
+queue: pwm channel
+
+note:
+for even bit, reserved
+for odd bit,only used when pwm0_syn_to_pwm1 =1, 
+0: PWM0 out high first
+1: PWM1 out high first
+*/
+pwm_init_bit_set:
+	isolate1 6, queue
+pwm_init_bit_set_process:	
+	and queue, 0x0f,queue
+	fetch 1, core_pwm_init
+	qsetflag true, pdata
+	store 1, core_pwm_init
+	rtn
+/*
+input:
+pdata: pwm channel select & gpio select 
+
+note:
+setarg 0x0108
+0x01:pwm channel select
+0x08:gpio select
+*/
+pwm_gpio_select:
+	call pwm_select_channel
+pwm_gpio_select_process:
+	lshift8 pdata,pdata
+	add queue,gpcfg_pwm_out0,temp
+	ior temp,pdata
+	branch gpio_config_param 
+
+/*
+input:
+pdata: pwm channel select & gpio select 
+
+note:
+setarg 0x0108
+0x01:pwm channel select
+0x08:gpio select
+*/
+pwm_enable:
+	enable user
+	call pwm_gpio_select
+	branch pwm_set_select
+	
+pwm_disable:
+	disable user
+	call pwm_select_channel
+	branch pwm_set_select
+
+pwm_set_select:
+	and queue, 0x0f,queue
+	fetch 1,core_pwm_en
+   	qsetflag user,pdata
+   	store 1,core_pwm_en
+	rtn
+pwm_select_channel:
+	rshift8 pdata,queue
+	and queue, 0x0f,queue
+	rtn
+
+
+/*************WATCH DOG API*************************/
+/*
+	function name:wdt_init_config 
+   input:kick dog time (pdata*7.8125ms) (7.8125ms~16s) (16s = 0x800)
+*/
+wdt_init_config:
+	copy pdata,temp
+	bpatch patch13_4,mem_patch13
+	call wdt_set_enable	//enable
+	setarg 2048
+	isub temp,pdata
+	copy pdata,temp
+	rshift4 temp,temp
+	storet 1,core_write_wdt
+	nop 1400
+	copy pdata,temp
+	and_into 0x0f,temp
+	storet 1,core_write_wdt2
+	rtn
+ 
+
+wdt_set_enable:
+	enable user2
+	branch wdt_init_set
+
+	
+wdt_set_disable:
+	bpatch patch13_5,mem_patch13
+	disable user2
+wdt_init_set:
+	fetch 1,core_config
+   	setflag user2,3,pdata
+	store 1,core_config
+	rtn
+
+
+ifdef NEC
+
+/*************NEC API*************************/
+/*
+	function name:nec_init_config 
+	input:
+		pdata is nec buffer address
+		bit[0-15]:rx start memory address
+		bit[16-31]:rx ending memory address
+		temp is nec control config
+		E.M 0x31 is 12M system clock is 2us temp
+*/
+nec61212_init:
+	arg FUN_NEC_ENABLE|FUN_NEC_CLK_DIVIDE_24,temp
+	
+
+nec_init_config:
+	store 4,core_nec_start_addr
+	store 2,core_nec_rptr
+	storet 1,core_nec_control
+	rtn
+
+//return:pdata is buffer size
+nec_check_rxbuff_size:
+	fetch 2,core_nec_rxitem
+	rtn
+/*	fetcht 2,core_nec_rptr
+	fetch 2,core_nec_wptr
+	isub temp,pdata
+	rtn positive
+	sub pdata,0,rega
+	fetcht 2,core_nec_start_addr
+	fetch 2,core_nec_end_addr
+	pincrease 1
+	isub temp,pdata
+	isub rega,pdata
+	rtn
+*/
+
+nec_prepare_read:
+	fetchr contu,2,core_nec_rptr
+	fetchr contus,2,core_nec_start_addr
+	fetchr contue,2,core_nec_end_addr
+	rtn
+
+nec_read_done:
+	storer contu,2,core_nec_rptr
+	rtn
+
+//regc is callback function
+//output
+//user is disable mean data stop
+//rege is 0 mean repeat
+//rege is no zero mean data
+nec_parse_nec61212:
+	call enable_user
+	arg 0,rege
+	call nec_check_rxbuff_size
+	beq 2,nec_parse_nec61212_check_timeout
+	sub pdata,4,null
+	rtn positive
+	call nec_prepare_read
+	ifetcht 2,contu
+	setarg NEC61212_DATA2REPEAT_TIME
+	call nec_check_pulse_range_legal_default_deviation
+	nbranch nec_parse_nec61212_check_repeat_data,positive
+	copy regd,temp
+	setarg NEC61212_REPEAT2REPEAT_TIME
+	call nec_check_pulse_range_legal_default_deviation
+	nbranch nec_parse_nec61212_check_repeat_data,positive
+	
+	copy regd,temp
+	setarg NEC61212_BOOT_CODE_START_TIME
+	call nec_check_pulse_range_legal_default_deviation
+	branch nec_parse_nec61212_error_data,positive
+	ifetcht 2,contu
+	setarg NEC61212_BOOT_CODE_END_TIME
+	call nec_check_pulse_range_legal_default_deviation
+	branch nec_parse_nec61212_error_data,positive
+	call nec_check_rxbuff_size
+	sub pdata,133,null
+	rtn positive
+	arg 32,loopcnt
+nec_parse_nec61212_data:
+	ifetcht 2,contu
+	setarg NEC61212_DATA_BIT_1_START_TIME
+	call nec_check_pulse_range_legal_default_deviation
+	branch nec_parse_nec61212_error_data,positive
+	ifetcht 2,contu
+	setarg NEC61212_DATA_BIT_1_END_TIME
+	call nec_check_pulse_range_legal_default_deviation
+	nbranch nec_parse_nec61212_add_bit1,positive
+	copy regd,temp
+	setarg NEC61212_DATA_BIT_0_END_TIME
+	call nec_check_pulse_range_legal_default_deviation
+	nbranch nec_parse_nec61212_add_bit0,positive
+
+
+nec_parse_nec61212_error_data:
+	copy regd,temp
+	setarg NEC61212_TIMEOUT_TIME
+	isub temp,null
+	branch nec_parse_nec61212_check_timeout_cb,zero
+	branch nec_read_done
+
+nec_parse_nec61212_add_bit1:
+	set1 32,rege
+nec_parse_nec61212_add_bit0:
+	rshift rege,rege
+	loop nec_parse_nec61212_data
+	branch nec_parse_nec61212_check_stop_bit
+
+nec_parse_nec61212_check_repeat_data:
+	call nec_check_rxbuff_size
+	sub pdata,7,null
+	rtn positive
+	ifetcht 2,contu
+	setarg NEC61212_REPEAT_START_TIME
+	call nec_check_pulse_range_legal_default_deviation
+	branch nec_parse_nec61212_error_data,positive
+	ifetcht 2,contu
+	setarg NEC61212_REPEAT_END_TIME
+	call nec_check_pulse_range_legal_default_deviation
+	branch nec_parse_nec61212_error_data,positive
+nec_parse_nec61212_check_stop_bit:
+	ifetcht 2,contu
+	setarg NEC61212_STOP_TIME
+	call nec_check_pulse_range_legal_default_deviation
+	branch nec_parse_nec61212_error_data,positive
+	call nec_read_done
+	copy regc,pdata
+	branch callback_func
+
+nec_parse_nec61212_check_timeout:
+	call nec_prepare_read
+	ifetcht 2,contu
+	setarg NEC61212_TIMEOUT_TIME
+	isub temp,null
+	nrtn zero
+nec_parse_nec61212_check_timeout_cb:
+	call nec_read_done
+	call disable_user
+	copy regc,pdata
+	branch callback_func
+
+
+
+//????????,????
+//??:temp ?????????? 2us???
+//pdata ????,us???
+nec_check_pulse_range_legal_default_deviation:
+	fetchr regb,1,mem_nec_decode_error_value
+
+//????????,????
+//??:temp ?????????? 2us???
+//pdata ????,us???
+//regb?????,???
+// |temp-pdata| / pdata < regb
+//??:positive is 1 mean error
+//0 mean true
+nec_check_pulse_range_legal:
+	copy temp,regd
+	imul32 regb,regb		//???????
+	lshift temp,temp		//???????us
+	isub temp,rega
+	ncall nec_check_pulse_range_legal_data_negative,positive
+	mul32 rega,100,pdata
+	isub regb,null
+	rtn
+
+nec_check_pulse_range_legal_data_negative:
+	sub rega,0,rega
+	rtn
+
+endif //NEC
+
+/*
+select_system_clk_24M:
+	jam SYSTEM_CLK_24M,mem_system_clk
+	jam clksel_dpll_24M,core_clksel
+	setarg 7499
+	store 2,core_halfslot
+calc_new_param:
+	arg 11,loopcnt
+	arg mem_param_tx_setup,rega
+calc_new_param_loop:
+	ifetch 2,rega
+	lshift pdata,pdata
+	istore 2,rega
+	increase 2,rega
+	loop calc_new_param_loop
+	rtn
+
+calc_new_le_time:
+	lshift stop_watch,stop_watch
+	rtn
+
+select_system_clk_12M_xtal:
+	jam clksel_xtal,core_clksel
+select_system_clk_12M_common:
+	jam SYSTEM_CLK_12M,mem_system_clk
+	setarg 3749
+	store 2,core_halfslot
+	rtn
+
+select_system_clk_12M_dpll:
+	jam clksel_dpll,core_clksel
+	branch select_system_clk_12M_common
+*/
+	
+
+/*****************************50HZ*****************************/
+/*
+(input):
+pdata:ac data buf start address
+temp:ac data buf length
+mem_ac_detect_gpio:choice gpio[0-12]
+mem_ac_detect_control:[7:2]ac detect clk divide number,[15:8]ac detect window (ms)
+
+(output):
+true=1,  50hz single disappear true=0,50hz detected
+
+*/
+/*
+ac_50hz_check:
+	store 2,core_ac_saddr
+	storet 1,core_ac_buf_len
+	fetch 1,mem_ac_detect_gpio
+	arg gpcfg_ac_input,temp
+	call gpio_config_function_int
+	fetch 2,mem_ac_detect_control  
+	set1 0,pdata                 //ac detect enable[0]
+	store 2,core_ac_ctrl
+ac_50hz_check_wait:		
+	fetch 1,core_perf_status
+	isolate1 6,pdata
+	rtn 
+*/
+
+
Index: program/security.prog
===================================================================
--- /branch/usb/usb_public_base/program/security.prog	(revision 0)
+++ /branch/usb/usb_public_base/program/security.prog	(working copy)
@@ -0,0 +1,1109 @@
+
+
+ifdef SECURE_CONNECTION
+	
+function_g2:
+	bpatch patch13_6,mem_patch13
+	jam 80,mem_AES_CMAC_data_length
+	arg mem_dat,contw
+	arg mem_le_srand,contr
+	call memcpy16
+	arg mem_sc_pubkey_local_x_256,contr
+	call memcpy32
+	arg mem_le_pubkey_remote_x_256,contr
+	call memcpy32
+	call inverse_memdat	
+	arg mem_le_mrand,contr
+	call store_inverse_k	
+	call function_AES_CMAC	
+
+	arg mem_AES_CMAC_temp,contw
+	call load_inverse_result
+	setarg 1000000
+	copy pdata,rega
+	fetch 4,mem_AES_CMAC_temp
+	idiv rega
+	call wait_div_end
+	remainder pdata
+	store 4,mem_gkey
+//call ice_break
+	rtn
+
+function_f6_eb:
+	jam 65,mem_AES_CMAC_data_length
+	arg mem_dat,contw
+	call store_addr_common_a
+	call store_addr_common_b
+	fetch 3,mem_le_pres+1
+	istore 3,contw
+//	arg mem_le_r,contr
+//	call memcpy16	
+	call get_r
+	
+	arg mem_le_mrand,contr
+	call memcpy16
+	arg mem_le_srand,contr
+	call memcpy16
+	call inverse_memdat
+	arg mem_le_mackey ,contr
+	arg mem_AES_CMAC_k,contw
+	call memcpy16
+//	call p_store_inverse_k	
+	branch function_AES_CMAC
+//	arg mem_AES_CMAC_temp,contw
+//	branch p_load_inverse_result
+
+get_r:
+	fetch 4,mem_le_tk
+	istore 4,contw
+	call memset0_4
+	branch memset0_8
+
+function_f6_ea:
+	bpatch patch13_7,mem_patch13
+	jam 65,mem_AES_CMAC_data_length
+	arg mem_dat,contw
+	call store_addr_common_b
+	call store_addr_common_a
+	fetch 3,mem_le_preq+1
+	istore 3,contw
+//	arg mem_le_r,contr
+//	call memcpy16	
+	call get_r
+	arg mem_le_srand,contr
+	call memcpy16
+	arg mem_le_mrand,contr
+	call memcpy16
+	call inverse_memdat
+	arg mem_le_mackey ,contr
+	arg mem_AES_CMAC_k,contw
+	call memcpy16
+//	call p_store_inverse_k	
+	call function_AES_CMAC
+	arg mem_AES_CMAC_temp,contw
+	branch load_inverse_result
+
+function_f5:
+	jam 32,mem_AES_CMAC_data_length
+	arg mem_le_dhkey_256 ,contr
+	arg mem_dat,contw
+	call memcpy32
+	call inverse_memdat
+	arg mem_le_slat,contr
+	call store_inverse_k	
+	call function_AES_CMAC
+	arg mem_AES_CMAC_k,contw
+	call store_aes_result
+	arg 1,temp
+	call function_f5_common
+	arg mem_le_ltk,contw
+	call load_inverse_result
+	arg 0,temp
+	call function_f5_common
+	arg mem_le_mackey,contw
+//	branch p_load_inverse_result
+	branch store_aes_result
+
+
+function_f5_common:
+	bpatch patch14_0,mem_patch14
+	jam 53,mem_AES_CMAC_data_length
+	setarg 0x100
+	store 2,mem_dat
+	call store_addr_common_b
+	call store_addr_common_a
+	arg mem_le_srand,contr
+	call memcpy16
+	arg mem_le_mrand,contr
+	call memcpy16
+//	fetch 4,mem_le_keyid 0x62746c65
+	setarg 0x6c65
+	istore 2,contw
+	setarg 0x6274
+	istore 2,contw
+	istoret 1,contw   //counter
+	call inverse_memdat	
+	branch function_AES_CMAC
+
+store_addr_common_b:
+	fetch 6,mem_le_lap
+	istore 6,contw
+	fetch 1,mem_le_conn_own_addr_type
+	istore 1,contw
+	rtn
+
+store_addr_common_a:
+	fetch 6,mem_le_plap
+	istore 6,contw
+//	setarg 0x2dcfc1
+//	istore 3,contw
+//	setarg 0xa71370
+//	istore 3,contw
+	fetch 1,mem_le_conn_peer_addr_type
+	istore 1,contw
+	rtn
+
+function_f4_ca:
+	jam 65,mem_AES_CMAC_data_length
+	fetch 1,mem_passkey_1bit
+	store 1,mem_dat
+	arg mem_sc_pubkey_local_x_256,contr
+	call memcpy32
+	arg mem_le_pubkey_remote_x_256,contr
+	call memcpy32
+	call inverse_memdat
+	arg mem_le_mrand,contr
+	call store_inverse_k	
+	branch function_AES_CMAC
+	
+
+function_f4_cb:
+	jam 65,mem_AES_CMAC_data_length
+	fetch 1,mem_passkey_1bit
+	store 1,mem_dat
+	arg mem_le_pubkey_remote_x_256,contr
+	call memcpy32
+	arg mem_sc_pubkey_local_x_256,contr
+	call memcpy32
+	call inverse_memdat
+	arg mem_le_srand,contr
+	call store_inverse_k	
+	branch function_AES_CMAC
+
+function_AES_CMAC:
+	bpatch patch14_1,mem_patch14
+	call function_AES_CMAC_Generate_Subkey
+//call ice_break
+//	jam 65,mem_AES_CMAC_data_length
+//call ice_break
+	fetch 1,mem_AES_CMAC_data_length
+	copy pdata,temp
+function_ceil16:
+	increase 15,pdata
+	rshift4 pdata,pdata
+	copy pdata,regb
+	branch function_AES_CMAC_set_flag_0_balnk,blank
+	and temp,0x0f,pdata
+	nbranch function_AES_CMAC_set_flag_0,blank
+//	flag =1;
+	arg mem_AES_CMAC_k1,regc
+	arg mem_dat,pdata
+	increase -16,pdata
+//	iadd temp,pdata
+//	isub rega,rega
+	iadd temp,rega	
+	arg mem_AES_CMAC_M_last,contw
+	arg 4,loopcnt	
+	call xor_loop
+//call ice_break
+//	arg mem_f4_k1,contr
+//	call load_key
+	branch function_AES_CMAC_aes
+
+function_AES_CMAC_set_flag_0_balnk:
+	arg 1,regb
+	arg 0,rega
+//	arg mem_f4_test_data,pdata
+	branch function_AES_CMAC_set_flag_0_common
+//call ice_break
+
+function_AES_CMAC_set_flag_0:
+//	flag = 0;
+	and temp,0x0f,rega
+function_AES_CMAC_set_flag_0_common:
+	arg mem_dat,pdata
+	iadd temp,pdata
+	isub rega,contr
+//call ice_break
+	arg mem_AES_CMAC_temp,contw
+	call function_AES_CMAC_padding
+//call ice_break
+	arg mem_AES_CMAC_k2,regc
+	arg mem_AES_CMAC_temp,rega
+	arg mem_AES_CMAC_M_last,contw
+	arg 4,loopcnt	
+	call xor_loop	
+//call ice_break
+
+//	arg mem_f4_k2,contr
+//	call load_key
+
+//	branch p_function_f4_aes
+function_AES_CMAC_aes:
+//	arg mem_f4_k,contr
+//	call load_key
+//	arg mem_AES_CMAC_xor,contr
+//	call load_data128
+	call aes_clear_data
+	call aes_init	
+//	arg mem_f4_k,contr
+//	call load_key
+	arg mem_dat,contr
+function_AES_CMAC_aes_loop:
+//generate_mic_loop:
+	increase -1,regb
+	deposit regb
+	branch function_AES_CMAC_aes_loop_end,blank
+	call load_data128
+	call do_aes_cbc
+	branch function_AES_CMAC_aes_loop
+//generate_mic_end:
+function_AES_CMAC_aes_loop_end:	
+	arg mem_AES_CMAC_temp,contw
+	call store_aes_result
+	arg mem_AES_CMAC_M_last,contr
+	call load_data128
+	call aes_init	
+	arg mem_AES_CMAC_temp,contr
+	call load_data128	
+	branch do_aes_cbc
+
+
+
+load_inverse_result:
+//	arg mem_AES_CMAC_temp,contw
+	copy contw,rega
+	call store_aes_result
+//	arg mem_AES_CMAC_temp,rega
+	arg 16,loopcnt
+	branch inverse_data
+	
+store_inverse_k:
+	arg mem_AES_CMAC_k,contw
+	call memcpy16
+inverse_k:	
+	arg 16,loopcnt
+	arg mem_AES_CMAC_k,rega	
+	branch inverse_data
+	
+inverse_memdat:
+	fetch 1,mem_AES_CMAC_data_length
+	copy pdata,loopcnt
+	arg mem_dat,rega
+	branch inverse_data
+
+bn_lshift_0_inverse:
+	ifetch 1,rega
+	lshift pdata,pdata
+	isolate1 0,regc
+	setflag true,0,pdata	
+	isolate1 8,pdata
+	setflag true,0,regc	
+	istore 1,rega
+         increase -1,rega
+	loop bn_lshift_0_inverse
+	rtn	
+
+function_AES_CMAC_k1_inverse:
+	arg mem_AES_CMAC_k1,rega
+function_AES_CMAC_inverse_common:
+	increase 15,rega
+	force 16,loopcnt
+	force 0,regc
+	branch  bn_lshift_0_inverse	
+
+function_AES_CMAC_k2_inverse:
+	arg mem_AES_CMAC_k2,rega
+	branch function_AES_CMAC_inverse_common
+	
+
+function_AES_CMAC_Generate_Subkey:
+	arg mem_AES_CMAC_k,contr
+	call load_key
+//	arg mem_AES_CMAC_xor,contr
+//	call aes_load_xor
+	force regidx_xor,regext_index
+	call aes_clear
+	call aes_clear_data
+	call do_aes_ocb
+	
+//	force 0x38,aes_ctrl
+//	force 0x0,aes_ctrl
+//	call wait_aes
+	arg mem_AES_CMAC_k1,contw
+	call store_aes_result
+function_AES_CMAC_k1:
+	bpatch patch14_2,mem_patch14
+	fetch 1,mem_AES_CMAC_k1
+	isolate1 7,pdata
+	nbranch function_AES_CMAC_k1_0,true	
+	call function_AES_CMAC_k1_inverse
+	
+//p_function_f4_k1_xor:
+	arg mem_AES_CMAC_k1,regc
+//	arg mem_AES_CMAC_rb,rega
+	arg mem_AES_CMAC_k1,contw
+//	arg 3,loopcnt
+//	call xor_loop
+	call function_AES_CMAC_xor_rb
+	branch function_AES_CMAC_k2
+function_AES_CMAC_k1_0:	
+	call function_AES_CMAC_k1_inverse
+function_AES_CMAC_k2:
+//call ice_break
+	arg mem_AES_CMAC_k1,contr
+	arg mem_AES_CMAC_k2,contw
+	call memcpy16
+	fetch 1,mem_AES_CMAC_k2
+	isolate1 7,pdata
+	nbranch function_AES_CMAC_k2_inverse,true		
+	call function_AES_CMAC_k2_inverse
+//p_function_f4_k2_xor:
+	arg mem_AES_CMAC_k2,regc
+//	arg mem_AES_CMAC_rb,rega
+	arg mem_AES_CMAC_k2,contw
+//	arg 3,loopcnt
+//	branch xor_loop	
+
+
+//rb:00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 87 
+function_AES_CMAC_xor_rb:
+	arg 3,loopcnt
+function_AES_CMAC_xor_rb_loop:	
+	arg 0,temp
+	call function_AES_CMAC_xor_loop_common	
+	increase 4,regc
+	loop  function_AES_CMAC_xor_rb_loop
+	arg 0x8700,temp
+	lshift16 temp,temp
+function_AES_CMAC_xor_loop_common:	
+	ifetch   4,regc
+	ixor  temp,pdata
+	istore   4,contw	
+	rtn
+		
+
+
+
+//input rega :length <16	contr,contw
+function_AES_CMAC_padding:
+	bpatch patch14_3,mem_patch14
+	arg 16,loopcnt
+	arg 0,pdata
+function_AES_CMAC_padding_loop:
+	isub rega,null
+	branch function_AES_CMAC_padding_beq_length,zero
+	branch function_AES_CMAC_padding_big_length,positive
+	ifetcht 1,contr
+	istoret 1,contw
+function_AES_CMAC_padding_loop2:	
+	increase 1,pdata
+	loop function_AES_CMAC_padding_loop
+	rtn
+function_AES_CMAC_padding_beq_length:	
+	arg 0x80,temp
+function_AES_CMAC_padding_common:
+	istoret 1,contw
+	branch  function_AES_CMAC_padding_loop2
+
+function_AES_CMAC_padding_big_length:
+	arg 0,temp
+	branch function_AES_CMAC_padding_common
+
+	
+
+	
+concatenate_temp24:
+	lshift8 temp,temp
+concatenate_temp16:
+	lshift16 temp,temp
+	ior temp,temp
+	rtn
+
+endif
+
+/* ==================== LE security ================= */
+
+generate_stk:
+	bpatch patch14_4,mem_patch14
+	call function_s1
+	arg mem_le_ltk,contw
+	branch store_aes_result
+
+	/* contr = rand pointer */
+authenticate_rconfirm:
+	arg mem_le_srand,contw
+	branch authenticate_mconfirm,master
+	arg mem_le_mrand,contw
+authenticate_mconfirm:
+	copy contr,rega
+	call memcpy16
+	call function_c1
+	arg mem_le_rconfirm,contr
+	branch compare_res
+
+generate_confirm:
+	arg mem_le_mrand,rega
+	branch generate_mrand,master
+	arg mem_le_srand,rega
+generate_mrand:
+	copy rega,contw
+	call generate_random
+	branch function_c1
+
+generate_sk:
+	arg mem_le_skdm,contr
+	call load_data128
+	arg mem_le_ltk,contr
+	call load_regext
+	force 0x38,aes_ctrl
+	force 0x0,aes_ctrl
+	call wait_aes
+	arg mem_le_sk,contw
+	branch store_aes_result
+
+
+//input temp:counter; rega:len	
+ccm_b0:
+	force regidx_xor,regext_index				
+	force 0x49,pdata
+	branch iv_common
+	
+	/* temp=packet counter, rega = length or block counter*/
+first_block_counter:
+	force 0x49,pdata
+	branch first_block
+first_block_data:
+	force 1,pdata
+first_block:
+	force regidx_data,regext_index			
+iv_common:
+	lshift8 temp,regext
+	ior regext,regext
+	increase 1,regext_index
+	rshift8 temp,regext
+	rshift16 regext,regext
+	fetch 2,mem_ccm_iv
+	lshift16 pdata,pdata
+	ior regext,regext				/* octet3&octet4 of counter and low 16 bit of IV */
+	increase 1,regext_index
+	ifetchr regext, 4,contr					/* IV2-IV5 */
+	increase 1,regext_index
+	ifetch 2,contr					/* IV6-IV7 */
+	byteswap rega,regext
+	lshift16 regext,regext
+	ior regext,regext
+	increase 1,regext_index
+	rtn
+
+
+	/* temp=packet counter, regc pointers to data */	
+generate_mic:
+	add regc,1,contr
+	ifetch 1,contr
+	iforce rega
+	call first_block_counter		//B0
+	call do_aes_ocb
+
+	force regidx_data,regext_index			/* B1 */
+	ifetch 1,regc
+	and_into 0x3,pdata
+	lshift16 pdata,regext
+	set1 8,regext
+	call clear_hidata	//B1
+	call do_aes_cbc
+
+	copy rega,loopcnt
+	add regc,2,contr
+	call padding_data	//数据填充
+generate_mic_loop:
+	call aes_load_data
+	call do_aes_cbc
+	deposit loopcnt
+	branch generate_mic_end,blank
+	branch generate_mic_loop
+generate_mic_end:
+	force regidx_result,regext_index
+	deposit regext
+	store 4,mem_le_mic
+	rtn
+
+aes_crypt_data:
+	increase 1,rega
+	call first_block_data
+	copy regc,contr
+	call aes_load_xor
+	call do_aes_ctr
+	call store_enc_data
+	increase 16,regc
+	increase -16,regb
+	branch aes_crypt_data,positive
+	rtn
+
+
+/*
+le_encrypt:
+	arg mem_le_txheader,regc
+	fetcht 5,mem_ccm_pcnt_tx
+	call generate_mic
+	force regidx_xor,regext_index
+	iforce regext
+	force 0,rega					 
+	call first_block_data
+	call do_aes_ctr
+	arg mem_le_txpayload,regc
+	fetch 1,mem_le_txlen
+	add pdata,-1,regb
+	iadd regc,contw
+	force regidx_result,regext_index
+	deposit regext
+	istore 4,contw	
+	call aes_crypt_data
+	fetch 1,mem_le_txlen
+	increase 4,pdata
+	store 1,mem_le_txlen
+	fetcht 5,mem_ccm_pcnt_tx
+	increase 1,temp
+	set0 LE_CCM_DIRECTIONBIT,temp
+	storet 5,mem_ccm_pcnt_tx
+	rtn
+
+le_decrypt:
+	fetch 1,mem_le_rxbuf+1
+	arg mem_le_rxbuf+2,regc
+	add pdata,-1,regb
+	increase -4,pdata				
+	store 1,mem_le_rxbuf+1
+	iadd regc,contr
+	ifetch 4,contr
+	force regidx_xor,regext_index
+	iforce regext
+	force 0,rega					
+	fetcht 5,mem_ccm_pcnt_rx
+	call first_block_data	//generate nonce
+	call do_aes_ctr
+	force regidx_result,regext_index
+	deposit regext
+	store 4,mem_le_peer_mic
+	call aes_crypt_data
+	arg mem_le_rxbuf,regc
+	call generate_mic
+	fetcht 4,mem_le_peer_mic
+	isub temp,pdata				
+	nrtn blank
+	fetch 4,mem_ccm_last_mic			
+	isub temp,pdata
+	rtn blank
+	storet 4,mem_ccm_last_mic
+	fetch 5,mem_ccm_pcnt_rx
+	increase 1,pdata
+	set1 LE_CCM_DIRECTIONBIT,pdata
+	store 5,mem_ccm_pcnt_rx
+	force 0,pdata
+	rtn
+*/
+
+
+ 	
+le_decrypt_new:
+ 	call ccm_init_common
+	jam 0,core_ccm_aad0 
+	jam 1,core_ccm_aad1
+	fetch 1,mem_le_rxbuf_data_header
+	and_into 0x3,pdata
+	store 1,core_ccm_aad2
+	
+	setarg mem_le_rxbuf_data_payload
+	store 2,core_ccm_input_playload_addr
+	store 2,core_ccm_output_playload_addr
+
+	fetchr rega, 1,mem_le_rxbuf_data_length
+	increase -4,rega
+	nbranch disable_blank,positive
+	storer rega, 1,mem_le_rxbuf_data_length
+	setarg mem_le_rxbuf_data_payload
+	iadd rega,contr
+	force regidx_data,regext_index
+	ifetchr regext, 4,contr
+	storer  regext,4,mem_le_peer_mic
+	fetcht 5,mem_ccm_pcnt_rx				
+	call ccm_b0
+	jam 6,core_ccm_ctrl
+	jam 7,core_ccm_ctrl
+	fetch 1,mem_le_rxbuf_data_length
+	store 2,core_ccm_inptr
+	call wait_ccm_done
+	fetch 1,core_misc_status
+	bbit0 7, disable_blank
+	fetcht 4,mem_le_peer_mic
+	fetch 4,mem_ccm_last_mic			/* reduntdant packet? */
+	isub temp,pdata
+	rtn blank
+	storet 4,mem_ccm_last_mic
+	fetch 5,mem_ccm_pcnt_rx
+	increase 1,pdata
+	set1 LE_CCM_DIRECTIONBIT,pdata
+	store 5,mem_ccm_pcnt_rx
+	force 0,pdata
+	rtn
+
+
+le_encrypt_new:
+	call le_encrypt_new_start
+	setarg mem_le_txpayload
+	iadd rega,rega
+	call wait_ccm_done
+	arg regidx_result,regext_index
+	istorer regext, 4 ,rega
+	rtn
+
+
+le_encrypt_new_start:
+	call ccm_init_common
+	bpatch patch14_5,mem_patch14
+	jam 0,core_ccm_aad0 
+	jam 1,core_ccm_aad1
+	fetch 1,mem_le_txheader
+	and_into 0x3,pdata
+	store 1,core_ccm_aad2
+	fetch 2,mem_contr
+	store 2,core_ccm_input_playload_addr
+	setarg mem_le_txpayload
+	store 2,core_ccm_output_playload_addr
+	
+	fetchr rega,1,mem_le_txlen
+	fetcht 5,mem_ccm_pcnt_tx				
+	call ccm_b0
+	jam 2,core_ccm_ctrl
+	jam 3,core_ccm_ctrl
+	
+	fetch 1,mem_le_txlen
+	store 2,core_ccm_inptr
+	increase 4,pdata
+	store 1,mem_le_txlen
+	fetch 5,mem_ccm_pcnt_tx
+	increase 1,pdata
+ 	set0 LE_CCM_DIRECTIONBIT,pdata
+	store 5,mem_ccm_pcnt_tx
+	rtn
+
+
+ccm_wait_enc:
+	fetch 2,core_ccm_outptr
+	isub temp,null
+	rtn zero 
+	nrtn blank
+//	call assert
+	branch ccm_wait_enc
+
+ccm_check_enc_done:
+	fetch 1,core_misc_status
+	bbit0 6,assert
+ccm_enc_done:
+	setarg mem_le_txpayload
+	iadd temp,contw	
+	arg regidx_result,regext_index
+	istorer regext, 4 ,contw	
+	branch ccm_ctrl_clr
+	
+ccm_init_common:
+	bpatch patch14_6,mem_patch14
+	force regidx_result,regext_index
+	call aes_clear
+	call aes_clear_data
+ 	setarg 0
+	store 2,core_ccm_inptr
+	rtn
+	
+wait_ccm_done:
+	fetch 1,core_misc_status
+	bbit0 6,wait_ccm_done
+ccm_ctrl_clr:
+	jam 0,core_ccm_ctrl
+	rtn
+
+
+wait_aes:
+	nbranch wait_aes,aes_ready
+	rtn
+
+do_aes_ocb:
+	force 0x30,aes_ctrl
+	force 0x0,aes_ctrl
+	branch wait_aes
+
+do_aes_cbc:
+	force 0x32,aes_ctrl
+	force 0x2,aes_ctrl
+	branch wait_aes
+
+do_aes_ctr:
+	force 0x34,aes_ctrl
+	force 0x4,aes_ctrl
+	branch wait_aes
+
+	
+aes_init:
+	force 1,aes_ctrl
+	force 0,aes_ctrl
+	rtn
+
+
+wait_keyinit_done:
+	fetch 1,core_aes_decode_key_init
+	bbit0 5,wait_keyinit_done
+	rtn
+
+
+/*
+input:pdata,dec key buffer addr
+output:initial dec key
+瀵嗛挜涓嶆敼锛屽彧鍋氫竴娆
+*/
+dec_key_initial:
+	store 2,core_keybuf_saddr
+	force 0xc0,aes_ctrl
+	force 0x80,aes_ctrl	//dec key initial
+	branch wait_keyinit_done
+
+/*
+input:regb,user enc payload buffer ptr
+	regc,user dec payload buffer ptr
+output:user dec payload buffer ptr
+*/
+do_aes_ecb_dec:
+	force regidx_data,regext_index
+	copy regb,contr
+   	force 4,loopcnt
+	call aes_ecb_dec_loop
+
+	force 0x180,aes_ctrl	//dec load data
+	force 0x80,aes_ctrl
+	call wait_aes
+ecb_dec_generate: 
+	force regidx_result,regext_index
+	copy regc,contw
+   	force 4,loopcnt
+ecb_dec_generate_loop:
+    copy regext,pdata
+	istore 4,contw
+	increase 1,regext_index
+	loop ecb_dec_generate_loop
+	rtn
+
+aes_ecb_dec_loop:
+	ifetch 2,contr
+	ifetcht 2,contr
+	lshift16 temp,temp
+	ior temp,regext
+	increase 1,regext_index
+	loop aes_ecb_dec_loop
+	rtn
+
+
+/*
+input:rega,xor data buffer ptr
+	regb,user enc payload buffer ptr	
+	regc,user dec payload buffer ptr
+output:user dec payload buffer ptr
+*/
+do_aes_cbc_dec:
+	force regidx_xor,regext_index
+	copy rega,contr
+	force 4,loopcnt
+	call aes_ecb_dec_loop
+
+	force regidx_data,regext_index
+	copy regb,contr
+	force 4,loopcnt
+	call aes_ecb_dec_loop
+	force 0x182,aes_ctrl
+	force 0x82,aes_ctrl
+	call wait_aes
+	branch ecb_dec_generate
+
+	
+function_s1:
+	force regidx_data,regext_index
+	fetch 4,mem_le_mrand
+	iforce regext
+	increase 1,regext_index
+	ifetch 4,contr
+	iforce regext
+	increase 1,regext_index
+	fetch 4,mem_le_srand
+	iforce regext
+	increase 1,regext_index
+	ifetch 4,contr
+	iforce regext
+	increase 1,regext_index
+	call aes_clear
+	increase -4,regext_index
+	fetch 4,mem_le_tk
+	copy pdata,regext
+	increase 4,regext_index
+	force 0x38,aes_ctrl
+	force 0x8,aes_ctrl
+	branch wait_aes
+
+	/* rega pointers to random number */
+function_c1:
+	bpatch patch14_7,mem_patch14
+	fetch 6,mem_le_lap
+	fetcht 6,mem_le_plap
+	branch function_c1_master,master
+	fetch 6,mem_le_plap
+	fetcht 6,mem_le_lap
+function_c1_master:
+	force regidx_xor,regext_index
+	copy temp,regext
+	increase 1,regext_index
+	rshift32 temp,regext
+	lshift16 pdata,pdata
+	ior regext,regext
+	increase 1,regext_index
+	rshift32 pdata,regext
+	increase 1,regext_index
+	force 0,regext					/* p2 = ia || ra */
+	force 0,pdata
+	fetch 1,mem_le_conn_peer_addr_type
+	fetcht 1,mem_le_adv_own_addr_type
+	nbranch function_c1_irat,master
+	//conn as master
+	fetch 1,mem_le_conn_own_addr_type
+	fetcht 1,mem_le_conn_peer_addr_type
+function_c1_irat:
+	store 1,mem_le_iat
+	storet 1,mem_le_rat
+	force regidx_data,regext_index
+	arg mem_le_iat,regb
+	force 4,loopcnt
+function_c1_loop1:
+	ifetch 4,rega		
+	ifetcht 4,regb
+	ixor temp,regext
+	increase 1,regext_index
+	increase 4,rega
+	increase 4,regb
+	loop function_c1_loop1		/* p1 ^ r */
+	call aes_clear				/* k = 0 */
+	increase -4,regext_index
+	fetch 4,mem_le_tk
+	copy pdata,regext
+	increase 4,regext_index
+	force 0x38,aes_ctrl
+	force 0xc,aes_ctrl
+	call wait_aes
+
+	call aes_clear_data
+	force 0x3a,aes_ctrl
+	force 0x8,aes_ctrl
+	branch wait_aes
+
+padding_data:
+	compare 0,loopcnt,3
+	rtn true
+	deposit contr
+	iadd loopcnt,contw
+	force 0,pdata
+padding_loop:
+	istore 1,contw
+	increase 1,loopcnt
+	compare 0,loopcnt,3
+	rtn true
+	branch padding_loop
+
+aes_load_data:
+	force regidx_data,regext_index
+load_data_loop:
+	deposit loopcnt
+	branch load_data_padding,blank
+	ifetch 4,contr
+	increase -4,loopcnt
+load_data_padding:
+	iforce regext
+	increase 1,regext_index
+	compare regidx_key,regext_index,0xf
+	rtn true
+	branch load_data_loop
+
+aes_load_xor:
+	force regidx_xor,regext_index
+	branch load_regext
+load_key:
+	force regidx_key,regext_index
+	branch load_regext
+load_data128:
+	force regidx_data,regext_index
+load_regext:
+	force 4,loopcnt
+load_regext_loop:
+	ifetch 4,contr
+	iforce regext
+	increase 1,regext_index
+	loop load_regext_loop
+	rtn
+
+load_sk:
+	arg mem_le_sk,contr
+	branch load_key
+
+clear_hidata:
+	force 4,loopcnt
+	branch clear_data_rest
+
+regext_clear:
+	force 0,regext_index
+	force 16,loopcnt
+	branch clear_loop
+
+aes_clear_data:
+	force regidx_data,regext_index
+aes_clear:
+	force 4,loopcnt
+clear_loop:
+	force 0,regext
+clear_data_rest:
+	increase 1,regext_index
+	loop clear_loop
+	rtn
+
+store_aes_result:
+	force regidx_result,regext_index
+	force 4,loopcnt
+send_aes_result_loop:
+	deposit regext
+	istore 4,contw
+	increase 1,regext_index
+	loop send_aes_result_loop
+	rtn
+
+store_enc_data:
+	force regidx_result,regext_index
+	copy regc,contw
+	add regb,1,loopcnt
+	sub loopcnt,15,null
+	branch store_enc_loop,positive
+	force 16,loopcnt
+store_enc_loop:
+	deposit regext
+	sub loopcnt,3,null
+	branch store_enc_byte,positive
+	istore 4,contw
+	increase -4,loopcnt
+	rtn zero
+	increase 1,regext_index
+	branch store_enc_loop
+store_enc_byte:
+	istore 1,contw
+	rshift8 pdata,pdata
+	loop store_enc_byte
+	rtn
+	
+	/* contr pointers to value to be compared */
+compare_res:
+	force regidx_result,regext_index
+	force 4,loopcnt
+compare_res_loop:
+	ifetch 4,contr
+	isub regext,null
+	nrtn zero
+	increase 1,regext_index
+	loop compare_res_loop
+	force 0,null
+	rtn
+
+enable_authrom:
+	fetch 1,core_clkoff
+	set0 CLOCK_OFF_AUTH_ROM,pdata
+	store 1,core_clkoff
+	rtn
+
+disable_authrom:
+	fetch 1,core_clkoff
+	set1 CLOCK_OFF_AUTH_ROM,pdata
+	store 1,core_clkoff
+	rtn
+
+ifdef SECURE_CONNECTION
+
+// mem_p_256:ff ff ff ff ff ff ff ff ff ff ff ff 00 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 ff ff ff ff
+// mem_a_256: fc ff ff ff ff ff ff ff fe ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff b1 b9 46 c1 ec de b8 fe
+// mem_gx_256: 96 c2 98 d8 45 39 a1 f4 a0 33 eb 2d 81 7d 03 77 f2 40 a4 63 e5 e6 bc f8 47 42 2c e1 f2 d1 17 6b
+// mem_gy_256: f5 51 bf 37 68 40 b6 cb ce 5e 31 6b 57 33 ce 2b 16 9e 0f 7c 4a eb e7 8e 9b 7f 1a fe e2 42 e3 4f
+// mem_le_slat :be 83 60 5a db 0b 37 60 38 a5 f5 aa 91 83 88 6c
+init_memp_256:
+ 	arg mem_p_256,contw
+        setsect 0,0x3ffff
+        setsect 1,0x3ffff
+        setsect 2,0x3ffff
+        setsect 3,0x3ffff
+        istore 9,contw
+        setsect 0,0x3ffff
+        setsect 1,0x3f
+        setsect 2,0x0
+        setsect 3,0x0
+        istore 9,contw
+        setsect 0,0x0
+        setsect 1,0x0
+        setsect 2,0x1000
+        setsect 3,0x0
+        istore 9,contw
+        setsect 0,0x3ff00
+        setsect 1,0x3ffff
+        setsect 2,0x3ffcf
+        setsect 3,0x3ffff
+        istore 9,contw
+        setsect 0,0x3ffff
+        setsect 1,0x3ffff
+        setsect 2,0x3ffff
+        setsect 3,0x3ff
+        istore 9,contw
+        setsect 0,0x0
+        setsect 1,0x0
+        setsect 2,0x0
+        setsect 3,0x0
+        istore 9,contw
+        setsect 0,0x10000
+        setsect 1,0x0
+        setsect 2,0x3f000
+        setsect 3,0x3ffff
+        istore 9,contw
+        setsect 0,0x296ff
+        setsect 1,0x22630
+        setsect 2,0x3945d
+        setsect 3,0x3d284
+        istore 9,contw
+        setsect 0,0x333a0
+        setsect 1,0x4b7a
+        setsect 2,0x37d8
+        setsect 3,0x3c9dc
+        istore 9,contw
+        setsect 0,0x3a440
+        setsect 1,0x1b958
+        setsect 2,0x38bce
+        setsect 3,0x1091f
+        istore 9,contw
+        setsect 0,0x2e12c
+        setsect 1,0x1f47c
+        setsect 2,0x356b1
+        setsect 3,0x2fd47
+        istore 9,contw
+        setsect 0,0x6837
+        setsect 1,0x2ed90
+        setsect 2,0x1ecec
+        setsect 3,0x1acc5
+        istore 9,contw
+        setsect 0,0x23357
+        setsect 1,0x18af3
+        setsect 2,0xf9e1
+        setsect 3,0x129f0
+        istore 9,contw
+        setsect 0,0x2e7eb
+        setsect 1,0x3e6e3
+        setsect 2,0x3e1a7
+        setsect 3,0x10b8b
+        istore 9,contw
+        setsect 0,0x24fe3
+        setsect 1,0x20ef
+        setsect 2,0x1b5a6
+        setsect 3,0xdc2f
+        istore 9,contw
+        setsect 0,0x13860
+        setsect 1,0x2bd69
+        setsect 2,0x391a
+        setsect 3,0x1b222
+        istore 9,contw
+        rtn
+endif
+
Index: program/sim.prog
===================================================================
--- /branch/usb/usb_public_base/program/sim.prog	(revision 0)
+++ /branch/usb/usb_public_base/program/sim.prog	(working copy)
@@ -0,0 +1,644 @@
+simstart:
+	force 8,radio_ctrl
+	force 0,radio_ctrl
+    //dpll enable
+	jam 0x3,0x8a00
+	jam 0x7f,0x8a01
+	jam 0xf,0x8a02
+	jam 5,core_clksel
+	jam 0,core_clkoff
+	jam 0,core_clkoff+1
+	force 0,clkn
+	jam SYSTEM_CLK_12M,mem_system_clk
+//	branch sim_c1
+    //jam 8,0x8011 //efuse lock
+    //call sim_wdt
+    //call sim_iic
+    //call sim_uart
+	//call sim_spi
+    //call sim_pwm
+    //call sim_gpio
+    //call sim_nec
+    //call sim_nec
+    //call sim_ac
+    //call sim_ac
+    //call sim_ccm
+    //call sim_adc
+    //call sim_efuse
+    //call sim_efuse_lock
+//	branch sim_lpm
+//	branch sim_lr
+//	branch sim_otp
+//	call sim_snooze
+//    call sim_lpm_sleep
+//	branch sim_otp
+//	branch sim_usb
+//	branch sim_iic
+//	call sim_cal
+//	call sim_uart
+//	call sim_spi
+//	branch sim_le
+//    branch assert
+//	branch sim_main
+
+sim_le:
+	jam lemode_2m,mem_le_mode
+	fetch 3,0x9002
+	fetch 1,mem_sim_slave
+	beq 1,sim_le_slave
+	jam 1,mem_le_scan_enable
+sim_le_loop:
+	call le_advertising_dispatch
+	branch sim_le_loop
+
+sim_le_slave:
+	jam 1,mem_le_adv_enable
+	nop 1000
+	branch sim_le_loop
+
+sim_usb:
+	call usb_init
+sim_usb_loop:
+	call usb_isr
+	branch sim_usb_loop
+
+
+sim_lpm:
+	fetch 1,0x9ffd
+	beq 1,assert
+	setarg 0
+	store 8,mem_gpio_wakeup_low
+	arg 30,temp
+	branch lpm_sleep
+
+
+sim_lr:
+	jam 3,mem_le_ch_mapped
+	setarg 0xfedcba
+	store 3,mem_le_crcinit
+	call le_enable
+	setarg 0x1234567
+	iforce access
+	set1 mark_ble_lr,mark
+//	set1 mark_ble_lr_s8,mark
+	setarg 0x2e0403
+	store 3,mem_le_txheader
+	setarg 0x123456
+	istore 3,contw
+	call le_transmit
+	branch assert
+
+
+sim_c1:
+	setarg 0xb4b5b6
+	store 3,mem_le_lap
+	setarg 0xb1b2b3
+	istore 3,contw
+	setarg 0xa4a5a6
+	store 3,mem_le_plap
+	setarg 0xa1a2a3
+	istore 3,contw
+	setarg 0x101
+	store 4,mem_le_preq
+	setarg 0x70710
+	istore 3,contw
+	setarg 0x302
+	store 4,mem_le_pres
+	setarg 0x50008
+	istore 3,contw
+	jam 0,mem_le_conn_peer_addr_type
+	jam 1,mem_le_adv_own_addr_type
+	arg regidx_key,regext_index
+	arg 4,loopcnt
+sim_clear_key_loop:
+	arg 0,regext
+	increase 1,regext_index
+	loop sim_clear_key_loop
+
+	setarg 0x702EE0
+	store 3,mem_le_rconfirm
+	setarg 0x274EC6
+	istore 3,contw
+	setarg 0x0E6388
+	istore 3,contw
+	setarg 0x56AD6F
+	istore 3,contw
+	setarg 0x83D521
+	istore 3,contw
+	setarg 0x57	
+	istore 1,contw
+	arg mem_le_rconfirm,rega
+	call aes_init
+	call function_c1
+	branch loop
+
+sim_otp:
+	fetch 1,mem_sim_slave
+	beq 1,assert
+	call otp_enable_chgpump
+	setarg 0x1234567
+	store 4,mem_tmp_buffer
+	setarg 0x123
+	arg mem_tmp_buffer,rega
+	arg 4,loopcnt
+	call otp_write
+	setarg 0x123
+	arg mem_tmp_buffer+4,rega
+	arg 4,temp
+	call otpd_read_data
+	fetch 4,mem_tmp_buffer
+	ifetcht 4,contr
+	isub temp,null
+	nbranch assert,zero
+loop:
+	branch loop
+
+
+
+ifdef TEST
+
+sim_wdt:
+    jam 8,0x8043
+    jam 0x7e,0x8004
+    nop 1000
+    jam 0xf,0x800b
+    rtn
+
+sim_nec:
+    jam 0x18,0x8083 //gpio3
+    jam 0x1,0x80cb
+    jam 0x89,0x80cc
+    jam 0x1,0x80cd
+    jam 0x1,0x80cf
+    jam 0x31,0x80d0
+    nop 10000
+    jam 0x0,0x80d0
+    rtn
+
+sim_ac:
+    jam 0x19,0x8082 //gpio18
+    jam 6,0x80d9
+    jam 0x10,0x804b
+    jam 0x3c,0x8049
+    jam 0x31,0x8048
+    nop 10000
+    jam 0x0,0x8048
+    rtn
+
+
+sim_pwm:
+    jam 0x0,0x80a0
+    jam 0x1,0x80a2
+    jam 0x2,0x80a4
+    jam 0x3,0x80a6
+    jam 0x4,0x80a8
+    jam 0x5,0x80aa
+    jam 0x6,0x80ac
+    jam 0x7,0x80ae
+    jam 0x8,0x80b0
+    jam 0x9,0x80b2
+    jam 0xa,0x80b4
+    jam 0xb,0x80b6
+    jam 0xc,0x80b8
+    jam 0xd,0x80ba
+    jam 0xe,0x80bc
+    jam 0xf,0x80be
+    jam 0xaa,0x80d8 //pwm init
+    jam 0x10,0x8074 //pwm0 -> gpio4
+    jam 0x11,0x8075 //pwm1 -> gpio5
+    jam 0x12,0x8076 //pwm2 -> gpio6
+    jam 0x13,0x8077 //pwm3 -> gpio7
+    jam 0x14,0x8078 //pwm4 -> gpio8
+    jam 0x15,0x8079 //pwm5 -> gpio9
+    jam 0x16,0x807a //pwm6 -> gpio10
+    jam 0x17,0x807b //pwm7 -> gpio11
+    jam 0x3,0x8084 //pwm0/1 enable
+    nop 100
+    jam 0x3,0x80dd //pwm0/1 soft rst
+    nop 100
+    jam 0xc,0x8084 //pwm2/3 enable
+    nop 100
+    jam 0xc,0x80dd //pwm2/3 soft rst
+    nop 100
+    jam 0x30,0x8084 //pwm4/5 enable
+    nop 100
+    jam 0x30,0x80dd //pwm4/5 soft rst
+    nop 100
+    jam 0xc0,0x8084 //pwm6/7 enable
+    nop 100
+    jam 0xc0,0x80dd //pwm6/7 soft rst
+    nop 100
+    jam 0,0x8084
+    rtn
+
+sim_ccm:
+    //call sim_aes_key_config_case1
+    //call sim_aes_dec_dma_case1
+    //call sim_aes_enc_dma_case1
+    call sim_aes_key_config_case4
+    call sim_aes_dec_dma_case4
+    call sim_aes_enc_dma_case4
+    rtn
+
+sim_aes_key_config_case1:
+    //key
+    force 4,regext_index
+    arg 0x6789,pdata
+    lshift16 pdata,pdata
+    arg 0x6789,temp
+    ior temp,regext
+    force 5,regext_index
+    arg 0x6789,pdata
+    lshift16 pdata,pdata
+    arg 0x6789,temp
+    ior temp,regext
+    force 6,regext_index
+    arg 0x2345,pdata
+    lshift16 pdata,pdata
+    arg 0x2345,temp
+    ior temp,regext
+    force 7,regext_index
+    arg 0x2345,pdata
+    lshift16 pdata,pdata
+    arg 0x2345,temp
+    ior temp,regext
+    //nonce
+    force 8,regext_index
+    arg 0xbc61,pdata
+    lshift16 pdata,pdata
+    arg 0x4e49,temp
+    ior temp,regext
+    force 9,regext_index
+    arg 0xccdd,pdata
+    lshift16 pdata,pdata
+    arg 0x0000,temp
+    ior temp,regext
+    force 0xa,regext_index
+    arg 0x8899,pdata
+    lshift16 pdata,pdata
+    arg 0xaabb,temp
+    ior temp,regext
+    force 0xb,regext_index
+    arg 0x0000,pdata
+    lshift16 pdata,pdata
+    arg 0x6677,temp
+    ior temp,regext
+    //aad
+    jam 0x00,0x80d5
+    jam 0x19,0x80d6
+    jam 0x02,0x80d7
+    rtn
+
+sim_aes_dec_dma_case1:
+    //mic golden
+    force 0,regext_index
+    arg 0xc5dd,pdata
+    lshift16 pdata,pdata
+    arg 0xa210,temp
+    ior temp,regext
+    
+    //payload
+
+    //dma config
+    jam 0x00,0x80d1
+    jam 0x10,0x80d2
+    jam 0x00,0x80d3
+    jam 0x10,0x80d4
+    jam 0x6,0x800a 
+    jam 0x7,0x800a 
+    nop 1000
+    rtn
+
+sim_aes_enc_dma_case1:
+    //payload
+
+    //dma config
+    jam 0x00,0x80d1
+    jam 0x10,0x80d2
+    jam 0x00,0x80d3
+    jam 0x11,0x80d4
+    jam 0x2,0x800a 
+    jam 0x3,0x800a 
+    nop 1000
+    rtn
+
+sim_aes_key_config_case4:
+    //key
+    force 4,regext_index
+    arg 0x1bd1,pdata
+    lshift16 pdata,pdata
+    arg 0x2ace,temp
+    ior temp,regext
+    force 5,regext_index
+    arg 0xbd56,pdata
+    lshift16 pdata,pdata
+    arg 0x14a1,temp
+    ior temp,regext
+    force 6,regext_index
+    arg 0x1f8b,pdata
+    lshift16 pdata,pdata
+    arg 0x9dbd,temp
+    ior temp,regext
+    force 7,regext_index
+    arg 0xfc22,pdata
+    lshift16 pdata,pdata
+    arg 0x8384,temp
+    ior temp,regext
+    //nonce
+    force 8,regext_index
+    arg 0xb3be,pdata
+    lshift16 pdata,pdata
+    arg 0x9549,temp
+    ior temp,regext
+    force 9,regext_index
+    arg 0x2769,pdata
+    lshift16 pdata,pdata
+    arg 0x00bd,temp
+    ior temp,regext
+    force 0xa,regext_index
+    arg 0xb727,pdata
+    lshift16 pdata,pdata
+    arg 0x5bf9,temp
+    ior temp,regext
+    force 0xb,regext_index
+    arg 0x1100,pdata
+    lshift16 pdata,pdata
+    arg 0x82b8,temp
+    ior temp,regext
+    //aad
+    jam 0x00,0x80d5
+    jam 0x19,0x80d6
+    jam 0x02,0x80d7
+    rtn
+
+sim_aes_dec_dma_case4:
+    //mic golden
+    force 0,regext_index
+    arg 0x7c32,pdata
+    lshift16 pdata,pdata
+    arg 0x2cc6,temp
+    ior temp,regext
+    
+    //payload
+    arg 0x1001,contw
+    arg 0xb839, pdata
+    istore 2,contw
+    arg 0xc85f, pdata
+    istore 2,contw
+    arg 0x3756, pdata
+    istore 2,contw
+    arg 0x9249, pdata
+    istore 2,contw
+    arg 0xf07f, pdata
+    istore 2,contw
+    arg 0xd647, pdata
+    istore 2,contw
+    arg 0x2b40, pdata
+    istore 2,contw
+    arg 0x7ccc, pdata
+    istore 2,contw
+    arg 0xfff9, pdata
+    istore 2,contw
+    arg 0xffff, pdata
+    istore 2,contw
+    jam 0x11,0x80da //ccm_inptr
+
+    //dma config
+    jam 0x01,0x80d1
+    jam 0x10,0x80d2
+    jam 0x02,0x80d3
+    jam 0x40,0x80d4
+    jam 0x6,0x800a 
+    jam 0x7,0x800a 
+    call wait_ccm_done
+    fetch 1,0x4012
+    bne 0x05,assert
+    rtn
+
+sim_aes_enc_dma_case4:
+    //payload
+    arg 0x4002,contw
+    arg 0x1286, pdata
+    istore 2,contw
+    arg 0xa56d, pdata
+    istore 2,contw
+    arg 0xb3db, pdata
+    istore 2,contw
+    arg 0x6491, pdata
+    istore 2,contw
+    arg 0xa19b, pdata
+    istore 2,contw
+    arg 0xc4ca, pdata
+    istore 2,contw
+    arg 0x9160, pdata
+    istore 2,contw
+    arg 0x3372, pdata
+    istore 2,contw
+    arg 0xff05, pdata
+    istore 2,contw
+    arg 0xffff, pdata
+    istore 2,contw
+    jam 0x11,0x80da //ccm_inptr
+
+    //dma config
+    jam 0x02,0x80d1
+    jam 0x40,0x80d2
+    jam 0x01,0x80d3
+    jam 0x11,0x80d4
+    jam 0x2,0x800a 
+    jam 0x3,0x800a 
+    call wait_ccm_done
+    fetch 1,0x1111
+    bne 0xf9,assert
+    rtn
+
+//wait_ccm_done:
+//    fetch 1,0x8108
+//    bbit0 6,wait_ccm_done
+//    rtn
+
+sim_lpm_sleep:
+	jam 1,mem_context
+	branch sim_lpm_cont,wake
+	jam 0x80,core_aes_en
+	jam ccnt_start,core_misc_ctrl
+sim_lpm_wait:
+	call lpo_calibration
+	fetch 3,mem_clks_per_lpo
+	branch sim_lpm_wait,blank
+	lshift4 pdata,pdata
+	store 3,mem_clks_per_lpo
+sim_lpm_cont:
+	setarg param_rt_rthalfslot
+	store 2,mem_param_rt_rthalfslot
+	call lpm_recover_clk,wake
+	setarg 10000
+	call sleep,wake
+	arg 10000,temp
+	storet 4,mem_sleep_counter
+	branch lpm_sleep
+
+sim_uart:
+	jam 0x67,mem_h5tx_buf
+	setarg mem_h5tx_buf
+	add pdata,0x80,temp
+	call uarta_init_tx
+	increase 0x80,pdata
+	increase 0x80,temp
+	jam gpcfg_uart_txd,core_gpio_conf + 16
+	jam 0x81,core_uart_ctrl
+	setarg 0x30
+	store 2,core_uart_baud
+	fetch 1,mem_sim_slave
+	beq 1,sim_uart_slave
+	call uarta_prepare_tx
+	call sim_uart_wait+3
+	setarg 0x1357d9a
+	istore 4,contu
+	arg 0xaa69,rega
+	istorer rega,2,contu
+	setarg 0xfedcb3
+	istore 3,contu
+	storer contu,2,core_uart_twptr
+sim_uart_wait:
+	fetch 1,core_uart_status
+	bbit1 uart_status_tx_busy,sim_uart_wait
+	nop 200
+	rtn
+
+sim_uart_slave:
+	nop 247
+	fetch 1,mem_h5tx_buf
+	bne 0x67,assert
+	branch sim_uart_slave
+	fetch 1,core_uart_status
+	bbit1 uart_status_rx_fifo_empty,sim_uart_slave
+	fetch 1,core_uart_rxitems
+	bne 9,sim_uart_slave
+	fetcht 8,mem_h5tx_buf
+	call uarta_prepare_rx
+	ifetch 8,contu
+	isub temp,null
+	nbranch assert,zero
+	rtn
+
+
+
+sim_cal:
+
+	call tx_iq_precomp
+	fetchr regf,2,mem_omega
+	ifetchr regf,2,contr
+	ifetchr regf,2,contr
+	fetchr regf,2,mem_b1
+	ifetchr regf,2,contr
+	fetchr regf,2,mem_b2
+	ifetchr regf,2,contr
+	arg 0x1000,timeup
+	call tx_iq_cal
+	jam 1,core_ice_ctrl
+
+	arg 0x1000,timeup
+	call rx_iq_comp
+	jam 1,core_ice_ctrl
+	
+
+sim_iic:
+	call iic_init_600khz
+    call iicd_init_pin
+iic_write:
+	setarg 6
+	store 2,core_iicd_txlen
+	setarg 0x10a0
+	store 2,0x1000
+    setarg 0x5a00
+	store 2,0x1002
+    setarg 0xa5a5
+	store 2,0x1004
+	setarg 0x1000
+	store 2,core_iicd_txaddr
+	setarg 0
+	store 2,core_iicd_rxlen
+	jam 3,core_iicd_ctrl
+	jam iicd_start,core_misc_ctrl
+	call wait_iicd_done
+	nop 300
+iic_dummy_write:
+	setarg 3
+	store 2,core_iicd_txlen
+	setarg 0x10a0
+	store 2,0x1000
+    setarg 0x00
+	store 1,0x1002
+	setarg 0x1000
+	store 2,core_iicd_txaddr
+	setarg 0
+	store 2,core_iicd_rxlen
+	jam 3,core_iicd_ctrl
+	jam iicd_start,core_misc_ctrl
+	call wait_iicd_done
+	nop 300
+iic_read:
+    setarg 1
+	store 2,core_iicd_txlen
+    setarg 0xa1
+	store 1,0x1000
+	setarg 0x1000
+	store 2,core_iicd_txaddr
+    setarg 0x1100
+	store 2,core_iicd_rxaddr
+	setarg 3
+	store 2,core_iicd_rxlen
+	jam 1,core_iicd_ctrl
+	jam iicd_start,core_misc_ctrl
+	call wait_iicd_done
+    fetch 1, 0x1100
+    bne 0x5a, assert
+    rtn
+
+sim_spi:
+    //jam gpcfg_spid_miso ,core_gpio_conf + 12 
+    //jam gpcfg_spid_ncs ,core_gpio_conf + 13 
+    //jam gpcfg_spid_sck ,core_gpio_conf + 14 
+    //jam gpcfg_spid_mosi ,core_gpio_conf + 15
+    call spi_gpio_init
+
+    setarg 3 
+    store 2 ,core_spid_rxlen 
+    setarg 4 
+    store 2 ,core_spid_txlen 
+    setarg 0x1200 
+    store 2 ,core_spid_txaddr 
+    setarg 0x1300 
+    store 2 ,core_spid_rxaddr
+    setarg 0x0003
+	store 2,0x1200
+    setarg 0x0000
+	store 2,0x1202
+    jam spid_start ,core_misc_ctrl 
+    call wait_spid_done
+    fetch 1, 0x1302
+    bne 0xaa, assert
+    rtn
+
+
+sim_adc:
+    jam 0xc,0x8a0a
+    jam 0x2,0x8a17
+    jam 0x1,0x8a97
+    jam 0x0,0x80dc
+    jam 0x80,0x8053
+    nop 10000
+    jam 0x5,0x80dc
+    jam 0x80,0x8053
+    nop 10000
+    jam 0xa,0x80dc
+    jam 0x80,0x8053
+    nop 10000
+    jam 0xf,0x80dc
+    jam 0x80,0x8053
+    nop 10000
+    jam 0x0,0x8053
+    rtn
+
+ endif
Index: program/simple_pairing.prog
===================================================================
--- /branch/usb/usb_public_base/program/simple_pairing.prog	(revision 0)
+++ /branch/usb/usb_public_base/program/simple_pairing.prog	(working copy)
@@ -0,0 +1,1068 @@
+
+
+ifdef SECURE_CONNECTION
+
+
+publickey_init:
+//	fetch 1,mem_ssp_enable
+//	nbranch sp_initialize,blank
+	branch sp_initialize_256
+
+sp_calc_sequence_256_check:
+	bpatch patch15_0,mem_patch15
+//	fetch 1,mem_ssp_enable
+//	rtn blank
+//	fetch 1,mem_sp_local_key_invalid
+//	rtnne SP_KEY_VALID
+	fetch 1,mem_secure_connections_enable
+	rtn blank
+	fetch 1,mem_sc_local_key_invalid
+	rtneq SP_KEY_VALID_256
+//	fetch 2,mem_ui_state_map
+//	bbit1 UI_STATE_BT_CONNECTED,stop_publickey_calc_256
+	fetch 1,mem_sc_calc
+	beq SP_CALC_STANDBY,sp_initialize_256
+	rtn
+stop_publickey_calc_256:
+	jam SP_CALC_STANDBY,mem_sc_calc	
+	rtn
+
+
+	
+
+sp_clear_flags:
+	bpatch patch15_1,mem_patch15
+	setarg mem_sp_state_end
+	arg mem_sp_state_start,contw
+	isub contw,loopcnt
+	call clear_mem
+	setarg mem_sp_state_xmem_end
+	arg mem_sp_state_xmem,contw
+	isub contw,loopcnt
+	branch clear_mem
+
+
+
+sp_calc_check_publickey_256:
+	call sp_calc_b256
+	arg mem_le_pubkey_remote_y_256,rega
+	arg mem_t7_256,contw
+	call bn_sqrmod_256   
+	arg mem_le_pubkey_remote_x_256,rega
+	arg mem_t2_256,contw
+	call bn_sqrmod_256   
+  	arg mem_t2_256,rega
+	arg mem_le_pubkey_remote_x_256,regb
+	arg mem_t2_256,contw
+	call bn_mulmod_256	
+  	arg mem_a_256,rega
+	arg mem_le_pubkey_remote_x_256,regb
+	arg mem_t3_256,contw
+	call bn_mulmod_256	
+  	arg mem_t3_256,rega
+	arg mem_t2_256,regb
+	arg mem_t2_256,contw
+	call bn_addmod_256	 
+  	arg mem_t0_256,rega
+	arg mem_t2_256,regb
+	arg mem_t0_256,contw
+	call bn_addmod_256	 
+	arg 32,loopcnt
+  	arg mem_t7_256,rega
+	arg mem_t0_256,regb
+	branch  string_compare
+	
+sp_calc_b256:
+	arg mem_gy_256,rega
+	arg mem_t0_256,contw
+	call bn_sqrmod_256   
+	arg mem_gx_256,rega
+	arg mem_t2_256,contw
+	call bn_sqrmod_256    
+  	arg mem_t2_256,rega
+	arg mem_gx_256,regb
+	arg mem_t2_256,contw
+	call bn_mulmod_256	
+  	arg mem_a_256,rega
+	arg mem_gx_256,regb
+	arg mem_t3_256,contw
+	call bn_mulmod_256	 
+  	arg mem_t3_256,rega
+	arg mem_t2_256,regb
+	arg mem_t2_256,contw
+	call bn_addmod_256	 
+  	arg mem_t0_256,rega
+	arg mem_t2_256,regb
+	arg mem_t0_256,contw
+	branch  bn_submod_256	
+
+
+
+
+random_generator:
+	increase -1,queue
+	nrtn     positive
+	random   pdata
+	istore   2,contw  
+	branch   random_generator
+compare4:
+	increase -1,queue
+	nbranch  compare4_success,positive
+	ifetch   4,rega
+	copy     pdata,temp
+	ifetch   4,regb
+	iflip    temp,pdata
+	nbranch  compare4_failed,zero
+	increase 4,rega
+	increase 4,regb
+	branch   compare4
+compare4_failed:
+	branch disable_true
+
+compare4_success:
+	branch enable_true
+
+
+
+
+bn_testbit:
+	and pdata,7,queue
+	rshift3 pdata,pdata
+	iadd contr,contr
+	ifetch 1,contr
+	qisolate0 pdata
+	rtn
+
+
+bn_eq_zero:
+	ifetch 8,contr
+	nrtn blank
+	ifetch 8,contr
+	nrtn blank
+	ifetch 8,contr
+	rtn
+	
+	
+	/* return zero if eq */
+
+bn_eq_0:	
+	ifetch 4,rega
+	iforce temp
+	ifetch 4,regb
+	isub temp,null
+	nrtn zero
+	increase 4,rega
+	increase 4,regb
+	loop bn_eq_0
+	rtn
+	/* return positive if A >= B */
+bn_bigeq:
+	force 6,loopcnt
+	increase 20,rega
+	increase 20,regb
+bn_bigeq_0:	
+	ifetch 4,regb
+	iforce temp
+	ifetch 4,rega
+	isub temp,pdata
+	nrtn positive
+	nrtn blank
+	increase -4,rega
+	increase -4,regb
+	loop bn_bigeq_0
+	rtn
+bn_add:
+	force 6,loopcnt
+	force 0,regc
+bn_add_0:	
+	ifetch 4,rega
+	iforce temp
+	ifetch 4,regb
+	iadd temp,pdata
+	iadd regc,pdata
+	istore 4,contw
+	isolate1 32,pdata
+	setflag true,0,regc
+	increase 4,rega
+	increase 4,regb
+	loop bn_add_0
+	rtn
+
+bn_sub:
+	force 6,loopcnt
+	force 0,regc
+bn_sub_0:	
+	ifetch 4,regb
+	iforce temp
+	ifetch 4,rega
+	isub temp,pdata
+	isub regc,pdata
+	istore 4,contw
+	isolate1 32,pdata
+	setflag true,0,regc
+	increase 4,rega
+	increase 4,regb
+	loop bn_sub_0
+	rtn
+
+bn_rshift6:
+	force 6,loopcnt
+	increase 20,rega
+bn_rshift:
+	force 0,regc
+bn_rshift_0:	
+	ifetch 4,rega
+	isolate1 0,pdata
+	setflag true,1,regc
+	rshift pdata,pdata
+	isolate1 0,regc
+	setflag true,31,pdata
+	istore 4,rega
+	increase -4,rega
+	rshift regc,regc
+	loop bn_rshift_0
+	rtn
+bn_lshift:
+	force 6,loopcnt
+	force 0,regc
+bn_lshift_0:	
+	ifetch 4,rega
+	isolate1 31,pdata
+	setflag true,1,regc
+	lshift pdata,pdata
+	isolate1 0,regc
+	setflag true,0,pdata
+	istore 4,rega
+	increase 4,rega
+	rshift regc,regc
+	loop bn_lshift_0
+	rtn
+	
+
+bn_load:
+	force 6,loopcnt
+bn_load_0:	
+	ifetch 4,contr
+	iforce regext
+	increase 1,regext_index
+	loop bn_load_0
+	rtn
+
+
+
+sp_initialize_256:	
+	bpatch patch15_2,mem_patch15
+	fetch 1,mem_secure_connections_enable
+	nbranch sp_pubkey_calc_256,blank
+//	call sp_clear_flags
+sc_reset:
+	jam SP_CALC_STANDBY,mem_sc_calc
+	jam SP_KEY_INVALID,mem_sc_local_key_invalid
+	rtn
+	
+	
+    	
+sp_wait_pubkey_calc_256_done:
+	fetch 1,mem_secure_connections_enable
+	rtn blank
+	fetch 1,mem_sc_local_key_invalid
+	rtneq SP_KEY_VALID_256
+	call sp_calc_sequence_256
+	branch sp_wait_pubkey_calc_256_done
+
+
+//BD1A3CCD:A6B89958:99B740EB:7B60FF4A:503F10D2:E3B3C974:385FC5A3:D4F6493F
+sp_debug_private_256:
+	arg mem_sc_private_key_256,contw
+        setsect 0,0x1abd
+        setsect 1,0x1b34f
+        setsect 2,0x19b8a
+        setsect 3,0x26562
+        istore 9,contw
+        setsect 0,0x340b7
+        setsect 1,0x1efa
+        setsect 2,0xaff6
+        setsect 3,0xfd41
+        istore 9,contw
+        setsect 0,0x3d210
+        setsect 1,0x26cf8
+        setsect 2,0x3874c
+        setsect 3,0x3157c
+        istore 9,contw
+        setsect 0,0x2d4a3
+        setsect 1,0x3d27d
+        setsect 2,0x3
+        istore 5,contw
+        rtn
+	
+
+sp_pubkey_calc_256:
+	fetch    1,mem_sc_local_key_invalid
+	rtnne SP_KEY_INVALID
+	fetch    1,mem_sc_calc
+	rtnne  SP_CALC_STANDBY
+	call init_memp_256
+	arg      mem_sc_private_key_256,contw 
+	force    15,queue
+	call     random_generator
+	random   pdata
+	rshift   pdata,pdata
+	istore   2,contw 
+	
+	fetch 1,mem_sp_debug_mode
+	ncall sp_debug_private_256,blank
+	
+	arg      mem_k_256,contw
+	arg      mem_sc_private_key_256,contr	
+	call     memcpy32 //mem_sp_private_key=>mem_k 
+
+	arg      mem_ax_256,contw
+	arg      mem_gx_256,contr
+	call     memcpy64 //mem_gx=>mem_ax 
+	
+	arg      mem_az_256,contw
+	call      clear_mem_256
+	jam      1,mem_az_256 //0=>mem_az 
+
+	call     eckp_calc_init_256
+	jam SP_CALC_PUBKEY_256,mem_sc_calc
+	rtn    
+
+sp_pubkey_generated_256:
+	arg      mem_sc_pubkey_local_x_256,contw
+	arg      mem_bx_256,contr
+	call     memcpy64   
+	jam      SP_KEY_VALID_256,mem_sc_local_key_invalid
+	jam      SP_CALC_STANDBY,mem_sc_calc
+	rtn
+	
+
+
+sp_dhkey_calc_256:
+	fetch    1,mem_sp_dhkey_invalid
+	rtnne  SP_KEY_INVALID
+	fetch    1,mem_sc_calc
+	rtnne  SP_CALC_STANDBY
+
+	arg      mem_k_256,contw
+	arg      mem_sc_private_key_256,contr	
+	call     memcpy32
+
+	arg      mem_ax_256,contw
+	arg      mem_le_pubkey_remote_x_256,contr
+	call     memcpy64
+
+	arg      mem_az_256,contw
+	call     clear_mem_256
+	jam      1,mem_az_256 //0=>mem_az 
+
+	call     eckp_calc_init_256
+	jam     SP_CALC_DHKEY_256,mem_sc_calc
+	rtn 
+
+
+sp_dhkey_generated_256:
+//	jam SP_FLAG_COMMIT,mem_sp_dh_ready
+	arg mem_le_dhkey_256,contw
+	arg mem_bx_256,contr
+	call memcpy32
+	jam SP_KEY_VALID_256,mem_sp_dhkey_invalid
+	jam SP_CALC_STANDBY,mem_sc_calc
+	rtn
+
+
+
+sp_calc_sequence_256:
+	fetch 1,mem_secure_connections_enable
+	rtn blank
+	fetch 1,mem_sc_calc
+	rtn blank
+	increase 0x80,pdata
+	store    1,mem_sc_calc
+	rtnbit1 7
+	fetch    2,mem_ec_loopc
+	branch   sp_calc_sequence_done_256,blank
+	branch   eckp_calc_256
+
+sp_calc_sequence_done_256:    
+	bpatch patch15_3,mem_patch15
+	call ecunmapz_256
+	fetch 1,mem_sc_calc
+	beq  SP_CALC_PUBKEY_256,sp_pubkey_generated_256
+	beq  SP_CALC_DHKEY_256,sp_dhkey_generated_256
+	rtn
+
+
+eckp_calc_256:
+	call     ecdbl_256  
+	fetch    2,mem_ec_loopc
+	increase -1,pdata
+	store    2,mem_ec_loopc
+	arg      mem_k_256,contr
+	call     bn_testbit
+	rtn	true
+	branch     ecadd_256   
+
+eckp_calc_init_256:
+	bpatch patch15_4,mem_patch15
+	setarg 256
+	store 2,mem_ec_loopc
+eckp_calc_init_256_1:    
+	fetch    2,mem_ec_loopc
+	rtn      blank
+	increase -1,pdata
+	store    2,mem_ec_loopc
+	arg      mem_k_256,contr
+	call     bn_testbit
+	branch eckp_calc_init_256_1,true
+	arg      mem_ax_256,contr
+	arg      mem_cx_256,contw
+	branch     memcpy96	
+
+
+ecunmapz_256:
+	arg mem_cz_256,rega
+	arg mem_t3_256,contw
+	call bn_invmod_256			/* t3 = 1/z */
+	arg mem_t3_256,rega
+	arg mem_t1_256,contw		
+	call bn_sqrmod_256			/* t1 = 1/z2 */
+	arg mem_cx_256,rega
+	arg mem_t1_256,regb
+	arg mem_bx_256,contw
+	call bn_mulmod_256
+	arg mem_t3_256,rega
+	arg mem_t1_256,regb
+	arg mem_t2_256,contw			
+	call bn_mulmod_256			/* t2 = 1/z3 */
+	arg mem_cy_256,rega
+	arg mem_t2_256,regb
+	arg mem_by_256,contw
+	branch bn_mulmod_256	
+	
+ecdbl_256:
+	arg mem_cz_256,rega
+	arg mem_t2_256,contw
+	call bn_sqrmod_256
+	arg mem_t2_256,rega
+	arg mem_t3_256,contw
+	call bn_sqrmod_256
+//call ice_break
+	arg mem_a_256,rega
+	arg mem_t3_256,regb
+	arg mem_t3_256,contw
+	call bn_mulmod_256		/* t3=a*z4	*/
+	arg mem_cx_256,rega
+	arg mem_t2_256,contw
+	call bn_sqrmod_256
+//call ice_break
+	arg mem_t2_256,contr
+	arg mem_t1_256,contw
+	call memcpy32
+	arg mem_t1_256,rega
+	call bn_lshiftmod_256
+	arg mem_t2_256,rega
+	arg mem_t1_256,regb
+	arg mem_t2_256,contw
+	call bn_addmod_256
+//call ice_break
+	arg mem_t2_256,rega
+	arg mem_t3_256,regb
+	arg mem_t2_256,contw
+	call bn_addmod_256		/* t2=3*x2 + z*z4		D  */
+//call ice_break
+	arg mem_cx_256,contr
+	arg mem_t1_256,contw
+	call memcpy32
+	arg mem_cy_256,rega
+	arg mem_t3_256,contw
+	call bn_sqrmod_256
+	arg mem_t1_256,rega
+	call bn_lshiftmod_256
+	arg mem_t1_256,rega
+	call bn_lshiftmod_256
+	arg mem_t1_256,rega		
+	arg mem_t3_256,regb
+	arg mem_t1_256,contw
+	call bn_mulmod_256		//S = 4X1Y1^2/* t1=4x*y2	B	*/
+	arg mem_t3_256,rega
+	arg mem_t0_256,contw
+	call bn_sqrmod_256
+	arg mem_t0_256,rega
+	call bn_lshiftmod_256
+	arg mem_t0_256,rega
+	call bn_lshiftmod_256		
+	arg mem_t0_256,rega		
+	call bn_lshiftmod_256	//T = 8Y1^4	/* t0=8*y4		C */
+	arg mem_cy_256,contr
+	arg mem_t3_256,contw
+	call memcpy32
+	arg mem_t3_256,rega
+	call bn_lshiftmod_256
+	arg mem_t3_256,rega
+	arg mem_cz_256,regb
+	arg mem_cz_256,contw
+	call bn_mulmod_256		//z = 2Y1Z1
+
+
+	arg mem_t2_256,rega
+	arg mem_t3_256,contw
+	call bn_sqrmod_256   // M ^2
+//call ice_break
+	arg mem_t3_256,rega
+	arg mem_t1_256,regb
+	arg mem_t3_256,contw
+	call bn_submod_256  // t2^2 - 4*cx *cy^2 
+	arg mem_t3_256,rega
+	arg mem_t1_256,regb
+	arg mem_cx_256,contw
+	call bn_submod_256   //X2
+	arg mem_t1_256,rega
+	arg mem_cx_256,regb
+	arg mem_t3_256,contw
+	call bn_submod_256   //S-X2
+	arg mem_t3_256,rega
+	arg mem_t2_256,regb
+	arg mem_t3_256,contw
+	call bn_mulmod_256	//M(S-X2)	
+	arg mem_t3_256,rega
+	arg mem_t0_256,regb
+	arg mem_cy_256,contw
+	branch bn_submod_256  //M(S-X2)-T Y2	
+
+ecadd_256:
+
+	arg mem_az_256,rega
+	arg mem_t7_256,contw
+	call bn_sqrmod_256
+	arg mem_cx_256,rega
+	arg mem_t7_256,regb
+	arg mem_t0_256,contw
+	call bn_mulmod_256		/* n1=t0=xa*zb2 U1 = X1Z0^2*/
+
+
+	arg mem_az_256,rega
+	arg mem_t7_256,regb
+	arg mem_t7_256,contw
+	call bn_mulmod_256	
+	arg mem_cy_256,rega
+	arg mem_t7_256,regb
+	arg mem_t1_256,contw
+	call bn_mulmod_256		/* n2=t1=ya*zb3   S1 = Y1Z0^3*/
+
+
+	arg mem_cz_256,rega
+	arg mem_t7_256,contw
+	call bn_sqrmod_256
+	arg mem_ax_256,rega
+	arg mem_t7_256,regb
+	arg mem_t2_256,contw
+	call bn_mulmod_256		/* n3=t2=xb*za2  U0 = X0Z1^2*/
+
+	arg mem_cz_256,rega
+	arg mem_t7_256,regb
+	arg mem_t7_256,contw
+	call bn_mulmod_256	
+	arg mem_ay_256,rega
+	arg mem_t7_256,regb
+	arg mem_t3_256,contw
+	call bn_mulmod_256		/* n4=t3=yb*za3 S0 = Y0Z1^3*/
+
+
+//	arg mem_t0_256,rega
+//	arg mem_t2_256,regb
+	arg mem_t0_256,regb
+	arg mem_t2_256,rega
+	arg mem_t7_256,contw
+	call bn_submod_256		/* n5=t7=n1-n3=t0-t2   W=U1-U0*/
+	arg mem_t0_256,rega
+	arg mem_t2_256,regb
+	arg mem_t0_256,contw
+	call bn_addmod_256		/* n7=t0=n1+n3=t0+t2    T=U1+U0 */
+//	arg mem_t1_256,rega
+//	arg mem_t3_256,regb
+	arg mem_t1_256,regb
+	arg mem_t3_256,rega
+	arg mem_t2_256,contw
+	call bn_submod_256		/* n6=t2=n2-n4=t1-t3  S1-S0 */
+	arg mem_t1_256,rega
+	arg mem_t3_256,regb
+	arg mem_t1_256,contw
+	call bn_addmod_256		/* n8=t1=n2+n4=t1+t3 M=S1+S0*/
+	arg mem_t1_256,rega
+	arg mem_t7_256,regb
+	arg mem_t1_256,contw
+	call bn_mulmod_256		/* t1=n8*n5     MW */
+	arg mem_cz_256,rega
+	arg mem_az_256,regb
+	arg mem_t3_256,contw
+	call bn_mulmod_256	      //Z0Z1
+	arg mem_t3_256,rega
+	arg mem_t7_256,regb
+	arg mem_cz_256,contw
+	call bn_mulmod_256		/* z=za*zb*n5   Z0Z1W */
+
+	arg mem_t7_256,rega
+	arg mem_t7_256,contw
+	call bn_sqrmod_256		/* t7=n5^2 */
+	arg mem_t7_256,rega
+	arg mem_t0_256,regb
+	arg mem_t3_256,contw
+	call bn_mulmod_256		/* t3=n5^2*n7 */
+	arg mem_t7_256,rega
+	arg mem_t1_256,regb
+	arg mem_t1_256,contw
+	call bn_mulmod_256		/* t1=n8*n5^3 */
+	arg mem_t2_256,rega
+	arg mem_cx_256,contw
+	call bn_sqrmod_256		
+	arg mem_cx_256,rega
+	arg mem_t3_256,regb
+	arg mem_cx_256,contw
+	call bn_submod_256		/* x=n6^2-n5^2*n7 */
+	arg mem_cx_256,contr
+	arg mem_t7_256,contw
+	call memcpy32
+	arg mem_t7_256,rega
+	call bn_lshiftmod_256		/* t7=2*x */
+	arg mem_t3_256,rega
+	arg mem_t7_256,regb
+	arg mem_t3_256,contw
+	call bn_submod_256		/* t3=n9 */
+	arg mem_t3_256,rega
+	arg mem_t2_256,regb
+	arg mem_t2_256,contw
+	call bn_mulmod_256		/* t2=n9*n6 */
+	arg mem_t2_256,rega
+	arg mem_t1_256,regb
+	arg mem_cy_256,contw
+	call bn_submod_256	
+	arg mem_cy_256,rega
+	arg mem_p_256,regb
+	arg mem_cy_256,contw
+	force 0,regc
+	fetch 1,mem_cy_256
+	isolate1 0,pdata
+	call bn_add_256,true
+	copy regc,alarm
+	arg mem_cy_256,rega
+	call bn_rshift_256
+	fetch 1,mem_cy5_256
+	isolate1 0,alarm
+	setflag true,7,pdata
+	store 1,mem_cy5_256
+	rtn	
+
+bn_invmod_256:
+	copy contw,timeup					 
+	arg mem_tmp0_256,contw			 
+	call clear_mem_256
+	force 0,pdata
+//	store 4,mem_tmp52
+	store 4,mem_t2_256
+	jam 1,mem_tmp0_256      //y1
+	arg mem_tmp1_256,contw	//y2			 
+	call clear_mem_512      
+	arg mem_p_256,contr
+	arg mem_tmp2_256,contw		//j		 
+	call memcpy32
+	copy rega,contr
+	arg mem_tmp3_256,contw		//i		 
+	call memcpy32
+	
+//	arg mem_tmp22,rega
+//	arg mem_tmp32,regb
+//	call p_bn_bigeq_256
+//	branch assert,positive
+bn_invmod_256_2:	
+	arg mem_tmp3_256,contr
+	call bn_eq_zero_256
+	branch bn_invmod_256_0,blank
+//call ice_break    	
+//fetch 1,0x4ffe
+//increase 1,pdata
+//store 1,0x4ffe
+	arg mem_tmp3_256,rega
+	arg mem_tmp0_256,regb
+	call bn_rshifteven_256
+	arg mem_tmp2_256,rega
+	arg mem_tmp1_256,regb
+	call bn_rshifteven_256
+	
+	arg mem_tmp3_256,rega
+	arg mem_tmp2_256,regb
+	call bn_bigeq_256
+	branch bn_invmod_256_1,positive
+	arg mem_tmp2_256,rega
+	arg mem_tmp3_256,regb
+	copy rega,contw
+	call bn_sub_256
+	arg mem_tmp0_256,rega
+	arg mem_tmp1_256,regb
+	copy regb,contw
+	call bn_add_256
+	ifetch 1,rega
+	iadd regc,regc
+	ifetch 1,regb
+	iadd regc,pdata
+	istore 1,regb
+	branch bn_invmod_256_2
+bn_invmod_256_1:
+	arg mem_tmp3_256,rega
+	arg mem_tmp2_256,regb
+	copy rega,contw
+	call bn_sub_256
+	arg mem_tmp1_256,rega
+	arg mem_tmp0_256,regb
+	copy regb,contw
+	call bn_add_256
+	ifetch 1,rega
+	iadd regc,regc
+	ifetch 1,regb
+	iadd regc,pdata
+	istore 1,regb
+	branch bn_invmod_256_2
+bn_invmod_256_0:
+//call ice_break
+	arg mem_tmp1_256,rega
+	copy timeup,contw
+	call  bn_p256mod
+//call ice_break
+	arg mem_p_256,rega
+	copy timeup,regb
+	copy timeup,contw
+	branch bn_submod_256
+
+
+bn_mulmod_256:
+	copy contw,timeup					/* save result ptr */
+	
+	force 0,regext_index
+	
+	arg mem_tmp1_256,contw
+	call clear_mem_512
+	arg mem_regext,contw
+	call clear_mem_512
+//	jam 0,mem_regext_index
+
+//	arg mem_tmp12,contw
+	copy rega,contr
+//	force 0,regext_index
+	jam 0,mem_regext
+	setarg 0
+	call bn_load_mem
+	copy regb,contr
+	call bn_load_256
+//	force 0,regb
+//	jam 0,mem_regb
+	force 0,queue
+	arg mem_tmp1_256,contw	
+bn_mulmod_256_1:	
+//	copy regb,pdata
+//	store 1,
+	arg mem_regext,temp
+	copy queue,regb
+	lshift2 regb,pdata
+//	lshift4 pdata,pdata
+	iadd temp,regb	
+	force 0,temp
+	force 0,regc
+bn_mulmod_256_0:
+//	copy contw,pdata
+//	store 2,mem_contw
+//call ice_break
+//	copy pdata,contw
+	ifetch 4,contw					/* d[i+j] */
+	iforce rega
+//	copy regb,regext_index
+//	deposit regext
+	ifetch 4,regb
+	copy regc,regext_index
+	imul32 regext,pdata
+	iadd rega,pdata					/* uv = a[i]*b[j] + d[i+j] */
+	iadd temp,pdata					/* uv += u */
+	istore 4,contw					/* ->d[i+j] */
+	rshift32 pdata,temp				/* temp = u = uv >> 32 */
+	increase 1,regc
+	compare 8,regc,0xff
+	nbranch bn_mulmod_256_0,true
+//call ice_break
+	deposit temp
+	istore 4,contw					/* d[i + 12] = u */
+	increase -32,contw
+//	fetch 1,mem_regb
+//	copy pdata,regb
+	increase 1,queue
+	compare 8,queue,0xff
+	nbranch bn_mulmod_256_1,true
+	arg mem_tmp1_256,rega
+	copy timeup,contw
+	branch bn_p256mod
+
+bn_p256mod:
+	bpatch patch15_5,mem_patch15
+	copy contw,timeup				/* save result ptr */
+	copy rega,alarm				/* temp save rega */
+	arg mem_tmp2_256,regb
+	copy regb,contw
+	call memset0_4	
+	istore 8,contw
+	add rega,44,contr
+	call memcpy8
+	call memcpy12
+	copy regb,rega
+	call  bn_lshiftmod_256 //2S1
+	arg mem_tmp2_256,regb
+	copy alarm,rega   
+	copy timeup,contw
+	call bn_addmod_256 //T+2S1
+//call ice_break	
+	arg mem_tmp2_256,regb
+	copy regb,contw
+	call memset0_4	
+	istore 8,contw
+	add alarm,48,contr
+	call memcpy16
+	call memset0_4	
+	copy regb,rega
+	call  bn_lshiftmod_256 //2S2
+//call ice_break	
+//	arg 0,regb
+
+	arg mem_tmp2_256,regb
+	copy timeup,rega   
+	copy rega,contw	
+	call bn_addmod_256  //+2S2
+//call ice_break	
+//	arg 0,regb
+		
+	arg mem_tmp2_256,regb
+	copy regb,contw
+	add alarm,32,contr
+	call memcpy12
+	call memset0_4	
+	istore 8,contw
+	add alarm,56,contr
+	call memcpy8
+	copy timeup,rega
+	copy rega,contw
+	call bn_addmod_256 //+S3
+//call ice_break	
+//	arg 0,regb
+
+	arg mem_tmp2_256,regb
+	copy regb,contw
+	add alarm,36,contr
+	call memcpy12
+	add alarm,52,contr	
+	call memcpy12
+	add alarm,52,contr
+	call memcpy4
+	add alarm,32,contr
+	call memcpy4
+	copy timeup,rega
+	copy rega,contw
+	call bn_addmod_256 //+S4	
+//call ice_break	
+//	arg 1,regb
+	arg mem_tmp2_256,regb
+	copy regb,contw
+	add alarm,44,contr
+	call memcpy12
+	call memset0_4	
+	istore 8,contw
+	add alarm,32,contr
+	call memcpy4
+	add alarm,40,contr
+	call memcpy4
+	copy timeup,rega
+	copy rega,contw
+	call bn_submod_256 //-D1	
+//call ice_break	
+//	arg 2,regb
+	arg mem_tmp2_256,regb
+	copy regb,contw
+	add alarm,48,contr
+	call memcpy8
+	call memcpy8
+	force 0,pdata
+	istore 8,contw
+	add alarm,36,contr
+	call memcpy4
+	add alarm,44,contr
+	call memcpy4
+	copy timeup,rega
+	copy rega,contw
+	call bn_submod_256 //-D2	
+//call ice_break	
+//	arg 3,regb
+	arg mem_tmp2_256,regb
+	copy regb,contw
+	add alarm,52,contr
+	call memcpy12
+	add alarm,32,contr
+	call memcpy12
+	call memset0_4	
+	add alarm,48,contr
+	call memcpy4
+	copy timeup,rega
+	copy rega,contw
+	call bn_submod_256 //-D3
+//call ice_break	
+//	arg 4,regb
+	arg mem_tmp2_256,regb
+	copy regb,contw
+	add alarm,56,contr
+	call memcpy8
+	call memset0_4	
+	add alarm,36,contr
+	call memcpy12
+	call memset0_4	
+	add alarm,52,contr
+	call memcpy4
+	copy timeup,rega
+	copy rega,contw
+	branch  bn_submod_256 //-D4	
+
+
+bn_load_mem:
+	force 32,loopcnt
+	arg mem_regext,contw
+	iadd contw,contw
+	branch memcpy
+
+bn_load_256:
+	force 8,loopcnt
+	branch bn_load_0
+
+bn_sqrmod_256:
+	copy rega,regb
+	branch bn_mulmod_256
+
+bn_add_256:
+	force 8,loopcnt
+ 	branch bn_add+1
+
+bn_addmod_256:
+	call bn_add_256
+	copy contw,rega
+	branch bn_lshiftmod_ismod_256
+
+bn_lshiftmod_256:
+	call bn_lshift_256
+bn_lshiftmod_ismod_256:	
+	isolate1 0,regc
+	branch bn_lshiftmod_p_256,true
+	arg mem_p_256,regb
+	copy rega,regc
+	increase -32,rega
+	call bn_bigeq_256
+	nrtn positive
+	copy regc,rega
+	branch sub_p2_256
+	
+bn_lshiftmod_p_256:
+	call sub_p2_256
+//	nrtn true
+	copy rega,regc
+	increase -32,rega
+	arg mem_p_256,regb
+	call bn_bigeq_256
+	nrtn positive
+	copy regc,rega
+	branch sub_p2_256
+		
+	
+sub_p2_256:
+	increase -32,rega
+	arg mem_p_256,regb
+	copy rega,contw
+	branch bn_sub_256
+	
+
+
+	
+bn_submod_256:
+	call bn_sub_256
+//	isolate1 0,regc
+	branch  bn_submod_256_np,true
+//	copy rega,regc
+//	increase -32,rega
+	add contw,-32,rega
+	arg mem_p_256,regb
+	call bn_bigeq_256
+	nrtn positive
+	arg mem_p_256,regb
+	add contw,-32,rega
+//	copy regc,rega
+	copy rega,contw
+	branch  bn_sub_256
+bn_submod_256_np:	
+	add contw,-32,rega
+	arg mem_p_256,regb
+	copy rega,contw
+	call bn_add_256
+//	isolate1 0,regc
+	rtn true
+	add contw,-32,rega
+	arg mem_p_256,regb
+	copy rega,contw
+	branch bn_add_256	
+
+
+ 
+bn_sub_256:
+	force 8,loopcnt
+	branch bn_sub+1
+
+bn_rshift_256:
+	force 8,loopcnt
+	increase 28,rega
+	branch bn_rshift
+
+bn_lshift_256:
+	force 8,loopcnt
+	force 0,regc
+	branch bn_lshift_0
+
+bn_bigeq_256:
+	force 8,loopcnt
+	increase 28,rega
+	increase 28,regb
+	branch bn_bigeq_0
+
+
+bn_eq_zero_256:
+	ifetch 8,contr
+	nrtn blank
+	branch bn_eq_zero
+
+
+
+	
+bn_rshifteven_256:
+	copy rega,alarm
+bn_rshifteven_256_1:
+	copy alarm,rega
+	ifetch 1,rega
+	isolate1 0,pdata
+	rtn true
+	call bn_rshift_256
+	ifetch 1,regb
+	isolate0 0,pdata
+	branch bn_rshifteven_256_0,true
+	arg mem_p_256,rega
+	copy regb,contw
+	call bn_add_256
+	ifetch 1,regb
+	iadd regc,pdata
+	istore 1,regb						 
+	increase -32,regb
+bn_rshifteven_256_0:
+	add regb,32,rega
+	force 9,loopcnt
+	call bn_rshift
+	branch bn_rshifteven_256_1		
+
+endif
+
Index: program/ui.prog
===================================================================
--- /branch/usb/usb_public_base/program/ui.prog	(revision 0)
+++ /branch/usb/usb_public_base/program/ui.prog	(working copy)
@@ -0,0 +1,655 @@
+ui_init:
+	rtn wake
+	call lpm_disable_exen_output
+	call ui_button_init
+	call ui_timer_init
+	branch ui_led_init_global
+
+ui_dispatch:
+	call ui_led_dispatch
+	branch ui_timer_check
+	
+ui_button_init:
+	fetch 1,mem_ui_button_gpio
+	rtneq UI_BUTTON_GPIO_DISABLE
+	iforce temp
+	call gpio_config_output
+	fetcht 1,mem_ui_button_gpio
+	call gpio_out_inactive
+	nop 100
+	fetcht 1,mem_ui_button_gpio
+	call gpio_config_input
+	branch ui_button_polling
+
+
+	
+ui_button_polling:
+	bpatch patch15_6,mem_patch15
+	fetch 1,mem_ui_button_gpio
+	rtneq UI_BUTTON_GPIO_DISABLE
+	copy pdata,temp
+	call gpio_get_bit
+	nbranch ui_button_up,true
+	//fall through
+ui_button_down:
+	call ui_button_check_long_press
+	fetch 2,mem_ui_state_map
+	set1 UI_STATE_BTN_DOWN,pdata
+	store 2,mem_ui_state_map
+	fetch 1,mem_ui_button_last_state
+	rtneq UI_BUTTON_STATE_DOWN
+	jam UI_BUTTON_STATE_DOWN,mem_ui_button_last_state
+	//Down Edge
+	fetch 1,mem_ui_button_timeout
+	store 1,mem_ui_button_timer //start long press timer
+	call lpm_button_get_wake_lock
+	jam BT_EVT_BUTTON_DOWN,mem_fifo_temp
+	branch ui_ipc_send_event
+ui_button_up:
+	fetch 2,mem_ui_state_map
+	set0 UI_STATE_BTN_DOWN,pdata
+	store 2,mem_ui_state_map
+	fetch 1,mem_ui_button_last_state
+	rtneq UI_BUTTON_STATE_UP
+	jam UI_BUTTON_STATE_UP,mem_ui_button_last_state
+	//Up Edge
+	jam 0,mem_ui_button_timer//stop long press timer
+	call lpm_button_clean_wake_lock
+	jam BT_EVT_BUTTON_UP,mem_fifo_temp
+	branch ui_ipc_send_event
+
+ui_button_check_long_press:
+	fetch 1,mem_ui_button_timer
+	rtn blank
+	increase -1,pdata
+	store 1,mem_ui_button_timer
+	nrtn blank
+	//Long Press
+	jam BT_EVT_BUTTON_LONG_PRESSED,mem_fifo_temp
+	branch ui_ipc_send_event
+
+lpm_button_get_wake_lock:
+	arg wake_lock_button,queue
+	branch lpm_get_wake_lock
+	
+lpm_button_clean_wake_lock:
+	arg wake_lock_button,queue
+	branch lpm_put_wake_lock
+
+
+
+/***********************ui led function****************************/
+/******************
+led function
+
+ui_led_init_global
+ui_led_on_global
+
+ui_led_off_global
+//input:rega :struct number
+ui_led_blink_start_global
+
+//input:rega :struct number
+//contr: the point that want to set led style address
+ui_led_set_style_global
+
+******************/
+//input:rega :struct number
+//output:regb :current strutct starting pointer
+calc_curr_struct_prt:
+	bpatch patch15_7,mem_patch15
+	fetch 2,mem_ui_led_struct_ptr
+	mul32 rega,LED_OFFSET_LENGTH,regb
+	iadd regb,regb
+	rtn
+
+
+ui_led_init_global:
+	fetch 1,mem_ui_led_struct_num
+	rtn blank
+	copy pdata,loopcnt
+	fetch 2,mem_ui_led_struct_ptr
+	copy pdata,regb
+ui_led_init_loop:
+	add regb,LED_OFFSET_LED_GPIO,regc
+	ifetcht 1,regc
+	call ui_led_init_set
+	increase LED_OFFSET_LENGTH,regb
+	loop ui_led_init_loop
+	rtn
+
+//mem_ui_led_init_state_set =0,set init off else set init on
+ui_led_init_set:
+	fetch 1,mem_ui_led_init_state_set
+	branch gpio_out_inactive,blank
+	branch gpio_out_active
+	
+//input:rega :struct number
+ui_led_on_global:
+	call calc_curr_struct_prt
+	setarg UI_LED_STATE_LIGHTING
+	istore 1,regb
+	call ui_led_stop_timer
+	branch ui_led_on_static
+
+	
+//input:rega :struct number
+ui_led_blink_stop_global:
+ui_led_off_global:
+	call calc_curr_struct_prt
+	setarg UI_LED_STATE_DARKING
+	istore 1,regb
+	call ui_led_stop_timer
+	branch ui_led_off_static
+
+
+//input:rega :struct number
+ui_led_blink_start_global:
+	call calc_curr_struct_prt
+	setarg UI_LED_STATE_BLINK_START
+	istore 1,regb
+	setarg LED_INFINITE_FLASH_NUM
+	istore 1,contw
+	branch ui_led_off_static
+
+
+//input:rega :struct number
+//REGC: the point that want to set led style address
+ui_led_set_style_global:
+	call calc_curr_struct_prt
+	arg LED_OFFSET_LENGTH,loopcnt
+	copy regc,contr
+	copy regb,contw
+	branch memcpy_fast
+
+
+
+ui_led_dispatch:
+	fetch 1,mem_ui_led_struct_num
+	rtn blank
+	arg 0,rega
+ui_led_blink_polling:
+	call ui_led_change_style_by_type
+	increase 1,rega
+	fetch 1,mem_ui_led_struct_num
+	isub rega,null
+	rtn zero
+	branch ui_led_blink_polling
+
+
+ui_led_off_static:
+	add regb,LED_OFFSET_LED_GPIO,regc
+	ifetcht 1,regc
+	fetch 1,mem_device_option
+	beq dvc_op_mouse,mouse_ui_led_off_static
+	branch gpio_out_inactive
+
+
+ui_led_on_static:
+	add regb,LED_OFFSET_LED_GPIO,regc
+	ifetcht 1,regc
+	fetch 1,mem_device_option
+	beq dvc_op_mouse,mouse_ui_led_on_static
+	branch gpio_out_active
+
+
+//input:rega :struct number
+ui_led_change_style_by_type:
+	add rega,ui_led_blink,queue
+	call timer_check
+	nrtn blank			//timer out
+	
+	call calc_curr_struct_prt
+
+	ifetch 1,regb			//led type
+
+	beq UI_LED_STATE_LIGHTING,ui_led_on_static
+	beq UI_LED_STATE_DARKING,ui_led_off_static
+	beq UI_LED_STATE_BLINK_STOP,ui_led_off_static
+	beq UI_LED_STATE_BLINK_DARKING,ui_led_blink_state_darking
+ui_led_blink_state_lighting:
+	call ui_led_on_static
+	add regb,LED_OFFSET_CB_LEDON,regc
+	call push_stack
+	ifetch 2,regc
+	call callback_func
+	call pop_stack
+	setarg UI_LED_STATE_BLINK_DARKING
+	istore 1,regb
+	add regb,LED_OFFSET_ON_TIME,regc
+	ifetch 2,regc
+	branch ui_led_blink_timer_start
+	
+
+ui_led_blink_state_darking:
+	call ui_led_off_static
+	add regb,LED_OFFSET_CB_LEDOFF,regc
+	call push_stack
+	ifetch 2,regc
+	call callback_func
+	call pop_stack
+	
+	add regb,LED_OFFSET_BLINK_COUNT,regc
+	ifetch 1,regc
+	beq LED_INFINITE_FLASH_NUM,ui_led_blink_infinite
+	increase -1,pdata
+	istore 1,regc
+	branch ui_led_blink_stop_global,blank		//End of flicker
+ui_led_blink_infinite:
+	setarg UI_LED_STATE_BLINK_LIGHTING
+	istore 1,regb
+	add regb,LED_OFFSET_OFF_TIME,regc
+	ifetch 2,regc
+ui_led_blink_timer_start:
+	add rega,ui_led_blink,queue
+	branch timer_init
+
+ui_led_stop_timer:
+	setarg 0
+	branch ui_led_blink_timer_start
+
+/***********************ui led function ending****************************/
+
+
+
+ui_timer_timeout:
+	setarg 0x1000
+	lshift16 pdata,pdata
+	iadd regb,regb
+	rtn
+	
+ui_timer_check:
+	bpatch patch16_0,mem_patch16
+	arg 0,rega
+	fetcht 4,mem_ui_timer_last_btclk
+	copy clkn_bt,regb
+	copy regb,pdata
+	isub temp,null
+	ncall ui_timer_timeout,positive
+ui_timer_check_loop:
+	copy regb,pdata
+	increase 160,temp    //320btclk = 100ms
+	increase 160,temp
+	isub temp,null
+	nbranch ui_timer_check_end,positive
+	increase 1,rega   //increase 1 every 100ms count
+	and rega,0x0f,pdata
+	nbranch ui_timer_check_loop,blank
+	arg 0,rega  //reset timer if it's longer than 1.5s between 2 checks
+	call ui_timer_check_send_evt
+ui_timer_init:
+	copy clkn_bt,pdata
+	store 4,mem_ui_timer_last_btclk
+	rtn
+ui_timer_check_end:
+	copy rega,pdata
+	rtn blank
+	increase -160,temp    //320btclk = 100ms
+	increase -160,temp
+	set0 28,temp
+	storet 4,mem_ui_timer_last_btclk
+ui_timer_check_send_evt:
+	branch app_evt_timer
+
+	
+
+//**********************************************************//
+//************UI Inter-Processor Communication*******//
+//**********************************************************//
+ui_ipc_get_lock:
+	jam 1,mem_ipc_lock_bt
+ui_ipc_get_lock_wait:
+	fetch 1,mem_ipc_lock_c51
+	nbranch ui_ipc_get_lock_wait,blank
+	rtn
+	
+ui_ipc_put_lock:
+	jam 0,mem_ipc_lock_bt
+	rtn
+	
+
+	
+ui_ipc_send_event:
+	bpatch patch16_1,mem_patch16
+	call ui_ipc_get_lock
+	copy rega,pdata
+	store 4,mem_rega
+	arg mem_ipc_fifo_bt2c51,rega
+	call fifo_in
+	fetch 4,mem_rega
+	copy pdata,rega
+	branch ui_ipc_put_lock
+
+ui_ipc_send_cmd:
+	bpatch patch16_2,mem_patch16
+	call ui_ipc_get_lock
+	copy rega,pdata
+	store 4,mem_rega	
+	arg mem_ipc_fifo_c512bt,rega
+	call fifo_in
+	fetch 4,mem_rega
+	copy pdata,rega	
+	branch ui_ipc_put_lock
+
+ui_ipc_clean_all_fifo:
+	setarg 0
+	store UTIL_FIFO_LEN,mem_ipc_fifo_c512bt
+	store UTIL_FIFO_LEN,mem_ipc_fifo_bt2c51
+	rtn
+	
+check_51cmd:
+	bpatch patch16_3,mem_patch16
+	fetch 1,mem_hci_cmd
+	nrtn blank
+	arg mem_ipc_fifo_c512bt,rega
+	call fifo_is_empty
+	rtn blank
+	jam IPC_CONTINUE_PROCESS,mem_ipc_skip_continue_proc
+	call check_51cmd_once
+	fetch 1,mem_ipc_skip_continue_proc
+	branch check_51cmd,blank
+	rtn
+
+check_51cmd_once:
+	call ui_ipc_get_lock
+	arg mem_ipc_fifo_c512bt,rega
+	call fifo_out
+	copy pdata,temp
+	call ui_ipc_put_lock
+	bpatch patch16_4,mem_patch16
+	copy temp,pdata
+	rtn blank
+	beq BT_CMD_START_ADV,check_51cmd_adv
+	beq BT_CMD_STOP_ADV,check_51cmd_stop_adv
+	beq BT_CMD_START_DIRECT_ADV,check_51cmd_direct_adv
+	beq BT_CMD_STOP_DIRECT_ADV,check_51cmd_stop_direct_adv
+	beq BT_CMD_LED_OFF,check_51cmd_led_off
+	beq BT_CMD_LED_ON,check_51cmd_led_on
+	beq BT_CMD_LED_BLINK,check_51cmd_led_start_blink
+	beq BT_CMD_LE_START_CONN,check_51cmd_le_start_con
+	beq BT_CMD_LE_START_SCAN,check_51cmd_start_scan
+	beq BT_CMD_LE_STOP_SCAN,check_51cmd_stop_scan
+	beq BT_CMD_ENTER_HIBERNATE,check_51cmd_hibernate
+	//context related, process in context
+	store 1,mem_fifo_temp
+//	call lmo_fifo_check
+//	nbranch check_51cmd_restore,blank  //process this cmd next time while lmo fifo is full
+check_51cmd_once_continue:
+	fetch 1,mem_fifo_temp
+	bmark0 mark_context,check_51cmd_check_idle
+	bpatch patch16_5,mem_patch16
+	fetch 1,mem_fifo_temp
+	beq BT_CMD_LE_DISCONNECT,check_51cmd_le_disconnect
+	beq BT_CMD_LE_SMP_SECURITY_REQUEST,check_51cmd_le_smp_sec_req
+	beq BT_CMD_LE_UPDATE_CONN,check_51cmd_ble_update_connect_param
+	beq BT_CMD_STORE_RECONN_INFO_LE,eeprom_store_le_reconn_info
+	rtn
+
+check_51cmd_check_idle:
+	store 1,mem_fifo_temp
+  	call context_check_idle
+	branch check_51cmd_restore,zero
+	call context_search_plap
+	nrtn zero
+check_51cmd_restore:
+	jam IPC_SKIP_CONTINUE_PROCESS,mem_ipc_skip_continue_proc
+	branch ui_ipc_send_cmd
+
+  
+ /******************** 51COMMAND*********************/
+
+
+//command opcode 0x13
+check_51cmd_adv:
+	jam ON,mem_le_adv_enable
+	jam ADV_IND,mem_le_adv_type
+	fetch 2,mem_ui_state_map
+	set1 UI_STATE_BLE_ADV,pdata
+	store 2,mem_ui_state_map
+	rtn
+
+
+//command opcode 0x14
+check_51cmd_stop_adv:
+	fetch 2,mem_ui_state_map
+	set0 UI_STATE_BLE_ADV,pdata
+	store 2,mem_ui_state_map
+	jam OFF,mem_le_adv_enable
+	rtn
+
+
+//command opcode 0x15
+check_51cmd_direct_adv:
+	jam ON,mem_le_adv_enable
+	jam ADV_DIRECT_IND,mem_le_adv_type
+	fetch 2,mem_ui_state_map
+	set1 UI_STATE_BLE_ADV,pdata
+	store 2,mem_ui_state_map
+	rtn
+
+
+//command opcode 0x16
+check_51cmd_stop_direct_adv:
+	fetch 2,mem_ui_state_map
+	set0 UI_STATE_BLE_ADV,pdata
+	store 2,mem_ui_state_map
+	jam OFF,mem_le_adv_enable
+	rtn
+
+
+//command opcode 0x17
+check_51cmd_le_disconnect:
+	setarg 20 // 100ms
+	store 2,mem_le_superto
+	store 2,mem_le_init_superto
+	branch le_send_terminate_ind_user_terminated
+
+
+//command opcode 0x18
+check_51cmd_ble_update_connect_param:
+	branch le_l2cap_tx_update_req
+
+
+//command opcode 19
+check_51cmd_led_off:
+	arg 0,rega
+	branch ui_led_off_global
+
+
+//command opcode 20
+check_51cmd_led_on:
+	arg 0,rega
+	branch ui_led_on_global
+
+
+//command opcode 21
+check_51cmd_led_start_blink:
+	arg 0,rega
+	call calc_curr_struct_prt
+	ifetch 1,regb
+	beq UI_LED_STATE_BLINK_START,check_51cmd_led_start_blink_in_blink
+	beq UI_LED_STATE_BLINK_LIGHTING,check_51cmd_led_start_blink_in_blink
+	beq UI_LED_STATE_BLINK_DARKING,check_51cmd_led_start_blink_in_blink
+	branch ui_led_blink_start_global
+
+check_51cmd_led_start_blink_in_blink:
+	ifetch 1,contr
+	rtneq LED_INFINITE_FLASH_NUM
+	branch ui_led_blink_start_global
+
+
+//command opcode 0x22
+check_51cmd_le_start_con:
+	jam ON,mem_le_scan_enable
+	jam hci_cmd_le_create_conn,mem_hci_cmd
+//	fetch 6,mem_app_peer_addr
+//	store 6,mem_le_conn_peer_addr
+	rtn
+
+
+//command opcode 0x23
+check_51cmd_start_scan:
+	jam ON,mem_le_scan_enable
+	rtn
+
+
+//command opcode 0x24
+check_51cmd_stop_scan:
+	jam OFF,mem_le_scan_enable
+	jam 0,mem_hci_cmd
+	rtn
+
+
+//command opcode 0x25
+check_51cmd_hibernate:
+	fetch 2,mem_cb_before_hibernate
+	call callback_func
+	fetch 1,mem_ui_button_gpio
+	beq UI_BUTTON_GPIO_DISABLE,check_51cmd_hibernate_btn_disabled
+	copy pdata,temp
+	call gpio_config_input
+check_51cmd_hibernate_btn_disabled:
+	call ui_ipc_clean_all_fifo
+	branch lpm_hibernate	
+
+
+//command opcode 0x27
+check_51cmd_le_smp_sec_req:
+	branch le_send_smp_security_request
+
+
+
+
+ui_check_paring_button:
+	fetch 1,mem_ui_state_map
+	rtnbit0 UI_STATE_BTN_DOWN
+	rtn
+
+
+
+///////////queue function////////////
+queue_init:
+	fetch 2,mem_queue_ptr
+	add pdata,QUEUE_OFFSET_CURR_NUM,contw
+	setarg 0
+	istore 3,contw
+	rtn
+	
+//input:rega:the address of the data to which you want to input queue
+//output:if user is disable,mean queue no have space
+queue_push:
+	bpatch patch16_6,mem_patch16
+	call disable_user
+	call queue_full
+	rtn blank
+	fetch 2,mem_queue_ptr
+	add pdata,QUEUE_OFFSET_CURR_NUM,regb
+	ifetcht 1,regb
+	increase 1,temp
+	istoret 1,regb	//number add 
+	
+	ifetcht 1,pdata	//temp:each length
+	copy temp,loopcnt
+	add pdata,QUEUE_OFFSET_WRITE_PTR,regb
+	ifetch 1,regb
+	imul32 temp,pdata	//offset
+	iadd contr,contw
+	copy rega,contr
+calc_queue_next_ptr:
+	call memcpy
+	call queue_get_size
+	pincrease -1
+	ifetcht 1,regb
+	increase 1,temp
+	iand temp,temp
+	istoret 1,regb
+	branch enable_user
+
+
+//input:rega:the address of the data to which you want to output queue
+//output:if user is disable,mean queue no have data
+queue_pop:
+	bpatch patch16_7,mem_patch16
+	call disable_user
+	call queue_empty
+	rtn blank
+	fetch 2,mem_queue_ptr
+	add pdata,QUEUE_OFFSET_CURR_NUM,regb
+	ifetcht 1,regb
+	increase -1,temp
+	istoret 1,regb
+	ifetcht 1,pdata		//each size
+	copy temp,loopcnt
+	add pdata,QUEUE_OFFSET_READ_PTR,regb
+	ifetch 1,regb
+	imul32 temp,pdata	//offset
+	iadd contr,contr
+	increase 1,contr
+	copy rega,contw
+	branch calc_queue_next_ptr
+
+
+//function:no pop element,only copy element in rega
+//input:rega:the address of the data to which you want to output queue
+//output:if user is disable,mean queue no have data
+//regb is new ptr
+queue_get_new_ele:
+	call disable_user
+	call queue_empty
+	rtn blank
+	fetch 2,mem_queue_ptr
+	ifetcht 1,pdata		//each size
+	copy temp,loopcnt
+	add pdata,QUEUE_OFFSET_READ_PTR,regb
+	ifetch 1,regb
+	imul32 temp,pdata	//offset
+	iadd contr,contr
+	increase 1,contr
+	copy contr,regb
+	copy rega,contw
+	call memcpy
+	branch enable_user
+
+queue_store_new_ele:
+	call disable_user
+	call queue_empty
+	rtn blank
+	fetch 2,mem_queue_ptr
+	ifetcht 1,pdata		//each size
+	copy temp,loopcnt
+	add pdata,QUEUE_OFFSET_READ_PTR,regb
+	ifetch 1,regb
+	imul32 temp,pdata	//offset
+	iadd contr,contr
+	add contr,2,contw
+	copy rega,contr
+	increase -1,loopcnt
+	call memcpy
+	branch enable_user
+
+//output:if blank is 1,mean queue is empty
+queue_empty:
+	fetch 2,mem_queue_ptr
+	add pdata,QUEUE_OFFSET_CURR_NUM,contr
+	ifetch 1,contr
+	rtn
+
+//output:if blank is 1,mean queue is full
+queue_full:
+	call queue_get_size
+	ifetcht 1,contr
+	isub temp,pdata
+	rtn
+
+//output:pdata is queue size
+queue_get_size:
+	fetch 2,mem_queue_ptr
+	add pdata,QUEUE_OFFSET_LENGTH,contr
+	ifetch 1,contr
+	rtn
+
+///////////queue function end////////////
+
+
+
+
Index: program/usb.prog
===================================================================
--- /branch/usb/usb_public_base/program/usb.prog	(revision 0)
+++ /branch/usb/usb_public_base/program/usb.prog	(working copy)
@@ -0,0 +1,1084 @@
+ ifdef COMPILE_USB
+
+usb_isr:
+	bpatch patch17_0,mem_patch17
+	fetch 1,core_usb_status
+	isolate1 USB_STATUS_RESET,pdata
+	call usb_init,true
+	fetch 1,core_usb_status
+	store 1,core_usb_status
+	store 1,mem_usb_status
+	call usb_nak_state_judge
+	call usb_rx
+	call usb0_tx
+	call usb_tx
+	branch usb_nak_state
+
+usb_init:
+	bpatch patch17_1,mem_patch17
+	call enable_authrom
+	call usb_init_param
+	jam 0x00,core_usb_config
+ifdef SIM
+	nop 10
+else
+	nop 10000
+endif
+	jam 0xc0,core_usb_trig
+	fetch 2,core_clkoff
+	set0 CLOCK_OFF_USB,pdata
+	store 2,core_clkoff
+	jam 0x0,core_usb_hmode
+	jam 0x3c,core_usb_config
+	setarg mem_usb_rxbuf
+	store 2,core_usb_rx_saddr
+	store 2,core_usb_rxptr
+	setarg mem_usb_rxbuf_end
+	store 2,core_usb_rx_eaddr
+	jam 0x4,core_usb_hmode
+	jam 0,core_usb_addr
+	jam 0xff,core_usb_status
+	setarg mem_usb_clear_mem_end
+	arg mem_usb_clear_mem_start,contw
+	isub contw,loopcnt
+	branch clear_mem
+	
+usb_offline_check_init:
+	fetcht 1,mem_usb_offline_check_gpio
+	branch gpio_config_input
+usb_offline_state:
+	fetch 1,mem_usb_device_enumeration_endflag
+	rtn blank
+	fetcht 1,mem_usb_offline_check_gpio
+	call gpio_get_bit
+	branch usb_init,true
+	rtn
+
+usb_init_param:
+	jam DEV_DEFAULT,mem_usb0_state
+	setarg 0x0
+	store 1,mem_remain
+	store 2,mem_usb_zero_packet
+	pincrease 1
+	store 2,mem_usb_ones_packet
+	pincrease 1
+	store 2,mem_usb_two_packet
+	arg mem_string0,contw
+	setarg 0x030404
+	istore 3,contw
+	setarg 0x0409
+	istore 2,contw
+	arg mem_string1,contw
+	setsect 0,0x15906
+	setsect 1,0x210d2
+	setsect 2,0x10494
+	setsect 3,0x1
+	istore 9,contw
+	arg mem_string2,contw
+	setsect 0,0x1570f
+	setsect 1,0x15c9a
+	setsect 2,0x256c6
+	setsect 3,0x1cdcd
+	istore 9,contw
+	setsect 0,0x14420
+	setsect 1,0x25d99
+	setsect 2,0x25636
+	setsect 3,0x1
+	istore 7,contw
+	arg mem_string3,contw
+	setsect 0,0x1620a
+	setsect 1,0xc8c
+	setsect 2,0x30333
+	setsect 3,0xc0c0
+	istore 9,contw
+	setsect 0,0x3130
+	istore 2,contw
+	setarg USB_KBDATA_VENDOR_DEFINE_ADDR
+	store 2,mem_hidreportdesc_kb
+	setarg USB_MSDATA_ADDR
+	store 2,mem_hidreportdesc_m
+	arg USB_DEVICEDATA_ADDR,contr
+	arg mem_devicedesc,contw
+	arg 19,loopcnt
+	call memcpy	
+	arg USB_CONFDATA_ADDR,contr
+	arg mem_confdesc,contw
+	arg 60,loopcnt
+	call memcpy
+usb_config_cb:
+	fetch 2,mem_cb_usb_config
+	branch callback_func
+
+usb_tx_interval_config:
+	fetch 1,mem_usb_tx_interval
+	rtn blank
+	store 1,mem_confdesc+34
+	store 1,mem_confdesc+59
+	rtn
+
+usb_nak_state:
+	arg USB_TIMER_NAK,queue
+	call timer_check
+	nrtn blank
+	fetch 1 ,mem_usb_wakestate_onetime_flag
+	nrtn blank
+	fetch 1,mem_usb_device_enumeration_endflag
+	ncall usb_mac_wakeup_judge,blank
+	rtn
+
+usb_nak_state_judge:
+	fetch 1,mem_usb_status
+	bbit1 USB_STATUS_NAK,usb_nak_state_timer_init
+	rtn
+	
+usb_nak_state_timer_init:
+	call usb0_attached_state_judge
+	call timer_reinit
+	setarg TIMER_NAK_DELAY
+	arg USB_TIMER_NAK,queue
+	branch timer_init
+	
+usb0_attached_state_judge:
+	fetch 1,mem_usb_state
+	bne USB_CONNECTED,usb_clear_halt_dispose
+	jam 0,mem_usb_wakestate_onetime_flag
+	jam 0,mem_usb_mac_wakeup_trig
+	rtn
+
+usb_clear_halt_dispose:
+	fetch 1,mem_usb_clear_halt
+	rtn blank
+	jam 0,mem_usb_clear_halt
+	jam USB_CONNECTED,mem_usb_state
+	jam 1,mem_usb_device_enumeration_endflag
+	rtn
+
+usb_rx_no_data:
+	fetch 1,mem_usb_status
+	bbit1 USB_STATUS_SETUP,usb_class_type
+	rtn
+
+usb_rx_data:
+	fetch 1,core_usb_txbusy
+	rtnbit1 USB_STATUS_RXEMPTY
+	fetchr contus,2,core_usb_rx_saddr
+	fetchr contue,2,core_usb_rx_eaddr
+	fetchr contu,2,core_usb_rxptr
+	ifetch 2,contu
+	rshift8 pdata,temp
+	rshift4 temp,temp					// temp is endpoint
+	arg 0xfff,contr
+	iand contr,loopcnt
+	copy loopcnt,rega
+usb_rx_read:
+	ifetch 1,contu
+	istore 1,contw
+	loop usb_rx_read
+	storer contu,2,core_usb_rxptr
+	storer rega,2,mem_usb_read_len
+	rtn
+usb_data_rx:
+	rtn 
+
+usb_rx:
+	bpatch patch17_2,mem_patch17
+	fetch 1,mem_usb_status
+	rtnbit0 USB_STATUS_RXREADY
+	arg mem_usb_setup,contw
+	call usb_rx_data
+	copy temp,pdata
+	beq 0,usb0_rx
+	branch usb_data_rx
+usb0_rx:
+	fetch 1,mem_usb_read_len
+	beq 0x00,usb_rx_no_data
+	beq 0x01,usb_out_one_byte	// HUAWEI pad led status	
+	sub pdata,7,null
+	rtn positive
+usb_class_type:
+	bpatch patch17_3,mem_patch17
+	set0 mark_isstr,mark
+	fetch 1,mem_usb_setup_bmRequestType
+	and_into 0x80,pdata
+	beq IN_DEVICE,usb_in_device
+	beq OUT_DEVICE,usb_out_device
+	branch assert
+
+usb_out_one_byte:
+	fetch 1,mem_usb_setup
+	rtnbit1 7	// OUT_DEVICE
+	call usb_get_led_status
+	branch usb0_reply_zerolen
+
+
+usb_in_device:
+	fetch 1,mem_usb_setup_bmRequestType
+	rshift4 pdata,pdata
+	rshift pdata,pdata
+	and_into 0x03,pdata
+	beq STANDARD_REQ,usb_in_standard_req
+	beq CLASS_REQ,usb_in_class_req
+	beq MANUFACTURER_REQ,usb_in_manufacturer_req
+	branch assert
+
+usb_out_device:
+	fetch 1,mem_usb_setup_bmRequestType
+	rshift4 pdata,pdata
+	rshift pdata,pdata
+	and_into 0x03,pdata
+	beq STANDARD_REQ,usb_out_standard_req
+	beq CLASS_REQ,usb_out_class_req	
+	beq MANUFACTURER_REQ,usb_out_manufacturer_req
+	branch assert
+
+usb_in_standard_req:
+	fetch 1,mem_usb_setup_bRequest
+	beq GET_CONFIGURATION,usb0_request_get_configuration
+	beq GET_DESCRIPTOR,usb0_request_get_descriptor
+	beq GET_INTERFACE,usb0_request_get_interface
+	beq GET_STATUS,usb0_request_get_status
+	branch usb0_force_stall
+
+usb_in_class_req:
+	fetch 1,mem_usb_setup_bRequest
+	beq GET_IDLE,usb_get_idle
+	beq GET_REPORT,usb_get_report
+	beq GET_PROTOCOL,usb_get_protocol_req
+	branch usb0_force_stall
+
+usb_in_manufacturer_req:
+	branch usb0_force_stall
+
+usb_out_standard_req:
+	fetch 1,mem_usb_setup_bRequest
+	beq CLEAR_FEATURE,usb0_request_clear_feature
+	beq SET_FEATURE,usb0_request_set_feature
+	beq SET_ADDRESS,usb0_request_set_address
+	beq SET_CONFIGURATION,usb0_request_set_configuration
+	beq SET_INTERFACE,usb0_request_set_interface
+	beq SET_DESCRIPTOR,usb0_force_stall
+	branch usb0_force_stall
+
+usb_out_class_req:
+	fetch 1,mem_usb_setup_bRequest
+	beq SET_IDLE,usb_set_idle
+	beq SET_REPORT,usb_set_report
+	beq SET_PROTOCOL,usb_set_protocol_req
+	branch usb0_force_stall
+
+usb_out_manufacturer_req:
+	branch usb0_force_stall
+
+usb0_force_stall:
+	bpatch patch17_4,mem_patch17
+	fetch 1,core_usb_stall
+	set1 0,pdata
+	store 1,core_usb_stall
+	branch usb0_reply_zerolen
+	
+usb0_reply_zerolen:
+	jam 0x10,core_usb_trig
+	rtn
+
+usb0_request_get_configuration:
+	fetch 1,mem_usb_setup_bmRequestType
+	bne IN_DEVICE,usb0_force_stall
+	fetch 1,mem_usb_setup_wIndex
+	bne 0,usb0_force_stall
+	fetch 1,mem_usb_setup_wIndex+1
+	bne 0,usb0_force_stall
+	fetch 1,mem_usb_setup_bLength
+	bne 1,usb0_force_stall
+	fetch 1,mem_usb_setup_bLengthH
+	bne 0,usb0_force_stall
+	fetch 1,mem_usb_setup_bValue
+	bne 0,usb0_force_stall
+	fetch 1,mem_usb_setup_bValue+1
+	bne 0,usb0_force_stall
+	fetch 1,mem_usb0_state
+	beq DEV_CONFIGURED,usb0_request_get_cfg_dev_cfg
+	beq DEV_ADDRESS,usb0_request_get_cfg_dev_addr
+	branch usb0_force_stall
+//Return current config : 1
+usb0_request_get_cfg_dev_cfg:
+	arg 1,regb
+	branch usb_send_ones_packet
+//Config do not work, return default config : 0
+usb0_request_get_cfg_dev_addr:
+	arg 1,regb
+	branch usb_send_zero_packet
+
+usb0_request_get_descriptor:
+	bpatch patch17_5,mem_patch17
+//	set0 mark_isstr,mark
+	fetch 1,mem_usb_setup_bValueH
+	beq DSC_DEVICE,dsc_device_info
+	beq DSC_CONFIG,dsc_config_info	
+	beq DSC_STRING,dsc_string_info
+	beq DSC_HID,dsc_hid_info
+	beq DSC_HID_REPORT,dsc_hid_report_info
+	branch usb0_force_stall
+
+dsc_hid_info:
+	jam 0,mem_usb_get_protocol_flag
+	fetch 1,mem_usb_setup_wIndex
+	beq 0,dsc_hid_info_interface0
+	beq 1,dsc_hid_info_interface1
+	branch usb0_force_stall
+//class_descriptor hid_descriptor--keyboard 
+dsc_hid_info_interface0:
+	fetchr regb,1,mem_confdesc+19
+	arg mem_confdesc+19,rega
+	branch usb0_respond
+//class_descriptor hid_descriptor--mouse 
+dsc_hid_info_interface1:
+	fetchr regb,1,mem_confdesc+44
+	arg mem_confdesc+44,rega
+	branch usb0_respond
+
+dsc_device_info:
+//input : pdata : data poniter 
+//input : temp: data len
+//sets the data pointer and len to correct descriptor
+	fetch 1,mem_usb_set_high_addr_flag
+	ncall usb_set_high_addr,blank
+	setarg mem_devicedesc
+	fetcht 1,mem_devicedesc
+dsc_info_set_data_len:
+	store 2,mem_dsc_info_data_pointer
+	storet 1,mem_dsc_info_len
+	fetch 1,mem_usb_setup_bLength
+	isub temp,null
+	nbranch dsc_info_set_current_data_len,positive
+dsc_info_set_initial_data_len:
+	fetch 1,mem_dsc_info_len
+dsc_info_set_data_size_completed:	
+	iforce regb
+	fetch 2,mem_dsc_info_data_pointer
+	add pdata,1,pdata
+	iforce rega
+	branch usb0_respond
+dsc_info_set_current_data_len:
+	fetch 1,mem_usb_setup_bLength
+	branch dsc_info_set_data_size_completed
+
+usb_set_high_addr:
+	fetch 1,core_usb_addr
+	ncall usb0_set_addr,blank
+	jam 0,mem_usb_set_high_addr_flag
+	rtn
+usb0_set_addr:
+	fetch 1,core_usb_addr
+   	set1 7,pdata
+    	store 1,core_usb_addr
+    	rtn
+
+dsc_config_info:
+	setarg mem_confdesc
+	fetcht 1,mem_confdesc
+	branch dsc_info_set_data_len
+
+dsc_string_info:
+	fetch 1,mem_usb_setup_bValue
+	sub pdata,3,null
+	nbranch usb0_force_stall,positive
+	fetch 1,mem_usb_setup_bValue
+	arg mem_string0,rega
+	beq 0,usb0_respond_length	
+	set1 mark_isstr,mark
+	arg mem_string1,rega
+	beq 1,usb0_respond_length
+	arg mem_string2,rega
+	beq 2,usb0_respond_length
+	arg mem_string3,rega
+	beq 3,usb0_respond_length
+	rtn
+
+dsc_hid_report_info:
+	fetch 2,mem_usb_setup_wIndex
+	beq 1,dsc_hid_report_info0
+	fetchr rega,2,mem_hidreportdesc_kb
+	branch usb0_respond_length
+dsc_hid_report_info0:
+	jam 1,mem_usb_device_enumeration_endflag
+	jam USB_GOT_REPORT_REQ,mem_usb_state
+	fetchr rega,2,mem_hidreportdesc_m
+	branch usb0_respond_length
+
+
+usb0_request_get_interface:
+	fetch 1,mem_usb0_state
+	bne DEV_CONFIGURED,usb0_force_stall		
+	fetch 1,mem_usb_setup_bmRequestType
+	bne IN_INTERFACE,usb0_force_stall
+	fetch 1,mem_usb_setup_bValue
+	bne 0,usb0_force_stall
+	fetch 1,mem_usb_setup_bValueH
+	bne 0,usb0_force_stall
+	fetch 1,mem_usb_setup_bLength
+	bne 1,usb0_force_stall
+	fetch 1,mem_usb_setup_bLengthH
+	bne 0,usb0_force_stall
+	fetch 1,mem_usb_setup_wIndex
+	bne 0,usb0_force_stall
+	fetch 1,mem_usb_setup_wIndex+1
+	bne 0,usb0_force_stall
+	arg 1,regb
+	branch usb_send_zero_packet
+
+
+usb0_request_get_status:
+	fetch 1,mem_usb0_state
+	beq DEV_DEFAULT,usb0_force_stall
+	fetch 1,mem_usb_setup_bValue
+	bne 0,usb0_force_stall
+	fetch 1,mem_usb_setup_bValueH
+	bne 0,usb0_force_stall
+	fetch 1,mem_usb_setup_bLength
+	bne 2,usb0_force_stall
+	fetch 1,mem_usb_setup_bLengthH
+	bne 0,usb0_force_stall
+	fetch 1,mem_usb_setup_wIndex+1
+	bne 0,usb0_force_stall
+	fetch 1,mem_usb_setup_bmRequestType
+	beq IN_DEVICE,usb0_get_status_in_device
+	beq IN_INTERFACE,usb0_get_status_in_interface
+	beq IN_ENDPOINT,usb0_get_status_in_endpoint
+	branch usb0_force_stall
+
+
+Usb0_SDsystem_dispose:
+	jam 1,mem_sdsystem_wakeup_flag
+	branch usb_send_two_packet
+
+usb0_get_status_in_device:
+	fetch 1,mem_usb_setup_wIndex
+	bne 0,usb0_force_stall
+	arg 2,regb
+	fetch 1,mem_usb_remote_wakeup
+	beq 0x01,Usb0_SDsystem_dispose
+//regb:length
+usb_send_zero_packet:
+	arg mem_usb_zero_packet,rega
+	branch usb0_respond
+usb_send_ones_packet:
+	arg mem_usb_ones_packet,rega
+	branch usb0_respond
+usb_send_two_packet:
+	arg mem_usb_two_packet,rega
+	branch usb0_respond
+
+usb0_get_status_in_interface:
+	fetch 1,mem_usb0_state
+	bne DEV_CONFIGURED,usb0_force_stall
+	arg 2,regb
+	branch usb_send_zero_packet
+
+usb0_get_status_in_endpoint:
+	fetch 1,mem_usb0_state
+	bne DEV_CONFIGURED,usb0_force_stall
+	fetch 1,mem_usb_setup_wIndex
+	beq IN_EP1,usb0_get_status_in_ep_in_ep1
+	beq IN_EP2,usb0_get_status_in_ep_in_ep2
+	beq IN_EP3,usb0_get_status_in_ep_in_ep3
+	and_into 0x7f,pdata
+	beq 0x00,usb0_get_status_in_ep_in_ep0
+	branch usb0_force_stall
+	
+usb0_get_status_in_ep_in_ep0:
+	fetch 1,mem_usb_ep0_stall_status
+usb0_get_status_in_ep_in_ack:
+	arg 2,regb
+	beq 1,usb_send_ones_packet
+	branch usb_send_zero_packet
+usb0_get_status_in_ep_in_ep1:
+	fetch 1,mem_usb_ep1_stall_status
+	branch usb0_get_status_in_ep_in_ack
+usb0_get_status_in_ep_in_ep2:
+	fetch 1,mem_usb_ep2_stall_status
+	branch usb0_get_status_in_ep_in_ack
+usb0_get_status_in_ep_in_ep3:
+	fetch 1,mem_usb_ep3_stall_status
+	branch usb0_get_status_in_ep_in_ack
+
+usb_get_idle:
+	jam 1,mem_usb_idle_flag
+	arg mem_usb_idle_rate,rega
+	arg 1,regb
+	branch usb0_respond
+
+usb_get_report:
+	fetch 2,mem_usb_setup_bValue
+	arg PC_GET_REPORT,temp
+	isub temp,null
+	nbranch usb0_force_stall,zero
+//	set0 mark_isstr,mark
+usb_get_report_dispose:	
+	fetch 1,mem_usb0_data_ready_report
+	nbranch usb_get_report_data_success,blank
+	jam PC_GET_NONDATA,mem_usb0_get_report_data
+usb_get_report_send_data:
+	fetch 1,mem_usb_setup_bLength
+	iforce regb
+	arg mem_usb0_get_report_data,rega
+	call usb0_respond
+usb_get_report_data_release:	
+	arg mem_usb0_get_report_data,contw
+	arg 8,loopcnt
+	branch memset0
+usb_get_report_data_success:
+	jam 0,mem_usb0_data_ready_report
+	jam PC_GET_DATA,mem_usb0_get_report_data
+	branch usb_get_report_send_data
+
+usb_get_protocol_req:
+	fetch 1,mem_usb_setup_bLength
+	bne 1,usb0_force_stall
+	jam 1,mem_usb_get_protocol_flag
+	arg 1,regb //length
+	fetch 1,mem_usb_set_protocol_value
+	beq 0,usb_get_report_protocol
+	beq 1,usb_get_boot_protocol
+	branch usb_send_zero_packet
+usb_get_report_protocol:
+	branch usb_send_ones_packet
+usb_get_boot_protocol:
+	branch usb_send_zero_packet
+
+
+
+//in device
+usb0_request_clear_feature:
+	fetch 1,mem_usb0_state
+	bne DEV_CONFIGURED,usb0_force_stall
+	fetch 1,mem_usb_setup_bLength
+	bne 0,usb0_force_stall
+	fetch 1,mem_usb_setup_bLengthH
+	bne 0,usb0_force_stall
+	fetch 1,mem_usb_setup_bValueH
+	bne 0,usb0_force_stall
+	fetch 1,mem_usb_setup_wIndex+1
+	bne 0,usb0_force_stall
+	fetch 1,mem_usb_setup_bmRequestType
+	beq OUT_DEVICE,usb0_request_clear_feature_out_device
+	beq OUT_INTERFACE,usb0_request_clear_feature_out_interface
+	beq OUT_ENDPOINT,usb0_request_clear_feature_out_endpoint
+	branch usb0_force_stall
+
+usb0_request_clear_feature_out_device:
+	fetch 1,mem_usb_setup_bValue
+	bne DEVICE_REMOTE_WAKEUP,usb0_force_stall
+	fetch 1,core_usb_config
+	set0 7,pdata
+	store 1,core_usb_config
+	jam 0,mem_usb_remote_wakeup
+	jam 1,mem_usb_clear_remote_wakeup
+	fetch 1,mem_sdsystem_wakeup_flag
+	branch usb0_reply_zerolen,blank
+	jam 0,mem_sdsystem_wakeup_flag
+	jam 0,mem_usb_clear_remote_wakeup
+	jam USB_CONNECTED,mem_usb_state
+	branch usb0_reply_zerolen
+
+usb0_request_clear_feature_out_interface:
+	branch usb0_force_stall
+
+usb0_request_clear_feature_out_endpoint:
+	fetch 1,mem_usb_setup_bValue
+	bne ENDPOINT_HALT,usb0_force_stall
+	fetch 1,mem_usb_setup_wIndex
+	beq IN_EP1,usb0_force_stall_ep1_in_off
+	beq IN_EP2,usb0_force_stall_ep2_in_off
+	beq IN_EP3,usb0_force_stall_ep3_in_off
+	and_into 0x7f,pdata
+	beq 0x00,usb0_force_stall_ep0_in_off
+	branch usb0_force_stall
+
+usb0_force_stall_ep0_in_off:
+	jam 0,mem_usb_ep0_stall_status
+	branch usb0_reply_zerolen
+usb0_force_stall_ep1_in_off:
+	jam 0,mem_usb_ep1_stall_status
+usb0_force_stall_ep1_in_off_reply:	
+	jam 1,mem_usb_clear_halt
+	branch usb0_reply_zerolen
+usb0_force_stall_ep2_in_off:
+	jam 0,mem_usb_ep2_stall_status
+	branch usb0_force_stall_ep1_in_off_reply
+usb0_force_stall_ep3_in_off:
+	jam 0,mem_usb_ep3_stall_status
+	branch usb0_force_stall_ep1_in_off_reply
+
+
+usb0_request_set_feature:
+	fetch 1,mem_usb_setup_bLength
+	bne 0,usb0_force_stall
+	fetch 1,mem_usb_setup_bLengthH
+	bne 0,usb0_force_stall
+	fetch 1,mem_usb_setup_bmRequestType
+	beq OUT_DEVICE,usb0_request_set_feature_out_device
+	beq OUT_INTERFACE,usb0_request_set_feature_out_interface
+	beq OUT_ENDPOINT,usb0_request_set_feature_out_endpoint
+	branch usb0_force_stall
+
+usb0_request_set_feature_out_device:
+	fetch 1,mem_usb_setup_bValue
+	bne DEVICE_REMOTE_WAKEUP,usb0_force_stall
+	call dongle_set_pc_sleep_flag
+	fetch 1,core_usb_config
+	set1 7,pdata
+	store 1,core_usb_config
+	jam 1,mem_usb_remote_wakeup
+	jam USB_SLEEP,mem_usb_state
+	jam 0,mem_usb_tx_win_enable
+	call usb0_reply_zerolen
+usb_wakeup_timer_reinit:
+	call timer_reinit
+	setarg TIMER_WAKEUP_DELAY
+	arg USB_TIMER_WAKEUP,queue
+	branch timer_init
+	
+usb0_request_set_feature_out_interface:
+	branch usb0_force_stall
+
+usb0_request_set_feature_out_endpoint:
+	fetch 1,mem_usb_setup_bValue
+	bne ENDPOINT_HALT,usb0_force_stall
+	fetch 1,mem_usb_setup_bValueH
+	bne 0,usb0_force_stall
+	fetch 1,mem_usb_setup_wIndex
+	beq IN_EP1,usb0_force_stall_ep1_in_on
+	beq IN_EP2,usb0_force_stall_ep2_in_on
+	beq IN_EP3,usb0_force_stall_ep3_in_on
+	and_into 0x7f,pdata
+	beq 0x00,usb0_force_stall_ep0_in_on
+	branch usb0_force_stall
+
+usb0_force_stall_ep0_in_on:
+	jam 1,mem_usb_ep0_stall_status
+	branch usb0_reply_zerolen
+usb0_force_stall_ep1_in_on:
+	jam 1,mem_usb_ep1_stall_status
+	branch usb0_reply_zerolen
+usb0_force_stall_ep2_in_on:
+	jam 1,mem_usb_ep2_stall_status
+	branch usb0_reply_zerolen
+usb0_force_stall_ep3_in_on:
+	jam 1,mem_usb_ep3_stall_status
+	branch usb0_reply_zerolen
+
+
+usb0_request_set_address:
+	fetch 1,mem_usb_setup_bmRequestType
+	bne OUT_DEVICE,usb0_force_stall
+	fetch 1,mem_usb_setup_wIndex
+	bne 0,usb0_force_stall
+	fetch 1,mem_usb_setup_wIndex+1
+	bne 0,usb0_force_stall
+	fetch 1,mem_usb_setup_bLength
+	bne 0,usb0_force_stall
+	fetch 1,mem_usb_setup_bLengthH
+	bne 0,usb0_force_stall
+	fetch 1,mem_usb_setup_bValueH
+	bne 0,usb0_force_stall
+	fetch 1,mem_usb_setup_bValue
+	and_into 0x80,pdata
+	bne 0,usb0_force_stall
+	fetch 1,mem_usb_setup_bValue
+	bne 0,usb_usb0_state_set_dev_addr
+usb_usb0_state_set_dev_default:	
+	jam DEV_DEFAULT,mem_usb0_state
+usb0_request_set_wait_address:
+	fetch 1,mem_usb_setup_bValue
+	store 1,core_usb_addr
+	call usb0_reply_zerolen
+	jam 1,mem_usb_set_high_addr_flag
+	rtn
+usb_usb0_state_set_dev_addr:
+	jam DEV_ADDRESS,mem_usb0_state
+	branch usb0_request_set_wait_address
+
+
+usb0_request_set_configuration:
+	fetch 1,mem_usb0_state
+	beq DEV_DEFAULT,usb0_force_stall
+	fetch 1,mem_usb_setup_bmRequestType
+	bne OUT_DEVICE,usb0_force_stall
+	fetch 1,mem_usb_setup_wIndex
+	bne 0,usb0_force_stall
+	fetch 1,mem_usb_setup_wIndex+1
+	bne 0,usb0_force_stall
+	fetch 1,mem_usb_setup_bLength
+	bne 0,usb0_force_stall
+	fetch 1,mem_usb_setup_bLengthH
+	bne 0,usb0_force_stall
+	fetch 1,mem_usb_setup_bValue+1
+	bne 0,usb0_force_stall
+	fetch 1,mem_usb_setup_bValue
+	sub pdata,USB_MAX_NUM_CFG,null
+	nbranch usb0_force_stall,positive
+	fetch 1,mem_usb0_state
+	beq DEV_ADDRESS,usb0_request_set_cfg_addr_state
+	beq DEV_CONFIGURED,usb0_request_set_cfg_cfg_state
+	branch usb0_force_stall
+ // This software only supports config = 0,1
+usb0_request_set_cfg_addr_state:
+usb0_request_set_cfg_cfg_state:
+	fetch 1,mem_usb_setup_bValue	//1:Configured state   0:Address state
+	beq 0,usb0_request_set_cfg_stay_addr_state
+	jam DEV_CONFIGURED,mem_usb0_state
+	branch usb0_reply_zerolen
+usb0_request_set_cfg_stay_addr_state:
+	jam DEV_ADDRESS,mem_usb0_state
+	branch usb0_reply_zerolen
+
+
+usb0_request_set_interface:
+	fetch 1,mem_usb0_state
+	bne DEV_CONFIGURED,usb0_force_stall		
+	fetch 1,mem_usb_setup_bmRequestType
+	bne OUT_INTERFACE,usb0_force_stall
+	fetch 1,mem_usb_setup_bValue
+	bne 0,usb0_force_stall
+	fetch 1,mem_usb_setup_bValueH
+	bne 0,usb0_force_stall
+	fetch 1,mem_usb_setup_bLength
+	bne 0,usb0_force_stall
+	fetch 1,mem_usb_setup_bLengthH
+	bne 0,usb0_force_stall
+	fetch 1,mem_usb_setup_wIndex
+	bne 0,usb0_force_stall
+	fetch 1,mem_usb_setup_wIndex+1
+	bne 0,usb0_force_stall
+	branch usb0_reply_zerolen
+
+
+usb_set_idle:
+	bpatch patch17_6,mem_patch17
+	jam 1,mem_usb_idle_flag
+	fetch 1,mem_usb_setup_bValueH
+	store 1,mem_usb_idle_rate
+	fetch 1,mem_usb_setup_wIndex
+	sub pdata,1,null
+	call usb_clear_remote_wakeup_set0,zero
+	fetch 1,mem_usb_state
+	bne USB_RESUME,usb0_reply_zerolen
+	jam USB_CONNECTED,mem_usb_state
+	call usb0_reply_zerolen
+	nop 30000
+	nop 30000
+	rtn
+usb_clear_remote_wakeup_set0:
+	jam 1,mem_usb_device_enumeration_endflag
+	jam 0,mem_usb_clear_remote_wakeup
+	jam USB_RESUME,mem_usb_state
+	rtn
+
+
+usb_set_report:
+	nop 15000		//delay 1ms
+	arg mem_usb0_set_report_data,contw
+	call usb_rx_data
+	jam 1,mem_usb0_get_set_report
+	call usb_set_report_resume_judge
+	fetch 2,mem_usb_setup_bValue
+	store 2,mem_usb_setup_bValue_temp
+	call usb0_reply_zerolen
+	fetch 1,mem_device_option
+	rtnne dvc_op_dongle
+	fetch 1,mem_usb_tx_win_enable
+	rtn blank
+	fetch 1,mem_usb0_set_report_data
+usb_get_led_status:	
+	store 1,mem_24g_led_status
+	jam 0,mem_usb_tx_win_enable
+	jam KB_LED_ACKPAYLOAD,mem_24g_ackpayload_enable
+	rtn
+
+	
+usb_set_report_resume_judge:
+	fetch 2,mem_usb_setup_bValue
+	arg PC_SET_REPORT_bValue,temp
+	isub temp,null
+	nrtn zero
+	fetch 2,mem_usb_setup_wIndex
+	arg PC_SET_REPORT_wIndex,temp
+	isub temp,null
+	nrtn zero
+	fetch 2,mem_usb_setup_bLength
+	arg PC_SET_REPORT_bLength,temp
+	isub temp,null
+	nrtn zero
+	jam 1,mem_usb_tx_win_enable
+	rtn
+
+
+usb_set_protocol_req:
+	fetch 1,mem_usb_setup_bLength
+	bne 0,usb0_force_stall
+	fetch 1,mem_usb_setup_bValue
+	beq BOOT_PROTOCOL,usb_set_boot_protocol
+	beq REPORT_PROTOCOL,usb_set_report_protocol
+	branch usb0_force_stall
+usb_set_boot_protocol:
+	jam 0,mem_usb_set_protocol_status
+	jam 1,mem_usb_set_protocol_value
+	branch usb0_reply_zerolen
+usb_set_report_protocol:
+	jam 1,mem_usb_tx_mac_enable
+	jam 1,mem_usb_set_protocol_status
+	jam 0,mem_usb_set_protocol_value
+	branch usb0_reply_zerolen
+
+
+usb0_respond_length:
+	ifetchr regb,1,rega
+	increase 1,rega
+//rega=*buff,regb=size
+usb0_respond:
+	bpatch patch17_7,mem_patch17
+	set1 mark_usb_first_resp,mark
+	bmark0 mark_isstr,usb0_respond_nostr
+	increase 1,regb
+	lshift regb,regb
+usb0_respond_nostr:
+	storer rega,2,mem_bufptr
+	storer regb,1,mem_remain
+	branch usb0_tx
+
+usb_no_respond_data:
+	arg 0,queue
+	branch usb_trig
+
+
+
+//mem_bufptr=*buff,mem_remain=size,loopcnt=i,rega=len
+usb0_tx:
+	bpatch patch18_0,mem_patch18
+	fetch 1,core_usb_txbusy
+	rtnbit1 0
+	fetch 1,mem_remain
+	rtn blank
+	copy pdata,loopcnt
+	iforce temp
+	fetch 2,mem_usb_setup_bLength
+	sub pdata,EP0_PACKET_SIZE,null
+	branch usb0_tx_short,positive
+	sub loopcnt,EP0_PACKET_SIZE,null
+	branch usb0_tx_info,positive
+	force EP0_PACKET_SIZE,loopcnt
+	branch usb0_tx_info
+usb0_tx_short:
+	isub loopcnt,null
+	branch usb0_tx_info,positive
+	iforce loopcnt
+	store 1,mem_remain
+usb0_tx_info:
+	fetch 1,mem_remain
+	isub loopcnt,pdata
+	store 1,mem_remain
+	add loopcnt,-1,pdata
+	store 1,mem_usb_txbuf
+	bmark0 mark_isstr,usb0_tx_nostr
+	rshift pdata,pdata
+	add loopcnt,-1,pdata
+	store 1,mem_usb_txbuf
+	bmark0 mark_usb_first_resp,usb0_tx_nostr
+	set0 mark_usb_first_resp,mark
+	istoret 1,contw
+	setarg 3
+	istore 1,contw
+	increase -1,loopcnt
+	copy loopcnt,pdata
+	nbranch usb0_tx_nostr,zero
+	increase 1,loopcnt
+usb0_tx_nostr:
+	fetch 2,mem_bufptr
+	copy pdata,contr
+usb0_tx0:
+	ifetch 1,contr
+	istore 1,contw
+	bmark0 mark_isstr,usb0_tx1
+	setarg 0
+	istore 1,contw
+usb0_tx1:
+	loop usb0_tx0
+	copy contr,pdata
+	store 2,mem_bufptr				//mem_bufptr += len
+	setarg mem_usb_txbuf
+	store 2,core_usb_tx_saddr0
+	arg 0,queue
+	call usb_trig
+	fetch 1,mem_remain
+	nrtn blank
+	fetch 1,mem_usb_state
+	rtnne USB_GOT_REPORT_REQ
+	jam USB_CONNECTED,mem_usb_state
+	rtn
+
+
+
+usb_tx_ep1:
+	arg 1,queue
+	arg mem_usb_txbuf1,rega
+	storer rega,2,core_usb_tx_saddr1
+usb_tx_buf:
+	add loopcnt,-1,pdata
+	istore 1,rega
+usb_tx_loop:
+	ifetch 1,contr
+	istore 1,contw
+	loop usb_tx_loop
+usb_trig:
+	setarg 0
+	qset1 pdata
+	store 1,core_usb_trig
+	rtn
+
+usb_tx_ep2:
+	arg 2,queue
+	arg mem_usb_txbuf2,rega
+	storer rega,2,core_usb_tx_saddr2
+	branch usb_tx_buf
+
+usb_tx:
+	bpatch patch18_1,mem_patch18
+	fetch 1,mem_usb_tx_enable
+	rtn blank
+	fetch 1,core_usb_txbusy
+	and_into 0x0f,pdata
+	nbranch usb_inwake_state_tx_dispose,blank
+	fetch 1,mem_usb_device_enumeration_endflag
+	branch usb_tx_fifo_release,blank
+	fetch 1,mem_usb_state
+	beq USB_SLEEP,usb_windows_wakeup
+	bne USB_CONNECTED,usb_tx_fifo_release
+	fetch 1,mem_usb_clear_remote_wakeup
+	nbranch usb_tx_fifo_release,blank
+	call usb_tx_data_ep1
+	branch usb_tx_data_ep2
+
+usb_tx_data_ep1:
+	fetch 1,core_usb_txbusy
+	rtnbit1 1
+	fetch 1,mem_usb_tx_enable
+	rtnbit0 1
+	fetch 1,mem_usb_tx_enable
+	set0 1,pdata
+	store 1,mem_usb_tx_enable
+	fetch 1,mem_usb_ep1_data
+	rtn blank
+	beq USB_EP1_KB,usb_tx_kb_normal_data
+	branch assert
+
+usb_tx_data_ep2:
+	fetch 1,core_usb_txbusy
+	rtnbit1 2
+	fetch 1,mem_usb_tx_enable
+	rtnbit0 2
+	fetch 1,mem_usb_tx_enable
+	set0 2,pdata
+	store 1,mem_usb_tx_enable
+	fetch 1,mem_usb_ep2_data
+	rtn blank
+	beq USB_EP2_MS,usb_tx_ms_data
+	beq USB_EP2_MULTIKEY,usb_tx_kb_multikey_data
+	beq USB_EP2_SYSTEMKEY,usb_tx_kb_systemkey_data
+	branch assert
+
+usb_tx_fifo_release:
+	//clear mem_usb_mouse_data/mem_usb_kb_data/mem_usb_kb_multikey/mem_usb_kb_system
+	arg mem_usb_mouse_data,contw
+	arg 8,loopcnt
+	branch memset0
+	
+usb_tx_ms_data:
+	fetch 1,mem_usb_idle_flag
+	fetcht 1,mem_usb_get_protocol_flag
+	iand temp,pdata
+	branch usb_tx_ms_data_normal_mode,blank
+	fetcht 1,mem_usb_set_protocol_status
+	iadd temp,pdata
+	beq MAC_BOOT_MODE,usb_tx_ms_data_mac_boot_mode
+	branch usb_tx_ms_data_normal_mode
+
+usb_tx_ms_data_mac_boot_mode:
+	jam 0,mem_usb_ep2_data
+usb_tx_ms_data_mac_boot_regroup:
+	fetch 1,mem_usb_mouse_data+1	//key
+	beq R_KEY,usb_tx_mac_boot_ms_regroup_r_or_lrkey
+	beq LR_KEY,usb_tx_mac_boot_ms_regroup_r_or_lrkey
+	fetch 1,mem_usb_mouse_data+1	//key
+	store 1,mem_usb_mouse_data
+	fetch 1,mem_usb_mouse_data+2	//x low
+	istore 1,contw
+	fetch 1,mem_usb_mouse_data+4	//y low
+	istore 1,contw
+	fetch 1,mem_usb_mouse_data+6	//wheel
+	istore 1,contw
+	arg 4,loopcnt
+	arg mem_usb_mouse_data,contr
+	branch usb_tx_ep2
+	
+usb_tx_ms_data_normal_mode:
+	jam 0,mem_usb_ep2_data
+usb_tx_mac_boot_ms_regroup_r_or_lrkey:	
+	arg 8,loopcnt		
+	arg mem_usb_mouse_data,contr
+	branch usb_tx_ep2
+
+usb_tx_kb_multikey_data:
+	jam 0,mem_usb_ep2_data
+	arg 3,loopcnt
+	arg mem_usb_kb_multikey,contr
+	branch usb_tx_ep2
+
+usb_tx_kb_normal_data:
+	jam 0,mem_usb_ep1_data
+	arg 8,loopcnt
+	arg mem_usb_kb_data,contr
+	branch usb_tx_ep1
+
+usb_tx_kb_systemkey_data:
+	jam 0,mem_usb_ep2_data
+	arg 2,loopcnt
+	arg mem_usb_kb_system,contr
+	branch usb_tx_ep2
+
+usb_inwake_state_tx_dispose:
+	fetch 1,mem_usb_state
+	beq USB_CONNECTED,usb_mac_wakeup_trig
+	rtn
+usb_mac_wakeup_trig:
+	fetch 1,core_usb_config
+	set1 7,pdata
+	store 1,core_usb_config
+	jam 1,mem_usb_mac_wakeup_trig
+	rtn
+
+usb_mac_wakeup_judge:
+	fetch 1,mem_usb_state
+	rtneq USB_SLEEP
+	beq USB_CONNECTED,usb_mac_wakeup
+	rtn
+usb_mac_wakeup:
+	fetch 1,mem_usb_mac_wakeup_trig
+	rtn blank
+	jam 1,mem_usb_wakestate_onetime_flag
+	branch usb_wakeup
+
+usb_windows_wakeup:
+	arg USB_TIMER_WAKEUP,queue
+	call timer_check
+	nrtn blank
+usb_wakeup:
+	fetch 1,core_usb_config
+	rtnbit0 7	//endpoint wakeup enable
+	jam 0xfc,core_usb_config
+	nop 30000
+	jam 0x3c,core_usb_config
+	rtn
+
+
+endif
+
Index: program/utility.prog
===================================================================
--- /branch/usb/usb_public_base/program/utility.prog	(revision 0)
+++ /branch/usb/usb_public_base/program/utility.prog	(working copy)
@@ -0,0 +1,784 @@
+
+
+	
+push_stack:
+	storer contw,2, mem_contw
+	storet 8,mem_temp
+	storer timeup,4,mem_timeup
+	call push_stack_rega_b_c
+	storer contr,2, mem_contr
+	storer loopcnt,2, mem_loopcnt
+	storer queue,2,mem_queue
+	rtn
+
+push_stack_rega_b_c:
+	storer rega,4, mem_rega
+	storer regb,4, mem_regb
+	storer regc,3, mem_regc
+	rtn
+
+pop_stack:
+	bpatch patch18_2,mem_patch18
+	fetch 2, mem_contw
+	iforce contw
+	fetcht 8,mem_temp
+	fetchr timeup,4,mem_timeup
+	call pop_stack_rega_b_c
+	fetchr loopcnt,2,mem_loopcnt
+	fetchr queue,2,mem_queue
+	fetch 2,mem_contr
+	iforce contr
+	rtn
+
+pop_stack_rega_b_c:
+	fetchr rega,4, mem_rega
+	fetchr regb,4, mem_regb
+	fetchr regc,3,mem_regc
+	rtn
+
+get_contw:
+	fetch 2,mem_contw
+	copy pdata,contw
+	rtn
+get_contr:
+	fetch 2,mem_contr
+	copy pdata,contr
+	rtn
+	
+store_contw:
+	copy contw,pdata
+	store 2,mem_contw
+	rtn
+store_contr:
+	copy contr,pdata
+	store 2,mem_contr
+	rtn	
+	
+
+//
+save_cont_pointers:
+	copy contw,pdata
+	store 2,mem_contw
+	copy contr,pdata
+	store 2,mem_contr
+	rtn
+	
+load_cont_pointers:
+	fetch 2,mem_contw
+	copy pdata,contw
+	fetch 2,mem_contr
+	copy pdata,contr
+	rtn
+
+
+//input pdata,temp 1byte
+//output rega:diff
+get_diff:
+	isub temp,rega
+	rtn positive
+	arg 0x100,rega
+	iadd rega,pdata
+	isub temp,rega
+	rtn	
+
+memcpy96:
+	call memcpy32
+memcpy64:
+	call memcpy32
+	branch memcpy32
+	
+
+memcpy12:
+	call memcpy8
+memcpy4:
+	ifetch 1,contr
+	istore 1,contw
+memcpy3:
+	ifetch 3,contr
+	istore 3,contw
+	rtn	
+memcpy8:
+	ifetch 8,contr
+	istore 8,contw
+	rtn	
+
+memcpy48:
+	call memcpy16
+memcpy32:
+	call memcpy8
+memcpy24:
+	call memcpy8
+memcpy16:
+	call memcpy8
+	branch memcpy8
+
+delay:
+	increase -1,pdata
+	nop 38
+	nbranch delay,blank
+	rtn
+
+
+delay_10ms:
+	arg 10,loopcnt
+delay_ms_wait:
+	nop 12000
+	loop delay_ms_wait
+	rtn
+
+bn_zero:
+	force 3,loopcnt
+memset0:
+	force 0,pdata
+memset8:
+	istore 8,contw
+	loop memset8
+	rtn
+
+
+memset0_16:
+	call memset0_8
+memset0_8:
+	force 0,pdata
+	istore 8,contw
+	rtn
+memset0_4:
+	force 0,pdata
+	istore 4,contw
+	rtn	
+	
+clear_mem_256:
+	force 4,loopcnt
+	branch memset0 
+clear_mem_512:
+	force 8,loopcnt
+	branch memset0 
+
+clear_mem:
+	deposit loopcnt
+	rtn blank
+	setarg 0
+clear_mem_loop:
+	istore 1,contw
+	loop clear_mem_loop
+	rtn
+	
+
+clear_temp_block:
+	arg 32,loopcnt
+	arg mem_temp_block0,contw
+	branch clear_mem
+	
+xor_loop:
+	ifetch   4,regc
+	ifetcht 4,rega
+	ixor     temp,pdata
+	istore   4,contw	
+	increase 4,rega
+	increase 4,regc
+	loop  xor_loop
+	rtn
+	
+// 11 22 -> 22 11; 11 22 33 -> 33 22 11 
+// rega:data addr ;loopnct:length
+inverse_data:
+	bpatch patch18_3,mem_patch18
+	copy loopcnt,pdata
+	sub pdata,1,null
+	rtn positive
+	iadd rega,regb	
+	increase -1,regb
+	rshift loopcnt,loopcnt
+inverse_loop:
+	ifetcht 1,rega
+	ifetch 1,regb
+	istore 1,rega
+	istoret 1,regb
+	increase -1,regb
+	increase 1,rega
+	loop inverse_loop
+	rtn
+
+/*
+	function name:inverse_data_6Byte or le2be_6Byte
+	input: pdata is data that want change
+	output:pdata is Converted data
+	used Resources:temp,contr
+*/
+le2be_6Byte:
+inverse_data_6Byte:
+	rshift32 pdata,temp
+	call inverse_data_4Byte
+	byteswap temp,temp
+	lshift16 pdata,pdata
+	ior temp,pdata
+	rtn
+
+
+/*
+	function name:inverse_data_4Byte or le2be_4Byte
+	input: pdata is data that want change
+	output:pdata is Converted data
+	used Resources:contr
+*/
+le2be_4Byte:
+inverse_data_4Byte:
+	rshift16 pdata,contr
+	byteswap contr,contr
+	byteswap pdata,pdata
+	lshift16 pdata,pdata
+	ior contr,pdata
+	rtn
+
+
+memcpy_fast:
+	deposit loopcnt
+	rtn blank
+memcpy_fast_loop:
+	increase -8,loopcnt
+	call memcpy8,positive
+	rtn zero
+	branch memcpy_fast_loop,positive
+	increase 8,loopcnt
+memcpy_fast_loop_four:
+	increase -4,loopcnt
+	call memcpy4,positive
+	rtn zero
+	branch memcpy_fast_loop_four,positive
+	increase 4,loopcnt
+	branch memcpy
+ 
+memcpy:
+	deposit loopcnt
+	rtn blank
+memcpy_loop:
+	ifetch 1,contr
+	istore 1,contw
+	loop memcpy_loop
+	rtn
+
+timer_stop:
+	setarg 0
+timer_init:
+//	rshift clkn_bt,temp
+//	storet 4,mem_last_clkn
+	store 2,mem_pdatatemp
+	bpatch patch18_4,mem_patch18
+	call timer_check
+	fetcht 2,mem_pdatatemp
+	arg mem_timers,contw
+//	iforce temp
+	lshift queue,pdata
+	iadd contw,contw
+	istoret 2,contw
+	rtn
+
+timer_check_timeout:
+	arg 0x800,timeup
+	lshift16 timeup,timeup
+	iadd timeup,pdata
+	rtn
+
+
+timer_reinit:
+	arg 0,queue
+timer_check:
+	bpatch patch18_5,mem_patch18
+	fetcht 4,mem_last_clkn
+	rshift clkn_bt,pdata
+	store 4,mem_last_clkn	
+	isub temp,null
+	ncall timer_check_timeout,positive	
+	isub temp,timeup
+	copy timeup,temp
+	arg mem_timers,contr
+	copy contr,contw
+	arg 16,loopcnt
+timer_loop:
+	ifetch 2,contr
+	isub temp,pdata
+	branch timer_counting,positive
+	force 0,pdata
+timer_counting:
+	istore 2,contw
+	loop timer_loop	
+	arg mem_timers,contr
+	lshift queue,pdata
+	iadd contr,contr
+	ifetch 2,contr
+	rtn
+
+
+
+	/* pdata 28+16 bit add temp 26+16 bit, result in temp */
+clk_add:
+	iadd temp,temp
+	copy temp, loopcnt
+	fetch 2,mem_param_rt_rthalfslot
+	isub loopcnt,pdata
+	rtn positive
+	sub pdata,0,pdata
+	rshift16 temp,temp
+	increase 1,temp
+	lshift16 temp,temp
+	ior temp,temp
+	rtn
+
+clk_diff_rt:
+	call clk_diff
+	branch clk2rt
+
+/* pdata -temp -> pdata, all are 28+16 bits, set user if negative */
+clk_diff:
+	disable user
+	isub temp,pdata
+	branch clk_diff_pos,positive
+	enable user
+	sub pdata,0,pdata
+clk_diff_pos:
+	rtnbit0 15
+	copy pdata,regab
+	arg 0x10000,temp
+	fetch 2,mem_param_rt_rthalfslot
+	isub temp,pdata
+	iadd regab,pdata
+	set0 64,pdata
+	rtn
+
+	
+
+clk2rt:
+	fetcht 2,mem_param_rt_rthalfslot
+	iforce contr
+	rshift16 pdata,pdata
+	imul32 temp,pdata
+	iadd contr,pdata
+	rtn
+
+	/* pdata = clks in, temp = lpo out */
+clk2lpo:
+	lshift8 pdata,pdata
+	lshift4 pdata,pdata
+	fetcht 3,mem_clks_per_lpo
+	idiv temp
+	call wait_div_end
+	quotient temp
+	rtn
+
+	/* rt clk -> bt+rt clk */
+clk2bt:
+	fetcht 2,mem_param_rt_rthalfslot
+	idiv temp
+	call get_div_result
+	lshift16 pdata,pdata
+	remainder temp
+	ior temp,temp
+	rtn
+
+
+
+//input:contu 
+//output:temp
+//used register: temp regab
+string2dec_from_uart:
+	arg 0,temp
+string2dec_from_uart_done:
+         copy temp,regab
+	ifetch 1,contu
+	call uchar2dialog	
+	copy regab,temp
+	call swap
+	arg 10,regb
+	imul32 regb,pdata
+	iadd temp,pdata
+	copy pdata,temp
+	loop string2dec_from_uart_done
+	rtn
+	
+
+
+uchar2dialog:
+	arg 0x3a,temp
+	isub temp,null
+	nbranch uchar2dialog_number,positive
+	arg 0x61,temp
+	isub temp,null
+	branch uchar2dialog_a2f,positive
+	arg 0x37,temp
+	isub temp,pdata
+	rtn
+uchar2dialog_number:
+	arg 0x30,temp
+	isub temp,pdata
+	rtn
+uchar2dialog_a2f:
+	arg 0x57,temp
+	isub temp,pdata
+	rtn
+
+
+right_shift_n: //rshiftN pdata,pdata
+	sub loopcnt,0,null
+	rtn zero
+right_shift_n_loop: 
+	rshift pdata,pdata
+	loop right_shift_n_loop
+	rtn
+
+//lshift. 0:1 byte; 1:2byte; 2:4byte; 3:8byte; 4:16byte//
+left_shift_n:
+	force 1,pdata
+	sub loopcnt,0,null
+	rtn zero
+left_shift_n_loop:
+	lshift pdata,pdata
+	loop left_shift_n_loop
+	rtn
+	
+/*
+pn9:
+	copy temp,alarm
+	setarg 0x1ff
+	force 0,regb
+pn9_loop:	
+	rshift3 pdata,rega
+	rshift rega,rega
+	ixor rega,rega
+	isolate1 0,rega
+	setflag true,9,pdata
+	rshift temp,temp
+	isolate1 0,pdata
+	setflag true,7,temp
+	rshift pdata,pdata
+	increase 1,regb
+	compare 0,regb,0x7
+	nbranch pn9_loop,true
+	istoret 1,contw
+	loop pn9_loop
+	copy alarm,temp
+	rtn
+
+*/
+
+	// contr: rxdata, loopcnt is count. result in quotient
+calc_average:
+	setarg 0
+	copy loopcnt,rega
+calc_average_loop:
+	ifetcht 2,contr
+	iadd temp,pdata
+	loop calc_average_loop
+	idiv rega
+get_div_result:
+	call wait_div_end
+	quotient pdata
+	rtn
+
+wait_div_end:	
+	rtn modone
+	branch wait_div_end
+
+
+
+//input:
+//	count:loopcnt str1:rega str2:regb
+//output:
+//	same:set flag zero ,diff not set flag zero
+// using:
+//	reg:temp null flag:zero
+compare_loop:
+string_compare:
+	ifetch 1,rega
+	ifetcht 1,regb
+	isub temp,null
+	nrtn zero
+	increase 1,rega
+	increase 1,regb
+	loop string_compare
+	force 0,null
+	rtn
+
+	/* pdata = temp if pdata > temp */
+ceiling:
+	isub temp,null
+	nrtn positive
+	deposit temp
+	rtn
+	
+swap:
+	iadd temp,pdata
+	isub temp,temp
+	isub temp,pdata
+	rtn
+
+clean_mem:
+	arg 0x200,loopcnt
+	arg 0x4000,contw
+	branch memset0				// clear xram at boot
+
+	//cb function ptr in pdata
+callback_func:
+	rtn blank
+	copy pdata,pc	//rtn through cb functon.
+	//branch assert
+
+wait_uarttx:
+	fetch 2,core_uart_txitems
+	nbranch wait_uarttx,blank
+	rtn
+
+ice_break_disable_wdt:
+	call wdt_set_disable
+
+ice_break:
+	jam 0x1,core_ice_ctrl
+	rtn
+
+ice_setbp:
+	store 2,core_ice_break0
+	fetch 1,core_ice_ctrl
+	set1 4,pdata
+	store 1,core_ice_ctrl
+	rtn
+ice_setbp2:
+	store 2,core_ice_break1
+	fetch 1,core_ice_ctrl
+	set1 6,pdata
+	store 1,core_ice_ctrl
+	rtn
+	
+ice_set_write_bp:
+	store 2,core_ice_break0
+	jam 0x30,core_ice_ctrl
+	rtn
+	
+test_no_white:
+	fetch 1,core_config
+	set1 whiteoff_bit,pdata
+	store 1,core_config			/* whitening off */
+	rtn
+
+test_enable_white:
+	fetch 1,core_config
+	set0 whiteoff_bit,pdata
+	store 1,core_config			/* whitening on */
+	rtn
+
+check_uart_tx_buff:
+	fetch 2,core_uart_txitems
+	arg UART_AIR_CONTROL_THRESHOLD,temp
+pdata_sub_temp:
+	isub temp,null
+	rtn
+
+	//fuction fifo_in
+	//rega pointer to fifo memory , *(rega+len) is the end of fifo
+	//mem_fifo_temp data into fifo
+	//assert if fifo was full
+fifo_in:
+	bpatch patch18_6,mem_patch18
+	ifetcht UTIL_FIFO_LEN,rega
+	and temp,0xff,pdata
+	nbranch fifo_in_push,blank
+	rshift8 temp,pdata
+	istore UTIL_FIFO_LEN,rega
+fifo_in_push:
+	increase UTIL_FIFO_LEN+UTIL_FIFO_OFFSET,rega
+	ifetch 1,rega
+	nbranch assert,blank //fifo full
+	fetch 1,mem_fifo_temp
+	istore 1,rega
+	rtn
+	
+	//fuction fifo_out
+	//rega pointer to fifo memory
+	//pdata  data from fifo, blank mains fifo empty
+fifo_out:
+	bpatch patch18_7,mem_patch18
+	arg UTIL_FIFO_LEN,loopcnt
+	ifetch UTIL_FIFO_LEN,rega
+	rtn blank
+fifo_out_loop:
+	ifetch 1,rega
+	nbranch fifo_out_end,blank
+	increase 1,rega
+	loop fifo_out_loop
+	branch assert
+fifo_out_end:
+	arg 0,temp
+	istoret 1,rega
+	rtn
+
+	//fuction fifo_is_empty
+	//rega pointer to fifo memory
+	//blank--- fifo is empty
+fifo_is_empty:
+	ifetch UTIL_FIFO_LEN,rega
+	rtn
+
+	//fuction fifo_is_full
+	//rega pointer to fifo memory
+	//blank--- fifo is NOT full
+fifo_is_full:
+	ifetch 1,rega
+	rtn
+	//rega pointer to fifo memory
+	//blank--- fifo is NOT near full
+fifo_is_near_full:
+	ifetch 2,rega
+	rtn
+
+	//rega pointer to fifo memory
+	//count output via pdata
+fifo_content_count:
+	arg 0,temp
+fifo_content_count_loop:
+	fetch 1,contr
+	loop fifo_content_count_loop,blank
+	increase 1,temp
+	loop fifo_content_count_loop
+	copy temp,pdata
+	rtn
+
+//input pdata, temp, return small in pdata	
+not_greater_than:
+	isub temp,null
+	nrtn positive
+copy_temp2pdata:
+	copy temp,pdata
+	rtn
+
+
+disable_positive:
+	force -1,null
+	rtn
+enable_positive:
+disable_zero:
+	force 1,null
+	rtn
+enable_zero:
+	force 0,null
+	rtn
+
+enable_user:
+	enable user
+	rtn
+	
+disable_user:
+	disable user
+	rtn
+	
+enable_user2:
+	enable user2
+	rtn
+	
+disable_user2:
+	disable user2
+	rtn
+
+enable_user7:
+	enable user7
+	rtn
+
+disable_true:
+	disable  true
+	rtn
+
+enable_true:
+	enable  true
+	rtn
+
+disable_blank:
+	setarg 1
+	rtn
+
+enable_blank:
+set_pdata_0:
+	setarg 0
+	rtn
+
+//input pdata :sum
+//output pdata :sum
+cal_sum:
+	sub loopcnt,0,null
+	rtn zero
+cal_sum_loop:
+	ifetcht 1,contr
+	iadd temp,pdata
+	loop cal_sum_loop
+	rtn
+
+	
+reverse_byte:
+	copy loopcnt,pdata
+	rtn blank
+	copy contr,pdata
+	iadd loopcnt,pdata
+	increase -1,pdata
+	copy pdata,contr	
+reverse_loop:
+	ifetch 1,contr
+	increase -2,contr
+	istore 1,contw
+	loop reverse_loop
+	rtn
+
+
+lshift14:
+	lshift16 pdata,pdata
+rshift2:
+	rshift2 pdata,pdata
+	rtn
+
+lshift6:
+	lshift8 pdata,pdata
+	branch rshift2
+
+/*	
+savelist:		
+	store 8,mem_pdatatemp
+savelist_1:
+	fetch 1,mem_seqi
+	rtneq 0x7f
+	lshift3 pdata,pdata
+	arg mem_savelist,contw
+	iadd contw,contw
+	fetch 8,mem_pdatatemp
+	istore 8,contw
+	fetch 1,mem_seqi
+	increase 1,pdata
+	and_into 0x7f,pdata
+	store 1,mem_seqi
+	fetch 8,mem_pdatatemp
+	rtn	
+
+le_savelist:
+	fetch 5,mem_sync_clke
+	store 5,mem_pdatatemp
+	fetch 1,mem_le_ch_mapped
+	istore 1,contw
+	fetch 2,mem_le_event_count
+	arg 0x0fff,contr
+	iand contr,pdata
+	setflag match,15,pdata
+	setflag wake,14,pdata
+	setflag sync,13,pdata
+	setflag attempt,12,pdata
+	istore 2,contw
+	branch savelist_1
+*/
+
+clear_wake:
+	setarg 0
+	store 8,mem_gpio_wakeup_low
+	rtn
+
+
+generate_random:
+	arg 16,loopcnt
+generate_random_loop:
+        random pdata
+        istore 1,contw
+        loop generate_random_loop
+        rtn
+
Index: sched/1306.dat
===================================================================
--- /branch/usb/usb_public_base/sched/1306.dat	(revision 0)
+++ /branch/usb/usb_public_base/sched/1306.dat	(working copy)
@@ -0,0 +1,35 @@
+
+mem_gpio_wakeup_low:00 10 00 00 00 00 00 00
+mem_lpm_config:88 0b ca	#4khz
+mem_lpm_xtalcnt:70 3f 0c 33 03
+mem_lpm_ctrl3_aon_vsel:9d 10 22
+mem_lpm_hibernate_switch:00
+mem_xtal_freq:18
+
+mem_fcomp_div:18
+
+mem_rc_cal:d3
+mem_rf_ldo_cfg1:00
+mem_syn_afc_cfg1:29
+mem_dig_aon_vsel:01	#bit5-4;00:1.2V;01:1.08V;02:0.96V;03:0.84V
+
+mem_gain_fix:ff	#00:soft agc; ff:hw agc
+mem_gain_table:88 66 44
+mem_gain_second_agc_en:00	#hw agc: 0:second agc disable
+
+mem_rx_window_sniff:00 0c
+
+mem_version:09 0e 05 04 00
+mem_seqi:7f
+
+
+mem_rf_init_data:
+ff
+mem_rf_init_ptr:mem_rf_init_data
+
+
+#bit7:0 means disable rf debug function
+mem_rf_debug_rx_gpio:06
+mem_rf_debug_tx_gpio:07
+
+
Index: sched/DM_module.dat
===================================================================
--- /branch/usb/usb_public_base/sched/DM_module.dat	(revision 0)
+++ /branch/usb/usb_public_base/sched/DM_module.dat	(working copy)
@@ -0,0 +1,244 @@
+
+
+mem_device_option:0a
+
+mem_module_connect_state_gpio:FF
+mem_module_mcu_wake_pin:FF
+##############ADC CONFIG##############
+mem_module_read_vdd_count:01
+mem_module_read_vdd_flag:01
+#####################################
+
+##############NVRAM CONFIG##############
+mem_nv_data_ptr:mem_module_nv_data
+mem_nv_data_number:05
+#####################################
+
+
+#####################################
+
+##############UART CONFIG##############
+mem_module_uarta_baud_rate:D0 00
+mem_module_uart_rx_buffer:00 4d
+mem_module_uart_rx_buffer_end:7f 4e
+mem_module_uart_tx_buffer:80 4e
+mem_module_uart_tx_buffer_end:ef 4f
+#####################################
+
+
+
+##############BLUETOOTH CONFIG##############
+###commom###
+mem_soft_version_num:00 01
+mem_module_state:03
+mem_module_bluetooth_stauts_by_command:07
+
+mem_module_flag:00 00
+#bit0 MODULE_FLAG_UART_FLOW_CONTROL
+#bit1 MODULE_FLAG_BLE_SEND_MTU23
+#bit2 MODULE_FLAG_BLE_DATA_ENCRYPT
+
+mem_ui_button_gpio:ff
+mem_lpm_mode:00
+mem_lpm_interval:00 01
+mem_lpm_overhead:08
+mem_lpm_mult_timeout:02
+
+mem_module_wake_up_gpio:0b
+
+
+
+###ble###
+mem_le_pairing_handle:2a 00
+mem_le_configuration:08
+
+mem_le_adv_channel_map:07
+mem_le_pairing_mode:01
+
+mem_module_ble_data_uart_max_length:f0
+
+mem_le_scan_enable:00
+mem_le_scan_type:01
+mem_le_scan_interval:00 02
+mem_le_scan_window:00 01
+#mem_le_conn_peer_addr:2a 31 00 33 02 3b
+#mem_cmd_le_create_conn:1b
+
+mem_le_adv_enable:01
+mem_le_adv_interval:f0 00
+mem_module_le_lpm_mult:05
+mem_le_lap:11 fa 21 43 11 11
+mem_le_name_len:
+'Yichip 1306 le
+
+mem_le_adv_data_len:03
+mem_le_adv_data:
+02 01 0e
+
+mem_le_scan_data_len:0e
+
+mem_le_scan_data:# 1 byte length + 1 byte type + N bytes data
+'\09Yichip 1306 le
+
+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_local_mtu:20 00
+mem_le_remote_mtu:17
+mem_local_rx_max_octets:fb 00 48 08 fb 00 48 08  # 1b
+mem_le_local_feature:21 09 
+mem_le_tx_phys:0707
+#####################################
+
+
+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:
+#Primary service GAP ------
+01 00 02 00 28 02 00 18
+
+
+#Appearance
+02 00 02 03 28 01 02
+03 00 02 01 2a 02 c8 00 #3c2=hid mouse
+
+#Device name
+04 00 02 03 28 01 02
+05 00 02 00 2a 14 41 73 74 20 4c 45 20 4d 6f 75 73 65 20 20 20 20 20 20 20 20
+
+
+#Peripheral Preferred Connection Parameters
+06 00 02 03 28 01 02
+07 00 02 04 2a 08 06 00 06 00 64 00 2c 01 # interval 6ms, latency 100, timeout 300
+
+
+#privcy flag
+08 00 02 03 28 01 02
+09 00 02 02 2a 01 01
+
+#reconnecting addr 
+0a 00 02 03 28 01 08
+0b 00 02 03 2a 06 00 00 00 00 00 00
+
+#Primary service GATT ------
+0c 00 02 00 28 02 01 18
+
+#Service changed
+0d 00 02 03 28 01 20
+0e 00 02 05 2a 00
+#Client Characteristic Configuration
+0f 00 02 02 29 02 00 00
+
+#Primary service TX power ------
+10 00 02 00 28 02 04 18
+#Characteristic Tx power level
+11 00 02 03 28 01 16
+12 00 02 07 2a 01 00
+13 00 02 02 29 02 00 00
+
+#Primary service Battery ------
+14 00 02 00 28 02 0f 18
+#Characteristic Battery level
+15 00 02 03 28 01 12
+16 00 02 19 2a 01 38
+
+#Primary service device infomation
+17 00 02 00 28 02 0a 18
+#Characteristic system id
+18 00 02 03 28 01 02
+19 00 02 23 2a 03 00 00 00
+
+#Characteristic manufactor name
+1a 00 02 03 28 01 02
+1b 00 02 29 2a 06 79 69 63 68 69 70
+
+#Characteristic module number
+1c 00 02 03 28 01 02
+1d 00 02 24 2a 06 79 69 63 68 69 70
+
+#Characteristic serial number
+1e 00 02 03 28 01 02
+1f 00 02 25 2a 04 63 6f 6d 33
+
+#Characteristic firmware version
+20 00 02 03 28 01 02
+21 00 02 26 2a 03 31 2e 30
+
+#Characteristic software version
+22 00 02 03 28 01 02
+23 00 02 28 2a 03 31 2e 30
+
+#Characteristic hardware version
+24 00 02 03 28 01 02
+25 00 02 2a 2a 03 31 2e 30
+
+#Characteristic regulatory version
+26 00 02 03 28 01 02
+27 00 02 25 2a 04 63 6f 6d 33
+
+#Primary service yichip transmit ------
+28 00 02 00 28 10 55 e4 05 d2 af 9f a9 8f e5 4a 7d fe 43 53 53 49
+#Characteristic tx--notify read
+29 00 02 03 28 01 12
+2a 00 10 16 96 24 47 C6 23 61 BA D9 4B 4D 1E 43 53 53 49 14 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+#Client Characteristic Configuration
+2b 00 02 02 29 02 00 00
+
+#Characteristic rx--write
+2c 00 02 03 28 01 08
+2d 00 10 b3 9b 72 34 be ec d4 a8 f4 43 41 88 43 53 53 49 14 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+
+#Characteristic rx-- write without Response
+2e 00 02 03 28 01 04
+2f 00 10 fe 69 ca 9a 56 19 f6 ab 02 4d aa 6d 43 53 53 49 14 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+
+#Characteristic rx tx --read write notify
+30 00 02 03 28 01 2a
+31 0010 18 03 A6 28 5E D8 EC 91 1C 48 A3 AC 43 53 53 49 14 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+#Client Characteristic Configuration
+32 00 02 02 29 02 00 00
+
+
+#End of Attribute list
+00 00
+
+#mem_le_wechat_air_sync_ptr:mem_module_wechat_indication_handle
+#mem_module_wechat_indication_handle:35 38 
+
+#mem_module_wechat_tx_buffer_ptr:mem_wechat_tx_buffer
+#mem_module_wechat_rx_buffer_ptr:mem_wechat_rx_buffer
+
+#mem_le_adv_data_len:03
+#mem_le_adv_data:
+#02 
+#01 #GAP_ADTYPE_FLAGS
+#06 #GAP_ADTYPE_FLAGS_GENERAL |GAP_ADTYPE_FLAGS_BREDR_NOT_SUPPORTED
+
+#05 
+#02 #GAP_ADTYPE_16BIT_MORE
+#E7 FE 00 18
+
+#09 
+#FF #GAP_ADTYPE_MANUFACTURER_SPECIFIC
+#0e 05 #Yichip Microelectronics (Hangzhou) Co.,Ltd.
+#81 E8 2F 96 FD 64
+
+#mem_le_scan_data_len:0e
+
+#mem_le_scan_data:# 1 byte length + 1 byte type + N bytes data
+#'\09Yichip 1306 le
+
+
+
+#eeprom gpio config
+mem_eeprom_wp_gpio:06
+mem_eeprom_scl_gpio:07
+mem_eeprom_sda_gpio:08
+
Index: sched/ble_car_att_list.dat
===================================================================
--- /branch/usb/usb_public_base/sched/ble_car_att_list.dat	(revision 0)
+++ /branch/usb/usb_public_base/sched/ble_car_att_list.dat	(working copy)
@@ -0,0 +1,204 @@
+01
+00
+02
+00
+28
+02
+01
+18
+02
+00
+02
+03
+28
+01
+20
+03
+00
+02
+05
+2a
+01
+00
+04
+00
+02
+02
+29
+02
+00
+00
+05
+00
+02
+00
+28
+02
+00
+18
+06
+00
+02
+03
+28
+01
+02
+07
+00
+02
+00
+2a
+11
+55
+43
+48
+4f
+4e
+20
+30
+31
+20
+20
+20
+20
+20
+20
+20
+20
+20
+08
+00
+02
+03
+28
+01
+02
+09
+00
+02
+01
+2a
+02
+c8
+00
+0a
+00
+02
+03
+28
+01
+02
+0b
+00
+02
+04
+2a
+08
+06
+00
+06
+00
+64
+00
+2c
+01
+0c
+00
+02
+00
+28
+02
+0a
+18
+0d
+00
+02
+03
+28
+01
+02
+0e
+00
+02
+50
+2a
+07
+02
+8a
+24
+66
+82
+01
+00
+0f
+00
+02
+00
+28
+02
+f0
+ff
+10
+00
+02
+03
+28
+01
+12
+11
+00
+02
+f1
+ff
+0e
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+12
+00
+02
+02
+29
+02
+00
+00
+13
+00
+02
+03
+28
+01
+08
+14
+00
+02
+f2
+ff
+0e
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
\ No newline at end of file
Index: sched/ble_shutter_gatt_list.dat
===================================================================
--- /branch/usb/usb_public_base/sched/ble_shutter_gatt_list.dat	(revision 0)
+++ /branch/usb/usb_public_base/sched/ble_shutter_gatt_list.dat	(working copy)
@@ -0,0 +1,313 @@
+01
+00
+02
+00
+28
+02
+01
+18
+02
+00
+02
+03
+28
+01
+20
+03
+00
+02
+05
+2a
+01
+00
+04
+00
+02
+02
+29
+02
+00
+00
+05
+00
+02
+00
+28
+02
+00
+18
+06
+00
+02
+03
+28
+01
+02
+07
+00
+02
+00
+2a
+13
+43
+68
+69
+70
+73
+65
+61
+2d
+42
+4c
+45
+20
+20
+20
+20
+20
+20
+20
+20
+08
+00
+02
+03
+28
+01
+02
+09
+00
+02
+01
+2a
+02
+c1
+03
+0a
+00
+02
+03
+28
+01
+02
+0b
+00
+02
+04
+2a
+08
+06
+00
+06
+00
+64
+00
+2c
+01
+0c
+00
+02
+00
+28
+02
+0a
+18
+0d
+00
+02
+03
+28
+01
+02
+0e
+00
+02
+50
+2a
+07
+02
+8a
+24
+66
+82
+01
+00
+0f
+00
+02
+00
+28
+02
+12
+18
+10
+00
+02
+03
+28
+01
+06
+11
+00
+02
+4e
+2a
+01
+01
+12
+00
+02
+03
+28
+01
+12
+13
+00
+02
+4d
+2a
+02
+00
+00
+14
+00
+02
+02
+29
+02
+00
+00
+15
+00
+02
+08
+29
+02
+02
+01
+16
+00
+02
+03
+28
+01
+12
+17
+00
+02
+4d
+2a
+02
+00
+00
+18
+00
+02
+02
+29
+02
+00
+00
+19
+00
+02
+08
+29
+02
+03
+01
+1a
+00
+02
+03
+28
+01
+02
+1b
+00
+02
+4b
+2a
+1b
+05
+0c
+09
+01
+a1
+01
+85
+02
+09
+e9
+09
+ea
+09
+e2
+09
+30
+15
+01
+25
+0c
+75
+10
+95
+01
+81
+00
+c0
+1c
+00
+02
+03
+28
+01
+02
+1d
+00
+02
+4a
+2a
+04
+11
+01
+00
+01
+1e
+00
+02
+03
+28
+01
+04
+1f
+00
+02
+4c
+2a
+01
+00
+20
+00
+02
+00
+28
+02
+0f
+18
+21
+00
+02
+03
+28
+01
+12
+22
+00
+02
+19
+2a
+01
+63
+00
+00
\ No newline at end of file
Index: sched/ble_shutter_key_value_list.dat
===================================================================
--- /branch/usb/usb_public_base/sched/ble_shutter_key_value_list.dat	(revision 0)
+++ /branch/usb/usb_public_base/sched/ble_shutter_key_value_list.dat	(working copy)
@@ -0,0 +1,40 @@
+02
+13
+00
+02
+00
+02
+13
+00
+01
+00
+02
+13
+00
+04
+00
+02
+13
+00
+06
+00
+02
+13
+00
+05
+00
+02
+13
+00
+00
+00
+02
+17
+00
+00
+28
+02
+17
+00
+00
+00
Index: sched/car.dat
===================================================================
--- /branch/usb/usb_public_base/sched/car.dat	(revision 0)
+++ /branch/usb/usb_public_base/sched/car.dat	(working copy)
@@ -0,0 +1,234 @@
+mem_device_option:0e
+mem_le_adv_channel_map:07 
+mem_le_adv_enable:00
+
+
+mem_spi_ncs_gpio:ff
+
+mem_le_pres_auth:01
+mem_le_local_mtu:17
+mem_le_adv_interval:60 01 
+mem_local_rx_max_octets:fb 00 48 08 fb 00 48 08  # 1b
+
+
+mem_le_lap:34 75 07 99 07 2b
+mem_le_name_len:
+'YC-CAR-34
+
+mem_le_adv_data_len:1f
+mem_le_adv_data:
+17 09 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 02 01 05 03 02 ff f0
+
+mem_le_scan_data_len:1f
+mem_le_scan_data:
+1e 09 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
+
+
+mem_le_interval_min:
+18 00 #min interval
+20 00 #max interval
+10 00 #latency
+2c 01 #timeout
+
+
+#mem_ui_le_uuid_table:21 95  #0x9E62 BLE_CAR_ATT_LIST
+mem_ui_le_uuid_table:mem_ble_att_list
+
+
+mem_ble_att_list:
+#Primary service GAP ------
+01 00 02 00 28 02 00 18
+#Device name
+02 00 02 03 28 01 0a
+03 00 02 00 2a
+'CAR-BLE-OTA
+
+#Appearance
+04 00 02 03 28 01 02
+05 00 02 01 2a 02 40 14
+#Peripheral Preferred Connection Parameters
+06 00 02 03 28 01 02
+07 00 02 04 2a 08 08 00 20 00 10 00 58 02 # interval 6ms, latency 100, timeout 600
+
+#Primary service device information ------
+08 00 02 00 28 02 0a 18
+
+#Manufacturer Name
+09 00 02 03 28 01 02
+0a 00 02 29 2a 06 59 69 43 68 69 70
+
+#Model Number
+0b 00 02 03 28 01 02
+0c 00 02 24 2a 04 4c 52 32 31
+
+#Software Revision
+0d 00 02 03 28 01 02
+0e 00 02 28 2a 04 56 2e 30 31
+
+#Hardware Revision
+0f 00 02 03 28 01 02
+10 00 02 27 2a 04 56 2e 30 31
+
+#PNP id
+11 00 02 03 28 01 02
+12 00 02 50 2a 07 02 35 12 22 aa 51 31
+
+#Client Characteristic
+13 00 02 02 29 02 00 00
+
+#Primary service yichip transmit ------
+14 00 02 00 28 02 f0 ff
+
+15 00 02 03 28 01 12
+16 00 02 f1 ff 08 00 00 00 00 00 00 00 00
+17 00 02 02 29 02 00 00
+
+18 00 02 03 28 01 08
+19 00 02 f2 ff 08 00 00 00 00 00 00 00 00
+00 00    
+
+##############BLE ATT LIST END####################
+
+mem_lpm_mode:00
+mem_lpm_overhead:06
+mem_lpm_mult_timeout:02
+mem_car_hard_soft_switch:00
+
+mem_power_param_ptr:mem_car_soft_power
+mem_car_power_off_timeout:0c 0c
+
+mem_ui_button_gpio:ff
+mem_ui_button_timeout:14
+mem_ui_button_last_state:01
+
+
+mem_ui_led_struct_ptr:mem_car_style1_led_type
+mem_ui_led_struct_num:01
+
+#style:01
+mem_car_style1_blink_count:ff
+mem_car_style1_struct_led_gpio:05
+mem_car_style1_on_time:20 03
+mem_car_style1_off_time:20 03
+
+#style:02
+mem_car_style2_blink_count:ff
+mem_car_style2_struct_led_gpio:ff
+mem_car_style2_on_time:20 03
+mem_car_style2_off_time:20 03
+
+mem_car_led_num:01
+mem_car_led_map:
+05
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+
+mem_car_config_blood_led1_gpio:ff
+mem_car_config_pairing_led_gpio:ff
+mem_car_config_low_voltage_led_gpio:ff
+
+mem_keyscan_ptr:mem_car_keyscan
+mem_car_key_num:00
+
+
+mem_car_queue_each_size:14 06
+
+mem_queue_ptr:mem_car_queue_each_size
+
+mem_car_config_pairing_led_conn_status:00
+mem_car_config_soft_switch_enable:00
+mem_car_config_pairing_led_gpio:ff
+mem_car_config_low_voltage_led_gpio:ff
+mem_car_config_soft_switch_gpio:ff
+mem_car_config_low_voltage_percent:14
+mem_car_config_bat_notify_enable:01
+mem_car_config_device_select:03
+mem_car_config_ir_enable:00
+mem_car_config_motor_layout:03
+mem_car_config_ir_rx_gpio:ff
+mem_car_config_led_num:ff
+mem_car_config_blood_led_gpio:ff 09 0a 0b 0c 0d 0e 0f
+
+
+mem_motor1_speed:04
+mem_motor2_speed:04
+mem_motor3_speed:09
+mem_motor1_pwm_set:ff ff 00 05 e8 03 00 00
+mem_motor2_pwm_set:ff ff 00 04 e8 03 00 00
+mem_motor3_pwm_set:ff ff 00 03 e8 03 00 00
+mem_motor_pwm_pin1_set:ff ff 00 02 e8 03 00 00
+
+
+mem_car_notify_vdd_count:14
+mem_notify_bat_packet:07 11 00 5a 6b 01 00 01 00 00
+
+mem_vdd_calculate_set:e0 01 90 01 9a 01 00 00	#full_vol;	empty_vol;	low_vol;	now_vol
+
+mem_ir_notify_data:08 11 00 5a 6b 06 00 02 00 00 00
+
+mem_adc_config_flag:01
+
+mem_car_info_request:0e 11 00 5a 6b 08 00 08 00 00 00 00 00 00 00 00 00
+
+mem_car_led_control_timer:05
+
+
+#mem_car_led_control:01 01 01 01 01 01 01 01
+
+mem_car_motor_gpio_num:04
+mem_car_motor_gpio_map:
+00		#left	INC
+01		#right	IND
+02 		#front	INA
+09		#back	INB
+
+#eeprom config
+mem_eeprom_base:80 1f
+mem_eeprom_wp_gpio:06
+mem_eeprom_scl_gpio:07
+mem_eeprom_sda_gpio:08
+
+
+
+
+#rf config
+mem_24g_data_type:01        #mouse 1,kb 2
+mem_24g_lap:38 74 2f 74 07 2b#low 4B used for 24g rxaddr
+mem_tx_power:03	#3dBm
+mem_24g_tx_phy:84#0x01:1M/0x02:2M/0x04:S2/0x84:S8
+mem_24g_rx_phy:84#0x01:1M/0x02:2M/0x04:S2/0x84:S8
+mem_24g_no_ack:00#no ack
+mem_24g_rx_window:60 ea#rx
+mem_24g_hop_interval:1e
+mem_24g_ackpayload_enable:00#ack payload enable
+mem_24g_ch_map1:00 13 2c 42
+mem_24g_ch_map2:06 15 36 48
+mem_24g_ch_map3:0f 1a 3a 4c
+mem_24g_ch_map4:11 23 31 4d
+mem_24g_pair_switch:01
+mem_24g_pair_mode:00
+mem_24g_pair_ch:4e
+mem_24g_pair_tx_power:85 #-5dBm
+mem_24g_pair_addr:56 34 02 01
+mem_24g_enter_hibernate:00 48 60#200ms
+mem_rssi_buff_index:07
+mem_rssi_noise_buffer_ptr:mem_car_rssi_noise_buffer
+mem_rssi_noise_self_buffer_ptr:mem_car_rssi_noise_car_buffer
+mem_rssi_noise_device1_buffer_ptr:mem_car_rssi_noise_remote_buffer
+
+#24g rx init end
+
+mem_car_24g_bind_enable_delay_count:0a#500ms
+mem_car_24g_no_data_timeout_count:64 00#10s
+mem_car_enter_lpm_timer_count:b8 0b#5min
+
+mem_car_save_addr_flag:00
+
+
Index: sched/dongle.dat
===================================================================
--- /branch/usb/usb_public_base/sched/dongle.dat	(revision 0)
+++ /branch/usb/usb_public_base/sched/dongle.dat	(working copy)
@@ -0,0 +1,67 @@
+
+mem_device_option:04
+mem_ui_button_gpio:ff
+
+
+#efuse size:28 bytes
+
+#sys config
+#bit7:enable 16M xtal#0:24M#1:16M
+#bit6:enable new channel map
+#bit5:enable eeprom
+#bit4:enable kb icon
+#bit3:enable 24g 2M
+#bit2-0:retention
+mem_dg_sys_config:00  #24M
+
+#24g new process #default value 00,if need new process set value 01
+mem_24g_disable_fec1:00
+mem_dg_24g_tx_power_default:06	#6dBm
+
+#usb config
+#mem_dg_usb_vid_pid:
+#00 #disable
+#mouse only#auto pair
+#51 31#VID
+#20 10#PID
+#mouse & keyboard
+#51 31#VID
+#20 30#PID
+#mem_dg_usb_tx_interval:00
+#mem_dg_usb_device_name:
+#'123456
+
+
+#rf config
+mem_24g_lap:36 27 11 30#low 4B used for 24g rxaddr
+#mem_24g_tx_phy:01#0x01:1M/0x02:2M/0x04:S2/0x84:S8
+#mem_24g_rx_phy:01#0x01:1M/0x02:2M/0x04:S2/0x84:S8
+#mem_24g_no_ack:00#no ack
+#mem_24g_rx_window:30 75#rx
+mem_24g_hop_interval:1e
+#mem_24g_ackpayload_enable:00#ack payload enable
+#mem_24g_ch_map1:00 13 2c 42
+#mem_24g_ch_map2:06 15 36 48
+#mem_24g_ch_map3:0f 1a 3a 4c
+#mem_24g_ch_map4:11 23 31 4d
+#mem_24g_pair_switch:00
+mem_24g_pair_mode:00
+#mem_24g_pair_ch:4e
+#mem_24g_pair_tx_power:85
+#mem_24g_pair_addr:20 15 10 05
+#mem_24g_ch_map_update:00
+#mem_24g_ch_update_map1
+#mem_24g_ch_update_map2
+#mem_24g_ch_update_map3
+#mem_24g_ch_update_map4
+
+#mem_rssi_buff_index:ff
+#mem_rssi_noise_buffer_ptr:mem_dg_rssi_noise_buffer
+#mem_rssi_noise_self_buffer_ptr:mem_dg_rssi_noise_dg_buffer
+#mem_rssi_noise_device1_buffer_ptr:mem_dg_rssi_noise_ms_buffer
+#mem_rssi_noise_device2_buffer_ptr:mem_dg_rssi_noise_kb_buffer
+
+
+
+
+
Index: sched/ff.dat
===================================================================
--- /branch/usb/usb_public_base/sched/ff.dat	(revision 0)
+++ /branch/usb/usb_public_base/sched/ff.dat	(working copy)
@@ -0,0 +1,88 @@
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
Index: sched/fpga.dat
===================================================================
--- /branch/usb/usb_public_base/sched/fpga.dat	(revision 0)
+++ /branch/usb/usb_public_base/sched/fpga.dat	(working copy)
@@ -0,0 +1,28 @@
+mem_xtal_freq:18
+mem_le_adv_enable:01
+
+mem_rx_window_sniff:00 0e
+
+mem_version:08 0e 05 03 00
+
+mem_le_lap:11 22 33
+mem_le_adv_data_len:03
+mem_le_adv_data:
+02 01 0e
+
+mem_le_scan_data_len:0a
+mem_le_scan_data:
+'\09FPGA1306
+
+mem_le_adv_interval:20 00
+mem_le_scan_window:20 00
+mem_le_scan_type:01
+mem_le_adv_own_addr_type:01
+mem_le_adv_channel_map:07
+
+mem_device_option:05
+
+mem_rf_init_data:
+ff
+mem_rf_init_ptr:mem_rf_init_data
+
Index: sched/gatt.dat
===================================================================
--- /branch/usb/usb_public_base/sched/gatt.dat	(revision 0)
+++ /branch/usb/usb_public_base/sched/gatt.dat	(working copy)
@@ -0,0 +1,85 @@
+
+#attribute list: handle 2bytes, uuid 2bytes, length 1bytes, attribute Nbytes
+mem_le_att_list:
+
+#Primary service GAP ------
+01 00 00 28 02 00 18
+
+#Device name
+02 00 03 28 01 0a
+03 00 00 2a 0c 41 73 74 20 4c 45 20 4d 6f 75 73 65
+
+#Appearance
+04 00 03 28 01 02
+05 00 01 2a 02 c2 03 #3c2=hid mouse
+
+#Peripheral Preferred Connection Parameters
+06 00 03 28 01 02
+07 00 04 2a 08 06 00 06 00 64 00 2c 01 # interval 6ms, latency 100, timeout 300
+
+#Primary service GATT ------
+08 00 00 28 02 01 18
+
+#Service changed
+09 00 03 28 01 20
+0a 00 05 2a 00
+
+#Client Characteristic Configuration
+0b 00 02 29 02 00 00
+
+#Primary service TX power ------
+0c 00 00 28 02 04 18
+#Characteristic Tx power level
+0d 00 03 28 01 06
+0e 00 07 2a 01 00
+
+
+#Primary service Battery ------
+0f 00 00 28 02 0f 18
+#Characteristic Battery level
+10 00 03 28 01 12
+11 00 19 2a 01 38
+
+#Primary service yichip transmit ------
+12 00 00 28 02 f0 18
+#Characteristic tx--notify
+13 00 03 28 01 12
+14 00 f1 2a 14	# for Android device, ATT MTU is just 23 bytes, so payload is 20 bytes max
+'Test read initial va
+#Client Characteristic Configuration
+15 00 02 29 02 00 00
+#Characteristic rx--write
+16 00 03 28 01 0c
+17 00 f0 2a 14 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+
+#End of Attribute list
+00 00
+
+mem_le_adv_enable:01
+mem_le_adv_data_len:03
+
+mem_le_adv_data:02 01 05
+#flags NOTE: should be included here, or Android will not do connectgatt()
+
+
+mem_le_scan_data_len:17
+
+mem_le_scan_data:	# 1 byte length + 1 byte type + N bytes data
+
+#complete local name
+0e 09 
+#'Ast LE2Serial
+'YiChip BLE2IR
+
+#16bit uuid
+03 03 00 f0
+
+#Apperance
+03 19 40 02
+
+
+mem_le_adv_interval:00 08 
+mem_le_adv_channel_map:07 
+
+mem_24g_lap:77 11 00 33 00 00
+
Index: sched/hci_boot.dat
===================================================================
--- /branch/usb/usb_public_base/sched/hci_boot.dat	(revision 0)
+++ /branch/usb/usb_public_base/sched/hci_boot.dat	(working copy)
@@ -0,0 +1,7 @@
+
+mem_device_option:0c
+
+mem_rf_init_data:
+ff
+mem_rf_init_ptr:mem_rf_init_data
+
Index: sched/le_prcp.dat
===================================================================
--- /branch/usb/usb_public_base/sched/le_prcp.dat	(revision 0)
+++ /branch/usb/usb_public_base/sched/le_prcp.dat	(working copy)
@@ -0,0 +1,77 @@
+#attribute list: handle 2bytes, uuid 2bytes, length 1bytes, attribute Nbytes
+mem_le_att_list:
+
+#Primary service GAP ------
+01 00 00 28 02 00 18
+
+#Device name
+02 00 03 28 01 0a
+03 00 00 2a 0c 41 73 74 20 4c 45 20 4d 6f 75 73 65
+
+#Appearance
+04 00 03 28 01 02
+05 00 01 2a 02 c2 03 #3c2=hid mouse
+
+#Peripheral Preferred Connection Parameters
+06 00 03 28 01 02
+07 00 04 2a 08 06 00 06 00 64 00 2c 01 # interval 6ms, latency 100, timeout 300
+
+#Primary service GATT ------
+08 00 00 28 02 01 18
+
+#Service changed
+09 00 03 28 01 20
+0a 00 05 2a 00
+
+#Client Characteristic Configuration
+0b 00 02 29 02 00 00
+
+#Primary service TX power ------
+0c 00 00 28 02 04 18
+#Characteristic Tx power level
+0d 00 03 28 01 06
+0e 00 07 2a 01 00
+
+
+#Primary service Battery ------
+0f 00 00 28 02 0f 18
+#Characteristic Battery level
+10 00 03 28 01 12
+11 00 19 2a 01 38
+
+#Primary service yichip PRCP ------
+12 00 00 28 02 f1 18
+#Characteristic device tx
+13 00 03 28 01 12
+14 00 f3 2a 14 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+#Client Characteristic Configuration
+15 00 02 29 02 00 00
+#Characteristic device rx
+16 00 03 28 01 0e
+17 00 f2 2a 14 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+#End of Attribute list
+00 00
+
+mem_le_adv_data_len:1b
+mem_le_adv_data:0c 09
+'Yichip Temp
+ 03 19 40 02 02 01 05 02 0a 00 03 03 f1 18
+mem_le_scan_data_len:00
+#mem_le_adv_param:00 08 00 08 00 01 00 00 00 00 00 00 00 07 00
+mem_le_adv_enable:01
+
+
+mem_le_adv_interval:20 00 
+mem_le_adv_type:00 
+mem_le_adv_own_addr_type:01 
+mem_le_adv_direct_addr:00 00 00 00 00 00 
+mem_le_adv_channel_map:07 
+
+mem_le_notify_handle:14
+
+mem_lpm_mode:00
+#mem_lpm_ctrl:0f 0f 10 06
+mem_lpm_xtalcnt:0c 10 ca 1f
+mem_device_option:0d
+mem_le_lap:45 67 78 89 90 56
+
Index: sched/le_transmit_uuid.dat
===================================================================
--- /branch/usb/usb_public_base/sched/le_transmit_uuid.dat	(revision 0)
+++ /branch/usb/usb_public_base/sched/le_transmit_uuid.dat	(working copy)
@@ -0,0 +1,62 @@
+mem_device_option: 01
+
+#attribute list: handle 2bytes, uuid 2bytes, length 1bytes, attribute Nbytes
+mem_le_att_list:
+
+#Primary service GAP ------
+01 00 00 28 02 00 18
+
+#Device name
+02 00 03 28 01 0a
+03 00 00 2a 0c 41 73 74 20 4c 45 20 4d 6f 75 73 65
+
+#Appearance
+04 00 03 28 01 02
+05 00 01 2a 02 c2 03 #3c2=hid mouse
+
+#Peripheral Preferred Connection Parameters
+06 00 03 28 01 02
+07 00 04 2a 08 06 00 06 00 64 00 2c 01 # interval 6ms, latency 100, timeout 300
+
+#Primary service GATT ------
+08 00 00 28 02 01 18
+
+#Service changed
+09 00 03 28 01 20
+0a 00 05 2a 00
+
+#Client Characteristic Configuration
+0b 00 02 29 02 00 00
+
+#Primary service TX power ------
+0c 00 00 28 02 04 18
+#Characteristic Tx power level
+0d 00 03 28 01 06
+0e 00 07 2a 01 00
+
+
+#Primary service Battery ------
+0f 00 00 28 02 0f 18
+#Characteristic Battery level
+10 00 03 28 01 12
+11 00 19 2a 01 38
+
+#Primary service yichip transmit ------
+12 00 00 28 02 f0 18
+#Characteristic tx--notify
+13 00 03 28 01 12
+14 00 f1 2a 17 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+#Client Characteristic Configuration
+15 00 02 29 02 00 00
+#Characteristic rx--write
+16 00 03 28 01 0c
+17 00 f0 2a 17 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+
+#End of Attribute list
+00 00
+
+mem_le_adv_data_len:1b
+mem_le_adv_data:0c 09 52 74 72 69 76 72 5f 52 36 32 31 03 19 40 02 02 01 05 02 0a 00 03 03 00 f0
+mem_le_scan_data_len:00
+mem_le_adv_param:00 08 00 08 00 01 00 00 00 00 00 00 00 07 00
+mem_le_adv_enable:01
Index: sched/mouse.dat
===================================================================
--- /branch/usb/usb_public_base/sched/mouse.dat	(revision 0)
+++ /branch/usb/usb_public_base/sched/mouse.dat	(working copy)
@@ -0,0 +1,354 @@
+mem_mouse_flag:
+#mouse flag byte1
+#bit0 MOUSE_SELECT_DEVICE_FLAG
+#bit1 MOUSE_24G_PAIRING_FLAG
+#bit2 MOUSE_STORE_EEPROM_FLAG
+#bit3 MOUSE_BT_CANNEL_RECONN_FLAG
+#bit4 MOUSE_LOW_VOLTAGE_FLAG
+#bit5 MOUSE_BT_DISCOVERY_BUTTON_DOWN_FLAG
+#bit6 MOUSE_BT_DISCOVERY_BUTTON_LONG_DOWN_FLAG
+04
+
+#mouse flag byte2
+#bit0 MOUSE_ENABLE_BLE_RANDOM_ADDRE
+#bit1 MOUSE_ENABLE_2K_EEPROM
+#bit2 MOUSE_ENABLE_INIT_DELAY
+#bit3 MOUSE_ENABLE_WAKEUP_FROM_POWER
+#bit4 MOUSE_ENABLE_16M
+#bit5 MOUSE_ENABLE_USB
+09
+
+#mouse flag byte3
+#bit0 MOUSE_ENABLE_SPI2
+#bit1 MOUSE_ENABLE_24G
+#bit2 MOUSE_ENABLE_FLASH
+#bit3 MOUSE_ENABLE_EEPROM
+#bit4 MOUSE_ENABLE_ADC
+#bit5 MOUSE_ENABLE_KEYBOARD
+#bit6 MOUSE_ENABLE_24G_SEARCH_DONGLE
+4a
+
+#mouse flag byte4
+#bit0 MOUSE_ENABLE_24G_250Hz
+#bit1 MOUSE_ENABLE_24G_500Hz
+#bit2 MOUSE_ENABLE_24G_1000
+#bit3 MOUSE_ENABLE_BT_125Hz
+#bit4 MOUSE_ENABLE_DPI_LEVEL_4
+#bit5 MOUSE_ENABLE_USB_250
+#bit6 MOUSE_ENABLE_USB_500
+#bit7 MOUSE_ENABLE_USB_1000
+00
+
+#mouse flag byte5
+#bit0 MOUSE_ENABLE_POWER_ON_LED
+#bit1 MOUSE_ENABLE_LOW_VOLTAGE_LED
+#bit2 MOUSE_ENABLE_LOW_VOLTAGE_USE_MODE_LED
+#bit3 MOUSE_ENABLE_LOW_VOLTAGE_LED_BLINK_N_SECOND
+#bit4 MOUSE_ENABLE_4_LED
+#bit5 MOUSE_ENABLE_DPI_FOR_4_LED
+#bit6 MOUSE_ENABLE_BT2_FOR_4_LED
+#bit7 MOUSE_ENABLE_LOW_V_FOR_4_LED
+01
+
+#mouse flag byte6 
+#bit0 MOUSE_ENABLE_SELECT_DEVICE_BY_DPI_BUTTON
+#bit1 MOUSE_ENABLE_SELECT_DEVICE_BY_PB_BUTTON
+#bit2 MOUSE_ENABLE_SELECT_DEVICE_BY_SWITCH_GPIO
+#bit3 MOUSE_ENABLE_SELECT_DEVICE_BY_SWITCH_ADC
+#bit4 MOUSE_ENABLE_DPI_KEY_CONNECT_GND
+#bit5 MOUSE_ENABLE_PB_BUTTON_CONNECT_GND
+#bit6 MOUSE_ENABLE_DPI_KEY_CONNECT_ADC
+#bit7 MOUSE_ENABLE_24G_FIRST_AUTO_PAIRING
+80
+
+#mouse flag byte7
+#bit0 MOUSE_ENABLE_AUTO_24G_PARING
+#bit1 MOUSE_ENABLE_24G_POWER_ON_PAIRING
+#bit2 MOUSE_ENABLE_COMMBINATION_KEY_BY_24G_PAIRING
+#bit3 MOUSE_ENABLE_BT_RECONNECT_TIMEOUT_ENTER_DISCOVERY
+#bit4 MOUSE_ENABLE_PB_BUTTON_SHORT_PRESS_ENTER_DISCOVERY
+#bit5 MOUSE_ENABLE_COMMBINATION_KEY_BY_BT_DISCOVERY
+#bit6 MOUSE_ENABLE_DPI_KEY_LONG_PRESS_DISCONVERY
+#bit7 MOUSE_ENABLE_PB_BUTTON_LONG_PRESS_DISCONVERY
+03
+
+#mouse flag byte8
+#bit0 MOUSE_ENABLE_SMOOTHER
+#bit1 MOUSE_ENABLE_XY_OFFSET
+#bit2 MOUSE_ENABLE_24G_AUTO_PAIR_NERVER_BEEN_PAIRED
+#bit3 MOUSE_ENABLE_LE_BATTERY_SERVICE_CANCEL
+#bit4 MOUSE_ENABLE_WHEEL_WAKE_UP_CANCEL
+#bit5 MOUSE_ENABLE_24G_2M_PHY
+03
+
+#bit6-7:custom_key_set:00--win+d     01--ctrl+alt+a    02--ie home    03--play
+#bit5:MOUSE_ENABLE_KEYBOARD				1--enable  0--disable
+#bit4:MOUSE_ENABLE_DPI_LEVEL_4				1--4level   0--3level
+#bit3:MOUSE_ENABLE_16M						1--16M     0--24M
+#bit2:MOUSE_ENABLE_24G_250Hz   				1--250Hz   0--125Hz
+#bit1:MOUSE_ENABLE_24G_SEARCH_DONGLE    	1--enable  0--disable
+#bit0:MOUSE_ENABLE_ADC   					1--enable  0--disable
+mem_mouse_enable_flag:02
+
+
+mem_mouse_param_config:
+0a  #mem_lbutton_gpio
+0b  #mem_mbutton_gpio
+0c  #mem_rbutton_gpio
+0c  #mem_bk_button_gpio
+0b  #mem_fw_button_gpio
+0a  #mem_dpi_button_gpio
+04  #mem_whee_a_data_gpio
+03  #mem_whee_b_data_gpio
+05  #mem_mouse_sensor_sclk_gpio
+06  #mem_mouse_sensor_sdio_gpio
+ff  #mem_select_sensor_angle_gpio
+02  #mem_sensor_angle_default
+01  #mem_sensor_angle_switch
+00  #mem_config_sensor_dpi	#power on default dpi 00--1200  01--1600
+ff  #mem_whee_ta_data_gpio
+ff  #mem_whee_tb_data_gpio
+08  #mem_matrix_public_gpio
+ff  #mem_config_select_device_button_gpio
+ff  #mem_customer_key_gpio
+ff  #mem_sensor_motion_gpio
+ff  #mem_device_switch_gpio
+ff  #mem_mouse_reuse_2ice_gpio
+ff  #mem_config_low_voltage_alarm_gpio
+89  #mem_config_device_24g_led_gpio
+89  #mem_config_device_bt1_led_gpio
+ff  #mem_config_device_bt2_led_gpio	
+ff  #mem_dpi_led_gpio 
+
+#mouse sensor angle
+#0x00 MOUSE_6CLK_ANGLE
+#0X01 MOUSE_9CLK_ANGLE
+#0X02 MOUSE_12CLK_ANGLE
+#0X03 MOUSE_3CLK_ANGLE
+
+
+mem_device_option:08
+mem_device_number:02   #01--only 2.4g   10--2.4g+ble
+
+#ui
+mem_ui_button_gpio:ff
+mem_ui_button_timeout:1e
+mem_ui_led_struct_num:01
+mem_ui_led_struct_ptr:mem_mouse_led_type
+
+#rf
+mem_tx_power:00	#00--0db 01--3db  02--5db  03--f3db  04--f5db
+mem_rssi_buff_index:07
+mem_rssi_signal_buf_ptr:mem_mouse_rssi_signal_buf
+mem_rssi_dis_min_24g_init:85
+mem_rssi_dis_max_24g_init:90
+mem_rssi_dis_min_ble_init:75
+mem_rssi_dis_max_ble_init:80
+mem_rssi_hex_received_max_value_init:63
+mem_power_ctrl_pac_succ_cnt_init:7d
+
+
+#led
+mem_mouse_low_v_led_blink_time:90 01		#200ms on,200ms off
+mem_mouse_dpi_led_blink_time:90 01			#200ms on,200ms off
+mem_mouse_disconvey_led_blink_time:e8 03
+mem_mouse_device_poweron_timer_count_init:14
+
+
+#usb
+mem_usb_offline_check_gpio:ff
+
+#adc
+mem_adc_read_time_init:0a
+mem_adc_config_flag_init:02   #00-vinlpm   01-hvin   02-gpio
+mem_adc_low_volatage_led_blink_timer:64 00
+mem_adc_channel:04       
+#00-gpio4   
+#01-gpio5   
+#02-gpio6  
+#03-gpio7
+#04-gpio9  
+#05-gpio10  
+#06-gpio11  
+#07-gpio12
+
+
+#2.4g
+mem_24g_data_type:01	#01--mouse  02--keyboard
+mem_24g_fast_conn_enable:01
+mem_24g_fast_conn_addr:0f 0f 0f 0f
+mem_mouse_commbination_key_24g:03 #03--LR  05--LM  06--RM  07---LMR
+mem_24g_ch_map_update:00   #00--disable   01--enable
+mem_24g_long_sleep_set_level:02    #00--30ms   01--50ms  02--80ms  03--100ms
+mem_24g_disable_fec1:00	 #00--default mode  01--new process
+
+mem_mouse_24g_pair_tx_power:94 #-20dBm
+mem_mouse_24g_pair_timeout_init:2c 01  #30s	    24g reconn timer&pair timer
+
+mem_24g_enter_hibernate:00 48 60
+mem_24g_long_sleep_param_update_timer_init:2c 01	#30s
+mem_24g_transmit_by_interrupt_exit_count_init:50 00
+mem_mouse_24g_reconn_timeout_init:05 #500ms
+mem_mouse_24g_power_on_fast_conn_timer:05 00	#500ms
+mem_mouse_24g_search_dongle_time_init:64 00	#10s
+mem_store_information_delay_timer_init:05
+
+
+#bt
+mem_24g_lap: 11 21 31 41 51 61
+mem_lpm_mode:01
+mem_lpm_mult:20
+mem_lpm_mult_init:20
+
+
+#ble
+mem_le_lap:71 81 91 a1 b1 c1
+mem_le_adv_channel_map:07
+mem_mouse_direct_timeout:32  #05s
+mem_mouse_discovery_timeout:b0 04	#2min
+mem_mouse_no_data_timeout:70 17   #10mins
+mem_local_rx_max_octets:fb 00 48 08 fb 00 48 08  # 1b
+mem_le_battery_level_updata_timer_init:96 00
+
+mem_le_keyboard_handle:15 00
+mem_le_notify_handle:19 00
+mem_le_multimedia_handle:1d 00
+mem_le_systemctrl_handle:21 00
+mem_le_pairing_handle:2d 00
+mem_le_battery_level_handle:30 00
+
+mem_le_adv_data_len:1f
+mem_le_adv_data:
+#flag
+02 01 05 
+#uuid
+03 03 12 18 
+#appearance
+03 19 c2 03
+
+mem_le_adv_swift_pair:
+#microsoft swift pair
+06 ff 06 00 03 00 80	
+#name
+'\09BT5.2 Mouse
+
+mem_le_scan_data_len:1f
+mem_le_scan_data:
+#name
+'\09BT5.2 Mouse
+
+#max 20bytes, att list data rom limits
+mem_le_name_len:
+'BT5.2 Mouse
+
+mem_le_interval_min:
+07 00 #min interval
+07 00 #max interval
+20 00 #latency
+2c 01 #timeout
+
+mem_le_adv_ind:03 12 18
+mem_le_adv_direct_ind:ff 00 00
+
+mem_device_flag:00	#00--24g 01--bt
+mem_device1_type:34
+mem_device1_locall_addr:71 81 91 a1 b1 c1
+
+mem_flash_base:00 50 00
+mem_eeprom_base:80 1f
+mem_eeprom_block_size:80
+
+mem_mouse_dpi_seting:
+03	#mem_320x_dpi_0
+04	#mem_320x_dpi_1
+01	#mem_320x_dpi_2
+02	#mem_320x_dpi_3
+
+20	#mem_3212_dpi_0
+2a	#mem_3212_dpi_1
+3f	#mem_3212_dpi_2
+15	#mem_3212_dpi_3
+
+22	#mem_ka8g2_dpi_0
+33	#mem_ka8g2_dpi_1
+44	#mem_ka8g2_dpi_2
+11	#mem_ka8g2_dpi_3
+
+mem_sensor_3212_init:
+09 5a
+26 34
+19 04
+09 00
+ff ff
+
+mem_sensor_3205_init:
+09 5a
+0d 10
+1d ed
+7d 80
+ff ff
+
+mem_sensor_8650_init:
+09 5a
+ff 27
+ab 40
+b3 56
+9b e6
+a8 12
+a9 c0
+be e6
+a5 af
+a0 21
+a1 02
+b8 10
+b9 0b
+a7 ff
+b5 d0
+b6 00
+ff 00
+09 00
+ff ff	
+
+mem_sensor_ka8ul_init:
+09 5a
+0d 10
+0e c5
+5b 9a
+10 38
+11 42
+28 28
+41 23
+49 39
+4a b0
+4b a0
+4c 90
+4d 70
+09 00
+ff ff	
+
+mem_sensor_ka8g2_init:
+09 a5
+46 34
+60 07
+69 04
+7d 20
+7e 00
+09 00
+ff ff
+
+mem_sensor_8009_init:
+09 5a
+06 02
+09 69
+0d 48
+0e 9f
+0f ba
+09 00
+ff ff	
+
+mem_sensor_poweron_init:
+09 5a
+0b f3
+09 00
+ff ff
+
Index: sched/mouse_ble_att_list.dat
===================================================================
--- /branch/usb/usb_public_base/sched/mouse_ble_att_list.dat	(revision 0)
+++ /branch/usb/usb_public_base/sched/mouse_ble_att_list.dat	(working copy)
@@ -0,0 +1,626 @@
+01
+00
+02
+00
+28
+02
+00
+18
+02
+00
+02
+03
+28
+01
+0a
+03
+00
+02
+00
+2a
+14
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+04
+00
+02
+03
+28
+01
+02
+05
+00
+02
+01
+2a
+02
+c2
+03
+06
+00
+02
+03
+28
+01
+02
+07
+00
+02
+04
+2a
+08
+06
+00
+06
+00
+64
+00
+2c
+01
+08
+00
+02
+00
+28
+02
+01
+18
+09
+00
+02
+03
+28
+01
+20
+0a
+00
+02
+05
+2a
+00
+0b
+00
+02
+02
+29
+02
+00
+00
+0c
+00
+02
+00
+28
+02
+0a
+18
+0d
+00
+02
+03
+28
+01
+02
+0e
+00
+02
+29
+2a
+06
+59
+69
+43
+68
+69
+70
+0f
+00
+02
+03
+28
+01
+02
+10
+00
+02
+50
+2a
+07
+02
+35
+12
+22
+aa
+01
+00
+11
+00
+02
+00
+28
+02
+12
+18
+12
+00
+02
+03
+28
+01
+06
+13
+00
+02
+4e
+2a
+01
+01
+14
+00
+02
+03
+28
+01
+12
+15
+00
+02
+4d
+2a
+08
+00
+00
+00
+00
+00
+00
+00
+00
+16
+00
+02
+02
+29
+02
+00
+00
+17
+00
+02
+08
+29
+02
+02
+01
+18
+00
+02
+03
+28
+01
+1a
+19
+00
+02
+4d
+2a
+07
+00
+00
+00
+00
+00
+00
+00
+1a
+00
+02
+02
+29
+02
+00
+00
+1b
+00
+02
+08
+29
+02
+01
+01
+1c
+00
+02
+03
+28
+01
+12
+1d
+00
+02
+4d
+2a
+02
+00
+00
+1e
+00
+02
+02
+29
+02
+00
+00
+1f
+00
+02
+08
+29
+02
+03
+01
+20
+00
+02
+03
+28
+01
+12
+21
+00
+02
+4d
+2a
+02
+00
+00
+22
+00
+02
+02
+29
+02
+00
+00
+23
+00
+02
+08
+29
+02
+04
+01
+24
+00
+02
+03
+28
+01
+0e
+25
+00
+02
+4d
+2a
+02
+00
+00
+26
+00
+02
+08
+29
+02
+02
+02
+27
+00
+02
+03
+28
+01
+02
+28
+00
+02
+4b
+2a
+bd
+05
+01
+09
+02
+a1
+01
+85
+01
+09
+01
+a1
+00
+05
+09
+19
+01
+29
+08
+15
+00
+25
+01
+75
+01
+95
+08
+81
+02
+05
+01
+09
+30
+09
+31
+16
+01
+f8
+26
+ff
+07
+75
+10
+95
+02
+81
+06
+09
+38
+15
+81
+25
+7f
+75
+08
+95
+01
+81
+06
+05
+0c
+0a
+38
+02
+95
+01
+81
+06
+c0
+c0
+05
+01
+09
+06
+a1
+01
+85
+02
+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
+26
+ff
+00
+05
+07
+19
+00
+29
+ff
+81
+00
+c0
+05
+0c
+09
+01
+a1
+01
+85
+03
+19
+00
+2a
+ff
+03
+15
+00
+26
+ff
+03
+95
+01
+75
+10
+81
+00
+c0
+05
+01
+09
+80
+A1
+01
+85
+04
+15
+00
+25
+01
+75
+01
+95
+03
+19
+81
+29
+83
+81
+02
+95
+01
+75
+05
+81
+03
+C0
+29
+00
+02
+03
+28
+01
+1a
+2a
+00
+02
+33
+2a
+08
+00
+00
+00
+00
+00
+00
+00
+00
+2b
+00
+02
+02
+29
+02
+01
+00
+2c
+00
+02
+03
+28
+01
+02
+2d
+00
+02
+4a
+2a
+04
+01
+01
+00
+03
+2e
+00
+02
+00
+28
+02
+0f
+18
+2f
+00
+02
+03
+28
+01
+12
+30
+00
+02
+19
+2a
+01
+64
+31
+00
+02
+02
+29
+02
+00
+00
+32
+00
+02
+03
+28
+01
+04
+33
+00
+02
+4c
+2a
+00
+00
+00
Index: sched/remote_car.dat
===================================================================
--- /branch/usb/usb_public_base/sched/remote_car.dat	(revision 0)
+++ /branch/usb/usb_public_base/sched/remote_car.dat	(working copy)
@@ -0,0 +1,46 @@
+
+mem_device_option:0d
+mem_ui_button_gpio:ff
+
+mem_remote_style_struct_led_gpio:06
+mem_remote_car_led_num:01
+mem_remote_car_led_map:
+06
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+
+
+mem_remote_car_key_num:04
+mem_remote_car_key_conf0:
+#0
+03
+#1
+04
+#2
+05
+#3
+07
+#4
+02
+#5
+0a
+#6
+17
+
+mem_24g_tx_phy:84#0x01:1M/0x02:2M/0x04:S2/0x84:S8
+mem_24g_rx_phy:84#0x01:1M/0x02:2M/0x04:S2/0x84:S8
+mem_24g_pair_tx_power:85 #-5dBm
+
+
+mem_24g_lap:01 02 03 04 05 06
+mem_24g_pair_addr:56 34 02 01
+mem_eeprom_base:80 1f		//2keeprom:f0 00
+mem_24g_pair_ch:4e
+
+mem_remote_save_addr_flag: 01
+
Index: sched/rtrivr_uuid.dat
===================================================================
--- /branch/usb/usb_public_base/sched/rtrivr_uuid.dat	(revision 0)
+++ /branch/usb/usb_public_base/sched/rtrivr_uuid.dat	(working copy)
@@ -0,0 +1,75 @@
+#attribute list: handle 2bytes, uuid 2bytes, length 1bytes, attribute Nbytes
+mem_le_att_list:
+
+#Primary service GAP ------
+01 00 00 28 02 00 18
+
+#Device name
+02 00 03 28 01 0a
+03 00 00 2a 0c 41 73 74 20 4c 45 20 4d 6f 75 73 65
+
+#Appearance
+04 00 03 28 01 02
+05 00 01 2a 02 c2 03 #3c2=hid mouse
+
+#Peripheral Preferred Connection Parameters
+06 00 03 28 01 02
+07 00 04 2a 08 06 00 06 00 64 00 2c 01 # interval 6ms, latency 100, timeout 300
+
+#Primary service GATT ------
+08 00 00 28 02 01 18
+
+#Service changed
+09 00 03 28 01 20
+0a 00 05 2a 00
+
+#Client Characteristic Configuration
+0b 00 02 29 02 00 00
+
+#Primary service TX power ------
+0c 00 00 28 02 04 18
+#Characteristic Tx power level
+0d 00 03 28 01 06
+0e 00 07 2a 01 00
+
+#Primary service Immediate alert ------
+0f 00 00 28 02 02 18
+#Characteristic Alert level
+10 00 03 28 01 04
+11 00 06 2a 01 00
+
+#Primary service UUID:f003 ------
+12 00 00 28 02 03 f0
+#Characteristic UUID:f803
+13 00 03 28 01 04
+14 00 03 f8 01 00
+
+
+#Primary service Link loss alert ------
+15 00 00 28 02 03 f0
+#Characteristic Alert level
+16 00 03 28 01 0a
+17 00 06 2a 01 00
+
+#Primary service UUID:f002 ------
+18 00 00 28 02 02 f0
+#Characteristic UUID:f802
+19 00 03 28 01 12
+1a 00 02 f8 01 28
+1b 00 02 29 02 00 00
+
+#Primary service Battery ------
+1c 00 00 28 02 0f 18
+#Characteristic Battery level
+1d 00 03 28 01 12
+1e 00 19 2a 01 38
+
+
+#End of Attribute list
+00 00
+
+mem_le_adv_data_len:1b
+mem_le_adv_data:0c 09 52 74 72 69 76 72 5f 52 36 32 31 03 19 40 02 02 01 05 02 0a 00 03 03 00 f0
+mem_le_scan_data_len:00
+mem_le_adv_param:00 08 00 08 00 01 00 00 00 00 00 00 00 07 00
+mem_le_adv_enable:01
Index: sched/shutter.dat
===================================================================
--- /branch/usb/usb_public_base/sched/shutter.dat	(revision 0)
+++ /branch/usb/usb_public_base/sched/shutter.dat	(working copy)
@@ -0,0 +1,12 @@
+mem_device_option:09
+mem_ui_button_gpio:ff
+
+mem_le_lap:38 31 20 98 07 2a
+mem_le_name_len:
+'AB Shutter3
+
+mem_shutter_key_conf0_temp:04 06 05 00 06
+
+mem_shutter_soft_switch_first_power_on:00
+
+
Index: sched/sim.dat
===================================================================
--- /branch/usb/usb_public_base/sched/sim.dat	(revision 0)
+++ /branch/usb/usb_public_base/sched/sim.dat	(working copy)
@@ -0,0 +1,53 @@
+
+
+mem_lpm_xtalcnt:33 0a 1b af 07
+mem_lpm_ctrl3:30 80 10 24
+mem_fcomp_div:24
+
+mem_xtal_freq:18	#24MHz
+mem_set_cdb_on:00
+mem_syn_cal_ctrl:00
+
+mem_le_lap:11 22 33
+mem_le_adv_data_len:1b
+mem_le_adv_data:0c 09
+'Yichip Temp
+ 03 19 40 02 02 01 05 02 0a 00 03 03 f1 18
+mem_le_ch_mapped:24
+mem_le_adv_interval:20 00
+mem_le_scan_window:20 00
+mem_le_scan_type:01
+mem_le_adv_own_addr_type:01
+
+
+mem_patch00:01
+
+4580:ff
+mem_rf_init_ptr:80 45		
+
+
+
+
+
+
+#ecb enc data
+4f00:
+0a94 0bb5 416e f045 f1c3 9458 c653 ea5a 
+
+
+#cbc xor data
+4e00:
+5a5a 5a5a 5a5a 5a5a 6363 6363 6363 6363
+
+#cbc enc data1
+4e20:
+7033 eafa b089 698f 43cb 1050 1e73 1109 
+
+#cbc enc data2
+4e30:
+3cfd e1a1 eb69 42b0 2593 3009 5238 53f9 
+
+
+
+
+
Index: sched/spp.dat
===================================================================
--- /branch/usb/usb_public_base/sched/spp.dat	(revision 0)
+++ /branch/usb/usb_public_base/sched/spp.dat	(working copy)
@@ -0,0 +1,206 @@
+#device option
+mem_device_option:04
+
+#spp uuid
+mem_uuid_list:
+04
+10
+02
+12
+00
+01
+00
+00
+01
+00
+01
+00
+01
+36
+00
+5a
+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
+05
+35
+03
+19
+10
+02
+09
+00
+09
+35
+08
+35
+06
+19
+12
+00
+09
+01
+00
+09
+02
+00
+09
+01
+03
+09
+02
+01
+09
+05
+ac
+09
+02
+02
+09
+02
+39
+09
+02
+03
+09
+06
+44
+09
+02
+04
+28
+01
+09
+02
+05
+09
+00
+02
+03
+11
+01
+00
+03
+01
+00
+00
+01
+00
+03
+36
+00
+4e
+09
+00
+00
+0a
+00
+01
+00
+03
+09
+00
+01
+35
+03
+19
+11
+01
+09
+00
+02
+0a
+00
+00
+00
+00
+09
+00
+04
+35
+0c
+35
+03
+19
+01
+00
+35
+05
+19
+00
+03
+08
+01
+09
+00
+05
+35
+03
+19
+10
+02
+09
+00
+06
+35
+09
+09
+65
+6e
+09
+00
+6a
+09
+01
+00
+09
+01
+00
+25
+0a
+53
+50
+50
+20
+73
+6c
+61
+76
+65
+00
+00
+00
+01
Index: sched/test.dat
===================================================================
--- /branch/usb/usb_public_base/sched/test.dat	(revision 0)
+++ /branch/usb/usb_public_base/sched/test.dat	(working copy)
@@ -0,0 +1,161 @@
+mem_lap:77 11 00 33 00 00
+mem_le_lap:88 11 00 33 00 00
+mem_device_option:05
+mem_local_name_length:
+'1308AA
+
+
+mem_lpm_mult:0
+mem_lpm_mult_timeout:03
+mem_lpm_overhead:05
+mem_lpm_mode:01
+mem_scan_mode:03
+mem_le_adv_enable:00
+
+mem_class:cc 25 00
+mem_features:
+ff
+ff
+8f
+f8	#fe--EDR  F8--BR
+9b	#AFHclose 83
+9d
+59
+83
+
+mem_le_adv_interval:00 02 
+mem_le_adv_channel_map:07
+mem_le_adv_data_len:03
+mem_le_adv_data:
+02 01 0e
+
+mem_le_scan_data_len:0a
+mem_le_scan_data:
+'\09test1308
+
+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:
+#Primary service GAP ------
+01 00 02 00 28 02 00 18
+
+
+#Appearance
+02 00 02 03 28 01 02
+03 00 02 01 2a 02 c8 00 #3c2=hid mouse
+
+#Device name
+04 00 02 03 28 01 0a
+05 00 02 00 2a 14 41 73 74 20 4c 45 20 4d 6f 75 73 65 20 20 20 20 20 20 20 20
+
+
+#Peripheral Preferred Connection Parameters
+06 00 02 03 28 01 02
+07 00 02 04 2a 08 06 00 06 00 64 00 2c 01 # interval 6ms, latency 100, timeout 300
+
+
+#privcy flag
+08 00 02 03 28 01 02
+09 00 02 02 2a 01 01
+
+#reconnecting addr 
+0a 00 02 03 28 01 08
+0b 00 02 03 2a 06 00 00 00 00 00 00
+
+#Primary service GATT ------
+0c 00 02 00 28 02 01 18
+
+#Service changed
+0d 00 02 03 28 01 20
+0e 00 02 05 2a 00
+#Client Characteristic Configuration
+0f 00 02 02 29 02 00 00
+
+#Primary service TX power ------
+10 00 02 00 28 02 04 18
+#Characteristic Tx power level
+11 00 02 03 28 01 16
+12 00 02 07 2a 01 00
+13 00 02 02 29 02 00 00
+
+#Primary service Battery ------
+14 00 02 00 28 02 0f 18
+#Characteristic Battery level
+15 00 02 03 28 01 12
+16 00 02 19 2a 01 38
+
+#Primary service device infomation
+17 00 02 00 28 02 0a 18
+#Characteristic system id
+18 00 02 03 28 01 02
+19 00 02 23 2a 03 00 00 00
+
+#Characteristic manufactor name
+1a 00 02 03 28 01 02
+1b 00 02 29 2a 08 46 6c 61 67 74 72 69 70
+
+#Characteristic module number
+1c 00 02 03 28 01 02
+1d 00 02 24 2a 06 79 69 63 68 69 70
+
+#Characteristic serial number
+1e 00 02 03 28 01 02
+1f 00 02 25 2a 04 63 6f 6d 33
+
+#Characteristic firmware version
+20 00 02 03 28 01 02
+21 00 02 26 2a 03 31 2e 30
+
+#Characteristic software version
+22 00 02 03 28 01 02
+23 00 02 28 2a 03 31 2e 30
+
+#Characteristic hardware version
+24 00 02 03 28 01 02
+25 00 02 2a 2a 03 31 2e 30
+
+#Characteristic regulatory version
+26 00 02 03 28 01 02
+27 00 02 25 2a 04 63 6f 6d 33
+
+#Primary service yichip transmit ------
+28 00 02 00 28 10 55 e4 05 d2 af 9f a9 8f e5 4a 7d fe 43 53 53 49
+#Characteristic tx--notify read
+29 00 02 03 28 01 12
+2a 00 10 16 96 24 47 C6 23 61 BA D9 4B 4D 1E 43 53 53 49 14 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+#Client Characteristic Configuration
+2b 00 02 02 29 02 00 00
+
+#Characteristic rx--write
+2c 00 02 03 28 01 08
+2d 00 10 b3 9b 72 34 be ec d4 a8 f4 43 41 88 43 53 53 49 14 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+
+#Characteristic rx-- write without Response
+2e 00 02 03 28 01 04
+2f 00 10 fe 69 ca 9a 56 19 f6 ab 02 4d aa 6d 43 53 53 49 14 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+
+#Characteristic rx tx --read write notify
+30 00 02 03 28 01 2a
+31 0010 18 03 A6 28 5E D8 EC 91 1C 48 A3 AC 43 53 53 49 14 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+#Client Characteristic Configuration
+32 00 02 02 29 02 00 00
+
+#Primary service yichip transmit ------
+33 00 02 00 28 02 e7 fe 
+#Characteristic tx--indicate
+34 00 02 03 28 01 20
+35 00 02 c8 fe 14 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+#Client Characteristic Configuration
+36 00 02 02 29 02 00 00
+
+#Characteristic rx--write,read
+37 00 02 03 28 01 0a
+38 00 02 c7 fe 14 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+
+#Characteristic - read
+39 00 02 03 28 01 02
+3a 00 02 c9 fe 06 11 22 33 44 55 66
+
+#End of Attribute list
+00 00
Index: sched/usb_confdata.dat
===================================================================
--- /branch/usb/usb_public_base/sched/usb_confdata.dat	(revision 0)
+++ /branch/usb/usb_public_base/sched/usb_confdata.dat	(working copy)
@@ -0,0 +1,60 @@
+3b
+09
+02
+3b
+00
+02
+01
+00
+a0
+32
+09
+04
+00
+00
+01
+03
+01
+01
+00
+09
+21
+00
+02
+00
+01
+22
+1a
+00
+07
+05
+81
+03
+40
+00
+02
+09
+04
+01
+00
+01
+03
+01
+02
+00
+09
+21
+00
+02
+00
+01
+22
+a3
+00
+07
+05
+82
+03
+40
+00
+02
\ No newline at end of file
Index: sched/usb_devicedata.dat
===================================================================
--- /branch/usb/usb_public_base/sched/usb_devicedata.dat	(revision 0)
+++ /branch/usb/usb_public_base/sched/usb_devicedata.dat	(working copy)
@@ -0,0 +1,19 @@
+12
+12
+01
+00
+02
+00
+00
+00
+40
+51
+31
+20
+10
+02
+00
+01
+02
+00
+01
\ No newline at end of file
Index: sched/usb_kbdata.dat
===================================================================
--- /branch/usb/usb_public_base/sched/usb_kbdata.dat	(revision 0)
+++ /branch/usb/usb_public_base/sched/usb_kbdata.dat	(working copy)
@@ -0,0 +1,64 @@
+3f
+05
+01
+09
+06
+a1
+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
Index: sched/usb_kbdata_vendor_define.dat
===================================================================
--- /branch/usb/usb_public_base/sched/usb_kbdata_vendor_define.dat	(revision 0)
+++ /branch/usb/usb_public_base/sched/usb_kbdata_vendor_define.dat	(working copy)
@@ -0,0 +1,27 @@
+1a
+06
+bc
+ff
+09
+88
+a1
+01
+85
+04
+19
+00
+2a
+ff
+00
+15
+00
+26
+ff
+00
+75
+08
+95
+01
+81
+00
+c0
\ No newline at end of file
Index: sched/usb_msdata.dat
===================================================================
--- /branch/usb/usb_public_base/sched/usb_msdata.dat	(revision 0)
+++ /branch/usb/usb_public_base/sched/usb_msdata.dat	(working copy)
@@ -0,0 +1,164 @@
+a3
+05
+01
+09
+02
+a1
+01
+85
+01
+09
+01
+a1
+00
+05
+09
+19
+01
+29
+05
+15
+00
+25
+01
+95
+05
+75
+01
+81
+02
+95
+01
+75
+03
+81
+01
+05
+01
+09
+30
+09
+31
+16
+01
+F8
+26
+FF
+07
+75
+10
+95
+02
+81
+06
+09
+38
+15
+81
+25
+7f
+75
+08
+95
+01
+81
+06
+05
+0c
+0a
+38
+02
+95
+01
+81
+06
+c0
+c0
+05
+01
+09
+80
+a1
+01
+85
+02
+05
+01
+19
+81
+29
+88
+15
+00
+25
+01
+95
+08
+75
+01
+81
+06
+c0
+05
+0c
+09
+01
+a1
+01
+85
+03
+15
+00
+26
+80
+03
+19
+00
+2a
+80
+03
+75
+10
+95
+01
+81
+00
+c0
+06
+00
+ff
+09
+0e
+a1
+01
+85
+BA
+95
+1f
+75
+08
+26
+ff
+00
+15
+00
+09
+01
+91
+02
+85
+BA
+95
+1f
+75
+08
+26
+ff
+00
+15
+00
+09
+01
+81
+02
+C0
\ No newline at end of file
Index: util/crc16.exe
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Index: util/crc16.exe
===================================================================
--- /branch/usb/usb_public_base/util/crc16.exe	(revision 0)
+++ /branch/usb/usb_public_base/util/crc16.exe	(working copy)

Property changes on: util/crc16.exe
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: util/eeprom2fulleeprom.exe
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Index: util/eeprom2fulleeprom.exe
===================================================================
--- /branch/usb/usb_public_base/util/eeprom2fulleeprom.exe	(revision 0)
+++ /branch/usb/usb_public_base/util/eeprom2fulleeprom.exe	(working copy)

Property changes on: util/eeprom2fulleeprom.exe
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: util/eeprom2fulleeprom.pl
===================================================================
--- /branch/usb/usb_public_base/util/eeprom2fulleeprom.pl	(revision 0)
+++ /branch/usb/usb_public_base/util/eeprom2fulleeprom.pl	(working copy)
@@ -0,0 +1,18 @@
+
+
+
+$source_file = $ARGV[0];
+$eeprom_size = $ARGV[1];
+
+open(EEP,"$source_file") or die("cannot open files");
+for ($i = 1 ;$i<=$eeprom_size*128-2;$i++)
+{
+
+    while (<EEP>) { 
+        $c = hex();
+        printf "%02x\n", $c;
+        $i++;
+    }
+
+	printf "FF\n";
+}
Index: util/eeprom2otp.pl
===================================================================
--- /branch/usb/usb_public_base/util/eeprom2otp.pl	(revision 0)
+++ /branch/usb/usb_public_base/util/eeprom2otp.pl	(working copy)
@@ -0,0 +1,24 @@
+
+#鏀瑰墠涓変釜瀛楄妭涓0200锛
+#杈撳叆涓涓枃浠讹紝杈撳嚭涓涓枃浠讹紱
+
+if(@ARGV < 2) {
+	printf "less files\n";
+	exit;
+}
+else{
+	open(file, $ARGV[0]) or die "Can't open  file  : $!"; 
+	open(file_out, ">$ARGV[1]")or die "Can't open out file  : $!"; 
+	@lines = <file>;
+	$length = @lines;
+	
+	my $j=2;
+	print file_out "00\n01\n";
+	while($j<$length){
+			print file_out "$lines[$j]";
+			$j++;
+	}
+#	print "----- reverse end -----";
+	close(file);
+	close(file_out);
+}
Index: util/mergepatch.pl
===================================================================
--- /branch/usb/usb_public_base/util/mergepatch.pl	(revision 0)
+++ /branch/usb/usb_public_base/util/mergepatch.pl	(working copy)
@@ -0,0 +1,335 @@
+#!/usr/bin/perl
+$defs = "";
+
+sub alloc {
+	my($end, %mc) = @_;
+	my(%eadr) = ();
+	my($tstr, $str, $i, $j, $addr);
+	my($tstr) = "";
+	
+	foreach $i (sort keys %mc) {
+		if($i =~ /(.+)_(.+)/ && exists($eadr{$1})) {
+			$addr = $eadr{$1};
+		} else {
+			$addr = $end;
+		}
+		for($j = 0;$j <= $#{$mc{$i}};$j++) {
+			if($mc{$i}[$j] =~ /^\s*([0-9]+)\s+([a-zA-Z0-9_]+)\s*(.*)$/) {
+				$str = sprintf "0x%04x %s%s\n", $addr, $2, $3;
+				$var{$2} = $addr;
+				$addr += $1;
+				$tstr .= $str;
+			}
+		}
+		$eadr{$i} = $addr;
+	}
+	if($addr > 0x4000) {
+		$xend = $addr if($addr > $xend);
+	} else {
+		$bend = $addr if($addr > $bend);
+	}
+	return $tstr . "\n";
+}
+
+
+sub malloc {
+	$path="output/bt_format.meta";
+	open file, $path;
+	@f = <file>;
+	close file;
+	open file, ">$path";
+	$path =~ s/\/.*//;
+	open file1, ">output/memmap.format";
+	$xaddr = 0x4000;
+	$addr = 0;
+	if($#ARGV == 1) {
+		$addr = hex($ARGV[0]);
+		$xaddr = hex($ARGV[1]);
+	}
+	for($i = 0, $ocnt = 0;$i < @f;$i++) { 
+		$_ = $f[$i];
+		$start = 1 if(/^\s*memalloc\s*\(\s*$/);		# allocate from 0
+		$start = 2 if(/^\s*xmemalloc\s*\(\s*$/);	# allocate from 4000
+		$start = 3 if(/^\s*omemalloc\s*\(\s*$/);	# allocate after all xmemalloc, mutex from each other(obsolete, for compatibility)
+		if(/^\s*([ax]*)memalloc\s+([a-zA-Z_0-9]+)\s*\(\s*$/) {
+			$start = $1 eq 'a' ? 5 : $1 eq 'x' ? 6 : 7;
+			$basev = $2;
+		}
+		if($start) {
+			if(/^\s*([a-zA-Z0-9_]+)\s+([a-zA-Z0-9_]+)\s*(.*)$/ && exists($def2{$1})) {		# macro for size
+				$_ = sprintf("%s %s %s", $def2{$1}, $2, $3);
+			}
+			if(/^\s*([0-9]+)\s+([a-zA-Z0-9_]+)\s*(.*)$/) {
+				if($start == 1) {
+					$str = sprintf "0x%04x %s%s\n", $addr, $2, $3;
+					$var{$2} = $addr;
+					$addr += $1;
+					$bstr .= $str;
+				} elsif($start == 2) {
+					$str = sprintf "0x%04x %s%s\n", $xaddr, $2, $3;
+					$var{$2} = $xaddr;
+					$xaddr += $1;
+					$xstr .= $str;
+				} else {
+					push @ostr, $_;
+				}
+			}
+			if(/^\s*\)\s*$/) {
+				if(@ostr > 0) {
+					if($start == 3) {
+						push @{$xmalloc{$ocnt}}, @ostr;
+						$ocnt++;
+					} elsif($start == 5) {
+						push @aaddr,$basev;
+						push @amalloc,[@ostr];
+					} elsif($start == 6) {
+						push @{$xmalloc{$basev}}, @ostr;
+					} elsif($start == 7) {
+						push @{$malloc{$basev}}, @ostr;
+					} 
+				}
+				$start = 0;
+				@ostr = ();
+			}
+		} else {
+			$def2{$2} = $1 if(/^\s*([0-9]+)\s+([a-zA-Z0-9_]+)\s*(.*)$/);
+			$sstr .= $_;
+		}
+	}
+	
+#--------------------- o/x/memalloc process -----------------------
+	$bend = $addr, $xend = $xaddr;
+	$bstr .= alloc($addr, %malloc);
+	$xstr .= alloc($xaddr, %xmalloc);
+
+#--------------------- amemalloc process -----------------------
+	for($i = 0;$i <= $#aaddr;$i++) {
+		for($j = 0, $addr = $aaddr[$i] =~ /^0x([0-9a-f]+)/ ? hex($1) : $var{$aaddr[$i]};$addr != 0 && $j <= $#{$amalloc[$i]};$j++) {
+			if($amalloc[$i][$j] =~ /^\s*([0-9]+)\s+([a-zA-Z0-9_]+)\s*(.*)$/) {
+				$str = sprintf "0x%04x %s%s\n", $addr, $2, $3;
+				$addr += $1;
+				if($addr < 0x4000) {
+					$bstr .= $str;
+				} else  {
+					$xstr .= $str;
+				}
+			}
+		}
+	}
+
+	
+	print file $bstr, $xstr, $sstr;
+	print file1 $bstr, $xstr;
+	close file;
+	close file1;
+	printf "\nLast allocated address is %04x\n", $bend;
+	printf "\nLast allocated xmem address is %04x\n", $xend;
+}
+
+
+sub getdefs {
+	my($def) = @_;
+	my(@ifdefs) = split(/\s*\|\s*/, $def);
+	my $v = 0;
+	foreach (@ifdefs) {
+		s/\s//g;
+		$v = 1 if($defs =~ /(^|\s)$_(\s|$)/);
+	}
+	return $v;
+}
+
+sub parseif {
+	my($fname) = @_;
+	open file, $fname;
+	@f = <file>;
+	close file;
+	open file, ">$fname";
+	@valid = (1);
+	for($i = 0;$i < @f;$i++) { 
+		$_ = $f[$i];
+		s/\/\*.*\*\///g;
+		$comment = 1 if(/\/\*/ && !/\/\//);
+		if($comment) {
+			$comment = 0 if(/\*\//);
+			next;
+		}
+		if(/^\s*ifdef\s+(.+)$/) {
+			$v = getdefs($1) ? 1 : 0;
+			push @valid, $v & $valid[$#valid];
+		} elsif(/^\s*ifndef\s+(.+)$/) {
+			$v = getdefs($1) ? 0 : 1;
+			push @valid, $v & $valid[$#valid];
+		} elsif(/^\s*else/) {
+			printf "%s\nelse without if at line %d\n", $f[$i - 3], $i if($#valid == 0);
+			if($#valid == 0) {
+				for($j = -10;$j < 10;$j++) {
+					print $f[$i + $j];
+				}
+				last;
+ 				$i = $i;
+			}
+			$valid[$#valid] = (1 - $valid[$#valid]) & $valid[$#valid - 1];
+		} elsif(/^\s*endif/) {
+			printf "%s\nendif without if at line %d\n", $_, $i if($#valid == 0);
+			if($#valid == 0) {
+				for($j = -10;$j < 10;$j++) {
+					print $f[$i + $j];
+				}
+				last;
+ 				$i = $i;
+			}
+			pop @valid;
+		} elsif($valid[$#valid]) {
+			if(/^include\s+(.+)\s*/) {
+				open file2, "program/$1";
+				@f2 = <file2>;
+				close file2;
+				splice(@f, $i + 1, 0, @f2);
+			} else {
+			if(/^define\s+(\w+)\s*/) {
+				$defs .= $1 . " " 
+			}
+				print file $_;
+			}
+		}
+	}
+	close file;
+}
+
+sub genpatch
+{
+	print "genpatch\n";
+	$patched = 0;
+	open file,"output/bt_program23.meta";
+	while(<file>) {
+		if(/^\s*beq\s+patch([0-9a-f]+)_([0-7]),/) {
+			$a = hex($1), $b = hex($2);
+			$bits[$a] |= 1 << $b;
+			$patched = 1;
+		}
+	}
+	close file;
+	return if(!$patched);
+	open file,"output/sched.rom";
+	@sched = <file>;
+	close file;
+	for($j = 0;$j < 0x40;$j++) { 
+		$s .= sprintf ("%02x   #mem_patch%02x\n", $bits[$j], $j);
+	}
+	$s .= "\n\n";
+	for($i = $skip = 0;$i < @sched;$i++) {
+		$_ = $sched[$i];
+		if($skip > 0 && /:/) {
+			splice(@sched, $skip, $i - $skip, $s);
+			last;
+		}
+		$skip = $i + 1 if(/^mem_patch00:\s*$/);
+	}
+	if($skip == 0) {
+		$s = "mem_patch00:\n" . $s;
+		splice(@sched, 0, 0, $s);
+	}
+	open file,">output/sched.rom";
+	for($i = 0;$i < @sched;$i++) { print file $sched[$i]; }
+	close file;
+}
+
+sub zcode {
+	open file, "output/bt_program23.meta";
+	@f = <file>;
+	close file;
+	for($i = $label = $line[0] = 0, $z = 1;$i < @f;$i++) {
+		$_ = $f[$i];
+		$line[0] = $i - 1 if(/^org\s+0x([23]000|800)/ && $line[0] == 0);
+		if(/^org z\s*$/) {
+			$line[$z/0x10000 + 1] = $i - 1;
+			$z += 0x10000;
+			$f[$i] = sprintf("org 0x%x\n", $z);
+			$label = 1;
+		}
+		if(/^(\w+):\s*$/ && $label == 1) {
+			$lab{$1} = $z;
+			$label = 2;
+		}
+	}
+	return if($z == 1);
+	$line[$z/0x10000 + 1] = $i - 1;
+	for($i = 0;$i < @f;$i++) {
+		$_ = $f[$i];
+		$label = "";
+		if(/^\s*(branch|nbranch|call|ncall|setarg)\s+(\w+)\s*$/ || /^\s*(branch|nbranch|call|ncall|arg)\s+(\w+)\s*,\s*(\w+)\s*$/) {
+			$label = $2;
+		}
+		if(/^\s*(bmark|beq|bne|bbit[01])\s+(\w+)\s*,\s*(\w+)\s*$/) {
+			$label = $3;
+		}
+		$branch = /^\s+branch\s+$label\s*$/ ? 1 : 0;
+		if(exists($lab{$label})) {
+			$nlabel = "jmpz_" . $label;
+			$f[$i] =~ s/$label/eval "$nlabel"/e;
+			if($lab{$label} > 100) {
+				$z = int($lab{$label}/0x1000);
+				$l = $i < $line[1] ? $line[0] : $line[$z/10 - 1];
+				if($branch && $i >= $line[1]) {
+					$f[$i] = sprintf("\tsetarg 0x%x\n\tbranch p_zcode_entrance_2Bytes_common\n\n", $z);
+				} else {
+					$f[$l] .= sprintf("%s:\n\tsetarg 0x%x\n\tbranch p_zcode_entrance_2Bytes_common\n\n", $nlabel, $z);
+				}
+				$lab{$label} = 1;
+			}
+		}
+	}
+	open file, ">output/bt_program23.meta";
+	for($i = 0;$i < @f;$i++) {
+		if($f[$i] =~ /^\s*bbit1 8,pf_patch_ext\s*$/) {
+			printf file ("p_start:\n\tbranch p_patch_array\n\np_zcode:\n");
+			for($j = 0;$j < 63;$j++) {
+				printf file "\tnop %d\n", $j + 1;
+			}
+			printf file "p_patch_array:\n";
+		}
+		print file $f[$i];
+	}
+	close file;
+}
+
+sub authrom {
+	$addr = 0x9000;
+	foreach $s (@ARGV) {
+		open f, "../sched/" . $s . ".dat" or die "cannot open dat file $s";
+		@ff = <f>;
+		close f;
+		foreach (@ff) { $_ =~ s/\s//g;push @auth, $_ . "\n"; }
+		printf "0x%x %s_ADDR\n", $addr, uc($s);
+		$addr += $#ff + 1;
+	}
+	open f,">auth.rom";
+	print f @auth;
+	close f;
+	open f,"romcode.rom" or return;
+	@rom = <f>;
+	close f;
+	for($i = 0, $j = $#rom - 0x1ff;$i < 0x200;$i++,$j++) {
+		for($k = 0, $l = "";$k < 4;$k++) {
+			$_ = $auth[$i*4 + $k];
+			s/\s//g;
+			$_ = "00" if(/^$/);
+			$l =  $_ . $l;
+		}
+		$rom[$j] = $l . "\n";
+	}
+	open f,">romcode.rom";
+	print f @rom;
+	close f;
+}
+
+if(@ARGV > 0) {
+	authrom();
+	exit;
+}
+
+parseif("output/bt_program23.meta");
+parseif("output/bt_format.meta");
+genpatch() if($defs !~ / SIM /);
+malloc();
+zcode();
Index: util/patch.pl
===================================================================
--- /branch/usb/usb_public_base/util/patch.pl	(revision 0)
+++ /branch/usb/usb_public_base/util/patch.pl	(working copy)
@@ -0,0 +1,49 @@
+#!/usr/bin/perl
+
+
+
+@dirs = (".");
+while(@dirs){
+   $d = $dirs[0];
+   opendir folder, $d || die "Can not open this directory";
+   @filelist = readdir folder; 
+   closedir folder;
+   foreach (@filelist) {
+      $f = $d . "/" . $_;
+      next if($_ eq "." || $_ eq "..");
+      push(@dirs, $f) if(-d $f) ;
+      push(@files,$f) if(-f $f);
+    }
+   shift @dirs;
+}
+
+for($i = 0;$i < @files;$i++) {
+	if($files[$i] =~ /bt\.prog/) {
+		($files[$i],$files[0]) = ($files[0],$files[$i]);
+		last;
+	}
+}
+
+
+for($i = $byte = $bit = 0;$i < @files;$i++) {
+	next if($files[$i] =~ /patch\.prog|sim\.prog/ || $files[$i] !~ /\.prog/);
+	open(FILE, $files[$i]) or next;
+	@file = <FILE>;
+	close FILE;
+	open(FILE, "> $files[$i]");
+	for($j = 0;$j < @file;$j++) {
+		$_ = $file[$j];
+		if(/bpatch.*,.*/) {
+			printf FILE "\t%s patch%02x_%d,mem_patch%02x\n", $byte > 31 ? "bpatchx" : "bpatch" , $byte, $bit, $byte;
+			if(++$bit > 7)
+			{
+				$bit = 0;
+				$byte++;
+			}
+		} else {
+			print FILE $_;
+		}
+	}
+	close(FILE);
+}
+printf "Total patches : %d, last patch number is:%02x bit %d\n", $byte*8+$bit, $byte, $bit;
Index: util/romcrc.pl
===================================================================
--- /branch/usb/usb_public_base/util/romcrc.pl	(revision 0)
+++ /branch/usb/usb_public_base/util/romcrc.pl	(working copy)
@@ -0,0 +1,54 @@
+#!/bin/perl
+sub crc16_ccitt2
+{
+	my($crc, $c) = @_;
+
+  $crc  = ($crc >> 8) | ($crc << 8);
+  $crc ^= $c;
+  $crc ^= ($crc & 0xff) >> 4;
+  $crc ^= $crc << 12;
+  $crc ^= ($crc & 0xff) << 5;
+  $crc &= 0xffff;
+ return $crc;
+}
+
+sub gencrc
+{
+  my($crc, $c) = @_;
+  my($i);
+	$c =~ s/\s//g;
+  for($i = 0;$i < length($c);$i+=2) {
+  	$crc = crc16_ccitt2($crc, hex(substr($c, $i, 2)));
+  }
+  return $crc;
+}
+
+open f,"$ARGV[0]" or die "open romfile fail";
+@txt = <f>;
+close f;
+$len = $len0 = $#txt;
+$len = hex($ARGV[1]) if(@ARGV > 1);
+for($i = 0, $crc = 0xffff;$i < $len;$i++) {
+	if($i <= $len) {
+		$_ = $txt[$i];
+		s/\s//g;
+		$wid = length($_) if($i == 0);
+		$crc = gencrc($crc, $_);
+		$txt[$i] = $_ . "\n";
+	} else {
+		$txt[$i] = join('', map('0', 1..$wid)) . "\n";
+		$crc = gencrc($crc, $txt[$i]);
+	}
+}
+if($wid > 4) {
+	$txt[$len] = join('', map('0', 1..($wid - 4)));
+	$crc = gencrc($crc, $txt[$i]);
+	$txt[$len] .= sprintf("%04x", $crc);
+} else {
+	$txt[$len] .= sprintf("%02x\n%02x\n", $crc >> 8, $crc & 0xff);
+}
+
+printf "%02x\n%02x\n", $crc >> 8, $crc & 0xff;
+open f,">$ARGV[0]";
+print f @txt;
+close f;
