diff options
author | Ryan Hsu <ryan.hsu@telink-semi.com> | 2023-08-25 09:10:09 -0700 |
---|---|---|
committer | Ryan Hsu <ryan.hsu@telink-semi.com> | 2023-08-25 09:10:09 -0700 |
commit | 09d4992ab0e169543b3535e5c5e1f4edf2d193ef (patch) | |
tree | d34ae04e029018a9b572da46824d68daab167867 | |
parent | da69913e46140d5b7439b326024b7b735a1f474c (diff) | |
download | refDesignRcu-09d4992ab0e169543b3535e5c5e1f4edf2d193ef.tar.gz |
Add special VID/PID settings for couch mode
Multiple pairing mode combo keys. Set the address to 0x780F6 and 0x780F7.
Add magic key
- device UI layout bit7 0: INPUT 1:MAGIC
- IR code: 0x68 BLE code: 0x0186
- magic key also supports google IR. This depends on whether the STB is set to magic eky
Fix key delay issue
bug: N/A
test: manual
Change-Id: I645e6b733c851311c02055aebcb598d13ac7f9a4
-rw-r--r-- | application/usbstd/usbkeycode.h | 2 | ||||
-rwxr-xr-x | tl_check_fw.sh | 2 | ||||
-rw-r--r-- | vendor/827x_ble_remote/app.c | 20 | ||||
-rw-r--r-- | vendor/827x_ble_remote/app_config.h | 10 | ||||
-rw-r--r-- | vendor/827x_ble_remote/app_custom.c | 34 | ||||
-rw-r--r-- | vendor/827x_ble_remote/app_custom.h | 2 | ||||
-rw-r--r-- | vendor/827x_ble_remote/app_find_me/app_fms.c | 2 | ||||
-rw-r--r-- | vendor/827x_ble_remote/app_ir.c | 112 | ||||
-rw-r--r-- | vendor/827x_ble_remote/app_ir.h | 5 | ||||
-rw-r--r-- | vendor/827x_ble_remote/app_ui.c | 40 | ||||
-rw-r--r-- | vendor/827x_ble_remote/app_ui.h | 2 | ||||
-rw-r--r-- | vendor/827x_ble_remote/main.c | 13 | ||||
-rw-r--r-- | version.h | 2 |
13 files changed, 213 insertions, 33 deletions
diff --git a/application/usbstd/usbkeycode.h b/application/usbstd/usbkeycode.h index 422c887..20b7e5b 100644 --- a/application/usbstd/usbkeycode.h +++ b/application/usbstd/usbkeycode.h @@ -355,6 +355,8 @@ typedef enum { //reference: <<HID Usage Tables>> Consumer Page(0x0C) typedef enum { //device_layout + GOOGLE_MKEY_MAGIC = 0x0186, + GOOGLE_MKEY_NOTIFICATION = 0x009f, GOOGLE_MKEY_LIVETV = 0x0089, GOOGLE_MKEY_TELETEXT = 0x0185, diff --git a/tl_check_fw.sh b/tl_check_fw.sh index 689e662..f211dd7 100755 --- a/tl_check_fw.sh +++ b/tl_check_fw.sh @@ -7,7 +7,7 @@ echo "this is post build!! current configure is :$1" tc32-elf-objcopy -v -O binary $2.elf $1.bin #../check_fw $1.bin #../FW_SIG_ENC 3 $1.bin FW_ENC_KEY -#python3 ../ref_sign_fw.py -f $1.bin -p ../priv.pem -k ../FW_ENC_KEY -o $1_enc_sign.bin@ +#python3 ../ref_sign_fw.py -f $1.bin -p ../priv.pem -k ../FW_ENC_KEY -o $1_enc_sign.bin python3 ../ref_sign_fw.py -f $1.bin -p ../PrivateSample.pem -k ../FW_ENC_TEST_KEY -o $1_enc_sign.bin #py ../ref_sign_fw.py -f $1.bin -p ../PrivateSample.pem -k ../FW_ENC_TEST_KEY -o $1_enc_sign.bin echo "**************** end of post build ******************" diff --git a/vendor/827x_ble_remote/app.c b/vendor/827x_ble_remote/app.c index d6a1609..bbe9797 100644 --- a/vendor/827x_ble_remote/app.c +++ b/vendor/827x_ble_remote/app.c @@ -131,7 +131,7 @@ _attribute_data_retention_ u32 mtuExchange_check_timer=12000000; _attribute_data_retention_ u32 ir_flash_erase_tick=0; _attribute_data_retention_ u32 delay3s_to_sleep_tick=0; _attribute_data_retention_ u16 enterdeep_time_count = 0; -_attribute_data_retention_ u16 enterdeep_time = 0; +_attribute_data_retention_ u16 enterdeep_time = ADV_RECONN_ENTER_DEEP_COUNT; _attribute_data_retention_ u16 service_change = 0; _attribute_data_retention_ u8 device_timeout_state=0; _attribute_data_retention_ u8 flag_schedule_ota=0; @@ -1074,6 +1074,13 @@ void blt_pm_proc(void) bls_pm_setSuspendMask (SUSPEND_ADV | SUSPEND_CONN); #endif + /* The button has been released and g_delay_en_pm is not 0 */ + if((0 == key_not_released) && g_delay_en_pm){ + /* 221116 by ken. A short latency is required during the validity period of the delay PM. + * In order to quickly receive the mic open command of GOOGLE voice */ + bls_pm_setManualLatency(5); + } + int user_task_flg = ota_is_working || scan_pin_need || key_not_released; if(user_task_flg){ @@ -1093,13 +1100,6 @@ void blt_pm_proc(void) #endif } - /* The button has been released and g_delay_en_pm is not 0 */ - if((0 == key_not_released) && g_delay_en_pm){ - /* 221116 by ken. A short latency is required during the validity period of the delay PM. - * In order to quickly receive the mic open command of GOOGLE voice */ - bls_pm_setManualLatency(5); - } - #if 1 //deepsleep if(sendTerminate_before_enterDeep == 1){ //sending Terminate and wait for ack before enter deepsleep if(user_task_flg){ //detect key Press again, can not enter deep now @@ -1130,7 +1130,7 @@ void blt_pm_proc(void) clock_time_exceed(advertise_begin_tick , ADV_IDLE_ENTER_DEEP_TIME * 1000000)) { enterdeep_time_count++; - printf("enterdeep_time_count=%x\r\n",enterdeep_time_count); + printf("enterdeep_time_count=%x enterdeep_time:[%d]\r\n",enterdeep_time_count, enterdeep_time); if(enterdeep_time_count == enterdeep_time) { if(enterdeep_time >1) @@ -1397,7 +1397,7 @@ void user_init_normal(void) if(bond_number) //at least 1 bonding device exist { u8 my_sch_ota_index = analog_read(DEEP_ANA_REG2); - if((APP_WAKEUP_SRC_DEEP_TIMER == app_ui_get_wakeup_src()) && (!my_sch_ota_index)){ + if( (APP_WAKEUP_SRC_DEEP_TIMER == app_ui_get_wakeup_src()) && (!my_sch_ota_index) && (g_p_app_fms_ctrl->en_periodic_wakeup) ){ /* This wake-up is for the periodic wake-up of the FMS * When the wake-up source is Timer, currently there are only scheduled OTA and periodic wake-up * If it is scheduled OTA, my_sch_ota_index is not 0.*/ diff --git a/vendor/827x_ble_remote/app_config.h b/vendor/827x_ble_remote/app_config.h index 7a13412..f60e42b 100644 --- a/vendor/827x_ble_remote/app_config.h +++ b/vendor/827x_ble_remote/app_config.h @@ -42,6 +42,10 @@ extern "C" { #define APP_COUCH_MODE_ADDR 0x780EF #define APP_TX_POWER_ADDR 0x780F0 + +#define APP_2ND_PAIR_KEY0 0x780F6 +#define APP_2ND_PAIR_KEY1 0x780F7 + #define APP_WOBLE_ADV_TYPE_ADDR 0x780F8 #define APP_PERIODIC_WAKE_UP_TIMER 0x780F9 #define APP_EN_PERIODIC_WAKE_UP 0x780FB @@ -216,9 +220,12 @@ extern "C" { #define CR_VOL_DN 0x81 #define CR_PERIOD 0x37 -#define CR_MEDIA_KEY_INDEX CR_NOTIFICATION +#define CR_MEDIA_KEY_INDEX CR_MAGIC // 230529 by ken. CR_NOTIFICATION -> CR_MAGIC //device layout +/* 230529 by ken. add magic key code */ +#define CR_MAGIC 0xdc + #define CR_NOTIFICATION 0xdd #define CR_LIVETV 0xde #define CR_TELETEXT 0xdf @@ -325,6 +332,7 @@ extern "C" { #define IR_RECORD 0x54 #define IR_PLAYPAUSE 0x52 #define IR_FASTFORWARD 0x53 +#define IR_MAGIC 0x68 #define KB_SCAN_PINS {GPIO_PA1, GPIO_PA2, GPIO_PA3, GPIO_PA4, GPIO_PA5, GPIO_PA6,GPIO_PB5,GPIO_PB6} diff --git a/vendor/827x_ble_remote/app_custom.c b/vendor/827x_ble_remote/app_custom.c index 0b7303a..94f01e4 100644 --- a/vendor/827x_ble_remote/app_custom.c +++ b/vendor/827x_ble_remote/app_custom.c @@ -30,6 +30,7 @@ #include "app_custom_lib.h" #include "stack/ble/ble.h" #include "app_test.h" +#include "app_ui.h" #include "./app_find_me/app_fms.h" const u8 *pREMOTE_G10 = (u8 *)("RemoteG10"); @@ -236,6 +237,13 @@ void app_custom_ui_layout(u8 ui_layout) key_map_ble[Kb_Map_devicelayout_Correspend_Index_G10[2]] = CR_ALLAPPS; nec_ir_cmd1_table[Kb_Map_devicelayout_Correspend_Index_G10[2]] = IR_ALLAPPS; } + + /* 230529 by ken. add Input/Magic settings */ + if(BIT_IS_SET(ui_layout, 7)){ + /* set to magic key. IR code:0x68, BLE Page:0x0c value:0x9186 */ + key_map_ble[3] = CR_MAGIC; + nec_ir_cmd1_table[3] = IR_MAGIC; + } } else { @@ -280,6 +288,13 @@ void app_custom_ui_layout(u8 ui_layout) key_map_ble[Kb_Map_devicelayout_Correspend_Index_G20[8]] = CR_PERIOD; nec_ir_cmd1_table[Kb_Map_devicelayout_Correspend_Index_G20[8]] = IR_PERIOD; } + + /* 230529 by ken. add Input/Magic settings */ + if(BIT_IS_SET(ui_layout, 7)){ + /* set to magic key. IR code:0x68, BLE Page:0x0c value:0x9186 */ + key_map_ble[6] = CR_MAGIC; + nec_ir_cmd1_table[6] = IR_MAGIC; + } } } @@ -343,6 +358,8 @@ void app_custom_set_new_ir_table(void) */ void app_custom_param_init(u8 device_layout) { + printf("device type:[%d] UI_layout:[%02X]", _custom_data.device_type, device_layout); + if(_custom_data.device_type == REMOTE_G10) { p_kb_map_ble = key_map_ble; @@ -739,6 +756,23 @@ void app_custom_init(void) extern u8 app_rcu_CouchMode; app_rcu_CouchMode = (1==my_CouchMode)?1:0; + if(0 == app_rcu_CouchMode){ + /* 230526 by ken.Set couch mode according to VID/PID. ohsung's special needs + * VID/PID: 0x0957/0x000B + * VID/PID: 0x02AF/0x0314 + **/ + if((0x01 == p_my_pnpid->vid_src) && (0x0957 == p_my_pnpid->vid) && (0x000B == p_my_pnpid->pid)){ + app_rcu_CouchMode = 1; + }else if((0x01 == p_my_pnpid->vid_src) && (0x02AF == p_my_pnpid->vid) && (0x0314 == p_my_pnpid->pid)){ + app_rcu_CouchMode = 1; + } + } + + + /* 230525 by ken. Add a second pairing key combo key */ + u8 my_2ndPairkey[2] = {0xff, 0xff}; + flash_read_page(APP_2ND_PAIR_KEY0, 2 , my_2ndPairkey); + app_ui_set_2ndPairKey(my_2ndPairkey[0], my_2ndPairkey[1]); } diff --git a/vendor/827x_ble_remote/app_custom.h b/vendor/827x_ble_remote/app_custom.h index 9bb1aff..ee373b2 100644 --- a/vendor/827x_ble_remote/app_custom.h +++ b/vendor/827x_ble_remote/app_custom.h @@ -41,6 +41,8 @@ extern u8 en_ble_adv; extern u8 en_slave_rpa; extern const unsigned char navi_key_index_g10[4]; extern const unsigned char navi_key_index_g20[4]; +extern unsigned char key_map_ble[48]; + extern void app_custom_init(void); extern u8 app_custom_get_drive_len(void); diff --git a/vendor/827x_ble_remote/app_find_me/app_fms.c b/vendor/827x_ble_remote/app_find_me/app_fms.c index cb31f90..09de714 100644 --- a/vendor/827x_ble_remote/app_find_me/app_fms.c +++ b/vendor/827x_ble_remote/app_find_me/app_fms.c @@ -276,6 +276,8 @@ int app_fms_adv_timer(void){ void app_fms_try_connect(void){ + if(!g_p_app_fms_ctrl->en_periodic_wakeup) return; + printf("%s \n", __FUNCTION__ ); s_p_app_fms_adv_count[0] = 0; diff --git a/vendor/827x_ble_remote/app_ir.c b/vendor/827x_ble_remote/app_ir.c index f469c36..3626666 100644 --- a/vendor/827x_ble_remote/app_ir.c +++ b/vendor/827x_ble_remote/app_ir.c @@ -124,6 +124,15 @@ const key_button_pair_t key_button_map_g10[MAX_KEY_COUNT] = { {0x00B2, KEY_IDX_INPUT, 0x03} }; +/* 230529 by ken. change input(android key code) to Magic */ +const key_button_pair_t key_button_map_g10_magic[MAX_KEY_COUNT] = { + {0x0018, KEY_IDX_VOLUP, 0x10}, + {0x0019, KEY_IDX_VOLDN, 0x02}, + {0x00A4, KEY_IDX_MUTE, 0x16}, + {0x001A, KEY_IDX_POWER, 0 }, + {0x0139, KEY_IDX_MAGIC, 0x03} +}; + //keyid: receive from the host. button_idx: Corresponding to the key index in the memory ir_table[].button:The actual keyid corresponding to the board const key_button_pair_t key_button_map_g20[MAX_KEY_COUNT] = { {0x0018, KEY_IDX_VOLUP, 0x1f}, @@ -133,6 +142,15 @@ const key_button_pair_t key_button_map_g20[MAX_KEY_COUNT] = { {0x00B2, KEY_IDX_INPUT, 0x06} }; +/* 230529 by ken. change input(android key code) to Magic */ +const key_button_pair_t key_button_map_g20_magic[MAX_KEY_COUNT] = { + {0x0018, KEY_IDX_VOLUP, 0x1f}, + {0x0019, KEY_IDX_VOLDN, 0x02}, + {0x00A4, KEY_IDX_MUTE, 0x2B}, + {0x001A, KEY_IDX_POWER, 0 }, + {0x0139, KEY_IDX_MAGIC, 0x06} +}; + //The following address corresponds to the flash memory address written each time. Upto 5 keys can be written at a time, and each key occupies a maximum of 256 bytes. const u32 if_flash_sect_addr[IR_DATA_SECT_MAX_NUM] ={IR_DATA_SECT_0_ADDR+256,IR_DATA_SECT_0_ADDR+1536,IR_DATA_SECT_0_ADDR+2816,IR_DATA_SECT_1_ADDR+256,IR_DATA_SECT_1_ADDR+1536,IR_DATA_SECT_1_ADDR+2816, \ IR_DATA_SECT_2_ADDR+256,IR_DATA_SECT_2_ADDR+1536,IR_DATA_SECT_2_ADDR+2816,IR_DATA_SECT_3_ADDR+256,IR_DATA_SECT_3_ADDR+1536,IR_DATA_SECT_3_ADDR+2816}; @@ -227,16 +245,32 @@ u8 ir_get_button_idx_from_button(u8 button) { if(app_custom_get_device_type() == REMOTE_G10) { - if (key_button_map_g10[i].button == button) - { - return key_button_map_g10[i].button_idx; + /* 230529 by ken. Select key_button_map_g10 or key_button_map_g10_magic according to the key value of the input (magic) key */ + if(CR_INPUT == key_map_ble[3]){ + if (key_button_map_g10[i].button == button) + { + return key_button_map_g10[i].button_idx; + } + }else{ + if (key_button_map_g10_magic[i].button == button) + { + return key_button_map_g10_magic[i].button_idx; + } } } else { - if (key_button_map_g20[i].button == button) - { - return key_button_map_g20[i].button_idx; + /* 230529 by ken. Select key_button_map_g20 or key_button_map_g20_magic according to the key value of the input (magic) key */ + if(CR_INPUT == key_map_ble[6]){ + if (key_button_map_g20[i].button == button) + { + return key_button_map_g20[i].button_idx; + } + }else{ + if (key_button_map_g20_magic[i].button == button) + { + return key_button_map_g20_magic[i].button_idx; + } } } } @@ -255,17 +289,35 @@ u8 ir_get_button_idx_from_key_id(u16 key_id) { if(app_custom_get_device_type() == REMOTE_G10) { - if (key_button_map_g10[i].key_id == key_id) - { - return key_button_map_g10[i].button_idx; + + /* 230529 by ken. Select key_button_map_g10 or key_button_map_g10_magic according to the key value of the input (magic) key */ + if(CR_INPUT == key_map_ble[3]){ + if (key_button_map_g10[i].key_id == key_id) + { + return key_button_map_g10[i].button_idx; + } + }else{ + if (key_button_map_g10_magic[i].key_id == key_id) + { + return key_button_map_g10_magic[i].button_idx; + } } } else { - if (key_button_map_g20[i].key_id == key_id) - { - return key_button_map_g20[i].button_idx; + /* 230529 by ken. Select key_button_map_g20 or key_button_map_g20_magic according to the key value of the input (magic) key */ + if(CR_INPUT == key_map_ble[6]){ + if (key_button_map_g20[i].key_id == key_id) + { + return key_button_map_g20[i].button_idx; + } + }else{ + if (key_button_map_g20_magic[i].key_id == key_id) + { + return key_button_map_g20_magic[i].button_idx; + } } + } } return KEY_IDX_NULL; @@ -1161,10 +1213,24 @@ int ir_fallback_send(u8 key_down) { //Besides sending IR code, also notify ATV that the key event printf("send notify\r\n"); - if(app_custom_get_device_type() == REMOTE_G10) - key_id = key_button_map_g10[ir_app_parm.current_programming_key_send].key_id; - else - key_id = key_button_map_g20[ir_app_parm.current_programming_key_send].key_id; + if(app_custom_get_device_type() == REMOTE_G10){ + + /* 230529 by ken. Select key_button_map_g10 or key_button_map_g10_magic according to the key value of the input (magic) key */ + if(CR_INPUT == key_map_ble[3]){ + key_id = key_button_map_g10[ir_app_parm.current_programming_key_send].key_id; + }else{ + key_id = key_button_map_g10_magic[ir_app_parm.current_programming_key_send].key_id; + } + } + else{ + /* 230529 by ken. Select key_button_map_g20 or key_button_map_g20_magic according to the key value of the input (magic) key */ + if(CR_INPUT == key_map_ble[6]){ + key_id = key_button_map_g20[ir_app_parm.current_programming_key_send].key_id; + }else{ + key_id = key_button_map_g20_magic[ir_app_parm.current_programming_key_send].key_id; + } + + } //printf("key_id=%x\r\n",key_id); ir_cache_key[0] = key_down ? 0:1; ir_cache_key[1] = (key_id >> 8); @@ -1353,12 +1419,22 @@ u8 ir_table_add_key(u16 key_id, u16 code_size, u8* code) { if(app_custom_get_device_type() == REMOTE_G10) { - button = key_button_map_g10[button_index].button; + /* 230529 by ken. Select key_button_map_g10 or key_button_map_g10_magic according to the key value of the input (magic) key */ + if(CR_INPUT == key_map_ble[3]){ + button = key_button_map_g10[button_index].button; + }else{ + button = key_button_map_g10_magic[button_index].button; + } //printf("ir_table[button_index].key_id=%x \r\n",button); } else { - button = key_button_map_g20[button_index].button; + /* 230529 by ken. Select key_button_map_g20 or key_button_map_g20_magic according to the key value of the input (magic) key */ + if(CR_INPUT == key_map_ble[6]){ + button = key_button_map_g20[button_index].button; + }else{ + button = key_button_map_g20_magic[button_index].button; + } // printf("ir_table[button_index].key_id=%x \r\n",button); } //printf("ir_table[button_index].button_idx=%x \r\n",button_index); diff --git a/vendor/827x_ble_remote/app_ir.h b/vendor/827x_ble_remote/app_ir.h index cf19a05..10c6d18 100644 --- a/vendor/827x_ble_remote/app_ir.h +++ b/vendor/827x_ble_remote/app_ir.h @@ -46,7 +46,10 @@ typedef enum{ KEY_IDX_VOLDN, KEY_IDX_MUTE, KEY_IDX_POWER, - KEY_IDX_INPUT + KEY_IDX_INPUT, + + /* 230529 by ken. add Magic.Magic and input are the same key */ + KEY_IDX_MAGIC = KEY_IDX_INPUT, }ATV_IR_KEY_IDX; typedef void (*app_ir_programming_end_Cb_t)(void); diff --git a/vendor/827x_ble_remote/app_ui.c b/vendor/827x_ble_remote/app_ui.c index bfd7634..64ba67b 100644 --- a/vendor/827x_ble_remote/app_ui.c +++ b/vendor/827x_ble_remote/app_ui.c @@ -77,6 +77,10 @@ _attribute_data_retention_ u8 testmode_key_seq_count=0; _attribute_data_retention_ u32 g_delay_en_pm = 0; +/* 230525 by ken. Add a second pairing key combo key */ +_attribute_data_retention_ u8 g_2ndPairKey[2] = {0xff, 0xff}; + + extern u8 wakeup_key_keycount; extern u8 comb_key_keyid[9]; extern u32 latest_user_event_tick; @@ -104,6 +108,10 @@ extern int bls_smp_param_deleteByIndex(u8 index); extern void app_stop_wakeup_loop(void); static const u16 vk_consumer_map[] = { + /* 230529 by ken. add magic key code */ + GOOGLE_MKEY_MAGIC, + + GOOGLE_MKEY_NOTIFICATION, GOOGLE_MKEY_LIVETV, GOOGLE_MKEY_TELETEXT, @@ -1232,6 +1240,21 @@ void key_change_proc(void) keyScanLongPressTick = clock_time() | 1; //none zero LongPressTick = 4000000; Accessibility_Shortcut_Mode = APP_ACCESSIBILITY_SHORTCUT_PAIRING; + }else if( ((key0 == g_2ndPairKey[0]) && (key1 == g_2ndPairKey[1])) || ((key0 == g_2ndPairKey[1]) && (key1 == g_2ndPairKey[0])) ){ + printf("pair start by 2nd pair key\r\n"); + comb_key_stop_ir(); + //in voice mode need disable enter pairing mode + if(ui_mic_enable) + { + return; + } + if(lowbat == 0) + { + device_led_setup(led_cfg[LED_AUDIO_ON]); + } + keyScanLongPressTick = clock_time() | 1; //none zero + LongPressTick = 4000000; + Accessibility_Shortcut_Mode = APP_ACCESSIBILITY_SHORTCUT_PAIRING; } else if (((key0 == comb_key_keyid[2]) && (key1 == comb_key_keyid[3])) || ((key0 == comb_key_keyid[3]) && (key1 == comb_key_keyid[2]))) //Factory Reset Mode center+mute { @@ -1993,7 +2016,7 @@ void app_ui_check_wakeup_src(u8 deepRetWakeUp){ if(WAKEUP_STATUS_PAD == (my_power_flags & (WAKEUP_STATUS_TIMER|WAKEUP_STATUS_PAD))){ app_ui_set_wakeup_src(APP_WAKEUP_SRC_DEEP_PAD); - }else if(my_power_flags & APP_WAKEUP_SRC_DEEP_TIMER){ + }else if(my_power_flags & WAKEUP_STATUS_TIMER){ app_ui_set_wakeup_src(APP_WAKEUP_SRC_DEEP_TIMER); }else{ app_ui_set_wakeup_src(APP_WAKEUP_SRC_SOFT_RESET); @@ -2012,3 +2035,18 @@ void app_ui_check_delay_en_pm(void){ printf("[NOTICE] Clear delay PM flag "); } } + + +void app_ui_set_2ndPairKey(u8 key0, u8 key1){ + + if((0xFF == key0) || (0xFF == key1)){ + g_2ndPairKey[0] = 0xFF; + g_2ndPairKey[1] = 0xFF; + return; + } + + g_2ndPairKey[0] = key0; + g_2ndPairKey[1] = key1; + printf("[NOTICE] Enable 2nd pair COMBO key. key0:[%d] key2:[%d]", g_2ndPairKey[0], g_2ndPairKey[1]); +} + diff --git a/vendor/827x_ble_remote/app_ui.h b/vendor/827x_ble_remote/app_ui.h index 9f825db..b8147e2 100644 --- a/vendor/827x_ble_remote/app_ui.h +++ b/vendor/827x_ble_remote/app_ui.h @@ -99,4 +99,6 @@ void app_ui_check_delay_en_pm(void); void app_key_release_action(void); +void app_ui_set_2ndPairKey(u8 key0, u8 key1); + #endif /* APP_UI_H_ */ diff --git a/vendor/827x_ble_remote/main.c b/vendor/827x_ble_remote/main.c index 428331c..4d5d896 100644 --- a/vendor/827x_ble_remote/main.c +++ b/vendor/827x_ble_remote/main.c @@ -104,6 +104,19 @@ _attribute_ram_code_ int main (void) //must run in ramcode GPIO_PB2_PULL_DOWN_100K; if (gpio_read(DUT_INPUT_PORT) && test_get_mode() == MODE_TEST) { + extern u8 mac_public[6]; + u8 mac_random_static[6]; + //for 512K Flash, flash_sector_mac_address equals to 0x76000 + //for 1M Flash, flash_sector_mac_address equals to 0xFF000 + blc_initMacAddress(flash_sector_mac_address, mac_public, mac_random_static); + + blc_app_loadCustomizedParameters(); //load customized freq_offset cap value + + rf_set_power_level_index (RF_POWER_P11p26dBm); + + ////// Controller Initialization ////////// + blc_ll_initBasicMCU(); //mandatory + blc_ll_initStandby_module(mac_public); //mandatory extern void app_phytest_init(void); app_phytest_init(); @@ -27,6 +27,6 @@ #ifndef VERSION_H_ #define VERSION_H_ -#define FW_VERSION 0x34210222//FW:v3.4.2 SW:v2.22 +#define FW_VERSION 0x34210224//FW:v3.4.2 SW:v2.24 #endif /* VERSION_H_ */ |