Remove error reporting from ble utility functions that never error
This commit is contained in:
parent
b8cb407351
commit
604c95118e
3 changed files with 8 additions and 10 deletions
|
@ -20,11 +20,11 @@
|
|||
#define ZMK_BLE_PROFILE_COUNT CONFIG_BT_MAX_PAIRED
|
||||
#endif
|
||||
|
||||
int zmk_ble_clear_bonds(void);
|
||||
void zmk_ble_clear_bonds(void);
|
||||
int zmk_ble_prof_next(void);
|
||||
int zmk_ble_prof_prev(void);
|
||||
int zmk_ble_prof_select(uint8_t index);
|
||||
int zmk_ble_clear_all_bonds(void);
|
||||
void zmk_ble_clear_all_bonds(void);
|
||||
int zmk_ble_prof_disconnect(uint8_t index);
|
||||
|
||||
int zmk_ble_active_profile_index(void);
|
||||
|
|
|
@ -24,7 +24,8 @@ static int on_keymap_binding_pressed(struct zmk_behavior_binding *binding,
|
|||
struct zmk_behavior_binding_event event) {
|
||||
switch (binding->param1) {
|
||||
case BT_CLR_CMD:
|
||||
return zmk_ble_clear_bonds();
|
||||
zmk_ble_clear_bonds();
|
||||
return 0;
|
||||
case BT_NXT_CMD:
|
||||
return zmk_ble_prof_next();
|
||||
case BT_PRV_CMD:
|
||||
|
@ -32,7 +33,8 @@ static int on_keymap_binding_pressed(struct zmk_behavior_binding *binding,
|
|||
case BT_SEL_CMD:
|
||||
return zmk_ble_prof_select(binding->param2);
|
||||
case BT_CLR_ALL_CMD:
|
||||
return zmk_ble_clear_all_bonds();
|
||||
zmk_ble_clear_all_bonds();
|
||||
return 0;
|
||||
case BT_DISC_CMD:
|
||||
return zmk_ble_prof_disconnect(binding->param2);
|
||||
default:
|
||||
|
|
|
@ -210,7 +210,7 @@ static void update_advertising_callback(struct k_work *work) { update_advertisin
|
|||
|
||||
K_WORK_DEFINE(update_advertising_work, update_advertising_callback);
|
||||
|
||||
int zmk_ble_clear_bonds(void) {
|
||||
void zmk_ble_clear_bonds(void) {
|
||||
LOG_DBG("");
|
||||
|
||||
if (bt_addr_le_cmp(&profiles[active_profile].peer, BT_ADDR_LE_ANY)) {
|
||||
|
@ -220,11 +220,9 @@ int zmk_ble_clear_bonds(void) {
|
|||
}
|
||||
|
||||
update_advertising();
|
||||
|
||||
return 0;
|
||||
};
|
||||
|
||||
int zmk_ble_clear_all_bonds(void) {
|
||||
void zmk_ble_clear_all_bonds(void) {
|
||||
LOG_DBG("zmk_ble_clear_all_bonds()");
|
||||
|
||||
// Unpair all profiles
|
||||
|
@ -237,8 +235,6 @@ int zmk_ble_clear_all_bonds(void) {
|
|||
|
||||
// Automatically switch to profile 0
|
||||
zmk_ble_prof_select(0);
|
||||
|
||||
return 0;
|
||||
};
|
||||
|
||||
int zmk_ble_active_profile_index(void) { return active_profile; }
|
||||
|
|
Loading…
Add table
Reference in a new issue