projects
/
fw
/
altos
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
altos: Require manual flight erasing.
[fw/altos]
/
src
/
ao.h
diff --git
a/src/ao.h
b/src/ao.h
index 67337de78743a7249a52e02644477d4138fc0a1e..f23e4134ac0e9713208ceed47968fc312cb6399d 100644
(file)
--- a/
src/ao.h
+++ b/
src/ao.h
@@
-443,6
+443,8
@@
extern __xdata uint32_t ao_storage_block;
/* Byte offset of config block. Will be ao_storage_block bytes long */
extern __xdata uint32_t ao_storage_config;
/* Byte offset of config block. Will be ao_storage_block bytes long */
extern __xdata uint32_t ao_storage_config;
+#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);
/* Initialize above values. Can only be called once the OS is running */
void
ao_storage_setup(void);
@@
-459,6
+461,10
@@
ao_storage_write(uint32_t pos, __xdata void *buf, uint16_t len) __reentrant;
uint8_t
ao_storage_read(uint32_t pos, __xdata void *buf, uint16_t len) __reentrant;
uint8_t
ao_storage_read(uint32_t pos, __xdata void *buf, uint16_t len) __reentrant;
+/* Erase a block of storage. This always clears ao_storage_block bytes */
+uint8_t
+ao_storage_erase(uint32_t pos);
+
/* Initialize the storage code */
void
ao_storage_init(void);
/* Initialize the storage code */
void
ao_storage_init(void);
@@
-993,9
+999,14
@@
struct ao_config {
extern __xdata struct ao_config ao_config;
extern __xdata struct ao_config ao_config;
+#define AO_CONFIG_MAX_SIZE 128
+
void
ao_config_get(void);
void
ao_config_get(void);
+void
+ao_config_put(void);
+
void
ao_config_init(void);
void
ao_config_init(void);