Towards shimmable code
Bug:
176960731
Tag: #refactor
Test: gd/cert/run
Change-Id: I576be1908b70116b9aeeaa56c0e1601480ccbcb2
return static_cast<uint8_t>(role);
}
+inline hci::Role ToHciRole(hci_role_t role) {
+ switch (role) {
+ case HCI_ROLE_CENTRAL:
+ return hci::Role::CENTRAL;
+ case HCI_ROLE_PERIPHERAL:
+ return hci::Role::PERIPHERAL;
+ default:
+ ASSERT_LOG(false, "Unable to determine legacy role:%u", role);
+ }
+}
+
inline tHCI_STATUS ToLegacyHciErrorCode(hci::ErrorCode reason) {
switch (reason) {
case hci::ErrorCode::SUCCESS: