FreeCalypso > hg > fc-usbser-tools
comparison cp2102/file_rw_test.c @ 55:c0084bf153e5
cp2102: Intel HEX reading implemented
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Mon, 11 Sep 2023 19:45:56 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
54:10789bcf07c4 | 55:c0084bf153e5 |
---|---|
1 /* | |
2 * This little program is a unit test for our Intel HEX reading function. | |
3 */ | |
4 | |
5 #include <sys/types.h> | |
6 #include <stdio.h> | |
7 #include <stdlib.h> | |
8 #include "cp210x_defs.h" | |
9 | |
10 u_char eeprom[SIZE_EEPROM]; | |
11 | |
12 main(argc, argv) | |
13 char **argv; | |
14 { | |
15 if (argc != 2) { | |
16 fprintf(stderr, "usage: %s ihex-file\n", argv[0]); | |
17 exit(1); | |
18 } | |
19 read_intel_hex(argv[1]); | |
20 intel_hex_out(eeprom, stdout); | |
21 exit(0); | |
22 } |