[riot-notifications] [RIOT-OS/RIOT] MTD: Add module for remapping MTD sectors (#13202)

benpicco notifications at github.com
Fri May 8 23:20:38 CEST 2020


@benpicco commented on this pull request.



> +/**
+ * @brief MTD mapper backing device context
+ */
+typedef struct {
+    mtd_dev_t *mtd;     /**< Parent MTD device */
+    mutex_t lock;       /**< Mutex for guarding the backing device access */
+    bool init;          /**< Initialization flag */
+} mtd_mapper_parent_t;
+
+/**
+ * @brief MTD mapped region
+ */
+typedef struct {
+    mtd_dev_t mtd;                  /**< MTD context                         */
+    mtd_mapper_parent_t *parent;    /**< MTD mapper parent device            */
+    uint32_t offset;                /**< Offset address to start this region */

I know I'm late, but can we give the offset in sectors?
The partitions have to be aligned to erase-sectors anyway and this way we can use in on media > 4GiB

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/13202#pullrequestreview-408534704
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20200508/efcc258e/attachment-0001.htm>


More information about the notifications mailing list