libvcomm  1.0
 All Data Structures Files Functions Variables Typedefs Macros Groups Pages
libvcomm - IRvoodoo communication library

The main purpose of libvcomm is to simplify communication between user code and IRvoodoo device.
libvcomm is based on hidapi library (http://www.signal11.us/oss/hidapi/).

Basic usage:

  1. Create connection handle (pointer to hid_device).
  2. Use Vopen to open connection.
  3. ... send commands (actions)
  4. Use Vclose to close connection.

Example: simple program to get last decoded IRcode from IRvoodoo.

For more advanced example see blaster.c

/*
* libvcomm_simple.c
*
* Created on: 17.09.2012
* Author: Tarmo Kople <tarmo@flycom.ee>
*/
#include <stdio.h>
#include <stdlib.h>
#include <vcomm.h>
int main(void) {
hid_device *vhandle; // connection handle
int resp; // libvcomm response
/*
* Open IRvoodoo
*/
if ((resp = Vopen(&vhandle, NULL))) {
fprintf(stderr, "Err %d\n", resp);
return EXIT_FAILURE;
}
/*
* Get last decoded IRcode
*/
ircode_t ircode; // create empty IRcode structure
resp = Vget_ircode(&vhandle, &ircode); // fill IRcode structure (get from IRvoodoo)
if (resp) {
fprintf(stderr, "Err %d\n", resp);
return EXIT_FAILURE;
}
/*
* Close IRvoodoo (to avoid memory leaks)
*/
Vclose(&vhandle);
return EXIT_SUCCESS;
}
Author
Tarmo Kople tarmo.nosp@m.@fly.nosp@m.com.e.nosp@m.e
Date
17.09.2012