diff options
author | Bernhard Tittelbach <xro@realraum.at> | 2012-05-17 06:14:29 +0000 |
---|---|---|
committer | Bernhard Tittelbach <xro@realraum.at> | 2012-05-17 06:14:29 +0000 |
commit | 3ce320b1618b5c1a2232a6887c5fef780872171c (patch) | |
tree | e43bc1a76ea617225cd26c026696578aa7440b8b /software/hhd70dongle/pcusbhid/rawhid_testinterface.c | |
parent | spi and c1101 code shuffling (diff) |
debugging test attempts
git-svn-id: https://svn.spreadspace.org/mur.sat@418 7de4ea59-55d0-425e-a1af-a3118ea81d4c
Diffstat (limited to 'software/hhd70dongle/pcusbhid/rawhid_testinterface.c')
-rw-r--r-- | software/hhd70dongle/pcusbhid/rawhid_testinterface.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/software/hhd70dongle/pcusbhid/rawhid_testinterface.c b/software/hhd70dongle/pcusbhid/rawhid_testinterface.c index 8f19c4f..1d47daa 100644 --- a/software/hhd70dongle/pcusbhid/rawhid_testinterface.c +++ b/software/hhd70dongle/pcusbhid/rawhid_testinterface.c @@ -59,18 +59,17 @@ int main (int argc, char *argv[]) while (1) { - num = rawhid_recv(0, buf, BUF_LEN, 220); + num = rawhid_recv(0, buf, BUF_LEN, 250); if (num < 0) { printf("\nerror reading, device went offline\n"); rawhid_close(0); return 0; } - else if (num == 0) + if (num > 0) { - sleep(1.0); + buf[num]='\0'; + printf("%s\n",buf); } - buf[num]='\0'; - printf("%s\n",buf); } } |