summaryrefslogtreecommitdiff
path: root/software/hhd70dongle/pcusbhid/reset.c
blob: 7955b1b695bfa11decb9338186cc47cbb0b22be8 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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;
}