Changeset 2b0db98 in mainline for uspace/drv/usbhub/usbhub_private.h


Ignore:
Timestamp:
2011-01-07T14:02:56Z (14 years ago)
Author:
Lubos Slovak <lubos.slovak@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
6986418
Parents:
d99120f (diff), 0f191a2 (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:

Merged development into lelian/hidd

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/usbhub/usbhub_private.h

    rd99120f r2b0db98  
    3838
    3939#include "usbhub.h"
     40#include "usblist.h"
     41
    4042#include <adt/list.h>
    4143#include <bool.h>
    4244#include <driver.h>
    4345#include <usb/usb.h>
     46#include <usb/usbdrv.h>
    4447#include <usb/classes/hub.h>
    4548#include <usb/devreq.h>
     49#include <usb/debug.h>
    4650
    4751//************
     
    5559//************
    5660//
    57 // My private list implementation; I did not like the original helenos list
    58 //
    59 // This one does not depend on the structure of stored data
     61// convenience debug printf
    6062//
    6163//************
    62 
    63 /** general list structure */
    64 
    65 
    66 typedef struct usb_general_list{
    67         void * data;
    68         struct usb_general_list * prev, * next;
    69 } usb_general_list_t;
    70 
    71 /** create head of usb general list */
    72 usb_general_list_t * usb_lst_create(void);
    73 
    74 /** initialize head of usb general list */
    75 void usb_lst_init(usb_general_list_t * lst);
    76 
    77 
    78 /** is the list empty? */
    79 static inline bool usb_lst_empty(usb_general_list_t * lst){
    80         return lst?(lst->next==lst):true;
    81 }
    82 
    83 /** append data behind item */
    84 void usb_lst_append(usb_general_list_t * lst, void * data);
    85 
    86 /** prepend data beore item */
    87 void usb_lst_prepend(usb_general_list_t * lst, void * data);
    88 
    89 /** remove list item from list */
    90 void usb_lst_remove(usb_general_list_t * item);
    91 
    92 /** get data o specified type from list item */
    93 #define usb_lst_get_data(item, type)  (type *) (item->data)
    94 
    95 /** get usb_hub_info_t data from list item */
    96 static inline usb_hub_info_t * usb_hub_lst_get_data(usb_general_list_t * item) {
    97         return usb_lst_get_data(item,usb_hub_info_t);
    98 }
     64#define dprintf(level, format, ...) \
     65        usb_dprintf(NAME, (level), format "\n", ##__VA_ARGS__)
    9966
    10067/**
Note: See TracChangeset for help on using the changeset viewer.