Changeset fd17ab5 in mainline
- Timestamp:
- 2010-10-13T06:42:53Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 2c381250
- Parents:
- 2b887bf7
- Location:
- uspace/lib/usb
- Files:
-
- 2 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/usb/Makefile
r2b887bf7 rfd17ab5 31 31 32 32 SOURCES = \ 33 hcd.c 33 hcd.c \ 34 usb.c 34 35 35 36 include $(USPACE_PREFIX)/Makefile.common -
uspace/lib/usb/hcd.h
r2b887bf7 rfd17ab5 36 36 #define LIBUSB_HCD_H_ 37 37 38 #include "usb.h" 39 38 40 #include <ipc/ipc.h> 39 41 #include <async.h> … … 41 43 /** Maximum size of transaction payload. */ 42 44 #define USB_MAX_PAYLOAD_SIZE 1020 43 44 /** USB transfer type. */45 typedef enum {46 USB_TRANSFER_CONTROL = 0,47 USB_TRANSFER_ISOCHRONOUS = 1,48 USB_TRANSFER_BULK = 2,49 USB_TRANSFER_INTERRUPT = 350 } usb_transfer_type_t;51 52 const char * usb_str_transfer_type(usb_transfer_type_t t);53 54 /** USB data transfer direction. */55 typedef enum {56 USB_DIRECTION_IN,57 USB_DIRECTION_OUT58 } usb_direction_t;59 60 /** USB address type.61 * Negative values could be used to indicate error.62 */63 typedef int usb_address_t;64 65 /** USB endpoint number type.66 * Negative values could be used to indicate error.67 */68 typedef int usb_endpoint_t;69 70 /** USB complete address type.71 * Pair address + endpoint is identification of transaction recipient.72 */73 typedef struct {74 usb_address_t address;75 usb_endpoint_t endpoint;76 } usb_target_t;77 78 static inline int usb_target_same(usb_target_t a, usb_target_t b)79 {80 return (a.address == b.address)81 && (a.endpoint == b.endpoint);82 }83 45 84 46 /** Opaque handle of active USB transaction. -
uspace/lib/usb/hid.h
r2b887bf7 rfd17ab5 47 47 } usb_hid_request_t; 48 48 49 /** USB/HID interface protocols. */ 50 typedef enum { 51 USB_HID_PROTOCOL_NONE = 0, 52 USB_HID_PROTOCOL_KEYBOARD = 1, 53 USB_HID_PROTOCOL_MOUSE = 2 54 } usb_hid_protocol_t; 49 55 50 56 #endif
Note:
See TracChangeset
for help on using the changeset viewer.