Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Diff: eeprom/eeprom.cpp
- Revision:
- 5:aa44afa6ca35
- Parent:
- 4:0545cac4e5f9
- Child:
- 6:669ff12928f9
--- a/eeprom/eeprom.cpp Fri Sep 23 16:53:39 2016 +0000
+++ b/eeprom/eeprom.cpp Fri Sep 23 17:44:45 2016 +0000
@@ -330,9 +330,20 @@
{
uint32_t readstatus = 1;
uint16_t addressvalue = 0x5555;
+ uint32_t end_address;
+
+ if (PAGE0_BASE_ADDRESS==Address)
+ {
+ end_address = PAGE0_END_ADDRESS;
+ }
+ else
+ {
+ end_address = PAGE1_END_ADDRESS;
+ };
+
/* Check each active page address starting from end */
- while (Address <= PAGE0_END_ADDRESS)
+ while (Address <= end_address)
{
/* Get the current location content to be compared with virtual address */
addressvalue = (*(__IO uint16_t*)Address);