Loading system/bta/dm/bta_dm_act.cc +1 −2 Original line number Diff line number Diff line Loading @@ -2487,8 +2487,7 @@ void bta_dm_rm_cback(tBTA_SYS_CONN_STATUS status, uint8_t id, uint8_t app_id, if (((p_bta_dm_rm_cfg[j].app_id == app_id) || (p_bta_dm_rm_cfg[j].app_id == BTA_ALL_APP_ID)) && (p_bta_dm_rm_cfg[j].id == id)) { role = p_bta_dm_rm_cfg[j].cfg; role = toBTA_PREF_ROLES(p_bta_dm_rm_cfg[j].cfg); if (role > p_dev->pref_role) p_dev->pref_role = role; break; } Loading system/bta/include/bta_api.h +15 −8 Original line number Diff line number Diff line Loading @@ -119,14 +119,21 @@ typedef uint16_t typedef uint16_t tBTA_DM_CONN; /* M/S preferred roles */ #define BTA_ANY_ROLE 0x00 #define BTA_CENTRAL_ROLE_PREF 0x01 #define BTA_CENTRAL_ROLE_ONLY 0x02 #define BTA_PERIPHERAL_ROLE_ONLY \ 0x03 /* Used for PANU only, skip role switch to central */ typedef uint8_t tBTA_PREF_ROLES; /* Central/peripheral preferred roles */ typedef enum : uint8_t { BTA_ANY_ROLE = 0x00, BTA_CENTRAL_ROLE_PREF = 0x01, BTA_CENTRAL_ROLE_ONLY = 0x02, /* Used for PANU only, skip role switch to central */ BTA_PERIPHERAL_ROLE_ONLY = 0x03, } tBTA_PREF_ROLES; inline tBTA_PREF_ROLES toBTA_PREF_ROLES(uint8_t role) { ASSERT_LOG(role <= BTA_PERIPHERAL_ROLE_ONLY, "Passing illegal preferred role:0x%02x [0x%02x<=>0x%02x]", role, BTA_ANY_ROLE, BTA_PERIPHERAL_ROLE_ONLY); return static_cast<tBTA_PREF_ROLES>(role); } inline std::string preferred_role_text(const tBTA_PREF_ROLES& role) { switch (role) { Loading Loading
system/bta/dm/bta_dm_act.cc +1 −2 Original line number Diff line number Diff line Loading @@ -2487,8 +2487,7 @@ void bta_dm_rm_cback(tBTA_SYS_CONN_STATUS status, uint8_t id, uint8_t app_id, if (((p_bta_dm_rm_cfg[j].app_id == app_id) || (p_bta_dm_rm_cfg[j].app_id == BTA_ALL_APP_ID)) && (p_bta_dm_rm_cfg[j].id == id)) { role = p_bta_dm_rm_cfg[j].cfg; role = toBTA_PREF_ROLES(p_bta_dm_rm_cfg[j].cfg); if (role > p_dev->pref_role) p_dev->pref_role = role; break; } Loading
system/bta/include/bta_api.h +15 −8 Original line number Diff line number Diff line Loading @@ -119,14 +119,21 @@ typedef uint16_t typedef uint16_t tBTA_DM_CONN; /* M/S preferred roles */ #define BTA_ANY_ROLE 0x00 #define BTA_CENTRAL_ROLE_PREF 0x01 #define BTA_CENTRAL_ROLE_ONLY 0x02 #define BTA_PERIPHERAL_ROLE_ONLY \ 0x03 /* Used for PANU only, skip role switch to central */ typedef uint8_t tBTA_PREF_ROLES; /* Central/peripheral preferred roles */ typedef enum : uint8_t { BTA_ANY_ROLE = 0x00, BTA_CENTRAL_ROLE_PREF = 0x01, BTA_CENTRAL_ROLE_ONLY = 0x02, /* Used for PANU only, skip role switch to central */ BTA_PERIPHERAL_ROLE_ONLY = 0x03, } tBTA_PREF_ROLES; inline tBTA_PREF_ROLES toBTA_PREF_ROLES(uint8_t role) { ASSERT_LOG(role <= BTA_PERIPHERAL_ROLE_ONLY, "Passing illegal preferred role:0x%02x [0x%02x<=>0x%02x]", role, BTA_ANY_ROLE, BTA_PERIPHERAL_ROLE_ONLY); return static_cast<tBTA_PREF_ROLES>(role); } inline std::string preferred_role_text(const tBTA_PREF_ROLES& role) { switch (role) { Loading