We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 81a10a4 commit e79eb11Copy full SHA for e79eb11
libraries/EEPROM/EEPROM.cpp
@@ -72,17 +72,22 @@ void EEPROMClass::begin(size_t size) {
72
_dirty = false; //make sure dirty is cleared in case begin() is called 2nd+ time
73
}
74
75
-void EEPROMClass::end() {
76
- if (!_size)
77
- return;
+bool EEPROMClass::end() {
+ bool retval;
+
78
+ if(!_size) {
79
+ return false;
80
+ }
81
- commit();
82
+ retval = commit();
83
if(_data) {
84
delete[] _data;
85
86
_data = 0;
87
_size = 0;
88
_dirty = false;
89
90
+ return retval;
91
92
93
libraries/EEPROM/EEPROM.h
@@ -35,7 +35,7 @@ class EEPROMClass {
35
uint8_t read(int const address);
36
void write(int const address, uint8_t const val);
37
bool commit();
38
- void end();
+ bool end();
39
40
uint8_t * getDataPtr();
41
uint8_t const * getConstDataPtr() const;
0 commit comments