FreeCalypso > hg > vband-misc
comparison dhf/emit-dhfbin-efr.c @ 35:6bb1651f8c11
dhf: generate binary form of EFR DHF
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Tue, 14 May 2024 03:46:12 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
34:307fe06fabec | 35:6bb1651f8c11 |
---|---|
1 /* | |
2 * This program emits a binary file containing one EFR DHF. | |
3 */ | |
4 | |
5 #include <stdio.h> | |
6 #include <stdint.h> | |
7 #include <stdlib.h> | |
8 | |
9 extern const uint8_t efr_dhf_bytes[31]; | |
10 | |
11 main(argc, argv) | |
12 char **argv; | |
13 { | |
14 FILE *outf; | |
15 | |
16 if (argc != 2) { | |
17 fprintf(stderr, "usage: %s out-bin-file\n", argv[0]); | |
18 exit(1); | |
19 } | |
20 outf = fopen(argv[1], "w"); | |
21 if (!outf) { | |
22 perror(argv[1]); | |
23 exit(1); | |
24 } | |
25 fwrite(efr_dhf_bytes, 1, 31, outf); | |
26 fclose(outf); | |
27 exit(0); | |
28 } |