Changeset c7b5826 in mainline for uspace/lib/usbhid/include


Ignore:
Timestamp:
2011-05-18T09:34:56Z (15 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
33d19a7
Parents:
d736fe38 (diff), b2995c3 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Development branch changes

Location:
uspace/lib/usbhid/include/usb/hid
Files:
12 moved

Legend:

Unmodified
Added
Removed
  • uspace/lib/usbhid/include/usb/hid/hid.h

    rd736fe38 rc7b5826  
    2727 */
    2828
    29 /** @addtogroup libusb
     29/** @addtogroup libusbhid
    3030 * @{
    3131 */
     
    3333 * @brief USB HID device related types.
    3434 */
    35 #ifndef LIBUSB_HID_H_
    36 #define LIBUSB_HID_H_
     35#ifndef LIBUSBHID_HID_H_
     36#define LIBUSBHID_HID_H_
    3737
    3838#include <usb/usb.h>
    39 #include <usb/classes/hidparser.h>
     39#include <usb/hid/hidparser.h>
    4040#include <usb/descriptor.h>
    4141
  • uspace/lib/usbhid/include/usb/hid/hid_report_items.h

    rd736fe38 rc7b5826  
    2727 */
    2828
    29 /** @addtogroup libusb
     29/** @addtogroup libusbhid
    3030 * @{
    3131 */
     
    3333 * @brief USB HID parser.
    3434 */
    35 #ifndef LIBUSB_HID_REPORT_ITEMS_H_
    36 #define LIBUSB_HID_REPORT_ITEMS_H_
     35#ifndef LIBUSBHID_HID_REPORT_ITEMS_H_
     36#define LIBUSBHID_HID_REPORT_ITEMS_H_
    3737
    3838#include <stdint.h>
     
    4646#define USB_HID_ITEM_IS_LONG(data)      (data == 0xFE)
    4747
     48
     49/**
     50 * Extended usage macros
     51 */
     52#define USB_HID_IS_EXTENDED_USAGE(usage)        ((usage & 0xFFFF0000) != 0)
     53#define USB_HID_EXTENDED_USAGE_PAGE(usage)      ((usage & 0xFFFF0000) >> 16)
     54#define USB_HID_EXTENDED_USAGE(usage)           (usage & 0xFFFF)
    4855
    4956/**
  • uspace/lib/usbhid/include/usb/hid/hiddescriptor.h

    rd736fe38 rc7b5826  
    2727 */
    2828
    29 /** @addtogroup libusb
     29/** @addtogroup libusbhid
    3030 * @{
    3131 */
     
    3333 * USB HID report descriptor and report data parser
    3434 */
    35 #ifndef LIBUSB_HIDDESCRIPTOR_H_
    36 #define LIBUSB_HIDDESCRIPTOR_H_
     35#ifndef LIBUSBHID_HIDDESCRIPTOR_H_
     36#define LIBUSBHID_HIDDESCRIPTOR_H_
    3737
    3838#include <stdint.h>
    3939#include <adt/list.h>
    40 #include <usb/classes/hid_report_items.h>
    41 #include <usb/classes/hidpath.h>
    42 #include <usb/classes/hidtypes.h>
     40#include <usb/hid/hid_report_items.h>
     41#include <usb/hid/hidpath.h>
     42#include <usb/hid/hidtypes.h>
    4343
    4444
  • uspace/lib/usbhid/include/usb/hid/hidparser.h

    rd736fe38 rc7b5826  
    2727 */
    2828
    29 /** @addtogroup libusb
     29/** @addtogroup libusbhid
    3030 * @{
    3131 */
     
    3333 * USB HID report descriptor and report data parser
    3434 */
    35 #ifndef LIBUSB_HIDPARSER_H_
    36 #define LIBUSB_HIDPARSER_H_
     35#ifndef LIBUSBHID_HIDPARSER_H_
     36#define LIBUSBHID_HIDPARSER_H_
    3737
    3838#include <stdint.h>
    3939#include <adt/list.h>
    40 #include <usb/classes/hid_report_items.h>
    41 #include <usb/classes/hidpath.h>
    42 #include <usb/classes/hidtypes.h>
    43 #include <usb/classes/hiddescriptor.h>
     40#include <usb/hid/hid_report_items.h>
     41#include <usb/hid/hidpath.h>
     42#include <usb/hid/hidtypes.h>
     43#include <usb/hid/hiddescriptor.h>
    4444
    4545
     
    5050int usb_hid_parse_report(const usb_hid_report_t *report, const uint8_t *data,
    5151                         size_t size, uint8_t *report_id);
    52 
    53 /** */
    54 size_t usb_hid_report_input_length(const usb_hid_report_t *report,
    55         usb_hid_report_path_t *path, int flags);
    5652
    5753/*
     
    6561void usb_hid_report_output_free(uint8_t *output);
    6662
    67 /** Returns size of output for given usage path */
    68 size_t usb_hid_report_output_size(usb_hid_report_t *report,
    69                                   usb_hid_report_path_t *path, int flags);
     63/** Returns size of report in items */
     64size_t usb_hid_report_size(usb_hid_report_t *report, uint8_t report_id,
     65                           usb_hid_report_type_t type);
    7066
    7167/** Makes the output report buffer by translated given data */
  • uspace/lib/usbhid/include/usb/hid/hidpath.h

    rd736fe38 rc7b5826  
    2727 */
    2828
    29 /** @addtogroup libusb
     29/** @addtogroup libusbhid
    3030 * @{
    3131 */
     
    3333 * USB HID report descriptor and report data parser
    3434 */
    35 #ifndef LIBUSB_HIDPATH_H_
    36 #define LIBUSB_HIDPATH_H_
     35#ifndef LIBUSBHID_HIDPATH_H_
     36#define LIBUSBHID_HIDPATH_H_
    3737
    38 #include <usb/classes/hidparser.h>
     38#include <usb/hid/hidparser.h>
    3939#include <stdint.h>
    4040#include <adt/list.h>
  • uspace/lib/usbhid/include/usb/hid/hidreport.h

    rd736fe38 rc7b5826  
    2727 */
    2828
    29 /** @addtogroup libusb
     29/** @addtogroup libusbhid
    3030 * @{
    3131 */
     
    3434 */
    3535
    36 #ifndef LIBUSB_HIDREPORT_H_
    37 #define LIBUSB_HIDREPORT_H_
     36#ifndef LIBUSBHID_HIDREPORT_H_
     37#define LIBUSBHID_HIDREPORT_H_
    3838
    39 #include <usb/devdrv.h>
    40 #include <usb/classes/hidparser.h>
     39#include <usb/dev/driver.h>
     40#include <usb/hid/hidparser.h>
    4141
    4242/**
  • uspace/lib/usbhid/include/usb/hid/hidtypes.h

    rd736fe38 rc7b5826  
    2727 */
    2828
    29 /** @addtogroup libusb
     29/** @addtogroup libusbhid
    3030 * @{
    3131 */
     
    3333 * USB HID report descriptor and report data parser
    3434 */
    35 #ifndef LIBUSB_HIDTYPES_H_
    36 #define LIBUSB_HIDTYPES_H_
     35#ifndef LIBUSBHID_HIDTYPES_H_
     36#define LIBUSBHID_HIDTYPES_H_
    3737
    3838#include <stdint.h>
    3939#include <adt/list.h>
    4040
    41 #define USB_HID_MAX_USAGES      20
     41#define USB_HID_MAX_USAGES      0xffff
    4242
    4343#define USB_HID_UINT32_TO_INT32(x, size)        ((((x) & (1 << ((size) - 1))) != 0) ? -(~(x - 1) & ((1 << size) - 1)) : (x)) //(-(~((x) - 1)))
     
    9292        int32_t physical_minimum;
    9393        int32_t physical_maximum;
    94         uint32_t usage_minimum;
    95         uint32_t usage_maximum;
     94        int32_t usage_minimum;
     95        int32_t usage_maximum;
    9696        uint32_t unit;
    9797        uint32_t unit_exponent;
    98        
     98
     99        uint32_t *usages;
     100        size_t usages_count;
    99101
    100102        int32_t value;
     
    121123
    122124        /** */ 
    123         uint32_t usage_minimum;
    124         /** */ 
    125         uint32_t usage_maximum;
     125        int32_t usage_minimum;
     126        /** */ 
     127        int32_t usage_maximum;
    126128        /** */ 
    127129        int32_t logical_minimum;
  • uspace/lib/usbhid/include/usb/hid/iface.h

    rd736fe38 rc7b5826  
    2727 */
    2828
    29 /** @addtogroup libusb
     29/** @addtogroup libusbhid
    3030 * @{
    3131 */
     
    3333 * Client functions for accessing USB HID interface.
    3434 */
    35 #ifndef LIBUSB_CLASSES_HID_IFACE_H_
    36 #define LIBUSB_CLASSES_HID_IFACE_H_
     35#ifndef LIBUSBHID_CLASSES_HID_IFACE_H_
     36#define LIBUSBHID_CLASSES_HID_IFACE_H_
    3737
    3838#include <sys/types.h>
  • uspace/lib/usbhid/include/usb/hid/request.h

    rd736fe38 rc7b5826  
    2727 */
    2828
    29 /** @addtogroup libusb
     29/** @addtogroup libusbhid
    3030 * @{
    3131 */
     
    3939#include <stdint.h>
    4040
    41 #include <usb/classes/hid.h>
    42 #include <usb/pipes.h>
     41#include <usb/hid/hid.h>
     42#include <usb/dev/pipes.h>
    4343
    4444/*----------------------------------------------------------------------------*/
  • uspace/lib/usbhid/include/usb/hid/usages/core.h

    rd736fe38 rc7b5826  
    2727 */
    2828
    29 /** @addtogroup libusb
     29/** @addtogroup libusbhid
    3030 * @{
    3131 */
     
    3333 * @brief USB HID Usage Tables.
    3434 */
    35 #ifndef LIBUSB_HIDUT_H_
    36 #define LIBUSB_HIDUT_H_
     35#ifndef LIBUSBHID_HIDUT_H_
     36#define LIBUSBHID_HIDUT_H_
    3737
    3838/** USB/HID Usage Pages. */
     
    6767} usb_hidut_usage_generic_desktop_t;
    6868
     69typedef enum {
     70        USB_HIDUT_USAGE_CONSUMER_CONSUMER_CONTROL = 1
     71} usb_hidut_usage_consumer_t;
     72
    6973
    7074#endif
  • uspace/lib/usbhid/include/usb/hid/usages/kbdgen.h

    rd736fe38 rc7b5826  
    2727 */
    2828
    29 /** @addtogroup libusb
     29/** @addtogroup libusbhid
    3030 * @{
    3131 */
  • uspace/lib/usbhid/include/usb/hid/usages/led.h

    rd736fe38 rc7b5826  
    2727 */
    2828
    29 /** @addtogroup libusb
     29/** @addtogroup libusbhid
    3030 * @{
    3131 */
     
    3333 * @brief USB HID Usage Tables - LED page.
    3434 */
    35 #ifndef LIBUSB_UTLED_H_
    36 #define LIBUSB_UTLED_H_
     35#ifndef LIBUSBHID_UTLED_H_
     36#define LIBUSBHID_UTLED_H_
    3737
    3838typedef enum {
Note: See TracChangeset for help on using the changeset viewer.