You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by pk...@apache.org on 2023/05/29 10:50:41 UTC

[nuttx] branch master updated: boards/samv7/common: add type member to mtd_partition_s structure

This is an automated email from the ASF dual-hosted git repository.

pkarashchenko pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git


The following commit(s) were added to refs/heads/master by this push:
     new f4d409b3e5 boards/samv7/common: add type member to mtd_partition_s structure
f4d409b3e5 is described below

commit f4d409b3e57f4b2a47ea738df57fbeee4552373f
Author: Michal Lenc <mi...@seznam.cz>
AuthorDate: Mon May 29 09:51:33 2023 +0200

    boards/samv7/common: add type member to mtd_partition_s structure
    
    Board related code may use different mounts for MTD device (block
    character for one, SmartFS for another) if required by the board.
    Additional type member was therefore added to mtd_partition_s structure
    in order to support this.
    
    Signed-off-by: Michal Lenc <mi...@seznam.cz>
---
 boards/arm/samv7/common/include/board_progmem.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/boards/arm/samv7/common/include/board_progmem.h b/boards/arm/samv7/common/include/board_progmem.h
index c07df50ae2..501cd61f15 100644
--- a/boards/arm/samv7/common/include/board_progmem.h
+++ b/boards/arm/samv7/common/include/board_progmem.h
@@ -39,6 +39,10 @@ struct mtd_partition_s
 {
   size_t            offset;    /* Partition offset from the beginning of MTD */
   size_t            size;      /* Partition size in bytes */
+  uint8_t           type;      /* Optional if more devices types (block
+                                * character, smartfs) have to be distinguish
+                                * in board related code.
+                                */
   const char       *devpath;   /* Partition device path */
   struct mtd_dev_s *mtd;       /* Pointer to allocated MTD partition */
 };