~aleteoryx/muditaos

ref: e35fca8524dfe78c3076073d20bedad897e876a7 muditaos/host-tools/genlittlefs/parse_args.h -rw-r--r-- 1.2 KiB
e35fca85 — Lefucjusz [MOS-1064] Fix no input language selected for French/Spanish 1 year, 9 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md

#pragma once
#include <stdbool.h>
#include <stddef.h>

enum littlefs_opts_mode
{
    littlefs_opts_listparts,
    littlefs_opts_parts,
    littlefs_opts_file
};
struct littlefs_opts
{
    //! LFS config options
    int read_size;      //! Read size
    int block_size;     //! block size
    int prog_size;      //! Eraseable area size
    int cache_size;     //! Cache size
    int lockahead_size; //! Lock ahead size
    int block_cycles;   //! Progam counter cycles
    //! Other ars
    enum littlefs_opts_mode mode; //! Software mode
    long long filesystem_size;    //! Filesystem size
    int partition_num;            //! Parition number
    size_t src_dirs_siz;          //! SOurce dirs size
    char **src_dirs;              //! Source directories
    char *dst_image;              //! Destination image
    bool overwrite_existing;      //! Overwrite existing format
    bool verbose;                 //! Verbose mode
};

int parse_program_args(int argc, char **argv, struct littlefs_opts *opts) __attribute__((nonnull(3)));

void print_config_options(const struct littlefs_opts *opts) __attribute__((nonnull(1)));