diff options
| author | Keith Packard <keithp@keithp.com> | 2013-11-28 09:46:13 -0800 | 
|---|---|---|
| committer | Keith Packard <keithp@keithp.com> | 2013-11-28 09:46:13 -0800 | 
| commit | d93a65a90f19e4816231e03b1f399af6e3742aee (patch) | |
| tree | f4c2d026846a0c282bebdc13c00f5ba2147a7170 /ao-tools/ao-stmload/ao-stmload.c | |
| parent | 14204e3d147ad99cc249ad8de254809180fe5c38 (diff) | |
ao-tools: Move ao-selfload into library
This needs to be shared between ao-stmload and ao-usbload
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'ao-tools/ao-stmload/ao-stmload.c')
| -rw-r--r-- | ao-tools/ao-stmload/ao-stmload.c | 10 | 
1 files changed, 6 insertions, 4 deletions
diff --git a/ao-tools/ao-stmload/ao-stmload.c b/ao-tools/ao-stmload/ao-stmload.c index a11d93de..71d1ec57 100644 --- a/ao-tools/ao-stmload/ao-stmload.c +++ b/ao-tools/ao-stmload/ao-stmload.c @@ -32,6 +32,8 @@  #include "cc-usb.h"  #include "cc.h"  #include "ao-stmload.h" +#include "ao-selfload.h" +#include "ao-verbose.h"  #define AO_USB_DESC_STRING		3 @@ -249,13 +251,13 @@ static const struct option options[] = {  	{ .name = "device", .has_arg = 1, .val = 'D' },  	{ .name = "cal", .has_arg = 1, .val = 'c' },  	{ .name = "serial", .has_arg = 1, .val = 's' }, -	{ .name = "verbose", .has_arg = 0, .val = 'v' }, +	{ .name = "verbose", .has_arg = 1, .val = 'v' },  	{ 0, 0, 0, 0},  };  static void usage(char *program)  { -	fprintf(stderr, "usage: %s [--stlink] [--verbose] [--device=<device>] [-tty=<tty>] [--cal=<radio-cal>] [--serial=<serial>] file.{elf,ihx}\n", program); +	fprintf(stderr, "usage: %s [--stlink] [--verbose=<verbose>] [--device=<device>] [-tty=<tty>] [--cal=<radio-cal>] [--serial=<serial>] file.{elf,ihx}\n", program);  	exit(1);  } @@ -316,7 +318,7 @@ main (int argc, char **argv)  	struct ao_sym		*file_symbols;  	int			num_file_symbols; -	while ((c = getopt_long(argc, argv, "T:D:c:s:Sv", options, NULL)) != -1) { +	while ((c = getopt_long(argc, argv, "T:D:c:s:Sv:", options, NULL)) != -1) {  		switch (c) {  		case 'T':  			tty = optarg; @@ -346,7 +348,7 @@ main (int argc, char **argv)  		}  	} -	ao_self_verbose = verbose; +	ao_verbose = verbose;  	if (verbose > 1)  		ccdbg_add_debug(CC_DEBUG_BITBANG);  | 
