blob: f3b444374a0dccf95bb81c3e7163fa570e3ad33b [file] [log] [blame]
/*
* Copyright 2021 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#pragma once
#include <cstdint>
#include <cstring>
/* HCI mode defenitions */
typedef enum : uint8_t {
HCI_MODE_ACTIVE = 0x00,
HCI_MODE_HOLD = 0x01,
HCI_MODE_SNIFF = 0x02,
HCI_MODE_PARK = 0x03,
} tHCI_MODE;
inline std::string hci_mode_text(const tHCI_MODE& mode) {
switch (mode) {
case HCI_MODE_ACTIVE:
return std::string("active");
case HCI_MODE_HOLD:
return std::string("hold");
case HCI_MODE_SNIFF:
return std::string("sniff");
case HCI_MODE_PARK:
return std::string("park");
default:
return std::string("UNKNOWN");
}
}