Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: BLE_API mbed-dev-bin nRF51822
Fork of microbit-dal by
Diff: inc/drivers/MicroBitStorage.h
- Revision:
- 30:db87179335d5
- Parent:
- 3:d86a4ddc1867
- Child:
- 31:87789e55bac7
--- a/inc/drivers/MicroBitStorage.h Wed Jul 13 12:18:07 2016 +0100
+++ b/inc/drivers/MicroBitStorage.h Wed Jul 13 12:18:08 2016 +0100
@@ -162,9 +162,13 @@
*
* @param data a pointer to the beginning of the data to be persisted.
*
- * @return MICROBIT_OK on success, or MICROBIT_NO_RESOURCES if the storage page is full
+ * @param dataSize the size of the data to be persisted
+ *
+ * @return MICROBIT_OK on success, MICROBIT_INVALID_PARAMETER if the key or size is too large,
+ * MICROBIT_NO_RESOURCES if the storage page is full
*/
- int put(const char* key, uint8_t* data);
+ int put(const char* key, uint8_t* data, int dataSize);
+
/**
* Places a given key, and it's corresponding value into flash at the earliest
@@ -174,9 +178,12 @@
*
* @param data a pointer to the beginning of the data to be persisted.
*
- * @return MICROBIT_OK on success, or MICROBIT_NO_RESOURCES if the storage page is full
+ * @param dataSize the size of the data to be persisted
+ *
+ * @return MICROBIT_OK on success, MICROBIT_INVALID_PARAMETER if the key or size is too large,
+ * MICROBIT_NO_RESOURCES if the storage page is full
*/
- int put(ManagedString key, uint8_t* data);
+ int put(ManagedString key, uint8_t* data, int dataSize);
/**
* Retreives a KeyValuePair identified by a given key.
