diff options
author | gdisirio <gdisirio@110e8d01-0319-4d1e-a829-52ad28d1bb01> | 2018-11-25 12:02:19 +0000 |
---|---|---|
committer | gdisirio <gdisirio@110e8d01-0319-4d1e-a829-52ad28d1bb01> | 2018-11-25 12:02:19 +0000 |
commit | b8a4c26a9cab50e5a845d0033665a4d74b17444b (patch) | |
tree | 3eba7daf5c024f22cb3d45969da49d44930b1eca /os/hal/include | |
parent | 7a0857aa5d161a27128622b0d9f61867dc7520ae (diff) | |
download | ChibiOS-b8a4c26a9cab50e5a845d0033665a4d74b17444b.tar.gz ChibiOS-b8a4c26a9cab50e5a845d0033665a4d74b17444b.tar.bz2 ChibiOS-b8a4c26a9cab50e5a845d0033665a4d74b17444b.zip |
Persistent storage for STM32 RTCV1 driver.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@12438 110e8d01-0319-4d1e-a829-52ad28d1bb01
Diffstat (limited to 'os/hal/include')
-rw-r--r-- | os/hal/include/hal_persistent.h | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/os/hal/include/hal_persistent.h b/os/hal/include/hal_persistent.h index f0aed89b9..f6ba14e82 100644 --- a/os/hal/include/hal_persistent.h +++ b/os/hal/include/hal_persistent.h @@ -119,6 +119,17 @@ typedef struct { #define getBasePersistentStorage(ip) ((BasePersistentStorage *)&(ip)->vmt)
/**
+ * @brief Get storage size.
+ *
+ * @param[in] ip pointer to a @p BasePersistentStorage or derived class
+ * @return The storage size in bytes.
+ *
+ * @api
+ */
+#define psGetStorageSize(ip) \
+ (ip)->vmt->getsize(ip)
+
+/**
* @brief Read operation.
*
* @param[in] ip pointer to a @p BasePersistentStorage or derived class
@@ -140,7 +151,7 @@ typedef struct { *
* @param[in] ip pointer to a @p BasePersistentStorage or derived class
* @param[in] offset persistent storage offset
- * @param[in] n number of bytes to be programmed
+ * @param[in] n number of bytes to be written
* @param[in] wp pointer to the data buffer
* @return An error code.
* @retval PS_NO_ERROR if there is no erase operation in progress.
|