Logo Search packages:      
Sourcecode: nut version File versions  Download package

libhid.h File Reference


Detailed Description

HID Library - User API.

Author:
Copyright (C) 2003 Arnaud Quette <arnaud.quette@free.fr> && <arnaud.quette@mgeups.com> Charles Lepple <clepple@ghz.cc> 2005 Peter Selinger <selinger@users.sourceforge.net>
This program is sponsored by MGE UPS SYSTEMS - opensource.mgeups.com

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.

--------------------------------------------------------------------------

Definition in file libhid.h.

#include "config.h"
#include <sys/types.h>
#include <regex.h>
#include "timehead.h"
#include "hidtypes.h"
#include "usb.h"

Go to the source code of this file.

Classes

struct  HIDDevice
struct  HIDDeviceMatcher_s
struct  HIDItem
struct  MatchFlags_s
struct  usage_lkp_t

Defines

#define MAX_TS   2
#define MODE_OPEN   0
#define MODE_REOPEN   1

Typedefs

typedef enum ebool bool
typedef struct HIDDeviceMatcher_s HIDDeviceMatcher_t
typedef struct MatchFlags_s MatchFlags_t
typedef usage_lkp_t * usage_tables_t

Enumerations

enum  ebool {
  FALSE, TRUE, FALSE = 0, TRUE,
  FALSE, TRUE
}

Functions

void free_exact_matcher (HIDDeviceMatcher_t *matcher)
void free_regex_matcher (HIDDeviceMatcher_t *matcher)
int get_current_data_attribute ()
void HIDCloseDevice (usb_dev_handle *udev)
void HIDDumpTree (usb_dev_handle *udev, usage_tables_t *utab)
int HIDGetEvents (usb_dev_handle *udev, HIDDevice *dev, HIDItem **eventsList, usage_tables_t *utab)
HIDItemHIDGetItem (const char *ItemPath)
char * HIDGetItemString (usb_dev_handle *udev, char *path, unsigned char *rawbuf, usage_tables_t *utab)
int HIDGetItemValue (usb_dev_handle *udev, char *path, float *Value, usage_tables_t *utab)
HIDDeviceHIDOpenDevice (usb_dev_handle **udevp, HIDDevice *hd, HIDDeviceMatcher_t *matcher, int mode)
bool HIDSetItemValue (usb_dev_handle *udev, char *path, float value, usage_tables_t *utab)
static int matches (HIDDeviceMatcher_t *matcher, HIDDevice *device)
HIDDeviceMatcher_t * new_exact_matcher (HIDDevice *d)
int new_regex_matcher (HIDDeviceMatcher_t **matcher, char *regex_array[6], int cflags)

Variables

usage_lkp_t hid_usage_lkp []


Generated by  Doxygen 1.6.0   Back to index