/* 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);
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);
extern __xdata struct ao_config ao_config;
+#define AO_CONFIG_MAX_SIZE 128
+
void
ao_config_get(void);
+void
+ao_config_put(void);
+
void
ao_config_init(void);