Defines | Functions | Variables
hiddata.cpp File Reference
#include <stdio.h>
#include "blink1/hiddata.h"
#include <string.h>
#include <usb.h>
Include dependency graph for hiddata.cpp:

Go to the source code of this file.

Defines

#define USB_HID_REPORT_TYPE_FEATURE   3
#define usbDevice   usb_dev_handle /* use libusb's device structure */
#define USBRQ_HID_GET_REPORT   0x01
#define USBRQ_HID_SET_REPORT   0x09

Functions

void usbhidCloseDevice (usbDevice_t *device)
int usbhidGetReport (usbDevice_t *device, int reportNumber, char *buffer, int *len)
static int usbhidGetStringAscii (usb_dev_handle *dev, int index, char *buf, int buflen)
int usbhidOpenDevice (usbDevice_t **device, int vendor, char *vendorName, int product, char *productName, int _usesReportIDs)
int usbhidSetReport (usbDevice_t *device, char *buffer, int len)

Variables

static int usesReportIDs

Define Documentation

Definition at line 172 of file hiddata.cpp.

#define usbDevice   usb_dev_handle /* use libusb's device structure */

Definition at line 165 of file hiddata.cpp.

#define USBRQ_HID_GET_REPORT   0x01

Definition at line 169 of file hiddata.cpp.

#define USBRQ_HID_SET_REPORT   0x09

Definition at line 170 of file hiddata.cpp.


Function Documentation

void usbhidCloseDevice ( usbDevice_t device)

Definition at line 291 of file hiddata.cpp.

int usbhidGetReport ( usbDevice_t device,
int  reportNumber,
char *  buffer,
int *  len 
)

Definition at line 341 of file hiddata.cpp.

static int usbhidGetStringAscii ( usb_dev_handle *  dev,
int  index,
char *  buf,
int  buflen 
) [static]

Definition at line 179 of file hiddata.cpp.

int usbhidOpenDevice ( usbDevice_t **  device,
int  vendor,
char *  vendorName,
int  product,
char *  productName,
int  _usesReportIDs 
)

Definition at line 207 of file hiddata.cpp.

int usbhidSetReport ( usbDevice_t device,
char *  buffer,
int  len 
)

Definition at line 299 of file hiddata.cpp.


Variable Documentation

int usesReportIDs [static]

Definition at line 175 of file hiddata.cpp.



blink1
Author(s): Guilherme Pereira (The AIR lab, Carnegie Mellon University)
autogenerated on Sat Jun 8 2019 20:13:43