File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
hardware/esp8266com/esp8266/libraries/EEPROM Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change 1
- /*
1
+ /*
2
2
EEPROM.cpp - esp8266 EEPROM emulation
3
3
4
4
Copyright (c) 2014 Ivan Grokhotkov. All rights reserved.
5
5
This file is part of the esp8266 core for Arduino environment.
6
-
6
+
7
7
This library is free software; you can redistribute it and/or
8
8
modify it under the terms of the GNU Lesser General Public
9
9
License as published by the Free Software Foundation; either
@@ -34,7 +34,7 @@ EEPROMClass::EEPROMClass(uint32_t sector)
34
34
: _sector(sector)
35
35
, _data(0 )
36
36
, _size(0 )
37
- , _dirty(false )
37
+ , _dirty(false )
38
38
{
39
39
}
40
40
@@ -44,6 +44,8 @@ void EEPROMClass::begin(size_t size) {
44
44
if (size > SPI_FLASH_SEC_SIZE)
45
45
size = SPI_FLASH_SEC_SIZE;
46
46
47
+ size = (size + 3 ) & (~3 );
48
+
47
49
if (_data) {
48
50
delete[] _data;
49
51
}
You can’t perform that action at this time.
0 commit comments