Changeset 74d6e90 in mainline for uspace/lib/usb/include/usb/usb.h


Ignore:
Timestamp:
2011-02-04T13:07:32Z (13 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
97e87de
Parents:
621afdb (diff), ff244e6 (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:

Merge devel branch

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/usb/include/usb/usb.h

    r621afdb r74d6e90  
    3737
    3838#include <sys/types.h>
     39#include <byteorder.h>
    3940#include <ipc/ipc.h>
     41
     42/** Convert 16bit value from native (host) endianness to USB endianness. */
     43#define uint16_host2usb(n) host2uint16_t_le((n))
     44
     45/** Convert 32bit value from native (host) endianness to USB endianness. */
     46#define uint32_host2usb(n) host2uint32_t_le((n))
     47
     48/** Convert 16bit value from USB endianness into native (host) one. */
     49#define uint16_usb2host(n) uint16_t_le2host((n))
     50
     51/** Convert 32bit value from USB endianness into native (host) one. */
     52#define uint32_usb2host(n) uint32_t_le2host((n))
     53
    4054
    4155/** USB transfer type. */
     
    5266typedef enum {
    5367        USB_DIRECTION_IN,
    54         USB_DIRECTION_OUT
     68        USB_DIRECTION_OUT,
     69        USB_DIRECTION_BOTH
    5570} usb_direction_t;
    5671
Note: See TracChangeset for help on using the changeset viewer.