RIOT integration of xipfs.  
More...
RIOT integration of xipfs. 
 | 
| #define  | XIPFS_NEW_PARTITION(id,  path,  num) | 
|   | Allocate a new contiguous space aligned to a page in the non-volatile addressable memory of the MCU to serve as a partition for an xipfs file system.  More...
  | 
|   | 
◆ XIPFS_NEW_PARTITION
      
        
          | #define XIPFS_NEW_PARTITION | 
          ( | 
            | 
          id,  | 
        
        
           | 
           | 
            | 
          path,  | 
        
        
           | 
           | 
            | 
          num  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
Value:
            .mount_point = path,                      \
        },                                            \
        .magic = XIPFS_MAGIC,                         \
        .mount_path = path,                           \
        .page_num = num,                              \
        .page_addr = (void *)xipfs_part_##id,         \
        .execution_mutex = &execution_mutex_##id,     \
        .mutex = &mutex_##id                          \
    }
#define MUTEX_INIT
Static initializer for mutex_t.
 
#define FLASH_WRITABLE_INIT(name, size)
Define an array in flash memory.
 
const vfs_file_system_t xipfs_file_system
The xipfs vfs driver.
 
const vfs_file_system_t * fs
The file system driver for the mount point.
 
xipfs descriptor for vfs integration
 
vfs_mount_t vfs_mp
VFS mount point
 
 
Allocate a new contiguous space aligned to a page in the non-volatile addressable memory of the MCU to serve as a partition for an xipfs file system. 
- Parameters
 - 
  
    | id | Identifier name for the mount point used by functions that manipulate xipfs file systems | 
    | path | The mount point of the file system in the VFS tree | 
    | num | The total number of pages allocated for the partition  | 
  
   
Definition at line 50 of file xipfs_fs.h.
 
 
◆ vfs_xipfs_mount_t
xipfs descriptor for vfs integration 
execution_mutex is taken by xipfs_extended_driver_execv and by deletion operations. mutex is taken by all operations except from xipfs_extended_driver_execv
This two mutexes scheme :
- allows to call xipfs operation from within a code run by xipfs_extended_driver_execv,
 
- prevents from deleting files or directories when operations are performed on them. 
 
 
 
◆ xipfs_construct_from_flashpage()
vfs_xipfs_mount_t constructor from a mtd_flashpage_t. 
This function constructs an xipfs mount point from a mtd_flashpage_t such as mtd_flash_aux_slot. It allows to use XIPFS with the RIOT AUX slot mechanism.
- Parameters
 - 
  
    | flashpage | A valid mtd_flashpage_t pointer such as &mtd_flash_aux_slot.  | 
    | path | A valid mounting point path.  | 
    | execution_mutex | A valid mutex pointer used for execution and deletions operations.  | 
    | mutex | A valid mutex pointer used by all operations except from execution.  | 
    | vfs_xipfs_mount | A valid vfs xipfs mount point pointer. | 
  
   
- Return values
 - 
  
    | -EINVAL | when one of the parameters is NULL or when path is an empty string.  | 
    | 0 | on success. | 
  
   
- Note
 - Both mutexes will be initialized by this function. 
 
 
 
◆ xipfs_extended_driver_execv()
      
        
          | int xipfs_extended_driver_execv  | 
          ( | 
          const char *  | 
          full_path,  | 
        
        
           | 
           | 
          char *const  | 
          argv[]  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
Executes an executable file with arguments. 
- Parameters
 - 
  
    | full_path | A full path such as /dev/nvme0p0/my_executable_file | 
    | argv | Executable arguments. Cannot be NULL, argv[0] contains the executable filename. | 
  
   
- Return values
 - 
  
    | Less | than 0 on errors.  | 
    | 0 | on success.  | 
  
   
 
 
◆ xipfs_extended_driver_new_file()
      
        
          | int xipfs_extended_driver_new_file  | 
          ( | 
          const char *  | 
          full_path,  | 
        
        
           | 
           | 
          uint32_t  | 
          size,  | 
        
        
           | 
           | 
          uint32_t  | 
          exec  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
Executable or regular new file. 
Allows to create a regular or executable new file within XiPFS.
- Parameters
 - 
  
    | full_path | A full path such as /dev/nvme0p0/my_new_file | 
    | size | The file size in bytes. | 
    | exec | 0 for regular files, 1 for executable files. | 
  
   
- Return values
 - 
  
    | Less | than 0 on errors.  | 
    | 0 | on success.  |