git.joshuawise.com
/
fpgaboy.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
blame
|
history
|
raw
|
HEAD
Add nintendo logo to diag. Add xmodem loader. Add auxboot and binwire utilities.
[fpgaboy.git]
/
binwire.c
1
#include <stdio.h>
2
3
void dowrite(char *s, int len)
4
{
5
int i;
6
for (i=0; i<len; i++)
7
{
8
write(1, s+i, 1);
9
}
10
}
11
12
void main()
13
{
14
char buf[259];
15
int sz;
16
dowrite("\x1B" "A\x00\x00\x00...", 8);
17
fprintf(stderr, "Address sent\n");
18
while ((sz = read(0, buf+3, 128)) > 0)
19
{
20
buf[0] = 0x1B;
21
buf[1] = 'D';
22
buf[2] = sz - 1;
23
dowrite(buf, sz + 3);
24
dowrite(".", 1);
25
fprintf(stderr, "Data sent\n");
26
usleep(100000);
27
}
28
}
This page took
0.018798 seconds
and
4
git commands to generate.