aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRyan Hsu <ryan.hsu@telink-semi.com>2023-04-07 00:15:39 -0700
committerRyan Hsu <ryan.hsu@telink-semi.com>2023-04-07 00:23:56 -0700
commit568c6cb7f8e6b7c8c1a5f1c87521f36995a1694e (patch)
tree9c5fdd8d79381469335d0953fe3227d8222523cb
parente11b11e156818f2f9fd610e9fcdce45249b96edc (diff)
downloadrefDesignRcu-568c6cb7f8e6b7c8c1a5f1c87521f36995a1694e.tar.gz
RCU fixed the combo key issue
1. fixed the combo key issue, as well as showing LEDs 2. create variable at 0x780F0. If it is uninitialized, then write it as 0x23, i.e. 7.5dBm. This version doesn't read it out. Set the version number to 2.17 Bug: b/266562271 Test: tested combo keys [back + OK] = bugreport [back + down] = talkback Change-Id: Ie658055c95a95badb770c99495e32b7daea020f7
-rw-r--r--vendor/827x_ble_remote/app_config.h1
-rw-r--r--vendor/827x_ble_remote/app_custom.c9
-rw-r--r--vendor/827x_ble_remote/app_ui.c54
-rw-r--r--version.h2
4 files changed, 49 insertions, 17 deletions
diff --git a/vendor/827x_ble_remote/app_config.h b/vendor/827x_ble_remote/app_config.h
index fa72774..93445c8 100644
--- a/vendor/827x_ble_remote/app_config.h
+++ b/vendor/827x_ble_remote/app_config.h
@@ -43,6 +43,7 @@ extern "C" {
#define APP_WOBLE_ADV_TYPE_ADDR 0x780F8
#define APP_PERIODIC_WAKE_UP_TIMER 0x780F9
#define APP_EN_PERIODIC_WAKE_UP 0x780FB
+#define APP_TX_POWER_ADDR 0x780F0
#define APP_EN_SLAVE_RPA 0x780FC
#define APP_EN_BLE_ADV 0x780FD
#define APP_EN_GOOGLE_WAKEUPPACK 0x780FE
diff --git a/vendor/827x_ble_remote/app_custom.c b/vendor/827x_ble_remote/app_custom.c
index 970e405..26efbbf 100644
--- a/vendor/827x_ble_remote/app_custom.c
+++ b/vendor/827x_ble_remote/app_custom.c
@@ -602,6 +602,15 @@ void app_custom_data_update(void)
*/
void app_custom_init(void)
{
+ /* 2.17 only
+ * Special version, if the address APP_TX_POWER is 0xff, write 0x23 (TX power7.37dBm) */
+ u8 my_TxPoewr = 0x00;
+ flash_read_page(APP_TX_POWER_ADDR, 1 , &my_TxPoewr);
+ if(0xff == my_TxPoewr){
+ my_TxPoewr = RF_POWER_P7p37dBm;
+ flash_write_page(APP_TX_POWER_ADDR, 1 , &my_TxPoewr);
+ }
+
u8 buffer[80];
u8 addr_pos=0,i;
u8 *pREMOTE_B046 = (u8 *)("RemoteB046");
diff --git a/vendor/827x_ble_remote/app_ui.c b/vendor/827x_ble_remote/app_ui.c
index e8f3bfa..84ce10f 100644
--- a/vendor/827x_ble_remote/app_ui.c
+++ b/vendor/827x_ble_remote/app_ui.c
@@ -1198,8 +1198,6 @@ void key_change_proc(void)
u16 consumer_key[2]={0};
key_not_released = 1;
-
-
if(kb_event.cnt >= 3){
printf("[NOTICE] More than 2 buttons were pressed. key_type: [0x%x] \n",key_type);
@@ -1252,6 +1250,16 @@ void key_change_proc(void)
// device_led_setup(led_cfg[LED_AUDIO_ON]);
if(device_in_connection_state){
+
+ consumer_key[0] = 0;
+ consumer_key[1] = 0;
+ bls_att_pushNotifyData (HID_CONSUME_REPORT_INPUT_DP_H, (u8 *)&consumer_key, 4);
+
+ device_led_off(APP_LED_GREEN);
+ if(lowbat == 0)
+ {
+ device_led_setup(led_cfg[LED_AUDIO_ON]);
+ }
key_type = CONSUMER_KEY;
consumer_key[0] = GOOGLE_MKEY_BACK;
@@ -1259,15 +1267,15 @@ void key_change_proc(void)
bls_att_pushNotifyData (HID_CONSUME_REPORT_INPUT_DP_H, (u8 *)&consumer_key, 4);
// app_keyboard_release_action_by_flag();
}else{
- keyScanLongPressTick = clock_time() | 1; //none zero
- LongPressTick = 1000000;
- Accessibility_Shortcut_Mode = APP_ACCESSIBILITY_SHORTCUT_BUGREPORT;
+// keyScanLongPressTick = clock_time() | 1; //none zero
+// LongPressTick = 1000000;
+// Accessibility_Shortcut_Mode = APP_ACCESSIBILITY_SHORTCUT_BUGREPORT;
}
- /* 2022.07.07 Bug Report (OK + Back) Not working */
-// if(device_in_connection_state){
-// app_keyboard_release_action_by_flag();
-// }
+ keyScanLongPressTick = clock_time() | 1; //none zero
+ LongPressTick = 1000000;
+ Accessibility_Shortcut_Mode = APP_ACCESSIBILITY_SHORTCUT_BUGREPORT;
+
}
else if (((key0 == comb_key_keyid[0]) && (key1 == comb_key_keyid[7])) || ((key0 == comb_key_keyid[7]) && (key1 == comb_key_keyid[0]))) // back+down
{
@@ -1277,6 +1285,16 @@ void key_change_proc(void)
comb_key_stop_ir();
if(device_in_connection_state){
+
+ consumer_key[0] = 0;
+ consumer_key[1] = 0;
+ bls_att_pushNotifyData (HID_CONSUME_REPORT_INPUT_DP_H, (u8 *)&consumer_key, 4);
+
+ device_led_off(APP_LED_GREEN);
+ if(lowbat == 0)
+ {
+ device_led_setup(led_cfg[LED_AUDIO_ON]);
+ }
key_type = CONSUMER_KEY;
consumer_key[0] = GOOGLE_MKEY_BACK;
@@ -1284,10 +1302,15 @@ void key_change_proc(void)
bls_att_pushNotifyData (HID_CONSUME_REPORT_INPUT_DP_H, (u8 *)&consumer_key, 4);
// app_keyboard_release_action_by_flag();
}else{
- keyScanLongPressTick = clock_time() | 1; //none zero
- LongPressTick = 2000000;
- Accessibility_Shortcut_Mode = APP_ACCESSIBILITY_SHORTCUT_DOWNBACK;
+// keyScanLongPressTick = clock_time() | 1; //none zero
+// LongPressTick = 2000000;
+// Accessibility_Shortcut_Mode = APP_ACCESSIBILITY_SHORTCUT_DOWNBACK;
}
+
+ keyScanLongPressTick = clock_time() | 1; //none zero
+ LongPressTick = 1000000;
+ Accessibility_Shortcut_Mode = APP_ACCESSIBILITY_SHORTCUT_DOWNBACK;
+
}
else
{
@@ -1735,10 +1758,9 @@ void proc_keyboard (u8 e, u8 *p, int n)
}
else
{
-// key_type = CONSUMER_KEY;
-// consumer_key[0] = GOOGLE_MKEY_BACK;
-// consumer_key[1] = GOOGLE_MKEY_DN;
-// bls_att_pushNotifyData (HID_CONSUME_REPORT_INPUT_DP_H, (u8 *)&consumer_key, 4);
+ consumer_key[0] = GOOGLE_MKEY_BACK;
+ consumer_key[1] = GOOGLE_MKEY_DN;
+ bls_att_pushNotifyData (HID_CONSUME_REPORT_INPUT_DP_H, (u8 *)&consumer_key, 4);
}
}
Accessibility_Shortcut_Mode = APP_ACCESSIBILITY_SHORTCUT_NONE;
diff --git a/version.h b/version.h
index 3c97b0c..d032d13 100644
--- a/version.h
+++ b/version.h
@@ -27,6 +27,6 @@
#ifndef VERSION_H_
#define VERSION_H_
-#define FW_VERSION 0x34210216//FW:v3.4.2 SW:v2.16
+#define FW_VERSION 0x34210217//FW:v3.4.2 SW:v2.17
#endif /* VERSION_H_ */