Loading system/stack/acl/acl.h +37 −37 Original line number Diff line number Diff line Loading @@ -69,6 +69,43 @@ inline std::string link_policy_text(tLINK_POLICY policy) { return s; } // Power mode states. // Used as both value and bitmask enum : uint8_t { BTM_PM_ST_ACTIVE = HCI_MODE_ACTIVE, // 0x00 BTM_PM_ST_HOLD = HCI_MODE_HOLD, // 0x01 BTM_PM_ST_SNIFF = HCI_MODE_SNIFF, // 0x02 BTM_PM_ST_PARK = HCI_MODE_PARK, // 0x03 BTM_PM_ST_UNUSED, // 0x04 BTM_PM_ST_PENDING = BTM_PM_STS_PENDING, // 0x05 BTM_PM_ST_INVALID = 0x7F, BTM_PM_STORED_MASK = 0x80, /* set this mask if the command is stored */ }; typedef uint8_t tBTM_PM_STATE; inline std::string power_mode_state_text(tBTM_PM_STATE state) { std::string s = std::string((state & BTM_PM_STORED_MASK) ? "stored:" : "immediate:"); switch (state & ~BTM_PM_STORED_MASK) { case BTM_PM_ST_ACTIVE: return s + std::string("active"); case BTM_PM_ST_HOLD: return s + std::string("hold"); case BTM_PM_ST_SNIFF: return s + std::string("sniff"); case BTM_PM_ST_PARK: return s + std::string("park"); case BTM_PM_ST_UNUSED: return s + std::string("WARN:UNUSED"); case BTM_PM_ST_PENDING: return s + std::string("pending"); case BTM_PM_ST_INVALID: return s + std::string("invalid"); default: return s + std::string("UNKNOWN"); } } /* Structure returned with Role Switch information (in tBTM_CMPL_CB callback * function) in response to BTM_SwitchRoleToCentral call. */ Loading Loading @@ -208,43 +245,6 @@ typedef struct { uint8_t sca; /* Sleep clock accuracy */ } tACL_CONN; // Power mode states. // Used as both value and bitmask enum : uint8_t { BTM_PM_ST_ACTIVE = HCI_MODE_ACTIVE, // 0x00 BTM_PM_ST_HOLD = HCI_MODE_HOLD, // 0x01 BTM_PM_ST_SNIFF = HCI_MODE_SNIFF, // 0x02 BTM_PM_ST_PARK = HCI_MODE_PARK, // 0x03 BTM_PM_ST_UNUSED, // 0x04 BTM_PM_ST_PENDING = BTM_PM_STS_PENDING, // 0x05 BTM_PM_ST_INVALID = 0x7F, BTM_PM_STORED_MASK = 0x80, /* set this mask if the command is stored */ }; typedef uint8_t tBTM_PM_STATE; inline std::string power_mode_state_text(tBTM_PM_STATE state) { std::string s = std::string((state & BTM_PM_STORED_MASK) ? "stored:" : "immediate:"); switch (state & ~BTM_PM_STORED_MASK) { case BTM_PM_ST_ACTIVE: return s + std::string("active"); case BTM_PM_ST_HOLD: return s + std::string("hold"); case BTM_PM_ST_SNIFF: return s + std::string("sniff"); case BTM_PM_ST_PARK: return s + std::string("park"); case BTM_PM_ST_UNUSED: return s + std::string("WARN:UNUSED"); case BTM_PM_ST_PENDING: return s + std::string("pending"); case BTM_PM_ST_INVALID: return s + std::string("invalid"); default: return s + std::string("UNKNOWN"); } } /**************************************************** ** ACL Management API ****************************************************/ Loading Loading
system/stack/acl/acl.h +37 −37 Original line number Diff line number Diff line Loading @@ -69,6 +69,43 @@ inline std::string link_policy_text(tLINK_POLICY policy) { return s; } // Power mode states. // Used as both value and bitmask enum : uint8_t { BTM_PM_ST_ACTIVE = HCI_MODE_ACTIVE, // 0x00 BTM_PM_ST_HOLD = HCI_MODE_HOLD, // 0x01 BTM_PM_ST_SNIFF = HCI_MODE_SNIFF, // 0x02 BTM_PM_ST_PARK = HCI_MODE_PARK, // 0x03 BTM_PM_ST_UNUSED, // 0x04 BTM_PM_ST_PENDING = BTM_PM_STS_PENDING, // 0x05 BTM_PM_ST_INVALID = 0x7F, BTM_PM_STORED_MASK = 0x80, /* set this mask if the command is stored */ }; typedef uint8_t tBTM_PM_STATE; inline std::string power_mode_state_text(tBTM_PM_STATE state) { std::string s = std::string((state & BTM_PM_STORED_MASK) ? "stored:" : "immediate:"); switch (state & ~BTM_PM_STORED_MASK) { case BTM_PM_ST_ACTIVE: return s + std::string("active"); case BTM_PM_ST_HOLD: return s + std::string("hold"); case BTM_PM_ST_SNIFF: return s + std::string("sniff"); case BTM_PM_ST_PARK: return s + std::string("park"); case BTM_PM_ST_UNUSED: return s + std::string("WARN:UNUSED"); case BTM_PM_ST_PENDING: return s + std::string("pending"); case BTM_PM_ST_INVALID: return s + std::string("invalid"); default: return s + std::string("UNKNOWN"); } } /* Structure returned with Role Switch information (in tBTM_CMPL_CB callback * function) in response to BTM_SwitchRoleToCentral call. */ Loading Loading @@ -208,43 +245,6 @@ typedef struct { uint8_t sca; /* Sleep clock accuracy */ } tACL_CONN; // Power mode states. // Used as both value and bitmask enum : uint8_t { BTM_PM_ST_ACTIVE = HCI_MODE_ACTIVE, // 0x00 BTM_PM_ST_HOLD = HCI_MODE_HOLD, // 0x01 BTM_PM_ST_SNIFF = HCI_MODE_SNIFF, // 0x02 BTM_PM_ST_PARK = HCI_MODE_PARK, // 0x03 BTM_PM_ST_UNUSED, // 0x04 BTM_PM_ST_PENDING = BTM_PM_STS_PENDING, // 0x05 BTM_PM_ST_INVALID = 0x7F, BTM_PM_STORED_MASK = 0x80, /* set this mask if the command is stored */ }; typedef uint8_t tBTM_PM_STATE; inline std::string power_mode_state_text(tBTM_PM_STATE state) { std::string s = std::string((state & BTM_PM_STORED_MASK) ? "stored:" : "immediate:"); switch (state & ~BTM_PM_STORED_MASK) { case BTM_PM_ST_ACTIVE: return s + std::string("active"); case BTM_PM_ST_HOLD: return s + std::string("hold"); case BTM_PM_ST_SNIFF: return s + std::string("sniff"); case BTM_PM_ST_PARK: return s + std::string("park"); case BTM_PM_ST_UNUSED: return s + std::string("WARN:UNUSED"); case BTM_PM_ST_PENDING: return s + std::string("pending"); case BTM_PM_ST_INVALID: return s + std::string("invalid"); default: return s + std::string("UNKNOWN"); } } /**************************************************** ** ACL Management API ****************************************************/ Loading