Index: do_patch.bat
===================================================================
--- /Branch/keyboard/C51SDK/btkb/do_patch.bat	(nonexistent)
+++ /Branch/keyboard/C51SDK/btkb/do_patch.bat	(working copy)
@@ -0,0 +1,144 @@
+@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=shutter
+@rem set device_option=hci
+@rem set device_option=kb
+@set device_option=mouse
+@rem set device_option=le_kb
+@rem set device_option=dongle
+@rem set device_option=module
+@rem set device_option=prcp
+
+@echo off
+
+setlocal enabledelayedexpansion
+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% > output\bt_program23.meta
+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/mergepatch.pl
+perl util/memalloc.pl
+
+perl util/transform_memmap2btreg.pl output/memmap.format format/memblocks.format ..\c51\btreg.h
+
+cd output
+osiuasm bt_program23 -O-W
+
+if "%device_option%" equ "hci" (
+  copy ..\sched\ssp.dat + ..\sched\hci.dat +  ..\sched\revc.dat ..\output\sched.rom
+) else if "%device_option%" equ "kb" (
+copy ..\sched\ssp.dat + ..\sched\kb.dat +  ..\sched\revc.dat ..\output\sched.rom
+) else if "%device_option%" equ "le_kb" (
+  copy ..\sched\le_kb.dat +  ..\sched\revc.dat ..\output\sched.rom
+) else if "%device_option%" equ "mouse" (
+	copy  ..\sched\patch.dat   +  ..\sched\user.dat + ..\sched\rf.dat ..\output\sched.rom
+) else if "%device_option%" equ "module" (
+  copy  ..\sched\ssp.dat + ..\sched\DM_module.dat +   ..\sched\revc.dat ..\output\sched.rom
+) else if "%device_option%" equ "shutter" (
+  copy ..\sched\ssp.dat + ..\sched\shutter.dat +  ..\sched\revc.dat ..\output\sched.rom
+) else if "%device_option%" equ "dongle" (
+  copy ..\sched\dongle.dat +  ..\sched\usb.dat +  ..\sched\revc.dat ..\output\sched.rom
+) else if "%device_option%" equ "prcp" (
+  copy ..\sched\Le_prcp.dat + ..\sched\revb.dat ..\output\sched.rom
+) else (
+cd ..
+echo **********************************
+echo Error: illegal device_option !
+echo **********************************
+goto end
+) 
+
+if "%1" equ "eep" (
+  goto geneeprom
+) else if "%1" equ "rom" (
+	goto genrom
+) else if "%1" equ "eepb" (
+	goto genromrevb	
+) else if "%1" equ "eepc" (
+	goto genromrevc
+)else (
+  goto genromrevc
+)
+
+:geneeprom
+@rem echo on
+@echo Start to generate EEPROM code
+copy ..\sched\mouse.dat ..\output\sched.rom
+
+..\util\geneep ramcode.rom fwram.rom sched.rom %enc% %enckey% a
+perl ..\util\a1bugfix.pl
+osiuasm bt_program23 -O-W
+..\util\geneep ramcode.rom fwram.rom sched.rom %enc% %enckey% a
+goto gen_eep_end
+
+
+
+
+:genromrevb
+echo off
+@echo Start to generate EEPROM code
+..\..\regedr\geneep ramcode.rom fwram.rom sched.rom %enc% %enckey% b
+goto gen_eep_end
+
+
+:genromrevc
+echo off
+@echo Start to generate EEPROM code
+
+..\..\regedr\geneep ramcode.rom fwram.rom sched.rom 0 %enckey% c
+cd ..
+
+:gen_eep_end
+echo **********************************
+echo EEPROM Generated.
+echo The Device is %device_option%. 
+echo Use command "e ep" to download EEPROM.
+echo **********************************
+
+@copy .\output\ramcode.rom .\patch
+
+@copy .\output\memmap.format .\patch
+
+@copy .\sched\*.*	.\patch
+
+goto end
+
+:genrom
+@rem echo on
+perl ..\util\rom2mif.pl romcode
+del ..\..\%FPGA_PATH%\romcode.mif
+copy .\romcode.mif ..\..\%FPGA_PATH%\romcode.mif
+perl ..\util\gen_patch_h.pl >%YC_PATCH_FILE%
+copy .\%YC_PATCH_FILE% ..\..\%MV_PATCH%\%YC_PATCH_FILE%
+copy .\%YC_PATCH_FILE% D:\work\yichip\mv_proj\src\inc\%YC_PATCH_FILE%
+cd ..\..\%FPGA_PATH%
+quartus_cdb btspi -c btspi --update_mif
+quartus_asm --read_settings_files=off --write_settings_files=off btspi -c btspi
+quartus_pgm -c USB-Blaster[USB-0] -m jtag -o "p;.\output\btspi.sof" 
+@echo bitstream_compression=on >1
+@echo memory_map_file=on >> 1
+quartus_cpf -c -o 1 -s EP3C55 -d EPCS16 output\btspi.sof output\btspi.jic  
+@rem quartus_pgm -c USB-Blaster[USB-0] -m jtag -o "pi;.\output\btspi.jic"   
+@del 1
+goto end
+
+
+
+:downloadram
+echo on
+@echo Start to download ram code
+e ku
+e hu
+e su sched.rom
+@echo **********************************
+@echo RAM CODE has been downloaded.
+@echo The Device is %device_option%. 
+@echo **********************************
+cd ..
+
+
+:end
Index: patch/memmap.format
===================================================================
--- /Branch/keyboard/C51SDK/btkb/patch/memmap.format	(nonexistent)
+++ /Branch/keyboard/C51SDK/btkb/patch/memmap.format	(working copy)
@@ -0,0 +1,1053 @@
+0x0000 mem_le_adv_transmit
+0x0001 mem_le_adv_waitcnt
+0x0002 mem_le_adv_rcv
+0x0003 mem_le_req_rcv
+0x0004 mem_le_scanrsp_rcv
+0x0005 mem_le_conn_rcv
+0x0006 mem_inquiryscan_waitcnt
+0x0007 mem_inquiryscan_rcvcnt
+0x0008 mem_pagescan_waitcnt
+0x0009 mem_pagescan_rcvcnt
+0x000a mem_pagescan_rcvfhscnt
+0x000b mem_slave_rcvcnt
+0x000c mem_page_transmit
+0x000d mem_page_rcv
+0x000e mem_page_rcv_fhs
+0x000f mem_master_rcvcnt
+0x0010 mem_fhs_wait_counter
+0x0011 mem_newconnto_counter
+0x0012 mem_inquiry_transmit
+0x0013 mem_inquiry_rcv
+0x0014 mem_fw_ver
+0x0015 mem_current_context
+0x0016 mem_le_ch_mapped
+0x0017 mem_last_freq
+0x0018 mem_rssi
+0x0019 mem_rx_type
+0x001a mem_rx_hec_err
+0x001c mem_rx_crc_err
+0x001e mem_context_ptr
+0x0020 mem_display
+0x0028 mem_bcd
+0x0030 mem_state
+0x0031 mem_mode
+0x0032 mem_tsniff
+0x0034 mem_sniff_anchor
+0x0038 mem_clk_offset
+0x003e mem_rx_window
+0x0040 mem_plap
+0x0043 mem_puap
+0x0044 mem_pnap
+0x0046 mem_conn_handle
+0x0047 mem_arq
+0x0048 mem_lmp_to_send
+0x0049 mem_lmi_opcode
+0x004a mem_lmo_reason
+0x004b mem_op
+0x004c mem_state_map
+0x004d mem_supervision_timer
+0x0051 mem_supervision_to
+0x0053 mem_name_offset
+0x0054 mem_key_size
+0x0055 mem_conn_sm
+0x0056 mem_aco
+0x0062 mem_kc
+0x0072 mem_conn_timer
+0x0073 mem_sniff_attempt
+0x0074 mem_sniff_timeout
+0x0075 mem_dsniff
+0x0077 mem_amaddr
+0x0078 mem_lmo_opcode1
+0x0079 mem_lmi_opcode1
+0x007a mem_lmo_reason1
+0x007b mem_lmo_tid1
+0x007c mem_lmo_opcode2
+0x007d mem_lmi_opcode2
+0x007e mem_lmo_reason2
+0x007f mem_lmo_tid2
+0x0080 mem_hci_version
+0x0083 mem_acl_pktlen
+0x0085 mem_sco_pktlen
+0x0086 mem_acl_pktcnt
+0x0088 mem_sco_pktcnt
+0x008a mem_current_sniff_attempt
+0x008b mem_current_sniff_timeout
+0x008c mem_nfreq_index_inq
+0x008d mem_nfreq_index_page
+0x008e mem_ninqy_index
+0x008f mem_fhs_misc
+0x0090 mem_tx_lch
+0x0091 mem_tx_len
+0x0093 mem_subsniff_instant
+0x0097 mem_subsniff_rate
+0x0098 mem_subsniff_tcmax
+0x009a mem_subsniff_tsniff
+0x009b mem_lpm_adjust
+0x009c mem_sync_clke
+0x00a2 mem_lpm_current_mult
+0x00a3 mem_gpio_wakeup_low
+0x00a7 mem_gpio_wakeup_high
+0x00ab mem_air_mode
+0x00ac mem_sco_asso_handle
+0x00ad mem_sco_handle
+0x00af mem_esco_desco
+0x00b0 mem_esco_type
+0x00b1 mem_neogotiation_state
+0x00b2 mem_saved_amaddr
+0x00b3 mem_esco_arq
+0x00b4 mem_esco_saved_arq
+0x00b5 mem_sco_obuf
+0x00d3 mem_sco_ibuf
+0x00f1 mem_sco_poll
+0x00f2 mem_npage_index
+0x00f3 mem_page_mode
+0x00f4 mem_page_clk
+0x00f8 mem_tst_pktcnt_sync
+0x00fa mem_tst_pktcnt_hec
+0x00fc mem_tst_pktcnt_crc
+0x00fe mem_tst_pktcnt_dmh
+0x0100 mem_tmp_buffer_head
+0x0103 mem_tmp_buffer
+0x0153 mem_tester_emulate
+0x0154 mem_temp_payload
+0x0154 test_mode_scenario
+0x0155 test_mode_hopping_mode
+0x0156 test_mode_tx_freq
+0x0157 test_mode_rx_freq
+0x0158 test_mode_power_mode
+0x0159 test_mode_poll_period
+0x015a test_mode_packet_type
+0x015b test_mode_data_length
+0x015d mem_test_mode_old_debug_config
+0x015e mem_tester_cnt
+0x015f mem_temp_am_addr
+0x0160 mem_temp_arq
+0x0161 mem_pdatatemp
+0x0169 mem_len
+0x016b mem_clkn_bt
+0x016f mem_clke_bt
+0x0173 mem_dpll_clkn
+0x0177 mem_connection_options
+0x0178 mem_nameres_cnt
+0x0179 mem_txptr
+0x017b mem_slot_offset
+0x017d extm_fhs_misc
+0x017e extm_newconn_am_addr
+0x017f extm_class
+0x0182 extm_lap
+0x0185 extm_uap
+0x0186 extm_nap
+0x0189 mem_debug_config
+0x018a mem_lch_code
+0x018b mem_fhs_am_addr
+0x018c mem_dpll_error
+0x018e mem_bdaddr_list_buff
+0x01b2 mem_select_list_item
+0x01b3 mem_temp_reconn_record
+0x01b3 mem_record_bt_mode
+0x01b4 mem_temp_lap
+0x01ba mem_list_item_ptr
+0x01bc mem_eir
+0x0220 mem_ucode_status
+0x0221 mem_otp_ucode_flag
+0x0223 mem_spid_tbuf/* spid buf: 03 addr[23:16] addr[15:8] addr[7:0] */
+0x0224 mem_iicd_tbuf/* iicd buf: iic_adr addr[15:8] addr[7:0] iic_adr */
+0x0224 mem_addr_hi
+0x0225 mem_addr_mi
+0x0226 mem_addr_lo
+0x0227 mem_iicd_addr
+0x0228 mem_spid_rbuf
+0x022c mem_ucode_buf
+0x022e mem_ucode_len
+0x0230 mem_sched_addr
+0x0232 mem_ucode_ptr
+0x0234 mem_ucode_keybuf
+0x0244 mem_check_plap_temp
+0x0256 mem_sensor_id
+0x0257 mem_reconnect_flag
+0x0258 mem_switch_fail_master_count
+0x0259 mem_app_evt_timer_count
+0x025a mem_dongle_count
+0x025b mem_le_addr_slave1
+0x0261 mem_le_addr_slave2
+0x0267 mem_le_peer_state
+0x0268 mem_app_peer_addr
+0x026e mem_dongle_peers
+0x026f mem_dongle_pairing_cnt
+0x0270 mem_dongle_signature
+0x0272 mem_h5rx_ackcnt
+0x0273 mem_check_err_acl_cont
+0x0274 mem_rp_packets
+0x0275 mem_packet_type
+0x0277 mem_hci_sniff_conn_handle
+0x0279 mem_hci_sniff_max_interval
+0x027b mem_hci_sniff_min_interval
+0x027d mem_hci_sniff_attempt
+0x027f mem_hci_sniff_timeout
+0x0281 mem_voice_setting
+0x0283 mem_retransmission_effort
+0x0284 mem_sco_ptype
+0x0286 mem_extm_uap_restore
+0x0289 mem_h5rx_rptr
+0x028b mem_h5rx_ack
+0x028c mem_h5tx_ack
+0x028d mem_h5tx_rptr
+0x028f mem_h5tx_wptr
+0x0291 mem_h5tx_free
+0x0293 mem_h5rx_tmp
+0x0294 mem_h5tx_seq
+0x0295 mem_hci_acl_queue_wptr
+0x0297 mem_hci_acl_queue_rptr
+0x0299 mem_hci_acl_queue_end
+0x029b mem_hci_acl_queue_wcnt
+0x029c mem_hci_acl_cnt
+0x029d mem_hci_acl_tx_trigger_wptr//tx via uart
+0x029f mem_ucode_id_local
+0x02a0 mem_temp//8 bytes
+0x02a8 mem_timeup// 4 bytes
+0x02ac mem_rega//4 bytes
+0x02b0 mem_regb//4 bytes
+0x02b4 mem_regc//3 bytes
+0x02b7 mem_contr//2 bytes
+0x02b9 mem_contw//2 bytes
+0x02bb mem_ucode_id_remote
+0x02bc mem_check_sum
+0x02bd mem_ucode_temp
+0x02be mem_ucode_temp1
+0x02bf mem_lock_in_enc//boolean
+0x02c0 mem_hci_disconn_reason
+0x02c1 mem_hci_curr_len
+0x02c2 mem_hci_curr_target
+0x02c4 mem_l2cap_mem_start
+0x02c4 mem_l2cap_rxbuff1_len
+0x02c6 mem_l2cap_rxbuff2_len
+0x02c8 mem_l2cap_rxbuff_new
+0x02ca mem_l2cap_rxbuff_inuse
+0x02cb mem_l2cap_payload_ptr
+0x02cd mem_l2cap_rx_pkt_length
+0x02cf mem_l2cap_rx_cid
+0x02d1 mem_l2cap_rx_done
+0x02d2 mem_l2cap_signal_tx_buff_ptr
+0x02d4 mem_l2cap_signal_tx_payload_ptr
+0x02d6 mem_l2cap_signal_tx_length
+0x02d8 mem_sdp_tx_buff_ptr
+0x02da mem_sdp_tx_payload_ptr
+0x02dc mem_sdp_tx_pkt_length
+0x02de mem_rfcomm_tx_buff_ptr
+0x02e0 mem_rfcomm_tx_payload_ptr
+0x02e2 mem_rfcomm_tx_pkt_length
+0x02e4 memL2CAP_T1
+0x02e6 mem_CONTROL_tasks
+0x02e7 mem_send_config_req
+0x02e8 mem_config_identifier
+0x02e9 mem_config_req_dest_CID
+0x02eb mem_rfcomm_malloc_fail_flag
+0x02ec mem_message_to_uppersm
+0x02ed mem_upper_sm_remote_page
+0x02ee mem_upper_sm_reconn
+0x02ef mem_upper_sm_ss
+0x02f0 mem_tx_malloc_log
+0x0330 mem_l2cap_mem_end
+0x0330 mem_scid
+0x0332 mem_cmd_length
+0x0334 mem_tt2
+0x0336 mem_tt3
+0x0338 mem_id
+0x033a mem_psm
+0x033c mem_l2cap_sdpres_delay_time
+0x0340 mem_le_rxbuf
+0x0378 mem_le_mic
+0x037c mem_le_peer_mic
+0x0380 mem_le_skdm
+0x0388 mem_le_skds
+0x0390 mem_le_peer_ltk
+0x03a0 mem_le_my_ltk
+0x03b0 mem_le_mrand
+0x03c0 mem_le_state
+0x03c1 mem_le_mode
+0x03c2 mem_le_tsniff
+0x03c4 mem_le_anchor
+0x03c8 mem_le_clk_offset
+0x03ce mem_le_receive_window
+0x03d0 mem_le_plap
+0x03d6 mem_le_conn_handle
+0x03d7 mem_le_arq
+0x03d8 mem_le_ch
+0x03d9 mem_le_hop
+0x03da mem_le_event_count
+0x03dc mem_le_supervision_timer
+0x03e0 mem_le_instant
+0x03e2 mem_le_channels
+0x03e3 mem_le_conn_sm
+0x03e4 mem_le_op
+0x03e5 mem_le_access
+0x03e9 mem_le_crcinit
+0x03ec mem_le_window_size
+0x03ed mem_le_slave_latency
+0x03ef mem_le_superto
+0x03f1 mem_le_channel_map
+0x03f6 mem_le_no_using
+0x03f8 mem_le_peer_sca
+0x03f9 mem_le_att_opcode
+0x03fa mem_le_att_handle
+0x03fc mem_le_err_code
+0x03fd mem_le_sk
+0x040d mem_le_testtype
+0x040e mem_le_test_sync
+0x0410 mem_le_test_pcnt
+0x0412 mem_le_rxon_ts
+0x0418 mem_le_rx_ll_opcode
+0x0419 mem_le_notify_attr_start
+0x041b mem_le_notify_len
+0x041c mem_cmd_le_create_conn
+0x041d mem_le_adv_temp
+0x0431 mem_24g_id
+0x0432 mem_lmo_header_length
+0x0433 mem_lmo_header_opcode
+0x0434 mem_lmo_payload
+0x0445 mem_lmi_accepted_opcode
+0x0446 mem_disconn_reason_send
+0x0447 mem_tx_fixed_freq
+0x0448 mem_rx_fixed_freq
+0x0449 mem_ext_features_page
+0x044a mem_lmpext_ssp_enable
+0x044c mem_remote_sppcap
+0x044d mem_lmp_conn_state
+0x044e mem_soft_timer
+0x0450 mem_pincode_state
+0x0451 mem_sres_tid
+0x0452 mem_accptsco_tid
+0x0453 mem_auth_enable
+0x0454 mem_wait_encryption
+0x0455 mem_sniff_payload
+0x0465 mem_aurand_send_delay_time
+0x0469 mem_module_temp_len
+0x046b mem_init_cnt
+0x046d mem_prcp_data
+0x0481 mem_prcp
+0x0482 mem_prcp_tx_len
+0x0483 rx_buf_data_ptr
+0x0485 memRemoteRPNBitRate
+0x0486 memRemotePRNDataBits
+0x0487 memRemotePRNStopBit
+0x0488 memRemotePRNParity
+0x0489 memRemotePRNFlowControl
+0x048a memRemotePRNXon
+0x048b memRemotePRNXoff
+0x048c mem_mod2div_temp
+0x048f mem_contw_temp
+0x0491 mem_attrib_list
+0x0493 mem_current_adss
+0x0494 mem_current_channel
+0x0495 mem_current_frame_type
+0x0496 mem_current_fcs
+0x0497 mem_current_length
+0x0499 mem_rfcomm_uih_payload_ptr
+0x049b mem_uih_cmd_type
+0x049c mem_uih_length
+0x049e mem_param_payload_ptr
+0x04a0 mem_ms_param
+0x04a1 mem_pn_credit_flow_type_info
+0x04a2 mem_pn_priority
+0x04a3 mem_pn_acknowledg_timer
+0x04a4 mem_pn_max_retrans
+0x04a5 mem_rfcomm_send_adss
+0x04a6 mem_rfcomm_send_frame_type
+0x04a7 mem_rfcomm_send_fcs
+0x04a8 mem_rfcomm_send_offset
+0x04a9 mem_sdp_mem_start
+0x04a9 mem_uuid_search_pat
+0x04ad mem_sdp_continue_byte
+0x04af mem_sdp_pduid
+0x04b0 mem_sdp_transactionid
+0x04b2 mem_sdp_attribute_maxbyte
+0x04b4 mem_sdp_record_maxcnt
+0x04b6 mem_sdp_error_code
+0x04be mem_sdp_record_handle
+0x04c2 mem_sdp_search_failed
+0x04c3 mem_sdp_LACAP_found
+0x04c4 mem_sdp_RFCOMM_found
+0x04c5 mem_handle_list
+0x04dd mem_handle_humber
+0x04de mem_sdp_mem_end
+0x04de mem_rxbuf
+0x04ef mem_random_number
+0x04ff mem_round_key
+0x050f mem_kinit
+0x051f mem_input_store
+0x052f mem_x
+0x053f mem_y
+0x054e mem_y15
+0x054f mem_pin_length
+0x0550 mem_pin
+0x0560 mem_key_store
+0x0571 mem_key_store_end
+0x0572 memp_ar_key
+0x0574 memp_ar_input
+0x0576 mem_ar_hround
+0x0580 mem_ec_infinite
+0x0581 mem_ec_loopc
+0x0582 memdat
+0x0582 mem_ax
+0x059a mem_ay
+0x05b2 mem_az
+0x05ca mem_bx
+0x05e2 mem_by
+0x05fa mem_bz
+0x0612 mem_cx
+0x062a mem_cy
+0x0641 mem_cy5
+0x0642 mem_cz
+0x065a mem_k
+0x0672 mem_align
+0x0682 mem_tmp1
+0x0682 memahbak
+0x069a mem_tmp5
+0x06a2 memahsave
+0x06b2 mem_tmp2
+0x06c2 memahsave_end
+0x06c2 mem_addr_padding
+0x06c3 mem_addr_value/* 12 bytes     */ 
+0x06ca mem_tmp3
+0x06ca mem_t1
+0x06cf mem_addr_value_end
+0x06d2 mem_addr_iocap_end
+0x06e2 mem_tmp0
+0x06e2 mem_t0
+0x06ea mem_tmp0a
+0x06fa mem_t2
+0x0712 mem_t3
+0x072a mem_t7
+0x0742 mem_p
+0x075a mem_a
+0x0772 mem_b
+0x078a mem_gx
+0x07a2 mem_gy
+0x07ba memh0
+0x07da mem_sp_state_start
+0x07da mem_sp_state
+0x07db mem_master_sp_state
+0x07dc mem_sp_flag
+0x07dd mem_master_sp_flag
+0x07de mem_sp_calc
+0x07df mem_sp_dh_ready
+0x07e0 mem_sp_localsm
+0x07e1 mem_pairing_auth
+0x07e2 mem_sp_flag_start
+0x07e2 mem_sp_local_key_send_count
+0x07e3 mem_sp_remote_key_recv_count
+0x07e4 mem_sp_remote_key_invalid
+0x07e5 mem_sp_dhkey_invalid
+0x07e6 mem_sp_iocap_local
+0x07e9 mem_sp_iocap_remote
+0x07ec mem_sp_gkey
+0x07f0 mem_sp_pubkey_remote
+0x07f0 mem_sp_pubkey_remote_x
+0x0808 mem_sp_pubkey_remote_x_end
+0x0808 mem_sp_pubkey_remote_y
+0x0820 mem_sp_dhkey
+0x0838 mem_sp_dhkey_end
+0x0838 mem_sp_random_local
+0x0848 mem_sp_random_local_end
+0x0848 mem_sp_random_remote
+0x0858 mem_sp_random_remote_end
+0x0858 memresult
+0x0858 mem_sp_calc_result
+0x0858 memh
+0x085c memg
+0x0860 memf
+0x0864 meme
+0x0868 mem_sp_calc_result_high
+0x0868 memd
+0x086c memc
+0x0870 memb
+0x0874 mema
+0x0878 mem_sp_check_result
+0x0888 mem_sp_confirm_remote
+0x0898 mem_sp_prarm_stack
+0x08a8 mem_UI_data_txbuff_length
+0x08aa mem_ipc_skip_continue_proc
+0x08ab mem_ui_timer_temp//length 4
+0x08ab mem_ipc_rega_temp
+0x08af mem_usb_status
+0x08b0 mem_usb_fifo_empty
+0x08b1 mem_usb_read_len
+0x08b2 mem_usb_rxbuf
+0x08f2 mem_usb_cnt
+0x08f4 mem_usb_tx_enable
+0x08f5 mem_usb_tx_count
+0x08f6 mem_usb_set_protocol_count
+0x08f7 mem_usb_desc
+0x08f8 mem_usb_state
+0x08f9 mem_usb_idle_cnt
+0x08fb mem_usb_idle_timeout
+0x08fd mem_usb_trig_timeout
+0x08ff mem_usb_setup
+0x08ff mem_usb_setup_bmRequestType
+0x0900 mem_usb_setup_bRequest
+0x0901 mem_usb_setup_bValue
+0x0902 mem_usb_setup_bValueH
+0x0903 mem_usb_setup_wIndex
+0x0905 mem_usb_setup_bLength
+0x0906 mem_usb_setup_bLengthH
+0x0907 mem_usb0_setup
+0x090f mem_bufptr
+0x0911 mem_remain
+0x0912 mem_devicedesc
+0x0926 mem_hidreportdesc_kb
+0x09ee mem_hidreportdesc_m
+0x0ab6 mem_confdesc
+0x0b1a mem_string0
+0x0b1f mem_string1
+0x0b3d mem_string2
+0x0b5b mem_string3
+0x0b79 mem_hold_contr
+0x0b7b mem_hold_contw
+0x0b7d mem_fifo_temp
+0x0b7e mem_c51_flag
+0x0b7f mem_c51_lmp_lock
+0x0b80 mem_wakup_from_power_flag
+0x0b81 mem_lmp_bb_disconnect_reason
+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
+0x4130 mem_current_amaddr
+0x4131 mem_lpm_mode
+0x4132 mem_device_option
+0x4133 mem_scan_mode
+0x4134 mem_last_clkn
+0x4138 mem_features
+0x4140 mem_lap
+0x4143 mem_uap
+0x4144 mem_nap
+0x4146 mem_npage
+0x4147 mem_glap
+0x414a mem_class
+0x414d mem_iscan_window
+0x414f mem_iscan_interval
+0x4151 mem_pscan_window
+0x4153 mem_pscan_interval
+0x4155 mem_page_interval
+0x4157 mem_page_window
+0x4159 mem_page_to
+0x415b mem_inq_window
+0x415d mem_fcomp_mul
+0x415e mem_fcomp_div
+0x415f mem_rx_window_init
+0x4161 mem_rx_window_sniff
+0x4163 mem_rf_init_ptr
+0x4165 mem_last_type
+0x4166 mem_last_type_esco
+0x4167 mem_last_type_saved
+0x4168 mem_retransmission_cnt
+0x416a mem_next_btclk
+0x416e mem_seqi
+0x416f mem_rf_rccal
+0x4170 mem_handle_num
+0x4171 mem_max_slot
+0x4172 mem_eir_enable
+0x4173 mem_afh_instant
+0x4177 mem_afh_error_total
+0x4179 mem_afh_cfg
+0x417a mem_afh_new_mod
+0x417b mem_afh_map_lo
+0x4180 mem_afh_map_hi
+0x4185 mem_afh_used
+0x4186 mem_afh_index
+0x4188 mem_afh_map_new
+0x4193 mem_afh_map
+0x41e3 mem_afh_timer
+0x41e7 mem_afh_classify_channel_map
+0x41f1 mem_chip_functions
+0x41f3 mem_lpm_wake_lock
+0x41f5 mem_lpm_interval
+0x41f7 mem_lpm_overhead
+0x41f8 mem_lpm_hibernate_switch
+0x41f9 mem_esco_addr
+0x41fa mem_sniff_unint_lost
+0x41fb mem_ptt
+0x41fc mem_sleep_counter//should be 0x41fc in REVC
+0x4200 mem_sleep_counter_all
+0x4204 mem_sleep_clkn
+0x420a mem_sniff_rcv
+0x420d mem_sniff_lost
+0x4210 mem_clks_per_lpo
+0x4213 mem_lpm_mult
+0x4214 mem_lpm_mult_timeout
+0x4215 mem_lpm_mult_cnt
+0x4216 mem_lpm_config
+0x4219 mem_lpm_xtalcnt
+0x421a mem_lpm_buckcnt
+0x421b mem_lpm_ldocnt
+0x421c mem_lpm_isogate
+0x421d mem_lpm_isogate_final
+0x421e mem_saved_gpio// should be 0x421e in REVC
+0x422e mem_saved_gsel
+0x4231 mem_saved_mark
+0x4239 mem_saved_spidctrl
+0x423a mem_patch_ptr
+0x423c mem_patch_len
+0x423e mem_timers
+0x425e mem_link_key_exists
+0x425f mem_link_key_eeprom_head
+0x4262 mem_link_key
+0x4272 mem_hci_cmd
+0x4273 mem_hci_conn_handle
+0x4274 mem_hci_plap
+0x4277 mem_hci_puap
+0x4278 mem_hci_pnap
+0x427a mem_uartd_rxitems_got_data
+0x427b mem_uartd_rxitems_threshold
+0x427c mem_uartd_rx_timeout
+0x427e mem_app_state
+0x427f mem_app_handshake_flag
+0x4280 mem_sniff_param_interval
+0x4282 mem_sniff_param_attempt
+0x4284 mem_sniff_param_timeout
+0x4286 mem_cb_check_wakelock
+0x4288 mem_cb_before_hibernate
+0x428a mem_cb_before_lpm
+0x428c mem_cb_le_process
+0x428e mem_cb_bt_process
+0x4290 mem_cb_idle_process
+0x4292 mem_cb_bb_event_process
+0x4294 mem_cb_discovry_timeout
+0x4296 mem_cb_att_write
+0x4298 mem_cb_update_notify_value
+0x429a mem_device_nums
+0x429b mem_eeprom_base
+0x429d mem_unsniff2sniff_timer_count
+0x429e mem_wake_up_delay_timer
+0x429f mem_app_connection_options
+0x42a0 mem_app_disconn_reason
+0x42a2 mem_app_disconn_reason_flag
+0x42a4 mem_at_using_flag
+0x42a5 mem_lpm_delay_after_sniff
+0x42a9 mem_xrecord_mode
+0x42aa mem_eeprom_block_size
+0x42ac mem_baud
+0x42ae mem_hci_lt_rx_state
+0x42af mem_l2cap_xmem_start
+0x42af mem_l2cap_tx_multi_offset//0 means single packet
+0x42b1 mem_sdp_remote_cid
+0x42b3 mem_rfcomm_remote_cid
+0x42b5 mem_hid_ctrl_remote_cid
+0x42b7 mem_hid_int_remote_cid
+0x42b9 mem_sdp_state
+0x42ba mem_rfcomm_state
+0x42bb mem_hid_control_state
+0x42bc mem_hid_interrupt_state
+0x42bd mem_spp_state
+0x42be mem_ML2CAP_comm_id
+0x42bf mem_used_map
+0x42c0 mem_tx_fifo0
+0x42c0 mem_tx_fifo0_map
+0x42c1 mem_tx_fifo0_ptr
+0x42c3 mem_tx_fifo1
+0x42c3 mem_tx_fifo1_map
+0x42c4 mem_tx_fifo1_ptr
+0x42c6 mem_tx_fifo2
+0x42c6 mem_tx_fifo2_map
+0x42c7 mem_tx_fifo2_ptr
+0x42c9 mem_tx_fifo3
+0x42c9 mem_tx_fifo3_map
+0x42ca mem_tx_fifo3_ptr
+0x42cc mem_tx_fifo_end
+0x42cc mem_l2cap_lpm_txbuf
+0x43cc mem_l2cap_flow_ctrl_flag
+0x43cd mem_l2cap_pending_item
+0x43ce mem_l2cap_xmem_end
+0x43ce mem_le_dsniff
+0x43d0 mem_le_conn_interval
+0x43d2 mem_le_scan_enable
+0x43d3 mem_le_scan_interval
+0x43d5 mem_le_scan_window
+0x43d7 mem_le_adv_led
+0x43d8 mem_le_adv_enable
+0x43d9 mem_le_adv_data_len
+0x43da mem_le_adv_data
+0x43f9 mem_le_scan_data_len
+0x43fa mem_le_scan_data
+0x4419 mem_le_name_len
+0x441a mem_le_name
+0x442e mem_le_led_on_time
+0x442f mem_le_new_map
+0x4434 mem_le_new_param
+0x4434 mem_le_new_window
+0x4435 mem_le_new_offset
+0x4437 mem_le_new_interval
+0x4439 mem_le_new_latency
+0x443b mem_le_new_timeout
+0x443d mem_le_temp
+0x443e mem_le_txheader
+0x443f mem_le_txlen
+0x4440 mem_le_txpayload
+0x4442 mem_le_txcid
+0x4444 mem_le_l2cap
+0x4445 mem_le_l2cap_response
+0x4446 mem_le_txbdy
+0x4465 mem_le_pcnt_tx
+0x446a mem_le_pcnt_rx
+0x446f mem_le_last_mic
+0x4473 mem_le_ivm
+0x4477 mem_le_ivs
+0x447b mem_le_ltk
+0x448b mem_ltk_exists
+0x448c mem_le_rconfirm
+0x449c mem_le_srand
+0x44ac mem_le_iat
+0x44ad mem_le_rat
+0x44ae mem_le_preq
+0x44b5 mem_le_pres
+0x44bc mem_le_search_handle_start
+0x44be mem_le_search_handle_end
+0x44c0 mem_le_att_offset
+0x44c0 mem_le_search_att_type
+0x44c2 mem_le_notify_handle
+0x44c4 mem_le_uuid
+0x44c6 mem_le_handle_data_len
+0x44c7 mem_le_handle_data
+0x44d7 mem_le_adv_param
+0x44d7 mem_le_adv_interval_min
+0x44d9 mem_le_adv_interval_max
+0x44db mem_le_adv_type
+0x44dc mem_le_adv_own_addr_type
+0x44dd mem_le_adv_direct_addr_type
+0x44de mem_le_adv_direct_addr
+0x44e4 mem_le_adv_channel_map
+0x44e5 mem_le_adv_filter_policy
+0x44e6 mem_le_conn_param
+0x44e6 mem_le_conn_peer_addr_type
+0x44e7 mem_le_conn_peer_addr
+0x44ed mem_le_conn_own_addr_type
+0x44ee mem_le_conn_interval_min
+0x44f0 mem_le_conn_interval_max
+0x44f2 mem_le_conn_latency
+0x44f4 mem_le_conn_superto
+0x44f6 mem_le_scan_params
+0x44f6 mem_le_scan_type
+0x44f7 mem_le_scan_own_addr_type
+0x44f8 mem_le_scan_filter_policy
+0x44f9 mem_le_lap
+0x44fc mem_le_uap
+0x44fd mem_le_nap
+0x44ff mem_le_xtype_fifo
+0x4504 mem_le_att_list
+0x46f8 mem_le_switch_send_data
+0x46f9 mem_le_transmit_window
+0x46fd mem_lmp_version
+0x4700 mem_lmp_subversion
+0x4702 mem_local_name_length
+0x4703 mem_local_name
+0x4706 mem_local_name2
+0x4746 mem_local_name_end
+0x4747 mem_unsniff2sniff_timer
+0x4748 mem_switch_flag
+0x4749 mem_eeprom_ota_base_addr/*the start- writing addr in eeprom  */
+0x474b mem_pn_dlci
+0x474c mem_pn_max_frame_size
+0x474e memFCStemp1
+0x474f memFCStemp2
+0x4750 memFCStemp3
+0x4751 mem_rfcomm_initiator
+0x4752 mem_remote_spp_channel
+0x4753 mem_HIUfcs_SPP
+0x4754 mem_HIUfcs_SPP_WCredits
+0x4755 mem_rfcomm_send_more_pkt
+0x4756 mem_remote_credits
+0x4757 mem_credit_given
+0x4758 mem_ms_channel
+0x4759 memui_uuid_table
+0x475b mem_all_uuid_16bits
+0x4771 mem_all_uuid_128bits
+0x4793 mem_sp_local_key_invalid
+0x4794 mem_sp_private_key
+0x47ac mem_sp_pubkey_local
+0x47ac mem_sp_pubkey_local_x
+0x47c4 mem_sp_pubkey_local_x_end
+0x47c4 mem_sp_pubkey_local_y
+0x47dc mem_ssp_enable
+0x47dd mem_ipc_lock_bt
+0x47de mem_ipc_lock_c51
+0x47df mem_ipc_fifo_bt2c51
+0x47e4 mem_ipc_fifo_c512bt
+0x47e9 mem_led_switch
+0x47ea mem_ui_button_timer
+0x47eb mem_ui_button_last_state
+0x47ec mem_ui_timer_last_btclk
+0x47f0 mem_discovery_timeout_timer_count
+0x47f2 mem_hid_handshake_timer_count
+0x47f3 memui_reconnect_mode
+0x47f4 mem_ui_state_map
+0x47f6 mem_ui_profile_supported
+0x47f7 mem_led_gpio
+0x47f8 mem_led_dark_time
+0x47fa mem_led_light_time
+0x47fc mem_ui_button_timeout
+0x47fd mem_ui_button_gpio
+0x47fe mem_discovery_timeout
+0x4800 mem_ir_ptr
+0x4802 mem_ir_type
+0x4803 mem_ir_cmd
+0x4804 mem_ir_play_count
+0x4805 mem_ir_report_len
+0x4807 mem_ir_pulse_zero
+0x4808 mem_ir_pulse_one
+0x4809 mem_ir_pulses
+0x4825 mem_ir_sequence_len
+0x4826 mem_ir_sequence
+0x4800 mem_acl_credits
+0x4802 mem_allow_switch
+0x4803 mem_hci_acl_queue_start/*param_acl_pktcnt+2 byte*/
+0x4807 mem_hci_wake_clk
+0x4800 mem_kb_state
+0x4802 mem_kb_report_data
+0x4808 mem_kb_keys
+0x4809 mem_kb_rcv_led_data
+0x480a mem_kb_fast_wake_last
+0x480e mem_led_cap_gpio
+0x480f mem_led_num_gpio
+0x4810 mem_led_scl_gpio
+0x4811 mem_kb_map
+0x48af mem_keyboard_uuid_list
+0x4800 mem_at_gpio
+0x4801 mem_module_wake_up_gpio
+0x4802 mem_module_state_gpio
+0x4803 mem_module_connect_state_gpio
+0x4804 mem_module_version
+0x480a mem_last_uart_clock
+0x480e mem_current_packet_length
+0x4810 mem_module_prepare_tx_len
+0x4812 mem_module_state
+0x4813 mem_module_task
+0x4814 mem_cmode_addr
+0x481a mem_at_scan_time
+0x481c mem_prarm_pswd
+0x4820 mem_prarm_uart
+0x4824 mem_prarm_blename
+0x4827 mem_prarm_name
+0x482b mem_prarm_bleadss
+0x482e mem_prarm_adss
+0x4832 mem_prarm_vers
+0x4836 mem_prarm_class
+0x483b mem_prarm_clrflg
+0x4841 mem_prarm_reconn
+0x4847 mem_prarm_bledis
+0x4849 mem_prarm_dis
+0x484c mem_prarm_stsn
+0x4850 mem_prarm_atp
+0x4853 mem_prarm_list
+0x4857 mem_prarm_role
+0x485b mem_prarm_sniff
+0x4860 mem_prarm_ldev
+0x4864 mem_prarm_rssi
+0x4868 mem_prarm_cdev
+0x486c mem_prarm_bleinqr
+0x486f mem_prarm_inqr
+0x4873 mem_prarm_cmode
+0x4878 mem_prarm_mode
+0x487c mem_prarm_dmstate
+0x4883 mem_prarm_discov
+0x4889 mem_prarm_ota
+0x488c mem_prarm_bleconn
+0x488e mem_prarm_conn
+0x4892 mem_prarm_pageout
+0x4899 mem_prarm_recfail
+0x48a0 mem_module_uuid_list
+0x4800 mem_mouse_x
+0x4802 mem_mouse_y
+0x4804 mem_mouse_z
+0x4805 mem_mouse_key
+0x4806 mem_mouse_z_last
+0x4807 mem_mouse_z_before
+0x4808 mem_mouse_z_now
+0x4809 mem_mouse_z_data
+0x480a mem_mouse_move_flag
+0x480b mem_reconnect_timeout
+0x480c mem_mouse_direct_timeout
+0x480e mem_mouse_no_data_timeout
+0x4810 mem_mouse_blank_data_timeout
+0x4812 mem_mouse_discovery_timer
+0x4814 mem_mouse_direct_timer
+0x4816 mem_mouse_no_data_timer
+0x4818 mem_mouse_blank_data_timer
+0x481a mem_mouse_send_blank_timer
+0x481b mem_mouse_dpi
+0x481c mem_mouse_dpi_button_state
+0x481d mem_mouse_test_cnt
+0x481e mem_le_hibernate_timer
+0x4820 mem_mouse_mode_state
+0x4821 mem_sensor_type
+0x4822 mem_lbutton_gpio
+0x4823 mem_rbutton_gpio
+0x4824 mem_mbutton_gpio
+0x4825 mem_dpi_button_gpio
+0x4826 mem_sensor_data_gpio
+0x4827 mem_whee_a_data_gpio
+0x4828 mem_whee_b_data_gpio
+0x4829 mem_conn_cnt
+0x482a mem_mouse_uuid_list
+0x4ab4 mem_24g_paring_tx_power_param
+0x4abe mem_5db_tx_power_param
+0x4ac8 mem_mouse_tz
+0x4ac9 mem_last_txlch
+0x4aca mem_last_txlen
+0x4acc mem_last_txdata
+0x4ae0 mem_current_event
+0x4ae1 mem_ipc_lock_rx_data_bt
+0x4ae2 mem_ipc_lock_rx_data_c51
+0x4ae3 mem_ipc_lock_tx_data_bt
+0x4ae4 mem_ipc_lock_tx_data_c51
+0x4ae5 mem_ipc_2bt_fifo_head
+0x4bad mem_ipc_2bt_fifo_end
+0x4bad mem_ipc_2bt_read_index
+0x4baf mem_ipc_2bt_write_index
+0x4bb1 mem_ipc_2C51_fifo_head
+0x4c79 mem_ipc_2C51_fifo_end
+0x4c79 mem_ipc_2C51_read_index
+0x4c7b mem_ipc_2C51_write_index
+0x4c7d mem_c51_private_area
+0x4ce1 mem_ipc_tx_evt_buff
+0x4ce3 mem_ipc_tx_evt
+0x4ce4 mem_ipc_bt_timer
+0x4ce6 mem_ipc_rx_type
+0x4ce7 mem_rfcomm_tx_buff
+0x4ce7 mem_24g_tx_btclk
+0x4ceb mem_24g_interval
+0x4cec mem_24g_txcnt
+0x4cef mem_24g_txfail_cnt
+0x4cf0 mem_24g_attempt_cnt
+0x4cf1 mem_24g_attempt_flag
+0x4cf2 mem_24g_rxcnt
+0x4cf5 mem_24g_rxfail_cnt
+0x4cf8 mem_loss_rate
+0x4cfa mem_24g_retry
+0x4cfb mem_24g_pid
+0x4cfc mem_24g_datalen
+0x4cfd mem_24g_crc
+0x4cff mem_24g_rxbuf
+0x4d3f mem_24g_addr
+0x4d43 mem_24g_len
+0x4d45 mem_24g_txpayload
+0x4d4f mem_24g_txdata
+0x4d55 mem_24g_ch
+0x4d56 mem_24g_sifs
+0x4d57 mem_24g_state
+0x4d58 mem_24g_scremble
+0x4d68 mem_dongle_exit_flag
+0x4d69 mem_24g_current_ch_number
+0x4d6a mem_24g_ch_count_down
+0x4d6b mem_24g_ch_map1
+0x4d6f mem_24g_ch_map2
+0x4d73 mem_24g_ch_map3
+0x4d77 mem_24g_ch_map4
+0x4d7b mem_24g_interval_min
+0x4d7c mem_24g_interval_max
+0x4d7d mem_24g_ensure
+0x4d7e mem_24g_enter_hibernate
+0x4d86 mem_24g_enter_lpm_timer
+0x4d87 mem_led_cap_delay_timer
+0x4d87 mem_senser_id2
+0x4d88 mem_senser_id3
+0x4d89 mem_rpn_dlci
+0x4d8a mem_ipc_last_check_timer
+0x4d8e mem_att_send_handle
+0x4d90 mem_att_send_option
+0x4d91 mem_lell_cur_opcode
+0x4d92 mem_prepare_write_len
+0x4d93 mem_ipc_c51_timer
+0x4d93 mem_prepare_write_offest
+0x4d95 mem_le51_payload_len
+0x4d96 mem_le51_cmd
+0x4d97 mem_le51_tx_length
+0x4d98 mem_le51_txbuff_inuse
+0x4d99 mem_24g_pairing_sm
+0x4d9a mem_24g_addr_copy
+0x4d9e mem_ipc_bt_100ms_timer
+0x4d9f mem_ipc_c51_100ms_timer
+0x4da0 mem_adc_config_flag
+0x4da1 mem_adc_channel
+0x4da2 mem_adc_0v
+0x4da4 mem_adc_3v
+0x4da6 mem_adc_current_value
+0x4da8 mem_kb_map_c51
+0x4e46 mem_kb_ks_col
+0x4e5b mem_hibernate_flag
+0x4e5c mem_new_supervision_to
+0x4e5e mem_kb_wake_timer
+0x4e5f mem_kb_last_data
+0x4800 mem_shutter_send_data
+0x4804 mem_shutter_key_temp
+0x4805 mem_shutter_send_length
+0x4806 mem_shutter_clkn_bt_last
+0x480a mem_shutter_key
+0x480b mem_shutter_flag
+0x480c mem_shutter_cable_unplug_conut
+0x480d mem_shutter_hid_disconn_count
+0x480e mem_shutter_1key_send_sm
+0x480f mem_shutter_iphonekey_gpio
+0x4810 mem_shutter_androidkey_gpio
+0x4811 mem_shutter_key_number
+0x4812 mem_shutter_uuid_list
Index: patch/patch.dat
===================================================================
--- /Branch/keyboard/C51SDK/btkb/patch/patch.dat	(nonexistent)
+++ /Branch/keyboard/C51SDK/btkb/patch/patch.dat	(working copy)
@@ -0,0 +1,65 @@
+mem_patch00:
+29   #mem_patch00
+04   #mem_patch01
+00   #mem_patch02
+00   #mem_patch03
+80   #mem_patch04
+09   #mem_patch05
+00   #mem_patch06
+00   #mem_patch07
+0c   #mem_patch08
+00   #mem_patch09
+11   #mem_patch0A
+00   #mem_patch0B
+00   #mem_patch0C
+00   #mem_patch0D
+00   #mem_patch0E
+00   #mem_patch0F
+00   #mem_patch10
+00   #mem_patch11
+35   #mem_patch12
+00   #mem_patch13
+00   #mem_patch14
+00   #mem_patch15
+4f   #mem_patch16
+02   #mem_patch17
+00   #mem_patch18
+00   #mem_patch19
+00   #mem_patch1A
+00   #mem_patch1B
+00   #mem_patch1C
+00   #mem_patch1D
+00   #mem_patch1E
+00   #mem_patch1F
+80   #mem_patch20
+00   #mem_patch21
+00   #mem_patch22
+09   #mem_patch23
+18   #mem_patch24
+00   #mem_patch25
+00   #mem_patch26
+c0   #mem_patch27
+00   #mem_patch28
+00   #mem_patch29
+00   #mem_patch2A
+00   #mem_patch2B
+00   #mem_patch2C
+48   #mem_patch2D
+00   #mem_patch2E
+00   #mem_patch2F
+80   #mem_patch30
+e0   #mem_patch31
+00   #mem_patch32
+90   #mem_patch33
+00   #mem_patch34
+00   #mem_patch35
+00   #mem_patch36
+00   #mem_patch37
+00   #mem_patch38
+a0   #mem_patch39
+01   #mem_patch3A
+00   #mem_patch3B
+4c   #mem_patch3C
+00   #mem_patch3D
+00   #mem_patch3E
+00   #mem_patch3F
Index: patch/ramcode.rom
===================================================================
--- /Branch/keyboard/C51SDK/btkb/patch/ramcode.rom	(nonexistent)
+++ /Branch/keyboard/C51SDK/btkb/patch/ramcode.rom	(working copy)
@@ -0,0 +1,912 @@
+c5128017
+c000002e
+c001802b
+c002815c
+c005032b
+c013831b
+c014030a
+c0158310
+c02101a0
+c02181d9
+c02802ea
+c02a02f9
+c048021b
+c04901e1
+c04a01e7
+c04a8182
+c0580305
+c0588152
+c0590184
+c0598194
+c05b029b
+c05c8168
+20203bf1
+c003815a
+c00c0068
+c00d833c
+c011835b
+c01200a7
+c01f02ae
+c01f82b1
+c0438104
+c04682c3
+c04702cd
+c04782b9
+c04e0377
+c04f832f
+c066821e
+c0678055
+c068010b
+c07101bc
+c07181a4
+c0730032
+20203bf1
+204000ab
+20400070
+20203015
+6810813b
+60008b80
+70800608
+20203003
+6800807c
+203a0037
+204061d9
+6800807c
+247a0000
+68008055
+207a0000
+c0030046
+c008003c
+2020623e
+6800c748
+c1000000
+c0008044
+d8e0000a
+20407e53
+247a0000
+70474800
+2020629b
+20748000
+20200046
+68008177
+c281629b
+c2800049
+6800c25e
+203a62c7
+6800844d
+c4018000
+c4010000
+68020465
+d8400320
+98408400
+1c427e00
+98467c00
+24610000
+20206267
+da2047df
+20407f9f
+207a0000
+1fe22600
+2040005b
+20203ea5
+c10c0000
+c0036614
+c001005f
+20203e7d
+70429d00
+680147f4
+c283bf08
+2fec0001
+20408065
+20203f08
+68008450
+c1010000
+20203e7b
+680102cd
+203a4dfc
+680082cf
+c000806d
+20204dbb
+2040527a
+247a0000
+20204dc3
+6800c7dc
+203a0074
+6800c793
+207a0000
+20400163
+20740000
+1ff0fe00
+1fe20c00
+204000e3
+6000cce6
+c0008087
+1fe20400
+18c22200
+6800c040
+c3000084
+1a220c00
+c6848000
+18427e00
+c0018091
+20203bf1
+1a220c00
+d8a000f8
+202000db
+204000e3
+204000e3
+60008b7d
+2040008c
+20207c33
+204000e6
+18c20400
+18508400
+60094bad
+20600000
+204000e3
+1fe22200
+18c27e00
+600102b7
+1a20a201
+20404b2c
+18a0a5fe
+680142b7
+e0a10000
+580000a1
+e0a08000
+1a20f3ff
+680102b7
+1fe20c00
+204000dd
+1a420c00
+e8c10000
+60014e5f
+1fe0f202
+20407e45
+704e5e32
+20600000
+da400000
+2040527a
+247a0000
+2020524d
+680a4d8a
+1c427e00
+98467e00
+d8400640
+9846fc00
+20407efd
+1807fe00
+207a0000
+1c420400
+600a4d8a
+68094ce4
+18508400
+9840fe00
+1ff0fe00
+60014ce4
+1ff0fe00
+1fe17e03
+c1800000
+6800cda0
+c28000c2
+c28080c4
+c28100c6
+20600000
+708971bf
+202000ca
+708971af
+202000ca
+7089718f
+6800cda1
+60108973
+202000ca
+68108053
+79207e07
+60108053
+68108973
+1fe1fe30
+60108973
+70890674
+7089067c
+708972aa
+20001388
+68190150
+68108053
+793ffe07
+60108053
+18508400
+60094da6
+20600000
+204000e3
+1fe27200
+204000df
+2020008c
+204000e3
+e0a08000
+c20000df
+20600000
+204000e6
+e8c08000
+20600000
+58004bad
+98c67c00
+24628000
+d8c04ae5
+20600000
+df200003
+d8c04ce1
+18c22200
+68014c7b
+1ff0fe00
+1fe20a00
+1a220c00
+e8c08000
+e0a08000
+204000fa
+c20000f2
+18a27e00
+1ff0fe00
+60014c7b
+20600000
+58004c79
+98a67c00
+24628000
+d8a04bb1
+20600000
+58000010
+d8e00003
+20407e68
+9a40a400
+20600000
+da200000
+680a47ec
+1c422400
+1a427e00
+98467c00
+244100ff
+20207c09
+60088259
+6800cd9e
+1fe0fe01
+6000cd9e
+68008259
+207a0000
+1fe0ffff
+60008259
+20400130
+20400137
+2040012a
+20400118
+2020010f
+6800ce5e
+207a0000
+1fe0ffff
+6000ce5e
+c1808000
+704e5e32
+680147f4
+c4028000
+68014e5f
+207a0000
+2040527e
+247a0000
+68014e5f
+1fe22200
+20404b2c
+1a20f202
+d8c04e61
+20207e45
+6800cd87
+207a0000
+1fe0ffff
+6000cd87
+203a3fa4
+20203fa6
+6800c7f2
+207a0000
+1fe0ffff
+6000c7f2
+247a0000
+20403ebd
+20204b22
+6800cd86
+207a0000
+1fe0ffff
+6000cd86
+20600000
+1a627e00
+1fe17ef0
+c1280000
+20400144
+1a627e00
+207a0000
+6000cce3
+202000eb
+1a627e00
+c0058148
+c0010150
+20600000
+704e5e28
+5800000a
+60014e5f
+680142b7
+e0a10000
+580001a1
+e0a10000
+20600000
+704e5e00
+20600000
+70416e7f
+20403cf3
+6800ce5b
+207a0000
+704e5b00
+1c427e00
+60024d8a
+20600000
+20203bf1
+20203bf1
+20403392
+20403407
+20403024
+20203022
+68014c79
+68094c7b
+20200165
+68014bad
+68094baf
+98467c00
+2022e9b1
+2020320b
+6800c219
+247a0000
+70804206
+58000f0c
+20403da7
+58030d40
+20403bf3
+37d98200
+1e226000
+20403b36
+20001388
+20203d9d
+6800c219
+243a017a
+20403d91
+20007530
+20007530
+20007530
+20403b0a
+70804204
+6810896b
+1fe17ecf
+6010896b
+1fe1fe30
+6010896b
+20600000
+20400174
+20203aaf
+c6118000
+20403cab
+6801c210
+207a0000
+6800c131
+207a0000
+2040527e
+247a0000
+20403dca
+247a0000
+20403b36
+6800c7dc
+203a3d25
+6800c793
+207a0000
+20203d25
+20400163
+24740000
+20400160
+24740000
+700b7f01
+700b7e01
+204002b4
+68008b7f
+247a0000
+20400163
+24740000
+20203d2d
+20403e25
+20406dec
+204035d6
+20203480
+78547c00
+204061d9
+68008048
+207a0000
+c283df10
+c00101ac
+c00381b9
+20205ee0
+18007e11
+204061b5
+68008049
+1fe20400
+c00001b4
+c00701b4
+c00e01b4
+20600000
+e0a08000
+6800c702
+e0a08000
+5800000e
+20205fa6
+20406055
+70007264
+20600000
+6800807d
+c00181c8
+c0025c67
+c00381d6
+20205b92
+68008030
+c280ddb5
+680104e2
+1fe3fe00
+1fe67c0f
+24215db5
+20205da4
+680084df
+60008445
+c00c01d4
+c0098307
+c01981ce
+20205c58
+6800844d
+79207e00
+6000844d
+700b7d01
+20407c27
+20205c83
+20403f9e
+20205ccc
+680084df
+60008446
+20205cf3
+20403d61
+20403be2
+20213498
+20403204
+24343498
+20403812
+243a01a1
+20600000
+60088017
+1840a204
+20203a86
+60088017
+1840a200
+20203ab6
+204001e4
+58000500
+20403bf3
+204001ef
+6800cd99
+d8a046d8
+243a01fb
+20200202
+70890601
+7089003c
+708901e0
+70896d12
+2000000a
+70890201
+7089023d
+2000000a
+708903b7
+2000000a
+7089027d
+20600000
+6802cab4
+e0a28000
+e8c28000
+e0a28000
+708956c2
+708955d0
+20600000
+6802cabe
+e0a28000
+e8c28000
+e0a28000
+708956df
+2040020a
+708955df
+20600000
+20000004
+708955d1
+20000004
+708955d2
+20000004
+708955d4
+20000004
+20600000
+708955d4
+20000004
+708955d2
+20000004
+708955d1
+20000004
+708955d0
+708956c0
+20600000
+2030ba6f
+20400212
+20203a6f
+700b7e00
+70017706
+20403fa4
+58000291
+6001428e
+5800029a
+6001428a
+5800013c
+60014292
+580002b8
+60014290
+58000070
+6001428c
+58000294
+60014288
+58004ae5
+1ff0fe00
+60014bad
+60014baf
+20403e0b
+58004bb1
+1ff0fe00
+60014c79
+60014c7b
+6800ce5b
+c02d024c
+2035824a
+68014da2
+1ff0fe00
+60014da2
+68014da4
+1ff0fe00
+60014da4
+20400258
+680402a0
+243a0246
+68014ad4
+1ff0fe00
+203a0246
+60014da4
+704ce32f
+204000eb
+70828003
+20600000
+704ce330
+20200247
+1ce27e00
+203a02bb
+20405b63
+20404d99
+58000000
+60044040
+600147f4
+58000000
+60014ce4
+60014d93
+704ce333
+20200247
+2040688a
+580007e2
+da2002a0
+d840000c
+204068d3
+2040688d
+680402a0
+207a0000
+6800cda0
+c2800265
+c2808273
+c2810283
+20600000
+680902a4
+680102aa
+18422400
+1fe22200
+1ff0fe00
+60014da4
+1a227e00
+98462600
+1a63a600
+1a427e00
+9a667e00
+1ff0fe00
+60014da2
+20600000
+680902a2
+680102a8
+18422400
+1fe22200
+98462600
+1a6b2600
+1a427e00
+9a667e00
+1ff0fe00
+60014da2
+1a63a600
+1a227e00
+9a667e00
+1ff0fe00
+60014da4
+20600000
+680902a0
+680102a6
+18422400
+1fe22200
+98462600
+1a427e00
+9a667e00
+1ff0fe00
+60014da2
+1a6bfe00
+9a20fe00
+1ff0fe00
+60014da4
+20600000
+2040527c
+247a0000
+20200070
+78347c00
+68120138
+79347e1a
+6012004c
+20403db0
+7000a201
+20600000
+20400163
+24740000
+20400160
+24740000
+700b7f01
+700b7e01
+204002b4
+68008b7f
+247a0000
+20400163
+24740000
+20203d4f
+1a627e00
+20600000
+58000000
+600142a0
+600147f4
+6000c27f
+20203fa6
+70890f36
+70890b5f
+202053d4
+70890f2e
+70890bff
+202053d9
+68008b7e
+2000000a
+c08002b4
+20600000
+20600000
+700b7e03
+204002b4
+704e5b5a
+20403db8
+68120138
+793ffe0f
+6012004c
+20403db0
+d85fffff
+20203cda
+20407c20
+da2047e4
+20407f9f
+1fe20400
+20407c24
+18427e00
+207a0000
+c00082e1
+c00182e4
+20207c5a
+6800807c
+203a02d2
+204061d9
+6800807c
+243a7c8c
+68008b7d
+c584fc87
+c00202d7
+c01402dd
+20207c7b
+680147f4
+c30182da
+20207ca4
+58000000
+60020051
+20600000
+70007c37
+68014e5c
+60010051
+20600000
+20403eff
+70017706
+20207c97
+70017706
+6800c7dc
+c00002e8
+70017717
+70425e01
+20207ca2
+204032df
+2422b568
+68008047
+c301b571
+6800c165
+c009b562
+68014aca
+1fe67c14
+24213562
+60010091
+6800cac9
+60008090
+58004acc
+60010179
+20203562
+68010091
+60014aca
+1fe67c14
+2421358f
+98007200
+68008090
+6000cac9
+68010179
+98000c00
+d8a04acc
+20407e45
+2020358f
+20403b36
+20203cdc
+700b7d20
+20407c27
+2020030b
+600a0034
+70474801
+5800ffff
+60010032
+70007301
+20600000
+20403baa
+20400313
+20203267
+1c40c201
+20403a54
+18004803
+20403a42
+20403bae
+20403bb4
+20403bc5
+2020375c
+78547c00
+68010032
+d840ffff
+98467c00
+24628000
+68020034
+20380324
+9d067e00
+20200325
+9c467e00
+1fe67c04
+24610000
+18007e00
+60010032
+78347c00
+20600000
+600c02a0
+20407e53
+680c02a0
+2020307c
+2040527a
+247a0000
+20400333
+20206dfd
+6800c132
+c1008000
+6800c3cd
+207a0000
+1fe22200
+7043cd00
+1a227e00
+c0284ddc
+20600000
+e8c08000
+c005033f
+20204e14
+e8c08000
+1fe20e00
+e8c10000
+1fe22200
+1a627e00
+9a262600
+5800000b
+e0a08000
+18e27e00
+e0a08000
+e8c10000
+c001034d
+c0018354
+20203bf1
+58020008
+e0a30000
+58000200
+e0a20000
+18007e0c
+9a40a400
+20204e20
+5803000c
+e0a30000
+58000006
+e0a40000
+18007e10
+9a40a400
+20204e20
+204052c4
+18002400
+204052d0
+1fe20a00
+680102cd
+1fe22600
+680102cb
+98000c00
+20400365
+20205110
+e8c08000
+c0050368
+20205116
+e8c08000
+1fe20e00
+e8c10000
+1fe22200
+e8c10000
+600102a0
+1a627e00
+9a262600
+204052d0
+5800000b
+e0a08000
+18e27e00
+e0a08000
+680102a0
+2020034a
+680102cb
+1fe20c00
+e8c08000
+1fe1040f
+1ff1fe00
+c004cb18
+c003cb18
+c0050385
+c0028383
+c000cb05
+c0024b18
+20600000
+20400385
+20204b11
+58000003
+6000ccff
+58000002
+e0a08000
+1fe27200
+20407e45
+df200004
+d8c04cff
+204000ed
+704d8702
+20600000
Index: patch/rf.dat
===================================================================
--- /Branch/keyboard/C51SDK/btkb/patch/rf.dat	(nonexistent)
+++ /Branch/keyboard/C51SDK/btkb/patch/rf.dat	(working copy)
@@ -0,0 +1,108 @@
+mem_lpm_config:8f 10 ce
+mem_lpm_xtalcnt:00 0a 0b ef 0f
+mem_lpm_hibernate_switch:00
+mem_gpio_wakeup_low:00 00 00 00 00 00 00 00
+mem_fcomp_mul:02
+mem_fcomp_div:24
+mem_iscan_window:12 00
+mem_iscan_interval:00 02
+mem_pscan_window:12 00
+mem_pscan_interval:00 02
+mem_inq_window:20 00
+mem_page_window:20 00
+mem_page_to:00 20
+mem_rx_window_init:80 03
+mem_rx_window_sniff:00 06
+mem_new_supervision_to:00 13
+
+mem_eeprom_base:30 3f
+mem_eeprom_block_size:20
+#pointers to tail space of mem_le_att_list
+mem_le_att_list+360:
+07 ff #2M_IF
+0a fb
+0b ff 
+
+#agc table
+1a fb
+1b fb
+1c fb
+1d f6
+1e f2
+1f ee
+20 ea
+21 e6
+22 e2
+23 de
+24 da
+25 d6
+26 d2
+27 ce
+28 ca
+29 c6
+2a c2
+2b bd
+2c b9
+2d b5
+2e b1
+2f ad
+30 a9
+31 80
+32 80
+33 80
+34 c0
+35 c1
+36 c2
+37 c3
+38 c4
+39 c5
+3a c6
+3b c7
+3c 06
+3d 07
+3e 46
+3f 85
+40 86
+41 87
+42 c6
+43 c7
+44 d6
+45 d7
+46 e6
+47 f5
+48 00
+49 f8
+4a 7f
+4e ec
+4f 5e
+
+# tx power
+55 d0
+56 c0
+57 4c
+58 6c
+59 50
+
+#dpll
+68 e4
+69 00
+6a 00
+6b 30
+ff
+mem_rf_init_ptr:mem_le_att_list+360
+
+mem_le_att_list+468:
+mem_5db_tx_power_param:
+55 d0
+56 c0
+57 4c
+58 6c
+59 50
+
+mem_24g_paring_tx_power_param:
+55 d0
+56 c0
+57 4c
+58 6c
+59 50
+
Index: patch/user.dat
===================================================================
--- /Branch/keyboard/C51SDK/btkb/patch/user.dat	(nonexistent)
+++ /Branch/keyboard/C51SDK/btkb/patch/user.dat	(working copy)
@@ -0,0 +1,385 @@
+
+
+mem_class: 40 25 00
+
+mem_lap:36 08 22 08 66 22    
+mem_local_name_length:
+'Bluetooth 3.0 Keyboard
+mem_sniff_param_interval:0e 00
+mem_sniff_param_attempt:01
+mem_sniff_param_timeout:01
+mem_unsniff2sniff_timer:0a
+mem_ssp_enable:00
+mem_ui_profile_supported:01
+
+mem_eir_enable:01
+
+mem_all_uuid_16bits:
+06
+03#Type: Complete list of 16-bit UUIDs
+1100 0001 0210 2411  0012  0100
+
+mem_all_uuid_128bits:00
+
+#mouse uuid
+mem_mouse_uuid_list:
+#uuids
+04 0011 0100 1002 1124
+
+#handle
+00010000
+
+#total length
+3601aa
+
+#attribute start, first 4 digit is attribute ID
+090000 0a 00010000
+090001 3503 191124
+090004 350d 3506 190100 090011 3503 190011
+090005 3503 191002
+090006 3509 09656e 09006a 090100
+090009 3508 3506 191124 090100
+09000d 350f 350d 3506 190100 090013 3503 190011
+
+#Service Name
+#090100 2517
+#'Apple Wireless Keyboard
+#41 70 70 6c 65 20 57 69 72 65 6c 65 73 73 20 4b 65 79 62 6f 61 72 64
+#Service Name
+090100 253d
+#'Broadcom Bluetooth Wireless  Keyboard                        
+4272 6f61 6463 6f6d 2042 6c75 6574 6f6f 7468 2057 6972 656c 6573 7320 204b 6579 626f 6172 6420 
+2020 2020 2020 2020 2020 2020 2020 2020 2020 2020 2020 20
+
+#Service Description
+090101 2508
+#'Keyboard
+4b6579626f617264
+
+#Provider Name
+#090102 250a
+#'Apple Inc.
+#41 70 70 6c 65 20 49 6e 63 2e
+#Provider Name
+090102 2510
+#'Broadcom Corp.  
+4272 6f61 6463 6f6d 2043 6f72 702e 2020
+
+090200 090100
+090201 090111
+090202 0840
+090203 0821
+090204 2801
+090205 2801
+090206 3599 3597 0822 2593
+
+# hid descriptor
+0501 # Usage Page(Generic Desktop)
+0906 # Usage(Keyboard)
+a101 # Collection(Application)
+8501 # Report ID(1)
+7501 # Report Size(1)
+9508 # Report Count(8)
+0507 # Usage Page(Keyboard/Keypad)
+19e0 # Usage Minimum(224)
+29e7 # Usage Maximum(231)
+1500 # Logical Minimum(0)
+2501 # Logical Maximum(1)
+8102 # Input(Data Variable Absolute) ; Modifier byte
+9501 # Report Count(1)
+7508 # Report Size(8)
+8103 # Input(Constant Variable Absolute) ; 
+9505 # Report Count(5)
+7501 # Report Size(1)
+0508 # Usage Page(LEDs)
+1901 # Usage Minimum(1)
+2905 # Usage Maximum(5)
+9102 # Output(Data Variable Absolute) ; LED report
+9501 # Report Count(1)
+7503 # Report Size(3)
+9103 # Output(Constant Variable Absolute) ; 
+9506 # Report Count(6)
+7508 # Report Size(8)
+1500 # Logical Minimum(0)
+26ff00 # Logical Maximum(255)
+0507 # Usage Page(Keyboard/Keypad)
+1900 # Usage Minimum(0)
+29ff # Usage Maximum(255)
+8100 # Input(Data Array) ; Key arrarys 6 bytes
+c0 # End Collection
+
+050c # Usage Page(Consumer)
+0901 # Usage(Control)
+a101 # Collection(Application)
+8502 # Report ID(2)
+1500 # Logical Minimum(0)
+2501 # Logical Maximum(1)
+7501 # Report Size(1)
+9516 # Report Count(22)
+0ab101 # Usage(433)
+0a2302 # Usage(AC Home)					#01 home
+0aae01 # Usage(virtual keyboard)                        #02
+0a8a01 # Usage(AL Email Reader)                      #03
+0940 # Usage(Menu)						#04 menu
+096f # Usage(Lignt Down)					#05
+0a2102 # Usage(AC Search) 					#06
+09b6 # Usage(Scan Previous Track) 			#07 previous music
+09cd # Usage(205)							#08 start music
+09b5 # Usage(Scan Next Track)				#09 next music
+09e2 # Usage(Mute)						#0a
+09ea # Usage(Volume Down)					#0b
+09e9 # Usage(Volume Up)					#0c
+0930 # Usage(Power)                                         #0d
+0a8301 # Usage(music)                                      #0e
+0a0503 # Usage(773)
+0a0703 # Usage(775)
+0a0803 # Usage(776)
+0a0103 # Usage(769)
+0a9e01 # Usage(AL Terminal Lock/Screensaver)	#13
+0a0a03 # Usage(778)
+#0a0b03 # Usage(779)
+0970 # Usage(Lignt Up)						#15
+8102 # Input(Data Variable Absolute)
+9501 # Report Count(1)
+7502 # Report Size(2)
+8103 # Input(Constant Variable Absolute)
+c0 # End Collection
+
+090207 3508 3506 090409 090100
+09020b 090100
+09020c 091f40
+09020d 2800
+09020e 2801
+09020f 090012
+090210 090000
+#attribute end
+
+#uuids for pnpInformation	
+03 1002 1200 0001
+
+#handle
+00010001
+
+#total length 90 bytes
+3600a1
+
+#attribute list
+090000 0a00010001
+090001 3503 191200
+090004 350d 3506 190100 090001 3503 190001
+090006 3509 09656e 09006a 090100
+090009 3508 3506 191200 090100
+090100 252f42726f6164636f6d20426c7565746f6f746820576972656c657373204b6579626f61726420506e5020536572766572
+090101 25084b6579626f617264
+090200 090103
+090201# VendorID
+090a5c
+090202#ProductID
+098502
+090203 090001
+090204 2801
+090205 090002
+
+#attribute end
+00
+
+mem_kb_map_c51:
+14 # 00 q
+2b # 01 tab
+04 # 02 a
+29 # 03 esc
+1d # 04 z
+00
+35 # 06 `
+1e # 07 1
+1a # 08 w
+39 # 09 caps
+16 # 0a s
+00
+1b # 0c x
+00
+3a # 0e f1
+1f # 0f 2
+08 # 10 e
+3c # 11 f3
+07 # 12 d
+3d # 13 f4
+06 # 14 c
+63 # 15 .
+3b # 16 f2
+20 # 17 3
+15 # 18 r
+17 # 19 t
+09 # 1a f
+0a # 1b g
+19 # 1c v
+05 # 1d b
+22 # 1e 5
+21 # 1f 4
+18 # 20 u
+1c # 21 y
+0d # 22 j
+0b # 23 h
+10 # 24 m
+11 # 25 n
+23 # 26 6
+24 # 27 7
+0c # 28 i
+30 # 29 ]
+0e # 2a k
+3f # 2b f6
+36 # 2c ,
+00
+2e # 2e =
+25 # 2f 8
+12 # 30 o
+40 # 31  f7
+0f  # 32 l
+00 # 33
+37 # 34 .
+00 # 35
+41 # 36 f8
+26 # 37 9
+00 # 38
+00 # 39
+00 # 3a
+2c # 3b space
+44 # 3c f11
+51 # 3d down
+4c # 3e delete
+00 # 3f
+00  # 40 
+81  # 41 lshift
+85 # 42 rshift
+00
+00 # 44 
+00
+00 # 46 
+00 # 47  
+00 #48	
+2a #49 bksp
+31 #4a \
+00 # 4b 
+28 # 4c enter
+00 # 4d 
+42 # 4e  f9
+43 #4f f10
+13  #50 p
+2f  # 51 [
+33 # 52 ;
+34 #53 '
+00 #54  
+38 #55 /
+2d #56 
+27 #57 0
+00 #58
+00 # 59 
+80 # 5a  lctrl
+83 #5b lwin
+00 # 5c  
+87 #5d rwin
+00 # 5e 
+45 # 5f  f12
+00 # 60 
+00 # 61 
+00 # 62 
+00 # 63 
+86 # 64 ralt
+00 # 65 
+7f# 66 fn 
+3e # 67  f5
+00 # 68
+82 # 69 lalt
+00 # 6a  
+00 # 6b  
+00
+00  #6d  
+00
+00 # 6f  
+00
+00
+00
+00
+00 # 74  
+00 # 75 
+00 # 76
+00 # 77  
+00 # 78
+00 # 79  
+00 # 7a
+00 # 7b
+00 # 7c
+4f # 7d right
+00 
+00
+00
+00
+00
+52 #83 up
+00
+50 # 85 left      
+#Auto reconnection after power on
+
+memui_uuid_table:mem_mouse_uuid_list
+#Auto reconnection after power on
+mem_device_option:43
+mem_ptt:0
+mem_features:
+ff
+ff
+8f
+f8	#fe--EDR  F8--BR
+83	#AFHclose 83
+9d
+59
+82
+
+#bluetootch param init
+mem_sp_flag:00
+mem_lpm_current_mult:00
+mem_master_sp_flag:00
+mem_le_ch_mapped:27
+
+mem_ui_button_gpio:ff
+mem_led_gpio:ff
+
+
+#2=mouse 4=dongle 6=ukey 7=ir
+mem_lpm_mode:01
+mem_lpm_mult:40
+mem_lpm_mult_timeout:03
+mem_lpm_overhead:08
+mem_lpm_interval:00 02
+mem_scan_mode:00
+
+mem_seqi:80
+
+
+mem_ipc_tx_evt_buff:02 01
+
+mem_kb_ks_col:
+08
+09
+0a
+0b
+0c
+0d
+0e
+11
+12
+13
+14
+15
+16
+17
+18
+19
+1a
+1b
+
+mem_adc_config_flag:01
+mem_adc_channel:30
+mem_adc_0v:9f 3e
+mem_adc_3v:cd 4d
+
+
Index: program/patch.prog
===================================================================
--- /Branch/keyboard/C51SDK/btkb/program/patch.prog	(revision 4305)
+++ /Branch/keyboard/C51SDK/btkb/program/patch.prog	(working copy)
@@ -358,6 +358,7 @@
 	hfetch 1,rf_adc_ch
 	or_into 0x30,pdata
 	hstore 1,rf_adc_ch
+	hjam 0x74,rfen_adc
 	hjam 0x7c,rfen_adc
 	hjam 0xaa,rf_adc_gc
 	nop 5000
