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/reset.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/reset.c')
-rw-r--r-- | software/hhd70dongle/pcusbhid/reset.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/software/hhd70dongle/pcusbhid/reset.c b/software/hhd70dongle/pcusbhid/reset.c new file mode 100644 index 0000000..7955b1b --- /dev/null +++ b/software/hhd70dongle/pcusbhid/reset.c @@ -0,0 +1,22 @@ +#include <stdio.h> +#include <string.h> + +#include "hid.h" + + +void sendstr(char * tosend) +{ + rawhid_send(0, tosend, strlen(tosend),1000); +} + +int main (int argc, char *argv[]) +{ + // C-based example is 16C0:0480:FFAB:0200 + int r = rawhid_open(1, 0x16C0, 0x0481, 0xFFAB, 0x0200); + if (r <= 0) { + printf("no rawhid device found\n"); + return -1; + } + sendstr("r"); // clear the buffer + return 0; +} |