summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2020-06-24 05:38:22 +0200
committerSven Gothel <[email protected]>2020-06-24 05:38:22 +0200
commit66a29b048bbcde73dbcf7b7dfe654348c1bc33cf (patch)
tree63a4c41392f2b1112ed642c31b019658cefc3f5e
parent023779148a86213a034a2916b15b9846c4385feb (diff)
Add MgmEvent::Opcode::INVALID to have a defined invalid value like HCIEventType and HCIMetaEventType
-rw-r--r--api/direct_bt/MgmtTypes.hpp1
-rw-r--r--src/direct_bt/MgmtTypes.cpp1
2 files changed, 2 insertions, 0 deletions
diff --git a/api/direct_bt/MgmtTypes.hpp b/api/direct_bt/MgmtTypes.hpp
index 31dd8573..8fa5961d 100644
--- a/api/direct_bt/MgmtTypes.hpp
+++ b/api/direct_bt/MgmtTypes.hpp
@@ -512,6 +512,7 @@ namespace direct_bt {
{
public:
enum class Opcode : uint16_t {
+ INVALID = 0x0000,
CMD_COMPLETE = 0x0001,
CMD_STATUS = 0x0002,
CONTROLLER_ERROR = 0x0003,
diff --git a/src/direct_bt/MgmtTypes.cpp b/src/direct_bt/MgmtTypes.cpp
index 46b2ff74..0194a008 100644
--- a/src/direct_bt/MgmtTypes.cpp
+++ b/src/direct_bt/MgmtTypes.cpp
@@ -181,6 +181,7 @@ std::string direct_bt::getMgmtOpcodeString(const MgmtOpcode op) {
// *************************************************
#define MGMT_EV_OPCODE_ENUM(X) \
+ X(INVALID) \
X(CMD_COMPLETE) \
X(CMD_STATUS) \
X(CONTROLLER_ERROR) \