File tree 2 files changed +10
-5
lines changed
2 files changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -78,17 +78,22 @@ void EEPROMClass::begin(size_t size) {
78
78
_dirty = false ; // make sure dirty is cleared in case begin() is called 2nd+ time
79
79
}
80
80
81
- void EEPROMClass::end () {
82
- if (!_size)
83
- return ;
81
+ bool EEPROMClass::end () {
82
+ bool retval;
83
+
84
+ if (!_size) {
85
+ return false ;
86
+ }
84
87
85
- commit ();
88
+ retval = commit ();
86
89
if (_data) {
87
90
delete[] _data;
88
91
}
89
92
_data = 0 ;
90
93
_size = 0 ;
91
94
_dirty = false ;
95
+
96
+ return retval;
92
97
}
93
98
94
99
Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ class EEPROMClass {
35
35
uint8_t read (int const address);
36
36
void write (int const address, uint8_t const val);
37
37
bool commit ();
38
- void end ();
38
+ bool end ();
39
39
40
40
uint8_t * getDataPtr ();
41
41
uint8_t const * getConstDataPtr () const ;
You can’t perform that action at this time.
0 commit comments