CTHN.de - LEDCube - commandline client
|
00001 /* 00002 * CTHN.de MiniLEDCube 00003 * 00004 * By Kai Lauterbach (klaute at web dot de) 11/2011 00005 * 00006 * Based on http://mosfetkiller.de/?s=miniledcube 00007 * 00008 * License: General Public License (GPL v3) 00009 * 00010 */ 00011 00012 #ifndef __LEDCUBE_H_INCLUDED__ 00013 #define __LEDCUBE_H_INCLUDED__ 00014 00015 #define NOT_CONNECTED_ERROR -1 00016 #define DEVICE_NOT_FOUND_ERROR -2 00017 00018 #define SUCCESSFULLY_CONNECTED 1 00019 00020 #include <stdio.h> 00021 #include <usb.h> /* this is libusb */ 00022 00023 #include "opendevice.h" /* common code moved to separate module */ 00024 00025 #include "../firmware/globals.h" /* custom request numbers */ 00026 #include "../firmware/requests.h" /* custom request numbers */ 00027 #include "../firmware/usbconfig.h" /* device's VID/PID and names */ 00028 00029 usb_dev_handle *_lc_handle = NULL; 00030 00031 const unsigned char _lc_rawVid[2] = {USB_CFG_VENDOR_ID}, 00032 _lc_rawPid[2] = {USB_CFG_DEVICE_ID}; 00033 00034 char _lc_vendor[] = {USB_CFG_VENDOR_NAME, 0}, 00035 _lc_product[] = {USB_CFG_DEVICE_NAME, 0}; 00036 00037 char _lc_buffer[4]; 00038 00039 int _lc_vid, 00040 _lc_pid; 00041 00042 int lc_setFrame(unsigned long); 00043 int lc_setMode(int); 00044 int lc_saveFrame(unsigned long, int, int); 00045 int lc_init(void); 00046 int lc_close(void); 00047 00048 #endif // __LEDCUBE_H_INCLUDED__ 00049