-/* flasher for HM-CFG-USB
+/* flasher for HM-MOD-UART
*
- * Copyright (c) 2013-16 Michael Gernoth <michael@gernoth.net>
+ * Copyright (c) 2016-20 Michael Gernoth <michael@gernoth.net>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to
fprintf(stderr, "Syntax: %s [options] -U /dev/ttyAMA0 filename.eq3\n\n", prog);
fprintf(stderr, "Mandatory parameter:\n");
fprintf(stderr, "\t-U device\tuse HM-MOD-UART on given device\n");
- fprintf(stderr, "Possible options:\n");
+ fprintf(stderr, "\nOptional parameters:\n");
fprintf(stderr, "\t-V\t\tshow version (" VERSION ")\n");
}
uart = optarg;
break;
case 'V':
- printf("flash-hmcfgusb " VERSION "\n");
- printf("Copyright (c) 2013-16 Michael Gernoth\n\n");
+ printf("flash-hmmoduart " VERSION "\n");
+ printf("Copyright (c) 2016 Michael Gernoth\n\n");
exit(EXIT_SUCCESS);
case 'h':
case ':':
exit(EXIT_FAILURE);
}
- fw = firmware_read_firmware(filename, debug);
+ fw = firmware_read_firmware(filename, ATMEGA_UNKNOWN, debug);
if (!fw)
exit(EXIT_FAILURE);
memset(&rdata, 0, sizeof(rdata));
+ printf("\nInitializing HM-MOD-UART...\n");
+
dev = hmuart_init(uart, parse_hmuartlgw, &rdata, 0);
if (!dev) {
fprintf(stderr, "Can't initialize HM-MOD-UART\n");
exit(EXIT_FAILURE);
}
- printf("\nHM-MOD-UART opened.\n\n");
+ printf("HM-MOD-UART opened.\n\n");
printf("Flashing %d blocks", fw->fw_blocks);
if (debug) {