From: H. Nikolaus Schaller Date: Fri, 4 Sep 2020 13:05:50 +0000 (+0200) Subject: make default port name easier to configure and setup for my device on iMac X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=af236294d24fb1bff39ee38bb15dca6d732d0f95;p=flashkit-mdc.git make default port name easier to configure and setup for my device on iMac Signed-off-by: H. Nikolaus Schaller --- diff --git a/flashkit.c b/flashkit.c index 9884dd6..00819c4 100644 --- a/flashkit.c +++ b/flashkit.c @@ -466,11 +466,13 @@ static FILE *open_prep_read(const char *fname, long *size) return f; } +static const char *portname = "/dev/cu.usbserial-AL0254JM"; + static void usage(const char *argv0) { printf("usage:\n" "%s [options]\n" - " -d (default /dev/ttyUSB0)\n" + " -d (default %s)\n" " -r [size] dump the cart (default 4MB)\n" " -w [size] program the flash (def. file size)\n" " -s [size] simple write (SRAM, etc, def. file size)\n" @@ -479,7 +481,7 @@ static void usage(const char *argv0) " -8 8bit flash\n" " -v verify written data\n" " -i get info about the flash chip\n" - , argv0); + , argv0, portname); exit(1); } @@ -504,7 +506,6 @@ static uint8_t g_block2[0x10000]; int main(int argc, char *argv[]) { - const char *portname = "/dev/ttyUSB0"; const char *fname_w = NULL; const char *fname_r = NULL; const char *fname_ws = NULL;