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


Ignore:
Timestamp:
2011-05-26T20:43:26Z (14 years ago)
Author:
Matej Klonfar <maklf@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
d861c22
Parents:
14e1bcc
Message:

doxygen and coding style update

Location:
uspace/lib/usbhid/include/usb/hid
Files:
5 edited

Legend:

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

    r14e1bcc rf3b39b4  
    9696#define USB_HID_ITEM_FLAG_RELATIVE(flags)       ((flags & 0x4) == 0x4)
    9797
    98 /**
    99  * Indicates whether the data “rolls over” when reaching either the extreme
     98/** Indicates whether the data “rolls over” when reaching either the extreme
    10099 * high or low value. For example, a dial that can spin freely 360 degrees
    101100 * might output values from 0 to 10. If Wrap is indicated, the next value
  • uspace/lib/usbhid/include/usb/hid/hiddescriptor.h

    r14e1bcc rf3b39b4  
    4343
    4444int usb_hid_parse_report_descriptor(usb_hid_report_t *report,
    45                                     const uint8_t *data, size_t size);
     45                const uint8_t *data, size_t size);
    4646
    4747void usb_hid_free_report(usb_hid_report_t *report);
     
    5151int usb_hid_report_init(usb_hid_report_t *report);
    5252
    53 int usb_hid_report_append_fields(usb_hid_report_t *report, 
    54                                  usb_hid_report_item_t *report_item);
     53int usb_hid_report_append_fields(usb_hid_report_t *report,
     54                usb_hid_report_item_t *report_item);
    5555
    56 usb_hid_report_description_t * usb_hid_report_find_description(const usb_hid_report_t *report, uint8_t report_id, usb_hid_report_type_t type);
     56usb_hid_report_description_t * usb_hid_report_find_description(
     57                const usb_hid_report_t *report, uint8_t report_id,
     58                usb_hid_report_type_t type);
    5759
    58 int usb_hid_report_parse_tag(uint8_t tag, uint8_t class, const uint8_t *data, size_t item_size,
    59                              usb_hid_report_item_t *report_item, usb_hid_report_path_t *usage_path);
     60int usb_hid_report_parse_tag(uint8_t tag, uint8_t class, const uint8_t *data,
     61                size_t item_size, usb_hid_report_item_t *report_item,
     62                usb_hid_report_path_t *usage_path);
    6063
    61 int usb_hid_report_parse_main_tag(uint8_t tag, const uint8_t *data, size_t item_size,
    62                              usb_hid_report_item_t *report_item, usb_hid_report_path_t *usage_path);
     64int usb_hid_report_parse_main_tag(uint8_t tag, const uint8_t *data,
     65                size_t item_size, usb_hid_report_item_t *report_item,
     66                usb_hid_report_path_t *usage_path);
    6367
    64 int usb_hid_report_parse_global_tag(uint8_t tag, const uint8_t *data, size_t item_size,
    65                              usb_hid_report_item_t *report_item, usb_hid_report_path_t *usage_path);
     68int usb_hid_report_parse_global_tag(uint8_t tag, const uint8_t *data,
     69                size_t item_size, usb_hid_report_item_t *report_item,
     70                usb_hid_report_path_t *usage_path);
    6671
    67 int usb_hid_report_parse_local_tag(uint8_t tag, const uint8_t *data, size_t item_size,
    68                              usb_hid_report_item_t *report_item, usb_hid_report_path_t *usage_path);
     72int usb_hid_report_parse_local_tag(uint8_t tag, const uint8_t *data,
     73                size_t item_size, usb_hid_report_item_t *report_item,
     74                usb_hid_report_path_t *usage_path);
    6975
    7076void usb_hid_descriptor_print_list(link_t *head);
     
    7480void usb_hid_free_report_list(link_t *head);
    7581
    76 usb_hid_report_item_t *usb_hid_report_item_clone(const usb_hid_report_item_t *item);
     82usb_hid_report_item_t *usb_hid_report_item_clone(
     83                const usb_hid_report_item_t *item);
    7784
    7885uint32_t usb_hid_report_tag_data_uint32(const uint8_t *data, size_t size);
    7986
    80 usb_hid_report_path_t *usb_hid_report_path_try_insert(usb_hid_report_t *report, usb_hid_report_path_t *cmp_path);
     87usb_hid_report_path_t *usb_hid_report_path_try_insert(usb_hid_report_t*report,
     88                usb_hid_report_path_t *cmp_path);
    8189
    8290
  • uspace/lib/usbhid/include/usb/hid/hidparser.h

    r14e1bcc rf3b39b4  
    4747 * Input report parser functions
    4848 */
    49 /** */
    50 int usb_hid_parse_report(const usb_hid_report_t *report, const uint8_t *data,
    51                          size_t size, uint8_t *report_id);
     49int usb_hid_parse_report(const usb_hid_report_t *report, const uint8_t *data,
     50                size_t size, uint8_t *report_id);
    5251
    5352/*
    5453 * Output report parser functions
    5554 */
    56 /** Allocates output report buffer*/
    5755uint8_t *usb_hid_report_output(usb_hid_report_t *report, size_t *size,
    58                                uint8_t report_id);
     56                uint8_t report_id);
    5957
    60 /** Frees output report buffer*/
    6158void usb_hid_report_output_free(uint8_t *output);
    6259
    63 /** Returns size of report in items */
    64 size_t usb_hid_report_size(usb_hid_report_t *report, uint8_t report_id,
    65                            usb_hid_report_type_t type);
     60size_t usb_hid_report_size(usb_hid_report_t *report, uint8_t report_id,
     61                usb_hid_report_type_t type);
    6662
    67 size_t usb_hid_report_byte_size(usb_hid_report_t *report, uint8_t report_id, 
    68                            usb_hid_report_type_t type);
     63size_t usb_hid_report_byte_size(usb_hid_report_t *report, uint8_t report_id,
     64                usb_hid_report_type_t type);
    6965
    7066
    71 /** Makes the output report buffer by translated given data */
    72 int usb_hid_report_output_translate(usb_hid_report_t *report, uint8_t report_id,
    73                                     uint8_t *buffer, size_t size);
     67int usb_hid_report_output_translate(usb_hid_report_t *report,
     68                uint8_t report_id, uint8_t *buffer, size_t size);
    7469
    7570
    76 /** */
    77 usb_hid_report_field_t *usb_hid_report_get_sibling(usb_hid_report_t *report,
    78                                                    usb_hid_report_field_t *field,
    79                                                    usb_hid_report_path_t *path,
    80                                                    int flags,
    81                                                   usb_hid_report_type_t type);
     71/*
     72 * Report descriptor structure observing functions
     73 */
     74usb_hid_report_field_t *usb_hid_report_get_sibling(usb_hid_report_t *report,
     75                usb_hid_report_field_t *field, usb_hid_report_path_t *path,
     76                int flags, usb_hid_report_type_t type);
    8277
    83 /** */
    8478uint8_t usb_hid_get_next_report_id(usb_hid_report_t *report,
    85                                      uint8_t report_id,
    86                                      usb_hid_report_type_t type);
     79                uint8_t report_id, usb_hid_report_type_t type);
    8780
    8881#endif
  • uspace/lib/usbhid/include/usb/hid/hidpath.h

    r14e1bcc rf3b39b4  
    4242
    4343/*---------------------------------------------------------------------------*/
    44 /**
     44/*
    4545 * Flags of usage paths comparison modes.
    4646 *
    4747 */
    48 /** Wanted usage path must be exactly the same as the searched one.
    49  * This option cannot be combined with the others.
     48/** Wanted usage path must be exactly the same as the searched one.  This
     49 * option cannot be combined with the others.
    5050 */
    5151#define USB_HID_PATH_COMPARE_STRICT             0
     
    5757
    5858/**
    59  * Only usage page are compared along the usage path.
    60  * This option can be combined with others.
     59 * Only usage page are compared along the usage path.  This option can be
     60 * combined with others.
    6161 */
    6262#define USB_HID_PATH_COMPARE_USAGE_PAGE_ONLY    2
     
    101101        int depth;     
    102102
    103         /** Report id. Zero is reserved and means that report id is not used. */
     103        /** Report id. Zero is reserved and means that report id is not used.
     104         * */
    104105        uint8_t report_id;
    105106       
     
    117118void usb_hid_report_path_free(usb_hid_report_path_t *path);
    118119
    119 int usb_hid_report_path_set_report_id(usb_hid_report_path_t *usage_path, 
    120                                       uint8_t report_id);
     120int usb_hid_report_path_set_report_id(usb_hid_report_path_t *usage_path,
     121                uint8_t report_id);
    121122
    122123int usb_hid_report_path_append_item(usb_hid_report_path_t *usage_path,
    123                                     int32_t usage_page, int32_t usage);
     124                int32_t usage_page, int32_t usage);
    124125
    125126void usb_hid_report_remove_last_item(usb_hid_report_path_t *usage_path);
     
    128129
    129130void usb_hid_report_set_last_item(usb_hid_report_path_t *usage_path,
    130                                   int32_t tag, int32_t data);
     131                int32_t tag, int32_t data);
    131132
    132 int usb_hid_report_compare_usage_path(usb_hid_report_path_t *report_path, 
    133                                       usb_hid_report_path_t *path, int flags);
     133int usb_hid_report_compare_usage_path(usb_hid_report_path_t *report_path,
     134                usb_hid_report_path_t *path, int flags);
    134135
    135 usb_hid_report_path_t *usb_hid_report_path_clone(usb_hid_report_path_t *usage_path);
     136usb_hid_report_path_t *usb_hid_report_path_clone(
     137                usb_hid_report_path_t *usage_path);
    136138
    137139void usb_hid_print_usage_path(usb_hid_report_path_t *path);
  • uspace/lib/usbhid/include/usb/hid/hidtypes.h

    r14e1bcc rf3b39b4  
    7272
    7373/**
    74  * Report type
     74 * Enum of report types
    7575 */
    7676typedef enum {
     77        /** Input report. Data are sent from device to system */
    7778        USB_HID_REPORT_TYPE_INPUT = 1,
     79
     80        /** Output report. Data are sent from system to device */
    7881        USB_HID_REPORT_TYPE_OUTPUT = 2,
     82
     83        /** Feature report. Describes device configuration information that
     84         * can be sent to the device */
    7985        USB_HID_REPORT_TYPE_FEATURE = 3
    8086} usb_hid_report_type_t;
Note: See TracChangeset for help on using the changeset viewer.