hid_preparation.c File Reference

#include <hid.h>
#include <hid_helpers.h>
#include <constants.h>
#include <debug.h>
#include <assert.h>

Go to the source code of this file.

Defines

#define HID_INTERNAL

Functions

static hid_return hid_prepare_hid_descriptor (HIDInterface *const hidif)
static hid_return hid_prepare_report_descriptor (HIDInterface *const hidif)
hid_return hid_prepare_interface (HIDInterface *const hidif)


Define Documentation

#define HID_INTERNAL

Definition at line 1 of file hid_preparation.c.


Function Documentation

static hid_return hid_prepare_hid_descriptor ( HIDInterface *const   hidif  )  [static]

Todo:
This code does not seem to properly retrieve descriptors for devices with multiple interfaces. We probably need to parse each interface a little more to determine which endpoints we want to talk to with usb_control_msg (EP1IN can't be right for everything).

Definition at line 15 of file hid_preparation.c.

References ASSERT, HIDInterface_t::dev_handle, hid_is_opened(), HIDInterface_t::hid_parser, HID_RET_HID_DESC_SHORT, HID_RET_NOT_HID_DEVICE, HID_RET_SUCCESS, HIDInterface_t::id, HIDInterface_t::interface, NOTICE, HIDParser::ReportDescSize, TRACE, USB_TIMEOUT, and WARNING.

Referenced by hid_prepare_interface().

hid_return hid_prepare_interface ( HIDInterface *const   hidif  ) 

Definition at line 100 of file hid_preparation.c.

References ERROR, hid_close(), hid_init_parser(), hid_is_opened(), hid_prepare_hid_descriptor(), hid_prepare_parser(), hid_prepare_report_descriptor(), HID_RET_DEVICE_NOT_OPENED, and HID_RET_SUCCESS.

Referenced by hid_force_open(), and hid_open().

static hid_return hid_prepare_report_descriptor ( HIDInterface *const   hidif  )  [static]

Definition at line 58 of file hid_preparation.c.

References ASSERT, HIDInterface_t::dev_handle, ERROR, hid_is_opened(), HIDInterface_t::hid_parser, HID_RET_FAIL_GET_REPORT, HID_RET_REPORT_DESC_LONG, HID_RET_REPORT_DESC_SHORT, HID_RET_SUCCESS, HIDInterface_t::id, HIDInterface_t::interface, NOTICE, REPORT_DSC_SIZE, HIDParser::ReportDesc, HIDParser::ReportDescSize, TRACE, USB_TIMEOUT, and WARNING.

Referenced by hid_prepare_interface().


Generated on Sun Mar 30 15:28:25 2008 for libhid by  doxygen 1.5.1