summaryrefslogtreecommitdiff
path: root/src/ao_config.c
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2011-01-06 22:37:38 -0800
committerKeith Packard <keithp@keithp.com>2011-01-06 22:37:38 -0800
commit569a1dac55b70c30f01afa7bcb74442ecdd85d85 (patch)
tree197d6048f3b6694aeaf1f23f4605d494757902f5 /src/ao_config.c
parente4ba9bf4291bf17c777c8c3ef7c71e4a30b9947a (diff)
altos: Move common storage code to ao_storage.c. Add M25P80 driver
This reworks the storage API so that you erase blocks and then store data to them so that the M25P80 driver will work. Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src/ao_config.c')
-rw-r--r--src/ao_config.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/ao_config.c b/src/ao_config.c
index 2673e472..38b72798 100644
--- a/src/ao_config.c
+++ b/src/ao_config.c
@@ -33,7 +33,9 @@ static void
_ao_config_put(void)
{
ao_storage_setup();
+ ao_storage_erase(ao_storage_config);
ao_storage_write(ao_storage_config, &ao_config, sizeof (ao_config));
+ ao_log_write_erase(0);
ao_storage_flush();
}