Veethree D7 SDK
Loading...
Searching...
No Matches
otp_common.h
Go to the documentation of this file.
1
5#ifndef OTP_COMMON_H
6#define OTP_COMMON_H
7
8#include <cstdint>
9#include <string>
10
11namespace vsdk::sys {
12
16enum class otp_result : uint8_t {
17 success = 0,
18 error,
19 invalid_params,
20 device_access_failed,
21 read_failed
22};
23
27constexpr uint32_t otp_word_size = 4;
28
34inline std::string to_string(otp_result result)
35{
36 switch (result) {
37 case otp_result::success:
38 return "success";
39 case otp_result::invalid_params:
40 return "invalid_params";
41 case otp_result::device_access_failed:
42 return "device_access_failed";
43 case otp_result::read_failed:
44 return "read_failed";
45 case otp_result::error:
46 return "error";
47 default:
48 return "unknown";
49 }
50}
51
52} // namespace vsdk::sys
53
54#endif // OTP_COMMON_H
Any entities that belong to the system library.
std::string to_string(otp_result result)
Convert OTP result to string representation.
Definition otp_common.h:34
constexpr uint32_t otp_word_size
OTP word size in bytes.
Definition otp_common.h:27
otp_result
OTP operation result codes.
Definition otp_common.h:16