Changeset a6afb4c in mainline for uspace/lib/drv/include


Ignore:
Timestamp:
2018-01-23T14:02:35Z (7 years ago)
Author:
Ondřej Hlavatý <aearsis@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
4db49344
Parents:
e7e1fd3
git-author:
Ondřej Hlavatý <aearsis@…> (2018-01-23 13:35:50)
git-committer:
Ondřej Hlavatý <aearsis@…> (2018-01-23 14:02:35)
Message:

usbhost: check validity of arguments, cleanup

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/drv/include/usbhc_iface.h

    re7e1fd3 ra6afb4c  
    6060 * Negative values could be used to indicate error.
    6161 */
    62 typedef int16_t usb_endpoint_t;
     62typedef uint16_t usb_endpoint_t;
    6363
    6464/** USB address type.
    6565 * Negative values could be used to indicate error.
    6666 */
    67 typedef int16_t usb_address_t;
     67typedef uint16_t usb_address_t;
     68
     69/**
     70 * USB Stream ID type.
     71 */
     72typedef uint16_t usb_stream_t;
    6873
    6974/** USB transfer type. */
     
    7277        USB_TRANSFER_ISOCHRONOUS = 1,
    7378        USB_TRANSFER_BULK = 2,
    74         USB_TRANSFER_INTERRUPT = 3
     79        USB_TRANSFER_INTERRUPT = 3,
    7580} usb_transfer_type_t;
     81
     82#define USB_TRANSFER_COUNT  (USB_TRANSFER_INTERRUPT + 1)
    7683
    7784/** USB data transfer direction. */
     
    7986        USB_DIRECTION_IN,
    8087        USB_DIRECTION_OUT,
    81         USB_DIRECTION_BOTH
     88        USB_DIRECTION_BOTH,
    8289} usb_direction_t;
     90
     91#define USB_DIRECTION_COUNT  (USB_DIRECTION_BOTH + 1)
    8392
    8493/** USB complete address type.
     
    8998                usb_address_t address;
    9099                usb_endpoint_t endpoint;
    91                 uint32_t stream;
     100                usb_stream_t stream;
    92101        } __attribute__((packed));
    93102        uint64_t packed;
Note: See TracChangeset for help on using the changeset viewer.