summaryrefslogtreecommitdiffstats
path: root/assembler/args.h
blob: a2c86d160f27efcf21a259d67fee428057946b56 (plain)
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
#ifndef BCM43xx_ASM_ARGS_H_
#define BCM43xx_ASM_ARGS_H_

#include "util.h"


enum fwformat {
	FMT_RAW_LE32,   /* Raw microcode. No headers. 32bit little endian chunks. */
	FMT_RAW_BE32,   /* Raw microcode. No headers. 32bit big endian chunks. */
	FMT_B43,        /* b43/b43legacy headers. */
};

struct cmdline_args {
	int debug;				/* Debug level. */
	bool print_sizes;			/* Print sizes after assembling. */
	const char *initvals_fn_extension;	/* Initvals filename extension. */
	const char *real_infile_name;		/* The real input file name. */
	enum fwformat outformat;		/* The output file format. */
};

int parse_args(int argc, char **argv);
int open_input_file(void);
void close_input_file(void);

extern struct cmdline_args cmdargs;

#define IS_DEBUG		(cmdargs.debug > 0)
#define IS_VERBOSE_DEBUG	(cmdargs.debug > 1)
#define IS_INSANE_DEBUG		(cmdargs.debug > 2)

#endif /* BCM43xx_ASM_ARGS_H_ */
bues.ch cgit interface