#pragma once

#include "tock.h"

#ifdef __cplusplus
extern "C" {
#endif

#define DRIVER_NUM_NONVOLATILE_STORAGE 0x1b

int nonvolatile_storage_internal_read_done_subscribe(subscribe_cb cb, void *userdata);
int nonvolatile_storage_internal_write_done_subscribe(subscribe_cb cb, void *userdata);

int nonvolatile_storage_internal_read_buffer(uint8_t* buffer, uint32_t len);
int nonvolatile_storage_internal_write_buffer(uint8_t* buffer, uint32_t len);

int nonvolatile_storage_internal_get_number_bytes(void);
int nonvolatile_storage_internal_read(uint32_t offset, uint32_t length);
int nonvolatile_storage_internal_write(uint32_t offset, uint32_t length);

#ifdef __cplusplus
}
#endif

#pragma once

#include "tock.h"

#define DRIVER_NUM_NONVOLATILE_STORAGE 0x50001

#ifdef __cplusplus
extern "C" {
#endif

int nonvolatile_storage_internal_read_done_subscribe(subscribe_cb cb, void *userdata);
int nonvolatile_storage_internal_write_done_subscribe(subscribe_cb cb, void *userdata);

int nonvolatile_storage_internal_read_buffer(uint8_t* buffer, uint32_t len);
int nonvolatile_storage_internal_write_buffer(uint8_t* buffer, uint32_t len);

int nonvolatile_storage_internal_get_number_bytes(void);
int nonvolatile_storage_internal_read(uint32_t offset, uint32_t length);
int nonvolatile_storage_internal_write(uint32_t offset, uint32_t length);

#ifdef __cplusplus
}
#endif

Revert "weird issue where flash only works when DRIVER_NUM set to 27, hardcoded somewhere?"
Revert "weird issue where flash only works when DRIVER_NUM set to 27, hardcoded somewhere?"

This reverts commit 3431f4ed857afb9376a120334e1521aa9a71d483.
