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

Commit dcac9fdd authored by Chris Manton's avatar Chris Manton
Browse files

Formalize conversion HCI_TO_BTM_POWER_MODE

Towards readable code

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

Change-Id: I59e201618412e53c1975e2234387860556354f71
parent aba3e5a3
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -1004,6 +1004,8 @@ enum : uint8_t {
  BTM_PM_MD_UNKNOWN = 0xEF,
};
typedef uint8_t tBTM_PM_MODE;
#define HCI_TO_BTM_POWER_MODE(mode) (static_cast<tBTM_PM_MODE>(mode))

inline bool is_legal_power_mode(tBTM_PM_MODE mode) {
  switch (mode & ~BTM_PM_MD_FORCE) {
    case BTM_PM_MD_ACTIVE: