ev3duder  0.3.0
EV3 Downloader/Uploader
listen.c
Go to the documentation of this file.
1 #include <stdio.h>
2 #include <hidapi/hidapi.h>
3 #include <string.h>
4 #include "defs.h"
5 #include "ev3_io.h"
6 
7 int listen()
8 {
9  u8 buffer[1280] = {0};
10  int read;
11  while ( (read = hid_read(handle,buffer, sizeof buffer)) > 0)
12  {
13  printf("%d bytes read.\n", read);
14  //print_bytes(buffer, read);
15  printf("[%s]\n", buffer);
16  memset(buffer, 0, sizeof buffer);
17  }
18 
19  return 0;
20 }
21 
EXTERN void * handle
Definition: ev3_io.h:17
int listen()
Definition: listen.c:7
uint8_t u8
Definition: defs.h:9