diff options
author | Keith Packard <keithp@keithp.com> | 2013-11-12 16:22:49 +0900 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2013-11-12 16:27:31 +0900 |
commit | bf893a4149b05b97f18f9f487af805adef859d74 (patch) | |
tree | 02fa8917e389d0d3444b93ec2e6d5ead406ba1a3 /src | |
parent | 92eafd01f2809f39c5bc4058977c790d94a99df1 (diff) |
altos: Make sure flight erase log comes after config blog
Oops. When converting from ao_storage to ao_config, I accidentally had
the flight erase log overwriting the config block.
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/core/ao_log.c | 2 | ||||
-rw-r--r-- | src/core/ao_storage.h | 2 |
2 files changed, 1 insertions, 3 deletions
diff --git a/src/core/ao_log.c b/src/core/ao_log.c index 1a1f5ff6..701c81ab 100644 --- a/src/core/ao_log.c +++ b/src/core/ao_log.c @@ -49,7 +49,7 @@ static __xdata struct ao_log_erase erase; static uint32_t ao_log_erase_pos(uint8_t i) { - return i * sizeof (struct ao_log_erase); + return i * sizeof (struct ao_log_erase) + AO_CONFIG_MAX_SIZE; } void diff --git a/src/core/ao_storage.h b/src/core/ao_storage.h index d6e95605..6cc6fcb7 100644 --- a/src/core/ao_storage.h +++ b/src/core/ao_storage.h @@ -51,8 +51,6 @@ extern __pdata ao_pos_t ao_storage_config; /* Storage unit size - device reads and writes must be within blocks of this size. Usually 256 bytes. */ extern __pdata uint16_t ao_storage_unit; -#define AO_STORAGE_ERASE_LOG (ao_storage_config + AO_CONFIG_MAX_SIZE) - /* Initialize above values. Can only be called once the OS is running */ void ao_storage_setup(void) __reentrant; |