Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 88d11817 authored by Chris Manton's avatar Chris Manton
Browse files

Add shim role helper main/shim/helpers::ToLegacyRole

Bug: 166280067
Tag: #refactor
Test: atest --host bluetooth_test_gd

Change-Id: Id8ba2b00ea738ca7a7b4dfc3f028c53bc305c421
parent 5bacd850
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -116,6 +116,10 @@ inline BT_HDR* MakeLegacyBtHdrPacket(
  return buffer;
}

inline uint8_t ToLegacyRole(hci::Role role) {
  return static_cast<uint8_t>(role);
}

inline tHCI_STATUS ToLegacyHciErrorCode(hci::ErrorCode reason) {
  switch (reason) {
    case hci::ErrorCode::SUCCESS: