blob: fb551917e63c266b5820de01ef90b98ca29d9ba8 [file] [log] [blame]
Nico Huber34e783a2023-02-11 00:30:27 +01001/*
2 * This file is part of the flashprog project.
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 */
14
15#ifndef FLASHPROG_CLI_H
16#define FLASHPROG_CLI_H
17
18enum {
19 OPTION_CHIP = 'c',
20 OPTION_PROGRAMMER = 'p',
Nico Hubere7899a92023-02-11 00:39:47 +010021
22 /* Options below have only long option names, i.e. no single char: */
23 OPTION_IFD = 0x0100,
24 OPTION_FMAP,
25 OPTION_FMAP_FILE,
26 OPTION_FLASH_CONTENTS,
27 OPTION_FLASH_NAME,
28 OPTION_FLASH_SIZE,
29 OPTION_PROGRESS,
Nico Huber34e783a2023-02-11 00:30:27 +010030};
31
32struct flash_args {
33 char *chip;
34 char *prog_name;
35 char *prog_args;
36};
37
38int cli_parse_flash_args(struct flash_args *, int opt, const char *optarg);
39
40#endif