Files
MuditaOS/module-bluetooth/Bluetooth/Error.hpp
Adam Wulkiewicz fe708cdf31 [MOS-670] Change clang-format AlwaysBreakTemplateDeclarations to Yes
Add --all and --fix-all options to style-check-hook
2022-08-26 15:22:39 +02:00

29 lines
611 B
C++

// Copyright (c) 2017-2022, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
#pragma once
#include <cstdint>
#include <variant>
#include <optional>
namespace bluetooth
{
struct Error
{
enum Code
{
Success,
NotReady,
SystemError,
LibraryError,
} err = Success;
uint32_t lib_code = 0;
Error(enum Code err = Success, int lib_code = Success) : err(err)
{}
};
} // namespace bluetooth
const char *c_str(bluetooth::Error::Code code);