File tree Expand file tree Collapse file tree 2 files changed +10
-5
lines changed Expand file tree Collapse file tree 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) {
7272 _dirty = false ; // make sure dirty is cleared in case begin() is called 2nd+ time
7373}
7474
75- void EEPROMClass::end () {
76- if (!_size)
77- return ;
75+ bool EEPROMClass::end () {
76+ bool retval;
77+
78+ if (!_size) {
79+ return false ;
80+ }
7881
79- commit ();
82+ retval = commit ();
8083 if (_data) {
8184 delete[] _data;
8285 }
8386 _data = 0 ;
8487 _size = 0 ;
8588 _dirty = false ;
89+
90+ return retval;
8691}
8792
8893
Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ class EEPROMClass {
3535 uint8_t read (int const address);
3636 void write (int const address, uint8_t const val);
3737 bool commit ();
38- void end ();
38+ bool end ();
3939
4040 uint8_t * getDataPtr ();
4141 uint8_t const * getConstDataPtr () const ;
You can’t perform that action at this time.
0 commit comments