Skip to content
This repository was archived by the owner on Dec 29, 2023. It is now read-only.

Commit f089a1b

Browse files
Leonid KabanovLeonid Kabanov
Leonid Kabanov
authored and
Leonid Kabanov
committed
add int_8t for NVS support
1 parent ab6514e commit f089a1b

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

CPPNVS.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,11 @@ int NVS::get(std::string key, int32_t& value) {
107107

108108
int NVS::get(std::string key, uint8_t& value) {
109109
return ::nvs_get_u8(m_handle, key.c_str(), &value);
110-
} // get - int32_t
110+
} // get - uint8_t
111+
112+
int NVS::get(std::string key, int8_t& value) {
113+
return ::nvs_get_i8(m_handle, key.c_str(), &value);
114+
} // get - int8_t
111115

112116
int NVS::get(std::string key, uint8_t* result, size_t& length) {
113117
ESP_LOGD(LOG_TAG, ">> get: key: %s, blob: inputSize: %d", key.c_str(), length);

CPPNVS.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ class NVS {
2626
int get(std::string key, uint32_t& value);
2727
int get(std::string key, int32_t& value);
2828
int get(std::string key, uint8_t& value);
29+
int get(std::string key, int8_t& value);
2930
void set(std::string key, std::string data, bool isBlob = false);
3031
void set(std::string key, uint32_t value);
3132
void set(std::string key, int32_t value);

0 commit comments

Comments
 (0)