67f1e4539e93a7abb1248d2faf783f50d906326a
[b43-tools.git] / disassembler / args.h
1 #ifndef B43_DASM_ARGS_H_
2 #define B43_DASM_ARGS_H_
3
4 enum fwformat {
5         FMT_RAW_LE32,   /* Raw microcode. No headers. 32bit little endian chunks. */
6         FMT_RAW_BE32,   /* Raw microcode. No headers. 32bit big endian chunks. */
7         FMT_B43,        /* b43/b43legacy headers. */
8 };
9
10 struct cmdline_args {
11         unsigned int arch;              /* The architecture we're disassembling. */
12         enum fwformat informat;         /* The input file format. */
13         int print_addresses;            /* Print a comment with instruction address. */
14         int unknown_decode;             /* Decode operands of unknown instructions. */
15 };
16
17 int parse_args(int argc, char **argv);
18
19 int open_input_file(void);
20 void close_input_file(void);
21 int open_output_file(void);
22 void close_output_file(void);
23
24 extern int _debug;
25 extern struct cmdline_args cmdargs;
26
27 #define IS_DEBUG                (_debug > 0)
28 #define IS_VERBOSE_DEBUG        (_debug > 1)
29 #define IS_INSANE_DEBUG         (_debug > 2)
30
31 #endif /* B43_DASM_ARGS_H_ */