Changeset b72efe8 in mainline for uspace/lib/usbhid/include/usb


Ignore:
Timestamp:
2011-06-19T14:38:59Z (14 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
74464e8
Parents:
1d1bb0f
Message:

Separate list_t typedef from link_t (user-space part).

  • list_t represents lists
  • Use list_first(), list_last(), list_empty() where appropriate
  • Use list_foreach() where possible
  • assert_link_not_used()
  • usb_hid_report_path_free() shall not unlink the path, caller must do it
Location:
uspace/lib/usbhid/include/usb/hid
Files:
3 edited

Legend:

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

    r1d1bb0f rb72efe8  
    7474                usb_hid_report_path_t *usage_path);
    7575
    76 void usb_hid_descriptor_print_list(link_t *head);
     76void usb_hid_descriptor_print_list(list_t *list);
    7777
    7878void usb_hid_report_reset_local_items(usb_hid_report_item_t *report_item);
    7979
    80 void usb_hid_free_report_list(link_t *head);
     80void usb_hid_free_report_list(list_t *list);
    8181
    8282usb_hid_report_item_t *usb_hid_report_item_clone(
  • uspace/lib/usbhid/include/usb/hid/hidpath.h

    r1d1bb0f rb72efe8  
    8888        uint8_t flags;
    8989
    90         /** Linked list structure*/
    91         link_t link;
     90        /** Link to usb_hid_report_path_t.items list */
     91        link_t rpath_items_link;
    9292} usb_hid_report_usage_path_t;
    9393
     
    9898 * */
    9999typedef struct {
    100         /** Length of usage path */     
    101         int depth;     
     100        /** Length of usage path */
     101        int depth;
    102102
    103103        /** Report id. Zero is reserved and means that report id is not used.
    104104         * */
    105105        uint8_t report_id;
    106        
    107         /** Linked list structure. */   
    108         link_t link; /* list */
    109106
    110         /** Head of the list of usage path items. */
    111         link_t head;
     107        /** Link to usb_hid_report_path_t.collection_paths list. */
     108        link_t cpath_link;
    112109
     110        /** List of usage path items. */
     111        list_t items;   /* of usb_hid_report_usage_path_t */
    113112} usb_hid_report_path_t;
    114113
  • uspace/lib/usbhid/include/usb/hid/hidtypes.h

    r1d1bb0f rb72efe8  
    9595        int report_count;
    9696
    97         /** Head of linked list of description of reports. */
    98         link_t reports;
    99 
    100         /** Head of linked list of all used usage/collection paths. */
    101         link_t collection_paths;
     97        /** List of description of reports. */
     98        list_t reports; /* of usb_hid_report_description_t */
     99
     100        /** List of all used usage/collection paths. */
     101        list_t collection_paths;
    102102
    103103        /** Length of list of usage paths. */
     
    129129        size_t item_length;
    130130       
    131         /** Linked list of report items in report */
    132         link_t report_items;
    133 
    134         /** Linked list of descriptions. */
    135         link_t link;
     131        /** List of report items in report */
     132        list_t report_items;
     133
     134        /** Link to usb_hid_report_t.reports list. */
     135        link_t reports_link;
    136136} usb_hid_report_description_t;
    137137/*---------------------------------------------------------------------------*/
     
    198198        int32_t value;
    199199
    200         /** List to another report items */
    201         link_t link;
     200        /** Link to usb_hid_report_description_t.report_items list */
     201        link_t ritems_link;
    202202} usb_hid_report_field_t;
    203203
Note: See TracChangeset for help on using the changeset viewer.