Skip to content

Commit 05f627e

Browse files
authored
Add EEPROM image generator
1 parent ad4e8c5 commit 05f627e

File tree

1 file changed

+51
-0
lines changed

1 file changed

+51
-0
lines changed

eepromgen.c

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
#include <stdio.h>
2+
#include <stddef.h>
3+
4+
/* Bunnies eeprom */
5+
const unsigned char default_eeprom[] = {
6+
0xe3, 0x1c, 0x5c, 0x23, 0x6a, 0x58, 0x68, 0x37,
7+
0xb7, 0x12, 0x26, 0x6c, 0x99, 0x11, 0x30, 0xd1,
8+
0xe2, 0x3e, 0x4d, 0x56, 0xf7, 0x73, 0x2b, 0x73,
9+
0x85, 0xfe, 0x7f, 0x0a, 0x08, 0xef, 0x15, 0x3c,
10+
0x77, 0xee, 0x6d, 0x4e, 0x93, 0x2f, 0x28, 0xee,
11+
0xf8, 0x61, 0xf7, 0x94, 0x17, 0x1f, 0xfc, 0x11,
12+
0x0b, 0x84, 0x44, 0xed, 0x31, 0x30, 0x35, 0x35,
13+
0x38, 0x31, 0x31, 0x31, 0x34, 0x30, 0x30, 0x33,
14+
0x00, 0x50, 0xf2, 0x4f, 0x65, 0x52, 0x00, 0x00,
15+
0x0a, 0x1e, 0x35, 0x33, 0x71, 0x85, 0x31, 0x4d,
16+
0x59, 0x12, 0x38, 0x48, 0x1c, 0x91, 0x53, 0x60,
17+
0x00, 0x01, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00,
18+
0x75, 0x61, 0x57, 0xfb, 0x2c, 0x01, 0x00, 0x00,
19+
0x45, 0x53, 0x54, 0x00, 0x45, 0x44, 0x54, 0x00,
20+
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
21+
0x0a, 0x05, 0x00, 0x02, 0x04, 0x01, 0x00, 0x02,
22+
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
23+
0x00, 0x00, 0x00, 0x00, 0xc4, 0xff, 0xff, 0xff,
24+
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
25+
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
26+
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
27+
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
28+
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
29+
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
30+
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31+
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
32+
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
33+
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
34+
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
35+
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
36+
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
37+
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
38+
};
39+
40+
int main() {
41+
size_t i;
42+
FILE* eepromFile = fopen("./eeprom.bin", "wb");
43+
if (eepromFile) {
44+
fwrite(default_eeprom, 1, 256, eepromFile);
45+
fclose(eepromFile);
46+
} else {
47+
printf("Opening eeprom.bin for write failed!\n");
48+
return 1;
49+
}
50+
return 0;
51+
}

0 commit comments

Comments
 (0)