MCPcopy Index your code
hub / github.com/crosspoint-reader/crosspoint-reader / writeNvsDeviceValue

Function writeNvsDeviceValue

lib/hal/HalGPIO.cpp:137–144  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

135}
136
137void writeNvsDeviceValue(const char* key, NvsDeviceValue value) {
138 Preferences prefs;
139 if (!prefs.begin(HW_NAMESPACE, false)) {
140 return;
141 }
142 prefs.putUChar(key, static_cast<uint8_t>(value));
143 prefs.end();
144}
145
146HalGPIO::DeviceType nvsToDeviceType(NvsDeviceValue value) {
147 return value == NvsDeviceValue::X3 ? HalGPIO::DeviceType::X3 : HalGPIO::DeviceType::X4;

Callers 1

Calls 2

endMethod · 0.80
beginMethod · 0.45

Tested by

no test coverage detected