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 @@ -72,17 +72,22 @@ void EEPROMClass::begin(size_t size) {
72
72
_dirty = false ; // make sure dirty is cleared in case begin() is called 2nd+ time
73
73
}
74
74
75
- void EEPROMClass::end () {
76
- if (!_size)
77
- return ;
75
+ bool EEPROMClass::end () {
76
+ bool retval;
77
+
78
+ if (!_size) {
79
+ return false ;
80
+ }
78
81
79
- commit ();
82
+ retval = commit ();
80
83
if (_data) {
81
84
delete[] _data;
82
85
}
83
86
_data = 0 ;
84
87
_size = 0 ;
85
88
_dirty = false ;
89
+
90
+ return retval;
86
91
}
87
92
88
93
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