OSDN Git Service

Add ToLegacyHciMode
authorChris Manton <cmanton@google.com>
Thu, 10 Dec 2020 21:30:24 +0000 (13:30 -0800)
committerChris Manton <cmanton@google.com>
Sun, 13 Dec 2020 05:39:47 +0000 (21:39 -0800)
Towards loggable code

Bug: 163134718
Tag: #refactor
Test: gd/cert/run --host

Change-Id: I6bdaf4b9d73fc95bb02518086bc89c1673a3d3cf

main/shim/helpers.h

index 686ecbc..f641227 100644 (file)
@@ -21,6 +21,7 @@
 #include "osi/include/allocator.h"
 #include "stack/include/bt_types.h"
 #include "stack/include/hci_error_code.h"
+#include "stack/include/hcidefs.h"
 #include "types/ble_address_with_type.h"
 
 namespace bluetooth {
@@ -216,6 +217,10 @@ inline tHCI_STATUS ToLegacyHciErrorCode(hci::ErrorCode reason) {
   }
 }
 
+inline tHCI_MODE ToLegacyHciMode(hci::Mode mode) {
+  return static_cast<tHCI_MODE>(mode);
+}
+
 namespace debug {
 
 inline void DumpBtHdr(const BT_HDR* p_buf, const char* token) {