// AduUsbEg.c : Demonstrates access to an Ontrak USB device.

#include "AduHid.h"
#include <stdio.h>

int main(int argc, char* argv[])
{
    void * hDevice;
    char sBuffer[8];

    hDevice = OpenAduDevice(0);  
    WriteAduDevice(hDevice, "RE3", 3, 0, 0);
	memset(sBuffer, 0, sizeof(sBuffer));
    ReadAduDevice(hDevice, sBuffer, 7, 0, 0);
    printf("Event counter=%s\n", sBuffer);
    CloseAduDevice(hDevice);
    return 0;
} // end main
