repo.or.cz
/
fpgammix.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
initial
[fpgammix.git]
/
workloads
/
xmodem
/
main.c
blob
55746ac354beaa2ab01b1314cb25552bcbe536b5
1
#include
"host.h"
2
#include
"xmodem.h"
3
4
unsigned char
buf
[
9999
];
5
6
static
outs
(
char
*
s
)
7
{
8
while
(*
s
)
_outbyte
(*
s
++);
9
}
10
11
int
main
()
12
{
13
for
(;;) {
14
outs
(
"Start!
\r\n
"
);
15
set_s7_0
(
0x5
);
16
set_s7_1
(
0x5
);
17
18
int
res
=
xmodemReceive
(
buf
,
sizeof
buf
);
19
20
if
(
res
<
0
)
21
outs
(
"Failed!
\r\n
"
);
22
else
23
outs
(
"Success!
\r\n
"
);
24
}
25
}