summaryrefslogtreecommitdiff
path: root/H64E-2/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'H64E-2/main.c')
-rw-r--r--H64E-2/main.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/H64E-2/main.c b/H64E-2/main.c
index 8830f1d..e1d3d7b 100644
--- a/H64E-2/main.c
+++ b/H64E-2/main.c
@@ -161,12 +161,20 @@ int main(int argc, const char * argv[]) {
int param_offset = -1;
char *fname = NULL;
int fd;
+ int in_bytes = 0;
+ uint8_t buf[128];
printf("H64E-2 Project started 1\n");
//initialise structure
H64E_t h64e;
+ H64E_stream_in sin;
+ H64E_stream_out sout;
h64e_init(&h64e);
+ h64e_si_init(&sin, 128);
+ h64e_so_init(&sout, 128);
+ h64e_set_input(&h64e, &sin);
+ h64e_set_output(&h64e, &sout);
//set all params from arguments
@@ -238,9 +246,14 @@ int main(int argc, const char * argv[]) {
//register formats
//do conversation, reading input and outputing
+ while ((in_bytes = file_read(fd,(char *)&buf,128)) != -1)
+ {
+ printf("Reading %d bytes\n",in_bytes);
+ }
//deinit all structures
h64e_destroy(&h64e);
+ file_close(fd);
printf("Ending Execution\n");
return 0;