Changeset a76b01b4 in mainline for uspace/lib/usbhid


Ignore:
Timestamp:
2012-02-24T19:11:23Z (14 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
a2bd8822
Parents:
76fbd9a
Message:

libus*: remove optical separators

Location:
uspace/lib/usbhid
Files:
9 edited

Legend:

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

    r76fbd9a ra76b01b4  
    3838#include <stdint.h>
    3939
    40 /*---------------------------------------------------------------------------*/
     40
    4141/*
    4242 * Item prefix
     
    5656#define USB_HID_ITEM_IS_LONG(data)      (data == 0xFE)
    5757
    58 /*---------------------------------------------------------------------------*/
     58
    5959/*
    6060 * Extended usage macros
     
    7070#define USB_HID_EXTENDED_USAGE(usage)           (usage & 0xFFFF)
    7171
    72 /*---------------------------------------------------------------------------*/
     72
    7373/*
    7474 * Input/Output/Feature Item flags
     
    142142#define USB_HID_ITEM_FLAG_BUFFERED(flags)       ((flags & 0x100) == 0x100)
    143143
    144 /*---------------------------------------------------------------------------*/
     144
    145145
    146146/* MAIN ITEMS */
     
    185185#define USB_HID_REPORT_TAG_END_COLLECTION       0xC
    186186
    187 /*---------------------------------------------------------------------------*/
     187
    188188
    189189/* GLOBAL ITEMS */
     
    272272#define USB_HID_REPORT_TAG_POP                  0xB
    273273
    274 /*---------------------------------------------------------------------------*/
     274
    275275
    276276/* LOCAL ITEMS */
     
    347347#define USB_HID_REPORT_TAG_DELIMITER            0xA
    348348
    349 /*---------------------------------------------------------------------------*/
     349
    350350
    351351#endif
  • uspace/lib/usbhid/include/usb/hid/hidpath.h

    r76fbd9a ra76b01b4  
    4141
    4242
    43 /*---------------------------------------------------------------------------*/
     43
    4444/*
    4545 * Flags of usage paths comparison modes.
     
    7373#define USB_HID_PATH_COMPARE_ANYWHERE           8
    7474
    75 /*----------------------------------------------------------------------------*/
     75
    7676/**
    7777 * Item of usage path structure. Last item of linked list describes one item
     
    9393
    9494
    95 /*---------------------------------------------------------------------------*/
     95
    9696/**
    9797 * USB HID usage path structure.
     
    112112} usb_hid_report_path_t;
    113113
    114 /*---------------------------------------------------------------------------*/
     114
    115115usb_hid_report_path_t *usb_hid_report_path(void);
    116116
  • uspace/lib/usbhid/include/usb/hid/hidtypes.h

    r76fbd9a ra76b01b4  
    3939#include <adt/list.h>
    4040
    41 /*---------------------------------------------------------------------------*/
     41
    4242
    4343/**
     
    6969        (((x) < 0 ) ? ((1 << (size)) + (x)) : (x))
    7070
    71 /*---------------------------------------------------------------------------*/
     71
    7272
    7373/**
     
    8686} usb_hid_report_type_t;
    8787
    88 /*---------------------------------------------------------------------------*/
     88
    8989
    9090/**
     
    111111       
    112112} usb_hid_report_t;
    113 /*---------------------------------------------------------------------------*/
     113
    114114
    115115/**
     
    135135        link_t reports_link;
    136136} usb_hid_report_description_t;
    137 /*---------------------------------------------------------------------------*/
     137
    138138
    139139/**
     
    202202} usb_hid_report_field_t;
    203203
    204 /*---------------------------------------------------------------------------*/
     204
    205205
    206206/**
     
    287287        int in_delimiter;
    288288} usb_hid_report_item_t;
    289 /*---------------------------------------------------------------------------*/
     289
    290290/**
    291291 * Enum of the keyboard modifiers
     
    314314        USB_HID_MOD_RGUI
    315315};
    316 /*---------------------------------------------------------------------------*/
     316
    317317
    318318
  • uspace/lib/usbhid/include/usb/hid/request.h

    r76fbd9a ra76b01b4  
    4242#include <usb/dev/pipes.h>
    4343
    44 /*----------------------------------------------------------------------------*/
     44
    4545
    4646int usbhid_req_set_report(usb_pipe_t *ctrl_pipe, int iface_no,
     
    6161int usbhid_req_get_idle(usb_pipe_t *ctrl_pipe, int iface_no, uint8_t *duration);
    6262
    63 /*----------------------------------------------------------------------------*/
     63
    6464
    6565#endif /* USB_KBD_HIDREQ_H_ */
  • uspace/lib/usbhid/src/hiddescriptor.c

    r76fbd9a ra76b01b4  
    4141#include <assert.h>
    4242
    43 /*---------------------------------------------------------------------------*/
     43
    4444/*
    4545 * Constants defining current parsing mode for correct parsing of the set of
     
    6161#define INSIDE_DELIMITER_SET    2
    6262
    63 /*---------------------------------------------------------------------------*/
     63
    6464       
    6565/** The new report item flag. Used to determine when the item is completly
     
    7878#define USB_HID_UNKNOWN_TAG             -99
    7979
    80 /*---------------------------------------------------------------------------*/
     80
    8181/**
    8282 * Checks if given collection path is already present in report structure and
     
    124124}
    125125
    126 /*---------------------------------------------------------------------------*/
     126
    127127/**
    128128 * Initialize the report descriptor parser structure
     
    147147}
    148148
    149 /*---------------------------------------------------------------------------*/
     149
    150150
    151151/**
     
    314314        return EOK;
    315315}
    316 /*---------------------------------------------------------------------------*/
     316
    317317/**
    318318 * Finds description of report with given report_id and of given type in
     
    348348        return NULL;
    349349}
    350 /*---------------------------------------------------------------------------*/
     350
    351351
    352352/** Parse HID report descriptor.
     
    536536}
    537537
    538 /*---------------------------------------------------------------------------*/
     538
    539539
    540540/**
     
    871871        return EOK;
    872872}
    873 /*---------------------------------------------------------------------------*/
     873
    874874
    875875/**
     
    892892        return result;
    893893}
    894 /*---------------------------------------------------------------------------*/
     894
    895895
    896896/**
     
    941941
    942942}
    943 /*---------------------------------------------------------------------------*/
     943
    944944
    945945/**
     
    972972        }
    973973}
    974 /*---------------------------------------------------------------------------*/
     974
    975975
    976976
     
    10221022        return;
    10231023}
    1024 /*---------------------------------------------------------------------------*/
     1024
    10251025
    10261026/**
  • uspace/lib/usbhid/src/hidparser.c

    r76fbd9a ra76b01b4  
    4141#include <assert.h>
    4242
    43 /*---------------------------------------------------------------------------*/
     43
    4444/*
    4545 * Data translation private functions
     
    5252        int32_t value);
    5353
    54 /*---------------------------------------------------------------------------*/
     54
    5555
    5656static int usb_pow(int a, int b)
     
    6868        }
    6969}
    70 /*---------------------------------------------------------------------------*/
     70
    7171
    7272/** Returns size of report of specified report id and type in items
     
    117117        }
    118118}
    119 /*---------------------------------------------------------------------------*/
     119
    120120
    121121/** Parse and act upon a HID report.
     
    192192}
    193193
    194 /*---------------------------------------------------------------------------*/
     194
    195195/**
    196196 * Translate data from the report as specified in report descriptor item
     
    274274}
    275275
    276 /*---------------------------------------------------------------------------*/
     276
    277277/* OUTPUT API */
    278278
     
    431431}
    432432
    433 /*---------------------------------------------------------------------------*/
     433
    434434/**
    435435 * Translate given data for putting them into the outoput report
     
    476476}
    477477
    478 /*---------------------------------------------------------------------------*/
     478
    479479/**
    480480 * Clones given state table
     
    497497}
    498498
    499 /*---------------------------------------------------------------------------*/
     499
    500500/**
    501501 * Function for sequence walking through the report. Returns next field in the
     
    552552}
    553553
    554 /*---------------------------------------------------------------------------*/
     554
    555555/**
    556556 * Returns next report_id of report of specified type. If zero is given than
     
    600600}
    601601
    602 /*---------------------------------------------------------------------------*/
     602
    603603/**
    604604 * Reset all local items in given state table
  • uspace/lib/usbhid/src/hidpath.c

    r76fbd9a ra76b01b4  
    4141#include <assert.h>
    4242
    43 /*---------------------------------------------------------------------------*/
     43
    4444/**
    4545 * Compares two usages if they are same or not or one of the usages is not
     
    6363        ((page1 == page2) || (page1 == 0) || (page2 == 0))
    6464
    65 /*---------------------------------------------------------------------------*/
     65
    6666/**
    6767 * Appends one item (couple of usage_path and usage) into the usage path
     
    9393}
    9494
    95 /*---------------------------------------------------------------------------*/
     95
    9696/**
    9797 * Removes last item from the usage path structure
     
    114114}
    115115
    116 /*---------------------------------------------------------------------------*/
     116
    117117/**
    118118 * Nulls last item of the usage path structure.
     
    133133}
    134134
    135 /*---------------------------------------------------------------------------*/
     135
    136136/**
    137137 * Modifies last item of usage path structure by given usage page or usage
     
    164164}
    165165
    166 /*---------------------------------------------------------------------------*/
     166
    167167/**
    168168 *
     
    188188}
    189189
    190 /*---------------------------------------------------------------------------*/
     190
    191191/**
    192192 * Compares two usage paths structures
     
    354354}
    355355
    356 /*---------------------------------------------------------------------------*/
     356
    357357/**
    358358 * Allocates and initializes new usage path structure.
     
    376376}
    377377
    378 /*---------------------------------------------------------------------------*/
     378
    379379/**
    380380 * Releases given usage path structure.
     
    395395}
    396396
    397 /*---------------------------------------------------------------------------*/
     397
    398398/**
    399399 * Clone content of given usage path to the new one
     
    441441}
    442442
    443 /*---------------------------------------------------------------------------*/
     443
    444444/**
    445445 * Sets report id in usage path structure
  • uspace/lib/usbhid/src/hidreport.c

    r76fbd9a ra76b01b4  
    161161}
    162162
    163 /*----------------------------------------------------------------------------*/
     163
    164164
    165165int usb_hid_process_report_descriptor(usb_device_t *dev,
  • uspace/lib/usbhid/src/hidreq.c

    r76fbd9a ra76b01b4  
    4545#include <usb/hid/request.h>
    4646
    47 /*----------------------------------------------------------------------------*/
     47
    4848/**
    4949 * Send Set Report request to the HID device.
     
    9797}
    9898
    99 /*----------------------------------------------------------------------------*/
     99
    100100/**
    101101 * Send Set Protocol request to the HID device.
     
    145145}
    146146
    147 /*----------------------------------------------------------------------------*/
     147
    148148/**
    149149 * Send Set Idle request to the HID device.
     
    195195}
    196196
    197 /*----------------------------------------------------------------------------*/
     197
    198198/**
    199199 * Send Get Report request to the HID device.
     
    251251}
    252252
    253 /*----------------------------------------------------------------------------*/
     253
    254254/**
    255255 * Send Get Protocol request to the HID device.
     
    310310}
    311311
    312 /*----------------------------------------------------------------------------*/
     312
    313313/**
    314314 * Send Get Idle request to the HID device.
     
    373373}
    374374
    375 /*----------------------------------------------------------------------------*/
     375
    376376
    377377/**
Note: See TracChangeset for help on using the changeset viewer.